diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java index 036bada42ed..57abcc047e3 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerTestGenerated.java @@ -23,46 +23,43 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PureKotlin extends AbstractIncrementalJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingFunctionsViaPackagePart") public void testAccessingFunctionsViaPackagePart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/accessingFunctionsViaPackagePart/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/accessingFunctionsViaPackagePart/"); } @TestMetadata("accessingPropertiesViaField") public void testAccessingPropertiesViaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/accessingPropertiesViaField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/accessingPropertiesViaField/"); } @TestMetadata("addClass") public void testAddClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addClass/"); } @TestMetadata("addFileWithFunctionOverload") public void testAddFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/"); } @TestMetadata("addMemberTypeAlias") public void testAddMemberTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addMemberTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addMemberTypeAlias/"); } @TestMetadata("addTopLevelTypeAlias") public void testAddTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } @TestMetadata("allConstants") public void testAllConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/allConstants/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/allConstants/"); } public void testAllFilesPresentInPureKotlin() throws Exception { @@ -71,644 +68,537 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa @TestMetadata("annotations") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/annotations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/annotations/"); } @TestMetadata("anonymousObjectChanged") public void testAnonymousObjectChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/anonymousObjectChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/anonymousObjectChanged/"); } @TestMetadata("changeTypeImplicitlyWithCircularDependency") public void testChangeTypeImplicitlyWithCircularDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); } @TestMetadata("changeWithRemovingUsage") public void testChangeWithRemovingUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); } @TestMetadata("classObjectConstantChanged") public void testClassObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/"); } @TestMetadata("classRecreated") public void testClassRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classRecreated/"); } @TestMetadata("classSignatureChanged") public void testClassSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classSignatureChanged/"); } @TestMetadata("classSignatureUnchanged") public void testClassSignatureUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classSignatureUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classSignatureUnchanged/"); } @TestMetadata("compilationErrorThenFixedOtherPackage") public void testCompilationErrorThenFixedOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedOtherPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedOtherPackage/"); } @TestMetadata("compilationErrorThenFixedSamePackage") public void testCompilationErrorThenFixedSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedSamePackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedSamePackage/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart") public void testCompilationErrorThenFixedWithPhantomPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart2") public void testCompilationErrorThenFixedWithPhantomPart2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart2/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart3") public void testCompilationErrorThenFixedWithPhantomPart3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart3/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart3/"); } @TestMetadata("constantRemoved") public void testConstantRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantRemoved/"); } @TestMetadata("constantValueChanged") public void testConstantValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantValueChanged/"); } @TestMetadata("constantsUnchanged") public void testConstantsUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/"); } @TestMetadata("defaultArgumentInConstructorAdded") public void testDefaultArgumentInConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorAdded/"); } @TestMetadata("defaultArgumentInConstructorRemoved") public void testDefaultArgumentInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/"); } @TestMetadata("defaultValueAdded") public void testDefaultValueAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueAdded/"); } @TestMetadata("defaultValueChanged") public void testDefaultValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueChanged/"); } @TestMetadata("defaultValueInConstructorChanged") public void testDefaultValueInConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorChanged/"); } @TestMetadata("defaultValueInConstructorRemoved") public void testDefaultValueInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/"); } @TestMetadata("defaultValueRemoved1") public void testDefaultValueRemoved1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/"); } @TestMetadata("defaultValueRemoved2") public void testDefaultValueRemoved2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/"); } @TestMetadata("delegatedPropertyInlineExtensionAccessor") public void testDelegatedPropertyInlineExtensionAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/"); } @TestMetadata("delegatedPropertyInlineMethodAccessor") public void testDelegatedPropertyInlineMethodAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/"); } @TestMetadata("dependencyClassReferenced") public void testDependencyClassReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/"); } @TestMetadata("fileWithConstantRemoved") public void testFileWithConstantRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/"); } @TestMetadata("fileWithInlineFunctionRemoved") public void testFileWithInlineFunctionRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/fileWithInlineFunctionRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/fileWithInlineFunctionRemoved/"); } @TestMetadata("filesExchangePackages") public void testFilesExchangePackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/filesExchangePackages/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/filesExchangePackages/"); } @TestMetadata("funRedeclaration") public void testFunRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/funRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/funRedeclaration/"); } @TestMetadata("funVsConstructorOverloadConflict") public void testFunVsConstructorOverloadConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/"); } @TestMetadata("functionBecameInline") public void testFunctionBecameInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/functionBecameInline/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/functionBecameInline/"); } @TestMetadata("functionReferencingClass") public void testFunctionReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/functionReferencingClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/functionReferencingClass/"); } @TestMetadata("independentClasses") public void testIndependentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/independentClasses/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/independentClasses/"); } @TestMetadata("inlineFunctionBecomesNonInline") public void testInlineFunctionBecomesNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionBecomesNonInline/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionBecomesNonInline/"); } @TestMetadata("inlineFunctionUsageAdded") public void testInlineFunctionUsageAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionUsageAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionUsageAdded/"); } @TestMetadata("inlineFunctionsCircularDependency") public void testInlineFunctionsCircularDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsCircularDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsCircularDependency/"); } @TestMetadata("inlineFunctionsUnchanged") public void testInlineFunctionsUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsUnchanged/"); } @TestMetadata("inlineLinesChanged") public void testInlineLinesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineLinesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineLinesChanged/"); } @TestMetadata("inlineModifiedWithUsage") public void testInlineModifiedWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineModifiedWithUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineModifiedWithUsage/"); } @TestMetadata("inlinePrivateFunctionAdded") public void testInlinePrivateFunctionAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePrivateFunctionAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePrivateFunctionAdded/"); } @TestMetadata("inlinePropertyInClass") public void testInlinePropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePropertyInClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePropertyInClass/"); } @TestMetadata("inlinePropertyOnTopLevel") public void testInlinePropertyOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePropertyOnTopLevel/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePropertyOnTopLevel/"); } @TestMetadata("inlineTwoFunctionsOneChanged") public void testInlineTwoFunctionsOneChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/"); } @TestMetadata("inlineUsedWhereDeclared") public void testInlineUsedWhereDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineUsedWhereDeclared/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineUsedWhereDeclared/"); } @TestMetadata("internalClassChanged") public void testInternalClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalClassChanged/"); } @TestMetadata("internalMemberInClassChanged") public void testInternalMemberInClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalMemberInClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalMemberInClassChanged/"); } @TestMetadata("internalTypealias") public void testInternalTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealias/"); } @TestMetadata("internalTypealiasConstructor") public void testInternalTypealiasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealiasConstructor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealiasConstructor/"); } @TestMetadata("internalTypealiasObject") public void testInternalTypealiasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealiasObject/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealiasObject/"); } @TestMetadata("localClassChanged") public void testLocalClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/localClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/localClassChanged/"); } @TestMetadata("moveClass") public void testMoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveClass/"); } @TestMetadata("moveFileWithChangingPackage") public void testMoveFileWithChangingPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveFileWithChangingPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveFileWithChangingPackage/"); } @TestMetadata("moveFileWithoutChangingPackage") public void testMoveFileWithoutChangingPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveFileWithoutChangingPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveFileWithoutChangingPackage/"); } @TestMetadata("multiplePackagesModified") public void testMultiplePackagesModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/multiplePackagesModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/multiplePackagesModified/"); } @TestMetadata("objectConstantChanged") public void testObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/"); } @TestMetadata("ourClassReferenced") public void testOurClassReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/ourClassReferenced/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/ourClassReferenced/"); } @TestMetadata("packageConstantChanged") public void testPackageConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/"); } @TestMetadata("packageFileAdded") public void testPackageFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileAdded/"); } @TestMetadata("packageFileChangedPackage") public void testPackageFileChangedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileChangedPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileChangedPackage/"); } @TestMetadata("packageFileChangedThenOtherRemoved") public void testPackageFileChangedThenOtherRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileChangedThenOtherRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileChangedThenOtherRemoved/"); } @TestMetadata("packageFileRemoved") public void testPackageFileRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileRemoved/"); } @TestMetadata("packageFilesChangedInTurn") public void testPackageFilesChangedInTurn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFilesChangedInTurn/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFilesChangedInTurn/"); } @TestMetadata("packageInlineFunctionAccessingField") public void testPackageInlineFunctionAccessingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionAccessingField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionAccessingField/"); } @TestMetadata("packageInlineFunctionFromOurPackage") public void testPackageInlineFunctionFromOurPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionFromOurPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionFromOurPackage/"); } @TestMetadata("packagePrivateOnlyChanged") public void testPackagePrivateOnlyChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/"); } @TestMetadata("packageRecreated") public void testPackageRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRecreated/"); } @TestMetadata("packageRecreatedAfterRenaming") public void testPackageRecreatedAfterRenaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreatedAfterRenaming/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRecreatedAfterRenaming/"); } @TestMetadata("packageRemoved") public void testPackageRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/"); } @TestMetadata("privateConstantsChanged") public void testPrivateConstantsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/"); } @TestMetadata("privateMethodAdded") public void testPrivateMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodAdded/"); } @TestMetadata("privateMethodDeleted") public void testPrivateMethodDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodDeleted/"); } @TestMetadata("privateMethodSignatureChanged") public void testPrivateMethodSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodSignatureChanged/"); } @TestMetadata("privateSecondaryConstructorAdded") public void testPrivateSecondaryConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorAdded/"); } @TestMetadata("privateSecondaryConstructorDeleted") public void testPrivateSecondaryConstructorDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorDeleted/"); } @TestMetadata("privateValAccessorChanged") public void testPrivateValAccessorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValAccessorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValAccessorChanged/"); } @TestMetadata("privateValAdded") public void testPrivateValAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValAdded/"); } @TestMetadata("privateValDeleted") public void testPrivateValDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValDeleted/"); } @TestMetadata("privateValSignatureChanged") public void testPrivateValSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValSignatureChanged/"); } @TestMetadata("privateVarAdded") public void testPrivateVarAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarAdded/"); } @TestMetadata("privateVarDeleted") public void testPrivateVarDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarDeleted/"); } @TestMetadata("privateVarSignatureChanged") public void testPrivateVarSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarSignatureChanged/"); } @TestMetadata("propertyRedeclaration") public void testPropertyRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/propertyRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/propertyRedeclaration/"); } @TestMetadata("publicPropertyWithPrivateSetter") public void testPublicPropertyWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/publicPropertyWithPrivateSetter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/publicPropertyWithPrivateSetter/"); } @TestMetadata("removeAndRestoreCompanion") public void testRemoveAndRestoreCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/"); } @TestMetadata("removeAndRestoreCompanionWithImplicitUsages") public void testRemoveAndRestoreCompanionWithImplicitUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/"); } @TestMetadata("removeClass") public void testRemoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeClass/"); } @TestMetadata("removeClassInDefaultPackage") public void testRemoveClassInDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/"); } @TestMetadata("removeFileWithFunctionOverload") public void testRemoveFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/"); } @TestMetadata("removeMemberTypeAlias") public void testRemoveMemberTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeMemberTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeMemberTypeAlias/"); } @TestMetadata("removeTopLevelTypeAlias") public void testRemoveTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeTopLevelTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeTopLevelTypeAlias/"); } @TestMetadata("removeUnusedFile") public void testRemoveUnusedFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeUnusedFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeUnusedFile/"); } @TestMetadata("renameClass") public void testRenameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/renameClass/"); } @TestMetadata("renameFileWithFunctionOverload") public void testRenameFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/"); } @TestMetadata("returnTypeChanged") public void testReturnTypeChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/"); } @TestMetadata("simpleClassDependency") public void testSimpleClassDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/simpleClassDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/simpleClassDependency/"); } @TestMetadata("soleFileChangesPackage") public void testSoleFileChangesPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/soleFileChangesPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/soleFileChangesPackage/"); } @TestMetadata("subpackage") public void testSubpackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/subpackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/subpackage/"); } @TestMetadata("suspendWithStateMachine") public void testSuspendWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/suspendWithStateMachine/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/suspendWithStateMachine/"); } @TestMetadata("topLevelFunctionSameSignature") public void testTopLevelFunctionSameSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionSameSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionSameSignature/"); } @TestMetadata("topLevelMembersInTwoFiles") public void testTopLevelMembersInTwoFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/"); } @TestMetadata("topLevelPrivateValUsageAdded") public void testTopLevelPrivateValUsageAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelPrivateValUsageAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelPrivateValUsageAdded/"); } @TestMetadata("traitClassObjectConstantChanged") public void testTraitClassObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/"); } @TestMetadata("valAddCustomAccessor") public void testValAddCustomAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/valAddCustomAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/valAddCustomAccessor/"); } @TestMetadata("valRemoveCustomAccessor") public void testValRemoveCustomAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/valRemoveCustomAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/valRemoveCustomAccessor/"); } } @@ -716,242 +606,207 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassHierarchyAffected extends AbstractIncrementalJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassHierarchyAffected() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("annotationFlagRemoved") public void testAnnotationFlagRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved/"); } @TestMetadata("annotationListChanged") public void testAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged/"); } @TestMetadata("bridgeGenerated") public void testBridgeGenerated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated/"); } @TestMetadata("classBecameFinal") public void testClassBecameFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal/"); } @TestMetadata("classBecameInterface") public void testClassBecameInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface/"); } @TestMetadata("classBecamePrivate") public void testClassBecamePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate/"); } @TestMetadata("classMovedIntoOtherClass") public void testClassMovedIntoOtherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass/"); } @TestMetadata("classRemoved") public void testClassRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/"); } @TestMetadata("classRemovedAndRestored") public void testClassRemovedAndRestored() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/"); } @TestMetadata("companionObjectInheritedMemberChanged") public void testCompanionObjectInheritedMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/"); } @TestMetadata("companionObjectMemberChanged") public void testCompanionObjectMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/"); } @TestMetadata("companionObjectNameChanged") public void testCompanionObjectNameChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/"); } @TestMetadata("companionObjectToSimpleObject") public void testCompanionObjectToSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/"); } @TestMetadata("constructorVisibilityChanged") public void testConstructorVisibilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/"); } @TestMetadata("enumEntryAdded") public void testEnumEntryAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/"); } @TestMetadata("enumEntryRemoved") public void testEnumEntryRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/"); } @TestMetadata("enumMemberChanged") public void testEnumMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/"); } @TestMetadata("flagsAndMemberInDifferentClassesChanged") public void testFlagsAndMemberInDifferentClassesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged/"); } @TestMetadata("flagsAndMemberInSameClassChanged") public void testFlagsAndMemberInSameClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/"); } @TestMetadata("implcitUpcast") public void testImplcitUpcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast/"); } @TestMetadata("inferredTypeArgumentChanged") public void testInferredTypeArgumentChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged/"); } @TestMetadata("inferredTypeChanged") public void testInferredTypeChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged/"); } @TestMetadata("lambdaParameterAffected") public void testLambdaParameterAffected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected/"); } @TestMetadata("methodAdded") public void testMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded/"); } @TestMetadata("methodAnnotationAdded") public void testMethodAnnotationAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded/"); } @TestMetadata("methodNullabilityChanged") public void testMethodNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged/"); } @TestMetadata("methodParameterWithDefaultValueAdded") public void testMethodParameterWithDefaultValueAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded/"); } @TestMetadata("methodRemoved") public void testMethodRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved/"); } @TestMetadata("overrideExplicit") public void testOverrideExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit/"); } @TestMetadata("overrideImplicit") public void testOverrideImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit/"); } @TestMetadata("propertyNullabilityChanged") public void testPropertyNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/"); } @TestMetadata("sealedClassIndirectImplAdded") public void testSealedClassIndirectImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/"); } @TestMetadata("sealedClassNestedImplAdded") public void testSealedClassNestedImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/"); } @TestMetadata("secondaryConstructorAdded") public void testSecondaryConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/"); } @TestMetadata("starProjectionUpperBoundChanged") public void testStarProjectionUpperBoundChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged/"); } @TestMetadata("supertypesListChanged") public void testSupertypesListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged/"); } @TestMetadata("typeParameterListChanged") public void testTypeParameterListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged/"); } @TestMetadata("varianceChanged") public void testVarianceChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/"); } } @@ -959,6 +814,10 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Js extends AbstractIncrementalJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @@ -967,14 +826,30 @@ public class IncrementalJsCompilerRunnerTestGenerated extends AbstractIncrementa @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FriendsModuleDisabled extends AbstractIncrementalJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFriendsModuleDisabled() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js/friendsModuleDisabled"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("internalInlineFunctionIsChanged") public void testInternalInlineFunctionIsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/js/friendsModuleDisabled/internalInlineFunctionIsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/js/friendsModuleDisabled/internalInlineFunctionIsChanged/"); + } + + @TestMetadata("jps-plugin/testData/incremental/js/friendsModuleDisabled/internalInlineFunctionIsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InternalInlineFunctionIsChanged extends AbstractIncrementalJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInternalInlineFunctionIsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js/friendsModuleDisabled/internalInlineFunctionIsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithFriendModulesDisabledTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithFriendModulesDisabledTestGenerated.java index 0feb575adf8..d98ab147553 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithFriendModulesDisabledTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJsCompilerRunnerWithFriendModulesDisabledTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IncrementalJsCompilerRunnerWithFriendModulesDisabledTestGenerated extends AbstractIncrementalJsCompilerRunnerWithFriendModulesDisabledTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFriendsModuleDisabled() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/js/friendsModuleDisabled"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("internalInlineFunctionIsChanged") public void testInternalInlineFunctionIsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/js/friendsModuleDisabled/internalInlineFunctionIsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/js/friendsModuleDisabled/internalInlineFunctionIsChanged/"); } } diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java index b1054ff6593..0eaf723ebbe 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalJvmCompilerRunnerTestGenerated.java @@ -23,46 +23,43 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PureKotlin extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingFunctionsViaPackagePart") public void testAccessingFunctionsViaPackagePart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/accessingFunctionsViaPackagePart/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/accessingFunctionsViaPackagePart/"); } @TestMetadata("accessingPropertiesViaField") public void testAccessingPropertiesViaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/accessingPropertiesViaField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/accessingPropertiesViaField/"); } @TestMetadata("addClass") public void testAddClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addClass/"); } @TestMetadata("addFileWithFunctionOverload") public void testAddFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/"); } @TestMetadata("addMemberTypeAlias") public void testAddMemberTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addMemberTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addMemberTypeAlias/"); } @TestMetadata("addTopLevelTypeAlias") public void testAddTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } @TestMetadata("allConstants") public void testAllConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/allConstants/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/allConstants/"); } public void testAllFilesPresentInPureKotlin() throws Exception { @@ -71,644 +68,537 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestMetadata("annotations") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/annotations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/annotations/"); } @TestMetadata("anonymousObjectChanged") public void testAnonymousObjectChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/anonymousObjectChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/anonymousObjectChanged/"); } @TestMetadata("changeTypeImplicitlyWithCircularDependency") public void testChangeTypeImplicitlyWithCircularDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); } @TestMetadata("changeWithRemovingUsage") public void testChangeWithRemovingUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); } @TestMetadata("classObjectConstantChanged") public void testClassObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/"); } @TestMetadata("classRecreated") public void testClassRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classRecreated/"); } @TestMetadata("classSignatureChanged") public void testClassSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classSignatureChanged/"); } @TestMetadata("classSignatureUnchanged") public void testClassSignatureUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classSignatureUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classSignatureUnchanged/"); } @TestMetadata("compilationErrorThenFixedOtherPackage") public void testCompilationErrorThenFixedOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedOtherPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedOtherPackage/"); } @TestMetadata("compilationErrorThenFixedSamePackage") public void testCompilationErrorThenFixedSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedSamePackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedSamePackage/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart") public void testCompilationErrorThenFixedWithPhantomPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart2") public void testCompilationErrorThenFixedWithPhantomPart2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart2/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart3") public void testCompilationErrorThenFixedWithPhantomPart3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart3/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart3/"); } @TestMetadata("constantRemoved") public void testConstantRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantRemoved/"); } @TestMetadata("constantValueChanged") public void testConstantValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantValueChanged/"); } @TestMetadata("constantsUnchanged") public void testConstantsUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/"); } @TestMetadata("defaultArgumentInConstructorAdded") public void testDefaultArgumentInConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorAdded/"); } @TestMetadata("defaultArgumentInConstructorRemoved") public void testDefaultArgumentInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/"); } @TestMetadata("defaultValueAdded") public void testDefaultValueAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueAdded/"); } @TestMetadata("defaultValueChanged") public void testDefaultValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueChanged/"); } @TestMetadata("defaultValueInConstructorChanged") public void testDefaultValueInConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorChanged/"); } @TestMetadata("defaultValueInConstructorRemoved") public void testDefaultValueInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/"); } @TestMetadata("defaultValueRemoved1") public void testDefaultValueRemoved1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/"); } @TestMetadata("defaultValueRemoved2") public void testDefaultValueRemoved2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/"); } @TestMetadata("delegatedPropertyInlineExtensionAccessor") public void testDelegatedPropertyInlineExtensionAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/"); } @TestMetadata("delegatedPropertyInlineMethodAccessor") public void testDelegatedPropertyInlineMethodAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/"); } @TestMetadata("dependencyClassReferenced") public void testDependencyClassReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/"); } @TestMetadata("fileWithConstantRemoved") public void testFileWithConstantRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/"); } @TestMetadata("fileWithInlineFunctionRemoved") public void testFileWithInlineFunctionRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/fileWithInlineFunctionRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/fileWithInlineFunctionRemoved/"); } @TestMetadata("filesExchangePackages") public void testFilesExchangePackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/filesExchangePackages/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/filesExchangePackages/"); } @TestMetadata("funRedeclaration") public void testFunRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/funRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/funRedeclaration/"); } @TestMetadata("funVsConstructorOverloadConflict") public void testFunVsConstructorOverloadConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/"); } @TestMetadata("functionBecameInline") public void testFunctionBecameInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/functionBecameInline/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/functionBecameInline/"); } @TestMetadata("functionReferencingClass") public void testFunctionReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/functionReferencingClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/functionReferencingClass/"); } @TestMetadata("independentClasses") public void testIndependentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/independentClasses/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/independentClasses/"); } @TestMetadata("inlineFunctionBecomesNonInline") public void testInlineFunctionBecomesNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionBecomesNonInline/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionBecomesNonInline/"); } @TestMetadata("inlineFunctionUsageAdded") public void testInlineFunctionUsageAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionUsageAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionUsageAdded/"); } @TestMetadata("inlineFunctionsCircularDependency") public void testInlineFunctionsCircularDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsCircularDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsCircularDependency/"); } @TestMetadata("inlineFunctionsUnchanged") public void testInlineFunctionsUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsUnchanged/"); } @TestMetadata("inlineLinesChanged") public void testInlineLinesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineLinesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineLinesChanged/"); } @TestMetadata("inlineModifiedWithUsage") public void testInlineModifiedWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineModifiedWithUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineModifiedWithUsage/"); } @TestMetadata("inlinePrivateFunctionAdded") public void testInlinePrivateFunctionAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePrivateFunctionAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePrivateFunctionAdded/"); } @TestMetadata("inlinePropertyInClass") public void testInlinePropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePropertyInClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePropertyInClass/"); } @TestMetadata("inlinePropertyOnTopLevel") public void testInlinePropertyOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePropertyOnTopLevel/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePropertyOnTopLevel/"); } @TestMetadata("inlineTwoFunctionsOneChanged") public void testInlineTwoFunctionsOneChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/"); } @TestMetadata("inlineUsedWhereDeclared") public void testInlineUsedWhereDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineUsedWhereDeclared/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineUsedWhereDeclared/"); } @TestMetadata("internalClassChanged") public void testInternalClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalClassChanged/"); } @TestMetadata("internalMemberInClassChanged") public void testInternalMemberInClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalMemberInClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalMemberInClassChanged/"); } @TestMetadata("internalTypealias") public void testInternalTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealias/"); } @TestMetadata("internalTypealiasConstructor") public void testInternalTypealiasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealiasConstructor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealiasConstructor/"); } @TestMetadata("internalTypealiasObject") public void testInternalTypealiasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealiasObject/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealiasObject/"); } @TestMetadata("localClassChanged") public void testLocalClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/localClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/localClassChanged/"); } @TestMetadata("moveClass") public void testMoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveClass/"); } @TestMetadata("moveFileWithChangingPackage") public void testMoveFileWithChangingPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveFileWithChangingPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveFileWithChangingPackage/"); } @TestMetadata("moveFileWithoutChangingPackage") public void testMoveFileWithoutChangingPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveFileWithoutChangingPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveFileWithoutChangingPackage/"); } @TestMetadata("multiplePackagesModified") public void testMultiplePackagesModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/multiplePackagesModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/multiplePackagesModified/"); } @TestMetadata("objectConstantChanged") public void testObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/"); } @TestMetadata("ourClassReferenced") public void testOurClassReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/ourClassReferenced/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/ourClassReferenced/"); } @TestMetadata("packageConstantChanged") public void testPackageConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/"); } @TestMetadata("packageFileAdded") public void testPackageFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileAdded/"); } @TestMetadata("packageFileChangedPackage") public void testPackageFileChangedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileChangedPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileChangedPackage/"); } @TestMetadata("packageFileChangedThenOtherRemoved") public void testPackageFileChangedThenOtherRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileChangedThenOtherRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileChangedThenOtherRemoved/"); } @TestMetadata("packageFileRemoved") public void testPackageFileRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileRemoved/"); } @TestMetadata("packageFilesChangedInTurn") public void testPackageFilesChangedInTurn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFilesChangedInTurn/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFilesChangedInTurn/"); } @TestMetadata("packageInlineFunctionAccessingField") public void testPackageInlineFunctionAccessingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionAccessingField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionAccessingField/"); } @TestMetadata("packageInlineFunctionFromOurPackage") public void testPackageInlineFunctionFromOurPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionFromOurPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionFromOurPackage/"); } @TestMetadata("packagePrivateOnlyChanged") public void testPackagePrivateOnlyChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/"); } @TestMetadata("packageRecreated") public void testPackageRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRecreated/"); } @TestMetadata("packageRecreatedAfterRenaming") public void testPackageRecreatedAfterRenaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreatedAfterRenaming/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRecreatedAfterRenaming/"); } @TestMetadata("packageRemoved") public void testPackageRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/"); } @TestMetadata("privateConstantsChanged") public void testPrivateConstantsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/"); } @TestMetadata("privateMethodAdded") public void testPrivateMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodAdded/"); } @TestMetadata("privateMethodDeleted") public void testPrivateMethodDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodDeleted/"); } @TestMetadata("privateMethodSignatureChanged") public void testPrivateMethodSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodSignatureChanged/"); } @TestMetadata("privateSecondaryConstructorAdded") public void testPrivateSecondaryConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorAdded/"); } @TestMetadata("privateSecondaryConstructorDeleted") public void testPrivateSecondaryConstructorDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorDeleted/"); } @TestMetadata("privateValAccessorChanged") public void testPrivateValAccessorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValAccessorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValAccessorChanged/"); } @TestMetadata("privateValAdded") public void testPrivateValAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValAdded/"); } @TestMetadata("privateValDeleted") public void testPrivateValDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValDeleted/"); } @TestMetadata("privateValSignatureChanged") public void testPrivateValSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValSignatureChanged/"); } @TestMetadata("privateVarAdded") public void testPrivateVarAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarAdded/"); } @TestMetadata("privateVarDeleted") public void testPrivateVarDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarDeleted/"); } @TestMetadata("privateVarSignatureChanged") public void testPrivateVarSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarSignatureChanged/"); } @TestMetadata("propertyRedeclaration") public void testPropertyRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/propertyRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/propertyRedeclaration/"); } @TestMetadata("publicPropertyWithPrivateSetter") public void testPublicPropertyWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/publicPropertyWithPrivateSetter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/publicPropertyWithPrivateSetter/"); } @TestMetadata("removeAndRestoreCompanion") public void testRemoveAndRestoreCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/"); } @TestMetadata("removeAndRestoreCompanionWithImplicitUsages") public void testRemoveAndRestoreCompanionWithImplicitUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/"); } @TestMetadata("removeClass") public void testRemoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeClass/"); } @TestMetadata("removeClassInDefaultPackage") public void testRemoveClassInDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/"); } @TestMetadata("removeFileWithFunctionOverload") public void testRemoveFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/"); } @TestMetadata("removeMemberTypeAlias") public void testRemoveMemberTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeMemberTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeMemberTypeAlias/"); } @TestMetadata("removeTopLevelTypeAlias") public void testRemoveTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeTopLevelTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeTopLevelTypeAlias/"); } @TestMetadata("removeUnusedFile") public void testRemoveUnusedFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeUnusedFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeUnusedFile/"); } @TestMetadata("renameClass") public void testRenameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/renameClass/"); } @TestMetadata("renameFileWithFunctionOverload") public void testRenameFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/"); } @TestMetadata("returnTypeChanged") public void testReturnTypeChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/"); } @TestMetadata("simpleClassDependency") public void testSimpleClassDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/simpleClassDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/simpleClassDependency/"); } @TestMetadata("soleFileChangesPackage") public void testSoleFileChangesPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/soleFileChangesPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/soleFileChangesPackage/"); } @TestMetadata("subpackage") public void testSubpackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/subpackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/subpackage/"); } @TestMetadata("suspendWithStateMachine") public void testSuspendWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/suspendWithStateMachine/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/suspendWithStateMachine/"); } @TestMetadata("topLevelFunctionSameSignature") public void testTopLevelFunctionSameSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionSameSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionSameSignature/"); } @TestMetadata("topLevelMembersInTwoFiles") public void testTopLevelMembersInTwoFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/"); } @TestMetadata("topLevelPrivateValUsageAdded") public void testTopLevelPrivateValUsageAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelPrivateValUsageAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelPrivateValUsageAdded/"); } @TestMetadata("traitClassObjectConstantChanged") public void testTraitClassObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/"); } @TestMetadata("valAddCustomAccessor") public void testValAddCustomAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/valAddCustomAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/valAddCustomAccessor/"); } @TestMetadata("valRemoveCustomAccessor") public void testValRemoveCustomAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/valRemoveCustomAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/valRemoveCustomAccessor/"); } } @@ -716,242 +606,207 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassHierarchyAffected extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassHierarchyAffected() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("annotationFlagRemoved") public void testAnnotationFlagRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved/"); } @TestMetadata("annotationListChanged") public void testAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged/"); } @TestMetadata("bridgeGenerated") public void testBridgeGenerated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated/"); } @TestMetadata("classBecameFinal") public void testClassBecameFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal/"); } @TestMetadata("classBecameInterface") public void testClassBecameInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface/"); } @TestMetadata("classBecamePrivate") public void testClassBecamePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate/"); } @TestMetadata("classMovedIntoOtherClass") public void testClassMovedIntoOtherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass/"); } @TestMetadata("classRemoved") public void testClassRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/"); } @TestMetadata("classRemovedAndRestored") public void testClassRemovedAndRestored() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/"); } @TestMetadata("companionObjectInheritedMemberChanged") public void testCompanionObjectInheritedMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/"); } @TestMetadata("companionObjectMemberChanged") public void testCompanionObjectMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/"); } @TestMetadata("companionObjectNameChanged") public void testCompanionObjectNameChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/"); } @TestMetadata("companionObjectToSimpleObject") public void testCompanionObjectToSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/"); } @TestMetadata("constructorVisibilityChanged") public void testConstructorVisibilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/"); } @TestMetadata("enumEntryAdded") public void testEnumEntryAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/"); } @TestMetadata("enumEntryRemoved") public void testEnumEntryRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/"); } @TestMetadata("enumMemberChanged") public void testEnumMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/"); } @TestMetadata("flagsAndMemberInDifferentClassesChanged") public void testFlagsAndMemberInDifferentClassesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged/"); } @TestMetadata("flagsAndMemberInSameClassChanged") public void testFlagsAndMemberInSameClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/"); } @TestMetadata("implcitUpcast") public void testImplcitUpcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast/"); } @TestMetadata("inferredTypeArgumentChanged") public void testInferredTypeArgumentChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged/"); } @TestMetadata("inferredTypeChanged") public void testInferredTypeChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged/"); } @TestMetadata("lambdaParameterAffected") public void testLambdaParameterAffected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected/"); } @TestMetadata("methodAdded") public void testMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded/"); } @TestMetadata("methodAnnotationAdded") public void testMethodAnnotationAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded/"); } @TestMetadata("methodNullabilityChanged") public void testMethodNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged/"); } @TestMetadata("methodParameterWithDefaultValueAdded") public void testMethodParameterWithDefaultValueAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded/"); } @TestMetadata("methodRemoved") public void testMethodRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved/"); } @TestMetadata("overrideExplicit") public void testOverrideExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit/"); } @TestMetadata("overrideImplicit") public void testOverrideImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit/"); } @TestMetadata("propertyNullabilityChanged") public void testPropertyNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/"); } @TestMetadata("sealedClassIndirectImplAdded") public void testSealedClassIndirectImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/"); } @TestMetadata("sealedClassNestedImplAdded") public void testSealedClassNestedImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/"); } @TestMetadata("secondaryConstructorAdded") public void testSecondaryConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/"); } @TestMetadata("starProjectionUpperBoundChanged") public void testStarProjectionUpperBoundChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged/"); } @TestMetadata("supertypesListChanged") public void testSupertypesListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged/"); } @TestMetadata("typeParameterListChanged") public void testTypeParameterListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged/"); } @TestMetadata("varianceChanged") public void testVarianceChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/"); } } @@ -959,92 +814,264 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineFunCallSite extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineFunCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classProperty") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/classProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/classProperty/"); } @TestMetadata("companionObjectProperty") public void testCompanionObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty/"); } @TestMetadata("coroutine") public void testCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/coroutine/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/coroutine/"); } @TestMetadata("function") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/function/"); } @TestMetadata("getter") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/getter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/getter/"); } @TestMetadata("lambda") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/lambda/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/lambda/"); } @TestMetadata("localFun") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/localFun/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/localFun/"); } @TestMetadata("method") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/method/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/method/"); } @TestMetadata("parameterDefaultValue") public void testParameterDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue/"); } @TestMetadata("primaryConstructorParameterDefaultValue") public void testPrimaryConstructorParameterDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue/"); } @TestMetadata("superCall") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/superCall/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/superCall/"); } @TestMetadata("thisCall") public void testThisCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/thisCall/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/thisCall/"); } @TestMetadata("topLevelObjectProperty") public void testTopLevelObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty/"); } @TestMetadata("topLevelProperty") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty/"); + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/classProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassProperty extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/classProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObjectProperty extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObjectProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/coroutine") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Coroutine extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCoroutine() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/coroutine"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Function extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/function"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/getter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Getter extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInGetter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/getter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/lambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambda extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/lambda"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/localFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LocalFun extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLocalFun() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/localFun"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/method") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Method extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethod() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/method"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParameterDefaultValue extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInParameterDefaultValue() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrimaryConstructorParameterDefaultValue extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPrimaryConstructorParameterDefaultValue() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/superCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SuperCall extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSuperCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/superCall"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/thisCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ThisCall extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInThisCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/thisCall"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelObjectProperty extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelObjectProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelProperty extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -1052,6 +1079,10 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithJava extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @@ -1060,32 +1091,84 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertBetweenJavaAndKotlin extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertBetweenJavaAndKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("javaToKotlin") public void testJavaToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin/"); } @TestMetadata("javaToKotlinAndBack") public void testJavaToKotlinAndBack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack/"); } @TestMetadata("javaToKotlinAndRemove") public void testJavaToKotlinAndRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove/"); } @TestMetadata("kotlinToJava") public void testKotlinToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaToKotlin extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaToKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaToKotlinAndBack extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaToKotlinAndBack() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaToKotlinAndRemove extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaToKotlinAndRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KotlinToJava extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKotlinToJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -1093,154 +1176,438 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaUsedInKotlin extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaUsedInKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("changeFieldType") public void testChangeFieldType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType/"); } @TestMetadata("changeNotUsedSignature") public void testChangeNotUsedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature/"); } @TestMetadata("changePropertyOverrideType") public void testChangePropertyOverrideType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType/"); } @TestMetadata("changeSignature") public void testChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature/"); } @TestMetadata("changeSignaturePackagePrivate") public void testChangeSignaturePackagePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate/"); } @TestMetadata("changeSignaturePackagePrivateNonRoot") public void testChangeSignaturePackagePrivateNonRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot/"); } @TestMetadata("changeSignatureStatic") public void testChangeSignatureStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic/"); } @TestMetadata("constantChanged") public void testConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/"); } @TestMetadata("constantUnchanged") public void testConstantUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/"); } @TestMetadata("enumEntryAdded") public void testEnumEntryAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded/"); } @TestMetadata("enumEntryRemoved") public void testEnumEntryRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved/"); } @TestMetadata("javaAndKotlinChangedSimultaneously") public void testJavaAndKotlinChangedSimultaneously() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/"); } @TestMetadata("javaFieldNullabilityChanged") public void testJavaFieldNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged/"); } @TestMetadata("javaMethodParamNullabilityChanged") public void testJavaMethodParamNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged/"); } @TestMetadata("javaMethodReturnTypeNullabilityChanged") public void testJavaMethodReturnTypeNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged/"); } @TestMetadata("methodAddedInSuper") public void testMethodAddedInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper/"); } @TestMetadata("methodRenamed") public void testMethodRenamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed/"); } @TestMetadata("mixedInheritance") public void testMixedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance/"); } @TestMetadata("notChangeSignature") public void testNotChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeFieldType extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeFieldType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeNotUsedSignature extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeNotUsedSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangePropertyOverrideType extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangePropertyOverrideType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignature extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignaturePackagePrivate extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignaturePackagePrivate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignaturePackagePrivateNonRoot extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignaturePackagePrivateNonRoot() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignatureStatic extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignatureStatic() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantUnchanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumEntryAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumEntryAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumEntryRemoved extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumEntryRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaAndKotlinChangedSimultaneously extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaAndKotlinChangedSimultaneously() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaFieldNullabilityChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaFieldNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaMethodParamNullabilityChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaMethodParamNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaMethodReturnTypeNullabilityChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaMethodReturnTypeNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAddedInSuper extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAddedInSuper() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodRenamed extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodRenamed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MixedInheritance extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMixedInheritance() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotChangeSignature extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNotChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamConversions extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamConversions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("methodAdded") public void testMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded/"); } @TestMetadata("methodAddedSamAdapter") public void testMethodAddedSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter/"); } @TestMetadata("methodSignatureChanged") public void testMethodSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged/"); } @TestMetadata("methodSignatureChangedSamAdapter") public void testMethodSignatureChangedSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAddedSamAdapter extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAddedSamAdapter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodSignatureChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodSignatureChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodSignatureChangedSamAdapter extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodSignatureChangedSamAdapter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } @@ -1249,10 +1616,13 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinUsedInJava extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addOptionalParameter") public void testAddOptionalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/"); } public void testAllFilesPresentInKotlinUsedInJava() throws Exception { @@ -1261,80 +1631,249 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestMetadata("changeNotUsedSignature") public void testChangeNotUsedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature/"); } @TestMetadata("changeSignature") public void testChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature/"); } @TestMetadata("constantChanged") public void testConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/"); } @TestMetadata("constantUnchanged") public void testConstantUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/"); } @TestMetadata("funRenamed") public void testFunRenamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed/"); } @TestMetadata("jvmFieldChanged") public void testJvmFieldChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged/"); } @TestMetadata("jvmFieldUnchanged") public void testJvmFieldUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged/"); } @TestMetadata("methodAddedInSuper") public void testMethodAddedInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper/"); } @TestMetadata("notChangeSignature") public void testNotChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature/"); } @TestMetadata("onlyTopLevelFunctionInFileRemoved") public void testOnlyTopLevelFunctionInFileRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved/"); } @TestMetadata("packageFileAdded") public void testPackageFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded/"); } @TestMetadata("privateChanges") public void testPrivateChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges/"); } @TestMetadata("propertyRenamed") public void testPropertyRenamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddOptionalParameter extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddOptionalParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeNotUsedSignature extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeNotUsedSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignature extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantUnchanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunRenamed extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunRenamed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmFieldChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmFieldChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmFieldUnchanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmFieldUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAddedInSuper extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAddedInSuper() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotChangeSignature extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNotChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OnlyTopLevelFunctionInFileRemoved extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOnlyTopLevelFunctionInFileRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFileAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFileAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateChanges extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPrivateChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PropertyRenamed extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPropertyRenamed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -1342,10 +1881,13 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Other extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingFunctionsViaRenamedFileClass") public void testAccessingFunctionsViaRenamedFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass/"); } public void testAllFilesPresentInOther() throws Exception { @@ -1354,164 +1896,501 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestMetadata("allKotlinFilesRemovedThenNewAdded") public void testAllKotlinFilesRemovedThenNewAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded/"); } @TestMetadata("classRedeclaration") public void testClassRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/classRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/classRedeclaration/"); } @TestMetadata("classToPackageFacade") public void testClassToPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/classToPackageFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/classToPackageFacade/"); } @TestMetadata("conflictingPlatformDeclarations") public void testConflictingPlatformDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations/"); } @TestMetadata("defaultValueInConstructorAdded") public void testDefaultValueInConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded/"); } @TestMetadata("inlineTopLevelFunctionWithJvmName") public void testInlineTopLevelFunctionWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName/"); } @TestMetadata("inlineTopLevelValPropertyWithJvmName") public void testInlineTopLevelValPropertyWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName/"); } @TestMetadata("innerClassNotGeneratedWhenRebuilding") public void testInnerClassNotGeneratedWhenRebuilding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding/"); } @TestMetadata("jvmNameChanged") public void testJvmNameChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/jvmNameChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/jvmNameChanged/"); } @TestMetadata("mainRedeclaration") public void testMainRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/mainRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/mainRedeclaration/"); } @TestMetadata("multifileClassAddTopLevelFunWithDefault") public void testMultifileClassAddTopLevelFunWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault/"); } @TestMetadata("multifileClassFileAdded") public void testMultifileClassFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded/"); } @TestMetadata("multifileClassFileChanged") public void testMultifileClassFileChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged/"); } @TestMetadata("multifileClassFileMovedToAnotherMultifileClass") public void testMultifileClassFileMovedToAnotherMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass/"); } @TestMetadata("multifileClassInlineFunction") public void testMultifileClassInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction/"); } @TestMetadata("multifileClassInlineFunctionAccessingField") public void testMultifileClassInlineFunctionAccessingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField/"); } @TestMetadata("multifileClassRecreated") public void testMultifileClassRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated/"); } @TestMetadata("multifileClassRecreatedAfterRenaming") public void testMultifileClassRecreatedAfterRenaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming/"); } @TestMetadata("multifileClassRemoved") public void testMultifileClassRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved/"); } @TestMetadata("multifilePackagePartMethodAdded") public void testMultifilePackagePartMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded/"); } @TestMetadata("optionalParameter") public void testOptionalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/optionalParameter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/optionalParameter/"); } @TestMetadata("packageFacadeToClass") public void testPackageFacadeToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/"); } @TestMetadata("packageMultifileClassOneFileWithPublicChanges") public void testPackageMultifileClassOneFileWithPublicChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges/"); } @TestMetadata("packageMultifileClassPrivateOnlyChanged") public void testPackageMultifileClassPrivateOnlyChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged/"); } @TestMetadata("publicPropertyWithPrivateSetterMultiFileFacade") public void testPublicPropertyWithPrivateSetterMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade/"); } @TestMetadata("topLevelFunctionWithJvmName") public void testTopLevelFunctionWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName/"); } @TestMetadata("topLevelPropertyWithJvmName") public void testTopLevelPropertyWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AccessingFunctionsViaRenamedFileClass extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAccessingFunctionsViaRenamedFileClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AllKotlinFilesRemovedThenNewAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAllKotlinFilesRemovedThenNewAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/classRedeclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassRedeclaration extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassRedeclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/classRedeclaration"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/classToPackageFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassToPackageFacade extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassToPackageFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/classToPackageFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConflictingPlatformDeclarations extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConflictingPlatformDeclarations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValueInConstructorAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValueInConstructorAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineTopLevelFunctionWithJvmName extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineTopLevelFunctionWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineTopLevelValPropertyWithJvmName extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineTopLevelValPropertyWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClassNotGeneratedWhenRebuilding extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInnerClassNotGeneratedWhenRebuilding() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/jvmNameChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmNameChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmNameChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/jvmNameChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/mainRedeclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MainRedeclaration extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMainRedeclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/mainRedeclaration"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassAddTopLevelFunWithDefault extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassAddTopLevelFunWithDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassFileAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassFileAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassFileChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassFileChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassFileMovedToAnotherMultifileClass extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassFileMovedToAnotherMultifileClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassInlineFunction extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassInlineFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassInlineFunctionAccessingField extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassInlineFunctionAccessingField() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassRecreated extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassRecreated() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassRecreatedAfterRenaming extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassRecreatedAfterRenaming() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassRemoved extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifilePackagePartMethodAdded extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifilePackagePartMethodAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/optionalParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OptionalParameter extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOptionalParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/optionalParameter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadeToClass extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadeToClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageMultifileClassOneFileWithPublicChanges extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageMultifileClassOneFileWithPublicChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageMultifileClassPrivateOnlyChanged extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageMultifileClassPrivateOnlyChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PublicPropertyWithPrivateSetterMultiFileFacade extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPublicPropertyWithPrivateSetterMultiFileFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelFunctionWithJvmName extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelFunctionWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelPropertyWithJvmName extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelPropertyWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } @@ -1520,16 +2399,18 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IncrementalJvmCompilerOnly extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAnnotationToJavaClass") public void testAddAnnotationToJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addAnnotationToJavaClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addAnnotationToJavaClass/"); } @TestMetadata("addNestedClass") public void testAddNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addNestedClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addNestedClass/"); } public void testAllFilesPresentInIncrementalJvmCompilerOnly() throws Exception { @@ -1538,8 +2419,46 @@ public class IncrementalJvmCompilerRunnerTestGenerated extends AbstractIncrement @TestMetadata("changeAnnotationInJavaClass") public void testChangeAnnotationInJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/changeAnnotationInJavaClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/changeAnnotationInJavaClass/"); + } + + @TestMetadata("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addAnnotationToJavaClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddAnnotationToJavaClass extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddAnnotationToJavaClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addAnnotationToJavaClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addNestedClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddNestedClass extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddNestedClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/addNestedClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/changeAnnotationInJavaClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeAnnotationInJavaClass extends AbstractIncrementalJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeAnnotationInJavaClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/incrementalJvmCompilerOnly/changeAnnotationInJavaClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJsCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJsCompilerRunnerTestGenerated.java index e5f35cd9f9e..df323630eed 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJsCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJsCompilerRunnerTestGenerated.java @@ -21,19 +21,47 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IncrementalMultiplatformJsCompilerRunnerTestGenerated extends AbstractIncrementalMultiplatformJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiplatform"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("touchActual") public void testTouchActual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiplatform/touchActual/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiplatform/touchActual/"); } @TestMetadata("touchExpect") public void testTouchExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiplatform/touchExpect/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiplatform/touchExpect/"); + } + + @TestMetadata("jps-plugin/testData/incremental/multiplatform/touchActual") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchActual extends AbstractIncrementalMultiplatformJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchActual() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiplatform/touchActual"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiplatform/touchExpect") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchExpect extends AbstractIncrementalMultiplatformJsCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchExpect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiplatform/touchExpect"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } diff --git a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJvmCompilerRunnerTestGenerated.java b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJvmCompilerRunnerTestGenerated.java index 44b65de41ea..c6a98165729 100644 --- a/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJvmCompilerRunnerTestGenerated.java +++ b/compiler/incremental-compilation-impl/test/org/jetbrains/kotlin/incremental/IncrementalMultiplatformJvmCompilerRunnerTestGenerated.java @@ -21,19 +21,47 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IncrementalMultiplatformJvmCompilerRunnerTestGenerated extends AbstractIncrementalMultiplatformJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiplatform"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("touchActual") public void testTouchActual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiplatform/touchActual/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiplatform/touchActual/"); } @TestMetadata("touchExpect") public void testTouchExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiplatform/touchExpect/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiplatform/touchExpect/"); + } + + @TestMetadata("jps-plugin/testData/incremental/multiplatform/touchActual") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchActual extends AbstractIncrementalMultiplatformJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchActual() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiplatform/touchActual"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiplatform/touchExpect") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchExpect extends AbstractIncrementalMultiplatformJvmCompilerRunnerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchExpect() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiplatform/touchExpect"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 8865c075f23..d1fe2dc3645 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -29,183 +33,154 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotatedEnumEntry.kt") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); } @TestMetadata("annotatedObjectLiteral.kt") public void testAnnotatedObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); } @TestMetadata("annotationWithKotlinProperty.kt") public void testAnnotationWithKotlinProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); } @TestMetadata("annotationWithKotlinPropertyFromInterfaceCompanion.kt") public void testAnnotationWithKotlinPropertyFromInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); } @TestMetadata("annotationsOnDefault.kt") public void testAnnotationsOnDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); } @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); } @TestMetadata("constValInAnnotation.kt") public void testConstValInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/constValInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/constValInAnnotation.kt"); } @TestMetadata("defaultParameterValues.kt") public void testDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); } @TestMetadata("delegatedPropertySetter.kt") public void testDelegatedPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); } @TestMetadata("kotlinPropertyFromClassObjectAsParameter.kt") public void testKotlinPropertyFromClassObjectAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); } @TestMetadata("kotlinTopLevelPropertyAsParameter.kt") public void testKotlinTopLevelPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); } @TestMetadata("kt10136.kt") public void testKt10136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kt10136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kt10136.kt"); } @TestMetadata("nestedClassPropertyAsParameter.kt") public void testNestedClassPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); } @TestMetadata("nestedClassesInAnnotations.kt") public void testNestedClassesInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); } @TestMetadata("parameterAnnotationInDefaultImpls.kt") public void testParameterAnnotationInDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); } @TestMetadata("parameterWithPrimitiveType.kt") public void testParameterWithPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); } @TestMetadata("propertyWithPropertyInInitializerAsParameter.kt") public void testPropertyWithPropertyInInitializerAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); } @TestMetadata("resolveWithLowPriorityAnnotation.kt") public void testResolveWithLowPriorityAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); } @TestMetadata("wrongAnnotationArgumentInCtor.kt") public void testWrongAnnotationArgumentInCtor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); } @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotatedLambda extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotatedLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("funExpression.kt") public void testFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); } @TestMetadata("samFunExpression.kt") public void testSamFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); } @TestMetadata("samLambda.kt") public void testSamLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); } } } @@ -214,86 +189,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("argumentOrderInObjectSuperCall.kt") public void testArgumentOrderInObjectSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); } @TestMetadata("argumentOrderInSuperCall.kt") public void testArgumentOrderInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); } @TestMetadata("arguments.kt") public void testArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/arguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/arguments.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaults.kt") public void testDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/defaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/defaults.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); } @TestMetadata("kt9277.kt") public void testKt9277() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); } } @@ -301,462 +267,401 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arrays extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayConstructorsSimple.kt") public void testArrayConstructorsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); } @TestMetadata("arrayGetAssignMultiIndex.kt") public void testArrayGetAssignMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); } @TestMetadata("arrayGetMultiIndex.kt") public void testArrayGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); } @TestMetadata("arrayInstanceOf.kt") public void testArrayInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); } @TestMetadata("arrayPlusAssign.kt") public void testArrayPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); } @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/cloneArray.kt"); } @TestMetadata("clonePrimitiveArrays.kt") public void testClonePrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); } @TestMetadata("collectionAssignGetMultiIndex.kt") public void testCollectionAssignGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); } @TestMetadata("collectionGetMultiIndex.kt") public void testCollectionGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); } @TestMetadata("forEachBooleanArray.kt") public void testForEachBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); } @TestMetadata("forEachByteArray.kt") public void testForEachByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); } @TestMetadata("forEachCharArray.kt") public void testForEachCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); } @TestMetadata("forEachDoubleArray.kt") public void testForEachDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); } @TestMetadata("forEachFloatArray.kt") public void testForEachFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); } @TestMetadata("forEachIntArray.kt") public void testForEachIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); } @TestMetadata("forEachLongArray.kt") public void testForEachLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); } @TestMetadata("forEachShortArray.kt") public void testForEachShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); } @TestMetadata("genericArrayInObjectLiteralConstructor.kt") public void testGenericArrayInObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/hashMap.kt"); } @TestMetadata("inProjectionAsParameter.kt") public void testInProjectionAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); } @TestMetadata("inProjectionOfArray.kt") public void testInProjectionOfArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); } @TestMetadata("inProjectionOfList.kt") public void testInProjectionOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); } @TestMetadata("indices.kt") public void testIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indices.kt"); } @TestMetadata("indicesChar.kt") public void testIndicesChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indicesChar.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iterator.kt"); } @TestMetadata("iteratorBooleanArray.kt") public void testIteratorBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); } @TestMetadata("iteratorByteArray.kt") public void testIteratorByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); } @TestMetadata("iteratorByteArrayNextByte.kt") public void testIteratorByteArrayNextByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); } @TestMetadata("iteratorCharArray.kt") public void testIteratorCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); } @TestMetadata("iteratorDoubleArray.kt") public void testIteratorDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); } @TestMetadata("iteratorFloatArray.kt") public void testIteratorFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); } @TestMetadata("iteratorIntArray.kt") public void testIteratorIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); } @TestMetadata("iteratorLongArray.kt") public void testIteratorLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); } @TestMetadata("iteratorLongArrayNextLong.kt") public void testIteratorLongArrayNextLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); } @TestMetadata("iteratorShortArray.kt") public void testIteratorShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); } @TestMetadata("kt1291.kt") public void testKt1291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt1291.kt"); } @TestMetadata("kt17134.kt") public void testKt17134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt17134.kt"); } @TestMetadata("kt238.kt") public void testKt238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt238.kt"); } @TestMetadata("kt2997.kt") public void testKt2997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt2997.kt"); } @TestMetadata("kt33.kt") public void testKt33() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt33.kt"); } @TestMetadata("kt3771.kt") public void testKt3771() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt3771.kt"); } @TestMetadata("kt4118.kt") public void testKt4118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4118.kt"); } @TestMetadata("kt4348.kt") public void testKt4348() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4348.kt"); } @TestMetadata("kt4357.kt") public void testKt4357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4357.kt"); } @TestMetadata("kt503.kt") public void testKt503() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt503.kt"); } @TestMetadata("kt594.kt") public void testKt594() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt594.kt"); } @TestMetadata("kt602.kt") public void testKt602() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt602.kt"); } @TestMetadata("kt7009.kt") public void testKt7009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7009.kt"); } @TestMetadata("kt7288.kt") public void testKt7288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7288.kt"); } @TestMetadata("kt7338.kt") public void testKt7338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7338.kt"); } @TestMetadata("kt779.kt") public void testKt779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt779.kt"); } @TestMetadata("kt945.kt") public void testKt945() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt945.kt"); } @TestMetadata("kt950.kt") public void testKt950() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt950.kt"); } @TestMetadata("longAsIndex.kt") public void testLongAsIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/longAsIndex.kt"); } @TestMetadata("multiArrayConstructors.kt") public void testMultiArrayConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); } @TestMetadata("nonLocalReturnArrayConstructor.kt") public void testNonLocalReturnArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); } @TestMetadata("nonNullArray.kt") public void testNonNullArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonNullArray.kt"); } @TestMetadata("primitiveArrays.kt") public void testPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/stdlib.kt"); } @TestMetadata("varargsWithJava.kt") public void testVarargsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/varargsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/varargsWithJava.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt15560.kt") public void testKt15560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); } @TestMetadata("kt15568.kt") public void testKt15568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); } @TestMetadata("kt15575.kt") public void testKt15575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -764,32 +669,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -799,128 +704,112 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryOp extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBinaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bitwiseOp.kt") public void testBitwiseOp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); } @TestMetadata("bitwiseOpAny.kt") public void testBitwiseOpAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); } @TestMetadata("bitwiseOpNullable.kt") public void testBitwiseOpNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/call.kt"); } @TestMetadata("callAny.kt") public void testCallAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callAny.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callNullable.kt"); } @TestMetadata("compareBoxedChars.kt") public void testCompareBoxedChars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); } @TestMetadata("compareWithBoxedDouble.kt") public void testCompareWithBoxedDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); } @TestMetadata("compareWithBoxedLong.kt") public void testCompareWithBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); } @TestMetadata("divisionByZero.kt") public void testDivisionByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); } @TestMetadata("intrinsicAny.kt") public void testIntrinsicAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); } @TestMetadata("kt11163.kt") public void testKt11163() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163.kt"); } @TestMetadata("kt11163_properIeee754comparisons.kt") public void testKt11163_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); } @TestMetadata("kt23030_properIeee754comparisons.kt") public void testKt23030_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); } @TestMetadata("kt6747_identityEquals.kt") public void testKt6747_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); } @TestMetadata("overflowChar.kt") public void testOverflowChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); } @TestMetadata("overflowInt.kt") public void testOverflowInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); } @TestMetadata("overflowLong.kt") public void testOverflowLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); } } @@ -928,194 +817,167 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxingOptimization extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBoxingOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedIntegersCmp.kt") public void testBoxedIntegersCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); } @TestMetadata("boxedPrimitivesAreEqual.kt") public void testBoxedPrimitivesAreEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); } @TestMetadata("boxedRealsCmp.kt") public void testBoxedRealsCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/casts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/casts.kt"); } @TestMetadata("checkcastAndInstanceOf.kt") public void testCheckcastAndInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); } @TestMetadata("explicitEqualsOnDouble.kt") public void testExplicitEqualsOnDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); } @TestMetadata("fold.kt") public void testFold() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/fold.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/fold.kt"); } @TestMetadata("foldRange.kt") public void testFoldRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); } @TestMetadata("intCompareTo.kt") public void testIntCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); } @TestMetadata("kClassEquals.kt") public void testKClassEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kClassEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kClassEquals.kt"); } @TestMetadata("kt15871.kt") public void testKt15871() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); } @TestMetadata("kt17748.kt") public void testKt17748() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt17748.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt17748.kt"); } @TestMetadata("kt19767.kt") public void testKt19767() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); } @TestMetadata("kt19767_2.kt") public void testKt19767_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); } @TestMetadata("kt19767_3.kt") public void testKt19767_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_3.kt"); } @TestMetadata("kt19767_chain.kt") public void testKt19767_chain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); } @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); } @TestMetadata("kt5588.kt") public void testKt5588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); } @TestMetadata("kt5844.kt") public void testKt5844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); } @TestMetadata("kt6047.kt") public void testKt6047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); } @TestMetadata("kt6842.kt") public void testKt6842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); } @TestMetadata("maxMinBy.kt") public void testMaxMinBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); } @TestMetadata("nullCheck.kt") public void testNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); } @TestMetadata("progressions.kt") public void testProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); } @TestMetadata("safeCallWithElvis.kt") public void testSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simple.kt"); } @TestMetadata("simpleUninitializedMerge.kt") public void testSimpleUninitializedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); } @TestMetadata("taintedValues.kt") public void testTaintedValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); } @TestMetadata("taintedValuesBox.kt") public void testTaintedValuesBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); } @TestMetadata("unsafeRemoving.kt") public void testUnsafeRemoving() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/variables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); } } @@ -1123,300 +985,260 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bridges extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bridgeInInterface.kt") public void testBridgeInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/bridgeInInterface.kt"); } @TestMetadata("bridgeInInterfaceWithProperties.kt") public void testBridgeInInterfaceWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); } @TestMetadata("complexMultiInheritance.kt") public void testComplexMultiInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); } @TestMetadata("complexTraitImpl.kt") public void testComplexTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegation.kt"); } @TestMetadata("delegationComplex.kt") public void testDelegationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplex.kt"); } @TestMetadata("delegationComplexWithList.kt") public void testDelegationComplexWithList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); } @TestMetadata("delegationProperty.kt") public void testDelegationProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationProperty.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/diamond.kt"); } @TestMetadata("fakeCovariantOverride.kt") public void testFakeCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverride.kt") public void testFakeGenericCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverrideWithDelegation.kt") public void testFakeGenericCovariantOverrideWithDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); } @TestMetadata("fakeOverrideOfTraitImpl.kt") public void testFakeOverrideOfTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); } @TestMetadata("fakeOverrideWithSynthesizedImplementation.kt") public void testFakeOverrideWithSynthesizedImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/genericProperty.kt"); } @TestMetadata("kt12416.kt") public void testKt12416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt12416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt12416.kt"); } @TestMetadata("kt1939.kt") public void testKt1939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1939.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1939.kt"); } @TestMetadata("kt1959.kt") public void testKt1959() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1959.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1959.kt"); } @TestMetadata("kt2498.kt") public void testKt2498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2498.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2498.kt"); } @TestMetadata("kt2702.kt") public void testKt2702() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2702.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2702.kt"); } @TestMetadata("kt2833.kt") public void testKt2833() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2833.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2833.kt"); } @TestMetadata("kt2920.kt") public void testKt2920() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2920.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2920.kt"); } @TestMetadata("kt318.kt") public void testKt318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt318.kt"); } @TestMetadata("longChainOneBridge.kt") public void testLongChainOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); } @TestMetadata("manyTypeArgumentsSubstitutedSuccessively.kt") public void testManyTypeArgumentsSubstitutedSuccessively() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); } @TestMetadata("methodFromTrait.kt") public void testMethodFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); } @TestMetadata("noBridgeOnMutableCollectionInheritance.kt") public void testNoBridgeOnMutableCollectionInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); } @TestMetadata("objectClone.kt") public void testObjectClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/objectClone.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/objectClone.kt"); } @TestMetadata("overrideAbstractProperty.kt") public void testOverrideAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); } @TestMetadata("overrideReturnType.kt") public void testOverrideReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); } @TestMetadata("propertyAccessorsWithoutBody.kt") public void testPropertyAccessorsWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); } @TestMetadata("propertyDiamond.kt") public void testPropertyDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); } @TestMetadata("propertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertySetter.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simple.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleEnum.kt"); } @TestMetadata("simpleGenericMethod.kt") public void testSimpleGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleObject.kt"); } @TestMetadata("simpleReturnType.kt") public void testSimpleReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); } @TestMetadata("simpleTraitImpl.kt") public void testSimpleTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); } @TestMetadata("simpleUpperBound.kt") public void testSimpleUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); } @TestMetadata("strListContains.kt") public void testStrListContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/strListContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/strListContains.kt"); } @TestMetadata("traitImplInheritsTraitImpl.kt") public void testTraitImplInheritsTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges.kt") public void testTwoParentsWithDifferentMethodsTwoBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges2.kt") public void testTwoParentsWithDifferentMethodsTwoBridges2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); } @TestMetadata("twoParentsWithTheSameMethodOneBridge.kt") public void testTwoParentsWithTheSameMethodOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); } @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SubstitutionInSuperClass extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); } public void testAllFilesPresentInSubstitutionInSuperClass() throws Exception { @@ -1425,62 +1247,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("boundedTypeArguments.kt") public void testBoundedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); } @TestMetadata("differentErasureInSuperClass.kt") public void testDifferentErasureInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); } @TestMetadata("differentErasureInSuperClassComplex.kt") public void testDifferentErasureInSuperClassComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); } @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); } } } @@ -1489,10 +1301,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuiltinStubMethods extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); } public void testAllFilesPresentInBuiltinStubMethods() throws Exception { @@ -1501,150 +1316,130 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("Collection.kt") public void testCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); } @TestMetadata("customReadOnlyIterator.kt") public void testCustomReadOnlyIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); } @TestMetadata("delegationToArrayList.kt") public void testDelegationToArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); } @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); } @TestMetadata("inheritedImplementations.kt") public void testInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); } @TestMetadata("Iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); } @TestMetadata("IteratorWithRemove.kt") public void testIteratorWithRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); } @TestMetadata("List.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/List.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/List.kt"); } @TestMetadata("ListIterator.kt") public void testListIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); } @TestMetadata("ListWithAllImplementations.kt") public void testListWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); } @TestMetadata("ListWithAllInheritedImplementations.kt") public void testListWithAllInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); } @TestMetadata("manyTypeParametersWithUpperBounds.kt") public void testManyTypeParametersWithUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt"); } @TestMetadata("Map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); } @TestMetadata("MapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); } @TestMetadata("MapEntryWithSetValue.kt") public void testMapEntryWithSetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); } @TestMetadata("MapWithAllImplementations.kt") public void testMapWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); } @TestMetadata("nonTrivialSubstitution.kt") public void testNonTrivialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); } @TestMetadata("nonTrivialUpperBound.kt") public void testNonTrivialUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); } @TestMetadata("substitutedIterable.kt") public void testSubstitutedIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); } @TestMetadata("SubstitutedList.kt") public void testSubstitutedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); } @TestMetadata("substitutedListWithExtraSuperInterface.kt") public void testSubstitutedListWithExtraSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); } @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtendJavaCollections extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt"); } @TestMetadata("abstractMap.kt") public void testAbstractMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractMap.kt"); } @TestMetadata("abstractSet.kt") public void testAbstractSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); } public void testAllFilesPresentInExtendJavaCollections() throws Exception { @@ -1653,26 +1448,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); } @TestMetadata("hashSet.kt") public void testHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); } @TestMetadata("mapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); } } } @@ -1681,6 +1472,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -1689,142 +1484,129 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/array.kt"); } @TestMetadata("companionObjectReceiver.kt") public void testCompanionObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); } @TestMetadata("emptyLHS.kt") public void testEmptyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); } @TestMetadata("enumEntryMember.kt") public void testEnumEntryMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); } @TestMetadata("genericValOnLHS.kt") public void testGenericValOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); } @TestMetadata("kCallableNameIntrinsic.kt") public void testKCallableNameIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); } @TestMetadata("kt12738.kt") public void testKt12738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); } @TestMetadata("kt15446.kt") public void testKt15446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); } @TestMetadata("localUnitFunction.kt") public void testLocalUnitFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/localUnitFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/localUnitFunction.kt"); } @TestMetadata("multiCase.kt") public void testMultiCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); } @TestMetadata("nullReceiver.kt") public void testNullReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); } @TestMetadata("objectReceiver.kt") public void testObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); } @TestMetadata("primitiveReceiver.kt") public void testPrimitiveReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); } @TestMetadata("simpleFunction.kt") public void testSimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); } @TestMetadata("smartCastForExtensionReceiver.kt") public void testSmartCastForExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); } @TestMetadata("syntheticExtensionOnLHS.kt") public void testSyntheticExtensionOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/syntheticExtensionOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/syntheticExtensionOnLHS.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("nullableReceiverInEquals.kt") public void testNullableReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); } @TestMetadata("receiverInEquals.kt") public void testReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); } @TestMetadata("reflectionReference.kt") public void testReflectionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); } } @@ -1832,26 +1614,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); } @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); } } } @@ -1860,10 +1643,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -1872,406 +1658,344 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("booleanNotIntrinsic.kt") public void testBooleanNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); } @TestMetadata("classMemberFromClass.kt") public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); } @TestMetadata("classMemberFromExtension.kt") public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); } @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); } @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("constructorFromTopLevelNoArgs.kt") public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); } @TestMetadata("constructorFromTopLevelOneStringArg.kt") public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); } @TestMetadata("enumValueOfMethod.kt") public void testEnumValueOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); } @TestMetadata("equalsIntrinsic.kt") public void testEqualsIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); } @TestMetadata("extensionFromClass.kt") public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); } @TestMetadata("extensionFromExtension.kt") public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); } @TestMetadata("extensionFromTopLevelStringNoArgs.kt") public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); } @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); } @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); } @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("genericCallableReferenceArguments.kt") public void testGenericCallableReferenceArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); } @TestMetadata("genericCallableReferencesWithNullableTypes.kt") public void testGenericCallableReferencesWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); } @TestMetadata("genericCallableReferencesWithOverload.kt") public void testGenericCallableReferencesWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); } @TestMetadata("genericWithDependentType.kt") public void testGenericWithDependentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } @TestMetadata("getArityViaFunctionImpl.kt") public void testGetArityViaFunctionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); } @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); } @TestMetadata("innerConstructorFromClass.kt") public void testInnerConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); } @TestMetadata("innerConstructorFromExtension.kt") public void testInnerConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); } @TestMetadata("innerConstructorFromTopLevelNoArgs.kt") public void testInnerConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("innerConstructorFromTopLevelOneStringArg.kt") public void testInnerConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("javaCollectionsStaticMethod.kt") public void testJavaCollectionsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); } @TestMetadata("nestedConstructorFromClass.kt") public void testNestedConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); } @TestMetadata("nestedConstructorFromTopLevelNoArgs.kt") public void testNestedConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("nestedConstructorFromTopLevelOneStringArg.kt") public void testNestedConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("newArray.kt") public void testNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/newArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/newArray.kt"); } @TestMetadata("overloadedFun.kt") public void testOverloadedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); } @TestMetadata("overloadedFunVsVal.kt") public void testOverloadedFunVsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); } @TestMetadata("privateClassMember.kt") public void testPrivateClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); } @TestMetadata("sortListOfStrings.kt") public void testSortListOfStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); } @TestMetadata("specialCalls.kt") public void testSpecialCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelStringOneStringArg.kt") public void testTopLevelFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); } @TestMetadata("topLevelFromTopLevelUnitNoArgs.kt") public void testTopLevelFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt") public void testTopLevelFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("traitImplMethodWithClassReceiver.kt") public void testTraitImplMethodWithClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); } @TestMetadata("traitMember.kt") public void testTraitMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureOuter.kt") public void testCaptureOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); } @TestMetadata("classMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); } @TestMetadata("closureWithSideEffect.kt") public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); } @TestMetadata("constructorWithInitializer.kt") public void testConstructorWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); } @TestMetadata("enumExtendsTrait.kt") public void testEnumExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); } @TestMetadata("equalsHashCode.kt") public void testEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); } @TestMetadata("extensionToLocalClass.kt") public void testExtensionToLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); } @TestMetadata("extensionToPrimitive.kt") public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); } @TestMetadata("extensionWithClosure.kt") public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); } @TestMetadata("localFunctionName.kt") public void testLocalFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); } @TestMetadata("localLocal.kt") public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); } @TestMetadata("simpleClosure.kt") public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); } @TestMetadata("simpleWithArg.kt") public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); } @TestMetadata("unitWithSideEffect.kt") public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); } } } @@ -2280,10 +2004,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -2292,158 +2019,132 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegated.kt"); } @TestMetadata("delegatedMutable.kt") public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); } @TestMetadata("enumNameOrdinal.kt") public void testEnumNameOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); } @TestMetadata("extensionToArray.kt") public void testExtensionToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); } @TestMetadata("invokePropertyReference.kt") public void testInvokePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); } @TestMetadata("javaBeanConvention.kt") public void testJavaBeanConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); } @TestMetadata("kClassInstanceIsInitializedFirst.kt") public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); } @TestMetadata("kt12044.kt") public void testKt12044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); } @TestMetadata("kt12982_protectedPropertyReference.kt") public void testKt12982_protectedPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); } @TestMetadata("kt14330.kt") public void testKt14330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); } @TestMetadata("kt14330_2.kt") public void testKt14330_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); } @TestMetadata("kt15447.kt") public void testKt15447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); } @TestMetadata("kt6870_privatePropertyReference.kt") public void testKt6870_privatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); } @TestMetadata("listOfStringsMapLength.kt") public void testListOfStringsMapLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); } @TestMetadata("localClassVar.kt") public void testLocalClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); } @TestMetadata("overriddenInSubclass.kt") public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); } @TestMetadata("privateSetOuterClass.kt") public void testPrivateSetOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); } @TestMetadata("privateSetterInsideClass.kt") public void testPrivateSetterInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); } @TestMetadata("privateSetterOutsideClass.kt") public void testPrivateSetterOutsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); } @TestMetadata("simpleMember.kt") public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); } @TestMetadata("simpleMutableExtension.kt") public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); } @TestMetadata("simpleMutableMember.kt") public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); } @TestMetadata("simpleMutableTopLevel.kt") public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); } @TestMetadata("simpleTopLevel.kt") public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); } } @@ -2451,38 +2152,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Serializability extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSerializability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundWithNotSerializableReceiver.kt") public void testBoundWithNotSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); } @TestMetadata("boundWithSerializableReceiver.kt") public void testBoundWithSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); } @TestMetadata("noReflect.kt") public void testNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); } @TestMetadata("reflectedIsNotSerialized.kt") public void testReflectedIsNotSerialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); } @TestMetadata("withReflect.kt") public void testWithReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); } } } @@ -2491,226 +2191,199 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("as.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/as.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/as.kt"); } @TestMetadata("asForConstants.kt") public void testAsForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asForConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asForConstants.kt"); } @TestMetadata("asSafe.kt") public void testAsSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafe.kt"); } @TestMetadata("asSafeFail.kt") public void testAsSafeFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeFail.kt"); } @TestMetadata("asSafeForConstants.kt") public void testAsSafeForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); } @TestMetadata("asUnit.kt") public void testAsUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asUnit.kt"); } @TestMetadata("asWithGeneric.kt") public void testAsWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asWithGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asWithGeneric.kt"); } @TestMetadata("castGenericNull.kt") public void testCastGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/castGenericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/castGenericNull.kt"); } @TestMetadata("intersectionTypeMultipleBounds.kt") public void testIntersectionTypeMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); } @TestMetadata("intersectionTypeMultipleBoundsImplicitReceiver.kt") public void testIntersectionTypeMultipleBoundsImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); } @TestMetadata("intersectionTypeSmartcast.kt") public void testIntersectionTypeSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); } @TestMetadata("intersectionTypeWithMultipleBoundsAsReceiver.kt") public void testIntersectionTypeWithMultipleBoundsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); } @TestMetadata("intersectionTypeWithoutGenericsAsReceiver.kt") public void testIntersectionTypeWithoutGenericsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/is.kt"); } @TestMetadata("isNullablePrimitive.kt") public void testIsNullablePrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); } @TestMetadata("kt22714.kt") public void testKt22714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/kt22714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/kt22714.kt"); } @TestMetadata("lambdaToUnitCast.kt") public void testLambdaToUnitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/notIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/notIs.kt"); } @TestMetadata("unitAsAny.kt") public void testUnitAsAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsAny.kt"); } @TestMetadata("unitAsInt.kt") public void testUnitAsInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsInt.kt"); } @TestMetadata("unitAsSafeAny.kt") public void testUnitAsSafeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); } @TestMetadata("unitNullableCast.kt") public void testUnitNullableCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitNullableCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitNullableCast.kt"); } @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asFunKBig.kt") public void testAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); } @TestMetadata("asFunKSmall.kt") public void testAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); } @TestMetadata("isFunKBig.kt") public void testIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); } @TestMetadata("isFunKSmall.kt") public void testIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); } @TestMetadata("javaTypeIsFunK.kt") public void testJavaTypeIsFunK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); } @TestMetadata("reifiedAsFunKBig.kt") public void testReifiedAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); } @TestMetadata("reifiedAsFunKSmall.kt") public void testReifiedAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); } @TestMetadata("reifiedIsFunKBig.kt") public void testReifiedIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); } @TestMetadata("reifiedIsFunKSmall.kt") public void testReifiedIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); } @TestMetadata("reifiedSafeAsFunKBig.kt") public void testReifiedSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); } @TestMetadata("reifiedSafeAsFunKSmall.kt") public void testReifiedSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); } @TestMetadata("safeAsFunKBig.kt") public void testSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); } @TestMetadata("safeAsFunKSmall.kt") public void testSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); } } @@ -2718,50 +2391,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiteralExpressionAsGenericArgument extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("binaryExpressionCast.kt") public void testBinaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); } @TestMetadata("javaBox.kt") public void testJavaBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); } @TestMetadata("labeledExpressionCast.kt") public void testLabeledExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); } @TestMetadata("parenthesizedExpressionCast.kt") public void testParenthesizedExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); } @TestMetadata("superConstructor.kt") public void testSuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); } @TestMetadata("unaryExpressionCast.kt") public void testUnaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); } } @@ -2769,56 +2439,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MutableCollections extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMutableCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asWithMutable.kt") public void testAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); } @TestMetadata("isWithMutable.kt") public void testIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); } @TestMetadata("mutabilityMarkerInterfaces.kt") public void testMutabilityMarkerInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); } @TestMetadata("reifiedAsWithMutable.kt") public void testReifiedAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); } @TestMetadata("reifiedIsWithMutable.kt") public void testReifiedIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); } @TestMetadata("reifiedSafeAsWithMutable.kt") public void testReifiedSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); } @TestMetadata("safeAsWithMutable.kt") public void testSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); } @TestMetadata("weirdMutableCasts.kt") public void testWeirdMutableCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); } } } @@ -2827,20 +2493,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckcastOptimization extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCheckcastOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt19128.kt") public void testKt19128() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); } @TestMetadata("kt19246.kt") public void testKt19246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); } } @@ -2848,52 +2516,54 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiteral extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClassLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); } @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaIntrinsicWithSideEffect.kt") public void testJavaIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); } @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); } } @@ -2901,56 +2571,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/java.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/java.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); } @TestMetadata("javaObjectTypeReified.kt") public void testJavaObjectTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); } @TestMetadata("javaPrimitiveTypeReified.kt") public void testJavaPrimitiveTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); } @TestMetadata("javaReified.kt") public void testJavaReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); } @TestMetadata("kt11943.kt") public void testKt11943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); } @TestMetadata("objectSuperConstructorCall.kt") public void testObjectSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); } } } @@ -2959,754 +2625,639 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxPrimitiveTypeInClinitOfClassObject.kt") public void testBoxPrimitiveTypeInClinitOfClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); } @TestMetadata("classCompanionInitializationWithJava.kt") public void testClassCompanionInitializationWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt"); } @TestMetadata("classNamedAsOldPackageFacade.kt") public void testClassNamedAsOldPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObject.kt"); } @TestMetadata("classObjectAsExtensionReceiver.kt") public void testClassObjectAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); } @TestMetadata("classObjectAsStaticInitializer.kt") public void testClassObjectAsStaticInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); } @TestMetadata("classObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectField.kt"); } @TestMetadata("classObjectInTrait.kt") public void testClassObjectInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); } @TestMetadata("classObjectNotOfEnum.kt") public void testClassObjectNotOfEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); } @TestMetadata("classObjectToString.kt") public void testClassObjectToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectToString.kt"); } @TestMetadata("classObjectWithPrivateGenericMember.kt") public void testClassObjectWithPrivateGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); } @TestMetadata("classObjectsWithParentClasses.kt") public void testClassObjectsWithParentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); } @TestMetadata("comanionObjectFieldVsClassField.kt") public void testComanionObjectFieldVsClassField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); } @TestMetadata("defaultObjectSameNamesAsInOuter.kt") public void testDefaultObjectSameNamesAsInOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); } @TestMetadata("delegateConstructorCallWithKeywords.kt") public void testDelegateConstructorCallWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); } @TestMetadata("delegation2.kt") public void testDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation2.kt"); } @TestMetadata("delegation3.kt") public void testDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation3.kt"); } @TestMetadata("delegation4.kt") public void testDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation4.kt"); } @TestMetadata("delegationGenericArg.kt") public void testDelegationGenericArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); } @TestMetadata("delegationGenericArgUpperBound.kt") public void testDelegationGenericArgUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); } @TestMetadata("delegationGenericLongArg.kt") public void testDelegationGenericLongArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); } @TestMetadata("delegationJava.kt") public void testDelegationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationJava.kt"); } @TestMetadata("delegationMethodsWithArgs.kt") public void testDelegationMethodsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); } @TestMetadata("exceptionConstructor.kt") public void testExceptionConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); } @TestMetadata("extensionOnNamedClassObject.kt") public void testExtensionOnNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/funDelegation.kt"); } @TestMetadata("implementComparableInSubclass.kt") public void testImplementComparableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); } @TestMetadata("inheritSetAndHashSet.kt") public void testInheritSetAndHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritance.kt"); } @TestMetadata("inheritedInnerClass.kt") public void testInheritedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); } @TestMetadata("inheritedMethod.kt") public void testInheritedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedMethod.kt"); } @TestMetadata("initializerBlock.kt") public void testInitializerBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlock.kt"); } @TestMetadata("initializerBlockDImpl.kt") public void testInitializerBlockDImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/innerClass.kt"); } @TestMetadata("interfaceCompanionInitializationWithJava.kt") public void testInterfaceCompanionInitializationWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/interfaceCompanionInitializationWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/interfaceCompanionInitializationWithJava.kt"); } @TestMetadata("kt1018.kt") public void testKt1018() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1018.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1018.kt"); } @TestMetadata("kt1120.kt") public void testKt1120() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1120.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1120.kt"); } @TestMetadata("kt1134.kt") public void testKt1134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1134.kt"); } @TestMetadata("kt1157.kt") public void testKt1157() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1157.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1157.kt"); } @TestMetadata("kt1247.kt") public void testKt1247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1247.kt"); } @TestMetadata("kt1345.kt") public void testKt1345() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1345.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1345.kt"); } @TestMetadata("kt1439.kt") public void testKt1439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1439.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1439.kt"); } @TestMetadata("kt1535.kt") public void testKt1535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1535.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1535.kt"); } @TestMetadata("kt1538.kt") public void testKt1538() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1538.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1538.kt"); } @TestMetadata("kt1578.kt") public void testKt1578() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1578.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1578.kt"); } @TestMetadata("kt1611.kt") public void testKt1611() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1611.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1611.kt"); } @TestMetadata("kt1721.kt") public void testKt1721() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1721.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1721.kt"); } @TestMetadata("kt1726.kt") public void testKt1726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1726.kt"); } @TestMetadata("kt1759.kt") public void testKt1759() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1759.kt"); } @TestMetadata("kt1891.kt") public void testKt1891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1891.kt"); } @TestMetadata("kt1918.kt") public void testKt1918() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1918.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1918.kt"); } @TestMetadata("kt1976.kt") public void testKt1976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1976.kt"); } @TestMetadata("kt1980.kt") public void testKt1980() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1980.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1980.kt"); } @TestMetadata("kt2224.kt") public void testKt2224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2224.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2224.kt"); } @TestMetadata("kt2288.kt") public void testKt2288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2288.kt"); } @TestMetadata("kt2384.kt") public void testKt2384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2384.kt"); } @TestMetadata("kt2390.kt") public void testKt2390() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2390.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2390.kt"); } @TestMetadata("kt2391.kt") public void testKt2391() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2391.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2391.kt"); } @TestMetadata("kt2395.kt") public void testKt2395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2395.kt"); } @TestMetadata("kt2417.kt") public void testKt2417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2417.kt"); } @TestMetadata("kt2477.kt") public void testKt2477() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2477.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2477.kt"); } @TestMetadata("kt2480.kt") public void testKt2480() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2480.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2480.kt"); } @TestMetadata("kt2482.kt") public void testKt2482() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2482.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2482.kt"); } @TestMetadata("kt2485.kt") public void testKt2485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2485.kt"); } @TestMetadata("kt249.kt") public void testKt249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt249.kt"); } @TestMetadata("kt2532.kt") public void testKt2532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2532.kt"); } @TestMetadata("kt2566.kt") public void testKt2566() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566.kt"); } @TestMetadata("kt2566_2.kt") public void testKt2566_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566_2.kt"); } @TestMetadata("kt2607.kt") public void testKt2607() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2607.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2607.kt"); } @TestMetadata("kt2626.kt") public void testKt2626() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2626.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2626.kt"); } @TestMetadata("kt2711.kt") public void testKt2711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2711.kt"); } @TestMetadata("kt2784.kt") public void testKt2784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2784.kt"); } @TestMetadata("kt285.kt") public void testKt285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt285.kt"); } @TestMetadata("kt3001.kt") public void testKt3001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3001.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3001.kt"); } @TestMetadata("kt3114.kt") public void testKt3114() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3114.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3114.kt"); } @TestMetadata("kt3414.kt") public void testKt3414() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3414.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3414.kt"); } @TestMetadata("kt343.kt") public void testKt343() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt343.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt343.kt"); } @TestMetadata("kt3546.kt") public void testKt3546() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3546.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3546.kt"); } @TestMetadata("kt454.kt") public void testKt454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt454.kt"); } @TestMetadata("kt471.kt") public void testKt471() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt471.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt471.kt"); } @TestMetadata("kt48.kt") public void testKt48() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt48.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt48.kt"); } @TestMetadata("kt496.kt") public void testKt496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt496.kt"); } @TestMetadata("kt500.kt") public void testKt500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt500.kt"); } @TestMetadata("kt501.kt") public void testKt501() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt501.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt501.kt"); } @TestMetadata("kt504.kt") public void testKt504() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt504.kt"); } @TestMetadata("kt508.kt") public void testKt508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt508.kt"); } @TestMetadata("kt5347.kt") public void testKt5347() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt5347.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt5347.kt"); } @TestMetadata("kt6136.kt") public void testKt6136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6136.kt"); } @TestMetadata("kt633.kt") public void testKt633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt633.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt633.kt"); } @TestMetadata("kt6816.kt") public void testKt6816() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6816.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6816.kt"); } @TestMetadata("kt707.kt") public void testKt707() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt707.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt707.kt"); } @TestMetadata("kt723.kt") public void testKt723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt723.kt"); } @TestMetadata("kt725.kt") public void testKt725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt725.kt"); } @TestMetadata("kt8011.kt") public void testKt8011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011.kt"); } @TestMetadata("kt8011a.kt") public void testKt8011a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011a.kt"); } @TestMetadata("kt903.kt") public void testKt903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt903.kt"); } @TestMetadata("kt940.kt") public void testKt940() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt940.kt"); } @TestMetadata("kt9642.kt") public void testKt9642() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt9642.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt9642.kt"); } @TestMetadata("namedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/namedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/namedClassObject.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/outerThis.kt"); } @TestMetadata("overloadBinaryOperator.kt") public void testOverloadBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); } @TestMetadata("overloadPlusAssign.kt") public void testOverloadPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); } @TestMetadata("overloadPlusAssignReturn.kt") public void testOverloadPlusAssignReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); } @TestMetadata("overloadPlusToPlusAssign.kt") public void testOverloadPlusToPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); } @TestMetadata("overloadUnaryOperator.kt") public void testOverloadUnaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); } @TestMetadata("privateOuterFunctions.kt") public void testPrivateOuterFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); } @TestMetadata("privateOuterProperty.kt") public void testPrivateOuterProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); } @TestMetadata("privateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateToThis.kt"); } @TestMetadata("propertyDelegation.kt") public void testPropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyDelegation.kt"); } @TestMetadata("propertyInInitializer.kt") public void testPropertyInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); } @TestMetadata("quotedClassName.kt") public void testQuotedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/quotedClassName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/quotedClassName.kt"); } @TestMetadata("rightHandOverride.kt") public void testRightHandOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/rightHandOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/rightHandOverride.kt"); } @TestMetadata("sealedInSameFile.kt") public void testSealedInSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); } @TestMetadata("selfcreate.kt") public void testSelfcreate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/selfcreate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/selfcreate.kt"); } @TestMetadata("simpleBox.kt") public void testSimpleBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/simpleBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/simpleBox.kt"); } @TestMetadata("superConstructorCallWithComplexArg.kt") public void testSuperConstructorCallWithComplexArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); } @TestMetadata("typedDelegation.kt") public void testTypedDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/typedDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/typedDelegation.kt"); } @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("instantiateInDerived.kt") public void testInstantiateInDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); } @TestMetadata("instantiateInDerivedLabeled.kt") public void testInstantiateInDerivedLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); } @TestMetadata("instantiateInSameClass.kt") public void testInstantiateInSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); } @TestMetadata("kt6708.kt") public void testKt6708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/kt6708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/kt6708.kt"); } @TestMetadata("properOuter.kt") public void testProperOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properOuter.kt"); } @TestMetadata("properSuperLinking.kt") public void testProperSuperLinking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); } } } @@ -3715,424 +3266,364 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closures extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureExtensionReceiver.kt") public void testCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); } @TestMetadata("capturedLocalGenericFun.kt") public void testCapturedLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); } @TestMetadata("closureInsideConstrucor.kt") public void testClosureInsideConstrucor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); } @TestMetadata("closureOnTopLevel1.kt") public void testClosureOnTopLevel1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); } @TestMetadata("closureOnTopLevel2.kt") public void testClosureOnTopLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); } @TestMetadata("doubleEnclosedLocalVariable.kt") public void testDoubleEnclosedLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); } @TestMetadata("enclosingLocalVariable.kt") public void testEnclosingLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); } @TestMetadata("enclosingThis.kt") public void testEnclosingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingThis.kt"); } @TestMetadata("extensionClosure.kt") public void testExtensionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/extensionClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/extensionClosure.kt"); } @TestMetadata("kt10044.kt") public void testKt10044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt10044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt10044.kt"); } @TestMetadata("kt11634.kt") public void testKt11634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634.kt"); } @TestMetadata("kt11634_2.kt") public void testKt11634_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_2.kt"); } @TestMetadata("kt11634_3.kt") public void testKt11634_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_3.kt"); } @TestMetadata("kt11634_4.kt") public void testKt11634_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_4.kt"); } @TestMetadata("kt2151.kt") public void testKt2151() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt2151.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3152.kt"); } @TestMetadata("kt3523.kt") public void testKt3523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3523.kt"); } @TestMetadata("kt3738.kt") public void testKt3738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3738.kt"); } @TestMetadata("kt3905.kt") public void testKt3905() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3905.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3905.kt"); } @TestMetadata("kt4106.kt") public void testKt4106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4106.kt"); } @TestMetadata("kt4137.kt") public void testKt4137() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4137.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4137.kt"); } @TestMetadata("kt5589.kt") public void testKt5589() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt5589.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt5589.kt"); } @TestMetadata("localClassFunClosure.kt") public void testLocalClassFunClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); } @TestMetadata("localClassLambdaClosure.kt") public void testLocalClassLambdaClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); } @TestMetadata("localFunctionInFunction.kt") public void testLocalFunctionInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); } @TestMetadata("localFunctionInInitializer.kt") public void testLocalFunctionInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); } @TestMetadata("localGenericFun.kt") public void testLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localGenericFun.kt"); } @TestMetadata("localReturn.kt") public void testLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturn.kt"); } @TestMetadata("localReturnWithAutolabel.kt") public void testLocalReturnWithAutolabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); } @TestMetadata("noRefToOuter.kt") public void testNoRefToOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/noRefToOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/noRefToOuter.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/recursiveClosure.kt"); } @TestMetadata("refsAreSerializable.kt") public void testRefsAreSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); } @TestMetadata("simplestClosure.kt") public void testSimplestClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosure.kt"); } @TestMetadata("simplestClosureAndBoxing.kt") public void testSimplestClosureAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); } @TestMetadata("subclosuresWithinInitializers.kt") public void testSubclosuresWithinInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/underscoreParameters.kt"); } @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureInSuperConstructorCall extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorParameterAndLocalCapturedInLambdaInLocalClass.kt") public void testConstructorParameterAndLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass.kt") public void testConstructorParameterCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass2.kt") public void testConstructorParameterCapturedInLambdaInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); } @TestMetadata("kt13454.kt") public void testKt13454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); } @TestMetadata("kt14148.kt") public void testKt14148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); } @TestMetadata("kt4174a.kt") public void testKt4174a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass.kt") public void testLocalCapturedInAnonymousObjectInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass2.kt") public void testLocalCapturedInAnonymousObjectInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); } @TestMetadata("localCapturedInLambdaInInnerClassInLocalClass.kt") public void testLocalCapturedInLambdaInInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); } @TestMetadata("localCapturedInLambdaInLocalClass.kt") public void testLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); } @TestMetadata("localFunctionCapturedInLambda.kt") public void testLocalFunctionCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); } @TestMetadata("outerAndLocalCapturedInLocalClass.kt") public void testOuterAndLocalCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedAsImplicitThisInBoundReference.kt") public void testOuterCapturedAsImplicitThisInBoundReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); } @TestMetadata("outerCapturedInFunctionLiteral.kt") public void testOuterCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); } @TestMetadata("outerCapturedInInlineLambda.kt") public void testOuterCapturedInInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); } @TestMetadata("outerCapturedInInlineLambda2.kt") public void testOuterCapturedInInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); } @TestMetadata("outerCapturedInLambda.kt") public void testOuterCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); } @TestMetadata("outerCapturedInLambda2.kt") public void testOuterCapturedInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); } @TestMetadata("outerCapturedInLambdaInSecondaryConstructor.kt") public void testOuterCapturedInLambdaInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); } @TestMetadata("outerCapturedInLambdaInSubExpression.kt") public void testOuterCapturedInLambdaInSubExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); } @TestMetadata("outerCapturedInLocalClass.kt") public void testOuterCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedInNestedLambda.kt") public void testOuterCapturedInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); } @TestMetadata("outerCapturedInNestedObject.kt") public void testOuterCapturedInNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); } @TestMetadata("outerCapturedInObject.kt") public void testOuterCapturedInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); } @TestMetadata("outerCapturedInObject2.kt") public void testOuterCapturedInObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); } @TestMetadata("outerEnumEntryCapturedInLambdaInInnerClass.kt") public void testOuterEnumEntryCapturedInLambdaInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); } @TestMetadata("properValueCapturedByClosure1.kt") public void testProperValueCapturedByClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); } @TestMetadata("properValueCapturedByClosure2.kt") public void testProperValueCapturedByClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); } @TestMetadata("referenceToCapturedVariablesInMultipleLambdas.kt") public void testReferenceToCapturedVariablesInMultipleLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); } } @@ -4140,56 +3631,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureOuterProperty extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureFunctionInProperty.kt") public void testCaptureFunctionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); } @TestMetadata("inFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); } @TestMetadata("inProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); } @TestMetadata("inPropertyDeepObjectChain.kt") public void testInPropertyDeepObjectChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); } @TestMetadata("inPropertyFromSuperClass.kt") public void testInPropertyFromSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); } @TestMetadata("inPropertyFromSuperSuperClass.kt") public void testInPropertyFromSuperSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); } @TestMetadata("kt4176.kt") public void testKt4176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); } @TestMetadata("kt4656.kt") public void testKt4656() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); } } @@ -4197,68 +3684,62 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedVarsOptimization extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedInCrossinline.kt") public void testCapturedInCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); } @TestMetadata("capturedInInlineOnlyAssign.kt") public void testCapturedInInlineOnlyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); } @TestMetadata("capturedInInlineOnlyCAO.kt") public void testCapturedInInlineOnlyCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); } @TestMetadata("capturedInInlineOnlyIncrDecr.kt") public void testCapturedInInlineOnlyIncrDecr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); } @TestMetadata("capturedInInlineOnlyIndexedCAO.kt") public void testCapturedInInlineOnlyIndexedCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); } @TestMetadata("capturedVarsOfSize2.kt") public void testCapturedVarsOfSize2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); } @TestMetadata("kt17200.kt") public void testKt17200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); } @TestMetadata("kt17588.kt") public void testKt17588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); } @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); } @TestMetadata("withCoroutines.kt") public void testWithCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); } } @@ -4266,44 +3747,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClosureInsideClosure extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosureInsideClosure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("localFunInsideLocalFun.kt") public void testLocalFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); } @TestMetadata("localFunInsideLocalFunDifferentSignatures.kt") public void testLocalFunInsideLocalFunDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); } @TestMetadata("propertyAndFunctionNameClash.kt") public void testPropertyAndFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); } @TestMetadata("threeLevels.kt") public void testThreeLevels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); } @TestMetadata("threeLevelsDifferentSignatures.kt") public void testThreeLevelsDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); } @TestMetadata("varAsFunInsideLocalFun.kt") public void testVarAsFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); } } } @@ -4312,32 +3791,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionLiterals extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCollectionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("collectionLiteralsInArgumentPosition.kt") public void testCollectionLiteralsInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); } @TestMetadata("collectionLiteralsWithConstants.kt") public void testCollectionLiteralsWithConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); } @TestMetadata("collectionLiteralsWithVarargs.kt") public void testCollectionLiteralsWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); } @TestMetadata("defaultAnnotationParameterValues.kt") public void testDefaultAnnotationParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); } } @@ -4345,116 +3824,102 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charSequence.kt") public void testCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/charSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/charSequence.kt"); } @TestMetadata("implementCollectionThroughKotlin.kt") public void testImplementCollectionThroughKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/implementCollectionThroughKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/implementCollectionThroughKotlin.kt"); } @TestMetadata("inSetWithSmartCast.kt") public void testInSetWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); } @TestMetadata("irrelevantImplCharSequenceKotlin.kt") public void testIrrelevantImplCharSequenceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); } @TestMetadata("irrelevantImplMutableList.kt") public void testIrrelevantImplMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableList.kt"); } @TestMetadata("irrelevantImplMutableListKotlin.kt") public void testIrrelevantImplMutableListKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); } @TestMetadata("irrelevantImplMutableListSubstitution.kt") public void testIrrelevantImplMutableListSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListSubstitution.kt"); } @TestMetadata("irrelevantRemoveAtOverrideInJava.kt") public void testIrrelevantRemoveAtOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantRemoveAtOverrideInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantRemoveAtOverrideInJava.kt"); } @TestMetadata("irrelevantSizeOverrideInJava.kt") public void testIrrelevantSizeOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantSizeOverrideInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantSizeOverrideInJava.kt"); } @TestMetadata("mutableList.kt") public void testMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/mutableList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/mutableList.kt"); } @TestMetadata("noStubsInJavaSuperClass.kt") public void testNoStubsInJavaSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); } @TestMetadata("platformValueContains.kt") public void testPlatformValueContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/platformValueContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/platformValueContains.kt"); } @TestMetadata("readOnlyList.kt") public void testReadOnlyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/readOnlyList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/readOnlyList.kt"); } @TestMetadata("readOnlyMap.kt") public void testReadOnlyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/readOnlyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/readOnlyMap.kt"); } @TestMetadata("removeAtInt.kt") public void testRemoveAtInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/removeAtInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/removeAtInt.kt"); } @TestMetadata("strList.kt") public void testStrList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/strList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/strList.kt"); } @TestMetadata("toArrayInJavaClass.kt") public void testToArrayInJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); } } @@ -4462,20 +3927,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Compatibility extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dataClassEqualsHashCodeToString.kt") public void testDataClassEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); } @TestMetadata("privateCompanionObject.kt") public void testPrivateCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); } } @@ -4483,44 +3950,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constants extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstants() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constantsInWhen.kt") public void testConstantsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/constantsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/constantsInWhen.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/float.kt"); } @TestMetadata("kt9532.kt") public void testKt9532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } @TestMetadata("kt9532_lv10.kt") public void testKt9532_lv10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/long.kt"); } @TestMetadata("privateConst.kt") public void testPrivateConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/privateConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/privateConst.kt"); } } @@ -4528,104 +3993,92 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstructorCall extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakInConstructorArguments.kt") public void testBreakInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt"); } @TestMetadata("continueInConstructorArguments.kt") public void testContinueInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt"); } @TestMetadata("earlyReturnInConstructorArguments.kt") public void testEarlyReturnInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt"); } @TestMetadata("inlineFunInConstructorCallEvaluationOrder.kt") public void testInlineFunInConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt"); } @TestMetadata("inlineFunInConstructorCallWithDisabledNormalization.kt") public void testInlineFunInConstructorCallWithDisabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithDisabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithDisabledNormalization.kt"); } @TestMetadata("inlineFunInConstructorCallWithEnabledNormalization.kt") public void testInlineFunInConstructorCallWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithEnabledNormalization.kt"); } @TestMetadata("inlineFunInConstructorCallWithStrictNormalization.kt") public void testInlineFunInConstructorCallWithStrictNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithStrictNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithStrictNormalization.kt"); } @TestMetadata("inlineFunInInnerClassConstructorCall.kt") public void testInlineFunInInnerClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInInnerClassConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInInnerClassConstructorCall.kt"); } @TestMetadata("inlineFunInLocalClassConstructorCall.kt") public void testInlineFunInLocalClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } @TestMetadata("loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt") public void testLoopInInlineFunInSuperConstructorCallWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt"); } @TestMetadata("loopInInlineFunWithEnabledNormalization.kt") public void testLoopInInlineFunWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/loopInInlineFunWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFunWithEnabledNormalization.kt"); } @TestMetadata("nestedConstructorCallWithJumpOutInConstructorArguments.kt") public void testNestedConstructorCallWithJumpOutInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt"); } @TestMetadata("nonLocalReturnInConstructorArguments.kt") public void testNonLocalReturnInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt"); } @TestMetadata("possiblyPoppedUnitializedValueInArguments.kt") public void testPossiblyPoppedUnitializedValueInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt"); } @TestMetadata("regularConstructorCallEvaluationOrder.kt") public void testRegularConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt"); } @TestMetadata("tryCatchInConstructorCallEvaluationOrder.kt") public void testTryCatchInConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/tryCatchInConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/tryCatchInConstructorCallEvaluationOrder.kt"); } } @@ -4633,550 +4086,469 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bottles.kt") public void testBottles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/bottles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/bottles.kt"); } @TestMetadata("breakInFinally.kt") public void testBreakInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); } @TestMetadata("compareBoxedIntegerToZero.kt") public void testCompareBoxedIntegerToZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); } @TestMetadata("conditionOfEmptyIf.kt") public void testConditionOfEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); } @TestMetadata("continueInFor.kt") public void testContinueInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); } @TestMetadata("continueInForCondition.kt") public void testContinueInForCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); } @TestMetadata("continueInWhile.kt") public void testContinueInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); } @TestMetadata("continueToLabelInFor.kt") public void testContinueToLabelInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhile.kt"); } @TestMetadata("doWhileFib.kt") public void testDoWhileFib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); } @TestMetadata("doWhileWithContinue.kt") public void testDoWhileWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); } @TestMetadata("emptyDoWhile.kt") public void testEmptyDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); } @TestMetadata("emptyFor.kt") public void testEmptyFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); } @TestMetadata("emptyWhile.kt") public void testEmptyWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); } @TestMetadata("factorialTest.kt") public void testFactorialTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); } @TestMetadata("finallyOnEmptyReturn.kt") public void testFinallyOnEmptyReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); } @TestMetadata("forArrayList.kt") public void testForArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); } @TestMetadata("forArrayListMultiDecl.kt") public void testForArrayListMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); } @TestMetadata("forInCharSequence.kt") public void testForInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); } @TestMetadata("forInCharSequenceMut.kt") public void testForInCharSequenceMut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); } @TestMetadata("forInSmartCastToArray.kt") public void testForInSmartCastToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); } @TestMetadata("forLoopMemberExtensionAll.kt") public void testForLoopMemberExtensionAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); } @TestMetadata("forLoopMemberExtensionHasNext.kt") public void testForLoopMemberExtensionHasNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); } @TestMetadata("forLoopMemberExtensionNext.kt") public void testForLoopMemberExtensionNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); } @TestMetadata("forUserType.kt") public void testForUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forUserType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forUserType.kt"); } @TestMetadata("inRangeConditionsInWhen.kt") public void testInRangeConditionsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); } @TestMetadata("kt12908.kt") public void testKt12908() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908.kt"); } @TestMetadata("kt12908_2.kt") public void testKt12908_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); } @TestMetadata("kt1441.kt") public void testKt1441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1441.kt"); } @TestMetadata("kt14839.kt") public void testKt14839() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt14839.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt14839.kt"); } @TestMetadata("kt15726.kt") public void testKt15726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt15726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt15726.kt"); } @TestMetadata("kt1688.kt") public void testKt1688() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1688.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1688.kt"); } @TestMetadata("kt17110.kt") public void testKt17110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17110.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17110.kt"); } @TestMetadata("kt1742.kt") public void testKt1742() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1742.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1742.kt"); } @TestMetadata("kt17590.kt") public void testKt17590() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590.kt"); } @TestMetadata("kt17590_long.kt") public void testKt17590_long() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); } @TestMetadata("kt1899.kt") public void testKt1899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1899.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1899.kt"); } @TestMetadata("kt2147.kt") public void testKt2147() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2147.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2147.kt"); } @TestMetadata("kt2259.kt") public void testKt2259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2259.kt"); } @TestMetadata("kt2291.kt") public void testKt2291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2291.kt"); } @TestMetadata("kt237.kt") public void testKt237() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt237.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt237.kt"); } @TestMetadata("kt2416.kt") public void testKt2416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2416.kt"); } @TestMetadata("kt2423.kt") public void testKt2423() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2423.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2423.kt"); } @TestMetadata("kt2577.kt") public void testKt2577() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2577.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2577.kt"); } @TestMetadata("kt2597.kt") public void testKt2597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2597.kt"); } @TestMetadata("kt299.kt") public void testKt299() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt299.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt299.kt"); } @TestMetadata("kt3087.kt") public void testKt3087() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3087.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3087.kt"); } @TestMetadata("kt3203_1.kt") public void testKt3203_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); } @TestMetadata("kt3203_2.kt") public void testKt3203_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); } @TestMetadata("kt3273.kt") public void testKt3273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3273.kt"); } @TestMetadata("kt3280.kt") public void testKt3280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3280.kt"); } @TestMetadata("kt3574.kt") public void testKt3574() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3574.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3574.kt"); } @TestMetadata("kt416.kt") public void testKt416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt416.kt"); } @TestMetadata("kt513.kt") public void testKt513() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt513.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt513.kt"); } @TestMetadata("kt628.kt") public void testKt628() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt628.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt628.kt"); } @TestMetadata("kt769.kt") public void testKt769() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt769.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt769.kt"); } @TestMetadata("kt772.kt") public void testKt772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt772.kt"); } @TestMetadata("kt773.kt") public void testKt773() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt773.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt773.kt"); } @TestMetadata("kt8148.kt") public void testKt8148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148.kt"); } @TestMetadata("kt8148_break.kt") public void testKt8148_break() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); } @TestMetadata("kt8148_continue.kt") public void testKt8148_continue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); } @TestMetadata("kt870.kt") public void testKt870() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt870.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt870.kt"); } @TestMetadata("kt9022Return.kt") public void testKt9022Return() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); } @TestMetadata("kt9022Throw.kt") public void testKt9022Throw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); } @TestMetadata("kt910.kt") public void testKt910() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt910.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt910.kt"); } @TestMetadata("kt958.kt") public void testKt958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt958.kt"); } @TestMetadata("longRange.kt") public void testLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/longRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/longRange.kt"); } @TestMetadata("parameterWithNameForFunctionType.kt") public void testParameterWithNameForFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); } @TestMetadata("quicksort.kt") public void testQuicksort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/quicksort.kt"); } @TestMetadata("tryCatchFinallyChain.kt") public void testTryCatchFinallyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); } @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BreakContinueInExpressions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakFromOuter.kt") public void testBreakFromOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); } @TestMetadata("breakInDoWhile.kt") public void testBreakInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); } @TestMetadata("breakInExpr.kt") public void testBreakInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); } @TestMetadata("continueInDoWhile.kt") public void testContinueInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); } @TestMetadata("inlineWithStack.kt") public void testInlineWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); } @TestMetadata("innerLoopWithStack.kt") public void testInnerLoopWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); } @TestMetadata("kt14581.kt") public void testKt14581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); } @TestMetadata("kt16713.kt") public void testKt16713() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); } @TestMetadata("kt16713_2.kt") public void testKt16713_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); } @TestMetadata("kt17384.kt") public void testKt17384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); } @TestMetadata("kt9022And.kt") public void testKt9022And() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); } @TestMetadata("kt9022Or.kt") public void testKt9022Or() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); } @TestMetadata("pathologicalDoWhile.kt") public void testPathologicalDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); } @TestMetadata("popSizes.kt") public void testPopSizes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); } @TestMetadata("tryFinally1.kt") public void testTryFinally1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); } @TestMetadata("tryFinally2.kt") public void testTryFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); } @TestMetadata("whileTrueBreak.kt") public void testWhileTrueBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); } } @@ -5184,62 +4556,57 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArray extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInArraySpecializedToUntil.kt") public void testForInArraySpecializedToUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); } @TestMetadata("forInArrayWithArrayPropertyUpdatedInLoopBody.kt") public void testForInArrayWithArrayPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody12.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody13.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); } @TestMetadata("forInDelegatedPropertyUpdatedInLoopBody.kt") public void testForInDelegatedPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInFieldUpdatedInLoopBody.kt") public void testForInFieldUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); } @TestMetadata("forIntArray.kt") public void testForIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); } @TestMetadata("forNullableIntArray.kt") public void testForNullableIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); } @TestMetadata("forPrimitiveIntArray.kt") public void testForPrimitiveIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); } } @@ -5247,98 +4614,87 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayWithIndex extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInArrayWithIndexContinuesAsUnmodified.kt") public void testForInArrayWithIndexContinuesAsUnmodified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); } @TestMetadata("forInArrrayWithIndexNoElementVar.kt") public void testForInArrrayWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); } @TestMetadata("forInArrrayWithIndexNoIndexVar.kt") public void testForInArrrayWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); } @TestMetadata("forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInArrrayWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); } @TestMetadata("forInByteArrayWithIndexWithSmartCast.kt") public void testForInByteArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInByteArrrayWithIndex.kt") public void testForInByteArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); } @TestMetadata("forInEmptyArrrayWithIndex.kt") public void testForInEmptyArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndex.kt") public void testForInGenericArrayOfIntsWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndexWithSmartCast.kt") public void testForInGenericArrayOfIntsWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); } @TestMetadata("forInGenericArrayWithIndex.kt") public void testForInGenericArrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); } @TestMetadata("forInIntArrayWithIndexWithSmartCast.kt") public void testForInIntArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInIntArrrayWithIndex.kt") public void testForInIntArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); } @TestMetadata("forInObjectArrrayWithIndex.kt") public void testForInObjectArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); } @TestMetadata("forInShortArrayWithIndexWithSmartCast.kt") public void testForInShortArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInShortArrrayWithIndex.kt") public void testForInShortArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); } } @@ -5346,50 +4702,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInCharSequenceWithIndex extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInCharSeqWithIndexStops.kt") public void testForInCharSeqWithIndexStops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); } @TestMetadata("forInCharSequenceWithIndex.kt") public void testForInCharSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); } @TestMetadata("forInEmptyStringWithIndex.kt") public void testForInEmptyStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); } @TestMetadata("forInStringWithIndex.kt") public void testForInStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); } @TestMetadata("forInStringWithIndexNoElementVar.kt") public void testForInStringWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); } @TestMetadata("forInStringWithIndexNoIndexVar.kt") public void testForInStringWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); } @TestMetadata("forInStringWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInStringWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5397,44 +4750,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIterableWithIndex extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInEmptyListWithIndex.kt") public void testForInEmptyListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); } @TestMetadata("forInListWithIndex.kt") public void testForInListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); } @TestMetadata("forInListWithIndexNoElementVar.kt") public void testForInListWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); } @TestMetadata("forInListWithIndexNoIndexVar.kt") public void testForInListWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); } @TestMetadata("forInListWithIndexThrowsCME.kt") public void testForInListWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); } @TestMetadata("forInListWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInListWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5442,44 +4793,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInSequenceWithIndex extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInEmptySequenceWithIndex.kt") public void testForInEmptySequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndex.kt") public void testForInSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndexNoElementVar.kt") public void testForInSequenceWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); } @TestMetadata("forInSequenceWithIndexNoIndexVar.kt") public void testForInSequenceWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); } @TestMetadata("forInSequenceWithIndexThrowsCME.kt") public void testForInSequenceWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); } @TestMetadata("forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInSequenceWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5487,38 +4836,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnsNothing extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReturnsNothing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); } @TestMetadata("inlineMethod.kt") public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); } } @@ -5526,188 +4874,162 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchInExpressions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); } @TestMetadata("complexChain.kt") public void testComplexChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); } @TestMetadata("deadTryCatch.kt") public void testDeadTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); } @TestMetadata("expectException.kt") public void testExpectException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); } @TestMetadata("inlineTryCatch.kt") public void testInlineTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); } @TestMetadata("inlineTryExpr.kt") public void testInlineTryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); } @TestMetadata("inlineTryFinally.kt") public void testInlineTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); } @TestMetadata("kt17572.kt") public void testKt17572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); } @TestMetadata("kt17572_2.kt") public void testKt17572_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); } @TestMetadata("kt17572_2_ext.kt") public void testKt17572_2_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); } @TestMetadata("kt17572_ext.kt") public void testKt17572_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); } @TestMetadata("kt17572_nested.kt") public void testKt17572_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); } @TestMetadata("kt17573.kt") public void testKt17573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); } @TestMetadata("kt17573_nested.kt") public void testKt17573_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); } @TestMetadata("kt8608.kt") public void testKt8608() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); } @TestMetadata("kt9644try.kt") public void testKt9644try() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); } @TestMetadata("multipleCatchBlocks.kt") public void testMultipleCatchBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); } @TestMetadata("splitTry.kt") public void testSplitTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); } @TestMetadata("splitTryCorner1.kt") public void testSplitTryCorner1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); } @TestMetadata("splitTryCorner2.kt") public void testSplitTryCorner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); } @TestMetadata("tryAfterTry.kt") public void testTryAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); } @TestMetadata("tryAndBreak.kt") public void testTryAndBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); } @TestMetadata("tryAndContinue.kt") public void testTryAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); } @TestMetadata("tryCatchAfterWhileTrue.kt") public void testTryCatchAfterWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); } @TestMetadata("tryInsideCatch.kt") public void testTryInsideCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); } @TestMetadata("tryInsideTry.kt") public void testTryInsideTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); } @TestMetadata("unmatchedInlineMarkers.kt") public void testUnmatchedInlineMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); } } } @@ -5716,16 +5038,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); } @TestMetadata("accessorForSuspend.kt") public void testAccessorForSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); } public void testAllFilesPresentInCoroutines() throws Exception { @@ -5734,550 +5058,464 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("asyncIterator.kt") public void testAsyncIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); } @TestMetadata("asyncIteratorNullMerge.kt") public void testAsyncIteratorNullMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); } @TestMetadata("asyncIteratorToList.kt") public void testAsyncIteratorToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); } @TestMetadata("await.kt") public void testAwait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/await.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/await.kt"); } @TestMetadata("beginWithException.kt") public void testBeginWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithException.kt"); } @TestMetadata("beginWithExceptionNoHandleException.kt") public void testBeginWithExceptionNoHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); } @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); } @TestMetadata("controllerAccessFromInnerLambda.kt") public void testControllerAccessFromInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); } @TestMetadata("coroutineContextInInlinedLambda.kt") public void testCoroutineContextInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); } @TestMetadata("coroutineToString.kt") public void testCoroutineToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineToString.kt"); } @TestMetadata("createCoroutineSafe.kt") public void testCreateCoroutineSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); } @TestMetadata("createCoroutinesOnManualInstances.kt") public void testCreateCoroutinesOnManualInstances() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); } @TestMetadata("crossInlineWithCapturedOuterReceiver.kt") public void testCrossInlineWithCapturedOuterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); } @TestMetadata("defaultParametersInSuspend.kt") public void testDefaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); } @TestMetadata("emptyClosure.kt") public void testEmptyClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); } @TestMetadata("falseUnitCoercion.kt") public void testFalseUnitCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); } @TestMetadata("generate.kt") public void testGenerate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/generate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/generate.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleException.kt"); } @TestMetadata("handleResultCallEmptyBody.kt") public void testHandleResultCallEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); } @TestMetadata("handleResultNonUnitExpression.kt") public void testHandleResultNonUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); } @TestMetadata("handleResultSuspended.kt") public void testHandleResultSuspended() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); } @TestMetadata("illegalState.kt") public void testIllegalState() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/illegalState.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/illegalState.kt"); } @TestMetadata("indirectInlineUsedAsNonInline.kt") public void testIndirectInlineUsedAsNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); } @TestMetadata("inlineFunInGenericClass.kt") public void testInlineFunInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); } @TestMetadata("inlineGenericFunCalledFromSubclass.kt") public void testInlineGenericFunCalledFromSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); } @TestMetadata("inlinedTryCatchFinally.kt") public void testInlinedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); } @TestMetadata("innerSuspensionCalls.kt") public void testInnerSuspensionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); } @TestMetadata("instanceOfContinuation.kt") public void testInstanceOfContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); } @TestMetadata("iterateOverArray.kt") public void testIterateOverArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); } @TestMetadata("kt12958.kt") public void testKt12958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt12958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt12958.kt"); } @TestMetadata("kt15016.kt") public void testKt15016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15016.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15016.kt"); } @TestMetadata("kt15017.kt") public void testKt15017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15017.kt"); } @TestMetadata("kt15930.kt") public void testKt15930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15930.kt"); } @TestMetadata("kt21605.kt") public void testKt21605() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt21605.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } @TestMetadata("lastExpressionIsLoop.kt") public void testLastExpressionIsLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); } @TestMetadata("lastStatementInc.kt") public void testLastStatementInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); } @TestMetadata("lastStementAssignment.kt") public void testLastStementAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); } @TestMetadata("lastUnitExpression.kt") public void testLastUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); } @TestMetadata("localCallableRef.kt") public void testLocalCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); } @TestMetadata("localDelegate.kt") public void testLocalDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localDelegate.kt"); } @TestMetadata("longRangeInSuspendCall.kt") public void testLongRangeInSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); } @TestMetadata("longRangeInSuspendFun.kt") public void testLongRangeInSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); } @TestMetadata("mergeNullAndString.kt") public void testMergeNullAndString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); } @TestMetadata("multipleInvokeCalls.kt") public void testMultipleInvokeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda1.kt") public void testMultipleInvokeCallsInsideInlineLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda2.kt") public void testMultipleInvokeCallsInsideInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda3.kt") public void testMultipleInvokeCallsInsideInlineLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); } @TestMetadata("nestedTryCatch.kt") public void testNestedTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); } @TestMetadata("noSuspensionPoints.kt") public void testNoSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); } @TestMetadata("nonLocalReturnFromInlineLambda.kt") public void testNonLocalReturnFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); } @TestMetadata("nonLocalReturnFromInlineLambdaDeep.kt") public void testNonLocalReturnFromInlineLambdaDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); } @TestMetadata("overrideDefaultArgument.kt") public void testOverrideDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); } @TestMetadata("recursiveSuspend.kt") public void testRecursiveSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); } @TestMetadata("returnByLabel.kt") public void testReturnByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simple.kt"); } @TestMetadata("simpleException.kt") public void testSimpleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleException.kt"); } @TestMetadata("simpleWithHandleResult.kt") public void testSimpleWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); } @TestMetadata("statementLikeLastExpression.kt") public void testStatementLikeLastExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); } @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); } @TestMetadata("suspendDefaultImpl.kt") public void testSuspendDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); } @TestMetadata("suspendDelegation.kt") public void testSuspendDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); } @TestMetadata("suspendFromInlineLambda.kt") public void testSuspendFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); } @TestMetadata("suspendFunImportedFromObject.kt") public void testSuspendFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstruction.kt") public void testSuspendInTheMiddleOfObjectConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt") public void testSuspendInTheMiddleOfObjectConstructionEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionWithJumpOut.kt") public void testSuspendInTheMiddleOfObjectConstructionWithJumpOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); } @TestMetadata("suspensionInsideSafeCall.kt") public void testSuspensionInsideSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); } @TestMetadata("suspensionInsideSafeCallWithElvis.kt") public void testSuspensionInsideSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); } @TestMetadata("tryCatchFinallyWithHandleResult.kt") public void testTryCatchFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); } @TestMetadata("tryCatchWithHandleResult.kt") public void testTryCatchWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); } @TestMetadata("tryFinallyInsideInlineLambda.kt") public void testTryFinallyInsideInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); } @TestMetadata("tryFinallyWithHandleResult.kt") public void testTryFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); } @TestMetadata("varValueConflictsWithTable.kt") public void testVarValueConflictsWithTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); } @TestMetadata("varValueConflictsWithTableSameSort.kt") public void testVarValueConflictsWithTableSameSort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInControlFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakFinally.kt") public void testBreakFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); } @TestMetadata("breakStatement.kt") public void testBreakStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); } @TestMetadata("doWhileStatement.kt") public void testDoWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } @TestMetadata("forContinue.kt") public void testForContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); } @TestMetadata("forStatement.kt") public void testForStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); } @TestMetadata("forWithStep.kt") public void testForWithStep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); } @TestMetadata("ifStatement.kt") public void testIfStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); } @TestMetadata("labeledWhile.kt") public void testLabeledWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); } @TestMetadata("returnFromFinally.kt") public void testReturnFromFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); } @TestMetadata("switchLikeWhen.kt") public void testSwitchLikeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); } @TestMetadata("throwFromCatch.kt") public void testThrowFromCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); } @TestMetadata("throwInTryWithHandleResult.kt") public void testThrowInTryWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); } @TestMetadata("whileStatement.kt") public void testWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); } } @@ -6285,148 +5523,134 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FeatureIntersection extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFeatureIntersection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakWithNonEmptyStack.kt") public void testBreakWithNonEmptyStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); } @TestMetadata("destructuringInLambdas.kt") public void testDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); } @TestMetadata("safeCallOnTwoReceivers.kt") public void testSafeCallOnTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); } @TestMetadata("safeCallOnTwoReceiversLong.kt") public void testSafeCallOnTwoReceiversLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); } @TestMetadata("suspendDestructuringInLambdas.kt") public void testSuspendDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); } @TestMetadata("suspendOperatorPlus.kt") public void testSuspendOperatorPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); } @TestMetadata("suspendOperatorPlusAssign.kt") public void testSuspendOperatorPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); } @TestMetadata("suspendOperatorPlusCallFromLambda.kt") public void testSuspendOperatorPlusCallFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tailrec extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailrec() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("controlFlowIf.kt") public void testControlFlowIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); } @TestMetadata("controlFlowWhen.kt") public void testControlFlowWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); } @TestMetadata("extention.kt") public void testExtention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); } } } @@ -6435,68 +5659,62 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntLikeVarSpilling extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("complicatedMerge.kt") public void testComplicatedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); } @TestMetadata("i2bResult.kt") public void testI2bResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); } @TestMetadata("loadFromBooleanArray.kt") public void testLoadFromBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); } @TestMetadata("loadFromByteArray.kt") public void testLoadFromByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); } @TestMetadata("noVariableInTable.kt") public void testNoVariableInTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); } @TestMetadata("sameIconst1ManyVars.kt") public void testSameIconst1ManyVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); } @TestMetadata("usedInArrayStore.kt") public void testUsedInArrayStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); } @TestMetadata("usedInMethodCall.kt") public void testUsedInMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); } @TestMetadata("usedInPutfield.kt") public void testUsedInPutfield() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt"); } @TestMetadata("usedInVarStore.kt") public void testUsedInVarStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); } } @@ -6504,56 +5722,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntrinsicSemantics extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); } @TestMetadata("coroutineContextReceiver.kt") public void testCoroutineContextReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); } @TestMetadata("coroutineContextReceiverNotIntrinsic.kt") public void testCoroutineContextReceiverNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); } @TestMetadata("intercepted.kt") public void testIntercepted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturn.kt") public void testStartCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturnInterception.kt") public void testStartCoroutineUninterceptedOrReturnInterception() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); } @TestMetadata("suspendCoroutineUninterceptedOrReturn.kt") public void testSuspendCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); } } @@ -6561,6 +5775,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -6571,8 +5789,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public static class Anonymous extends AbstractIrBlackBoxCodegenTest { @TestMetadata("simple.kt") public void ignoreSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInAnonymous() throws Exception { @@ -6584,68 +5805,62 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Named extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNamed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedParameters.kt") public void testCapturedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); } @TestMetadata("insideLambda.kt") public void testInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); } @TestMetadata("nestedLocals.kt") public void testNestedLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); } @TestMetadata("simpleSuspensionPoint.kt") public void testSimpleSuspensionPoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); } @TestMetadata("stateMachine.kt") public void testStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); } } } @@ -6654,61 +5869,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModule extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("inlineFunctionWithOptionalParam.kt") public void testInlineFunctionWithOptionalParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); } @TestMetadata("inlineMultiModule.kt") public void testInlineMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); } @TestMetadata("inlineMultiModuleOverride.kt") public void testInlineMultiModuleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); } @TestMetadata("inlineMultiModuleWithController.kt") public void testInlineMultiModuleWithController() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); } @TestMetadata("inlineMultiModuleWithInnerInlining.kt") public void testInlineMultiModuleWithInnerInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); } @TestMetadata("inlineTailCall.kt") public void testInlineTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); } } @@ -6716,14 +5917,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantLocalsElimination extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ktor_receivedMessage.kt") public void testKtor_receivedMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); } } @@ -6731,32 +5935,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackUnwinding extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStackUnwinding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("exception.kt") public void testException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); } } @@ -6764,104 +5968,92 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionAsCoroutine extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); } @TestMetadata("inlineTwoReceivers.kt") public void testInlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); } @TestMetadata("noinlineTwoReceivers.kt") public void testNoinlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); } @TestMetadata("openFunWithJava.kt") public void testOpenFunWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/openFunWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/openFunWithJava.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); } @TestMetadata("privateFunctions.kt") public void testPrivateFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); } @TestMetadata("privateInFile.kt") public void testPrivateInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); } @TestMetadata("returnNoSuspend.kt") public void testReturnNoSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); } @TestMetadata("superCallAbstractClass.kt") public void testSuperCallAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); } @TestMetadata("superCallInterface.kt") public void testSuperCallInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); } @TestMetadata("withVariables.kt") public void testWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); } } @@ -6869,32 +6061,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionTypeCall extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); } @TestMetadata("manyParameters.kt") public void testManyParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); } @TestMetadata("suspendModifier.kt") public void testSuspendModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); } } @@ -6902,50 +6094,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCallOptimizations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailCallOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("crossinline.kt") public void testCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); } @TestMetadata("inlineWithStateMachine.kt") public void testInlineWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); } @TestMetadata("inlineWithoutStateMachine.kt") public void testInlineWithoutStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); } @TestMetadata("unreachable.kt") public void testUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); } @TestMetadata("whenUnit.kt") public void testWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); } } @@ -6953,32 +6142,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailOperations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("suspendWithIf.kt") public void testSuspendWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); } @TestMetadata("suspendWithTryCatch.kt") public void testSuspendWithTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); } @TestMetadata("suspendWithWhen.kt") public void testSuspendWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); } @TestMetadata("tailInlining.kt") public void testTailInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); } } @@ -6986,38 +6175,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnitTypeReturn extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnitTypeReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coroutineNonLocalReturn.kt") public void testCoroutineNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); } @TestMetadata("coroutineReturn.kt") public void testCoroutineReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); } @TestMetadata("suspendNonLocalReturn.kt") public void testSuspendNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); } @TestMetadata("suspendReturn.kt") public void testSuspendReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); } @TestMetadata("unitSafeCall.kt") public void testUnitSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); } } @@ -7025,20 +6213,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarSpilling extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt19475.kt") public void testKt19475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); } @TestMetadata("nullSpilling.kt") public void testNullSpilling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); } } } @@ -7047,154 +6237,139 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); } @TestMetadata("doubleParam.kt") public void testDoubleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); } @TestMetadata("floatParam.kt") public void testFloatParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/floatParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/genericParam.kt"); } @TestMetadata("kt5002.kt") public void testKt5002() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/kt5002.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/kt5002.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); } @TestMetadata("multiDeclarationFor.kt") public void testMultiDeclarationFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); } @TestMetadata("nonTrivialFinalMemberInSuperClass.kt") public void testNonTrivialFinalMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); } @TestMetadata("nonTrivialMemberInSuperClass.kt") public void testNonTrivialMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); } @TestMetadata("privateValParams.kt") public void testPrivateValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); } @TestMetadata("twoValParams.kt") public void testTwoValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); } @TestMetadata("twoVarParams.kt") public void testTwoVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Copy extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCopy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorWithDefaultParam.kt") public void testConstructorWithDefaultParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); } @TestMetadata("copyInObjectNestedDataClass.kt") public void testCopyInObjectNestedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); } @TestMetadata("kt12708.kt") public void testKt12708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); } @TestMetadata("kt3033.kt") public void testKt3033() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); } @TestMetadata("valInConstructorParams.kt") public void testValInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); } @TestMetadata("varInConstructorParams.kt") public void testVarInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); } @TestMetadata("withGenericParameter.kt") public void testWithGenericParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); } @TestMetadata("withSecondaryConstructor.kt") public void testWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); } } @@ -7202,50 +6377,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("genericarray.kt") public void testGenericarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); } @TestMetadata("intarray.kt") public void testIntarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/null.kt"); } @TestMetadata("nullother.kt") public void testNullother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); } @TestMetadata("sameinstance.kt") public void testSameinstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); } } @@ -7253,86 +6425,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashCode extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); } } @@ -7340,50 +6503,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToString extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); } } } @@ -7392,32 +6552,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCodeElimination extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDeadCodeElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyVariableRange.kt") public void testEmptyVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); } @TestMetadata("intersectingVariableRange.kt") public void testIntersectingVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); } @TestMetadata("intersectingVariableRangeInFinally.kt") public void testIntersectingVariableRangeInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); } @TestMetadata("kt14357.kt") public void testKt14357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); } } @@ -7425,181 +6585,134 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("implementedByFake.kt") public void testImplementedByFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); } @TestMetadata("implementedByFake2.kt") public void testImplementedByFake2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); } @TestMetadata("implementedByFake3.kt") public void testImplementedByFake3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); } @TestMetadata("inheritedFromInterfaceViaAbstractSuperclass.kt") public void testInheritedFromInterfaceViaAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); } @TestMetadata("kt6382.kt") public void testKt6382() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/protected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/protected.kt"); } @TestMetadata("simpleFromOtherFile.kt") public void testSimpleFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); } @TestMetadata("superCallCheck.kt") public void testSuperCallCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); } @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); } @TestMetadata("annotationWithEmptyArray.kt") public void testAnnotationWithEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); } @TestMetadata("checkIfConstructorIsSynthetic.kt") public void testCheckIfConstructorIsSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); } @TestMetadata("defArgs1.kt") public void testDefArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); } @TestMetadata("defArgs1InnerClass.kt") public void testDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); } @TestMetadata("defArgs2.kt") public void testDefArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); } @TestMetadata("doubleDefArgs1InnerClass.kt") public void testDoubleDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); } @TestMetadata("enumWithOneDefArg.kt") public void testEnumWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); } @TestMetadata("enumWithTwoDefArgs.kt") public void testEnumWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); } @TestMetadata("enumWithTwoDoubleDefArgs.kt") public void testEnumWithTwoDoubleDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); } @TestMetadata("kt2852.kt") public void testKt2852() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); } @TestMetadata("kt3060.kt") public void testKt3060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); } @TestMetadata("manyArgs.kt") public void testManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); } } @@ -7607,26 +6720,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Convention extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("incWithDefaultInGetter.kt") public void testIncWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); } @TestMetadata("kt9140.kt") public void testKt9140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); } @TestMetadata("plusAssignWithDefaultInGetter.kt") public void testPlusAssignWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); } } @@ -7634,10 +6748,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -7646,116 +6763,97 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); } @TestMetadata("covariantOverrideGeneric.kt") public void testCovariantOverrideGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); } @TestMetadata("extensionFunctionManyArgs.kt") public void testExtensionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); } @TestMetadata("extentionFunction.kt") public void testExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); } @TestMetadata("extentionFunctionDouble.kt") public void testExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); } @TestMetadata("extentionFunctionDoubleTwoArgs.kt") public void testExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("extentionFunctionInClassObject.kt") public void testExtentionFunctionInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); } @TestMetadata("extentionFunctionInObject.kt") public void testExtentionFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); } @TestMetadata("extentionFunctionWithOneDefArg.kt") public void testExtentionFunctionWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); } @TestMetadata("funInTrait.kt") public void testFunInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); } @TestMetadata("innerExtentionFunction.kt") public void testInnerExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); } @TestMetadata("innerExtentionFunctionDouble.kt") public void testInnerExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); } @TestMetadata("innerExtentionFunctionDoubleTwoArgs.kt") public void testInnerExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("innerExtentionFunctionManyArgs.kt") public void testInnerExtentionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); } @TestMetadata("kt5232.kt") public void testKt5232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); } @TestMetadata("memberFunctionManyArgs.kt") public void testMemberFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); } @TestMetadata("mixingNamedAndPositioned.kt") public void testMixingNamedAndPositioned() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); } @TestMetadata("topLevelManyArgs.kt") public void testTopLevelManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); } } @@ -7763,32 +6861,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("memberExtensionFunction.kt") public void testMemberExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); } } @@ -7796,26 +6894,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt2789.kt") public void testKt2789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); } @TestMetadata("kt9428.kt") public void testKt9428() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); } @TestMetadata("kt9924.kt") public void testKt9924() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); } } } @@ -7824,10 +6923,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); } public void testAllFilesPresentInDelegatedProperty() throws Exception { @@ -7836,345 +6938,284 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); } @TestMetadata("castGetReturnType.kt") public void testCastGetReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); } @TestMetadata("castSetParameter.kt") public void testCastSetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); } @TestMetadata("delegateAsInnerClass.kt") public void testDelegateAsInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); } @TestMetadata("delegateByOtherProperty.kt") public void testDelegateByOtherProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); } @TestMetadata("delegateByTopLevelFun.kt") public void testDelegateByTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); } @TestMetadata("delegateByTopLevelProperty.kt") public void testDelegateByTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); } @TestMetadata("delegateForExtProperty.kt") public void testDelegateForExtProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); } @TestMetadata("delegateForExtPropertyInClass.kt") public void testDelegateForExtPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); } @TestMetadata("delegateWithPrivateSet.kt") public void testDelegateWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); } @TestMetadata("extensionDelegatesWithSameNames.kt") public void testExtensionDelegatesWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); } @TestMetadata("extensionPropertyAndExtensionGetValue.kt") public void testExtensionPropertyAndExtensionGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); } @TestMetadata("genericDelegate.kt") public void testGenericDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); } @TestMetadata("genericDelegateUncheckedCast1.kt") public void testGenericDelegateUncheckedCast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); } @TestMetadata("genericDelegateUncheckedCast2.kt") public void testGenericDelegateUncheckedCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); } @TestMetadata("genericSetValueViaSyntheticAccessor.kt") public void testGenericSetValueViaSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); } @TestMetadata("getAsExtensionFun.kt") public void testGetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); } @TestMetadata("getAsExtensionFunInClass.kt") public void testGetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); } @TestMetadata("getDelegateWithoutReflection.kt") public void testGetDelegateWithoutReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); } @TestMetadata("inClassVal.kt") public void testInClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); } @TestMetadata("inClassVar.kt") public void testInClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); } @TestMetadata("inferredPropertyType.kt") public void testInferredPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); } @TestMetadata("kt4138.kt") public void testKt4138() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); } @TestMetadata("kt6722.kt") public void testKt6722() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); } @TestMetadata("kt9712.kt") public void testKt9712() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); } @TestMetadata("privateSetterKPropertyIsNotMutable.kt") public void testPrivateSetterKPropertyIsNotMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); } @TestMetadata("propertyMetadataShouldBeCached.kt") public void testPropertyMetadataShouldBeCached() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); } @TestMetadata("protectedVarWithPrivateSet.kt") public void testProtectedVarWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); } @TestMetadata("setAsExtensionFun.kt") public void testSetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); } @TestMetadata("setAsExtensionFunInClass.kt") public void testSetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); } @TestMetadata("stackOverflowOnCallFromGetValue.kt") public void testStackOverflowOnCallFromGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); } @TestMetadata("twoPropByOneDelegete.kt") public void testTwoPropByOneDelegete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); } @TestMetadata("useKPropertyLater.kt") public void testUseKPropertyLater() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); } @TestMetadata("useReflectionOnKProperty.kt") public void testUseReflectionOnKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); } @TestMetadata("valInInnerClass.kt") public void testValInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); } @TestMetadata("varInInnerClass.kt") public void testVarInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedLocalVal.kt") public void testCapturedLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); } @TestMetadata("capturedLocalValNoInline.kt") public void testCapturedLocalValNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); } @TestMetadata("capturedLocalVar.kt") public void testCapturedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); } @TestMetadata("capturedLocalVarNoInline.kt") public void testCapturedLocalVarNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); } @TestMetadata("inlineGetValue.kt") public void testInlineGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); } @TestMetadata("inlineOperators.kt") public void testInlineOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); } @TestMetadata("kt12891.kt") public void testKt12891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); } @TestMetadata("kt13557.kt") public void testKt13557() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); } @TestMetadata("kt19690.kt") public void testKt19690() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); } @TestMetadata("localValNoExplicitType.kt") public void testLocalValNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); } @TestMetadata("localVarNoExplicitType.kt") public void testLocalVarNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); } } @@ -8182,110 +7223,97 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentReceivers.kt") public void testDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); } @TestMetadata("evaluationOrder.kt") public void testEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); } @TestMetadata("evaluationOrderVar.kt") public void testEvaluationOrderVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); } @TestMetadata("extensionDelegated.kt") public void testExtensionDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); } @TestMetadata("hostCheck.kt") public void testHostCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); } @TestMetadata("inlineProvideDelegate.kt") public void testInlineProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); } @TestMetadata("kt15437.kt") public void testKt15437() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); } @TestMetadata("kt16441.kt") public void testKt16441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); } @TestMetadata("kt18902.kt") public void testKt18902() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); } @TestMetadata("localCaptured.kt") public void testLocalCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); } @TestMetadata("localDifferentReceivers.kt") public void testLocalDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); } @TestMetadata("propertyMetadata.kt") public void testPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); } } } @@ -8294,49 +7322,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationToVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/kt8154.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } @TestMetadata("withDefaultParameters.kt") public void testWithDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); } } @@ -8344,56 +7360,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringDeclInLambdaParam extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("extensionComponents.kt") public void testExtensionComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); } @TestMetadata("otherParameters.kt") public void testOtherParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); } @TestMetadata("stdlibUsages.kt") public void testStdlibUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); } @TestMetadata("underscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); } @TestMetadata("withIndexed.kt") public void testWithIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); } } @@ -8401,6 +7413,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Diagnostics extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8409,6 +7425,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8417,14 +7437,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt6176.kt") public void testKt6176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); } } @@ -8432,6 +7455,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8440,68 +7467,62 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnObjects extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOnObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass1.kt") public void testInvokeOnClassObjectOfNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass2.kt") public void testInvokeOnClassObjectOfNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); } @TestMetadata("invokeOnEnum1.kt") public void testInvokeOnEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); } @TestMetadata("invokeOnEnum2.kt") public void testInvokeOnEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); } @TestMetadata("invokeOnImportedEnum1.kt") public void testInvokeOnImportedEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); } @TestMetadata("invokeOnImportedEnum2.kt") public void testInvokeOnImportedEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); } } } @@ -8510,230 +7531,197 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailRecursion extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailRecursion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); } @TestMetadata("defaultArgsOverridden.kt") public void testDefaultArgsOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); } @TestMetadata("extensionTailCall.kt") public void testExtensionTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); } @TestMetadata("functionWithNoTails.kt") public void testFunctionWithNoTails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); } @TestMetadata("functionWithNonTailRecursions.kt") public void testFunctionWithNonTailRecursions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); } @TestMetadata("functionWithoutAnnotation.kt") public void testFunctionWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); } @TestMetadata("insideElvis.kt") public void testInsideElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); } @TestMetadata("labeledThisReferences.kt") public void testLabeledThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); } @TestMetadata("loops.kt") public void testLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); } @TestMetadata("multilevelBlocks.kt") public void testMultilevelBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); } @TestMetadata("recursiveCallInLambda.kt") public void testRecursiveCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); } @TestMetadata("recursiveCallInLocalFunction.kt") public void testRecursiveCallInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); } @TestMetadata("recursiveInnerFunction.kt") public void testRecursiveInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); } @TestMetadata("returnIf.kt") public void testReturnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); } @TestMetadata("returnInCatch.kt") public void testReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); } @TestMetadata("returnInIfInFinally.kt") public void testReturnInIfInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); } @TestMetadata("simpleBlock.kt") public void testSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); } @TestMetadata("simpleReturnWithElse.kt") public void testSimpleReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); } @TestMetadata("tailRecursionInFinally.kt") public void testTailRecursionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); } @TestMetadata("thisReferences.kt") public void testThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); } @TestMetadata("unitBlocks.kt") public void testUnitBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); } @TestMetadata("whenWithCondition.kt") public void testWhenWithCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); } @TestMetadata("whenWithInRange.kt") public void testWhenWithInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); } @TestMetadata("whenWithoutCondition.kt") public void testWhenWithoutCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); } } } @@ -8742,14 +7730,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt4172.kt") public void testKt4172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); } } } @@ -8758,32 +7749,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Elvis extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/genericNull.kt"); } @TestMetadata("kt6694ExactAnnotationForElvis.kt") public void testKt6694ExactAnnotationForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); } @TestMetadata("nullNullOk.kt") public void testNullNullOk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/nullNullOk.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/nullNullOk.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/primitive.kt"); } } @@ -8791,16 +7782,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); } @TestMetadata("abstractNestedClass.kt") public void testAbstractNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -8809,346 +7802,294 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("asReturnExpression.kt") public void testAsReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/asReturnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/asReturnExpression.kt"); } @TestMetadata("classForEnumEntry.kt") public void testClassForEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); } @TestMetadata("companionObjectInEnum.kt") public void testCompanionObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass.kt") public void testDeepInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass2.kt") public void testDeepInnerClassInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyConstructor.kt"); } @TestMetadata("emptyEnumValuesValueOf.kt") public void testEmptyEnumValuesValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); } @TestMetadata("enumCompanionInit.kt") public void testEnumCompanionInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor1.kt") public void testEnumEntryReferenceFromInnerClassConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor2.kt") public void testEnumEntryReferenceFromInnerClassConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor3.kt") public void testEnumEntryReferenceFromInnerClassConstructor3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); } @TestMetadata("enumInheritedFromTrait.kt") public void testEnumInheritedFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); } @TestMetadata("enumShort.kt") public void testEnumShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumShort.kt"); } @TestMetadata("enumWithLambdaParameter.kt") public void testEnumWithLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); } @TestMetadata("inPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inPackage.kt"); } @TestMetadata("inclassobj.kt") public void testInclassobj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inclassobj.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inclassobj.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inner.kt"); } @TestMetadata("innerClassInEnumEntryClass.kt") public void testInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass.kt") public void testInnerClassMethodInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass2.kt") public void testInnerClassMethodInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); } @TestMetadata("innerWithExistingClassObject.kt") public void testInnerWithExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); } @TestMetadata("kt1119.kt") public void testKt1119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt1119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt1119.kt"); } @TestMetadata("kt18731.kt") public void testKt18731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt18731.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt18731.kt"); } @TestMetadata("kt20651.kt") public void testKt20651() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651.kt"); } @TestMetadata("kt20651_inlineLambda.kt") public void testKt20651_inlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); } @TestMetadata("kt20651a.kt") public void testKt20651a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651a.kt"); } @TestMetadata("kt20651b.kt") public void testKt20651b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651b.kt"); } @TestMetadata("kt2350.kt") public void testKt2350() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt2350.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt2350.kt"); } @TestMetadata("kt7257.kt") public void testKt7257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257.kt"); } @TestMetadata("kt7257_anonObjectInit.kt") public void testKt7257_anonObjectInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); } @TestMetadata("kt7257_anonObjectMethod.kt") public void testKt7257_anonObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); } @TestMetadata("kt7257_boundReference1.kt") public void testKt7257_boundReference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); } @TestMetadata("kt7257_boundReference2.kt") public void testKt7257_boundReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); } @TestMetadata("kt7257_boundReferenceWithImplicitReceiver.kt") public void testKt7257_boundReferenceWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); } @TestMetadata("kt7257_explicitReceiver.kt") public void testKt7257_explicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); } @TestMetadata("kt7257_fullyQualifiedReceiver.kt") public void testKt7257_fullyQualifiedReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); } @TestMetadata("kt7257_namedLocalFun.kt") public void testKt7257_namedLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); } @TestMetadata("kt7257_notInline.kt") public void testKt7257_notInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); } @TestMetadata("kt9711.kt") public void testKt9711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711.kt"); } @TestMetadata("kt9711_2.kt") public void testKt9711_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711_2.kt"); } @TestMetadata("manyDefaultParameters.kt") public void testManyDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); } @TestMetadata("modifierFlags.kt") public void testModifierFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/modifierFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); } @TestMetadata("objectInEnum.kt") public void testObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/objectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/objectInEnum.kt"); } @TestMetadata("ordinal.kt") public void testOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/ordinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/ordinal.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/simple.kt"); } @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/toString.kt"); } @TestMetadata("valueof.kt") public void testValueof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/valueof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/valueof.kt"); } @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultCtor extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultCtor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorWithDefaultArguments.kt") public void testConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); } @TestMetadata("constructorWithVararg.kt") public void testConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); } @TestMetadata("entryClassConstructorWithDefaultArguments.kt") public void testEntryClassConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); } @TestMetadata("entryClassConstructorWithVarargs.kt") public void testEntryClassConstructorWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); } @TestMetadata("secondaryConstructorWithDefaultArguments.kt") public void testSecondaryConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); } @TestMetadata("secondaryConstructorWithVararg.kt") public void testSecondaryConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); } } } @@ -9157,98 +8098,87 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Evaluate extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEvaluate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/char.kt"); } @TestMetadata("divide.kt") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/divide.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/divide.kt"); } @TestMetadata("intrinsics.kt") public void testIntrinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/intrinsics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/intrinsics.kt"); } @TestMetadata("kt9443.kt") public void testKt9443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/kt9443.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/kt9443.kt"); } @TestMetadata("maxValue.kt") public void testMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValue.kt"); } @TestMetadata("maxValueByte.kt") public void testMaxValueByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); } @TestMetadata("maxValueInt.kt") public void testMaxValueInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/mod.kt"); } @TestMetadata("multiply.kt") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/multiply.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/multiply.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/parenthesized.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/plus.kt"); } @TestMetadata("simpleCallBinary.kt") public void testSimpleCallBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); } } @@ -9256,20 +8186,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExclExcl extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExclExcl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/genericNull.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/primitive.kt"); } } @@ -9277,146 +8209,127 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunctions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("executionOrder.kt") public void testExecutionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); } @TestMetadata("kt1061.kt") public void testKt1061() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); } @TestMetadata("kt1249.kt") public void testKt1249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); } @TestMetadata("kt1290.kt") public void testKt1290() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); } @TestMetadata("kt13312.kt") public void testKt13312() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); } @TestMetadata("kt1776.kt") public void testKt1776() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); } @TestMetadata("kt1953.kt") public void testKt1953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); } @TestMetadata("kt1953_class.kt") public void testKt1953_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); } @TestMetadata("kt3285.kt") public void testKt3285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); } @TestMetadata("kt3298.kt") public void testKt3298() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); } @TestMetadata("kt3646.kt") public void testKt3646() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); } @TestMetadata("kt3969.kt") public void testKt3969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); } @TestMetadata("kt4228.kt") public void testKt4228() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); } @TestMetadata("kt475.kt") public void testKt475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); } @TestMetadata("kt5467.kt") public void testKt5467() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); } @TestMetadata("kt606.kt") public void testKt606() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); } @TestMetadata("kt865.kt") public void testKt865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); } @TestMetadata("shared.kt") public void testShared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/shared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/shared.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/simple.kt"); } @TestMetadata("thisMethodInObjectLiteral.kt") public void testThisMethodInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); } @TestMetadata("virtual.kt") public void testVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); } @TestMetadata("whenFail.kt") public void testWhenFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); } } @@ -9424,10 +8337,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionProperties extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); } public void testAllFilesPresentInExtensionProperties() throws Exception { @@ -9436,86 +8352,72 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("genericValForPrimitiveType.kt") public void testGenericValForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); } @TestMetadata("genericValMultipleUpperBounds.kt") public void testGenericValMultipleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); } @TestMetadata("genericVarForPrimitiveType.kt") public void testGenericVarForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClass.kt"); } @TestMetadata("inClassLongTypeInReceiver.kt") public void testInClassLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); } @TestMetadata("inClassWithGetter.kt") public void testInClassWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); } @TestMetadata("inClassWithPrivateGetter.kt") public void testInClassWithPrivateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); } @TestMetadata("inClassWithPrivateSetter.kt") public void testInClassWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); } @TestMetadata("inClassWithSetter.kt") public void testInClassWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); } @TestMetadata("kt9897.kt") public void testKt9897() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); } @TestMetadata("kt9897_topLevel.kt") public void testKt9897_topLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); } @TestMetadata("nonAbstractInInterface.kt") public void testNonAbstractInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); } @TestMetadata("topLevelLongTypeInReceiver.kt") public void testTopLevelLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); } } @@ -9523,26 +8425,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class External extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("jvmStaticExternal.kt") public void testJvmStaticExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); } @TestMetadata("jvmStaticExternalPrivate.kt") public void testJvmStaticExternalPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); } @TestMetadata("withDefaultArg.kt") public void testWithDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/withDefaultArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/withDefaultArg.kt"); } } @@ -9550,32 +8453,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverride extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFakeOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("diamondFunction.kt") public void testDiamondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/function.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); } } @@ -9583,26 +8486,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FieldRename extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFieldRename() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorAndClassObject.kt") public void testConstructorAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); } @TestMetadata("delegates.kt") public void testDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/delegates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/delegates.kt"); } @TestMetadata("genericPropertyWithItself.kt") public void testGenericPropertyWithItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); } } @@ -9610,74 +8514,67 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Finally extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("finallyAndFinally.kt") public void testFinallyAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); } @TestMetadata("kt3549.kt") public void testKt3549() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3549.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3549.kt"); } @TestMetadata("kt3706.kt") public void testKt3706() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3706.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3706.kt"); } @TestMetadata("kt3867.kt") public void testKt3867() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3867.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3867.kt"); } @TestMetadata("kt3874.kt") public void testKt3874() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3874.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3874.kt"); } @TestMetadata("kt3894.kt") public void testKt3894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3894.kt"); } @TestMetadata("kt4134.kt") public void testKt4134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt4134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt4134.kt"); } @TestMetadata("loopAndFinally.kt") public void testLoopAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/loopAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/loopAndFinally.kt"); } @TestMetadata("notChainCatch.kt") public void testNotChainCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/notChainCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/notChainCatch.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); } @TestMetadata("tryLoopTry.kt") public void testTryLoopTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryLoopTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryLoopTry.kt"); } } @@ -9685,64 +8582,64 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FullJdk extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFullJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charBuffer.kt") public void testCharBuffer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/charBuffer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/charBuffer.kt"); } @TestMetadata("ifInWhile.kt") public void testIfInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/ifInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/ifInWhile.kt"); } @TestMetadata("intCountDownLatchExtension.kt") public void testIntCountDownLatchExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/intCountDownLatchExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/intCountDownLatchExtension.kt"); } @TestMetadata("kt434.kt") public void testKt434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/kt434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/kt434.kt"); } @TestMetadata("platformTypeAssertionStackTrace.kt") public void testPlatformTypeAssertionStackTrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/platformTypeAssertionStackTrace.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/platformTypeAssertionStackTrace.kt"); } @TestMetadata("compiler/testData/codegen/box/fullJdk/native") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNative() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("nativePropertyAccessors.kt") public void testNativePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); } @TestMetadata("simpleNative.kt") public void testSimpleNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); } } @@ -9750,20 +8647,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt15112.kt") public void testKt15112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); } @TestMetadata("kt1770.kt") public void testKt1770() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); } } } @@ -9772,298 +8671,259 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coerceVoidToArray.kt") public void testCoerceVoidToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); } @TestMetadata("coerceVoidToObject.kt") public void testCoerceVoidToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); } @TestMetadata("defaultargs.kt") public void testDefaultargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs.kt"); } @TestMetadata("defaultargs1.kt") public void testDefaultargs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs1.kt"); } @TestMetadata("defaultargs2.kt") public void testDefaultargs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs2.kt"); } @TestMetadata("defaultargs3.kt") public void testDefaultargs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs3.kt"); } @TestMetadata("defaultargs4.kt") public void testDefaultargs4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs4.kt"); } @TestMetadata("defaultargs5.kt") public void testDefaultargs5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs5.kt"); } @TestMetadata("defaultargs6.kt") public void testDefaultargs6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs6.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs6.kt"); } @TestMetadata("defaultargs7.kt") public void testDefaultargs7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs7.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs7.kt"); } @TestMetadata("ea33909.kt") public void testEa33909() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/ea33909.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/ea33909.kt"); } @TestMetadata("fakeDescriptorWithSeveralOverridenOne.kt") public void testFakeDescriptorWithSeveralOverridenOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); } @TestMetadata("functionNtoString.kt") public void testFunctionNtoString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoString.kt"); } @TestMetadata("functionNtoStringGeneric.kt") public void testFunctionNtoStringGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); } @TestMetadata("functionNtoStringNoReflect.kt") public void testFunctionNtoStringNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); } @TestMetadata("kt1038.kt") public void testKt1038() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1038.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1038.kt"); } @TestMetadata("kt1199.kt") public void testKt1199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1199.kt"); } @TestMetadata("kt1413.kt") public void testKt1413() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1413.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1413.kt"); } @TestMetadata("kt1649_1.kt") public void testKt1649_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_1.kt"); } @TestMetadata("kt1649_2.kt") public void testKt1649_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_2.kt"); } @TestMetadata("kt1739.kt") public void testKt1739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1739.kt"); } @TestMetadata("kt2270.kt") public void testKt2270() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2270.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2270.kt"); } @TestMetadata("kt2271.kt") public void testKt2271() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2271.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2271.kt"); } @TestMetadata("kt2280.kt") public void testKt2280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2280.kt"); } @TestMetadata("kt2481.kt") public void testKt2481() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2481.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2481.kt"); } @TestMetadata("kt2716.kt") public void testKt2716() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2716.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2716.kt"); } @TestMetadata("kt2739.kt") public void testKt2739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2739.kt"); } @TestMetadata("kt2929.kt") public void testKt2929() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2929.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2929.kt"); } @TestMetadata("kt3214.kt") public void testKt3214() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3214.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3214.kt"); } @TestMetadata("kt3313.kt") public void testKt3313() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3313.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3313.kt"); } @TestMetadata("kt3573.kt") public void testKt3573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3573.kt"); } @TestMetadata("kt3724.kt") public void testKt3724() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3724.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3724.kt"); } @TestMetadata("kt395.kt") public void testKt395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt395.kt"); } @TestMetadata("kt785.kt") public void testKt785() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt785.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt785.kt"); } @TestMetadata("kt873.kt") public void testKt873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt873.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunction.kt"); } @TestMetadata("localReturnInsideFunctionExpression.kt") public void testLocalReturnInsideFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); } @TestMetadata("prefixRecursiveCall.kt") public void testPrefixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); } @TestMetadata("recursiveCompareTo.kt") public void testRecursiveCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); } @TestMetadata("recursiveIncrementCall.kt") public void testRecursiveIncrementCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); } @TestMetadata("functionExpressionWithThisReference.kt") public void testFunctionExpressionWithThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); } @TestMetadata("functionLiteralExpression.kt") public void testFunctionLiteralExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); } } @@ -10071,98 +8931,87 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("castFunctionToExtension.kt") public void testCastFunctionToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); } @TestMetadata("extensionInvokeOnExpr.kt") public void testExtensionInvokeOnExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); } @TestMetadata("implicitInvokeInCompanionObjectWithFunctionalArgument.kt") public void testImplicitInvokeInCompanionObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeWithFunctionLiteralArgument.kt") public void testImplicitInvokeWithFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invoke.kt"); } @TestMetadata("invokeOnExprByConvention.kt") public void testInvokeOnExprByConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); } @TestMetadata("invokeOnSyntheticProperty.kt") public void testInvokeOnSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); } @TestMetadata("kt3189.kt") public void testKt3189() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); } @TestMetadata("kt3190.kt") public void testKt3190() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); } @TestMetadata("kt3297.kt") public void testKt3297() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); } @TestMetadata("kt3450getAndInvoke.kt") public void testKt3450getAndInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); } @TestMetadata("kt3631invokeOnString.kt") public void testKt3631invokeOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); } @TestMetadata("kt3772.kt") public void testKt3772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); } @TestMetadata("kt3821invokeOnThis.kt") public void testKt3821invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); } @TestMetadata("kt3822invokeOnThis.kt") public void testKt3822invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); } } @@ -10170,146 +9019,127 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callInlineLocalInLambda.kt") public void testCallInlineLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); } @TestMetadata("definedWithinLambda.kt") public void testDefinedWithinLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); } @TestMetadata("definedWithinLambdaInnerUsage1.kt") public void testDefinedWithinLambdaInnerUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); } @TestMetadata("definedWithinLambdaInnerUsage2.kt") public void testDefinedWithinLambdaInnerUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); } @TestMetadata("kt2895.kt") public void testKt2895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); } @TestMetadata("kt3308.kt") public void testKt3308() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); } @TestMetadata("kt3978.kt") public void testKt3978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); } @TestMetadata("kt4119.kt") public void testKt4119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); } @TestMetadata("kt4119_2.kt") public void testKt4119_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); } @TestMetadata("kt4514.kt") public void testKt4514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); } @TestMetadata("kt4777.kt") public void testKt4777() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); } @TestMetadata("kt4783.kt") public void testKt4783() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); } @TestMetadata("kt4784.kt") public void testKt4784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); } @TestMetadata("kt4989.kt") public void testKt4989() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); } @TestMetadata("localExtensionOnNullableParameter.kt") public void testLocalExtensionOnNullableParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); } @TestMetadata("localFunctionInConstructor.kt") public void testLocalFunctionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); } @TestMetadata("localFunctionVsLocalVariable.kt") public void testLocalFunctionVsLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); } @TestMetadata("overloadedLocalFunWithoutClosure.kt") public void testOverloadedLocalFunWithoutClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); } @TestMetadata("overloadedLocalFunction.kt") public void testOverloadedLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); } @TestMetadata("overloadedLocalFunction1.kt") public void testOverloadedLocalFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); } @TestMetadata("overloadedLocalFunction2.kt") public void testOverloadedLocalFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); } @TestMetadata("overloadedLocalFunction3.kt") public void testOverloadedLocalFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); } @TestMetadata("parameterAsDefaultValue.kt") public void testParameterAsDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); } } } @@ -10318,44 +9148,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashPMap extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInHashPMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/empty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/empty.kt"); } @TestMetadata("manyNumbers.kt") public void testManyNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); } @TestMetadata("rewriteWithDifferent.kt") public void testRewriteWithDifferent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); } @TestMetadata("rewriteWithEqual.kt") public void testRewriteWithEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); } @TestMetadata("simplePlusGet.kt") public void testSimplePlusGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); } @TestMetadata("simplePlusMinus.kt") public void testSimplePlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); } } @@ -10363,338 +9191,287 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ieee754 extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIeee754() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anyToReal.kt") public void testAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/anyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); } @TestMetadata("asComparableToDouble_properIeeeComparisons.kt") public void testAsComparableToDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); } @TestMetadata("comparableToTWithT_properIeeeComparisons.kt") public void testComparableToTWithT_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); } @TestMetadata("comparableTypeCast.kt") public void testComparableTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/dataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/dataClass.kt"); } @TestMetadata("differentTypesComparison.kt") public void testDifferentTypesComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); } @TestMetadata("equalsDouble_properIeeeComparisons.kt") public void testEqualsDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsFloat.kt") public void testEqualsFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); } @TestMetadata("equalsFloat_properIeeeComparisons.kt") public void testEqualsFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); } @TestMetadata("equalsNaN.kt") public void testEqualsNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); } @TestMetadata("equalsNaN_properIeeeComparisons.kt") public void testEqualsNaN_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableDouble.kt") public void testEqualsNullableDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); } @TestMetadata("equalsNullableDouble_properIeeeComparisons.kt") public void testEqualsNullableDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableFloat.kt") public void testEqualsNullableFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); } @TestMetadata("equalsNullableFloat_properIeeeComparisons.kt") public void testEqualsNullableFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); } @TestMetadata("explicitCompareCall.kt") public void testExplicitCompareCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); } @TestMetadata("greaterDouble_properIeeeComparisons.kt") public void testGreaterDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); } @TestMetadata("greaterFloat.kt") public void testGreaterFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); } @TestMetadata("greaterFloat_properIeeeComparisons.kt") public void testGreaterFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/inline.kt"); } @TestMetadata("lessDouble.kt") public void testLessDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt"); } @TestMetadata("lessDouble_properIeeeComparisons.kt") public void testLessDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); } @TestMetadata("lessFloat.kt") public void testLessFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat.kt"); } @TestMetadata("lessFloat_properIeeeComparisons.kt") public void testLessFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); } @TestMetadata("nullableAnyToReal.kt") public void testNullableAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); } @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); } @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } @TestMetadata("nullableDoubleNotEquals10.kt") public void testNullableDoubleNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); } @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } @TestMetadata("nullableFloatEquals10.kt") public void testNullableFloatEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); } @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } @TestMetadata("nullableFloatNotEquals10.kt") public void testNullableFloatNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); } @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/safeCall.kt"); } @TestMetadata("smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt") public void testSmartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes.kt") public void testSmartCastToDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion.kt") public void testSmartCastToDifferentTypesWithNumericPromotion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt") public void testSmartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes_properIeeeComparisons.kt") public void testSmartCastToDifferentTypes_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDoubleAndComparableToDouble.kt") public void testSmartCastToDoubleAndComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when.kt"); } @TestMetadata("when10.kt") public void testWhen10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10.kt"); } @TestMetadata("when10_properIeeeComparisons.kt") public void testWhen10_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); } @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); } @TestMetadata("whenNoSubject_properIeeeComparisons.kt") public void testWhenNoSubject_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); } @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } @TestMetadata("whenNullableSmartCast10.kt") public void testWhenNullableSmartCast10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); } @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } } @@ -10702,140 +9479,122 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Increment extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIncrement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayElement.kt") public void testArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/arrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/arrayElement.kt"); } @TestMetadata("assignPlusOnSmartCast.kt") public void testAssignPlusOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); } @TestMetadata("augmentedAssignmentWithComplexRhs.kt") public void testAugmentedAssignmentWithComplexRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); } @TestMetadata("classNaryGetSet.kt") public void testClassNaryGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); } @TestMetadata("classWithGetSet.kt") public void testClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classWithGetSet.kt"); } @TestMetadata("extOnLong.kt") public void testExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/extOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/extOnLong.kt"); } @TestMetadata("genericClassWithGetSet.kt") public void testGenericClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); } @TestMetadata("memberExtOnLong.kt") public void testMemberExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); } @TestMetadata("mutableListElement.kt") public void testMutableListElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/mutableListElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/mutableListElement.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/nullable.kt"); } @TestMetadata("postfixIncrementDoubleSmartCast.kt") public void testPostfixIncrementDoubleSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); } @TestMetadata("postfixIncrementOnClass.kt") public void testPostfixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); } @TestMetadata("postfixIncrementOnClassSmartCast.kt") public void testPostfixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); } @TestMetadata("postfixIncrementOnShortSmartCast.kt") public void testPostfixIncrementOnShortSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); } @TestMetadata("postfixIncrementOnSmartCast.kt") public void testPostfixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); } @TestMetadata("postfixNullableClassIncrement.kt") public void testPostfixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); } @TestMetadata("postfixNullableIncrement.kt") public void testPostfixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); } @TestMetadata("prefixIncrementOnClass.kt") public void testPrefixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); } @TestMetadata("prefixIncrementOnClassSmartCast.kt") public void testPrefixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); } @TestMetadata("prefixIncrementOnSmartCast.kt") public void testPrefixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); } @TestMetadata("prefixNullableClassIncrement.kt") public void testPrefixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); } @TestMetadata("prefixNullableIncrement.kt") public void testPrefixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); } } @@ -10843,176 +9602,152 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); } @TestMetadata("boxUnboxOfInlineClassForCapturedVars.kt") public void testBoxUnboxOfInlineClassForCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); } @TestMetadata("callComputablePropertyInsideInlineClass.kt") public void testCallComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); } @TestMetadata("checkBoxUnboxOfArgumentsOnInlinedFunctions.kt") public void testCheckBoxUnboxOfArgumentsOnInlinedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); } @TestMetadata("checkBoxingAfterAssertionOperator.kt") public void testCheckBoxingAfterAssertionOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); } @TestMetadata("checkBoxingForNonLocalAndLabeledReturns.kt") public void testCheckBoxingForNonLocalAndLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); } @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); } @TestMetadata("checkBoxingOnFunctionCalls.kt") public void testCheckBoxingOnFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); } @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") public void testCheckBoxingOnLocalVariableAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); } @TestMetadata("checkCallingMembersInsideInlineClass.kt") public void testCheckCallingMembersInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); } @TestMetadata("checkCastToInlineClass.kt") public void testCheckCastToInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); } @TestMetadata("checkForInstanceOfInlineClass.kt") public void testCheckForInstanceOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); } @TestMetadata("checkLambdaWithInlineClassesInFunctionalType.kt") public void testCheckLambdaWithInlineClassesInFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); } @TestMetadata("checkUnboxingResultFromTypeVariable.kt") public void testCheckUnboxingResultFromTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); } @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); } @TestMetadata("createInlineClassInArgumentPosition.kt") public void testCreateInlineClassInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); } @TestMetadata("emptyConstructorForInlineClass.kt") public void testEmptyConstructorForInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); } @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") public void testInlineClassAsLastExpressionInInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); } @TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt") public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); } @TestMetadata("passInlineClassAsVararg.kt") public void testPassInlineClassAsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); } @TestMetadata("passInlineClassWithSpreadOperatorToVarargs.kt") public void testPassInlineClassWithSpreadOperatorToVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); } @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyInsideInlineClass.kt") public void testReferToUnderlyingPropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyOfInlineClass.kt") public void testReferToUnderlyingPropertyOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); } @TestMetadata("UIntArraySortExample.kt") public void testUIntArraySortExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); } @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); } @TestMetadata("useInlineFunctionInsideInlineClass.kt") public void testUseInlineFunctionInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); } @TestMetadata("useThisInsideInlineClass.kt") public void testUseThisInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); } } @@ -11020,280 +9755,244 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerNested extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInnerNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("createNestedClass.kt") public void testCreateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); } @TestMetadata("createdNestedInOuterMember.kt") public void testCreatedNestedInOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionFun.kt"); } @TestMetadata("extensionToNested.kt") public void testExtensionToNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); } @TestMetadata("importNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); } @TestMetadata("innerGenericClassFromJava.kt") public void testInnerGenericClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt"); } @TestMetadata("innerJavaClass.kt") public void testInnerJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerJavaClass.kt"); } @TestMetadata("innerLabeledThis.kt") public void testInnerLabeledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); } @TestMetadata("innerSimple.kt") public void testInnerSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerSimple.kt"); } @TestMetadata("kt3132.kt") public void testKt3132() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3132.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3132.kt"); } @TestMetadata("kt3927.kt") public void testKt3927() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3927.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3927.kt"); } @TestMetadata("kt5363.kt") public void testKt5363() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt5363.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt5363.kt"); } @TestMetadata("kt6804.kt") public void testKt6804() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt6804.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt6804.kt"); } @TestMetadata("nestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); } @TestMetadata("nestedClassObject.kt") public void testNestedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); } @TestMetadata("nestedEnumConstant.kt") public void testNestedEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); } @TestMetadata("nestedGeneric.kt") public void testNestedGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); } @TestMetadata("nestedInPackage.kt") public void testNestedInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); } @TestMetadata("nestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); } @TestMetadata("nestedSimple.kt") public void testNestedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); } @TestMetadata("passingOuterRef.kt") public void testPassingOuterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); } @TestMetadata("protectedNestedClass.kt") public void testProtectedNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); } @TestMetadata("protectedNestedClassFromJava.kt") public void testProtectedNestedClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt"); } @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructorCall extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("deepInnerHierarchy.kt") public void testDeepInnerHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); } @TestMetadata("deepLocalHierarchy.kt") public void testDeepLocalHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); } @TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt") public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); } @TestMetadata("innerExtendsInnerWithProperOuterCapture.kt") public void testInnerExtendsInnerWithProperOuterCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); } @TestMetadata("innerExtendsOuter.kt") public void testInnerExtendsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt"); } @TestMetadata("kt11833_1.kt") public void testKt11833_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); } @TestMetadata("kt11833_2.kt") public void testKt11833_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); } @TestMetadata("localClassOuterDiffersFromInnerOuter.kt") public void testLocalClassOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); } @TestMetadata("localExtendsInner.kt") public void testLocalExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); } @TestMetadata("localExtendsLocalWithClosure.kt") public void testLocalExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); } @TestMetadata("localWithClosureExtendsLocalWithClosure.kt") public void testLocalWithClosureExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); } @TestMetadata("objectExtendsClassDefaultArgument.kt") public void testObjectExtendsClassDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); } @TestMetadata("objectExtendsClassVararg.kt") public void testObjectExtendsClassVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); } @TestMetadata("objectExtendsInnerDefaultArgument.kt") public void testObjectExtendsInnerDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); } @TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt") public void testObjectExtendsInnerOfLocalVarargAndDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); } @TestMetadata("objectExtendsInnerOfLocalWithCapture.kt") public void testObjectExtendsInnerOfLocalWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); } @TestMetadata("objectExtendsLocalCaptureInSuperCall.kt") public void testObjectExtendsLocalCaptureInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); } @TestMetadata("objectExtendsLocalWithClosure.kt") public void testObjectExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); } @TestMetadata("objectOuterDiffersFromInnerOuter.kt") public void testObjectOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); } } } @@ -11302,6 +10001,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Instructions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInstructions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -11310,20 +10013,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Swap extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSwap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("swapRefToSharedVarInt.kt") public void testSwapRefToSharedVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); } @TestMetadata("swapRefToSharedVarLong.kt") public void testSwapRefToSharedVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); } } } @@ -11332,140 +10037,122 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intrinsics extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charToInt.kt") public void testCharToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/charToInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/charToInt.kt"); } @TestMetadata("defaultObjectMapping.kt") public void testDefaultObjectMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); } @TestMetadata("ea35953.kt") public void testEa35953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/ea35953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/ea35953.kt"); } @TestMetadata("incWithLabel.kt") public void testIncWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); } @TestMetadata("kt10131.kt") public void testKt10131() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131.kt"); } @TestMetadata("kt10131a.kt") public void testKt10131a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); } @TestMetadata("kt12125.kt") public void testKt12125() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125.kt"); } @TestMetadata("kt12125_2.kt") public void testKt12125_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); } @TestMetadata("kt12125_inc.kt") public void testKt12125_inc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); } @TestMetadata("kt12125_inc_2.kt") public void testKt12125_inc_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); } @TestMetadata("kt5937.kt") public void testKt5937() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt5937.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt5937.kt"); } @TestMetadata("kt8666.kt") public void testKt8666() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt8666.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt8666.kt"); } @TestMetadata("longRangeWithExplicitDot.kt") public void testLongRangeWithExplicitDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); } @TestMetadata("prefixIncDec.kt") public void testPrefixIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); } @TestMetadata("rangeFromCollection.kt") public void testRangeFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); } @TestMetadata("stringFromCollection.kt") public void testStringFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwable.kt"); } @TestMetadata("throwableCallableReference.kt") public void testThrowableCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); } @TestMetadata("throwableParamOrder.kt") public void testThrowableParamOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); } @TestMetadata("tostring.kt") public void testTostring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/tostring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/tostring.kt"); } } @@ -11473,46 +10160,49 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaInterop extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJavaInterop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); } @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("allWildcardsOnClass.kt") public void testAllWildcardsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); } @TestMetadata("covariantOverrideWithDeclarationSiteProjection.kt") public void testCovariantOverrideWithDeclarationSiteProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); } @TestMetadata("invariantArgumentsNoWildcard.kt") public void testInvariantArgumentsNoWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); } } @@ -11520,136 +10210,124 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullAssertions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNotNullAssertions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); } @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); } @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); } @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnhancedNullability extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnhancedNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("inFunctionWithExpressionBody.kt") public void testInFunctionWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); } @TestMetadata("inFunctionWithExpressionBodyWithJavaGeneric.kt") public void testInFunctionWithExpressionBodyWithJavaGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); } @TestMetadata("inLocalFunctionWithExpressionBody.kt") public void testInLocalFunctionWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); } @TestMetadata("inLocalVariableInitializer.kt") public void testInLocalVariableInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); } @TestMetadata("inMemberPropertyInitializer.kt") public void testInMemberPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); } @TestMetadata("inPropertyGetterWithExpressionBody.kt") public void testInPropertyGetterWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); } @TestMetadata("inTopLevelPropertyInitializer.kt") public void testInTopLevelPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); } } } @@ -11658,44 +10336,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectMethods extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjectMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("cloneCallsConstructor.kt") public void testCloneCallsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); } @TestMetadata("cloneCallsSuper.kt") public void testCloneCallsSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); } @TestMetadata("cloneCallsSuperAndModifies.kt") public void testCloneCallsSuperAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); } @TestMetadata("cloneHashSet.kt") public void testCloneHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt"); } @TestMetadata("cloneHierarchy.kt") public void testCloneHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHierarchy.kt"); } @TestMetadata("cloneableClassWithoutClone.kt") public void testCloneableClassWithoutClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); } } } @@ -11704,32 +10380,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jdk extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/hashMap.kt"); } @TestMetadata("iteratingOverHashMap.kt") public void testIteratingOverHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } @TestMetadata("kt1397.kt") public void testKt1397() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/kt1397.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } } @@ -11737,92 +10413,82 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmField extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureClassFields.kt") public void testCaptureClassFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); } @TestMetadata("capturePackageFields.kt") public void testCapturePackageFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); } @TestMetadata("checkNoAccessors.kt") public void testCheckNoAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); } @TestMetadata("classFieldReference.kt") public void testClassFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); } @TestMetadata("classFieldReflection.kt") public void testClassFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); } @TestMetadata("constructorProperty.kt") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); } @TestMetadata("publicField.kt") public void testPublicField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/publicField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/publicField.kt"); } @TestMetadata("simpleMemberProperty.kt") public void testSimpleMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/superCall.kt"); } @TestMetadata("superCall2.kt") public void testSuperCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/superCall2.kt"); } @TestMetadata("topLevelFieldReference.kt") public void testTopLevelFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); } @TestMetadata("topLevelFieldReflection.kt") public void testTopLevelFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/visibility.kt"); } @TestMetadata("writeFieldReference.kt") public void testWriteFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); } } @@ -11830,100 +10496,94 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmName extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/callableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/callableReference.kt"); } @TestMetadata("clashingErasure.kt") public void testClashingErasure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/classMembers.kt"); } @TestMetadata("fakeJvmNameInJava.kt") public void testFakeJvmNameInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/functionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/functionName.kt"); } @TestMetadata("multifileClass.kt") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClass.kt"); } @TestMetadata("multifileClassWithLocalClass.kt") public void testMultifileClassWithLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); } @TestMetadata("multifileClassWithLocalGeneric.kt") public void testMultifileClassWithLocalGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); } @TestMetadata("propertyAccessorsUseSite.kt") public void testPropertyAccessorsUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); } @TestMetadata("propertyName.kt") public void testPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/propertyName.kt"); } @TestMetadata("renamedFileClass.kt") public void testRenamedFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); } @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FileFacades extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFileFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentFiles.kt") public void testDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); } @TestMetadata("javaAnnotationOnFileFacade.kt") public void testJavaAnnotationOnFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); } } } @@ -11932,98 +10592,87 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOverloads extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); } @TestMetadata("defaultsNotAtEnd.kt") public void testDefaultsNotAtEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); } @TestMetadata("doubleParameters.kt") public void testDoubleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/generics.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); } @TestMetadata("multipleDefaultParameters.kt") public void testMultipleDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); } @TestMetadata("noRedundantVarargs.kt") public void testNoRedundantVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/noRedundantVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/noRedundantVarargs.kt"); } @TestMetadata("nonDefaultParameter.kt") public void testNonDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/simple.kt"); } @TestMetadata("simpleJavaCall.kt") public void testSimpleJavaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); } } @@ -12031,32 +10680,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("metadataField.kt") public void testMetadataField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/metadataField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/metadataField.kt"); } @TestMetadata("rootPackage.kt") public void testRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/rootPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/rootPackage.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/simple.kt"); } @TestMetadata("withJvmName.kt") public void testWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/withJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/withJvmName.kt"); } } @@ -12064,164 +10713,142 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/annotations.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/closure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/closure.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); } @TestMetadata("convention.kt") public void testConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/convention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/convention.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/default.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/default.kt"); } @TestMetadata("enumCompanion.kt") public void testEnumCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); } @TestMetadata("explicitObject.kt") public void testExplicitObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); } @TestMetadata("funAccess.kt") public void testFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); } @TestMetadata("importStaticMemberFromObject.kt") public void testImportStaticMemberFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/inline.kt"); } @TestMetadata("inlinePropertyAccessors.kt") public void testInlinePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); } @TestMetadata("kt21246.kt") public void testKt21246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt21246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt21246.kt"); } @TestMetadata("kt21246a.kt") public void testKt21246a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt21246a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt21246a.kt"); } @TestMetadata("kt9897_static.kt") public void testKt9897_static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/object.kt"); } @TestMetadata("postfixInc.kt") public void testPostfixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); } @TestMetadata("prefixInc.kt") public void testPrefixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); } @TestMetadata("privateMethod.kt") public void testPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); } @TestMetadata("propertyAccessorsCompanion.kt") public void testPropertyAccessorsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); } @TestMetadata("propertyAccessorsObject.kt") public void testPropertyAccessorsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); } @TestMetadata("propertyAsDefault.kt") public void testPropertyAsDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); } @TestMetadata("propertyGetterDelegatesToAnother.kt") public void testPropertyGetterDelegatesToAnother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyGetterDelegatesToAnother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyGetterDelegatesToAnother.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/simple.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); } } @@ -12229,56 +10856,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("controlLabelClashesWithFuncitonName.kt") public void testControlLabelClashesWithFuncitonName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); } @TestMetadata("infixCallLabelling.kt") public void testInfixCallLabelling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); } @TestMetadata("labeledDeclarations.kt") public void testLabeledDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessor.kt"); } @TestMetadata("propertyAccessorFunctionLiteral.kt") public void testPropertyAccessorFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); } @TestMetadata("propertyAccessorInnerExtensionFun.kt") public void testPropertyAccessorInnerExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); } @TestMetadata("propertyAccessorObject.kt") public void testPropertyAccessorObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); } @TestMetadata("propertyInClassAccessor.kt") public void testPropertyInClassAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); } } @@ -12286,124 +10909,114 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LazyCodegen extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLazyCodegen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("exceptionInFieldInitializer.kt") public void testExceptionInFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); } @TestMetadata("increment.kt") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/increment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/increment.kt"); } @TestMetadata("safeAssign.kt") public void testSafeAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); } @TestMetadata("safeAssignComplex.kt") public void testSafeAssignComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); } @TestMetadata("safeCallAndArray.kt") public void testSafeCallAndArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/toString.kt"); } @TestMetadata("tryCatchExpression.kt") public void testTryCatchExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/when.kt"); } @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("negateConstantCompare.kt") public void testNegateConstantCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); } @TestMetadata("negateFalse.kt") public void testNegateFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); } @TestMetadata("negateFalseVar.kt") public void testNegateFalseVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); } @TestMetadata("negateFalseVarChain.kt") public void testNegateFalseVarChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); } @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); } @TestMetadata("negateObjectComp2.kt") public void testNegateObjectComp2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); } @TestMetadata("negateTrue.kt") public void testNegateTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); } @TestMetadata("negateTrueVar.kt") public void testNegateTrueVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); } @TestMetadata("noOptimization.kt") public void testNoOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); } } } @@ -12412,233 +11025,172 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalClasses extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectInInitializer.kt") public void testAnonymousObjectInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); } @TestMetadata("anonymousObjectInParameterInitializer.kt") public void testAnonymousObjectInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); } @TestMetadata("closureOfInnerLocalClass.kt") public void testClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); } @TestMetadata("closureOfLambdaInLocalClass.kt") public void testClosureOfLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); } @TestMetadata("closureWithSelfInstantiation.kt") public void testClosureWithSelfInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); } @TestMetadata("inExtensionFunction.kt") public void testInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); } @TestMetadata("inExtensionProperty.kt") public void testInExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); } @TestMetadata("inLocalExtensionFunction.kt") public void testInLocalExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); } @TestMetadata("inLocalExtensionProperty.kt") public void testInLocalExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); } @TestMetadata("innerClassInLocalClass.kt") public void testInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); } @TestMetadata("innerOfLocalCaptureExtensionReceiver.kt") public void testInnerOfLocalCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); } @TestMetadata("kt2700.kt") public void testKt2700() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2700.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2700.kt"); } @TestMetadata("kt2873.kt") public void testKt2873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2873.kt"); } @TestMetadata("kt3210.kt") public void testKt3210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3210.kt"); } @TestMetadata("kt3389.kt") public void testKt3389() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3389.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3389.kt"); } @TestMetadata("kt3584.kt") public void testKt3584() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3584.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3584.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt4174.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClass.kt"); } @TestMetadata("localClassCaptureExtensionReceiver.kt") public void testLocalClassCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); } @TestMetadata("localClassInInitializer.kt") public void testLocalClassInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); } @TestMetadata("localClassInParameterInitializer.kt") public void testLocalClassInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); } @TestMetadata("localDataClass.kt") public void testLocalDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt"); } @TestMetadata("localExtendsInnerAndReferencesOuterMember.kt") public void testLocalExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); } @TestMetadata("noclosure.kt") public void testNoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/noclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/noclosure.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/object.kt"); } @TestMetadata("ownClosureOfInnerLocalClass.kt") public void testOwnClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass1.kt") public void testRecaptureVarCapturedInLocalClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass2.kt") public void testRecaptureVarCapturedInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass3.kt") public void testRecaptureVarCapturedInLocalClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); } @TestMetadata("subclassingExtensionReceiverClass.kt") public void testSubclassingExtensionReceiverClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); } @TestMetadata("withclosure.kt") public void testWithclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/withclosure.kt"); } } @@ -12646,56 +11198,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mangling extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMangling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/field.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/fun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/fun.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internal.kt"); } @TestMetadata("internalOverride.kt") public void testInternalOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverride.kt"); } @TestMetadata("internalOverrideSuperCall.kt") public void testInternalOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); } @TestMetadata("noOverrideWithJava.kt") public void testNoOverrideWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); } @TestMetadata("publicOverride.kt") public void testPublicOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverride.kt"); } @TestMetadata("publicOverrideSuperCall.kt") public void testPublicOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); } } @@ -12703,162 +11251,151 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ComplexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); } @TestMetadata("component.kt") public void testComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/component.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/component.kt"); } @TestMetadata("kt9828_hashMap.kt") public void testKt9828_hashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); } @TestMetadata("returnInElvis.kt") public void testReturnInElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); } @TestMetadata("SimpleVals.kt") public void testSimpleVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); } @TestMetadata("SimpleValsExtensions.kt") public void testSimpleValsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); } @TestMetadata("SimpleVarsExtensions.kt") public void testSimpleVarsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); } @TestMetadata("ValCapturedInFunctionLiteral.kt") public void testValCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); } @TestMetadata("ValCapturedInLocalFunction.kt") public void testValCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); } @TestMetadata("ValCapturedInObjectLiteral.kt") public void testValCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); } @TestMetadata("VarCapturedInFunctionLiteral.kt") public void testVarCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); } @TestMetadata("VarCapturedInLocalFunction.kt") public void testVarCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); } @TestMetadata("VarCapturedInObjectLiteral.kt") public void testVarCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForIterator extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LongIterator extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLongIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -12867,120 +11404,116 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForRange extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); } @TestMetadata("UnderscoreNamesDontCallComponent.kt") public void testUnderscoreNamesDontCallComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -12988,32 +11521,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13022,70 +11555,69 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeToWithDot extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -13093,32 +11625,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13127,32 +11659,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -13160,32 +11692,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13195,166 +11727,149 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callMultifileClassMemberFromOtherPackage.kt") public void testCallMultifileClassMemberFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/callMultifileClassMemberFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/callMultifileClassMemberFromOtherPackage.kt"); } @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/callsToMultifileClassFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/callsToMultifileClassFromOtherPackage.kt"); } @TestMetadata("constPropertyReferenceFromMultifileClass.kt") public void testConstPropertyReferenceFromMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/constPropertyReferenceFromMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/constPropertyReferenceFromMultifileClass.kt"); } @TestMetadata("inlineMultifileClassMemberFromOtherPackage.kt") public void testInlineMultifileClassMemberFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt"); } @TestMetadata("kt16077.kt") public void testKt16077() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/kt16077.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/kt16077.kt"); } @TestMetadata("multifileClassPartsInitialization.kt") public void testMultifileClassPartsInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassPartsInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassPartsInitialization.kt"); } @TestMetadata("multifileClassWith2Files.kt") public void testMultifileClassWith2Files() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWith2Files.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWith2Files.kt"); } @TestMetadata("multifileClassWithCrossCall.kt") public void testMultifileClassWithCrossCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWithCrossCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWithCrossCall.kt"); } @TestMetadata("multifileClassWithPrivate.kt") public void testMultifileClassWithPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWithPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWithPrivate.kt"); } @TestMetadata("privateConstVal.kt") public void testPrivateConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/privateConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/privateConstVal.kt"); } @TestMetadata("samePartNameDifferentFacades.kt") public void testSamePartNameDifferentFacades() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt"); } @TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimized extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableRefToFun.kt") public void testCallableRefToFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToFun.kt"); } @TestMetadata("callableRefToInternalValInline.kt") public void testCallableRefToInternalValInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToInternalValInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToInternalValInline.kt"); } @TestMetadata("callableRefToPrivateVal.kt") public void testCallableRefToPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateVal.kt"); } @TestMetadata("callableRefToVal.kt") public void testCallableRefToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToVal.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt"); } @TestMetadata("deferredStaticInitialization.kt") public void testDeferredStaticInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/deferredStaticInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/deferredStaticInitialization.kt"); } @TestMetadata("delegatedVal.kt") public void testDelegatedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/delegatedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/delegatedVal.kt"); } @TestMetadata("initializePrivateVal.kt") public void testInitializePrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/initializePrivateVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/initializePrivateVal.kt"); } @TestMetadata("initializePublicVal.kt") public void testInitializePublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/initializePublicVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/initializePublicVal.kt"); } @TestMetadata("overlappingFuns.kt") public void testOverlappingFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt"); } @TestMetadata("overlappingVals.kt") public void testOverlappingVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/overlappingVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingVals.kt"); } @TestMetadata("valAccessFromInlineFunCalledFromJava.kt") public void testValAccessFromInlineFunCalledFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlineFunCalledFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlineFunCalledFromJava.kt"); } @TestMetadata("valAccessFromInlinedToDifferentPackage.kt") public void testValAccessFromInlinedToDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlinedToDifferentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlinedToDifferentPackage.kt"); } @TestMetadata("valWithAccessor.kt") public void testValWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valWithAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valWithAccessor.kt"); } } } @@ -13363,6 +11878,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -13371,62 +11890,57 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); } @TestMetadata("inheritedFromCommonClass.kt") public void testInheritedFromCommonClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); } @TestMetadata("inheritedFromExpectedClass.kt") public void testInheritedFromExpectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); } @TestMetadata("inheritedFromExpectedMethod.kt") public void testInheritedFromExpectedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); } @TestMetadata("inheritedInExpectedDeclarations.kt") public void testInheritedInExpectedDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); } @TestMetadata("inlineFunctionWithDefaultLambda.kt") public void testInlineFunctionWithDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); } @TestMetadata("kt23239.kt") public void testKt23239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); } } } @@ -13435,44 +11949,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt6895.kt") public void testKt6895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt6895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt6895.kt"); } @TestMetadata("kt9644let.kt") public void testKt9644let() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); } @TestMetadata("localReturnInsideProperty.kt") public void testLocalReturnInsideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); } @TestMetadata("returnInsideTwoLambdas.kt") public void testReturnInsideTwoLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/use.kt"); } @TestMetadata("useWithException.kt") public void testUseWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); } } @@ -13480,32 +11992,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullCheckOptimization extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNullCheckOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("isNullable.kt") public void testIsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); } @TestMetadata("kt22410.kt") public void testKt22410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); } @TestMetadata("kt7774.kt") public void testKt7774() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); } @TestMetadata("trivialInstanceOf.kt") public void testTrivialInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); } } @@ -13513,14 +12025,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectIntrinsics extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjectIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); } } @@ -13528,410 +12043,347 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); } @TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt") public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); } @TestMetadata("classCallsProtectedInheritedByCompanion.kt") public void testClassCallsProtectedInheritedByCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); } @TestMetadata("classCompanion.kt") public void testClassCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCompanion.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToObjectFromCall.kt") public void testCompoundAssignmentToObjectFromCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); } @TestMetadata("compoundAssignmentToPropertyImportedFromObject.kt") public void testCompoundAssignmentToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToPropertyWithQualifier.kt") public void testCompoundAssignmentToPropertyWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); } @TestMetadata("flist.kt") public void testFlist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/flist.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/flist.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/initializationOrder.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); } @TestMetadata("interfaceCompanionObjectReference.kt") public void testInterfaceCompanionObjectReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); } @TestMetadata("kt1047.kt") public void testKt1047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1047.kt"); } @TestMetadata("kt11117.kt") public void testKt11117() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt11117.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt11117.kt"); } @TestMetadata("kt1136.kt") public void testKt1136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1136.kt"); } @TestMetadata("kt1186.kt") public void testKt1186() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1186.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1186.kt"); } @TestMetadata("kt1600.kt") public void testKt1600() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1600.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1600.kt"); } @TestMetadata("kt1737.kt") public void testKt1737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1737.kt"); } @TestMetadata("kt18982.kt") public void testKt18982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt18982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt18982.kt"); } @TestMetadata("kt2398.kt") public void testKt2398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2398.kt"); } @TestMetadata("kt2663.kt") public void testKt2663() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663.kt"); } @TestMetadata("kt2663_2.kt") public void testKt2663_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663_2.kt"); } @TestMetadata("kt2675.kt") public void testKt2675() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2675.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2675.kt"); } @TestMetadata("kt2719.kt") public void testKt2719() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2719.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2719.kt"); } @TestMetadata("kt2822.kt") public void testKt2822() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2822.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2822.kt"); } @TestMetadata("kt3238.kt") public void testKt3238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3238.kt"); } @TestMetadata("kt3684.kt") public void testKt3684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3684.kt"); } @TestMetadata("kt4086.kt") public void testKt4086() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt4086.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt4086.kt"); } @TestMetadata("kt535.kt") public void testKt535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt535.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt535.kt"); } @TestMetadata("kt560.kt") public void testKt560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt560.kt"); } @TestMetadata("kt694.kt") public void testKt694() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt694.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt694.kt"); } @TestMetadata("localFunctionInObjectInitializer_kt4516.kt") public void testLocalFunctionInObjectInitializer_kt4516() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); } @TestMetadata("methodOnObject.kt") public void testMethodOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/methodOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/methodOnObject.kt"); } @TestMetadata("nestedDerivedClassCallsProtectedFromCompanion.kt") public void testNestedDerivedClassCallsProtectedFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); } @TestMetadata("nestedObjectWithSuperclass.kt") public void testNestedObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/object.kt"); } @TestMetadata("objectExtendsInnerAndReferencesOuterMember.kt") public void testObjectExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("objectInLocalAnonymousObject.kt") public void testObjectInLocalAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); } @TestMetadata("objectInitialization_kt5523.kt") public void testObjectInitialization_kt5523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteral.kt"); } @TestMetadata("objectLiteralInClosure.kt") public void testObjectLiteralInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); } @TestMetadata("objectVsClassInitialization_kt5291.kt") public void testObjectVsClassInitialization_kt5291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); } @TestMetadata("objectWithSuperclass.kt") public void testObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); } @TestMetadata("objectWithSuperclassAndTrait.kt") public void testObjectWithSuperclassAndTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); } @TestMetadata("privateExtensionFromInitializer_kt4543.kt") public void testPrivateExtensionFromInitializer_kt4543() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); } @TestMetadata("privateFunctionFromClosureInInitializer_kt5582.kt") public void testPrivateFunctionFromClosureInInitializer_kt5582() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); } @TestMetadata("receiverInConstructor.kt") public void testReceiverInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); } @TestMetadata("safeAccess.kt") public void testSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/safeAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/safeAccess.kt"); } @TestMetadata("selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/simpleObject.kt"); } @TestMetadata("thisInConstructor.kt") public void testThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/thisInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt"); } @TestMetadata("useAnonymousObjectAsIterator.kt") public void testUseAnonymousObjectAsIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); } @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMember.kt"); } @TestMetadata("useImportedMemberFromCompanion.kt") public void testUseImportedMemberFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); } } @@ -13939,184 +12391,164 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorConventions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOperatorConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotatedAssignment.kt") public void testAnnotatedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); } @TestMetadata("augmentedAssignmentWithArrayLHS.kt") public void testAugmentedAssignmentWithArrayLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); } @TestMetadata("incDecOnObject.kt") public void testIncDecOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); } @TestMetadata("infixFunctionOverBuiltinMember.kt") public void testInfixFunctionOverBuiltinMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); } @TestMetadata("kt14201.kt") public void testKt14201() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); } @TestMetadata("kt14201_2.kt") public void testKt14201_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); } @TestMetadata("kt20387.kt") public void testKt20387() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); } @TestMetadata("kt4152.kt") public void testKt4152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); } @TestMetadata("kt4987.kt") public void testKt4987() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); } @TestMetadata("nestedMaps.kt") public void testNestedMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); } @TestMetadata("operatorSetLambda.kt") public void testOperatorSetLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); } @TestMetadata("overloadedSet.kt") public void testOverloadedSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); } @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); } @TestMetadata("remOverModOperation.kt") public void testRemOverModOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); } @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompareTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCompareTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); } @TestMetadata("comparable.kt") public void testComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); } @TestMetadata("doubleInt.kt") public void testDoubleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); } @TestMetadata("doubleLong.kt") public void testDoubleLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); } @TestMetadata("extensionArray.kt") public void testExtensionArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); } @TestMetadata("extensionObject.kt") public void testExtensionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); } @TestMetadata("intDouble.kt") public void testIntDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); } @TestMetadata("intLong.kt") public void testIntLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); } @TestMetadata("longDouble.kt") public void testLongDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); } @TestMetadata("longInt.kt") public void testLongInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } } @@ -14125,14 +12557,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); } } @@ -14140,80 +12575,72 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxPrimitiveTypeInClinit.kt") public void testBoxPrimitiveTypeInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); } @TestMetadata("checkCast.kt") public void testCheckCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/checkCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/checkCast.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/incrementProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/incrementProperty.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/initializationOrder.kt"); } @TestMetadata("invokespecial.kt") public void testInvokespecial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/invokespecial.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/invokespecial.kt"); } @TestMetadata("mainInFiles.kt") public void testMainInFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/mainInFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/mainInFiles.kt"); } @TestMetadata("nullablePrimitiveNoFieldInitializer.kt") public void testNullablePrimitiveNoFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); } @TestMetadata("packageLocalClassNotImportedWithDefaultImport.kt") public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); } @TestMetadata("packageQualifiedMethod.kt") public void testPackageQualifiedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); } @TestMetadata("privateMembersInImportList.kt") public void testPrivateMembersInImportList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); } @TestMetadata("privateTopLevelPropAndVarInInner.kt") public void testPrivateTopLevelPropAndVarInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); } @TestMetadata("referenceWithTheSameNameAsPackage.kt") public void testReferenceWithTheSameNameAsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); } } @@ -14221,6 +12648,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -14229,146 +12660,127 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Primitives extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitives() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); } @TestMetadata("dec.kt") public void testDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); } @TestMetadata("div.kt") public void testDiv() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); } @TestMetadata("equalsNull_lv11.kt") public void testEqualsNull_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt"); } @TestMetadata("equalsNull_lv12.kt") public void testEqualsNull_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt"); } @TestMetadata("equalsNull_withExplicitFlag.kt") public void testEqualsNull_withExplicitFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); } @TestMetadata("inc.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); } @TestMetadata("not.kt") public void testNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); } @TestMetadata("times.kt") public void testTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); } @TestMetadata("toShort.kt") public void testToShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); } } } @@ -14377,480 +12789,416 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveTypes extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparisonWithNaN.kt") public void testComparisonWithNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); } @TestMetadata("comparisonWithNullCallsFun.kt") public void testComparisonWithNullCallsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); } @TestMetadata("conversions.kt") public void testConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); } @TestMetadata("ea35963.kt") public void testEa35963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); } @TestMetadata("incrementByteCharShort.kt") public void testIncrementByteCharShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); } @TestMetadata("intLiteralIsNotNull.kt") public void testIntLiteralIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); } @TestMetadata("kt1054.kt") public void testKt1054() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); } @TestMetadata("kt1055.kt") public void testKt1055() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); } @TestMetadata("kt1093.kt") public void testKt1093() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); } @TestMetadata("kt13023.kt") public void testKt13023() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); } @TestMetadata("kt14868.kt") public void testKt14868() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); } @TestMetadata("kt1508.kt") public void testKt1508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); } @TestMetadata("kt1634.kt") public void testKt1634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); } @TestMetadata("kt16732.kt") public void testKt16732() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); } @TestMetadata("kt2251.kt") public void testKt2251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); } @TestMetadata("kt2269.kt") public void testKt2269() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); } @TestMetadata("kt2275.kt") public void testKt2275() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); } @TestMetadata("kt239.kt") public void testKt239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); } @TestMetadata("kt242.kt") public void testKt242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); } @TestMetadata("kt243.kt") public void testKt243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); } @TestMetadata("kt248.kt") public void testKt248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); } @TestMetadata("kt2768.kt") public void testKt2768() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); } @TestMetadata("kt2794.kt") public void testKt2794() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); } @TestMetadata("kt3078.kt") public void testKt3078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); } @TestMetadata("kt3517.kt") public void testKt3517() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); } @TestMetadata("kt3576.kt") public void testKt3576() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); } @TestMetadata("kt3613.kt") public void testKt3613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); } @TestMetadata("kt4097.kt") public void testKt4097() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); } @TestMetadata("kt4098.kt") public void testKt4098() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); } @TestMetadata("kt4210.kt") public void testKt4210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); } @TestMetadata("kt4251.kt") public void testKt4251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); } @TestMetadata("kt446.kt") public void testKt446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); } @TestMetadata("kt518.kt") public void testKt518() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); } @TestMetadata("kt6590_identityEquals.kt") public void testKt6590_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); } @TestMetadata("kt665.kt") public void testKt665() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); } @TestMetadata("kt684.kt") public void testKt684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); } @TestMetadata("kt711.kt") public void testKt711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); } @TestMetadata("kt737.kt") public void testKt737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); } @TestMetadata("kt752.kt") public void testKt752() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); } @TestMetadata("kt753.kt") public void testKt753() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); } @TestMetadata("kt756.kt") public void testKt756() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); } @TestMetadata("kt757.kt") public void testKt757() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); } @TestMetadata("kt828.kt") public void testKt828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); } @TestMetadata("kt877.kt") public void testKt877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); } @TestMetadata("kt882.kt") public void testKt882() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); } @TestMetadata("kt887.kt") public void testKt887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); } @TestMetadata("kt935.kt") public void testKt935() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); } @TestMetadata("nullAsNullableIntIsNull.kt") public void testNullAsNullableIntIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); } @TestMetadata("nullableCharBoolean.kt") public void testNullableCharBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); } @TestMetadata("number.kt") public void testNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/number.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/number.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } @TestMetadata("substituteIntForGeneric.kt") public void testSubstituteIntForGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); } @TestMetadata("unboxComparable.kt") public void testUnboxComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EqualityWithObject extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEqualityWithObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedEqPrimitiveEvaluationOrder.kt") public void testBoxedEqPrimitiveEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); } @TestMetadata("boxedLongEqualsLong.kt") public void testBoxedLongEqualsLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); } @TestMetadata("objectWithAsymmetricEqualsEqPrimitive.kt") public void testObjectWithAsymmetricEqualsEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); } @TestMetadata("whenNullableBoxed.kt") public void testWhenNullableBoxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedEqPrimitiveBoolean.kt") public void testBoxedEqPrimitiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); } @TestMetadata("boxedEqPrimitiveByte.kt") public void testBoxedEqPrimitiveByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); } @TestMetadata("boxedEqPrimitiveChar.kt") public void testBoxedEqPrimitiveChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); } @TestMetadata("boxedEqPrimitiveInt.kt") public void testBoxedEqPrimitiveInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); } @TestMetadata("boxedEqPrimitiveLong.kt") public void testBoxedEqPrimitiveLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); } @TestMetadata("boxedEqPrimitiveShort.kt") public void testBoxedEqPrimitiveShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); } @TestMetadata("primitiveEqBoxedBoolean.kt") public void testPrimitiveEqBoxedBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); } @TestMetadata("primitiveEqBoxedByte.kt") public void testPrimitiveEqBoxedByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); } @TestMetadata("primitiveEqBoxedChar.kt") public void testPrimitiveEqBoxedChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); } @TestMetadata("primitiveEqBoxedInt.kt") public void testPrimitiveEqBoxedInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); } @TestMetadata("primitiveEqBoxedLong.kt") public void testPrimitiveEqBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); } @TestMetadata("primitiveEqBoxedShort.kt") public void testPrimitiveEqBoxedShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); } @TestMetadata("primitiveEqObjectBoolean.kt") public void testPrimitiveEqObjectBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); } @TestMetadata("primitiveEqObjectByte.kt") public void testPrimitiveEqObjectByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); } @TestMetadata("primitiveEqObjectChar.kt") public void testPrimitiveEqObjectChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); } @TestMetadata("primitiveEqObjectInt.kt") public void testPrimitiveEqObjectInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); } @TestMetadata("primitiveEqObjectLong.kt") public void testPrimitiveEqObjectLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); } @TestMetadata("primitiveEqObjectShort.kt") public void testPrimitiveEqObjectShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); } } } @@ -14860,20 +13208,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayConvention.kt") public void testArrayConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/arrayConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/arrayConvention.kt"); } @TestMetadata("kt9855.kt") public void testKt9855() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/kt9855.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/kt9855.kt"); } } @@ -14881,86 +13231,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateConstructors extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivateConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/base.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/base.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/captured.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/companion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/companion.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inline.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inner.kt"); } @TestMetadata("kt4860.kt") public void testKt4860() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); } @TestMetadata("secondary.kt") public void testSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/secondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/secondary.kt"); } @TestMetadata("synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); } @TestMetadata("withDefault.kt") public void testWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); } @TestMetadata("withLinkedClasses.kt") public void testWithLinkedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); } @TestMetadata("withLinkedObjects.kt") public void testWithLinkedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); } } @@ -14968,16 +13309,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); } @TestMetadata("accessToPrivateSetter.kt") public void testAccessToPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } public void testAllFilesPresentInProperties() throws Exception { @@ -14986,429 +13329,354 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("augmentedAssignmentsAndIncrements.kt") public void testAugmentedAssignmentsAndIncrements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); } @TestMetadata("classArtificialFieldInsideNested.kt") public void testClassArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); } @TestMetadata("classFieldInsideLambda.kt") public void testClassFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); } @TestMetadata("classFieldInsideLocalInSetter.kt") public void testClassFieldInsideLocalInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); } @TestMetadata("classFieldInsideNested.kt") public void testClassFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); } @TestMetadata("classObjectProperties.kt") public void testClassObjectProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classObjectProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classObjectProperties.kt"); } @TestMetadata("classPrivateArtificialFieldInsideNested.kt") public void testClassPrivateArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); } @TestMetadata("collectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/collectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/collectionSize.kt"); } @TestMetadata("commonPropertiesKJK.kt") public void testCommonPropertiesKJK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); } @TestMetadata("companionFieldInsideLambda.kt") public void testCompanionFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); } @TestMetadata("companionObjectAccessor.kt") public void testCompanionObjectAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); } @TestMetadata("companionObjectPropertiesFromJava.kt") public void testCompanionObjectPropertiesFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); } @TestMetadata("companionPrivateField.kt") public void testCompanionPrivateField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateField.kt"); } @TestMetadata("companionPrivateFieldInsideLambda.kt") public void testCompanionPrivateFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/field.kt"); } @TestMetadata("fieldInClass.kt") public void testFieldInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInClass.kt"); } @TestMetadata("fieldInsideField.kt") public void testFieldInsideField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideField.kt"); } @TestMetadata("fieldInsideLambda.kt") public void testFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); } @TestMetadata("fieldInsideNested.kt") public void testFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); } @TestMetadata("fieldSimple.kt") public void testFieldSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldSimple.kt"); } @TestMetadata("generalAccess.kt") public void testGeneralAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/generalAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/generalAccess.kt"); } @TestMetadata("javaPropertyBoxedGetter.kt") public void testJavaPropertyBoxedGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); } @TestMetadata("javaPropertyBoxedSetter.kt") public void testJavaPropertyBoxedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); } @TestMetadata("kt10715.kt") public void testKt10715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10715.kt"); } @TestMetadata("kt10729.kt") public void testKt10729() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10729.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10729.kt"); } @TestMetadata("kt1159.kt") public void testKt1159() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1159.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1159.kt"); } @TestMetadata("kt1165.kt") public void testKt1165() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1165.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1165.kt"); } @TestMetadata("kt1168.kt") public void testKt1168() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1168.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1168.kt"); } @TestMetadata("kt1170.kt") public void testKt1170() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1170.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1170.kt"); } @TestMetadata("kt12200.kt") public void testKt12200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt12200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt12200.kt"); } @TestMetadata("kt1398.kt") public void testKt1398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1398.kt"); } @TestMetadata("kt1417.kt") public void testKt1417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1417.kt"); } @TestMetadata("kt1482_2279.kt") public void testKt1482_2279() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1482_2279.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1482_2279.kt"); } @TestMetadata("kt1714.kt") public void testKt1714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714.kt"); } @TestMetadata("kt1714_minimal.kt") public void testKt1714_minimal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); } @TestMetadata("kt1892.kt") public void testKt1892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1892.kt"); } @TestMetadata("kt2331.kt") public void testKt2331() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2331.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2331.kt"); } @TestMetadata("kt257.kt") public void testKt257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt257.kt"); } @TestMetadata("kt2655.kt") public void testKt2655() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2655.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2655.kt"); } @TestMetadata("kt2786.kt") public void testKt2786() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2786.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2786.kt"); } @TestMetadata("kt2892.kt") public void testKt2892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2892.kt"); } @TestMetadata("kt3118.kt") public void testKt3118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3118.kt"); } @TestMetadata("kt3524.kt") public void testKt3524() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3524.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3524.kt"); } @TestMetadata("kt3551.kt") public void testKt3551() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3551.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3551.kt"); } @TestMetadata("kt3556.kt") public void testKt3556() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3556.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3556.kt"); } @TestMetadata("kt3930.kt") public void testKt3930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3930.kt"); } @TestMetadata("kt4140.kt") public void testKt4140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4140.kt"); } @TestMetadata("kt4252.kt") public void testKt4252() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252.kt"); } @TestMetadata("kt4252_2.kt") public void testKt4252_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252_2.kt"); } @TestMetadata("kt4340.kt") public void testKt4340() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4340.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4340.kt"); } @TestMetadata("kt4373.kt") public void testKt4373() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4373.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4373.kt"); } @TestMetadata("kt4383.kt") public void testKt4383() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4383.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4383.kt"); } @TestMetadata("kt613.kt") public void testKt613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt613.kt"); } @TestMetadata("kt8928.kt") public void testKt8928() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt8928.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt8928.kt"); } @TestMetadata("kt9603.kt") public void testKt9603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt9603.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt9603.kt"); } @TestMetadata("primitiveOverrideDefaultAccessor.kt") public void testPrimitiveOverrideDefaultAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); } @TestMetadata("primitiveOverrideDelegateAccessor.kt") public void testPrimitiveOverrideDelegateAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); } @TestMetadata("privatePropertyInConstructor.kt") public void testPrivatePropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); } @TestMetadata("privatePropertyWithoutBackingField.kt") public void testPrivatePropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); } @TestMetadata("protectedJavaFieldInInline.kt") public void testProtectedJavaFieldInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); } @TestMetadata("protectedJavaProperty.kt") public void testProtectedJavaProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); } @TestMetadata("protectedJavaPropertyInCompanion.kt") public void testProtectedJavaPropertyInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); } @TestMetadata("substituteJavaSuperField.kt") public void testSubstituteJavaSuperField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); } @TestMetadata("twoAnnotatedExtensionPropertiesWithoutBackingFields.kt") public void testTwoAnnotatedExtensionPropertiesWithoutBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); } @TestMetadata("typeInferredFromGetter.kt") public void testTypeInferredFromGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Const extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constFlags.kt") public void testConstFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/constFlags.kt"); } @TestMetadata("constValInAnnotationDefault.kt") public void testConstValInAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); } } @@ -15416,16 +13684,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessor.kt") public void testAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); } @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); } public void testAllFilesPresentInLateinit() throws Exception { @@ -15434,100 +13704,89 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("exceptionField.kt") public void testExceptionField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); } @TestMetadata("exceptionGetter.kt") public void testExceptionGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/override.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/override.kt"); } @TestMetadata("overrideException.kt") public void testOverrideException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); } @TestMetadata("privateSetterFromLambda.kt") public void testPrivateSetterFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); } @TestMetadata("privateSetterViaSubclass.kt") public void testPrivateSetterViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); } @TestMetadata("simpleVar.kt") public void testSimpleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/visibility.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInitializedAndDeinitialize extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyLhs.kt") public void testEmptyLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); } @TestMetadata("innerSubclass.kt") public void testInnerSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); } @TestMetadata("sideEffects.kt") public void testSideEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); } @TestMetadata("simpleIsInitialized.kt") public void testSimpleIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); } } @@ -15535,44 +13794,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedLocalLateinit.kt") public void testCapturedLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); } @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); } @TestMetadata("uninitializedCapturedMemberAccess.kt") public void testUninitializedCapturedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); } @TestMetadata("uninitializedCapturedRead.kt") public void testUninitializedCapturedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); } } @@ -15580,16 +13837,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevel extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); } @TestMetadata("accessorForTopLevelLateinit.kt") public void testAccessorForTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); } public void testAllFilesPresentInTopLevel() throws Exception { @@ -15598,20 +13857,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("topLevelLateinit.kt") public void testTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); } } } @@ -15621,26 +13877,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublishedApi extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPublishedApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("noMangling.kt") public void testNoMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/noMangling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/noMangling.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/simple.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/topLevel.kt"); } } @@ -15648,342 +13905,301 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ranges extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRanges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forByteProgressionWithIntIncrement.kt") public void testForByteProgressionWithIntIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); } @TestMetadata("forInRangeLiteralWithMixedTypeBounds.kt") public void testForInRangeLiteralWithMixedTypeBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); } @TestMetadata("forInRangeWithImplicitReceiver.kt") public void testForInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); } @TestMetadata("forInStringVarUpdatedInLoopBody.kt") public void testForInStringVarUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); } @TestMetadata("forIntRange.kt") public void testForIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forIntRange.kt"); } @TestMetadata("forNullableIntInRangeWithImplicitReceiver.kt") public void testForNullableIntInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); } @TestMetadata("multiAssignmentIterationOverIntRange.kt") public void testMultiAssignmentIterationOverIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); } @TestMetadata("safeCallRangeTo.kt") public void testSafeCallRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contains extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInContains() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparisonWithRangeBoundEliminated.kt") public void testComparisonWithRangeBoundEliminated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); } @TestMetadata("evaluationOrderForCollection.kt") public void testEvaluationOrderForCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); } @TestMetadata("evaluationOrderForComparableRange.kt") public void testEvaluationOrderForComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); } @TestMetadata("evaluationOrderForDownTo.kt") public void testEvaluationOrderForDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); } @TestMetadata("evaluationOrderForRangeLiteral.kt") public void testEvaluationOrderForRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); } @TestMetadata("genericCharInRangeLiteral.kt") public void testGenericCharInRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); } @TestMetadata("inArray.kt") public void testInArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inArray.kt"); } @TestMetadata("inCharSequence.kt") public void testInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); } @TestMetadata("inComparableRange.kt") public void testInComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); } @TestMetadata("inCustomObjectRange.kt") public void testInCustomObjectRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); } @TestMetadata("inDoubleRangeLiteralVsComparableRangeLiteral.kt") public void testInDoubleRangeLiteralVsComparableRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); } @TestMetadata("inExtensionRange.kt") public void testInExtensionRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); } @TestMetadata("inFloatingPointRangeWithNaNBound.kt") public void testInFloatingPointRangeWithNaNBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); } @TestMetadata("inIntRange.kt") public void testInIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); } @TestMetadata("inIterable.kt") public void testInIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); } @TestMetadata("inNonMatchingRange.kt") public void testInNonMatchingRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); } @TestMetadata("inOptimizableDoubleRange.kt") public void testInOptimizableDoubleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); } @TestMetadata("inOptimizableFloatRange.kt") public void testInOptimizableFloatRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); } @TestMetadata("inOptimizableIntRange.kt") public void testInOptimizableIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); } @TestMetadata("inOptimizableLongRange.kt") public void testInOptimizableLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); } @TestMetadata("inPrimitiveProgression.kt") public void testInPrimitiveProgression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); } @TestMetadata("inPrimitiveRange.kt") public void testInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); } @TestMetadata("inRangeLiteralComposition.kt") public void testInRangeLiteralComposition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); } @TestMetadata("inRangeWithCustomContains.kt") public void testInRangeWithCustomContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); } @TestMetadata("inRangeWithImplicitReceiver.kt") public void testInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); } @TestMetadata("inRangeWithNonmatchingArguments.kt") public void testInRangeWithNonmatchingArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); } @TestMetadata("inRangeWithSmartCast.kt") public void testInRangeWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); } @TestMetadata("inUntil.kt") public void testInUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); } @TestMetadata("kt20106.kt") public void testKt20106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); } @TestMetadata("nullableInPrimitiveRange.kt") public void testNullableInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); } @TestMetadata("rangeContainsString.kt") public void testRangeContainsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayIndices.kt") public void testArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); } @TestMetadata("charDownTo.kt") public void testCharDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); } @TestMetadata("charRangeLiteral.kt") public void testCharRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); } @TestMetadata("charSequenceIndices.kt") public void testCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); } @TestMetadata("charUntil.kt") public void testCharUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); } @TestMetadata("collectionIndices.kt") public void testCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); } @TestMetadata("doubleRangeLiteral.kt") public void testDoubleRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); } @TestMetadata("floatRangeLiteral.kt") public void testFloatRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); } @TestMetadata("intDownTo.kt") public void testIntDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); } @TestMetadata("intRangeLiteral.kt") public void testIntRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); } @TestMetadata("intUntil.kt") public void testIntUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); } @TestMetadata("longDownTo.kt") public void testLongDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); } @TestMetadata("longRangeLiteral.kt") public void testLongRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); } @TestMetadata("longUntil.kt") public void testLongUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); } } } @@ -15992,176 +14208,152 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); } } @@ -16169,38 +14361,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInDownTo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInDownTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forIntInDownTo.kt") public void testForIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); } @TestMetadata("forIntInDownToWithNonConstBounds.kt") public void testForIntInDownToWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); } @TestMetadata("forIntInNonOptimizedDownTo.kt") public void testForIntInNonOptimizedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); } @TestMetadata("forLongInDownTo.kt") public void testForLongInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); } @TestMetadata("forNullableIntInDownTo.kt") public void testForNullableIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); } } @@ -16208,104 +14399,92 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIndices extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInCharSequenceIndices.kt") public void testForInCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); } @TestMetadata("forInCollectionImplicitReceiverIndices.kt") public void testForInCollectionImplicitReceiverIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); } @TestMetadata("forInCollectionIndices.kt") public void testForInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); } @TestMetadata("forInNonOptimizedIndices.kt") public void testForInNonOptimizedIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); } @TestMetadata("forInObjectArrayIndices.kt") public void testForInObjectArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); } @TestMetadata("forInPrimitiveArrayIndices.kt") public void testForInPrimitiveArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); } @TestMetadata("forNullableIntInArrayIndices.kt") public void testForNullableIntInArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); } @TestMetadata("forNullableIntInCollectionIndices.kt") public void testForNullableIntInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); } @TestMetadata("indexOfLast.kt") public void testIndexOfLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); } @TestMetadata("kt12983_forInGenericArrayIndices.kt") public void testKt12983_forInGenericArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); } @TestMetadata("kt12983_forInGenericCollectionIndices.kt") public void testKt12983_forInGenericCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); } @TestMetadata("kt12983_forInSpecificArrayIndices.kt") public void testKt12983_forInSpecificArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); } @TestMetadata("kt12983_forInSpecificCollectionIndices.kt") public void testKt12983_forInSpecificCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); } @TestMetadata("kt13241_Array.kt") public void testKt13241_Array() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); } @TestMetadata("kt13241_CharSequence.kt") public void testKt13241_CharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); } @TestMetadata("kt13241_Collection.kt") public void testKt13241_Collection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); } } @@ -16313,118 +14492,109 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInReversed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInReversed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInReversedArrayIndices.kt") public void testForInReversedArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); } @TestMetadata("forInReversedCharSequenceIndices.kt") public void testForInReversedCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); } @TestMetadata("forInReversedCollectionIndices.kt") public void testForInReversedCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); } @TestMetadata("forInReversedDownTo.kt") public void testForInReversedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); } @TestMetadata("forInReversedEmptyRange.kt") public void testForInReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); } @TestMetadata("forInReversedEmptyRangeLiteral.kt") public void testForInReversedEmptyRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); } @TestMetadata("forInReversedEmptyRangeLiteralWithNonConstBounds.kt") public void testForInReversedEmptyRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("forInReversedRange.kt") public void testForInReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); } @TestMetadata("forInReversedRangeLiteral.kt") public void testForInReversedRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); } @TestMetadata("forInReversedRangeLiteralWithNonConstBounds.kt") public void testForInReversedRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("ForInReversedReversedRange.kt") public void testForInReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); } @TestMetadata("forInReversedReversedReversedRange.kt") public void testForInReversedReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); } @TestMetadata("forInReversedUntil.kt") public void testForInReversedUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); } @TestMetadata("forInReversedUntilWithNonConstBounds.kt") public void testForInReversedUntilWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluationOrder extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEvaluationOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInReversedDownToEvaluationOrder.kt") public void testForInReversedDownToEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); } @TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt") public void testForInReversedRangeLiteralEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); } @TestMetadata("forInReversedUntilEvaluationOrder.kt") public void testForInReversedUntilEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); } } } @@ -16433,62 +14603,57 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInUntil extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInUntil() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInUntilChar.kt") public void testForInUntilChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); } @TestMetadata("forInUntilChar0.kt") public void testForInUntilChar0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); } @TestMetadata("forInUntilInt.kt") public void testForInUntilInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); } @TestMetadata("forInUntilLesserInt.kt") public void testForInUntilLesserInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); } @TestMetadata("forInUntilLong.kt") public void testForInUntilLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); } @TestMetadata("forInUntilMaxint.kt") public void testForInUntilMaxint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); } @TestMetadata("forInUntilMinint.kt") public void testForInUntilMinint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); } @TestMetadata("forInUntilMinlong.kt") public void testForInUntilMinlong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); } @TestMetadata("forIntInIntUntilSmartcastInt.kt") public void testForIntInIntUntilSmartcastInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); } } @@ -16496,86 +14661,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForWithPossibleOverflow extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInDownToCharMinValue.kt") public void testForInDownToCharMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); } @TestMetadata("forInDownToCharMinValueReversed.kt") public void testForInDownToCharMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); } @TestMetadata("forInDownToIntMinValue.kt") public void testForInDownToIntMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); } @TestMetadata("forInDownToIntMinValueReversed.kt") public void testForInDownToIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); } @TestMetadata("forInDownToLongMinValue.kt") public void testForInDownToLongMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); } @TestMetadata("forInDownToLongMinValueReversed.kt") public void testForInDownToLongMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); } @TestMetadata("forInRangeToCharMaxValue.kt") public void testForInRangeToCharMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); } @TestMetadata("forInRangeToCharMaxValueReversed.kt") public void testForInRangeToCharMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); } @TestMetadata("forInRangeToIntMaxValue.kt") public void testForInRangeToIntMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); } @TestMetadata("forInRangeToIntMaxValueReversed.kt") public void testForInRangeToIntMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); } @TestMetadata("forInRangeToLongMaxValue.kt") public void testForInRangeToLongMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); } @TestMetadata("forInRangeToLongMaxValueReversed.kt") public void testForInRangeToLongMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); } @TestMetadata("forInUntilIntMinValueReversed.kt") public void testForInUntilIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); } } @@ -16583,176 +14739,152 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Literal extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); } } @@ -16760,26 +14892,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableLoopParameter extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNullableLoopParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("progressionExpression.kt") public void testProgressionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); } @TestMetadata("rangeExpression.kt") public void testRangeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); } @TestMetadata("rangeLiteral.kt") public void testRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } } @@ -16788,6 +14921,10 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -16796,86 +14933,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationRetentionAnnotation.kt") public void testAnnotationRetentionAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); } @TestMetadata("annotationsOnJavaMembers.kt") public void testAnnotationsOnJavaMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); } @TestMetadata("findAnnotation.kt") public void testFindAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); } @TestMetadata("privateAnnotation.kt") public void testPrivateAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); } @TestMetadata("propertyWithoutBackingField.kt") public void testPropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); } @TestMetadata("retentions.kt") public void testRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); } @TestMetadata("simpleClassAnnotation.kt") public void testSimpleClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); } @TestMetadata("simpleConstructorAnnotation.kt") public void testSimpleConstructorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); } @TestMetadata("simpleFunAnnotation.kt") public void testSimpleFunAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); } @TestMetadata("simpleParamAnnotation.kt") public void testSimpleParamAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); } @TestMetadata("simpleValAnnotation.kt") public void testSimpleValAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } } @@ -16883,232 +15011,204 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callInstanceJavaMethod.kt") public void testCallInstanceJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); } @TestMetadata("callPrivateJavaMethod.kt") public void testCallPrivateJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); } @TestMetadata("callStaticJavaMethod.kt") public void testCallStaticJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); } @TestMetadata("cannotCallEnumConstructor.kt") public void testCannotCallEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); } @TestMetadata("disallowNullValueForNotNullField.kt") public void testDisallowNullValueForNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); } @TestMetadata("exceptionHappened.kt") public void testExceptionHappened() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); } @TestMetadata("fakeOverrideSubstituted.kt") public void testFakeOverrideSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); } @TestMetadata("incorrectNumberOfArguments.kt") public void testIncorrectNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); } @TestMetadata("jvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); } @TestMetadata("jvmStaticInObjectIncorrectReceiver.kt") public void testJvmStaticInObjectIncorrectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); } @TestMetadata("memberOfGenericClass.kt") public void testMemberOfGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); } @TestMetadata("privateProperty.kt") public void testPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); } @TestMetadata("propertyGetterAndGetFunctionDifferentReturnType.kt") public void testPropertyGetterAndGetFunctionDifferentReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); } @TestMetadata("returnUnit.kt") public void testReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunction.kt") public void testSimpleMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); } @TestMetadata("simpleTopLevelFunctions.kt") public void testSimpleTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObjectPropertyAccessors.kt") public void testCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); } @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); } @TestMetadata("javaInstanceField.kt") public void testJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); } @TestMetadata("javaInstanceMethod.kt") public void testJavaInstanceMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); } @TestMetadata("jvmStaticCompanionObjectPropertyAccessors.kt") public void testJvmStaticCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); } @TestMetadata("jvmStaticObjectFunction.kt") public void testJvmStaticObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); } @TestMetadata("jvmStaticObjectPropertyAccessors.kt") public void testJvmStaticObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); } @TestMetadata("objectPropertyAccessors.kt") public void testObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); } } } @@ -17117,128 +15217,112 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallBy extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCallBy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundExtensionFunction.kt") public void testBoundExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); } @TestMetadata("boundExtensionPropertyAcessor.kt") public void testBoundExtensionPropertyAcessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); } @TestMetadata("boundJvmStaticInObject.kt") public void testBoundJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); } @TestMetadata("defaultAndNonDefaultIntertwined.kt") public void testDefaultAndNonDefaultIntertwined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); } @TestMetadata("jvmStaticInCompanionObject.kt") public void testJvmStaticInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); } @TestMetadata("manyArgumentsNoneDefaultConstructor.kt") public void testManyArgumentsNoneDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); } @TestMetadata("manyArgumentsNoneDefaultFunction.kt") public void testManyArgumentsNoneDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); } @TestMetadata("manyArgumentsOnlyOneDefault.kt") public void testManyArgumentsOnlyOneDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); } @TestMetadata("manyMaskArguments.kt") public void testManyMaskArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); } @TestMetadata("nonDefaultParameterOmitted.kt") public void testNonDefaultParameterOmitted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); } @TestMetadata("nullValue.kt") public void testNullValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); } @TestMetadata("ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt") public void testOrdinaryMethodIsInvokedWhenNoDefaultValuesAreUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); } @TestMetadata("primitiveDefaultValues.kt") public void testPrimitiveDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunciton.kt") public void testSimpleMemberFunciton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); } @TestMetadata("simpleTopLevelFunction.kt") public void testSimpleTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); } } @@ -17246,50 +15330,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiterals extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClassLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationClassLiteral.kt") public void testAnnotationClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); } @TestMetadata("builtinClassLiterals.kt") public void testBuiltinClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); } @TestMetadata("genericArrays.kt") public void testGenericArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } @TestMetadata("reifiedTypeClassLiteral.kt") public void testReifiedTypeClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); } @TestMetadata("simpleClassLiteral.kt") public void testSimpleClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); } } @@ -17297,86 +15378,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classSimpleName.kt") public void testClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); } @TestMetadata("createInstance.kt") public void testCreateInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); } @TestMetadata("declaredMembers.kt") public void testDeclaredMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); } @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); } @TestMetadata("localClassSimpleName.kt") public void testLocalClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); } @TestMetadata("nestedClassesJava.kt") public void testNestedClassesJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); } @TestMetadata("objectInstance.kt") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); } @TestMetadata("qualifiedName.kt") public void testQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); } @TestMetadata("starProjectedType.kt") public void testStarProjectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); } } @@ -17384,38 +15456,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); } @TestMetadata("classesWithoutConstructors.kt") public void testClassesWithoutConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); } @TestMetadata("constructorName.kt") public void testConstructorName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); } @TestMetadata("simpleGetConstructors.kt") public void testSimpleGetConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); } } @@ -17423,80 +15494,72 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateAnnotation extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCreateAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationType.kt") public void testAnnotationType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); } @TestMetadata("arrayOfKClasses.kt") public void testArrayOfKClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); } @TestMetadata("callByJava.kt") public void testCallByJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); } @TestMetadata("callByKotlin.kt") public void testCallByKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); } @TestMetadata("callJava.kt") public void testCallJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); } @TestMetadata("callKotlin.kt") public void testCallKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); } @TestMetadata("createJdkAnnotationInstance.kt") public void testCreateJdkAnnotationInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); } @TestMetadata("enumKClassAnnotation.kt") public void testEnumKClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); } @TestMetadata("floatingPointParameters.kt") public void testFloatingPointParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); } @TestMetadata("parameterNamedEquals.kt") public void testParameterNamedEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); } @TestMetadata("primitivesAndArrays.kt") public void testPrimitivesAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); } } @@ -17504,152 +15567,132 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enclosing extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnclosing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectInInlinedLambda.kt") public void testAnonymousObjectInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); } @TestMetadata("classInLambda.kt") public void testClassInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); } @TestMetadata("functionExpressionInProperty.kt") public void testFunctionExpressionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); } @TestMetadata("kt11969.kt") public void testKt11969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); } @TestMetadata("kt6368.kt") public void testKt6368() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); } @TestMetadata("kt6691_lambdaInSamConstructor.kt") public void testKt6691_lambdaInSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); } @TestMetadata("lambdaInClassObject.kt") public void testLambdaInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); } @TestMetadata("lambdaInConstructor.kt") public void testLambdaInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); } @TestMetadata("lambdaInFunction.kt") public void testLambdaInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); } @TestMetadata("lambdaInLocalClassConstructor.kt") public void testLambdaInLocalClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); } @TestMetadata("lambdaInLocalClassSuperCall.kt") public void testLambdaInLocalClassSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); } @TestMetadata("lambdaInLocalFunction.kt") public void testLambdaInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); } @TestMetadata("lambdaInMemberFunction.kt") public void testLambdaInMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); } @TestMetadata("lambdaInMemberFunctionInLocalClass.kt") public void testLambdaInMemberFunctionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); } @TestMetadata("lambdaInMemberFunctionInNestedClass.kt") public void testLambdaInMemberFunctionInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); } @TestMetadata("lambdaInObjectDeclaration.kt") public void testLambdaInObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); } @TestMetadata("lambdaInObjectExpression.kt") public void testLambdaInObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); } @TestMetadata("lambdaInObjectLiteralSuperCall.kt") public void testLambdaInObjectLiteralSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); } @TestMetadata("lambdaInPackage.kt") public void testLambdaInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); } @TestMetadata("lambdaInPropertyGetter.kt") public void testLambdaInPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); } @TestMetadata("lambdaInPropertySetter.kt") public void testLambdaInPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); } @TestMetadata("localClassInTopLevelFunction.kt") public void testLocalClassInTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); } @TestMetadata("objectInLambda.kt") public void testObjectInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); } } @@ -17657,74 +15700,67 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("declaredVsInheritedFunctions.kt") public void testDeclaredVsInheritedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); } @TestMetadata("functionFromStdlib.kt") public void testFunctionFromStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); } @TestMetadata("functionReferenceErasedToKFunction.kt") public void testFunctionReferenceErasedToKFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); } @TestMetadata("genericOverriddenFunction.kt") public void testGenericOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); } @TestMetadata("instanceOfFunction.kt") public void testInstanceOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); } @TestMetadata("javaClassGetFunctions.kt") public void testJavaClassGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); } @TestMetadata("javaMethodsSmokeTest.kt") public void testJavaMethodsSmokeTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaMethodsSmokeTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/javaMethodsSmokeTest.kt"); } @TestMetadata("platformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/platformName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/platformName.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); } @TestMetadata("simpleGetFunctions.kt") public void testSimpleGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); } @TestMetadata("simpleNames.kt") public void testSimpleNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); } } @@ -17732,92 +15768,82 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericSignature extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenericSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); } @TestMetadata("defaultImplsGenericSignature.kt") public void testDefaultImplsGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); } @TestMetadata("functionLiteralGenericSignature.kt") public void testFunctionLiteralGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); } @TestMetadata("genericBackingFieldSignature.kt") public void testGenericBackingFieldSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); } @TestMetadata("genericMethodSignature.kt") public void testGenericMethodSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); } @TestMetadata("kt11121.kt") public void testKt11121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); } @TestMetadata("kt5112.kt") public void testKt5112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); } @TestMetadata("kt6106.kt") public void testKt6106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); } @TestMetadata("signatureOfDeepGenericInner.kt") public void testSignatureOfDeepGenericInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); } @TestMetadata("signatureOfDeepInner.kt") public void testSignatureOfDeepInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); } @TestMetadata("signatureOfDeepInnerLastGeneric.kt") public void testSignatureOfDeepInnerLastGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); } @TestMetadata("signatureOfGenericInnerGenericOuter.kt") public void testSignatureOfGenericInnerGenericOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); } @TestMetadata("signatureOfGenericInnerSimpleOuter.kt") public void testSignatureOfGenericInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); } @TestMetadata("signatureOfSimpleInnerSimpleOuter.kt") public void testSignatureOfSimpleInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); } } @@ -17825,14 +15851,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInstance extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIsInstance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("isInstanceCastAndSafeCast.kt") public void testIsInstanceCastAndSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); } } @@ -17840,62 +15869,57 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClassInAnnotation extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInKClassInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); } @TestMetadata("arrayInJava.kt") public void testArrayInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); } @TestMetadata("basicInJava.kt") public void testBasicInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); } @TestMetadata("forceWrapping.kt") public void testForceWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); } @TestMetadata("wrappingForCallableReferences.kt") public void testWrappingForCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); } } @@ -17903,14 +15927,17 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClasses extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLambdaClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("parameterNamesAndNullability.kt") public void testParameterNamesAndNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); } } @@ -17918,100 +15945,94 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mapping extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/functions.kt"); } @TestMetadata("inlineReifiedFun.kt") public void testInlineReifiedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); } @TestMetadata("mappedClassIsEqualToClassLiteral.kt") public void testMappedClassIsEqualToClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); } @TestMetadata("propertyAccessorsWithJvmName.kt") public void testPropertyAccessorsWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); } @TestMetadata("syntheticFields.kt") public void testSyntheticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); } @TestMetadata("topLevelFunctionOtherFile.kt") public void testTopLevelFunctionOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverrides extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFakeOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaFieldGetterSetter.kt") public void testJavaFieldGetterSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); } } @@ -18019,20 +16040,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObjectFunction.kt") public void testCompanionObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); } } @@ -18040,104 +16063,92 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationConstructorParameters.kt") public void testAnnotationConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); } @TestMetadata("genericArrayElementType.kt") public void testGenericArrayElementType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); } @TestMetadata("innerGenericTypeArgument.kt") public void testInnerGenericTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); } @TestMetadata("memberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); } @TestMetadata("overrideAnyWithPrimitive.kt") public void testOverrideAnyWithPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); } @TestMetadata("parameterizedTypeArgument.kt") public void testParameterizedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); } @TestMetadata("parameterizedTypes.kt") public void testParameterizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); } @TestMetadata("rawTypeArgument.kt") public void testRawTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/rawTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/rawTypeArgument.kt"); } @TestMetadata("supertypes.kt") public void testSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); } @TestMetadata("topLevelFunctions.kt") public void testTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); } } } @@ -18146,110 +16157,97 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReferencesEqualToCallablesFromAPI.kt") public void testCallableReferencesEqualToCallablesFromAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); } @TestMetadata("classToString.kt") public void testClassToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); } @TestMetadata("extensionPropertyReceiverToString.kt") public void testExtensionPropertyReceiverToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); } @TestMetadata("functionEqualsHashCode.kt") public void testFunctionEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); } @TestMetadata("functionFromStdlibMultiFileFacade.kt") public void testFunctionFromStdlibMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); } @TestMetadata("functionFromStdlibSingleFileFacade.kt") public void testFunctionFromStdlibSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); } @TestMetadata("functionToString.kt") public void testFunctionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); } @TestMetadata("memberExtensionToString.kt") public void testMemberExtensionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); } @TestMetadata("parametersEqualsHashCode.kt") public void testParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); } @TestMetadata("parametersToString.kt") public void testParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); } @TestMetadata("propertyEqualsHashCode.kt") public void testPropertyEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); } @TestMetadata("propertyToString.kt") public void testPropertyToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); } @TestMetadata("typeEqualsHashCode.kt") public void testTypeEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); } @TestMetadata("typeParametersEqualsHashCode.kt") public void testTypeParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); } @TestMetadata("typeParametersToString.kt") public void testTypeParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); } @TestMetadata("typeToString.kt") public void testTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); } @TestMetadata("typeToStringInnerGeneric.kt") public void testTypeToStringInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); } } @@ -18257,62 +16255,57 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableModality.kt") public void testCallableModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); } @TestMetadata("callableVisibility.kt") public void testCallableVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); } @TestMetadata("classModality.kt") public void testClassModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); } @TestMetadata("classVisibility.kt") public void testClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); } @TestMetadata("javaVisibility.kt") public void testJavaVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); } } @@ -18320,26 +16313,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callFunctionsInMultifileClass.kt") public void testCallFunctionsInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); } @TestMetadata("callPropertiesInMultifileClass.kt") public void testCallPropertiesInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); } @TestMetadata("javaFieldForVarAndConstVal.kt") public void testJavaFieldForVarAndConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); } } @@ -18347,76 +16341,74 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoReflectAtRuntime extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); } @TestMetadata("primitiveJavaClass.kt") public void testPrimitiveJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); } @TestMetadata("propertyGetSetName.kt") public void testPropertyGetSetName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); } @TestMetadata("propertyInstanceof.kt") public void testPropertyInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); } @TestMetadata("reifiedTypeJavaClass.kt") public void testReifiedTypeJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); } @TestMetadata("simpleClassLiterals.kt") public void testSimpleClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); } } } @@ -18425,74 +16417,67 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundInnerClassConstructor.kt") public void testBoundInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); } @TestMetadata("boundObjectMemberReferences.kt") public void testBoundObjectMemberReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); } @TestMetadata("boundReferences.kt") public void testBoundReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); } @TestMetadata("findParameterByName.kt") public void testFindParameterByName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); } @TestMetadata("functionParameterNameAndIndex.kt") public void testFunctionParameterNameAndIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); } @TestMetadata("instanceExtensionReceiverAndValueParameters.kt") public void testInstanceExtensionReceiverAndValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); } @TestMetadata("isMarkedNullable.kt") public void testIsMarkedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); } @TestMetadata("isOptional.kt") public void testIsOptional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); } @TestMetadata("javaAnnotationConstructor.kt") public void testJavaAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); } @TestMetadata("kinds.kt") public void testKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } } @@ -18500,192 +16485,170 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("allVsDeclared.kt") public void testAllVsDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); } @TestMetadata("callPrivatePropertyFromGetProperties.kt") public void testCallPrivatePropertyFromGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); } @TestMetadata("declaredVsInheritedProperties.kt") public void testDeclaredVsInheritedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); } @TestMetadata("genericClassLiteralPropertyReceiverIsStar.kt") public void testGenericClassLiteralPropertyReceiverIsStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); } @TestMetadata("genericOverriddenProperty.kt") public void testGenericOverriddenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); } @TestMetadata("getExtensionPropertiesMutableVsReadonly.kt") public void testGetExtensionPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); } @TestMetadata("getPropertiesMutableVsReadonly.kt") public void testGetPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); } @TestMetadata("invokeKProperty.kt") public void testInvokeKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); } @TestMetadata("javaPropertyInheritedInKotlin.kt") public void testJavaPropertyInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); } @TestMetadata("javaStaticField.kt") public void testJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); } @TestMetadata("kotlinPropertyInheritedInJava.kt") public void testKotlinPropertyInheritedInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); } @TestMetadata("memberAndMemberExtensionWithSameName.kt") public void testMemberAndMemberExtensionWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); } @TestMetadata("mutatePrivateJavaInstanceField.kt") public void testMutatePrivateJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); } @TestMetadata("mutatePrivateJavaStaticField.kt") public void testMutatePrivateJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); } @TestMetadata("noConflictOnKotlinGetterAndJavaField.kt") public void testNoConflictOnKotlinGetterAndJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); } @TestMetadata("overrideKotlinPropertyByJavaMethod.kt") public void testOverrideKotlinPropertyByJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); } @TestMetadata("privateClassVal.kt") public void testPrivateClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); } @TestMetadata("privateClassVar.kt") public void testPrivateClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); } @TestMetadata("privateFakeOverrideFromSuperclass.kt") public void testPrivateFakeOverrideFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); } @TestMetadata("privateJvmStaticVarInObject.kt") public void testPrivateJvmStaticVarInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); } @TestMetadata("privatePropertyCallIsAccessibleOnAccessors.kt") public void testPrivatePropertyCallIsAccessibleOnAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); } @TestMetadata("privateToThisAccessors.kt") public void testPrivateToThisAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); } @TestMetadata("propertyOfNestedClassAndArrayType.kt") public void testPropertyOfNestedClassAndArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); } @TestMetadata("publicClassValAccessible.kt") public void testPublicClassValAccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); } @TestMetadata("referenceToJavaFieldOfKotlinSubclass.kt") public void testReferenceToJavaFieldOfKotlinSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); } @TestMetadata("simpleGetProperties.kt") public void testSimpleGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); } public void testAllFilesPresentInAccessors() throws Exception { @@ -18694,26 +16657,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); } @TestMetadata("memberExtensions.kt") public void testMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); } @TestMetadata("topLevelPropertyAccessors.kt") public void testTopLevelPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); } } @@ -18721,98 +16680,87 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GetDelegate extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGetDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("booleanPropertyNameStartsWithIs.kt") public void testBooleanPropertyNameStartsWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); } @TestMetadata("boundExtensionProperty.kt") public void testBoundExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); } @TestMetadata("boundMemberProperty.kt") public void testBoundMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); } @TestMetadata("getExtensionDelegate.kt") public void testGetExtensionDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); } @TestMetadata("kPropertyForDelegatedProperty.kt") public void testKPropertyForDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); } @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); } @TestMetadata("nameClashClassAndCompanion.kt") public void testNameClashClassAndCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); } @TestMetadata("nameClashExtensionProperties.kt") public void testNameClashExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); } @TestMetadata("noSetAccessibleTrue.kt") public void testNoSetAccessibleTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); } @TestMetadata("notDelegatedProperty.kt") public void testNotDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); } @TestMetadata("overrideDelegatedByDelegated.kt") public void testOverrideDelegatedByDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); } } @@ -18820,38 +16768,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalDelegated extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalDelegated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/defaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/defaultImpls.kt"); } @TestMetadata("inlineFun.kt") public void testInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/inlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/inlineFun.kt"); } @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/localDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/localDelegatedProperty.kt"); } @TestMetadata("multiFileClass.kt") public void testMultiFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/multiFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/multiFileClass.kt"); } @TestMetadata("variableOfGenericType.kt") public void testVariableOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/variableOfGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/variableOfGenericType.kt"); } } } @@ -18862,8 +16809,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public static class SpecialBuiltIns extends AbstractIrBlackBoxCodegenTest { @TestMetadata("getMembersOfStandardJavaClasses.kt") public void ignoreGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInSpecialBuiltIns() throws Exception { @@ -18875,38 +16825,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Supertypes extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSupertypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("builtInClassSupertypes.kt") public void testBuiltInClassSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); } @TestMetadata("genericSubstitution.kt") public void testGenericSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); } @TestMetadata("isSubclassOfIsSuperclassOf.kt") public void testIsSubclassOfIsSuperclassOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); } @TestMetadata("simpleSupertypes.kt") public void testSimpleSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); } } @@ -18914,26 +16863,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("declarationSiteVariance.kt") public void testDeclarationSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); } @TestMetadata("typeParametersAndNames.kt") public void testTypeParametersAndNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); } @TestMetadata("upperBounds.kt") public void testUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); } } @@ -18941,118 +16891,109 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classifierIsClass.kt") public void testClassifierIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); } @TestMetadata("classifierIsTypeParameter.kt") public void testClassifierIsTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); } @TestMetadata("classifiersOfBuiltInTypes.kt") public void testClassifiersOfBuiltInTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); } @TestMetadata("innerGenericArguments.kt") public void testInnerGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); } @TestMetadata("jvmErasureOfClass.kt") public void testJvmErasureOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); } @TestMetadata("jvmErasureOfTypeParameter.kt") public void testJvmErasureOfTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); } @TestMetadata("platformTypeClassifier.kt") public void testPlatformTypeClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeClassifier.kt"); } @TestMetadata("platformTypeNotEqualToKotlinType.kt") public void testPlatformTypeNotEqualToKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); } @TestMetadata("platformTypeToString.kt") public void testPlatformTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeToString.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); } @TestMetadata("useSiteVariance.kt") public void testUseSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/withNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/withNullability.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateType extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCreateType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("equality.kt") public void testEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); } @TestMetadata("simpleCreateType.kt") public void testSimpleCreateType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); } @TestMetadata("wrongNumberOfArguments.kt") public void testWrongNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); } } @@ -19060,32 +17001,32 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Subtyping extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSubtyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("platformType.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); } @TestMetadata("simpleGenericTypes.kt") public void testSimpleGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); } @TestMetadata("simpleSubtypeSupertype.kt") public void testSimpleSubtypeSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); } @TestMetadata("typeProjection.kt") public void testTypeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); } } } @@ -19095,530 +17036,447 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("approximateIntersectionType.kt") public void testApproximateIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); } @TestMetadata("arrayLengthNPE.kt") public void testArrayLengthNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/collections.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/collections.kt"); } @TestMetadata("commonSupertypeContravariant.kt") public void testCommonSupertypeContravariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); } @TestMetadata("commonSupertypeContravariant2.kt") public void testCommonSupertypeContravariant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); } @TestMetadata("dontCaptureTypesWithTypeVariables.kt") public void testDontCaptureTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); } @TestMetadata("doubleMerge.kt") public void testDoubleMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/doubleMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/doubleMerge.kt"); } @TestMetadata("floatMerge.kt") public void testFloatMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/floatMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/floatMerge.kt"); } @TestMetadata("functionLiteralAsLastExpressionInBlock.kt") public void testFunctionLiteralAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/generic.kt"); } @TestMetadata("getGenericInterfaces.kt") public void testGetGenericInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); } @TestMetadata("hashCodeNPE.kt") public void testHashCodeNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); } @TestMetadata("internalTopLevelOtherPackage.kt") public void testInternalTopLevelOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); } @TestMetadata("intersectionAsLastLambda.kt") public void testIntersectionAsLastLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); } @TestMetadata("intersectionOfEqualTypes.kt") public void testIntersectionOfEqualTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); } @TestMetadata("kt10143.kt") public void testKt10143() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10143.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10143.kt"); } @TestMetadata("kt10934.kt") public void testKt10934() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10934.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10934.kt"); } @TestMetadata("Kt1149.kt") public void testKt1149() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1149.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1149.kt"); } @TestMetadata("kt1172.kt") public void testKt1172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1172.kt"); } @TestMetadata("kt1202.kt") public void testKt1202() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1202.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1202.kt"); } @TestMetadata("kt13381.kt") public void testKt13381() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt13381.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt13381.kt"); } @TestMetadata("kt1406.kt") public void testKt1406() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1406.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1406.kt"); } @TestMetadata("kt14447.kt") public void testKt14447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt14447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt14447.kt"); } @TestMetadata("kt1515.kt") public void testKt1515() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1515.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1515.kt"); } @TestMetadata("kt15196.kt") public void testKt15196() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt15196.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt15196.kt"); } @TestMetadata("kt1528.kt") public void testKt1528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1528.kt"); } @TestMetadata("kt1568.kt") public void testKt1568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1568.kt"); } @TestMetadata("Kt1619Test.kt") public void testKt1619Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); } @TestMetadata("kt1779.kt") public void testKt1779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1779.kt"); } @TestMetadata("kt1800.kt") public void testKt1800() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1800.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1800.kt"); } @TestMetadata("kt1845.kt") public void testKt1845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1845.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1845.kt"); } @TestMetadata("kt18779.kt") public void testKt18779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt18779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt18779.kt"); } @TestMetadata("kt1932.kt") public void testKt1932() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1932.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1932.kt"); } @TestMetadata("kt2017.kt") public void testKt2017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2017.kt"); } @TestMetadata("kt2060.kt") public void testKt2060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2060.kt"); } @TestMetadata("kt2210.kt") public void testKt2210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2210.kt"); } @TestMetadata("kt2246.kt") public void testKt2246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2246.kt"); } @TestMetadata("kt2318.kt") public void testKt2318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2318.kt"); } @TestMetadata("Kt2495Test.kt") public void testKt2495Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); } @TestMetadata("kt2509.kt") public void testKt2509() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2509.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2509.kt"); } @TestMetadata("kt2593.kt") public void testKt2593() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2593.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2593.kt"); } @TestMetadata("kt274.kt") public void testKt274() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt274.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt274.kt"); } @TestMetadata("kt3046.kt") public void testKt3046() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3046.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3046.kt"); } @TestMetadata("kt3107.kt") public void testKt3107() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3107.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3107.kt"); } @TestMetadata("kt3421.kt") public void testKt3421() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3421.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3421.kt"); } @TestMetadata("kt344.kt") public void testKt344() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt344.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt344.kt"); } @TestMetadata("kt3442.kt") public void testKt3442() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3442.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3442.kt"); } @TestMetadata("kt3587.kt") public void testKt3587() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3587.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3587.kt"); } @TestMetadata("kt3850.kt") public void testKt3850() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3850.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3850.kt"); } @TestMetadata("kt3903.kt") public void testKt3903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3903.kt"); } @TestMetadata("kt4142.kt") public void testKt4142() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4142.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4142.kt"); } @TestMetadata("kt4259.kt") public void testKt4259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4259.kt"); } @TestMetadata("kt4262.kt") public void testKt4262() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4262.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4262.kt"); } @TestMetadata("kt4281.kt") public void testKt4281() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4281.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4281.kt"); } @TestMetadata("kt5056.kt") public void testKt5056() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5056.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5056.kt"); } @TestMetadata("kt528.kt") public void testKt528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt528.kt"); } @TestMetadata("kt529.kt") public void testKt529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt529.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt529.kt"); } @TestMetadata("kt533.kt") public void testKt533() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt533.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt533.kt"); } @TestMetadata("kt5395.kt") public void testKt5395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5395.kt"); } @TestMetadata("kt5445.kt") public void testKt5445() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5445.kt"); } @TestMetadata("kt5445_2.kt") public void testKt5445_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5445_2.kt"); } @TestMetadata("kt5786_privateWithDefault.kt") public void testKt5786_privateWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); } @TestMetadata("kt5953.kt") public void testKt5953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5953.kt"); } @TestMetadata("kt6153.kt") public void testKt6153() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6153.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6153.kt"); } @TestMetadata("kt6434.kt") public void testKt6434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434.kt"); } @TestMetadata("kt6434_2.kt") public void testKt6434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434_2.kt"); } @TestMetadata("kt6485.kt") public void testKt6485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6485.kt"); } @TestMetadata("kt715.kt") public void testKt715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt715.kt"); } @TestMetadata("kt7401.kt") public void testKt7401() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt7401.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt7401.kt"); } @TestMetadata("kt789.kt") public void testKt789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt789.kt"); } @TestMetadata("kt864.kt") public void testKt864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt864.kt"); } @TestMetadata("kt998.kt") public void testKt998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt998.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt998.kt"); } @TestMetadata("lambdaAsLastExpressionInLambda.kt") public void testLambdaAsLastExpressionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); } @TestMetadata("lambdaPostponeConstruction.kt") public void testLambdaPostponeConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); } @TestMetadata("lambdaWrongReturnType.kt") public void testLambdaWrongReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); } @TestMetadata("nestedIntersection.kt") public void testNestedIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); } @TestMetadata("noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt") public void testNoAssertionsWhenNullableTypeParameterReplacedWithIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); } @TestMetadata("noCapturingForTypesWithTypeVariables.kt") public void testNoCapturingForTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); } @TestMetadata("noResolutionRecursion.kt") public void testNoResolutionRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); } @TestMetadata("nullabilityForCommonCapturedSupertypes.kt") public void testNullabilityForCommonCapturedSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); } @TestMetadata("nullableAfterExclExcl.kt") public void testNullableAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); } @TestMetadata("objectCaptureOuterConstructorProperty.kt") public void testObjectCaptureOuterConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); } @TestMetadata("objectInsideDelegation.kt") public void testObjectInsideDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); } @TestMetadata("referenceToSelfInLocal.kt") public void testReferenceToSelfInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); } @TestMetadata("resolvedCallForGetOperator.kt") public void testResolvedCallForGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); } @TestMetadata("supertypeDepth.kt") public void testSupertypeDepth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); } @TestMetadata("typeCastException.kt") public void testTypeCastException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/typeCastException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/typeCastException.kt"); } } @@ -19626,232 +17484,204 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObject.kt"); } @TestMetadata("anonymousObjectNoPropagate.kt") public void testAnonymousObjectNoPropagate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); } @TestMetadata("anonymousObjectReifiedSupertype.kt") public void testAnonymousObjectReifiedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); } @TestMetadata("approximateCapturedTypes.kt") public void testApproximateCapturedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); } @TestMetadata("asOnPlatformType.kt") public void testAsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/checkcast.kt"); } @TestMetadata("copyToArray.kt") public void testCopyToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/copyToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/copyToArray.kt"); } @TestMetadata("DIExample.kt") public void testDIExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/DIExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/DIExample.kt"); } @TestMetadata("defaultJavaClass.kt") public void testDefaultJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); } @TestMetadata("expectedTypeFromCast.kt") public void testExpectedTypeFromCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); } @TestMetadata("filterIsInstance.kt") public void testFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/filterIsInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/filterIsInstance.kt"); } @TestMetadata("innerAnonymousObject.kt") public void testInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); } @TestMetadata("instanceof.kt") public void testInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/instanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } @TestMetadata("isOnPlatformType.kt") public void testIsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/javaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nestedReified.kt"); } @TestMetadata("nestedReifiedSignature.kt") public void testNestedReifiedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); } @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/newArrayInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); } @TestMetadata("nonInlineableLambdaInReifiedFunction.kt") public void testNonInlineableLambdaInReifiedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); } @TestMetadata("recursiveInnerAnonymousObject.kt") public void testRecursiveInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); } @TestMetadata("recursiveNewArray.kt") public void testRecursiveNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); } @TestMetadata("recursiveNonInlineableLambda.kt") public void testRecursiveNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); } @TestMetadata("reifiedChain.kt") public void testReifiedChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedChain.kt"); } @TestMetadata("reifiedInlineFunOfObject.kt") public void testReifiedInlineFunOfObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); } @TestMetadata("reifiedInlineFunOfObjectWithinReified.kt") public void testReifiedInlineFunOfObjectWithinReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); } @TestMetadata("reifiedInlineIntoNonInlineableLambda.kt") public void testReifiedInlineIntoNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); } @TestMetadata("safecast.kt") public void testSafecast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/safecast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/safecast.kt"); } @TestMetadata("sameIndexRecursive.kt") public void testSameIndexRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); } @TestMetadata("spreads.kt") public void testSpreads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/spreads.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/spreads.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/varargs.kt"); } @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArraysReification extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArraysReification() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("instanceOf.kt") public void testInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); } @TestMetadata("instanceOfArrays.kt") public void testInstanceOfArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); } @TestMetadata("jClass.kt") public void testJClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); } @TestMetadata("jaggedArray.kt") public void testJaggedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); } @TestMetadata("jaggedArrayOfNulls.kt") public void testJaggedArrayOfNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); } @TestMetadata("jaggedDeep.kt") public void testJaggedDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); } } } @@ -19860,86 +17690,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/genericNull.kt"); } @TestMetadata("kt1572.kt") public void testKt1572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt1572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt1572.kt"); } @TestMetadata("kt232.kt") public void testKt232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt232.kt"); } @TestMetadata("kt245.kt") public void testKt245() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt245.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt245.kt"); } @TestMetadata("kt247.kt") public void testKt247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt247.kt"); } @TestMetadata("kt3430.kt") public void testKt3430() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt3430.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt3430.kt"); } @TestMetadata("kt4733.kt") public void testKt4733() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt4733.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt4733.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitive.kt"); } @TestMetadata("primitiveEqSafeCall.kt") public void testPrimitiveEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); } @TestMetadata("primitiveNotEqSafeCall.kt") public void testPrimitiveNotEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); } @TestMetadata("safeCallEqPrimitive.kt") public void testSafeCallEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); } @TestMetadata("safeCallNotEqPrimitive.kt") public void testSafeCallNotEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); } @TestMetadata("safeCallOnLong.kt") public void testSafeCallOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); } } @@ -19947,136 +17768,124 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091.kt"); } @TestMetadata("kt17091_2.kt") public void testKt17091_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_2.kt"); } @TestMetadata("kt17091_3.kt") public void testKt17091_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_3.kt"); } @TestMetadata("kt17091_4.kt") public void testKt17091_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_4.kt"); } @TestMetadata("kt22906.kt") public void testKt22906() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt22906.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt22906.kt"); } @TestMetadata("kt22906_2.kt") public void testKt22906_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt22906_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt22906_2.kt"); } @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparator.kt") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/comparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/comparator.kt"); } @TestMetadata("filenameFilter.kt") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); } @TestMetadata("kt19251.kt") public void testKt19251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/kt19251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/kt19251.kt"); } @TestMetadata("kt19251_child.kt") public void testKt19251_child() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/kt19251_child.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/kt19251_child.kt"); } @TestMetadata("nonLiteralComparator.kt") public void testNonLiteralComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); } @TestMetadata("nonLiteralFilenameFilter.kt") public void testNonLiteralFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); } @TestMetadata("nonLiteralRunnable.kt") public void testNonLiteralRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt"); } @TestMetadata("nonTrivialRunnable.kt") public void testNonTrivialRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt"); } @TestMetadata("runnable.kt") public void testRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnable.kt"); } @TestMetadata("runnableAccessingClosure1.kt") public void testRunnableAccessingClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt"); } @TestMetadata("runnableAccessingClosure2.kt") public void testRunnableAccessingClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt"); } @TestMetadata("samWrappersDifferentFiles.kt") public void testSamWrappersDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); } @TestMetadata("sameWrapperClass.kt") public void testSameWrapperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); } @TestMetadata("syntheticVsReal.kt") public void testSyntheticVsReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt"); } } } @@ -20085,20 +17894,22 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/objects.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/simple.kt"); } } @@ -20106,16 +17917,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); } @TestMetadata("accessToNestedObject.kt") public void testAccessToNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); } public void testAllFilesPresentInSecondaryConstructors() throws Exception { @@ -20124,176 +17937,147 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("basicNoPrimaryManySinks.kt") public void testBasicNoPrimaryManySinks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); } @TestMetadata("basicNoPrimaryOneSink.kt") public void testBasicNoPrimaryOneSink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); } @TestMetadata("basicPrimary.kt") public void testBasicPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); } @TestMetadata("callFromLocalSubClass.kt") public void testCallFromLocalSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); } @TestMetadata("callFromPrimaryWithNamedArgs.kt") public void testCallFromPrimaryWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); } @TestMetadata("callFromPrimaryWithOptionalArgs.kt") public void testCallFromPrimaryWithOptionalArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); } @TestMetadata("callFromSubClass.kt") public void testCallFromSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); } @TestMetadata("clashingDefaultConstructors.kt") public void testClashingDefaultConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); } @TestMetadata("defaultParametersNotDuplicated.kt") public void testDefaultParametersNotDuplicated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); } @TestMetadata("delegateWithComplexExpression.kt") public void testDelegateWithComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); } @TestMetadata("delegatedThisWithLambda.kt") public void testDelegatedThisWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); } @TestMetadata("delegationWithPrimary.kt") public void testDelegationWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); } @TestMetadata("innerClassesInheritance.kt") public void testInnerClassesInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); } @TestMetadata("superCallPrimary.kt") public void testSuperCallPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); } @TestMetadata("superCallSecondary.kt") public void testSuperCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); } @TestMetadata("withGenerics.kt") public void testWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withGenerics.kt"); } @TestMetadata("withNonLocalReturn.kt") public void testWithNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); } @TestMetadata("withPrimary.kt") public void testWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withPrimary.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); } @TestMetadata("withReturnUnit.kt") public void testWithReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withVarargs.kt"); } @TestMetadata("withoutPrimary.kt") public void testWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withoutPrimary.kt"); } } @@ -20301,86 +18085,77 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultAndNamedCombination.kt") public void testDefaultAndNamedCombination() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt"); } @TestMetadata("defaultBoxTypes.kt") public void testDefaultBoxTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt"); } @TestMetadata("defaultEnumType.kt") public void testDefaultEnumType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt"); } @TestMetadata("defaultLongLiteral.kt") public void testDefaultLongLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt"); } @TestMetadata("defaultMultipleParams.kt") public void testDefaultMultipleParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt"); } @TestMetadata("defaultNull.kt") public void testDefaultNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt"); } @TestMetadata("defaultNullableBoxTypes.kt") public void testDefaultNullableBoxTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt"); } @TestMetadata("defaultOverrides.kt") public void testDefaultOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt"); } @TestMetadata("defaultPrimitiveTypes.kt") public void testDefaultPrimitiveTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt"); } @TestMetadata("defaultValueInConstructor.kt") public void testDefaultValueInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt"); } @TestMetadata("defaultWithJavaBase.kt") public void testDefaultWithJavaBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt"); } @TestMetadata("defaultWithKotlinBase.kt") public void testDefaultWithKotlinBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt"); } @TestMetadata("reorderedParameterNames.kt") public void testReorderedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt"); } } @@ -20388,26 +18163,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("chainCalls.kt") public void testChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/chainCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/chainCalls.kt"); } @TestMetadata("infixCalls.kt") public void testInfixCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/infixCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/infixCalls.kt"); } @TestMetadata("simpleCallWithParams.kt") public void testSimpleCallWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/simpleCallWithParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/simpleCallWithParams.kt"); } } @@ -20415,98 +18191,87 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("falseSmartCast.kt") public void testFalseSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); } @TestMetadata("genericIntersection.kt") public void testGenericIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); } @TestMetadata("genericSet.kt") public void testGenericSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericSet.kt"); } @TestMetadata("implicitExtensionReceiver.kt") public void testImplicitExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); } @TestMetadata("implicitMemberReceiver.kt") public void testImplicitMemberReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); } @TestMetadata("implicitReceiverInWhen.kt") public void testImplicitReceiverInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); } @TestMetadata("implicitToGrandSon.kt") public void testImplicitToGrandSon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt17725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt17725.kt"); } @TestMetadata("kt19058.kt") public void testKt19058() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19058.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19058.kt"); } @TestMetadata("kt19100.kt") public void testKt19100() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19100.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19100.kt"); } @TestMetadata("lambdaArgumentWithoutType.kt") public void testLambdaArgumentWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); } @TestMetadata("nullSmartCast.kt") public void testNullSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); } @TestMetadata("smartCastInsideIf.kt") public void testSmartCastInsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); } @TestMetadata("whenSmartCast.kt") public void testWhenSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); } } @@ -20514,152 +18279,132 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltins extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bridgeNotEmptyMap.kt") public void testBridgeNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); } @TestMetadata("bridges.kt") public void testBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); } @TestMetadata("commonBridgesTarget.kt") public void testCommonBridgesTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); } @TestMetadata("emptyMap.kt") public void testEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); } @TestMetadata("emptyStringMap.kt") public void testEmptyStringMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); } @TestMetadata("entrySetSOE.kt") public void testEntrySetSOE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); } @TestMetadata("enumAsOrdinaled.kt") public void testEnumAsOrdinaled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); } @TestMetadata("exceptionCause.kt") public void testExceptionCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); } @TestMetadata("explicitSuperCall.kt") public void testExplicitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); } @TestMetadata("irrelevantRemoveAtOverride.kt") public void testIrrelevantRemoveAtOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); } @TestMetadata("maps.kt") public void testMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/maps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/maps.kt"); } @TestMetadata("noSpecialBridgeInSuperClass.kt") public void testNoSpecialBridgeInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); } @TestMetadata("notEmptyListAny.kt") public void testNotEmptyListAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); } @TestMetadata("notEmptyMap.kt") public void testNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); } @TestMetadata("redundantStubForSize.kt") public void testRedundantStubForSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); } @TestMetadata("removeAtTwoSpecialBridges.kt") public void testRemoveAtTwoSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); } @TestMetadata("removeSetInt.kt") public void testRemoveSetInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); } @TestMetadata("throwableCause.kt") public void testThrowableCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); } @TestMetadata("throwableImpl.kt") public void testThrowableImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); } @TestMetadata("throwableImplWithSecondaryConstructor.kt") public void testThrowableImplWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); } @TestMetadata("valuesInsideEnum.kt") public void testValuesInsideEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); } } @@ -20667,104 +18412,92 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousInitializerIObject.kt") public void testAnonymousInitializerIObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); } @TestMetadata("anonymousInitializerInClassObject.kt") public void testAnonymousInitializerInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); } @TestMetadata("fields.kt") public void testFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/fields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/fields.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/functions.kt"); } @TestMetadata("hidePrivateByPublic.kt") public void testHidePrivateByPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); } @TestMetadata("incInClassObject.kt") public void testIncInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInClassObject.kt"); } @TestMetadata("incInObject.kt") public void testIncInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInObject.kt"); } @TestMetadata("inheritedPropertyInClassObject.kt") public void testInheritedPropertyInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); } @TestMetadata("inheritedPropertyInObject.kt") public void testInheritedPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); } @TestMetadata("inlineCallsStaticMethod.kt") public void testInlineCallsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); } @TestMetadata("kt8089.kt") public void testKt8089() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/kt8089.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/kt8089.kt"); } @TestMetadata("protectedSamConstructor.kt") public void testProtectedSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); } @TestMetadata("protectedStatic.kt") public void testProtectedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStatic.kt"); } @TestMetadata("protectedStatic2.kt") public void testProtectedStatic2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStatic2.kt"); } @TestMetadata("protectedStaticAndInline.kt") public void testProtectedStaticAndInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); } } @@ -20772,38 +18505,37 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StoreStackBeforeInline extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); } @TestMetadata("primitiveMerge.kt") public void testPrimitiveMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); } @TestMetadata("unreachableMarker.kt") public void testUnreachableMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); } @TestMetadata("withLambda.kt") public void testWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); } } @@ -20811,116 +18543,102 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Strings extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStrings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); } @TestMetadata("ea35743.kt") public void testEa35743() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/ea35743.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/ea35743.kt"); } @TestMetadata("forInString.kt") public void testForInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/forInString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/forInString.kt"); } @TestMetadata("interpolation.kt") public void testInterpolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/interpolation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/interpolation.kt"); } @TestMetadata("kt2592.kt") public void testKt2592() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt2592.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt2592.kt"); } @TestMetadata("kt3571.kt") public void testKt3571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3571.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3571.kt"); } @TestMetadata("kt3652.kt") public void testKt3652() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3652.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3652.kt"); } @TestMetadata("kt5389_stringBuilderGet.kt") public void testKt5389_stringBuilderGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); } @TestMetadata("kt5956.kt") public void testKt5956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5956.kt"); } @TestMetadata("kt881.kt") public void testKt881() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt881.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt881.kt"); } @TestMetadata("kt889.kt") public void testKt889() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt889.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt889.kt"); } @TestMetadata("kt894.kt") public void testKt894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt894.kt"); } @TestMetadata("multilineStringsWithTemplates.kt") public void testMultilineStringsWithTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); } @TestMetadata("nestedConcat.kt") public void testNestedConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/nestedConcat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/nestedConcat.kt"); } @TestMetadata("rawStrings.kt") public void testRawStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStrings.kt"); } @TestMetadata("rawStringsWithManyQuotes.kt") public void testRawStringsWithManyQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); } @TestMetadata("stringBuilderAppend.kt") public void testStringBuilderAppend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); } @TestMetadata("stringPlusOnlyWorksOnString.kt") public void testStringPlusOnlyWorksOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); } } @@ -20928,220 +18646,194 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("basicmethodSuperClass.kt") public void testBasicmethodSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); } @TestMetadata("basicmethodSuperTrait.kt") public void testBasicmethodSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); } @TestMetadata("basicproperty.kt") public void testBasicproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicproperty.kt"); } @TestMetadata("enclosedFun.kt") public void testEnclosedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedFun.kt"); } @TestMetadata("enclosedVar.kt") public void testEnclosedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedVar.kt"); } @TestMetadata("innerClassLabeledSuper.kt") public void testInnerClassLabeledSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); } @TestMetadata("innerClassLabeledSuper2.kt") public void testInnerClassLabeledSuper2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); } @TestMetadata("innerClassLabeledSuperProperty.kt") public void testInnerClassLabeledSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); } @TestMetadata("innerClassLabeledSuperProperty2.kt") public void testInnerClassLabeledSuperProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); } @TestMetadata("innerClassQualifiedFunctionCall.kt") public void testInnerClassQualifiedFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); } @TestMetadata("innerClassQualifiedPropertyAccess.kt") public void testInnerClassQualifiedPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); } @TestMetadata("kt14243.kt") public void testKt14243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243.kt"); } @TestMetadata("kt14243_2.kt") public void testKt14243_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_2.kt"); } @TestMetadata("kt14243_class.kt") public void testKt14243_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_class.kt"); } @TestMetadata("kt14243_prop.kt") public void testKt14243_prop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_prop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_prop.kt"); } @TestMetadata("kt3492ClassFun.kt") public void testKt3492ClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); } @TestMetadata("kt3492ClassProperty.kt") public void testKt3492ClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); } @TestMetadata("kt3492TraitFun.kt") public void testKt3492TraitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); } @TestMetadata("kt3492TraitProperty.kt") public void testKt3492TraitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); } @TestMetadata("kt4173.kt") public void testKt4173() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173.kt"); } @TestMetadata("kt4173_2.kt") public void testKt4173_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_2.kt"); } @TestMetadata("kt4173_3.kt") public void testKt4173_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_3.kt"); } @TestMetadata("kt4982.kt") public void testKt4982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4982.kt"); } @TestMetadata("multipleSuperTraits.kt") public void testMultipleSuperTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); } @TestMetadata("traitproperty.kt") public void testTraitproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/traitproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/traitproperty.kt"); } @TestMetadata("unqualifiedSuper.kt") public void testUnqualifiedSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); } @TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt") public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); } @TestMetadata("unqualifiedSuperWithMethodsOfAny.kt") public void testUnqualifiedSuperWithMethodsOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); } @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructor extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt17464_arrayOf.kt") public void testKt17464_arrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); } @TestMetadata("kt17464_linkedMapOf.kt") public void testKt17464_linkedMapOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); } @TestMetadata("kt18356.kt") public void testKt18356() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); } @TestMetadata("kt18356_2.kt") public void testKt18356_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); } @TestMetadata("objectExtendsLocalInner.kt") public void testObjectExtendsLocalInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); } } } @@ -21150,74 +18842,67 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Synchronized extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSynchronized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("changeMonitor.kt") public void testChangeMonitor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); } @TestMetadata("exceptionInMonitorExpression.kt") public void testExceptionInMonitorExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/finally.kt"); } @TestMetadata("longValue.kt") public void testLongValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/longValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/longValue.kt"); } @TestMetadata("nestedDifferentObjects.kt") public void testNestedDifferentObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); } @TestMetadata("nestedSameObject.kt") public void testNestedSameObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); } @TestMetadata("objectValue.kt") public void testObjectValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/objectValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/objectValue.kt"); } @TestMetadata("sync.kt") public void testSync() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/sync.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/sync.kt"); } @TestMetadata("value.kt") public void testValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/value.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/value.kt"); } @TestMetadata("wait.kt") public void testWait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/wait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/wait.kt"); } } @@ -21225,34 +18910,33 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorForGenericConstructor.kt") public void testAccessorForGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); } @TestMetadata("accessorForGenericMethod.kt") public void testAccessorForGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); } @TestMetadata("accessorForGenericMethodWithDefaults.kt") public void testAccessorForGenericMethodWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); } @TestMetadata("accessorForProtected.kt") public void testAccessorForProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); } @TestMetadata("accessorForProtectedInvokeVirtual.kt") public void testAccessorForProtectedInvokeVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); } public void testAllFilesPresentInSyntheticAccessors() throws Exception { @@ -21261,62 +18945,52 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("jvmNameForAccessors.kt") public void testJvmNameForAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); } @TestMetadata("kt10047.kt") public void testKt10047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); } @TestMetadata("kt21258_indirect.kt") public void testKt21258_indirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); } @TestMetadata("kt21258_simple.kt") public void testKt21258_simple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); } @TestMetadata("kt9717.kt") public void testKt9717() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); } @TestMetadata("kt9717DifferentPackages.kt") public void testKt9717DifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); } @TestMetadata("kt9958.kt") public void testKt9958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); } @TestMetadata("kt9958Interface.kt") public void testKt9958Interface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); } @TestMetadata("protectedFromLambda.kt") public void testProtectedFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); } @TestMetadata("syntheticAccessorNames.kt") public void testSyntheticAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); } } @@ -21324,50 +18998,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToArray extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInToArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt3177-toTypedArray.kt") public void testKt3177_toTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); } @TestMetadata("returnToTypedArray.kt") public void testReturnToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); } @TestMetadata("toArray.kt") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArray.kt"); } @TestMetadata("toArrayAlreadyPresent.kt") public void testToArrayAlreadyPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayAlreadyPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayAlreadyPresent.kt"); } @TestMetadata("toArrayShouldBePublic.kt") public void testToArrayShouldBePublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayShouldBePublic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayShouldBePublic.kt"); } @TestMetadata("toArrayShouldBePublicWithJava.kt") public void testToArrayShouldBePublicWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayShouldBePublicWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayShouldBePublicWithJava.kt"); } @TestMetadata("toTypedArray.kt") public void testToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toTypedArray.kt"); } } @@ -21375,44 +19046,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelPrivate extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTopLevelPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade.kt") public void testNoPrivateNoAccessorsInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade2.kt") public void testNoPrivateNoAccessorsInMultiFileFacade2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); } @TestMetadata("privateInInlineNested.kt") public void testPrivateInInlineNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); } @TestMetadata("privateVisibility.kt") public void testPrivateVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); } @TestMetadata("syntheticAccessorInMultiFile.kt") public void testSyntheticAccessorInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); } } @@ -21420,10 +19089,13 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Traits extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); } public void testAllFilesPresentInTraits() throws Exception { @@ -21432,176 +19104,147 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestMetadata("diamondPropertyAccessors.kt") public void testDiamondPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/genericMethod.kt"); } @TestMetadata("indirectlyInheritPropertyGetter.kt") public void testIndirectlyInheritPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); } @TestMetadata("inheritJavaInterface.kt") public void testInheritJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); } @TestMetadata("inheritedFun.kt") public void testInheritedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedFun.kt"); } @TestMetadata("inheritedVar.kt") public void testInheritedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedVar.kt"); } @TestMetadata("interfaceDefaultImpls.kt") public void testInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirect.kt") public void testInterfaceWithNonAbstractFunIndirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirectGeneric.kt") public void testInterfaceWithNonAbstractFunIndirectGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); } @TestMetadata("kt1936.kt") public void testKt1936() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936.kt"); } @TestMetadata("kt1936_1.kt") public void testKt1936_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936_1.kt"); } @TestMetadata("kt2260.kt") public void testKt2260() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2260.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2260.kt"); } @TestMetadata("kt2399.kt") public void testKt2399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2399.kt"); } @TestMetadata("kt2541.kt") public void testKt2541() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2541.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2541.kt"); } @TestMetadata("kt3315.kt") public void testKt3315() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3315.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3315.kt"); } @TestMetadata("kt3500.kt") public void testKt3500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3500.kt"); } @TestMetadata("kt3579.kt") public void testKt3579() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579.kt"); } @TestMetadata("kt3579_2.kt") public void testKt3579_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579_2.kt"); } @TestMetadata("kt5393.kt") public void testKt5393() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393.kt"); } @TestMetadata("kt5393_property.kt") public void testKt5393_property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393_property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393_property.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/multiple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/multiple.kt"); } @TestMetadata("noPrivateDelegation.kt") public void testNoPrivateDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); } @TestMetadata("traitImplDelegationWithCovariantOverride.kt") public void testTraitImplDelegationWithCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); } @TestMetadata("traitImplDiamond.kt") public void testTraitImplDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); } @TestMetadata("traitImplGenericDelegation.kt") public void testTraitImplGenericDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); } @TestMetadata("traitWithPrivateExtension.kt") public void testTraitWithPrivateExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); } @TestMetadata("traitWithPrivateMember.kt") public void testTraitWithPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); } @TestMetadata("traitWithPrivateMemberAccessFromLambda.kt") public void testTraitWithPrivateMemberAccessFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); } } @@ -21609,50 +19252,47 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeInfo extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asInLoop.kt") public void testAsInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); } @TestMetadata("ifOrWhenSpecialCall.kt") public void testIfOrWhenSpecialCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); } @TestMetadata("implicitSmartCastThis.kt") public void testImplicitSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/inheritance.kt"); } @TestMetadata("kt2811.kt") public void testKt2811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/kt2811.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/kt2811.kt"); } @TestMetadata("primitiveTypeInfo.kt") public void testPrimitiveTypeInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); } @TestMetadata("smartCastThis.kt") public void testSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); } } @@ -21660,68 +19300,62 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMapping extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enhancedPrimitives.kt") public void testEnhancedPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); } @TestMetadata("genericTypeWithNothing.kt") public void testGenericTypeWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); } @TestMetadata("kt2831.kt") public void testKt2831() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt2831.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt2831.kt"); } @TestMetadata("kt309.kt") public void testKt309() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt309.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt309.kt"); } @TestMetadata("kt3286.kt") public void testKt3286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3286.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3286.kt"); } @TestMetadata("kt3863.kt") public void testKt3863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3863.kt"); } @TestMetadata("kt3976.kt") public void testKt3976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3976.kt"); } @TestMetadata("nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nothing.kt"); } @TestMetadata("nullableNothing.kt") public void testNullableNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); } @TestMetadata("typeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); } } @@ -21729,116 +19363,102 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); } @TestMetadata("genericTypeAliasConstructor.kt") public void testGenericTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); } @TestMetadata("genericTypeAliasConstructor2.kt") public void testGenericTypeAliasConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); } @TestMetadata("innerClassTypeAliasConstructor.kt") public void testInnerClassTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); } @TestMetadata("innerClassTypeAliasConstructorInSupertypes.kt") public void testInnerClassTypeAliasConstructorInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/kt15109.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/kt15109.kt"); } @TestMetadata("objectLiteralConstructor.kt") public void testObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/simple.kt"); } @TestMetadata("typeAliasAsBareType.kt") public void testTypeAliasAsBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); } @TestMetadata("typeAliasCompanion.kt") public void testTypeAliasCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); } @TestMetadata("typeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); } @TestMetadata("typeAliasConstructorAccessor.kt") public void testTypeAliasConstructorAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); } @TestMetadata("typeAliasConstructorForArray.kt") public void testTypeAliasConstructorForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); } @TestMetadata("typeAliasConstructorInSuperCall.kt") public void testTypeAliasConstructorInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); } @TestMetadata("typeAliasObject.kt") public void testTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); } @TestMetadata("typeAliasObjectCallable.kt") public void testTypeAliasObjectCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); } @TestMetadata("typeAliasSecondaryConstructor.kt") public void testTypeAliasSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); } } @@ -21846,44 +19466,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryOp extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/call.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callNullable.kt"); } @TestMetadata("callWithCommonType.kt") public void testCallWithCommonType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); } @TestMetadata("longOverflow.kt") public void testLongOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); } } @@ -21891,74 +19509,67 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unit extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("closureReturnsNullableUnit.kt") public void testClosureReturnsNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/ifElse.kt"); } @TestMetadata("kt3634.kt") public void testKt3634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt3634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt3634.kt"); } @TestMetadata("kt4212.kt") public void testKt4212() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4212.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4212.kt"); } @TestMetadata("kt4265.kt") public void testKt4265() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4265.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4265.kt"); } @TestMetadata("nullableUnit.kt") public void testNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnit.kt"); } @TestMetadata("nullableUnitInWhen1.kt") public void testNullableUnitInWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); } @TestMetadata("nullableUnitInWhen2.kt") public void testNullableUnitInWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); } @TestMetadata("nullableUnitInWhen3.kt") public void testNullableUnitInWhen3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); } @TestMetadata("unitClassObject.kt") public void testUnitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/unitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/unitClassObject.kt"); } @TestMetadata("UnitValue.kt") public void testUnitValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/UnitValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/UnitValue.kt"); } } @@ -21966,68 +19577,62 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("assigningArrayToVarargInAnnotation.kt") public void testAssigningArrayToVarargInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); } @TestMetadata("doNotCopyImmediatelyCreatedArrays.kt") public void testDoNotCopyImmediatelyCreatedArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); } @TestMetadata("kt1978.kt") public void testKt1978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt1978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt1978.kt"); } @TestMetadata("kt581.kt") public void testKt581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt581.kt"); } @TestMetadata("kt6192.kt") public void testKt6192() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt6192.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt6192.kt"); } @TestMetadata("kt796_797.kt") public void testKt796_797() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt796_797.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } @TestMetadata("spreadCopiesArray.kt") public void testSpreadCopiesArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); } @TestMetadata("varargInFunParam.kt") public void testVarargInFunParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInJava.kt"); } @TestMetadata("varargsAndFunctionLiterals.kt") public void testVarargsAndFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); } } @@ -22035,322 +19640,279 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callProperty.kt") public void testCallProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/callProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/callProperty.kt"); } @TestMetadata("emptyWhen.kt") public void testEmptyWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/emptyWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/emptyWhen.kt"); } @TestMetadata("exceptionOnNoMatch.kt") public void testExceptionOnNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); } @TestMetadata("exhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); } @TestMetadata("exhaustiveBreakContinue.kt") public void testExhaustiveBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); } @TestMetadata("exhaustiveWhenInitialization.kt") public void testExhaustiveWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); } @TestMetadata("exhaustiveWhenReturn.kt") public void testExhaustiveWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); } @TestMetadata("implicitExhaustiveAndReturn.kt") public void testImplicitExhaustiveAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); } @TestMetadata("integralWhenWithNoInlinedConstants.kt") public void testIntegralWhenWithNoInlinedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/is.kt"); } @TestMetadata("kt2457.kt") public void testKt2457() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2457.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2457.kt"); } @TestMetadata("kt2466.kt") public void testKt2466() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2466.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2466.kt"); } @TestMetadata("kt5307.kt") public void testKt5307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5307.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5307.kt"); } @TestMetadata("kt5448.kt") public void testKt5448() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5448.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5448.kt"); } @TestMetadata("longInRange.kt") public void testLongInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/longInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/longInRange.kt"); } @TestMetadata("matchNotNullAgainstNullable.kt") public void testMatchNotNullAgainstNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); } @TestMetadata("multipleEntries.kt") public void testMultipleEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/multipleEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/multipleEntries.kt"); } @TestMetadata("noElseExhaustive.kt") public void testNoElseExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustive.kt"); } @TestMetadata("noElseExhaustiveStatement.kt") public void testNoElseExhaustiveStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); } @TestMetadata("noElseExhaustiveUnitExpected.kt") public void testNoElseExhaustiveUnitExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); } @TestMetadata("noElseInStatement.kt") public void testNoElseInStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseInStatement.kt"); } @TestMetadata("noElseNoMatch.kt") public void testNoElseNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseNoMatch.kt"); } @TestMetadata("nullableWhen.kt") public void testNullableWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/nullableWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/nullableWhen.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/range.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/range.kt"); } @TestMetadata("sealedWhenInitialization.kt") public void testSealedWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); } @TestMetadata("switchOptimizationDense.kt") public void testSwitchOptimizationDense() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); } @TestMetadata("switchOptimizationMultipleConditions.kt") public void testSwitchOptimizationMultipleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); } @TestMetadata("switchOptimizationSingleStatementCase.kt") public void testSwitchOptimizationSingleStatementCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); } @TestMetadata("switchOptimizationSparse.kt") public void testSwitchOptimizationSparse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); } @TestMetadata("switchOptimizationStatement.kt") public void testSwitchOptimizationStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); } @TestMetadata("switchOptimizationTypes.kt") public void testSwitchOptimizationTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); } @TestMetadata("switchOptimizationUnordered.kt") public void testSwitchOptimizationUnordered() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); } @TestMetadata("switchOptimizationWithGap.kt") public void testSwitchOptimizationWithGap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); } @TestMetadata("typeDisjunction.kt") public void testTypeDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/typeDisjunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/typeDisjunction.kt"); } @TestMetadata("whenArgumentIsEvaluatedOnlyOnce.kt") public void testWhenArgumentIsEvaluatedOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); } @TestMetadata("whenSafeCallSubjectEvaluatedOnce.kt") public void testWhenSafeCallSubjectEvaluatedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); } @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumOptimization extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnumOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bigEnum.kt") public void testBigEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); } @TestMetadata("enumInsideClassObject.kt") public void testEnumInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); } @TestMetadata("functionLiteralInTopLevel.kt") public void testFunctionLiteralInTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); } @TestMetadata("kt14597.kt") public void testKt14597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); } @TestMetadata("kt14597_full.kt") public void testKt14597_full() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); } @TestMetadata("kt14802.kt") public void testKt14802() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); } @TestMetadata("kt15806.kt") public void testKt15806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); } @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); } @TestMetadata("nonConstantEnum.kt") public void testNonConstantEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); } @TestMetadata("nullableEnum.kt") public void testNullableEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); } @TestMetadata("subjectAny.kt") public void testSubjectAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); } @TestMetadata("withoutElse.kt") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); } } @@ -22358,44 +19920,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringOptimization extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStringOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); } @TestMetadata("duplicatingItemsSameHashCode.kt") public void testDuplicatingItemsSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); } @TestMetadata("sameHashCode.kt") public void testSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); } @TestMetadata("statement.kt") public void testStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); } } } diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java index 43517d270bc..6e114922259 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxInlineCodegenTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,298 +33,259 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumWhen extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnumWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } @@ -328,44 +293,42 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturing extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } @@ -373,80 +336,72 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturingInClass extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } @@ -454,44 +409,42 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } @@ -499,38 +452,37 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TwoCapturedReceivers extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); } } } @@ -539,80 +491,72 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } } @@ -620,44 +564,42 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayConvention extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } @@ -665,20 +607,22 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Builders extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuilders() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } @@ -686,14 +630,17 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BytecodePreprocessing extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } @@ -701,178 +648,159 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } @TestMetadata("filter.kt") public void testFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); } } } @@ -881,44 +809,42 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Capture extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapture() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } @@ -926,50 +852,47 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Complex extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } @@ -977,50 +900,47 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ComplexStack extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplexStack() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } @TestMetadata("simple3.kt") public void testSimple3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } @TestMetadata("simple4.kt") public void testSimple4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } } @@ -1028,62 +948,57 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } @@ -1091,16 +1006,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValues extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } public void testAllFilesPresentInDefaultValues() throws Exception { @@ -1109,390 +1026,336 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaInlining extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } @TestMetadata("instanceCapuredInClass.kt") public void testInstanceCapuredInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); } @TestMetadata("instanceCapuredInInterface.kt") public void testInstanceCapuredInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); } @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); } } } @@ -1501,16 +1364,18 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaskElimination extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } public void testAllFilesPresentInMaskElimination() throws Exception { @@ -1519,32 +1384,27 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); } } } @@ -1553,32 +1413,32 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } @@ -1586,50 +1446,47 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnclosingInfo extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnclosingInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } @@ -1637,86 +1494,77 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt10569.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt18254.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } @TestMetadata("values.kt") public void testValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/values.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } @@ -1724,14 +1572,17 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } @@ -1739,20 +1590,22 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } @@ -1760,14 +1613,17 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } @@ -1775,20 +1631,22 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClassClash extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaClassClash() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } @@ -1796,38 +1654,37 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaTransformation extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaTransformation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } @@ -1835,26 +1692,27 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunInLambda extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalFunInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } @@ -1862,20 +1720,22 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } @@ -1883,50 +1743,47 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoInline extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } @@ -1934,106 +1791,99 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } @@ -2041,106 +1891,99 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } @@ -2148,56 +1991,52 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChained() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } @@ -2205,80 +2044,72 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } @@ -2286,104 +2117,92 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExceptionTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } @@ -2391,14 +2210,17 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); } } } @@ -2408,14 +2230,17 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } @@ -2423,22 +2248,23 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } public void testAllFilesPresentInPrivate() throws Exception { @@ -2447,56 +2273,47 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } @@ -2504,74 +2321,67 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/property.kt"); } @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } @@ -2579,136 +2389,124 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11677.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } @TestMetadata("packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckCast extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } } @@ -2716,56 +2514,52 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } @@ -2773,26 +2567,27 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsCheck extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); } } } @@ -2801,62 +2596,57 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } @@ -2864,122 +2654,107 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimple() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } @@ -2987,106 +2762,99 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assertion.kt") public void testAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } @TestMetadata("smap.kt") public void testSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Anonymous extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymous() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } @@ -3094,62 +2862,57 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } @@ -3157,32 +2920,32 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineOnly extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } } @@ -3190,32 +2953,32 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Newsmap extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewsmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } @@ -3223,20 +2986,22 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); } } } @@ -3245,56 +3010,52 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Special extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecial() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } @TestMetadata("iinc.kt") public void testIinc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } } @@ -3302,92 +3063,82 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackOnReturn extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStackOnReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } @@ -3395,118 +3146,109 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suspend extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultParameter extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } } @@ -3514,56 +3256,52 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Receiver extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } @@ -3571,74 +3309,67 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StateMachine extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStateMachine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } } } @@ -3647,94 +3378,89 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constField.kt") public void testConstField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithinInlineLambda extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithinInlineLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); } } } @@ -3743,14 +3469,17 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } @@ -3758,32 +3487,32 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } @@ -3791,26 +3520,27 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractIrBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); } } } diff --git a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java index e5878292cca..bc06cac2c87 100644 --- a/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests-ir-jvm/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstInlineKotlinTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,298 +33,259 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumWhen extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnumWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } @@ -328,44 +293,42 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturing extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } @@ -373,80 +336,72 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturingInClass extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } @@ -454,44 +409,42 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } @@ -499,38 +452,37 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TwoCapturedReceivers extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); } } } @@ -539,80 +491,72 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } } @@ -620,44 +564,42 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayConvention extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } @@ -665,20 +607,22 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Builders extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuilders() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } @@ -686,14 +630,17 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BytecodePreprocessing extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } @@ -701,178 +648,159 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } @TestMetadata("filter.kt") public void testFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); } } } @@ -881,44 +809,42 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Capture extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapture() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } @@ -926,50 +852,47 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Complex extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } @@ -977,50 +900,47 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ComplexStack extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplexStack() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } @TestMetadata("simple3.kt") public void testSimple3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } @TestMetadata("simple4.kt") public void testSimple4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } } @@ -1028,62 +948,57 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } @@ -1091,16 +1006,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValues extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } public void testAllFilesPresentInDefaultValues() throws Exception { @@ -1109,390 +1026,336 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaInlining extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } @TestMetadata("instanceCapuredInClass.kt") public void testInstanceCapuredInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); } @TestMetadata("instanceCapuredInInterface.kt") public void testInstanceCapuredInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); } @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); } } } @@ -1501,16 +1364,18 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaskElimination extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } public void testAllFilesPresentInMaskElimination() throws Exception { @@ -1519,32 +1384,27 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); } } } @@ -1553,32 +1413,32 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } @@ -1586,50 +1446,47 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnclosingInfo extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnclosingInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } @@ -1637,86 +1494,77 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt10569.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt18254.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } @TestMetadata("values.kt") public void testValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/values.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } @@ -1724,14 +1572,17 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } @@ -1739,20 +1590,22 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } @@ -1760,14 +1613,17 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } @@ -1775,20 +1631,22 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClassClash extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaClassClash() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } @@ -1796,38 +1654,37 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaTransformation extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaTransformation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } @@ -1835,26 +1692,27 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunInLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalFunInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } @@ -1862,20 +1720,22 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } @@ -1883,50 +1743,47 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoInline extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } @@ -1934,106 +1791,99 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } @@ -2041,106 +1891,99 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } @@ -2148,56 +1991,52 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChained() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } @@ -2205,80 +2044,72 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } @@ -2286,104 +2117,92 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExceptionTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } @@ -2391,14 +2210,17 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); } } } @@ -2408,14 +2230,17 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } @@ -2423,22 +2248,23 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } public void testAllFilesPresentInPrivate() throws Exception { @@ -2447,56 +2273,47 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } @@ -2504,74 +2321,67 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/property.kt"); } @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } @@ -2579,136 +2389,124 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11677.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } @TestMetadata("packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckCast extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } } @@ -2716,56 +2514,52 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } @@ -2773,26 +2567,27 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsCheck extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); } } } @@ -2801,62 +2596,57 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } @@ -2864,122 +2654,107 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimple() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } @@ -2987,106 +2762,99 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assertion.kt") public void testAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } @TestMetadata("smap.kt") public void testSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Anonymous extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymous() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } @@ -3094,62 +2862,57 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } @@ -3157,32 +2920,32 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineOnly extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } } @@ -3190,32 +2953,32 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Newsmap extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewsmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } @@ -3223,20 +2986,22 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); } } } @@ -3245,56 +3010,52 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Special extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecial() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } @TestMetadata("iinc.kt") public void testIinc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } } @@ -3302,92 +3063,82 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackOnReturn extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStackOnReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } @@ -3395,118 +3146,109 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suspend extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultParameter extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } } @@ -3514,56 +3256,52 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Receiver extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } @@ -3571,74 +3309,67 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StateMachine extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStateMachine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } } } @@ -3647,94 +3378,89 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constField.kt") public void testConstField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithinInlineLambda extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithinInlineLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); } } } @@ -3743,14 +3469,17 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } @@ -3758,32 +3487,32 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } @@ -3791,26 +3520,27 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractIrCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.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 index fbc00b468da..3909037ae84 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated.java @@ -21,64 +21,64 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); } @TestMetadata("typeUseOnObject.kt") public void testTypeUseOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAnnotationAppliedToType.kt") public void testDefaultAnnotationAppliedToType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); } @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); } @TestMetadata("springNullableWithTypeUse.kt") public void testSpringNullableWithTypeUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); } @TestMetadata("typeUseVsMethodConflict.kt") public void testTypeUseVsMethodConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); } } @@ -86,50 +86,47 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathTestGenerated extends @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeEnhancement extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeEnhancement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedTypeArguments.kt") public void testAnnotatedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); } @TestMetadata("methodWithTypeParameter.kt") public void testMethodWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); } @TestMetadata("notNullVarargsOverrides.kt") public void testNotNullVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); } @TestMetadata("nullableVarargsOverrides.kt") public void testNullableVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); } @TestMetadata("returnTypeDifferentConstructor.kt") public void testReturnTypeDifferentConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); } @TestMetadata("returnTypeOverrideInKotlin.kt") public void testReturnTypeOverrideInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java index b3203d387af..7c921d912da 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java @@ -21,64 +21,64 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); } @TestMetadata("typeUseOnObject.kt") public void testTypeUseOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); } @TestMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jsr305 extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAnnotationAppliedToType.kt") public void testDefaultAnnotationAppliedToType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); } @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); } @TestMetadata("springNullableWithTypeUse.kt") public void testSpringNullableWithTypeUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); } @TestMetadata("typeUseVsMethodConflict.kt") public void testTypeUseVsMethodConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); } } @@ -86,50 +86,47 @@ public class ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeEnhancement extends AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeEnhancement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedTypeArguments.kt") public void testAnnotatedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); } @TestMetadata("methodWithTypeParameter.kt") public void testMethodWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); } @TestMetadata("notNullVarargsOverrides.kt") public void testNotNullVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); } @TestMetadata("nullableVarargsOverrides.kt") public void testNullableVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); } @TestMetadata("returnTypeDifferentConstructor.kt") public void testReturnTypeDifferentConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); } @TestMetadata("returnTypeOverrideInKotlin.kt") public void testReturnTypeOverrideInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - doTest(fileName); + 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 index a8c3b3d3d0c..0656866c491 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/ForeignJava8AnnotationsTestGenerated.java @@ -21,64 +21,64 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8AnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); } @TestMetadata("typeUseOnObject.kt") public void testTypeUseOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAnnotationAppliedToType.kt") public void testDefaultAnnotationAppliedToType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); } @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); } @TestMetadata("springNullableWithTypeUse.kt") public void testSpringNullableWithTypeUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); } @TestMetadata("typeUseVsMethodConflict.kt") public void testTypeUseVsMethodConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); } } @@ -86,50 +86,47 @@ public class ForeignJava8AnnotationsTestGenerated extends AbstractForeignJava8An @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeEnhancement extends AbstractForeignJava8AnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeEnhancement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedTypeArguments.kt") public void testAnnotatedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); } @TestMetadata("methodWithTypeParameter.kt") public void testMethodWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); } @TestMetadata("notNullVarargsOverrides.kt") public void testNotNullVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); } @TestMetadata("nullableVarargsOverrides.kt") public void testNullableVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); } @TestMetadata("returnTypeDifferentConstructor.kt") public void testReturnTypeDifferentConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); } @TestMetadata("returnTypeOverrideInKotlin.kt") public void testReturnTypeOverrideInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.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 index ef9e9549e07..be4905a5403 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignJava8AnnotationsTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignJava8AnnotationsTestGenerated.java @@ -21,64 +21,64 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacForeignJava8AnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/eclipse.kt"); } @TestMetadata("typeUseOnObject.kt") public void testTypeUseOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeUseOnObject.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAnnotationAppliedToType.kt") public void testDefaultAnnotationAppliedToType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToType.kt"); } @TestMetadata("defaultAnnotationAppliedToTypeForCompiledJava.kt") public void testDefaultAnnotationAppliedToTypeForCompiledJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/defaultAnnotationAppliedToTypeForCompiledJava.kt"); } @TestMetadata("springNullableWithTypeUse.kt") public void testSpringNullableWithTypeUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/springNullableWithTypeUse.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeArguments.kt"); } @TestMetadata("typeUseVsMethodConflict.kt") public void testTypeUseVsMethodConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/jsr305/typeUseVsMethodConflict.kt"); } } @@ -86,50 +86,47 @@ public class JavacForeignJava8AnnotationsTestGenerated extends AbstractJavacFore @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeEnhancement extends AbstractJavacForeignJava8AnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeEnhancement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedTypeArguments.kt") public void testAnnotatedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/annotatedTypeArguments.kt"); } @TestMetadata("methodWithTypeParameter.kt") public void testMethodWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/methodWithTypeParameter.kt"); } @TestMetadata("notNullVarargsOverrides.kt") public void testNotNullVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/notNullVarargsOverrides.kt"); } @TestMetadata("nullableVarargsOverrides.kt") public void testNullableVarargsOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/nullableVarargsOverrides.kt"); } @TestMetadata("returnTypeDifferentConstructor.kt") public void testReturnTypeDifferentConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeDifferentConstructor.kt"); } @TestMetadata("returnTypeOverrideInKotlin.kt") public void testReturnTypeOverrideInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/returnTypeOverrideInKotlin.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotationsJava8/tests/typeEnhancement/simple.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java index 63e4009d5d9..6b1aeb59f29 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BlackBoxWithJava8CodegenTestGenerated.java @@ -21,130 +21,119 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("async.kt") public void testAsync() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/async.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/async.kt"); } @TestMetadata("asyncException.kt") public void testAsyncException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/asyncException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/asyncException.kt"); } @TestMetadata("capturedSuperCall.kt") public void testCapturedSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/capturedSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/capturedSuperCall.kt"); } @TestMetadata("defaultMethodCallFromInterface.kt") public void testDefaultMethodCallFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodCallFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/defaultMethodCallFromInterface.kt"); } @TestMetadata("defaultMethodCallViaClass.kt") public void testDefaultMethodCallViaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodCallViaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/defaultMethodCallViaClass.kt"); } @TestMetadata("defaultMethodCallViaInterface.kt") public void testDefaultMethodCallViaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodCallViaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/defaultMethodCallViaInterface.kt"); } @TestMetadata("defaultMethodOverride.kt") public void testDefaultMethodOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/defaultMethodOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/defaultMethodOverride.kt"); } @TestMetadata("dontDelegateToDefaultMethods.kt") public void testDontDelegateToDefaultMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/dontDelegateToDefaultMethods.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/dontDelegateToDefaultMethods.kt"); } @TestMetadata("functionAssertion.kt") public void testFunctionAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/functionAssertion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/functionAssertion.kt"); } @TestMetadata("inheritKotlin.kt") public void testInheritKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/inheritKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/inheritKotlin.kt"); } @TestMetadata("invokeDefaultViaSuper.kt") public void testInvokeDefaultViaSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/invokeDefaultViaSuper.kt"); } @TestMetadata("invokeDefaultViaSuper_16.kt") public void testInvokeDefaultViaSuper_16() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/invokeDefaultViaSuper_16.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/invokeDefaultViaSuper_16.kt"); } @TestMetadata("longChainOfKotlinExtendsFromJavaWithDefault.kt") public void testLongChainOfKotlinExtendsFromJavaWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/longChainOfKotlinExtendsFromJavaWithDefault.kt"); } @TestMetadata("removeIf.kt") public void testRemoveIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/removeIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/removeIf.kt"); } @TestMetadata("samOnInterfaceWithDefaultMethod.kt") public void testSamOnInterfaceWithDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/samOnInterfaceWithDefaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/samOnInterfaceWithDefaultMethod.kt"); } @TestMetadata("stream.kt") public void testStream() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/stream.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/stream.kt"); } @TestMetadata("streamBackwardCompatibility.kt") public void testStreamBackwardCompatibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/streamBackwardCompatibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/streamBackwardCompatibility.kt"); } @TestMetadata("useStream.kt") public void testUseStream() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/useStream.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/useStream.kt"); } @TestMetadata("compiler/testData/codegen/java8/box/builtinStubMethods") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuiltinStubMethods extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuiltinStubMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/builtinStubMethods"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("immutableRemove.kt") public void testImmutableRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/builtinStubMethods/immutableRemove.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/builtinStubMethods/immutableRemove.kt"); } } @@ -152,62 +141,57 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegationBy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegationBy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("byMiddleInterface.kt") public void testByMiddleInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/byMiddleInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/byMiddleInterface.kt"); } @TestMetadata("defaultOverride.kt") public void testDefaultOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/defaultOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/defaultOverride.kt"); } @TestMetadata("delegationToMap.kt") public void testDelegationToMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/delegationToMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/delegationToMap.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/diamond.kt"); } @TestMetadata("diamond2.kt") public void testDiamond2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/diamond2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/diamond2.kt"); } @TestMetadata("inClassDeclaration.kt") public void testInClassDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/inClassDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/inClassDeclaration.kt"); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/mixed.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/simple.kt"); } @TestMetadata("simple1.0.kt") public void testSimple1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/delegationBy/simple1.0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/delegationBy/simple1.0.kt"); } } @@ -215,144 +199,130 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm8 extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm8() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bridgeInClass.kt") public void testBridgeInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/bridgeInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/bridgeInClass.kt"); } @TestMetadata("bridgeInInterface.kt") public void testBridgeInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/bridgeInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/bridgeInInterface.kt"); } @TestMetadata("capturedSuperCall.kt") public void testCapturedSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/capturedSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/capturedSuperCall.kt"); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaultArgs.kt"); } @TestMetadata("inlineFromAnotherFile.kt") public void testInlineFromAnotherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/inlineFromAnotherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/inlineFromAnotherFile.kt"); } @TestMetadata("inlineFromStdlib.kt") public void testInlineFromStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/inlineFromStdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/inlineFromStdlib.kt"); } @TestMetadata("kt11969.kt") public void testKt11969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt11969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt11969.kt"); } @TestMetadata("kt14243.kt") public void testKt14243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt14243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt14243.kt"); } @TestMetadata("kt14243_2.kt") public void testKt14243_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt14243_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt14243_2.kt"); } @TestMetadata("kt14243_prop.kt") public void testKt14243_prop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt14243_prop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt14243_prop.kt"); } @TestMetadata("kt16581.kt") public void testKt16581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt16581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt16581.kt"); } @TestMetadata("kt16581_2.kt") public void testKt16581_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt16581_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt16581_2.kt"); } @TestMetadata("kt16588.kt") public void testKt16588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt16588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt16588.kt"); } @TestMetadata("kt6301.kt") public void testKt6301() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt6301.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt6301.kt"); } @TestMetadata("kt6301_2.kt") public void testKt6301_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/kt6301_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/kt6301_2.kt"); } @TestMetadata("oneImplementation.kt") public void testOneImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/oneImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/oneImplementation.kt"); } @TestMetadata("oneImplementation2.kt") public void testOneImplementation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/oneImplementation2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/oneImplementation2.kt"); } @TestMetadata("simpleCall.kt") public void testSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/simpleCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/simpleCall.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/simpleProperty.kt"); } @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Defaults extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessor.kt") public void testAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/accessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/accessor.kt"); } @TestMetadata("accessorFromCompanion.kt") public void testAccessorFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/accessorFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/accessorFromCompanion.kt"); } @TestMetadata("accessorsFromDefaultImpls.kt") public void testAccessorsFromDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/accessorsFromDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/accessorsFromDefaultImpls.kt"); } public void testAllFilesPresentInDefaults() throws Exception { @@ -361,160 +331,139 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestMetadata("bridgeInClass.kt") public void testBridgeInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInClass.kt"); } @TestMetadata("bridgeInInterface.kt") public void testBridgeInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterface.kt"); } @TestMetadata("bridgeInInterface2.kt") public void testBridgeInInterface2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterface2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterface2.kt"); } @TestMetadata("bridgeInInterfaceWithProperties.kt") public void testBridgeInInterfaceWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterfaceWithProperties.kt"); } @TestMetadata("bridgeInInterfaceWithProperties2.kt") public void testBridgeInInterfaceWithProperties2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeInInterfaceWithProperties2.kt"); } @TestMetadata("bridgeWithJava.kt") public void testBridgeWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/bridgeWithJava.kt"); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/callableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/callableReference.kt"); } @TestMetadata("capturedSuperCall.kt") public void testCapturedSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/capturedSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/capturedSuperCall.kt"); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/defaultArgs.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/diamond.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/inline.kt"); } @TestMetadata("inlineProperty.kt") public void testInlineProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/inlineProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/inlineProperty.kt"); } @TestMetadata("kt11969.kt") public void testKt11969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/kt11969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt11969.kt"); } @TestMetadata("kt14243.kt") public void testKt14243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243.kt"); } @TestMetadata("kt14243_2.kt") public void testKt14243_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243_2.kt"); } @TestMetadata("kt14243_prop.kt") public void testKt14243_prop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243_prop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/kt14243_prop.kt"); } @TestMetadata("oneImplementation.kt") public void testOneImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/oneImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/oneImplementation.kt"); } @TestMetadata("oneImplementation2.kt") public void testOneImplementation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/oneImplementation2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/oneImplementation2.kt"); } @TestMetadata("privateDefaultFromDefaultImpl.kt") public void testPrivateDefaultFromDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/privateDefaultFromDefaultImpl.kt"); } @TestMetadata("privateInDefaultImpls.kt") public void testPrivateInDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/privateInDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/privateInDefaultImpls.kt"); } @TestMetadata("simpleCall.kt") public void testSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/simpleCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/simpleCall.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/simpleProperty.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/superCall.kt"); } @TestMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegationBy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegationBy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy/simple.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/delegationBy/simpleProperty.kt"); } } @@ -522,26 +471,27 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoDelegation extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noDelegationToDefaultMethodInClass.kt") public void testNoDelegationToDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInClass.kt"); } @TestMetadata("noDelegationToDefaultMethodInInterface.kt") public void testNoDelegationToDefaultMethodInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface.kt"); } @TestMetadata("noDelegationToDefaultMethodInInterface2.kt") public void testNoDelegationToDefaultMethodInInterface2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/noDelegation/noDelegationToDefaultMethodInInterface2.kt"); } } @@ -549,14 +499,17 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/defaults/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("propertyAnnotations.kt") public void testPropertyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/defaults/reflection/propertyAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/defaults/reflection/propertyAnnotations.kt"); } } } @@ -565,20 +518,22 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InterfaceFlag extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInterfaceFlag() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/interfaceFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/interfaceFlag/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/interfaceFlag/superCall.kt"); } @TestMetadata("superCallIndirect.kt") public void testSuperCallIndirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/interfaceFlag/superCallIndirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/interfaceFlag/superCallIndirect.kt"); } } @@ -586,14 +541,17 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/jvm8/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/jvm8/optimizations/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/jvm8/optimizations/hashCode.kt"); } } } @@ -602,26 +560,27 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MapGetOrDefault extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMapGetOrDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/mapGetOrDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noTypeSafeBridge.kt") public void testNoTypeSafeBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapGetOrDefault/noTypeSafeBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapGetOrDefault/noTypeSafeBridge.kt"); } @TestMetadata("typeSafeBridge.kt") public void testTypeSafeBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapGetOrDefault/typeSafeBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapGetOrDefault/typeSafeBridge.kt"); } @TestMetadata("typeSafeBridgeNotNullAny.kt") public void testTypeSafeBridgeNotNullAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapGetOrDefault/typeSafeBridgeNotNullAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapGetOrDefault/typeSafeBridgeNotNullAny.kt"); } } @@ -629,32 +588,32 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MapRemove extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMapRemove() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/mapRemove"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noDefaultImpls.kt") public void testNoDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapRemove/noDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapRemove/noDefaultImpls.kt"); } @TestMetadata("readOnlyMap.kt") public void testReadOnlyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapRemove/readOnlyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapRemove/readOnlyMap.kt"); } @TestMetadata("typeSafeBridge.kt") public void testTypeSafeBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapRemove/typeSafeBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapRemove/typeSafeBridge.kt"); } @TestMetadata("typeSafeBridgeNotNullAny.kt") public void testTypeSafeBridgeNotNullAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/mapRemove/typeSafeBridgeNotNullAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/mapRemove/typeSafeBridgeNotNullAny.kt"); } } @@ -662,44 +621,42 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParametersMetadata extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParametersMetadata() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/parametersMetadata"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/parametersMetadata/defaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/parametersMetadata/defaultImpls.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/parametersMetadata/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/parametersMetadata/enum.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/parametersMetadata/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/parametersMetadata/extensionFunction.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/parametersMetadata/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/parametersMetadata/function.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/parametersMetadata/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/parametersMetadata/innerClass.kt"); } @TestMetadata("superParams.kt") public void testSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/parametersMetadata/superParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/parametersMetadata/superParams.kt"); } } @@ -707,34 +664,39 @@ public class BlackBoxWithJava8CodegenTestGenerated extends AbstractBlackBoxCodeg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("realParameterNames.kt") public void testRealParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/reflection/realParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/reflection/realParameterNames.kt"); } @TestMetadata("synthesizedParameterNames.kt") public void testSynthesizedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/reflection/synthesizedParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/reflection/synthesizedParameterNames.kt"); } @TestMetadata("compiler/testData/codegen/java8/box/reflection/parameters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaParametersHaveDefaultNames.kt") public void testJavaParametersHaveDefaultNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/box/reflection/parameters/javaParametersHaveDefaultNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/box/reflection/parameters/javaParametersHaveDefaultNames.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java index 8708854322e..cc995345446 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/BytecodeTextJava8TestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BytecodeTextJava8TestGenerated extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodeText() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,20 +33,22 @@ public class BytecodeTextJava8TestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashCode extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/bytecodeText/hashCode/dataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/bytecodeText/hashCode/dataClass.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/bytecodeText/hashCode/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/bytecodeText/hashCode/hashCode.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java index 58671bd0521..4de304651a0 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,14 +33,17 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm6 extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm6() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jdk8Against6.kt") public void testJdk8Against6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm6/jdk8Against6.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm6/jdk8Against6.kt"); } } @@ -44,6 +51,10 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm8 extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm8() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -52,32 +63,32 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Defaults extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaults() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superCall.kt"); } @TestMetadata("superCallFromInterface.kt") public void testSuperCallFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superCallFromInterface.kt"); } @TestMetadata("superPropAccess.kt") public void testSuperPropAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccess.kt"); } @TestMetadata("superPropAccessFromInterface.kt") public void testSuperPropAccessFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8/defaults/superPropAccessFromInterface.kt"); } } } @@ -86,64 +97,64 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm8against6 extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm8against6() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleCall.kt") public void testSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleCall.kt"); } @TestMetadata("simpleCallWithBigHierarchy.kt") public void testSimpleCallWithBigHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleCallWithBigHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleCallWithBigHierarchy.kt"); } @TestMetadata("simpleCallWithHierarchy.kt") public void testSimpleCallWithHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleCallWithHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleCallWithHierarchy.kt"); } @TestMetadata("simpleProp.kt") public void testSimpleProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleProp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simpleProp.kt"); } @TestMetadata("simplePropWithHierarchy.kt") public void testSimplePropWithHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simplePropWithHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/simplePropWithHierarchy.kt"); } @TestMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation/diamond.kt"); } @TestMetadata("diamond2.kt") public void testDiamond2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation/diamond2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation/diamond2.kt"); } @TestMetadata("diamond3.kt") public void testDiamond3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation/diamond3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/compileKotlinAgainstKotlin/jvm8against6/delegation/diamond3.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java index d83beb835f7..5fb5b62fcdc 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java @@ -21,40 +21,44 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWriteFlags() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/writeFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("interfaceMethod.kt") public void testInterfaceMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/writeFlags/interfaceMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/writeFlags/interfaceMethod.kt"); } @TestMetadata("interfaceProperty.kt") public void testInterfaceProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/writeFlags/interfaceProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/writeFlags/interfaceProperty.kt"); } @TestMetadata("compiler/testData/codegen/java8/writeFlags/defaults") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Defaults extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaults() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/writeFlags/defaults"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/writeFlags/defaults/defaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/writeFlags/defaults/defaultMethod.kt"); } @TestMetadata("defaultProperty.kt") public void testDefaultProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/writeFlags/defaults/defaultProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/writeFlags/defaults/defaultProperty.kt"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/Java8WriteSignatureTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/Java8WriteSignatureTestGenerated.java index c17db1611e9..71aa7cb99df 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/Java8WriteSignatureTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/Java8WriteSignatureTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class Java8WriteSignatureTestGenerated extends AbstractJava8WriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWriteSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/java8/writeSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mutableMapRemove.kt") public void testMutableMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/java8/writeSignature/mutableMapRemove.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/java8/writeSignature/mutableMapRemove.kt"); } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8TestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8TestGenerated.java index b1268a880d3..58ddf7e8afa 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8TestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8TestGenerated.java @@ -23,32 +23,32 @@ public class LoadJava8TestGenerated extends AbstractLoadJava8Test { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJava extends AbstractLoadJava8Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InnerClassTypeAnnotation.java") public void testInnerClassTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); } @TestMetadata("MapRemove.java") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/MapRemove.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/MapRemove.java"); } @TestMetadata("TypeAnnotations.java") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); } @TestMetadata("TypeParameterAnnotations.java") public void testTypeParameterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); } } @@ -56,26 +56,27 @@ public class LoadJava8TestGenerated extends AbstractLoadJava8Test { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceJava extends AbstractLoadJava8Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestSourceJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/sourceJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("MapRemove.java") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/sourceJava/MapRemove.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava8/sourceJava/MapRemove.java"); } @TestMetadata("TypeAnnotations.java") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/sourceJava/TypeAnnotations.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava8/sourceJava/TypeAnnotations.java"); } @TestMetadata("TypeParameterAnnotations.java") public void testTypeParameterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithFastClassReadingTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithFastClassReadingTestGenerated.java index e2b2bebeda7..1120067674a 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithFastClassReadingTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/LoadJava8WithFastClassReadingTestGenerated.java @@ -21,31 +21,31 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LoadJava8WithFastClassReadingTestGenerated extends AbstractLoadJava8WithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InnerClassTypeAnnotation.java") public void testInnerClassTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); } @TestMetadata("MapRemove.java") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/MapRemove.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/MapRemove.java"); } @TestMetadata("TypeAnnotations.java") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); } @TestMetadata("TypeParameterAnnotations.java") public void testTypeParameterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java index d68e3334e1e..1625df6ef68 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJava8UsingJavacTestGenerated.java @@ -23,32 +23,32 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJava extends AbstractLoadJava8UsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InnerClassTypeAnnotation.java") public void testInnerClassTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); } @TestMetadata("MapRemove.java") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/MapRemove.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/MapRemove.java"); } @TestMetadata("TypeAnnotations.java") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); } @TestMetadata("TypeParameterAnnotations.java") public void testTypeParameterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); } } @@ -56,26 +56,27 @@ public class LoadJava8UsingJavacTestGenerated extends AbstractLoadJava8UsingJava @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceJava extends AbstractLoadJava8UsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestSourceJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/sourceJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("MapRemove.java") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/sourceJava/MapRemove.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava8/sourceJava/MapRemove.java"); } @TestMetadata("TypeAnnotations.java") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/sourceJava/TypeAnnotations.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava8/sourceJava/TypeAnnotations.java"); } @TestMetadata("TypeParameterAnnotations.java") public void testTypeParameterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava8/sourceJava/TypeParameterAnnotations.java"); } } } diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/resolve/calls/EnhancedSignaturesResolvedCallsTestGenerated.java b/compiler/tests-java8/tests/org/jetbrains/kotlin/resolve/calls/EnhancedSignaturesResolvedCallsTestGenerated.java index a5dd92f4cdc..7a56d7da746 100644 --- a/compiler/tests-java8/tests/org/jetbrains/kotlin/resolve/calls/EnhancedSignaturesResolvedCallsTestGenerated.java +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/resolve/calls/EnhancedSignaturesResolvedCallsTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnhancedSignatures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,26 +33,27 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collection extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/collection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("collectionRemoveIf.kt") public void testCollectionRemoveIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.kt"); } @TestMetadata("collectionSpliterator.kt") public void testCollectionSpliterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionSpliterator.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionSpliterator.kt"); } @TestMetadata("collectionStream.kt") public void testCollectionStream() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionStream.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionStream.kt"); } } @@ -56,14 +61,17 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Iterable extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIterable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/iterable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("iterableSpliterator.kt") public void testIterableSpliterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/iterable/iterableSpliterator.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/iterable/iterableSpliterator.kt"); } } @@ -71,14 +79,17 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Iterator extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/iterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("iteratorForEachRemaining.kt") public void testIteratorForEachRemaining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.kt"); } } @@ -86,20 +97,22 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class List extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/list"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("listReplaceAll.kt") public void testListReplaceAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.kt"); } @TestMetadata("listStream.kt") public void testListStream() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/list/listStream.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/list/listStream.kt"); } } @@ -107,50 +120,47 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Map extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/map"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mapCompute.kt") public void testMapCompute() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.kt"); } @TestMetadata("mapComputeIfAbsent.kt") public void testMapComputeIfAbsent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.kt"); } @TestMetadata("mapComputeIfPresent.kt") public void testMapComputeIfPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.kt"); } @TestMetadata("mapForEach.kt") public void testMapForEach() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.kt"); } @TestMetadata("mapMerge.kt") public void testMapMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.kt"); } @TestMetadata("mapPutIfAbsent.kt") public void testMapPutIfAbsent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapPutIfAbsent.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapPutIfAbsent.kt"); } @TestMetadata("mapReplace.kt") public void testMapReplace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.kt"); } } @@ -158,32 +168,32 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optional extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptional() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/optional"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("optionalEmpty.kt") public void testOptionalEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.kt"); } @TestMetadata("optionalGet.kt") public void testOptionalGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.kt"); } @TestMetadata("optionalIfPresent.kt") public void testOptionalIfPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.kt"); } @TestMetadata("optionalOf.kt") public void testOptionalOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.kt"); } } @@ -191,20 +201,22 @@ public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhanc @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class References extends AbstractEnhancedSignaturesResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/references"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("softReference.kt") public void testSoftReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/references/softReference.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/references/softReference.kt"); } @TestMetadata("weakReference.kt") public void testWeakReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/references/weakReference.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/enhancedSignatures/references/weakReference.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java index 6d8d2957fc7..b3bac63436d 100644 --- a/compiler/tests/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/asJava/CompilerLightClassTestGenerated.java @@ -21,150 +21,135 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLightClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true, "local", "ideRegression"); } @TestMetadata("AnnotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/AnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt"); } @TestMetadata("DataClassWithCustomImplementedMembers.kt") public void testDataClassWithCustomImplementedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt"); } @TestMetadata("DelegatedNested.kt") public void testDelegatedNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DelegatedNested.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DelegatedNested.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/Delegation.kt"); } @TestMetadata("DeprecatedEnumEntry.kt") public void testDeprecatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DeprecatedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DeprecatedEnumEntry.kt"); } @TestMetadata("DeprecatedNotHiddenInClass.kt") public void testDeprecatedNotHiddenInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DeprecatedNotHiddenInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DeprecatedNotHiddenInClass.kt"); } @TestMetadata("DollarsInName.kt") public void testDollarsInName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DollarsInName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DollarsInName.kt"); } @TestMetadata("DollarsInNameNoPackage.kt") public void testDollarsInNameNoPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DollarsInNameNoPackage.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DollarsInNameNoPackage.kt"); } @TestMetadata("ExtendingInterfaceWithDefaultImpls.kt") public void testExtendingInterfaceWithDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ExtendingInterfaceWithDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ExtendingInterfaceWithDefaultImpls.kt"); } @TestMetadata("HiddenDeprecated.kt") public void testHiddenDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/HiddenDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/HiddenDeprecated.kt"); } @TestMetadata("HiddenDeprecatedInClass.kt") public void testHiddenDeprecatedInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/HiddenDeprecatedInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/HiddenDeprecatedInClass.kt"); } @TestMetadata("InheritingInterfaceDefaultImpls.kt") public void testInheritingInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/InheritingInterfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/InheritingInterfaceDefaultImpls.kt"); } @TestMetadata("JvmNameOnMember.kt") public void testJvmNameOnMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/JvmNameOnMember.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/JvmNameOnMember.kt"); } @TestMetadata("JvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/JvmStatic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/JvmStatic.kt"); } @TestMetadata("NestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/NestedObjects.kt"); } @TestMetadata("NonDataClassWithComponentFunctions.kt") public void testNonDataClassWithComponentFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt"); } @TestMetadata("PublishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt"); } @TestMetadata("SpecialAnnotationsOnAnnotationClass.kt") public void testSpecialAnnotationsOnAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); } @TestMetadata("VarArgs.kt") public void testVarArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/VarArgs.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/VarArgs.kt"); } @TestMetadata("compiler/testData/asJava/lightClasses/compilationErrors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompilationErrors extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("ActualClass.kt") public void testActualClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ActualClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ActualClass.kt"); } @TestMetadata("ActualTypeAlias.kt") public void testActualTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAlias.kt"); } @TestMetadata("ActualTypeAliasCustomJvmPackageName.kt") public void testActualTypeAliasCustomJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAliasCustomJvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAliasCustomJvmPackageName.kt"); } public void testAllFilesPresentInCompilationErrors() throws Exception { @@ -173,80 +158,67 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestMetadata("AllInlineOnly.kt") public void testAllInlineOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/AllInlineOnly.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/AllInlineOnly.kt"); } @TestMetadata("AnnotationModifiers.kt") public void testAnnotationModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/AnnotationModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/AnnotationModifiers.kt"); } @TestMetadata("ExpectClass.kt") public void testExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectClass.kt"); } @TestMetadata("ExpectObject.kt") public void testExpectObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectObject.kt"); } @TestMetadata("ExpectedNestedClass.kt") public void testExpectedNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClass.kt"); } @TestMetadata("ExpectedNestedClassInObject.kt") public void testExpectedNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClassInObject.kt"); } @TestMetadata("JvmPackageName.kt") public void testJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/JvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/JvmPackageName.kt"); } @TestMetadata("PrivateInTrait.kt") public void testPrivateInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/PrivateInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/PrivateInTrait.kt"); } @TestMetadata("RepetableAnnotations.kt") public void testRepetableAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/RepetableAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/RepetableAnnotations.kt"); } @TestMetadata("SameName.kt") public void testSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/SameName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/SameName.kt"); } @TestMetadata("TopLevelDestructuring.kt") public void testTopLevelDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/TopLevelDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/TopLevelDestructuring.kt"); } @TestMetadata("TraitClassObjectField.kt") public void testTraitClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/TraitClassObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/TraitClassObjectField.kt"); } @TestMetadata("WrongAnnotations.kt") public void testWrongAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/WrongAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/WrongAnnotations.kt"); } } @@ -254,20 +226,22 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/delegation"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Function.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/delegation/Function.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Property.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/delegation/Property.kt"); } } @@ -275,32 +249,32 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Facades extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/facades"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AllPrivate.kt") public void testAllPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/AllPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/AllPrivate.kt"); } @TestMetadata("MultiFile.kt") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/MultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/MultiFile.kt"); } @TestMetadata("SingleFile.kt") public void testSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); } @TestMetadata("SingleJvmClassName.kt") public void testSingleJvmClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); } } @@ -308,116 +282,102 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityAnnotations extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/nullabilityAnnotations"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); } @TestMetadata("ClassObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); } @TestMetadata("ClassWithConstructor.kt") public void testClassWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); } @TestMetadata("ClassWithConstructorAndProperties.kt") public void testClassWithConstructorAndProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); } @TestMetadata("FileFacade.kt") public void testFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); } @TestMetadata("IntOverridesAny.kt") public void testIntOverridesAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); } @TestMetadata("JvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); } @TestMetadata("NullableUnitReturn.kt") public void testNullableUnitReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); } @TestMetadata("OverrideAnyWithUnit.kt") public void testOverrideAnyWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); } @TestMetadata("PlatformTypes.kt") public void testPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); } @TestMetadata("Primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); } @TestMetadata("PrivateInClass.kt") public void testPrivateInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); } @TestMetadata("Synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); } @TestMetadata("UnitAsGenericArgument.kt") public void testUnitAsGenericArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); } @TestMetadata("UnitParameter.kt") public void testUnitParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); } @TestMetadata("VoidReturn.kt") public void testVoidReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); } } @@ -425,14 +385,17 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Object extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/object"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("SimpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); } } @@ -440,20 +403,22 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublicField extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublicField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/publicField"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("CompanionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); } } @@ -461,20 +426,22 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractCompilerLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/script"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("HelloWorld.kts") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/script/HelloWorld.kts"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/script/HelloWorld.kts"); } @TestMetadata("InnerClasses.kts") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/script/InnerClasses.kts"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/script/InnerClasses.kts"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/cfg/ControlFlowTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/cfg/ControlFlowTestGenerated.java index fe77cb09967..4ef4b6f06a2 100644 --- a/compiler/tests/org/jetbrains/kotlin/cfg/ControlFlowTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/cfg/ControlFlowTestGenerated.java @@ -23,6 +23,10 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cfg extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -31,68 +35,62 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arrays extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/ArrayAccess.kt"); } @TestMetadata("arrayAccessExpression.kt") public void testArrayAccessExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayAccessExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arrayAccessExpression.kt"); } @TestMetadata("arrayInc.kt") public void testArrayInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayInc.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arrayInc.kt"); } @TestMetadata("arrayIncUnresolved.kt") public void testArrayIncUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayIncUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arrayIncUnresolved.kt"); } @TestMetadata("ArrayOfFunctions.kt") public void testArrayOfFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayOfFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/ArrayOfFunctions.kt"); } @TestMetadata("arraySet.kt") public void testArraySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySet.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySet.kt"); } @TestMetadata("arraySetNoRHS.kt") public void testArraySetNoRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetNoRHS.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetNoRHS.kt"); } @TestMetadata("arraySetPlusAssign.kt") public void testArraySetPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetPlusAssign.kt"); } @TestMetadata("arraySetPlusAssignUnresolved.kt") public void testArraySetPlusAssignUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt"); } @TestMetadata("arraySetUnresolved.kt") public void testArraySetUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetUnresolved.kt"); } } @@ -100,26 +98,27 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Basic extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBasic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/basic/Basic.kt"); } @TestMetadata("EmptyFunction.kt") public void testEmptyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/EmptyFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/basic/EmptyFunction.kt"); } @TestMetadata("ShortFunction.kt") public void testShortFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/ShortFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/basic/ShortFunction.kt"); } } @@ -127,44 +126,42 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bugs extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBugs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionalCallInEnumEntry.kt") public void testFunctionalCallInEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/functionalCallInEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/functionalCallInEnumEntry.kt"); } @TestMetadata("jumpToOuterScope.kt") public void testJumpToOuterScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/jumpToOuterScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/jumpToOuterScope.kt"); } @TestMetadata("kt10105.kt") public void testKt10105() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt10105.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/kt10105.kt"); } @TestMetadata("kt7761.kt") public void testKt7761() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt7761.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/kt7761.kt"); } @TestMetadata("setWithTypeMismatch.kt") public void testSetWithTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/setWithTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/setWithTypeMismatch.kt"); } @TestMetadata("unresolvedInvokeOnResolvedVar.kt") public void testUnresolvedInvokeOnResolvedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/unresolvedInvokeOnResolvedVar.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/unresolvedInvokeOnResolvedVar.kt"); } } @@ -172,110 +169,97 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakContinueInTryFinally.kt") public void testBreakContinueInTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/breakContinueInTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/breakContinueInTryFinally.kt"); } @TestMetadata("breakInsideLocal.kt") public void testBreakInsideLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/breakInsideLocal.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/breakInsideLocal.kt"); } @TestMetadata("continueInDoWhile.kt") public void testContinueInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/continueInDoWhile.kt"); } @TestMetadata("continueInFor.kt") public void testContinueInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInFor.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/continueInFor.kt"); } @TestMetadata("continueInWhile.kt") public void testContinueInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/continueInWhile.kt"); } @TestMetadata("Finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/Finally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/Finally.kt"); } @TestMetadata("FinallyTestCopy.kt") public void testFinallyTestCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/For.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/For.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/If.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/If.kt"); } @TestMetadata("incorrectIndex.kt") public void testIncorrectIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/incorrectIndex.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/incorrectIndex.kt"); } @TestMetadata("InfiniteLoops.kt") public void testInfiniteLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/InfiniteLoops.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/InfiniteLoops.kt"); } @TestMetadata("localAndNonlocalReturnsWithFinally.kt") public void testLocalAndNonlocalReturnsWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt"); } @TestMetadata("localFunctionInFinally.kt") public void testLocalFunctionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localFunctionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/localFunctionInFinally.kt"); } @TestMetadata("OnlyWhileInFunctionBody.kt") public void testOnlyWhileInFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt"); } @TestMetadata("returnsInWhen.kt") public void testReturnsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/returnsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/returnsInWhen.kt"); } @TestMetadata("whenConditions.kt") public void testWhenConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenConditions.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/whenConditions.kt"); } @TestMetadata("whenExhaustive.kt") public void testWhenExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenExhaustive.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/whenExhaustive.kt"); } } @@ -283,38 +267,37 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Conventions extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bothReceivers.kt") public void testBothReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/bothReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/bothReceivers.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/equals.kt"); } @TestMetadata("incrementAtTheEnd.kt") public void testIncrementAtTheEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/incrementAtTheEnd.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/invoke.kt"); } @TestMetadata("notEqual.kt") public void testNotEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/notEqual.kt"); } } @@ -322,38 +305,37 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCode extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeadCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/deadCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DeadCode.kt") public void testDeadCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/DeadCode.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/DeadCode.kt"); } @TestMetadata("notLocalReturn.kt") public void testNotLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/notLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/notLocalReturn.kt"); } @TestMetadata("returnInElvis.kt") public void testReturnInElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/returnInElvis.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/returnInElvis.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/stringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/stringTemplate.kt"); } @TestMetadata("throwInLambda.kt") public void testThrowInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/throwInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/throwInLambda.kt"); } } @@ -361,6 +343,10 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -369,44 +355,42 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassesAndObjects extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassesAndObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt"); } @TestMetadata("delegationByExpression.kt") public void testDelegationByExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt"); } @TestMetadata("delegationBySuperCall.kt") public void testDelegationBySuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt"); } @TestMetadata("EnumEntryRefersCompanion.kt") public void testEnumEntryRefersCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/EnumEntryRefersCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/EnumEntryRefersCompanion.kt"); } @TestMetadata("ObjectEnumQualifiers.kt") public void testObjectEnumQualifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/ObjectEnumQualifiers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/ObjectEnumQualifiers.kt"); } @TestMetadata("QualifierReceiverWithOthers.kt") public void testQualifierReceiverWithOthers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/QualifierReceiverWithOthers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/QualifierReceiverWithOthers.kt"); } } @@ -414,14 +398,17 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unusedFunctionLiteral.kt") public void testUnusedFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt"); } } @@ -429,38 +416,37 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousFunctionInBlock.kt") public void testAnonymousFunctionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt"); } @TestMetadata("FailFunction.kt") public void testFailFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/FailFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/FailFunction.kt"); } @TestMetadata("functionAsExpression.kt") public void testFunctionAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/functionAsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/functionAsExpression.kt"); } @TestMetadata("namedFunctionInBlock.kt") public void testNamedFunctionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/typeParameter.kt"); } } @@ -468,44 +454,42 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localClass.kt"); } @TestMetadata("LocalDeclarations.kt") public void testLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/LocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/LocalDeclarations.kt"); } @TestMetadata("localDelegatedVal.kt") public void testLocalDelegatedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localDelegatedVal.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localDelegatedVal.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localFunction.kt"); } @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localProperty.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localProperty.kt"); } @TestMetadata("ObjectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/ObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/ObjectExpression.kt"); } } @@ -513,20 +497,22 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDeclaration extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MultiDecl.kt") public void testMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt"); } @TestMetadata("multiDeclarationWithError.kt") public void testMultiDeclarationWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt"); } } @@ -534,20 +520,22 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt"); } @TestMetadata("unreachableDelegation.kt") public void testUnreachableDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt"); } } } @@ -556,146 +544,127 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignmentToThis.kt") public void testAssignmentToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/assignmentToThis.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/assignmentToThis.kt"); } @TestMetadata("Assignments.kt") public void testAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/Assignments.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/Assignments.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/callableReferences.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/casts.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/casts.kt"); } @TestMetadata("chainedQualifiedExpression.kt") public void testChainedQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt"); } @TestMetadata("expressionAsFunction.kt") public void testExpressionAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/expressionAsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/expressionAsFunction.kt"); } @TestMetadata("incdec.kt") public void testIncdec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/incdec.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/incdec.kt"); } @TestMetadata("invalidVariableCall.kt") public void testInvalidVariableCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/invalidVariableCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/invalidVariableCall.kt"); } @TestMetadata("labeledExpression.kt") public void testLabeledExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/labeledExpression.kt"); } @TestMetadata("LazyBooleans.kt") public void testLazyBooleans() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/LazyBooleans.kt"); } @TestMetadata("nothingExpr.kt") public void testNothingExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/nothingExpr.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/nothingExpr.kt"); } @TestMetadata("parenthesizedSelector.kt") public void testParenthesizedSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/parenthesizedSelector.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/parenthesizedSelector.kt"); } @TestMetadata("propertySafeCall.kt") public void testPropertySafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/propertySafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/propertySafeCall.kt"); } @TestMetadata("qualifiedExpressionWithoutSelector.kt") public void testQualifiedExpressionWithoutSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt"); } @TestMetadata("ReturnFromExpression.kt") public void testReturnFromExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/ReturnFromExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/ReturnFromExpression.kt"); } @TestMetadata("thisExpression.kt") public void testThisExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/thisExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/thisExpression.kt"); } @TestMetadata("unresolvedCall.kt") public void testUnresolvedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedCall.kt"); } @TestMetadata("unresolvedCalls.kt") public void testUnresolvedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedCalls.kt"); } @TestMetadata("unresolvedCallsWithReceiver.kt") public void testUnresolvedCallsWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt"); } @TestMetadata("unresolvedProperty.kt") public void testUnresolvedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedProperty.kt"); } @TestMetadata("unresolvedWriteLHS.kt") public void testUnresolvedWriteLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt"); } @TestMetadata("unsupportedReturns.kt") public void testUnsupportedReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unsupportedReturns.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unsupportedReturns.kt"); } @TestMetadata("unusedExpressionSimpleName.kt") public void testUnusedExpressionSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt"); } } @@ -703,20 +672,22 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultValuesForArguments.kt") public void testDefaultValuesForArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/DefaultValuesForArguments.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/functions/DefaultValuesForArguments.kt"); } @TestMetadata("unmappedArgs.kt") public void testUnmappedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/unmappedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/functions/unmappedArgs.kt"); } } @@ -724,38 +695,37 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("withPrimary.kt") public void testWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withPrimary.kt"); } @TestMetadata("withPrimarySuper.kt") public void testWithPrimarySuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withReturn.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withReturn.kt"); } @TestMetadata("withoutPrimary.kt") public void testWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt"); } @TestMetadata("withoutPrimarySuper.kt") public void testWithoutPrimarySuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt"); } } @@ -763,38 +733,37 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCalls extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/finally.kt"); } @TestMetadata("finallyWithReturn.kt") public void testFinallyWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finallyWithReturn.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/finallyWithReturn.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/sum.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/sum.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/try.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/try.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/tryCatchFinally.kt"); } } } @@ -803,6 +772,10 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CfgWithStdLib extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfgWithStdLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgWithStdLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -811,38 +784,37 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractControlFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("labeledReturns.kt") public void testLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/labeledReturns.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/labeledReturns.kt"); } @TestMetadata("nonReturningInlinedLambda.kt") public void testNonReturningInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/nonReturningInlinedLambda.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/nonReturningInlinedLambda.kt"); } @TestMetadata("returnsAndCalls.kt") public void testReturnsAndCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.kt"); } @TestMetadata("throwIfNotCalled.kt") public void testThrowIfNotCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/throwIfNotCalled.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/throwIfNotCalled.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/tryCatchFinally.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/tryCatchFinally.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/cfg/DataFlowTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/cfg/DataFlowTestGenerated.java index 783426ed8ef..6acdf6444d9 100644 --- a/compiler/tests/org/jetbrains/kotlin/cfg/DataFlowTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/cfg/DataFlowTestGenerated.java @@ -23,6 +23,10 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cfg_variables extends AbstractDataFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfg_variables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -31,50 +35,47 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Basic extends AbstractDataFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBasic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/basic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ExhaustiveInitialization.kt") public void testExhaustiveInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/ExhaustiveInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/ExhaustiveInitialization.kt"); } @TestMetadata("IfWithUninitialized.kt") public void testIfWithUninitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt"); } @TestMetadata("InitializedNotDeclared.kt") public void testInitializedNotDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt"); } @TestMetadata("UsageInFunctionLiteral.kt") public void testUsageInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt"); } @TestMetadata("UseUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UseUninitializedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/UseUninitializedInLambda.kt"); } @TestMetadata("VariablesInitialization.kt") public void testVariablesInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/VariablesInitialization.kt"); } @TestMetadata("VariablesUsage.kt") public void testVariablesUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesUsage.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/VariablesUsage.kt"); } } @@ -82,74 +83,67 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bugs extends AbstractDataFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBugs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/bugs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doWhileAssignment.kt") public void testDoWhileAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/doWhileAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/doWhileAssignment.kt"); } @TestMetadata("doWhileNotDefined.kt") public void testDoWhileNotDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/doWhileNotDefined.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/doWhileNotDefined.kt"); } @TestMetadata("initializationInLocalClass.kt") public void testInitializationInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/initializationInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/initializationInLocalClass.kt"); } @TestMetadata("kt10243.kt") public void testKt10243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt10243.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt10243.kt"); } @TestMetadata("kt4764.kt") public void testKt4764() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt4764.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt4764.kt"); } @TestMetadata("kt5469.kt") public void testKt5469() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt5469.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt5469.kt"); } @TestMetadata("kt9825.kt") public void testKt9825() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt9825.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt9825.kt"); } @TestMetadata("localObjectInConstructor.kt") public void testLocalObjectInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/localObjectInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/localObjectInConstructor.kt"); } @TestMetadata("referenceToPropertyInitializer.kt") public void testReferenceToPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt"); } @TestMetadata("varInitializationInIf.kt") public void testVarInitializationInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt"); } @TestMetadata("varInitializationInIfInCycle.kt") public void testVarInitializationInIfInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt"); } } @@ -157,80 +151,72 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LexicalScopes extends AbstractDataFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLexicalScopes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doWhileScope.kt") public void testDoWhileScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt"); } @TestMetadata("forScope.kt") public void testForScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/forScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/forScope.kt"); } @TestMetadata("functionLiteralScope.kt") public void testFunctionLiteralScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt"); } @TestMetadata("ifScope.kt") public void testIfScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localClass.kt"); } @TestMetadata("localFunctionScope.kt") public void testLocalFunctionScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt"); } @TestMetadata("localFunctionScopeWithoutBody.kt") public void testLocalFunctionScopeWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localObject.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localObject.kt"); } @TestMetadata("objectLiteralScope.kt") public void testObjectLiteralScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt"); } @TestMetadata("propertyAccessorScope.kt") public void testPropertyAccessorScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt"); } @TestMetadata("tryScope.kt") public void testTryScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt"); } @TestMetadata("whileScope.kt") public void testWhileScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt"); } } } @@ -239,6 +225,10 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CfgVariablesWithStdLib extends AbstractDataFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfgVariablesWithStdLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgVariablesWithStdLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -247,68 +237,62 @@ public class DataFlowTestGenerated extends AbstractDataFlowTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractDataFlowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgVariablesWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakContinuesInInlinedLambda.kt") public void testBreakContinuesInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/breakContinuesInInlinedLambda.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/breakContinuesInInlinedLambda.kt"); } @TestMetadata("inlinedLambdaAlwaysThrows.kt") public void testInlinedLambdaAlwaysThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/inlinedLambdaAlwaysThrows.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/inlinedLambdaAlwaysThrows.kt"); } @TestMetadata("irrelevantUnknownClosure.kt") public void testIrrelevantUnknownClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/irrelevantUnknownClosure.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/irrelevantUnknownClosure.kt"); } @TestMetadata("nestedTryCatchFinally.kt") public void testNestedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchFinally.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchFinally.kt"); } @TestMetadata("nestedTryCatchs.kt") public void testNestedTryCatchs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchs.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchs.kt"); } @TestMetadata("nonReturningInlinedLambda.kt") public void testNonReturningInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/nonReturningInlinedLambda.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/nonReturningInlinedLambda.kt"); } @TestMetadata("returnsAndCalls.kt") public void testReturnsAndCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.kt"); } @TestMetadata("throwIfNotCalled.kt") public void testThrowIfNotCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/throwIfNotCalled.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/throwIfNotCalled.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatch.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatch.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatchFinally.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatchFinally.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/cfg/DiagnosticsWithModifiedMockJdkTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/cfg/DiagnosticsWithModifiedMockJdkTestGenerated.java index 5d568ac4b3e..30d3f488b6a 100644 --- a/compiler/tests/org/jetbrains/kotlin/cfg/DiagnosticsWithModifiedMockJdkTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/cfg/DiagnosticsWithModifiedMockJdkTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticsWithModifiedMockJdkTestGenerated extends AbstractDiagnosticsWithModifiedMockJdkTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestWithModifiedMockJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testWithModifiedMockJdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notConsideredMethod.kt") public void testNotConsideredMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testWithModifiedMockJdk/notConsideredMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testWithModifiedMockJdk/notConsideredMethod.kt"); } @TestMetadata("throwableConstructor.kt") public void testThrowableConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testWithModifiedMockJdk/throwableConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testWithModifiedMockJdk/throwableConstructor.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/cfg/PseudoValueTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/cfg/PseudoValueTestGenerated.java index 6ef05847c2b..4717d476c69 100644 --- a/compiler/tests/org/jetbrains/kotlin/cfg/PseudoValueTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/cfg/PseudoValueTestGenerated.java @@ -23,6 +23,10 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cfg extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -31,68 +35,62 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arrays extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/ArrayAccess.kt"); } @TestMetadata("arrayAccessExpression.kt") public void testArrayAccessExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayAccessExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arrayAccessExpression.kt"); } @TestMetadata("arrayInc.kt") public void testArrayInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayInc.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arrayInc.kt"); } @TestMetadata("arrayIncUnresolved.kt") public void testArrayIncUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arrayIncUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arrayIncUnresolved.kt"); } @TestMetadata("ArrayOfFunctions.kt") public void testArrayOfFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/ArrayOfFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/ArrayOfFunctions.kt"); } @TestMetadata("arraySet.kt") public void testArraySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySet.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySet.kt"); } @TestMetadata("arraySetNoRHS.kt") public void testArraySetNoRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetNoRHS.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetNoRHS.kt"); } @TestMetadata("arraySetPlusAssign.kt") public void testArraySetPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetPlusAssign.kt"); } @TestMetadata("arraySetPlusAssignUnresolved.kt") public void testArraySetPlusAssignUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetPlusAssignUnresolved.kt"); } @TestMetadata("arraySetUnresolved.kt") public void testArraySetUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/arrays/arraySetUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/arrays/arraySetUnresolved.kt"); } } @@ -100,26 +98,27 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Basic extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBasic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/basic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/basic/Basic.kt"); } @TestMetadata("EmptyFunction.kt") public void testEmptyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/EmptyFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/basic/EmptyFunction.kt"); } @TestMetadata("ShortFunction.kt") public void testShortFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/basic/ShortFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/basic/ShortFunction.kt"); } } @@ -127,44 +126,42 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bugs extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBugs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/bugs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionalCallInEnumEntry.kt") public void testFunctionalCallInEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/functionalCallInEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/functionalCallInEnumEntry.kt"); } @TestMetadata("jumpToOuterScope.kt") public void testJumpToOuterScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/jumpToOuterScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/jumpToOuterScope.kt"); } @TestMetadata("kt10105.kt") public void testKt10105() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt10105.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/kt10105.kt"); } @TestMetadata("kt7761.kt") public void testKt7761() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/kt7761.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/kt7761.kt"); } @TestMetadata("setWithTypeMismatch.kt") public void testSetWithTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/setWithTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/setWithTypeMismatch.kt"); } @TestMetadata("unresolvedInvokeOnResolvedVar.kt") public void testUnresolvedInvokeOnResolvedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/bugs/unresolvedInvokeOnResolvedVar.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/bugs/unresolvedInvokeOnResolvedVar.kt"); } } @@ -172,110 +169,97 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakContinueInTryFinally.kt") public void testBreakContinueInTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/breakContinueInTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/breakContinueInTryFinally.kt"); } @TestMetadata("breakInsideLocal.kt") public void testBreakInsideLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/breakInsideLocal.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/breakInsideLocal.kt"); } @TestMetadata("continueInDoWhile.kt") public void testContinueInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/continueInDoWhile.kt"); } @TestMetadata("continueInFor.kt") public void testContinueInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInFor.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/continueInFor.kt"); } @TestMetadata("continueInWhile.kt") public void testContinueInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/continueInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/continueInWhile.kt"); } @TestMetadata("Finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/Finally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/Finally.kt"); } @TestMetadata("FinallyTestCopy.kt") public void testFinallyTestCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/FinallyTestCopy.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/For.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/For.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/If.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/If.kt"); } @TestMetadata("incorrectIndex.kt") public void testIncorrectIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/incorrectIndex.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/incorrectIndex.kt"); } @TestMetadata("InfiniteLoops.kt") public void testInfiniteLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/InfiniteLoops.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/InfiniteLoops.kt"); } @TestMetadata("localAndNonlocalReturnsWithFinally.kt") public void testLocalAndNonlocalReturnsWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/localAndNonlocalReturnsWithFinally.kt"); } @TestMetadata("localFunctionInFinally.kt") public void testLocalFunctionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/localFunctionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/localFunctionInFinally.kt"); } @TestMetadata("OnlyWhileInFunctionBody.kt") public void testOnlyWhileInFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/OnlyWhileInFunctionBody.kt"); } @TestMetadata("returnsInWhen.kt") public void testReturnsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/returnsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/returnsInWhen.kt"); } @TestMetadata("whenConditions.kt") public void testWhenConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenConditions.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/whenConditions.kt"); } @TestMetadata("whenExhaustive.kt") public void testWhenExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/controlStructures/whenExhaustive.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/controlStructures/whenExhaustive.kt"); } } @@ -283,38 +267,37 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Conventions extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/conventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bothReceivers.kt") public void testBothReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/bothReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/bothReceivers.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/equals.kt"); } @TestMetadata("incrementAtTheEnd.kt") public void testIncrementAtTheEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/incrementAtTheEnd.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/invoke.kt"); } @TestMetadata("notEqual.kt") public void testNotEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/conventions/notEqual.kt"); } } @@ -322,38 +305,37 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCode extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeadCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/deadCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DeadCode.kt") public void testDeadCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/DeadCode.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/DeadCode.kt"); } @TestMetadata("notLocalReturn.kt") public void testNotLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/notLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/notLocalReturn.kt"); } @TestMetadata("returnInElvis.kt") public void testReturnInElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/returnInElvis.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/returnInElvis.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/stringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/stringTemplate.kt"); } @TestMetadata("throwInLambda.kt") public void testThrowInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/deadCode/throwInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/deadCode/throwInLambda.kt"); } } @@ -361,6 +343,10 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -369,44 +355,42 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassesAndObjects extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassesAndObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt"); } @TestMetadata("delegationByExpression.kt") public void testDelegationByExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/delegationByExpression.kt"); } @TestMetadata("delegationBySuperCall.kt") public void testDelegationBySuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/delegationBySuperCall.kt"); } @TestMetadata("EnumEntryRefersCompanion.kt") public void testEnumEntryRefersCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/EnumEntryRefersCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/EnumEntryRefersCompanion.kt"); } @TestMetadata("ObjectEnumQualifiers.kt") public void testObjectEnumQualifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/ObjectEnumQualifiers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/ObjectEnumQualifiers.kt"); } @TestMetadata("QualifierReceiverWithOthers.kt") public void testQualifierReceiverWithOthers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/classesAndObjects/QualifierReceiverWithOthers.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/classesAndObjects/QualifierReceiverWithOthers.kt"); } } @@ -414,14 +398,17 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unusedFunctionLiteral.kt") public void testUnusedFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functionLiterals/unusedFunctionLiteral.kt"); } } @@ -429,38 +416,37 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousFunctionInBlock.kt") public void testAnonymousFunctionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/anonymousFunctionInBlock.kt"); } @TestMetadata("FailFunction.kt") public void testFailFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/FailFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/FailFunction.kt"); } @TestMetadata("functionAsExpression.kt") public void testFunctionAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/functionAsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/functionAsExpression.kt"); } @TestMetadata("namedFunctionInBlock.kt") public void testNamedFunctionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/namedFunctionInBlock.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/functions/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/functions/typeParameter.kt"); } } @@ -468,44 +454,42 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localClass.kt"); } @TestMetadata("LocalDeclarations.kt") public void testLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/LocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/LocalDeclarations.kt"); } @TestMetadata("localDelegatedVal.kt") public void testLocalDelegatedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localDelegatedVal.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localDelegatedVal.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localFunction.kt"); } @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/localProperty.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/localProperty.kt"); } @TestMetadata("ObjectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/local/ObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/local/ObjectExpression.kt"); } } @@ -513,20 +497,22 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDeclaration extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/multiDeclaration"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MultiDecl.kt") public void testMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/multiDeclaration/MultiDecl.kt"); } @TestMetadata("multiDeclarationWithError.kt") public void testMultiDeclarationWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/multiDeclaration/multiDeclarationWithError.kt"); } } @@ -534,20 +520,22 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/declarations/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/properties/DelegatedProperty.kt"); } @TestMetadata("unreachableDelegation.kt") public void testUnreachableDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/declarations/properties/unreachableDelegation.kt"); } } } @@ -556,146 +544,127 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignmentToThis.kt") public void testAssignmentToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/assignmentToThis.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/assignmentToThis.kt"); } @TestMetadata("Assignments.kt") public void testAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/Assignments.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/Assignments.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/callableReferences.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/casts.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/casts.kt"); } @TestMetadata("chainedQualifiedExpression.kt") public void testChainedQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/chainedQualifiedExpression.kt"); } @TestMetadata("expressionAsFunction.kt") public void testExpressionAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/expressionAsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/expressionAsFunction.kt"); } @TestMetadata("incdec.kt") public void testIncdec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/incdec.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/incdec.kt"); } @TestMetadata("invalidVariableCall.kt") public void testInvalidVariableCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/invalidVariableCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/invalidVariableCall.kt"); } @TestMetadata("labeledExpression.kt") public void testLabeledExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/labeledExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/labeledExpression.kt"); } @TestMetadata("LazyBooleans.kt") public void testLazyBooleans() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/LazyBooleans.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/LazyBooleans.kt"); } @TestMetadata("nothingExpr.kt") public void testNothingExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/nothingExpr.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/nothingExpr.kt"); } @TestMetadata("parenthesizedSelector.kt") public void testParenthesizedSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/parenthesizedSelector.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/parenthesizedSelector.kt"); } @TestMetadata("propertySafeCall.kt") public void testPropertySafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/propertySafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/propertySafeCall.kt"); } @TestMetadata("qualifiedExpressionWithoutSelector.kt") public void testQualifiedExpressionWithoutSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/qualifiedExpressionWithoutSelector.kt"); } @TestMetadata("ReturnFromExpression.kt") public void testReturnFromExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/ReturnFromExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/ReturnFromExpression.kt"); } @TestMetadata("thisExpression.kt") public void testThisExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/thisExpression.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/thisExpression.kt"); } @TestMetadata("unresolvedCall.kt") public void testUnresolvedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCall.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedCall.kt"); } @TestMetadata("unresolvedCalls.kt") public void testUnresolvedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedCalls.kt"); } @TestMetadata("unresolvedCallsWithReceiver.kt") public void testUnresolvedCallsWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedCallsWithReceiver.kt"); } @TestMetadata("unresolvedProperty.kt") public void testUnresolvedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedProperty.kt"); } @TestMetadata("unresolvedWriteLHS.kt") public void testUnresolvedWriteLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unresolvedWriteLHS.kt"); } @TestMetadata("unsupportedReturns.kt") public void testUnsupportedReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unsupportedReturns.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unsupportedReturns.kt"); } @TestMetadata("unusedExpressionSimpleName.kt") public void testUnusedExpressionSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/expressions/unusedExpressionSimpleName.kt"); } } @@ -703,20 +672,22 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultValuesForArguments.kt") public void testDefaultValuesForArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/DefaultValuesForArguments.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/functions/DefaultValuesForArguments.kt"); } @TestMetadata("unmappedArgs.kt") public void testUnmappedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/functions/unmappedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/functions/unmappedArgs.kt"); } } @@ -724,38 +695,37 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("withPrimary.kt") public void testWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withPrimary.kt"); } @TestMetadata("withPrimarySuper.kt") public void testWithPrimarySuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withPrimarySuper.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withReturn.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withReturn.kt"); } @TestMetadata("withoutPrimary.kt") public void testWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withoutPrimary.kt"); } @TestMetadata("withoutPrimarySuper.kt") public void testWithoutPrimarySuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/secondaryConstructors/withoutPrimarySuper.kt"); } } @@ -763,38 +733,37 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCalls extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/finally.kt"); } @TestMetadata("finallyWithReturn.kt") public void testFinallyWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/finallyWithReturn.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/finallyWithReturn.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/sum.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/sum.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/try.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/try.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/tailCalls/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/cfg/tailCalls/tryCatchFinally.kt"); } } } @@ -803,6 +772,10 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CfgWithStdLib extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfgWithStdLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgWithStdLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -811,38 +784,37 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("labeledReturns.kt") public void testLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/labeledReturns.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/labeledReturns.kt"); } @TestMetadata("nonReturningInlinedLambda.kt") public void testNonReturningInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/nonReturningInlinedLambda.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/nonReturningInlinedLambda.kt"); } @TestMetadata("returnsAndCalls.kt") public void testReturnsAndCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/returnsAndCalls.kt"); } @TestMetadata("throwIfNotCalled.kt") public void testThrowIfNotCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/throwIfNotCalled.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/throwIfNotCalled.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgWithStdLib/contracts/tryCatchFinally.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgWithStdLib/contracts/tryCatchFinally.kt"); } } } @@ -851,6 +823,10 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cfg_variables extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfg_variables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -859,50 +835,47 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Basic extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBasic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/basic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ExhaustiveInitialization.kt") public void testExhaustiveInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/ExhaustiveInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/ExhaustiveInitialization.kt"); } @TestMetadata("IfWithUninitialized.kt") public void testIfWithUninitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/IfWithUninitialized.kt"); } @TestMetadata("InitializedNotDeclared.kt") public void testInitializedNotDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt"); } @TestMetadata("UsageInFunctionLiteral.kt") public void testUsageInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/UsageInFunctionLiteral.kt"); } @TestMetadata("UseUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/UseUninitializedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/UseUninitializedInLambda.kt"); } @TestMetadata("VariablesInitialization.kt") public void testVariablesInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/VariablesInitialization.kt"); } @TestMetadata("VariablesUsage.kt") public void testVariablesUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/basic/VariablesUsage.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/basic/VariablesUsage.kt"); } } @@ -910,74 +883,67 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bugs extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBugs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/bugs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doWhileAssignment.kt") public void testDoWhileAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/doWhileAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/doWhileAssignment.kt"); } @TestMetadata("doWhileNotDefined.kt") public void testDoWhileNotDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/doWhileNotDefined.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/doWhileNotDefined.kt"); } @TestMetadata("initializationInLocalClass.kt") public void testInitializationInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/initializationInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/initializationInLocalClass.kt"); } @TestMetadata("kt10243.kt") public void testKt10243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt10243.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt10243.kt"); } @TestMetadata("kt4764.kt") public void testKt4764() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt4764.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt4764.kt"); } @TestMetadata("kt5469.kt") public void testKt5469() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt5469.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt5469.kt"); } @TestMetadata("kt9825.kt") public void testKt9825() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/kt9825.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/kt9825.kt"); } @TestMetadata("localObjectInConstructor.kt") public void testLocalObjectInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/localObjectInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/localObjectInConstructor.kt"); } @TestMetadata("referenceToPropertyInitializer.kt") public void testReferenceToPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt"); } @TestMetadata("varInitializationInIf.kt") public void testVarInitializationInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/varInitializationInIf.kt"); } @TestMetadata("varInitializationInIfInCycle.kt") public void testVarInitializationInIfInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.kt"); } } @@ -985,80 +951,72 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LexicalScopes extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLexicalScopes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfg-variables/lexicalScopes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doWhileScope.kt") public void testDoWhileScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/doWhileScope.kt"); } @TestMetadata("forScope.kt") public void testForScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/forScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/forScope.kt"); } @TestMetadata("functionLiteralScope.kt") public void testFunctionLiteralScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/functionLiteralScope.kt"); } @TestMetadata("ifScope.kt") public void testIfScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/ifScope.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localClass.kt"); } @TestMetadata("localFunctionScope.kt") public void testLocalFunctionScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localFunctionScope.kt"); } @TestMetadata("localFunctionScopeWithoutBody.kt") public void testLocalFunctionScopeWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localFunctionScopeWithoutBody.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/localObject.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/localObject.kt"); } @TestMetadata("objectLiteralScope.kt") public void testObjectLiteralScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt"); } @TestMetadata("propertyAccessorScope.kt") public void testPropertyAccessorScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/propertyAccessorScope.kt"); } @TestMetadata("tryScope.kt") public void testTryScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/tryScope.kt"); } @TestMetadata("whileScope.kt") public void testWhileScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt"); - doTest(fileName); + runTest("compiler/testData/cfg-variables/lexicalScopes/whileScope.kt"); } } } @@ -1067,6 +1025,10 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CfgVariablesWithStdLib extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCfgVariablesWithStdLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgVariablesWithStdLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1075,68 +1037,62 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractPseudoValueTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStdLib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cfgVariablesWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakContinuesInInlinedLambda.kt") public void testBreakContinuesInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/breakContinuesInInlinedLambda.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/breakContinuesInInlinedLambda.kt"); } @TestMetadata("inlinedLambdaAlwaysThrows.kt") public void testInlinedLambdaAlwaysThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/inlinedLambdaAlwaysThrows.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/inlinedLambdaAlwaysThrows.kt"); } @TestMetadata("irrelevantUnknownClosure.kt") public void testIrrelevantUnknownClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/irrelevantUnknownClosure.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/irrelevantUnknownClosure.kt"); } @TestMetadata("nestedTryCatchFinally.kt") public void testNestedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchFinally.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchFinally.kt"); } @TestMetadata("nestedTryCatchs.kt") public void testNestedTryCatchs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchs.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/nestedTryCatchs.kt"); } @TestMetadata("nonReturningInlinedLambda.kt") public void testNonReturningInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/nonReturningInlinedLambda.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/nonReturningInlinedLambda.kt"); } @TestMetadata("returnsAndCalls.kt") public void testReturnsAndCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/returnsAndCalls.kt"); } @TestMetadata("throwIfNotCalled.kt") public void testThrowIfNotCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/throwIfNotCalled.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/throwIfNotCalled.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatch.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatch.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatchFinally.kt"); - doTestWithStdLib(fileName); + runTest("compiler/testData/cfgVariablesWithStdLib/contracts/tryCatchFinally.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index e3181df48f0..2ea61ed8142 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -23,34 +23,33 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tests extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Abstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Abstract.kt"); } @TestMetadata("AbstractAccessor.kt") public void testAbstractAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractAccessor.kt"); } @TestMetadata("AbstractInAbstractClass.kt") public void testAbstractInAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractInAbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractInAbstractClass.kt"); } @TestMetadata("AbstractInClass.kt") public void testAbstractInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractInClass.kt"); } @TestMetadata("AbstractInTrait.kt") public void testAbstractInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractInTrait.kt"); } public void testAllFilesPresentInTests() throws Exception { @@ -59,1290 +58,1086 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("AnonymousInitializerVarAndConstructor.kt") public void testAnonymousInitializerVarAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AnonymousInitializerVarAndConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AnonymousInitializerVarAndConstructor.kt"); } @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AnonymousInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AnonymousInitializers.kt"); } @TestMetadata("AssignToArrayElement.kt") public void testAssignToArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AssignToArrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AssignToArrayElement.kt"); } @TestMetadata("AutoCreatedIt.kt") public void testAutoCreatedIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AutoCreatedIt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AutoCreatedIt.kt"); } @TestMetadata("BacktickNames.kt") public void testBacktickNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BacktickNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BacktickNames.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Basic.kt"); } @TestMetadata("BinaryCallsOnNullableValues.kt") public void testBinaryCallsOnNullableValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt"); } @TestMetadata("Bounds.kt") public void testBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Bounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Bounds.kt"); } @TestMetadata("BreakContinue.kt") public void testBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BreakContinue.kt"); } @TestMetadata("BreakContinueInWhen.kt") public void testBreakContinueInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BreakContinueInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BreakContinueInWhen.kt"); } @TestMetadata("Builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Builders.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Builders.kt"); } @TestMetadata("Casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Casts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Casts.kt"); } @TestMetadata("CharacterLiterals.kt") public void testCharacterLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/CharacterLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/CharacterLiterals.kt"); } @TestMetadata("checkType.kt") public void testCheckType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkType.kt"); } @TestMetadata("CompareToWithErrorType.kt") public void testCompareToWithErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/CompareToWithErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/CompareToWithErrorType.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Constants.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Constants.kt"); } @TestMetadata("Constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Constructors.kt"); } @TestMetadata("ConstructorsOfPrimitives.kt") public void testConstructorsOfPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.kt"); } @TestMetadata("CovariantOverrideType.kt") public void testCovariantOverrideType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/CovariantOverrideType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/CovariantOverrideType.kt"); } @TestMetadata("DefaultValueForParameterInFunctionType.kt") public void testDefaultValueForParameterInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DefaultValueForParameterInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DefaultValueForParameterInFunctionType.kt"); } @TestMetadata("DefaultValuesCheckWithoutBody.kt") public void testDefaultValuesCheckWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DefaultValuesCheckWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DefaultValuesCheckWithoutBody.kt"); } @TestMetadata("DefaultValuesTypechecking.kt") public void testDefaultValuesTypechecking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt"); } @TestMetadata("DeferredTypes.kt") public void testDeferredTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeferredTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DeferredTypes.kt"); } @TestMetadata("DeprecatedGetSetPropertyDelegateConvention.kt") public void testDeprecatedGetSetPropertyDelegateConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.kt"); } @TestMetadata("DeprecatedUnaryOperatorConventions.kt") public void testDeprecatedUnaryOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt"); } @TestMetadata("DiamondFunction.kt") public void testDiamondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DiamondFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DiamondFunction.kt"); } @TestMetadata("DiamondFunctionGeneric.kt") public void testDiamondFunctionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt"); } @TestMetadata("DiamondProperty.kt") public void testDiamondProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DiamondProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DiamondProperty.kt"); } @TestMetadata("Dollar.kt") public void testDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Dollar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Dollar.kt"); } @TestMetadata("EnumEntryAsType.kt") public void testEnumEntryAsType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/EnumEntryAsType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/EnumEntryAsType.kt"); } @TestMetadata("ExtensionCallInvoke.kt") public void testExtensionCallInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt"); } @TestMetadata("ExternalAccessors.kt") public void testExternalAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ExternalAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ExternalAccessors.kt"); } @TestMetadata("ExternalAndAbstract.kt") public void testExternalAndAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ExternalAndAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ExternalAndAbstract.kt"); } @TestMetadata("fileDependencyRecursion.kt") public void testFileDependencyRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/fileDependencyRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/fileDependencyRecursion.kt"); } @TestMetadata("ForRangeConventions.kt") public void testForRangeConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ForRangeConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ForRangeConventions.kt"); } @TestMetadata("FreeFunctionCalledAsExtension.kt") public void testFreeFunctionCalledAsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt"); } @TestMetadata("FunctionCalleeExpressions.kt") public void testFunctionCalleeExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt"); } @TestMetadata("FunctionParameterWithoutType.kt") public void testFunctionParameterWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FunctionParameterWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FunctionParameterWithoutType.kt"); } @TestMetadata("FunctionReturnTypes.kt") public void testFunctionReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FunctionReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FunctionReturnTypes.kt"); } @TestMetadata("GenericArgumentConsistency.kt") public void testGenericArgumentConsistency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt"); } @TestMetadata("GenericFunctionIsLessSpecific.kt") public void testGenericFunctionIsLessSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/GenericFunctionIsLessSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/GenericFunctionIsLessSpecific.kt"); } @TestMetadata("IdentityComparisonWithPrimitives.kt") public void testIdentityComparisonWithPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IdentityComparisonWithPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IdentityComparisonWithPrimitives.kt"); } @TestMetadata("implicitIntersection.kt") public void testImplicitIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/implicitIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/implicitIntersection.kt"); } @TestMetadata("implicitNestedIntersection.kt") public void testImplicitNestedIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/implicitNestedIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/implicitNestedIntersection.kt"); } @TestMetadata("implicitNothing.kt") public void testImplicitNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/implicitNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/implicitNothing.kt"); } @TestMetadata("IncDec.kt") public void testIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IncDec.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IncDec.kt"); } @TestMetadata("IncorrectCharacterLiterals.kt") public void testIncorrectCharacterLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IncorrectCharacterLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IncorrectCharacterLiterals.kt"); } @TestMetadata("InferNullabilityInThenBlock.kt") public void testInferNullabilityInThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/InferNullabilityInThenBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/InferNullabilityInThenBlock.kt"); } @TestMetadata("Infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Infix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Infix.kt"); } @TestMetadata("InfixModifierApplicability.kt") public void testInfixModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/InfixModifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/InfixModifierApplicability.kt"); } @TestMetadata("InvokeAndRecursiveResolve.kt") public void testInvokeAndRecursiveResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt"); } @TestMetadata("IsExpressions.kt") public void testIsExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IsExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IsExpressions.kt"); } @TestMetadata("kt13401.kt") public void testKt13401() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt13401.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt13401.kt"); } @TestMetadata("kt310.kt") public void testKt310() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt310.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt310.kt"); } @TestMetadata("kt435.kt") public void testKt435() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt435.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt435.kt"); } @TestMetadata("kt53.kt") public void testKt53() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt53.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt53.kt"); } @TestMetadata("LValueAssignment.kt") public void testLValueAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LValueAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/LValueAssignment.kt"); } @TestMetadata("LiteralAsResult.kt") public void testLiteralAsResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LiteralAsResult.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/LiteralAsResult.kt"); } @TestMetadata("LocalClassAndShortSubpackageNames.kt") public void testLocalClassAndShortSubpackageNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LocalClassAndShortSubpackageNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/LocalClassAndShortSubpackageNames.kt"); } @TestMetadata("localInterfaces.kt") public void testLocalInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/localInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/localInterfaces.kt"); } @TestMetadata("MultilineStringTemplates.kt") public void testMultilineStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MultilineStringTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/MultilineStringTemplates.kt"); } @TestMetadata("MultipleBounds.kt") public void testMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/MultipleBounds.kt"); } @TestMetadata("NamedFunctionTypeParameterInSupertype.kt") public void testNamedFunctionTypeParameterInSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/NamedFunctionTypeParameterInSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/NamedFunctionTypeParameterInSupertype.kt"); } @TestMetadata("Nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Nullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Nullability.kt"); } @TestMetadata("NumberPrefixAndSuffix.kt") public void testNumberPrefixAndSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/NumberPrefixAndSuffix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/NumberPrefixAndSuffix.kt"); } @TestMetadata("ObjectWithConstructor.kt") public void testObjectWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ObjectWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ObjectWithConstructor.kt"); } @TestMetadata("OperatorChecks.kt") public void testOperatorChecks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OperatorChecks.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OperatorChecks.kt"); } @TestMetadata("Operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Operators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Operators.kt"); } @TestMetadata("OperatorsWithWrongNames.kt") public void testOperatorsWithWrongNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OperatorsWithWrongNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OperatorsWithWrongNames.kt"); } @TestMetadata("OverrideFunctionWithParamDefaultValue.kt") public void testOverrideFunctionWithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverrideFunctionWithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverrideFunctionWithParamDefaultValue.kt"); } @TestMetadata("OverridenFunctionAndSpecifiedTypeParameter.kt") public void testOverridenFunctionAndSpecifiedTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt"); } @TestMetadata("OverridenSetterVisibility.kt") public void testOverridenSetterVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverridenSetterVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverridenSetterVisibility.kt"); } @TestMetadata("OverridingVarByVal.kt") public void testOverridingVarByVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverridingVarByVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverridingVarByVal.kt"); } @TestMetadata("PackageInExpressionPosition.kt") public void testPackageInExpressionPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt"); } @TestMetadata("PackageInTypePosition.kt") public void testPackageInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageInTypePosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PackageInTypePosition.kt"); } @TestMetadata("PackageQualified.kt") public void testPackageQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageQualified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PackageQualified.kt"); } @TestMetadata("PrimaryConstructors.kt") public void testPrimaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PrimaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PrimaryConstructors.kt"); } @TestMetadata("PrivateFromOuterPackage.kt") public void testPrivateFromOuterPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PrivateFromOuterPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PrivateFromOuterPackage.kt"); } @TestMetadata("PrivateSetterForOverridden.kt") public void testPrivateSetterForOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PrivateSetterForOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PrivateSetterForOverridden.kt"); } @TestMetadata("ProcessingEmptyImport.kt") public void testProcessingEmptyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ProcessingEmptyImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ProcessingEmptyImport.kt"); } @TestMetadata("ProjectionOnFunctionArgumentErrror.kt") public void testProjectionOnFunctionArgumentErrror() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ProjectionOnFunctionArgumentErrror.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ProjectionOnFunctionArgumentErrror.kt"); } @TestMetadata("ProjectionsInSupertypes.kt") public void testProjectionsInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt"); } @TestMetadata("Properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Properties.kt"); } @TestMetadata("PropertyInitializers.kt") public void testPropertyInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PropertyInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PropertyInitializers.kt"); } @TestMetadata("publishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/publishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/publishedApi.kt"); } @TestMetadata("QualifiedExpressions.kt") public void testQualifiedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/QualifiedExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/QualifiedExpressions.kt"); } @TestMetadata("RecursiveResolve.kt") public void testRecursiveResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/RecursiveResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/RecursiveResolve.kt"); } @TestMetadata("RecursiveTypeInference.kt") public void testRecursiveTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/RecursiveTypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/RecursiveTypeInference.kt"); } @TestMetadata("ReserveYield.kt") public void testReserveYield() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ReserveYield.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ReserveYield.kt"); } @TestMetadata("ReserveYield2.kt") public void testReserveYield2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ReserveYield2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ReserveYield2.kt"); } @TestMetadata("ResolveOfJavaGenerics.kt") public void testResolveOfJavaGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt"); } @TestMetadata("ResolveToJava.kt") public void testResolveToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ResolveToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ResolveToJava.kt"); } @TestMetadata("Return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Return.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Return.kt"); } @TestMetadata("ReturnInFunctionWithoutBody.kt") public void testReturnInFunctionWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ReturnInFunctionWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ReturnInFunctionWithoutBody.kt"); } @TestMetadata("SafeCallInvoke.kt") public void testSafeCallInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallInvoke.kt"); } @TestMetadata("SafeCallNonNullReceiver.kt") public void testSafeCallNonNullReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallNonNullReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallNonNullReceiver.kt"); } @TestMetadata("SafeCallNonNullReceiverReturnNull.kt") public void testSafeCallNonNullReceiverReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt"); } @TestMetadata("SafeCallOnFakePackage.kt") public void testSafeCallOnFakePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt"); } @TestMetadata("SafeCallOnSuperReceiver.kt") public void testSafeCallOnSuperReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallOnSuperReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallOnSuperReceiver.kt"); } @TestMetadata("Serializable.kt") public void testSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Serializable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Serializable.kt"); } @TestMetadata("SetterVisibility.kt") public void testSetterVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SetterVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SetterVisibility.kt"); } @TestMetadata("ShiftFunctionTypes.kt") public void testShiftFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); } @TestMetadata("SingleUnderscoreUnsupported.kt") public void testSingleUnderscoreUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); } @TestMetadata("StarsInFunctionCalls.kt") public void testStarsInFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt"); } @TestMetadata("StringPrefixAndSuffix.kt") public void testStringPrefixAndSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/StringPrefixAndSuffix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/StringPrefixAndSuffix.kt"); } @TestMetadata("StringTemplates.kt") public void testStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/StringTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/StringTemplates.kt"); } @TestMetadata("SupertypeListChecks.kt") public void testSupertypeListChecks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlighting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlighting.kt"); } @TestMetadata("SyntaxErrorInTestHighlightingEof.kt") public void testSyntaxErrorInTestHighlightingEof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlightingEof.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlightingEof.kt"); } @TestMetadata("tailRecOverridden.kt") public void testTailRecOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/tailRecOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/tailRecOverridden.kt"); } @TestMetadata("tailRecursionComplex.kt") public void testTailRecursionComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/tailRecursionComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/tailRecursionComplex.kt"); } @TestMetadata("TraitOverrideObjectMethods.kt") public void testTraitOverrideObjectMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt"); } @TestMetadata("TraitWithConstructor.kt") public void testTraitWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TraitWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TraitWithConstructor.kt"); } @TestMetadata("TypeInference.kt") public void testTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TypeInference.kt"); } @TestMetadata("TypeMismatchOnOverrideWithSyntaxErrors.kt") public void testTypeMismatchOnOverrideWithSyntaxErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TypeMismatchOnOverrideWithSyntaxErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TypeMismatchOnOverrideWithSyntaxErrors.kt"); } @TestMetadata("Underscore.kt") public void testUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Underscore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Underscore.kt"); } @TestMetadata("UnderscoreUsageInAnnotation.kt") public void testUnderscoreUsageInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInAnnotation.kt"); } @TestMetadata("UnderscoreUsageInCall.kt") public void testUnderscoreUsageInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInCall.kt"); } @TestMetadata("UnderscoreUsageInCallableRefTypeLHS.kt") public void testUnderscoreUsageInCallableRefTypeLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInCallableRefTypeLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInCallableRefTypeLHS.kt"); } @TestMetadata("UnderscoreUsageInType.kt") public void testUnderscoreUsageInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInType.kt"); } @TestMetadata("UnderscoreUsageInVariableAsFunctionCall.kt") public void testUnderscoreUsageInVariableAsFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInVariableAsFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInVariableAsFunctionCall.kt"); } @TestMetadata("UnitByDefaultForFunctionTypes.kt") public void testUnitByDefaultForFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnitByDefaultForFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnitByDefaultForFunctionTypes.kt"); } @TestMetadata("UnitValue.kt") public void testUnitValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnitValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnitValue.kt"); } @TestMetadata("Unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Unresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Unresolved.kt"); } @TestMetadata("UnusedInDestructuring.kt") public void testUnusedInDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedInDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedInDestructuring.kt"); } @TestMetadata("UnusedParameters.kt") public void testUnusedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedParameters.kt"); } @TestMetadata("UnusedParametersVersion10.kt") public void testUnusedParametersVersion10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); } @TestMetadata("UnusedVariables.kt") public void testUnusedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedVariables.kt"); } @TestMetadata("ValAndFunOverrideCompatibilityClash.kt") public void testValAndFunOverrideCompatibilityClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.kt"); } @TestMetadata("VarargTypes.kt") public void testVarargTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/VarargTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/VarargTypes.kt"); } @TestMetadata("Varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Varargs.kt"); } @TestMetadata("Variance.kt") public void testVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Variance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Variance.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbigiousAnnotationConstructor.kt") public void testAmbigiousAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt"); } @TestMetadata("AnnotatedConstructor.kt") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.kt"); } @TestMetadata("AnnotatedConstructorParams.kt") public void testAnnotatedConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructorParams.kt"); } @TestMetadata("annotatedExpressionInsideAnnotation.kt") public void testAnnotatedExpressionInsideAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotatedExpressionInsideAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotatedExpressionInsideAnnotation.kt"); } @TestMetadata("AnnotatedLocalObjectFun.kt") public void testAnnotatedLocalObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.kt"); } @TestMetadata("AnnotatedLocalObjectProperty.kt") public void testAnnotatedLocalObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.kt"); } @TestMetadata("AnnotatedLoop.kt") public void testAnnotatedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt"); } @TestMetadata("AnnotatedResultType.kt") public void testAnnotatedResultType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.kt"); } @TestMetadata("AnnotatedTryCatch.kt") public void testAnnotatedTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.kt"); } @TestMetadata("AnnotationAsDefaultParameter.kt") public void testAnnotationAsDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt"); } @TestMetadata("AnnotationForClassTypeParameter.kt") public void testAnnotationForClassTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt"); } @TestMetadata("AnnotationForFunctionTypeParameter.kt") public void testAnnotationForFunctionTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt"); } @TestMetadata("AnnotationForObject.kt") public void testAnnotationForObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationForObject.kt"); } @TestMetadata("AnnotationIdentifier.kt") public void testAnnotationIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt"); } @TestMetadata("annotationInheritance.kt") public void testAnnotationInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt"); } @TestMetadata("annotationModifier.kt") public void testAnnotationModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationModifier.kt"); } @TestMetadata("AnnotationOnObject.kt") public void testAnnotationOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.kt"); } @TestMetadata("annotationOnParameterInFunctionType.kt") public void testAnnotationOnParameterInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationOnParameterInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationOnParameterInFunctionType.kt"); } @TestMetadata("AnnotationsForClasses.kt") public void testAnnotationsForClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.kt"); } @TestMetadata("AnnotationsForPropertyTypeParameter.kt") public void testAnnotationsForPropertyTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt"); } @TestMetadata("annotationsOnLambdaAsCallArgument.kt") public void testAnnotationsOnLambdaAsCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.kt"); } @TestMetadata("annotationsOnNullableTypes.kt") public void testAnnotationsOnNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationsOnNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationsOnNullableTypes.kt"); } @TestMetadata("atAnnotationResolve.kt") public void testAtAnnotationResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.kt"); } @TestMetadata("BasicAnnotations.kt") public void testBasicAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/BasicAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/BasicAnnotations.kt"); } @TestMetadata("blockLevelOnTheSameLineWarning.kt") public void testBlockLevelOnTheSameLineWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/blockLevelOnTheSameLineWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/blockLevelOnTheSameLineWarning.kt"); } @TestMetadata("ConstructorCall.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/ConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/ConstructorCall.kt"); } @TestMetadata("DanglingInScript.kt") public void testDanglingInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt"); } @TestMetadata("DanglingMixed.kt") public void testDanglingMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt"); } @TestMetadata("DanglingNoBrackets.kt") public void testDanglingNoBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt"); } @TestMetadata("DanglingWithBrackets.kt") public void testDanglingWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/Deprecated.kt"); } @TestMetadata("deprecatedRepeatable.kt") public void testDeprecatedRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/deprecatedRepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/deprecatedRepeatable.kt"); } @TestMetadata("extensionFunctionType.kt") public void testExtensionFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/extensionFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/extensionFunctionType.kt"); } @TestMetadata("forParameterAnnotationResolve.kt") public void testForParameterAnnotationResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt"); } @TestMetadata("illegalRequireKotlinValue.kt") public void testIllegalRequireKotlinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.kt"); } @TestMetadata("illegalSinceKotlinValue.kt") public void testIllegalSinceKotlinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalSinceKotlinValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/illegalSinceKotlinValue.kt"); } @TestMetadata("inheritFromAnnotationClass.kt") public void testInheritFromAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass.kt"); } @TestMetadata("inheritFromAnnotationClass2.kt") public void testInheritFromAnnotationClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass2.kt"); } @TestMetadata("invalidTypesInAnnotationConstructor.kt") public void testInvalidTypesInAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt"); } @TestMetadata("JavaAnnotationConstructors.kt") public void testJavaAnnotationConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.kt"); } @TestMetadata("javaRepeatable.kt") public void testJavaRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/javaRepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatable.kt"); } @TestMetadata("javaRepeatableRetention.kt") public void testJavaRepeatableRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/javaRepeatableRetention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatableRetention.kt"); } @TestMetadata("javaUnrepeatable.kt") public void testJavaUnrepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/javaUnrepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/javaUnrepeatable.kt"); } @TestMetadata("kt1860-negative.kt") public void testKt1860_negative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt"); } @TestMetadata("kt1860-positive.kt") public void testKt1860_positive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt"); } @TestMetadata("kt1886annotationBody.kt") public void testKt1886annotationBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt"); } @TestMetadata("missingValOnParameter.kt") public void testMissingValOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/missingValOnParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/missingValOnParameter.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/MultiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/MultiDeclaration.kt"); } @TestMetadata("MutuallyRecursivelyAnnotatedGlobalFunction.kt") public void testMutuallyRecursivelyAnnotatedGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.kt"); } @TestMetadata("nestedClassesInAnnotations.kt") public void testNestedClassesInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/nestedClassesInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/nestedClassesInAnnotations.kt"); } @TestMetadata("noNameProperty.kt") public void testNoNameProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/noNameProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/noNameProperty.kt"); } @TestMetadata("NonAnnotationClass.kt") public void testNonAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/NonAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/NonAnnotationClass.kt"); } @TestMetadata("onExpression.kt") public void testOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onExpression.kt"); } @TestMetadata("onFunctionParameter.kt") public void testOnFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onFunctionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onFunctionParameter.kt"); } @TestMetadata("onInitializer.kt") public void testOnInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onInitializer.kt"); } @TestMetadata("onLoops.kt") public void testOnLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onLoops.kt"); } @TestMetadata("onLoopsUnreachable.kt") public void testOnLoopsUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.kt"); } @TestMetadata("onMultiDeclaration.kt") public void testOnMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt"); } @TestMetadata("RecursivelyAnnotated.kt") public void testRecursivelyAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt"); } @TestMetadata("RecursivelyAnnotatedFunctionParameter.kt") public void testRecursivelyAnnotatedFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt"); } @TestMetadata("RecursivelyAnnotatedGlobalFunction.kt") public void testRecursivelyAnnotatedGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt"); } @TestMetadata("RecursivelyAnnotatedGlobalProperty.kt") public void testRecursivelyAnnotatedGlobalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt"); } @TestMetadata("RecursivelyAnnotatedParameter.kt") public void testRecursivelyAnnotatedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt"); } @TestMetadata("RecursivelyAnnotatedParameterType.kt") public void testRecursivelyAnnotatedParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.kt"); } @TestMetadata("RecursivelyAnnotatedParameterWithAt.kt") public void testRecursivelyAnnotatedParameterWithAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt"); } @TestMetadata("RecursivelyAnnotatedProperty.kt") public void testRecursivelyAnnotatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt"); } @TestMetadata("RecursivelyIncorrectlyAnnotatedParameter.kt") public void testRecursivelyIncorrectlyAnnotatedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt"); } @TestMetadata("typeAnnotations.kt") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt"); } @TestMetadata("typeParameterAsAnnotation.kt") public void testTypeParameterAsAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/typeParameterAsAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/typeParameterAsAnnotation.kt"); } @TestMetadata("UnresolvedAnnotationOnObject.kt") public void testUnresolvedAnnotationOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/UnresolvedAnnotationOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/UnresolvedAnnotationOnObject.kt"); } @TestMetadata("unresolvedReferenceRange.kt") public void testUnresolvedReferenceRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/unresolvedReferenceRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/unresolvedReferenceRange.kt"); } @TestMetadata("WrongAnnotationArgsOnObject.kt") public void testWrongAnnotationArgsOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationParameterMustBeConstant extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationConstructorDefaultParameter.kt") public void testAnnotationConstructorDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/annotationConstructorDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/annotationConstructorDefaultParameter.kt"); } @TestMetadata("booleanLocalVal.kt") public void testBooleanLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.kt"); } @TestMetadata("compareAndEquals.kt") public void testCompareAndEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.kt"); } @TestMetadata("enumConst.kt") public void testEnumConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.kt"); } @TestMetadata("javaProperties.kt") public void testJavaProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.kt"); } @TestMetadata("kotlinProperties.kt") public void testKotlinProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.kt"); } @TestMetadata("standaloneInExpression.kt") public void testStandaloneInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/standaloneInExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/standaloneInExpression.kt"); } @TestMetadata("strings.kt") public void testStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.kt"); } } @@ -1350,126 +1145,115 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Options extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/options"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationAsArg.kt") public void testAnnotationAsArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt"); } @TestMetadata("annotationAsArgComplex.kt") public void testAnnotationAsArgComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/assignment.kt"); } @TestMetadata("documented.kt") public void testDocumented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/documented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/documented.kt"); } @TestMetadata("forParam.kt") public void testForParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/forParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/forParam.kt"); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/functionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/functionExpression.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/functions.kt"); } @TestMetadata("javaDocumented.kt") public void testJavaDocumented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/javaDocumented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/javaDocumented.kt"); } @TestMetadata("javaKotlinTargetRetention.kt") public void testJavaKotlinTargetRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/javaKotlinTargetRetention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/javaKotlinTargetRetention.kt"); } @TestMetadata("javaretention.kt") public void testJavaretention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/javaretention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/javaretention.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/multiDeclaration.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/objectLiteral.kt"); } @TestMetadata("prefix.kt") public void testPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/prefix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/prefix.kt"); } @TestMetadata("repeatable.kt") public void testRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt"); } @TestMetadata("retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/retention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/retention.kt"); } @TestMetadata("setterParam.kt") public void testSetterParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/setterParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/setterParam.kt"); } @TestMetadata("target.kt") public void testTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/target.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/target.kt"); } @TestMetadata("unrepeatable.kt") public void testUnrepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/unrepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/unrepeatable.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/annotations/options/targets") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Targets extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessors.kt") public void testAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/accessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/accessors.kt"); } public void testAllFilesPresentInTargets() throws Exception { @@ -1478,128 +1262,107 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/annotation.kt"); } @TestMetadata("classifier.kt") public void testClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/classifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/classifier.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/constructor.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/empty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/empty.kt"); } @TestMetadata("expr.kt") public void testExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/expr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/expr.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/field.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/file.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/file.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/function.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/function.kt"); } @TestMetadata("funtypeargs.kt") public void testFuntypeargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/funtypeargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/funtypeargs.kt"); } @TestMetadata("incorrect.kt") public void testIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/incorrect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/incorrect.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/init.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/init.kt"); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/java.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/java.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/local.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/local.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/nested.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/property.kt"); } @TestMetadata("returntype.kt") public void testReturntype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/returntype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/returntype.kt"); } @TestMetadata("suppress.kt") public void testSuppress() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/suppress.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/suppress.kt"); } @TestMetadata("type.kt") public void testType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/type.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/type.kt"); } @TestMetadata("typeParams.kt") public void testTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/typeParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/typeParams.kt"); } @TestMetadata("typeargs.kt") public void testTypeargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/typeargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/typeargs.kt"); } @TestMetadata("valueparam.kt") public void testValueparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/valueparam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/valueparam.kt"); } } } @@ -1608,110 +1371,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateAnnotations.kt") public void testDelegateAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/DelegateAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/DelegateAnnotations.kt"); } @TestMetadata("diagnosticFileAnnotationInWrongPlace.kt") public void testDiagnosticFileAnnotationInWrongPlace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticFileAnnotationInWrongPlace.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticFileAnnotationInWrongPlace.kt"); } @TestMetadata("diagnosticWithoutPackage.kt") public void testDiagnosticWithoutPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackage.kt"); } @TestMetadata("diagnosticWithoutPackageWithSimpleAnnotation.kt") public void testDiagnosticWithoutPackageWithSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackageWithSimpleAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackageWithSimpleAnnotation.kt"); } @TestMetadata("FieldAnnotations.kt") public void testFieldAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FieldAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FieldAnnotations.kt"); } @TestMetadata("fileAnnotationWithoutColon.kt") public void testFileAnnotationWithoutColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/fileAnnotationWithoutColon.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/fileAnnotationWithoutColon.kt"); } @TestMetadata("FileAnnotations.kt") public void testFileAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FileAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FileAnnotations.kt"); } @TestMetadata("GetterAnnotations.kt") public void testGetterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/GetterAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/GetterAnnotations.kt"); } @TestMetadata("ParamAnnotations.kt") public void testParamAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ParamAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ParamAnnotations.kt"); } @TestMetadata("PropertyAnnotations.kt") public void testPropertyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/PropertyAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/PropertyAnnotations.kt"); } @TestMetadata("ReceiverAnnotations.kt") public void testReceiverAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ReceiverAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ReceiverAnnotations.kt"); } @TestMetadata("receiverUseSiteTargetOnExtensionFunction.kt") public void testReceiverUseSiteTargetOnExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction.kt"); } @TestMetadata("repeatable.kt") public void testRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/repeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/repeatable.kt"); } @TestMetadata("SetterAnnotations.kt") public void testSetterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SetterAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SetterAnnotations.kt"); } @TestMetadata("SparamAnnotations.kt") public void testSparamAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SparamAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SparamAnnotations.kt"); } @TestMetadata("wrongParamAnnotationsOnTypes.kt") public void testWrongParamAnnotationsOnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes.kt"); } @TestMetadata("wrongParamAnnotationsOnTypesError.kt") public void testWrongParamAnnotationsOnTypesError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.kt"); } } } @@ -1720,128 +1470,112 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BackingField extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBackingField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/backingField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CustomGetSet.kt") public void testCustomGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetSet.kt"); } @TestMetadata("CustomGetVal.kt") public void testCustomGetVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetVal.kt"); } @TestMetadata("CustomGetValGlobal.kt") public void testCustomGetValGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetValGlobal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetValGlobal.kt"); } @TestMetadata("CustomGetVar.kt") public void testCustomGetVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetVar.kt"); } @TestMetadata("CustomSet.kt") public void testCustomSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomSet.kt"); } @TestMetadata("ExtensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/ExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/ExtensionProperty.kt"); } @TestMetadata("FieldAsParam.kt") public void testFieldAsParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldAsParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldAsParam.kt"); } @TestMetadata("FieldAsProperty.kt") public void testFieldAsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldAsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldAsProperty.kt"); } @TestMetadata("FieldDerived.kt") public void testFieldDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldDerived.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldDerived.kt"); } @TestMetadata("FieldInInterface.kt") public void testFieldInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldInInterface.kt"); } @TestMetadata("FieldInLocal.kt") public void testFieldInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldInLocal.kt"); } @TestMetadata("FieldOnVal.kt") public void testFieldOnVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldOnVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldOnVal.kt"); } @TestMetadata("FieldOnVar.kt") public void testFieldOnVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldOnVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldOnVar.kt"); } @TestMetadata("FieldReassignment.kt") public void testFieldReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldReassignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment.kt"); } @TestMetadata("FieldReassignmentError.kt") public void testFieldReassignmentError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldReassignmentError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignmentError.kt"); } @TestMetadata("FieldShadow.kt") public void testFieldShadow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldShadow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldShadow.kt"); } @TestMetadata("InitCustomSetter.kt") public void testInitCustomSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/InitCustomSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/InitCustomSetter.kt"); } @TestMetadata("InitOpenSetter.kt") public void testInitOpenSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/InitOpenSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/InitOpenSetter.kt"); } @TestMetadata("kt782packageLevel.kt") public void testKt782packageLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt"); } @TestMetadata("SetterWithExplicitType.kt") public void testSetterWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/SetterWithExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/SetterWithExplicitType.kt"); } } @@ -1849,208 +1583,184 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bareType.kt") public void testBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bareType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bareType.kt"); } @TestMetadata("callableReferenceAsLastExpressionInBlock.kt") public void testCallableReferenceAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/callableReferenceAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/callableReferenceAsLastExpressionInBlock.kt"); } @TestMetadata("classVsPackage.kt") public void testClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/classVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/classVsPackage.kt"); } @TestMetadata("ea81649_errorPropertyLHS.kt") public void testEa81649_errorPropertyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt"); } @TestMetadata("emptyLhs.kt") public void testEmptyLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/emptyLhs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/emptyLhs.kt"); } @TestMetadata("kt15439_completeCall.kt") public void testKt15439_completeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/kt15439_completeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/kt15439_completeCall.kt"); } @TestMetadata("kt7430_wrongClassOnLHS.kt") public void testKt7430_wrongClassOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/kt7430_wrongClassOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/kt7430_wrongClassOnLHS.kt"); } @TestMetadata("memberExtensionsImportedFromObjectsUnsupported.kt") public void testMemberExtensionsImportedFromObjectsUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/memberExtensionsImportedFromObjectsUnsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/memberExtensionsImportedFromObjectsUnsupported.kt"); } @TestMetadata("packageInLhs.kt") public void testPackageInLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/packageInLhs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/packageInLhs.kt"); } @TestMetadata("parsingPriorityOfGenericArgumentsVsLess.kt") public void testParsingPriorityOfGenericArgumentsVsLess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/parsingPriorityOfGenericArgumentsVsLess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/parsingPriorityOfGenericArgumentsVsLess.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/sam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/sam.kt"); } @TestMetadata("unused.kt") public void testUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/unused.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/unused.kt"); } @TestMetadata("whitespacesInExpression.kt") public void testWhitespacesInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/whitespacesInExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/whitespacesInExpression.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classVsStarImportedCompanion.kt") public void testClassVsStarImportedCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedCompanion.kt"); } @TestMetadata("classVsStarImportedObject.kt") public void testClassVsStarImportedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/companionObject.kt"); } @TestMetadata("controlFlow.kt") public void testControlFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/controlFlow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/controlFlow.kt"); } @TestMetadata("dataFlow.kt") public void testDataFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/dataFlow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/dataFlow.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/expectedType.kt"); } @TestMetadata("expressionWithNullableType.kt") public void testExpressionWithNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/expressionWithNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/expressionWithNullableType.kt"); } @TestMetadata("functionCallWithoutArguments.kt") public void testFunctionCallWithoutArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/functionCallWithoutArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/functionCallWithoutArguments.kt"); } @TestMetadata("innerNested.kt") public void testInnerNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/innerNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/innerNested.kt"); } @TestMetadata("kt12843.kt") public void testKt12843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt"); } @TestMetadata("noThisInSuperCall.kt") public void testNoThisInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/object.kt"); } @TestMetadata("privateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/privateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/privateToThis.kt"); } @TestMetadata("referenceToStaticMethodOnInstance.kt") public void testReferenceToStaticMethodOnInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/referenceToStaticMethodOnInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/referenceToStaticMethodOnInstance.kt"); } @TestMetadata("reservedExpressionSyntax.kt") public void testReservedExpressionSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax.kt"); } @TestMetadata("reservedExpressionSyntax2.kt") public void testReservedExpressionSyntax2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax2.kt"); } @TestMetadata("reservedExpressionSyntax3.kt") public void testReservedExpressionSyntax3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt"); } @TestMetadata("syntheticExtensionOnLHS.kt") public void testSyntheticExtensionOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/syntheticExtensionOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/syntheticExtensionOnLHS.kt"); } @TestMetadata("valueOfTypeParameterType.kt") public void testValueOfTypeParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/valueOfTypeParameterType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/valueOfTypeParameterType.kt"); } } @@ -2058,10 +1768,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractClassConstructors.kt") public void testAbstractClassConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -2070,302 +1783,252 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("ambiguityTopLevelVsTopLevel.kt") public void testAmbiguityTopLevelVsTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/ambiguityTopLevelVsTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/ambiguityTopLevelVsTopLevel.kt"); } @TestMetadata("annotationClassConstructor.kt") public void testAnnotationClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/annotationClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/annotationClassConstructor.kt"); } @TestMetadata("callableRefrenceOnNestedObject.kt") public void testCallableRefrenceOnNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/callableRefrenceOnNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/callableRefrenceOnNestedObject.kt"); } @TestMetadata("classMemberVsConstructorLikeFunction.kt") public void testClassMemberVsConstructorLikeFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/classMemberVsConstructorLikeFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/classMemberVsConstructorLikeFunction.kt"); } @TestMetadata("constructorFromClass.kt") public void testConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromClass.kt"); } @TestMetadata("constructorFromCompanion.kt") public void testConstructorFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromCompanion.kt"); } @TestMetadata("constructorFromExtension.kt") public void testConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtension.kt"); } @TestMetadata("constructorFromExtensionInClass.kt") public void testConstructorFromExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtensionInClass.kt"); } @TestMetadata("constructorFromTopLevel.kt") public void testConstructorFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromTopLevel.kt"); } @TestMetadata("constructorOfNestedClassInObject.kt") public void testConstructorOfNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorOfNestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorOfNestedClassInObject.kt"); } @TestMetadata("differentPackageClass.kt") public void testDifferentPackageClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/differentPackageClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/differentPackageClass.kt"); } @TestMetadata("differentPackageExtension.kt") public void testDifferentPackageExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/differentPackageExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/differentPackageExtension.kt"); } @TestMetadata("differentPackageTopLevel.kt") public void testDifferentPackageTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/differentPackageTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/differentPackageTopLevel.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/empty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/empty.kt"); } @TestMetadata("extensionFromTopLevel.kt") public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionFromTopLevel.kt"); } @TestMetadata("extensionInClassDisallowed.kt") public void testExtensionInClassDisallowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionInClassDisallowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionInClassDisallowed.kt"); } @TestMetadata("extensionOnNullable.kt") public void testExtensionOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionOnNullable.kt"); } @TestMetadata("extensionToSupertype.kt") public void testExtensionToSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt"); } @TestMetadata("fakeOverrideType.kt") public void testFakeOverrideType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.kt"); } @TestMetadata("genericClassFromTopLevel.kt") public void testGenericClassFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/genericClassFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/genericClassFromTopLevel.kt"); } @TestMetadata("importedInnerConstructor.kt") public void testImportedInnerConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/importedInnerConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/importedInnerConstructor.kt"); } @TestMetadata("innerConstructorFromClass.kt") public void testInnerConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromClass.kt"); } @TestMetadata("innerConstructorFromExtension.kt") public void testInnerConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromExtension.kt"); } @TestMetadata("innerConstructorFromTopLevel.kt") public void testInnerConstructorFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromTopLevel.kt"); } @TestMetadata("javaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/javaStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/javaStaticMethod.kt"); } @TestMetadata("lhsNotAClass.kt") public void testLhsNotAClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt"); } @TestMetadata("localConstructor.kt") public void testLocalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructor.kt"); } @TestMetadata("localConstructorFromExtensionInLocalClass.kt") public void testLocalConstructorFromExtensionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromExtensionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromExtensionInLocalClass.kt"); } @TestMetadata("localConstructorFromLocalClass.kt") public void testLocalConstructorFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalClass.kt"); } @TestMetadata("localConstructorFromLocalExtension.kt") public void testLocalConstructorFromLocalExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalExtension.kt"); } @TestMetadata("localNamedFun.kt") public void testLocalNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFun.kt"); } @TestMetadata("localNamedFunFromExtensionInLocalClass.kt") public void testLocalNamedFunFromExtensionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromExtensionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromExtensionInLocalClass.kt"); } @TestMetadata("localNamedFunFromLocalClass.kt") public void testLocalNamedFunFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalClass.kt"); } @TestMetadata("localNamedFunFromLocalExtension.kt") public void testLocalNamedFunFromLocalExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalExtension.kt"); } @TestMetadata("longQualifiedName.kt") public void testLongQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedName.kt"); } @TestMetadata("longQualifiedNameGeneric.kt") public void testLongQualifiedNameGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedNameGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedNameGeneric.kt"); } @TestMetadata("memberFromTopLevel.kt") public void testMemberFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/memberFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/memberFromTopLevel.kt"); } @TestMetadata("nestedConstructorFromClass.kt") public void testNestedConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromClass.kt"); } @TestMetadata("nestedConstructorFromExtension.kt") public void testNestedConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromExtension.kt"); } @TestMetadata("nestedConstructorFromTopLevel.kt") public void testNestedConstructorFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromTopLevel.kt"); } @TestMetadata("noAmbiguityLocalVsTopLevel.kt") public void testNoAmbiguityLocalVsTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityLocalVsTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityLocalVsTopLevel.kt"); } @TestMetadata("noAmbiguityMemberVsExtension.kt") public void testNoAmbiguityMemberVsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsExtension.kt"); } @TestMetadata("noAmbiguityMemberVsTopLevel.kt") public void testNoAmbiguityMemberVsTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt"); } @TestMetadata("privateStaticAndPublicMember.kt") public void testPrivateStaticAndPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/privateStaticAndPublicMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/privateStaticAndPublicMember.kt"); } @TestMetadata("renameOnImport.kt") public void testRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/renameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/renameOnImport.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromExtensionInClass.kt") public void testTopLevelFromExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtensionInClass.kt"); } @TestMetadata("topLevelFromTopLevel.kt") public void testTopLevelFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromTopLevel.kt"); } @TestMetadata("unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt"); } } @@ -2373,104 +2036,92 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generic extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/generic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentAndReturnExpectedType.kt") public void testArgumentAndReturnExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt"); } @TestMetadata("argumentExpectedType.kt") public void testArgumentExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/argumentExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/argumentExpectedType.kt"); } @TestMetadata("dependOnArgumentType.kt") public void testDependOnArgumentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/dependOnArgumentType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/dependOnArgumentType.kt"); } @TestMetadata("expectedFunctionType.kt") public void testExpectedFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/expectedFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/expectedFunctionType.kt"); } @TestMetadata("explicitTypeArguments.kt") public void testExplicitTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt"); } @TestMetadata("genericExtensionFunction.kt") public void testGenericExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt"); } @TestMetadata("genericFunctionsWithNullableTypes.kt") public void testGenericFunctionsWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt"); } @TestMetadata("kt10968.kt") public void testKt10968() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt10968.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt10968.kt"); } @TestMetadata("kt11075.kt") public void testKt11075() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt11075.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt11075.kt"); } @TestMetadata("kt12286.kt") public void testKt12286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt12286.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt12286.kt"); } @TestMetadata("kt7470.kt") public void testKt7470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt7470.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt7470.kt"); } @TestMetadata("nestedCallWithOverload.kt") public void testNestedCallWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); } @TestMetadata("noInferenceFeatureForCallableReferences.kt") public void testNoInferenceFeatureForCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); } @TestMetadata("resolutionGenericCallableWithNullableTypes.kt") public void testResolutionGenericCallableWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt"); } @TestMetadata("resolutionWithGenericCallable.kt") public void testResolutionWithGenericCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt"); } @TestMetadata("specialCalls.kt") public void testSpecialCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt"); } } @@ -2478,16 +2129,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractPropertyViaSubclasses.kt") public void testAbstractPropertyViaSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.kt"); } @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -2496,92 +2149,77 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("classFromClass.kt") public void testClassFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/classFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/classFromClass.kt"); } @TestMetadata("extensionFromTopLevel.kt") public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.kt"); } @TestMetadata("extensionPropertyOnNullable.kt") public void testExtensionPropertyOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/extensionPropertyOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/extensionPropertyOnNullable.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/genericClass.kt"); } @TestMetadata("javaInstanceField.kt") public void testJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/javaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/javaInstanceField.kt"); } @TestMetadata("javaStaticFieldViaImport.kt") public void testJavaStaticFieldViaImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/javaStaticFieldViaImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/javaStaticFieldViaImport.kt"); } @TestMetadata("kt7564.kt") public void testKt7564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/kt7564.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/kt7564.kt"); } @TestMetadata("kt7945_unrelatedClass.kt") public void testKt7945_unrelatedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt"); } @TestMetadata("localVariable.kt") public void testLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/localVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/localVariable.kt"); } @TestMetadata("memberFromTopLevel.kt") public void testMemberFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.kt"); } @TestMetadata("protectedVarFromClass.kt") public void testProtectedVarFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/protectedVarFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/protectedVarFromClass.kt"); } @TestMetadata("returnTypeDependentOnGenericProperty.kt") public void testReturnTypeDependentOnGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/returnTypeDependentOnGenericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/returnTypeDependentOnGenericProperty.kt"); } @TestMetadata("samePriorityForFunctionsAndProperties.kt") public void testSamePriorityForFunctionsAndProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/samePriorityForFunctionsAndProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/samePriorityForFunctionsAndProperties.kt"); } @TestMetadata("syntheticProperties.kt") public void testSyntheticProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/syntheticProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/syntheticProperties.kt"); } @TestMetadata("topLevelFromTopLevel.kt") public void testTopLevelFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.kt"); } } @@ -2589,158 +2227,137 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousWithVararg.kt") public void testAmbiguousWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt"); } @TestMetadata("byArgType.kt") public void testByArgType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byArgType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/byArgType.kt"); } @TestMetadata("byGenericArgType.kt") public void testByGenericArgType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt"); } @TestMetadata("byValType.kt") public void testByValType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byValType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/byValType.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/constructor.kt"); } @TestMetadata("innerClassConstructorOnOuterClassInstance.kt") public void testInnerClassConstructorOnOuterClassInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/innerClassConstructorOnOuterClassInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/innerClassConstructorOnOuterClassInstance.kt"); } @TestMetadata("intersectionTypeOverloadWithWrongParameter.kt") public void testIntersectionTypeOverloadWithWrongParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt"); } @TestMetadata("kt10036.kt") public void testKt10036() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036.kt"); } @TestMetadata("kt10036_bound.kt") public void testKt10036_bound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036_bound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036_bound.kt"); } @TestMetadata("kt12338.kt") public void testKt12338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt12338.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt12338.kt"); } @TestMetadata("kt12751.kt") public void testKt12751() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt12751.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt12751.kt"); } @TestMetadata("kt8596.kt") public void testKt8596() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt8596.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt8596.kt"); } @TestMetadata("kt9601.kt") public void testKt9601() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt"); } @TestMetadata("moreSpecificAmbiguousExtensions.kt") public void testMoreSpecificAmbiguousExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt"); } @TestMetadata("moreSpecificSimple.kt") public void testMoreSpecificSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt"); } @TestMetadata("noFakeDescriptorForObject.kt") public void testNoFakeDescriptorForObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt"); } @TestMetadata("overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt"); } @TestMetadata("overloadsBound.kt") public void testOverloadsBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsBound.kt"); } @TestMetadata("overloadsMember.kt") public void testOverloadsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt"); } @TestMetadata("valVsFun.kt") public void testValVsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); } @TestMetadata("withAs.kt") public void testWithAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withAs.kt"); } @TestMetadata("withExtFun.kt") public void testWithExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withExtFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withExtFun.kt"); } @TestMetadata("withGenericFun.kt") public void testWithGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt"); } @TestMetadata("withPlaceholderTypes.kt") public void testWithPlaceholderTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt"); } @TestMetadata("withVararg.kt") public void testWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withVararg.kt"); } } } @@ -2749,496 +2366,424 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsArray.kt") public void testAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsArray.kt"); } @TestMetadata("AsErasedError.kt") public void testAsErasedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedError.kt"); } @TestMetadata("AsErasedFine.kt") public void testAsErasedFine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedFine.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedFine.kt"); } @TestMetadata("AsErasedStar.kt") public void testAsErasedStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedStar.kt"); } @TestMetadata("AsErasedWarning.kt") public void testAsErasedWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedWarning.kt"); } @TestMetadata("AsInBinaryUnary.kt") public void testAsInBinaryUnary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt"); } @TestMetadata("AsInBlockWithReturnType.kt") public void testAsInBlockWithReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt"); } @TestMetadata("AsInExpressionBody.kt") public void testAsInExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInExpressionBody.kt"); } @TestMetadata("AsInPropertyAndPropertyAccessor.kt") public void testAsInPropertyAndPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInPropertyAndPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInPropertyAndPropertyAccessor.kt"); } @TestMetadata("AsNothing.kt") public void testAsNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsNothing.kt"); } @TestMetadata("AsTypeAlias.kt") public void testAsTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsTypeAlias.kt"); } @TestMetadata("AsWithOtherParameter.kt") public void testAsWithOtherParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsWithOtherParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsWithOtherParameter.kt"); } @TestMetadata("checkCastToNullableType.kt") public void testCheckCastToNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/checkCastToNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/checkCastToNullableType.kt"); } @TestMetadata("constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/constants.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/constants.kt"); } @TestMetadata("DowncastMap.kt") public void testDowncastMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/DowncastMap.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/DowncastMap.kt"); } @TestMetadata("ExtensionAsNonExtension.kt") public void testExtensionAsNonExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/ExtensionAsNonExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/ExtensionAsNonExtension.kt"); } @TestMetadata("FlexibleTargetType.kt") public void testFlexibleTargetType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/FlexibleTargetType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/FlexibleTargetType.kt"); } @TestMetadata("IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt") public void testIsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt"); } @TestMetadata("IsErasedAllowForExactSupertypeCheck.kt") public void testIsErasedAllowForExactSupertypeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForExactSupertypeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForExactSupertypeCheck.kt"); } @TestMetadata("IsErasedAllowForOverridenVarianceWithProjection.kt") public void testIsErasedAllowForOverridenVarianceWithProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForOverridenVarianceWithProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForOverridenVarianceWithProjection.kt"); } @TestMetadata("IsErasedAllowForSupertypeCheckWithContrvariance.kt") public void testIsErasedAllowForSupertypeCheckWithContrvariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithContrvariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithContrvariance.kt"); } @TestMetadata("IsErasedAllowForSupertypeCheckWithCovariance.kt") public void testIsErasedAllowForSupertypeCheckWithCovariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithCovariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithCovariance.kt"); } @TestMetadata("IsErasedAllowForTypeWithIrrelevantMixin.kt") public void testIsErasedAllowForTypeWithIrrelevantMixin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt"); } @TestMetadata("IsErasedAllowForTypeWithTwoSameTypeSubstitutions.kt") public void testIsErasedAllowForTypeWithTwoSameTypeSubstitutions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithTwoSameTypeSubstitutions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithTwoSameTypeSubstitutions.kt"); } @TestMetadata("IsErasedAllowForTypeWithoutTypeArguments.kt") public void testIsErasedAllowForTypeWithoutTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithoutTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithoutTypeArguments.kt"); } @TestMetadata("IsErasedAllowFromOut.kt") public void testIsErasedAllowFromOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut.kt"); } @TestMetadata("IsErasedAllowFromOut2.kt") public void testIsErasedAllowFromOut2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut2.kt"); } @TestMetadata("IsErasedAllowFromOutAtClass.kt") public void testIsErasedAllowFromOutAtClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOutAtClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOutAtClass.kt"); } @TestMetadata("IsErasedAllowParameterSubtype.kt") public void testIsErasedAllowParameterSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowParameterSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowParameterSubtype.kt"); } @TestMetadata("IsErasedAllowSameClassParameter.kt") public void testIsErasedAllowSameClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameClassParameter.kt"); } @TestMetadata("IsErasedAllowSameParameterParameter.kt") public void testIsErasedAllowSameParameterParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameParameterParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameParameterParameter.kt"); } @TestMetadata("isErasedAnyAndStarred.kt") public void testIsErasedAnyAndStarred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/isErasedAnyAndStarred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/isErasedAnyAndStarred.kt"); } @TestMetadata("IsErasedDisallowDifferentArgInvariantPosition.kt") public void testIsErasedDisallowDifferentArgInvariantPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowDifferentArgInvariantPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowDifferentArgInvariantPosition.kt"); } @TestMetadata("IsErasedDisallowForOverridenVariance.kt") public void testIsErasedDisallowForOverridenVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForOverridenVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForOverridenVariance.kt"); } @TestMetadata("IsErasedDisallowForTypeWithConstraints.kt") public void testIsErasedDisallowForTypeWithConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt"); } @TestMetadata("IsErasedDisallowFromAny.kt") public void testIsErasedDisallowFromAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromAny.kt"); } @TestMetadata("IsErasedDisallowFromIn.kt") public void testIsErasedDisallowFromIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromIn.kt"); } @TestMetadata("IsErasedDisallowFromOut.kt") public void testIsErasedDisallowFromOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOut.kt"); } @TestMetadata("IsErasedDisallowFromOutAtClass.kt") public void testIsErasedDisallowFromOutAtClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOutAtClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOutAtClass.kt"); } @TestMetadata("IsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid.kt") public void testIsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid.kt"); } @TestMetadata("IsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid.kt") public void testIsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid.kt"); } @TestMetadata("IsErasedNonGeneric.kt") public void testIsErasedNonGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt"); } @TestMetadata("IsErasedNullableTasT.kt") public void testIsErasedNullableTasT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedNullableTasT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedNullableTasT.kt"); } @TestMetadata("IsErasedStar.kt") public void testIsErasedStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedStar.kt"); } @TestMetadata("isErasedTAndStarred.kt") public void testIsErasedTAndStarred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/isErasedTAndStarred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/isErasedTAndStarred.kt"); } @TestMetadata("IsErasedTasT.kt") public void testIsErasedTasT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedTasT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedTasT.kt"); } @TestMetadata("IsErasedToErrorType.kt") public void testIsErasedToErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedToErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedToErrorType.kt"); } @TestMetadata("isErasedUnrelatedAndStarred.kt") public void testIsErasedUnrelatedAndStarred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt"); } @TestMetadata("IsErasedUpcastToNonReified.kt") public void testIsErasedUpcastToNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedUpcastToNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedUpcastToNonReified.kt"); } @TestMetadata("IsForTypeWithComplexUpperBound.kt") public void testIsForTypeWithComplexUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsForTypeWithComplexUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsForTypeWithComplexUpperBound.kt"); } @TestMetadata("IsRecursionSustainable.kt") public void testIsRecursionSustainable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsRecursionSustainable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsRecursionSustainable.kt"); } @TestMetadata("IsTraits.kt") public void testIsTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsTraits.kt"); } @TestMetadata("IsWithCycleUpperBounds.kt") public void testIsWithCycleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsWithCycleUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsWithCycleUpperBounds.kt"); } @TestMetadata("kt15161.kt") public void testKt15161() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/kt15161.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/kt15161.kt"); } @TestMetadata("kt614.kt") public void testKt614() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/kt614.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/kt614.kt"); } @TestMetadata("nothingAs.kt") public void testNothingAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/nothingAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/nothingAs.kt"); } @TestMetadata("NullableToNullable.kt") public void testNullableToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/NullableToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/NullableToNullable.kt"); } @TestMetadata("StableTypeForUselessCast.kt") public void testStableTypeForUselessCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt"); } @TestMetadata("UselessSafeCast.kt") public void testUselessSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt"); } @TestMetadata("WhenErasedDisallowFromAny.kt") public void testWhenErasedDisallowFromAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/WhenErasedDisallowFromAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/WhenErasedDisallowFromAny.kt"); } @TestMetadata("WhenWithExpression.kt") public void testWhenWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/cast/bare") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bare extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBare() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/bare"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsNestedBare.kt") public void testAsNestedBare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt"); } @TestMetadata("AsNullable.kt") public void testAsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt"); } @TestMetadata("AsNullableNotEnough.kt") public void testAsNullableNotEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt"); } @TestMetadata("EitherAs.kt") public void testEitherAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt"); } @TestMetadata("EitherIs.kt") public void testEitherIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt"); } @TestMetadata("EitherNotIs.kt") public void testEitherNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt"); } @TestMetadata("EitherSafeAs.kt") public void testEitherSafeAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt"); } @TestMetadata("EitherWhen.kt") public void testEitherWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt"); } @TestMetadata("ErrorsInSubstitution.kt") public void testErrorsInSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt"); } @TestMetadata("FromErrorType.kt") public void testFromErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/FromErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/FromErrorType.kt"); } @TestMetadata("NullableAs.kt") public void testNullableAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt"); } @TestMetadata("NullableAsNotEnough.kt") public void testNullableAsNotEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt"); } @TestMetadata("NullableAsNullable.kt") public void testNullableAsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt"); } @TestMetadata("NullableAsNullableNotEnough.kt") public void testNullableAsNullableNotEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt"); } @TestMetadata("RedundantNullable.kt") public void testRedundantNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt"); } @TestMetadata("ToErrorType.kt") public void testToErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/ToErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/ToErrorType.kt"); } @TestMetadata("UnrelatedAs.kt") public void testUnrelatedAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt"); } @TestMetadata("UnrelatedColon.kt") public void testUnrelatedColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt"); } @TestMetadata("UnrelatedIs.kt") public void testUnrelatedIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt"); } } @@ -3246,38 +2791,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NeverSucceeds extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNeverSucceeds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/neverSucceeds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CastToNotNullSuper.kt") public void testCastToNotNullSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/CastToNotNullSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/CastToNotNullSuper.kt"); } @TestMetadata("MappedDirect.kt") public void testMappedDirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedDirect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedDirect.kt"); } @TestMetadata("MappedSubtypes.kt") public void testMappedSubtypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedSubtypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedSubtypes.kt"); } @TestMetadata("NoGenericsRelated.kt") public void testNoGenericsRelated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt"); } @TestMetadata("NoGenericsUnrelated.kt") public void testNoGenericsUnrelated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt"); } } } @@ -3286,50 +2830,47 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/checkArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayAccessSet.kt") public void testArrayAccessSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSet.kt"); } @TestMetadata("arrayAccessSetTooManyArgs.kt") public void testArrayAccessSetTooManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt"); } @TestMetadata("booleanExpressions.kt") public void testBooleanExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt"); } @TestMetadata("kt1897_diagnostic_part.kt") public void testKt1897_diagnostic_part() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt"); } @TestMetadata("kt1940.kt") public void testKt1940() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/kt1940.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/kt1940.kt"); } @TestMetadata("overloadedFunction.kt") public void testOverloadedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt"); } @TestMetadata("SpreadVarargs.kt") public void testSpreadVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt"); } } @@ -3337,92 +2878,82 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiteral extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/classLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/arrays.kt"); } @TestMetadata("classAndObjectLiteralType.kt") public void testClassAndObjectLiteralType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/classAndObjectLiteralType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/classAndObjectLiteralType.kt"); } @TestMetadata("classLiteralType.kt") public void testClassLiteralType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/classLiteralType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/classLiteralType.kt"); } @TestMetadata("expressionWithNullableType.kt") public void testExpressionWithNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/expressionWithNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/expressionWithNullableType.kt"); } @TestMetadata("genericArrays.kt") public void testGenericArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/genericArrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/genericArrays.kt"); } @TestMetadata("genericClasses.kt") public void testGenericClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt"); } @TestMetadata("inAnnotationArguments.kt") public void testInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/inAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/inAnnotationArguments.kt"); } @TestMetadata("integerValueType.kt") public void testIntegerValueType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/integerValueType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/integerValueType.kt"); } @TestMetadata("nonClassesOnLHS.kt") public void testNonClassesOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/nonClassesOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/nonClassesOnLHS.kt"); } @TestMetadata("qualifiedClassLiteral.kt") public void testQualifiedClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/qualifiedClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/qualifiedClassLiteral.kt"); } @TestMetadata("simpleClassLiteral.kt") public void testSimpleClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/simpleClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/simpleClassLiteral.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/smartCast.kt"); } @TestMetadata("typealiases.kt") public void testTypealiases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/typealiases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/typealiases.kt"); } @TestMetadata("unresolvedClass.kt") public void testUnresolvedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/unresolvedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/unresolvedClass.kt"); } } @@ -3430,116 +2961,102 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObjects extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/classObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builtInClassObjects.kt") public void testBuiltInClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/builtInClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/builtInClassObjects.kt"); } @TestMetadata("ClassObjectCannotAccessClassFields.kt") public void testClassObjectCannotAccessClassFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt"); } @TestMetadata("classObjectHeader.kt") public void testClassObjectHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt"); } @TestMetadata("classObjectInLocalClass.kt") public void testClassObjectInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt"); } @TestMetadata("classObjectRedeclaration.kt") public void testClassObjectRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt"); } @TestMetadata("ClassObjectVisibility.kt") public void testClassObjectVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt"); } @TestMetadata("ClassObjects.kt") public void testClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt"); } @TestMetadata("companionObjectOfPrivateClassVisibility.kt") public void testCompanionObjectOfPrivateClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/companionObjectOfPrivateClassVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/companionObjectOfPrivateClassVisibility.kt"); } @TestMetadata("importClassInClassObject.kt") public void testImportClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt"); } @TestMetadata("InnerClassAccessThroughClassObject.kt") public void testInnerClassAccessThroughClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt"); } @TestMetadata("InnerClassAccessThroughEnum.kt") public void testInnerClassAccessThroughEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt"); } @TestMetadata("InnerClassClassObject.kt") public void testInnerClassClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt"); } @TestMetadata("invisibleClassObjects.kt") public void testInvisibleClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt"); } @TestMetadata("kt3866.kt") public void testKt3866() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/kt3866.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/kt3866.kt"); } @TestMetadata("multipleDissallowedDefaultObjects.kt") public void testMultipleDissallowedDefaultObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.kt"); } @TestMetadata("nestedClassInPrivateClassObject.kt") public void testNestedClassInPrivateClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt"); } @TestMetadata("resolveFunctionInsideClassObject.kt") public void testResolveFunctionInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt"); } @TestMetadata("typeParametersInObject.kt") public void testTypeParametersInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/typeParametersInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/typeParametersInObject.kt"); } } @@ -3547,68 +3064,62 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionLiterals extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollectionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentsOfAnnotation.kt") public void testArgumentsOfAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt"); } @TestMetadata("argumentsOfAnnotationWithKClass.kt") public void testArgumentsOfAnnotationWithKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt"); } @TestMetadata("basicCollectionLiterals.kt") public void testBasicCollectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt"); } @TestMetadata("collectionLiteralsAsPrimitiveArrays.kt") public void testCollectionLiteralsAsPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsAsPrimitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsAsPrimitiveArrays.kt"); } @TestMetadata("collectionLiteralsWithVarargs.kt") public void testCollectionLiteralsWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt"); } @TestMetadata("defaultValuesInAnnotation.kt") public void testDefaultValuesInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt"); } @TestMetadata("defaultValuesWithConstantsInAnnotation.kt") public void testDefaultValuesWithConstantsInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); } @TestMetadata("noArrayLiteralsInAnnotationsFeature.kt") public void testNoArrayLiteralsInAnnotationsFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); } @TestMetadata("noCollectionLiterals.kt") public void testNoCollectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt"); } @TestMetadata("resolveToFunctionFromBuiltIns.kt") public void testResolveToFunctionFromBuiltIns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/resolveToFunctionFromBuiltIns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/resolveToFunctionFromBuiltIns.kt"); } } @@ -3616,16 +3127,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstructorConsistency extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterInitialization.kt") public void testAfterInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/afterInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/afterInitialization.kt"); } @TestMetadata("aliencall.kt") public void testAliencall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/aliencall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/aliencall.kt"); } public void testAllFilesPresentInConstructorConsistency() throws Exception { @@ -3634,146 +3147,122 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/assignment.kt"); } @TestMetadata("backing.kt") public void testBacking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/backing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/backing.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/basic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/basic.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/companion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/companion.kt"); } @TestMetadata("comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/comparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/comparison.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/delegate.kt"); } @TestMetadata("derived.kt") public void testDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/derived.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/derived.kt"); } @TestMetadata("derivedProperty.kt") public void testDerivedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/derivedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/derivedProperty.kt"); } @TestMetadata("getset.kt") public void testGetset() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/getset.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/getset.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/init.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/init.kt"); } @TestMetadata("initializerWithSecondaryConstructor.kt") public void testInitializerWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/initializerWithSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/initializerWithSecondaryConstructor.kt"); } @TestMetadata("initwithgetter.kt") public void testInitwithgetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/initwithgetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/initwithgetter.kt"); } @TestMetadata("inspection.kt") public void testInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/inspection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/inspection.kt"); } @TestMetadata("lambdaInObject.kt") public void testLambdaInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/lambdaInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/lambdaInObject.kt"); } @TestMetadata("lateInit.kt") public void testLateInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/lateInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/lateInit.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/localObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/localObject.kt"); } @TestMetadata("multipleAreNull.kt") public void testMultipleAreNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/multipleAreNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/multipleAreNull.kt"); } @TestMetadata("nobacking.kt") public void testNobacking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/nobacking.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/nobacking.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/open.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/open.kt"); } @TestMetadata("openProperty.kt") public void testOpenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/openProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/openProperty.kt"); } @TestMetadata("outer.kt") public void testOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/outer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/outer.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/property.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/propertyAccess.kt"); } @TestMetadata("twoSecondaryConstructors.kt") public void testTwoSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/twoSecondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/twoSecondaryConstructors.kt"); } } @@ -3781,634 +3270,539 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlowAnalysis extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlFlowAnalysis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignedInFinally.kt") public void testAssignedInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignedInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignedInFinally.kt"); } @TestMetadata("assignmentInLocalsInConstructor.kt") public void testAssignmentInLocalsInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignmentInLocalsInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignmentInLocalsInConstructor.kt"); } @TestMetadata("backingFieldInsideGetter.kt") public void testBackingFieldInsideGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter.kt"); } @TestMetadata("breakContinueInTryFinally.kt") public void testBreakContinueInTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakContinueInTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakContinueInTryFinally.kt"); } @TestMetadata("breakInsideLocal.kt") public void testBreakInsideLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakInsideLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakInsideLocal.kt"); } @TestMetadata("breakOrContinueInLoopCondition.kt") public void testBreakOrContinueInLoopCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakOrContinueInLoopCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakOrContinueInLoopCondition.kt"); } @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkInnerLocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkInnerLocalDeclarations.kt"); } @TestMetadata("checkPropertyAccessor.kt") public void testCheckPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkPropertyAccessor.kt"); } @TestMetadata("constructorPropertyInterdependence.kt") public void testConstructorPropertyInterdependence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/constructorPropertyInterdependence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/constructorPropertyInterdependence.kt"); } @TestMetadata("definiteReturnInWhen.kt") public void testDefiniteReturnInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturnInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturnInWhen.kt"); } @TestMetadata("delegatedPropertyEarlyAccess.kt") public void testDelegatedPropertyEarlyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedPropertyEarlyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedPropertyEarlyAccess.kt"); } @TestMetadata("doWhileAssignment.kt") public void testDoWhileAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileAssignment.kt"); } @TestMetadata("doWhileNotDefined.kt") public void testDoWhileNotDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileNotDefined.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileNotDefined.kt"); } @TestMetadata("elvisNotProcessed.kt") public void testElvisNotProcessed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt"); } @TestMetadata("enumCompanionInterdependence.kt") public void testEnumCompanionInterdependence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt"); } @TestMetadata("enumInterdependence.kt") public void testEnumInterdependence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumInterdependence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumInterdependence.kt"); } @TestMetadata("fieldAsClassDelegate.kt") public void testFieldAsClassDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt"); } @TestMetadata("infiniteLoops.kt") public void testInfiniteLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/infiniteLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/infiniteLoops.kt"); } @TestMetadata("initializationInLambda.kt") public void testInitializationInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLambda.kt"); } @TestMetadata("initializationInLocalClass.kt") public void testInitializationInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalClass.kt"); } @TestMetadata("initializationInLocalFun.kt") public void testInitializationInLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalFun.kt"); } @TestMetadata("initializationInLocalViaExplicitThis.kt") public void testInitializationInLocalViaExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt"); } @TestMetadata("kt1001.kt") public void testKt1001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1001.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1001.kt"); } @TestMetadata("kt1027.kt") public void testKt1027() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1027.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1027.kt"); } @TestMetadata("kt1066.kt") public void testKt1066() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1066.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1066.kt"); } @TestMetadata("kt10805.kt") public void testKt10805() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt"); } @TestMetadata("kt10823.kt") public void testKt10823() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10823.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10823.kt"); } @TestMetadata("kt1156.kt") public void testKt1156() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1156.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1156.kt"); } @TestMetadata("kt1185enums.kt") public void testKt1185enums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt"); } @TestMetadata("kt1189.kt") public void testKt1189() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1189.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1189.kt"); } @TestMetadata("kt1191.kt") public void testKt1191() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt"); } @TestMetadata("kt1219.1301.kt") public void testKt1219_1301() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1219.1301.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1219.1301.kt"); } @TestMetadata("kt1571.kt") public void testKt1571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1571.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1571.kt"); } @TestMetadata("kt1977.kt") public void testKt1977() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1977.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1977.kt"); } @TestMetadata("kt2166_kt2103.kt") public void testKt2166_kt2103() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2166_kt2103.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2166_kt2103.kt"); } @TestMetadata("kt2226.kt") public void testKt2226() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt"); } @TestMetadata("kt2330.kt") public void testKt2330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt"); } @TestMetadata("kt2334.kt") public void testKt2334() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2334.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2334.kt"); } @TestMetadata("kt2369.kt") public void testKt2369() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2369.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2369.kt"); } @TestMetadata("kt2845.kt") public void testKt2845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2845.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2845.kt"); } @TestMetadata("kt2960.kt") public void testKt2960() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2960.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2960.kt"); } @TestMetadata("kt2972.kt") public void testKt2972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2972.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2972.kt"); } @TestMetadata("kt3444.kt") public void testKt3444() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt"); } @TestMetadata("kt3501.kt") public void testKt3501() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3501.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3501.kt"); } @TestMetadata("kt4126.kt") public void testKt4126() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4126.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4126.kt"); } @TestMetadata("kt4405.kt") public void testKt4405() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4405.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4405.kt"); } @TestMetadata("kt510.kt") public void testKt510() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt510.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt510.kt"); } @TestMetadata("kt607.kt") public void testKt607() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt607.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt607.kt"); } @TestMetadata("kt609.kt") public void testKt609() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt609.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt609.kt"); } @TestMetadata("kt610.kt") public void testKt610() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt610.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt610.kt"); } @TestMetadata("kt6788.kt") public void testKt6788() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt6788.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt6788.kt"); } @TestMetadata("kt776.kt") public void testKt776() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt776.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt776.kt"); } @TestMetadata("kt843.kt") public void testKt843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.kt"); } @TestMetadata("kt897.kt") public void testKt897() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt897.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt897.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/localClasses.kt"); } @TestMetadata("localObjectInConstructor.kt") public void testLocalObjectInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/localObjectInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/localObjectInConstructor.kt"); } @TestMetadata("nestedTryFinally.kt") public void testNestedTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/nestedTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/nestedTryFinally.kt"); } @TestMetadata("nonLocalReturnUnreachable.kt") public void testNonLocalReturnUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnUnreachable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnUnreachable.kt"); } @TestMetadata("nonLocalReturnWithFinally.kt") public void testNonLocalReturnWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnWithFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnWithFinally.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/privateSetter.kt"); } @TestMetadata("propertiesInitWithOtherInstance.kt") public void testPropertiesInitWithOtherInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstance.kt"); } @TestMetadata("propertiesInitWithOtherInstanceInner.kt") public void testPropertiesInitWithOtherInstanceInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceInner.kt"); } @TestMetadata("propertiesInitWithOtherInstanceThisLabel.kt") public void testPropertiesInitWithOtherInstanceThisLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceThisLabel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceThisLabel.kt"); } @TestMetadata("propertiesOrderInPackage.kt") public void testPropertiesOrderInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesOrderInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesOrderInPackage.kt"); } @TestMetadata("reassignmentInTryCatch.kt") public void testReassignmentInTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatch.kt"); } @TestMetadata("reassignmentInTryCatchWithJumps.kt") public void testReassignmentInTryCatchWithJumps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatchWithJumps.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatchWithJumps.kt"); } @TestMetadata("referenceToPropertyInitializer.kt") public void testReferenceToPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/referenceToPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/referenceToPropertyInitializer.kt"); } @TestMetadata("repeatUnitializedErrorOnlyForLocalVars.kt") public void testRepeatUnitializedErrorOnlyForLocalVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/repeatUnitializedErrorOnlyForLocalVars.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/repeatUnitializedErrorOnlyForLocalVars.kt"); } @TestMetadata("scopeOfAnonymousInitializer.kt") public void testScopeOfAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/scopeOfAnonymousInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/scopeOfAnonymousInitializer.kt"); } @TestMetadata("throwInLambda.kt") public void testThrowInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt"); } @TestMetadata("tryWithAssignmentUsedInCatch.kt") public void testTryWithAssignmentUsedInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/tryWithAssignmentUsedInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/tryWithAssignmentUsedInCatch.kt"); } @TestMetadata("uninitializedInLocalDeclarations.kt") public void testUninitializedInLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/uninitializedInLocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/uninitializedInLocalDeclarations.kt"); } @TestMetadata("UninitializedOrReassignedVariables.kt") public void testUninitializedOrReassignedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt"); } @TestMetadata("unmappedArgs.kt") public void testUnmappedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unmappedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unmappedArgs.kt"); } @TestMetadata("unresolvedReference.kt") public void testUnresolvedReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); } @TestMetadata("unusedInAnonymous.kt") public void testUnusedInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); } @TestMetadata("useUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/useUninitializedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/useUninitializedInLambda.kt"); } @TestMetadata("varInitializationInIfInCycle.kt") public void testVarInitializationInIfInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/varInitializationInIfInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/varInitializationInIfInCycle.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCode extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeadCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commasAndWhitespaces.kt") public void testCommasAndWhitespaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commasAndWhitespaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commasAndWhitespaces.kt"); } @TestMetadata("commentsInDeadCode.kt") public void testCommentsInDeadCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commentsInDeadCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commentsInDeadCode.kt"); } @TestMetadata("deadCallInInvokeCall.kt") public void testDeadCallInInvokeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInInvokeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInInvokeCall.kt"); } @TestMetadata("deadCallInReceiver.kt") public void testDeadCallInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt"); } @TestMetadata("deadCodeDifferentExamples.kt") public void testDeadCodeDifferentExamples() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.kt"); } @TestMetadata("deadCodeFromDifferentSources.kt") public void testDeadCodeFromDifferentSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeFromDifferentSources.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeFromDifferentSources.kt"); } @TestMetadata("deadCodeInArrayAccess.kt") public void testDeadCodeInArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInArrayAccess.kt"); } @TestMetadata("deadCodeInAssignment.kt") public void testDeadCodeInAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInAssignment.kt"); } @TestMetadata("deadCodeInBinaryExpressions.kt") public void testDeadCodeInBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInBinaryExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInBinaryExpressions.kt"); } @TestMetadata("deadCodeInCalls.kt") public void testDeadCodeInCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInCalls.kt"); } @TestMetadata("deadCodeInDeadCode.kt") public void testDeadCodeInDeadCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInDeadCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInDeadCode.kt"); } @TestMetadata("deadCodeInIf.kt") public void testDeadCodeInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInIf.kt"); } @TestMetadata("deadCodeInInnerExpressions.kt") public void testDeadCodeInInnerExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInInnerExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInInnerExpressions.kt"); } @TestMetadata("deadCodeInLocalDeclarations.kt") public void testDeadCodeInLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.kt"); } @TestMetadata("deadCodeInLoops.kt") public void testDeadCodeInLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLoops.kt"); } @TestMetadata("deadCodeInReturn.kt") public void testDeadCodeInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInReturn.kt"); } @TestMetadata("deadCodeInUnaryExpr.kt") public void testDeadCodeInUnaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInUnaryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInUnaryExpr.kt"); } @TestMetadata("deadCodeInWhileFromBreak.kt") public void testDeadCodeInWhileFromBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInWhileFromBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInWhileFromBreak.kt"); } @TestMetadata("expressionInUnitLiteral.kt") public void testExpressionInUnitLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/expressionInUnitLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/expressionInUnitLiteral.kt"); } @TestMetadata("kt2585_1.kt") public void testKt2585_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_1.kt"); } @TestMetadata("kt2585_2.kt") public void testKt2585_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_2.kt"); } @TestMetadata("kt2585_3.kt") public void testKt2585_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_3.kt"); } @TestMetadata("kt3162tryAsInitializer.kt") public void testKt3162tryAsInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt3162tryAsInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt3162tryAsInitializer.kt"); } @TestMetadata("kt5200DeadCodeInLambdas.kt") public void testKt5200DeadCodeInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt5200DeadCodeInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt5200DeadCodeInLambdas.kt"); } @TestMetadata("returnInDeadLambda.kt") public void testReturnInDeadLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/returnInDeadLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/returnInDeadLambda.kt"); } } @@ -4416,32 +3810,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefiniteReturn extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefiniteReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt3444_ReturnFromLocalFunctions.kt") public void testKt3444_ReturnFromLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt3444_ReturnFromLocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt3444_ReturnFromLocalFunctions.kt"); } @TestMetadata("kt4034.kt") public void testKt4034() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt"); } @TestMetadata("ReturnFromFunctionInObject.kt") public void testReturnFromFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/simpleClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/simpleClass.kt"); } } @@ -4449,80 +3843,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnnecessaryLateinit extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnnecessaryLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lateinitRecursiveInLambda.kt") public void testLateinitRecursiveInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitRecursiveInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitRecursiveInLambda.kt"); } @TestMetadata("lateinitWithConstructor.kt") public void testLateinitWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithConstructor.kt"); } @TestMetadata("lateinitWithErroneousDelegation.kt") public void testLateinitWithErroneousDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithErroneousDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithErroneousDelegation.kt"); } @TestMetadata("lateinitWithInit.kt") public void testLateinitWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithInit.kt"); } @TestMetadata("lateinitWithMultipleConstructors.kt") public void testLateinitWithMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructors.kt"); } @TestMetadata("lateinitWithMultipleConstructorsAndDelegation.kt") public void testLateinitWithMultipleConstructorsAndDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructorsAndDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructorsAndDelegation.kt"); } @TestMetadata("lateinitWithPlusAssign.kt") public void testLateinitWithPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPlusAssign.kt"); } @TestMetadata("lateinitWithPrimaryConstructorAndConstructor.kt") public void testLateinitWithPrimaryConstructorAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPrimaryConstructorAndConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPrimaryConstructorAndConstructor.kt"); } @TestMetadata("normalLateinit.kt") public void testNormalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinit.kt"); } @TestMetadata("normalLateinitWithTwoConstructors.kt") public void testNormalLateinitWithTwoConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinitWithTwoConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinitWithTwoConstructors.kt"); } @TestMetadata("secondaryConstructorDelegateItself.kt") public void testSecondaryConstructorDelegateItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateItself.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateItself.kt"); } @TestMetadata("secondaryConstructorDelegateLoop.kt") public void testSecondaryConstructorDelegateLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateLoop.kt"); } } } @@ -4531,248 +3917,212 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchGenerics.kt") public void testCatchGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchGenerics.kt"); } @TestMetadata("catchInnerClassesOfGenerics.kt") public void testCatchInnerClassesOfGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt"); } @TestMetadata("catchInnerClassesOfGenerics_deprecation.kt") public void testCatchInnerClassesOfGenerics_deprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.kt"); } @TestMetadata("catchWithDefault.kt") public void testCatchWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.kt"); } @TestMetadata("catchingLocalClassesCapturingTypeParameters.kt") public void testCatchingLocalClassesCapturingTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt"); } @TestMetadata("commonSupertypeOfT.kt") public void testCommonSupertypeOfT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt"); } @TestMetadata("continueAndBreakLabelWithSameFunctionName.kt") public void testContinueAndBreakLabelWithSameFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt"); } @TestMetadata("emptyIf.kt") public void testEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/emptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/emptyIf.kt"); } @TestMetadata("ForLoopWithExtensionIteratorOnNullable.kt") public void testForLoopWithExtensionIteratorOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt"); } @TestMetadata("forLoopWithNullableRange.kt") public void testForLoopWithNullableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt"); } @TestMetadata("forWithNullableIterator.kt") public void testForWithNullableIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.kt"); } @TestMetadata("ForWithoutBraces.kt") public void testForWithoutBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ForWithoutBraces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ForWithoutBraces.kt"); } @TestMetadata("ForbidStatementAsDirectFunctionBody.kt") public void testForbidStatementAsDirectFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt"); } @TestMetadata("ifElseIntersection.kt") public void testIfElseIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt"); } @TestMetadata("ifInResultOfLambda.kt") public void testIfInResultOfLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt"); } @TestMetadata("ifToAnyDiscriminatingUsages.kt") public void testIfToAnyDiscriminatingUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt"); } @TestMetadata("ifWhenToAnyComplexExpressions.kt") public void testIfWhenToAnyComplexExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifWhenToAnyComplexExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifWhenToAnyComplexExpressions.kt"); } @TestMetadata("ifWhenWithoutElse.kt") public void testIfWhenWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt"); } @TestMetadata("improperElseInExpression.kt") public void testImproperElseInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt"); } @TestMetadata("jumpAcrossFunctionBoundary.kt") public void testJumpAcrossFunctionBoundary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/jumpAcrossFunctionBoundary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/jumpAcrossFunctionBoundary.kt"); } @TestMetadata("kt10322.kt") public void testKt10322() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt10322.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt10322.kt"); } @TestMetadata("kt10706.kt") public void testKt10706() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt10706.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt10706.kt"); } @TestMetadata("kt10717.kt") public void testKt10717() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt10717.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt10717.kt"); } @TestMetadata("kt1075.kt") public void testKt1075() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt1075.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt1075.kt"); } @TestMetadata("kt4310.kt") public void testKt4310() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt4310.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt4310.kt"); } @TestMetadata("kt657.kt") public void testKt657() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt657.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt657.kt"); } @TestMetadata("kt770.kt351.kt735_StatementType.kt") public void testKt770_kt351_kt735_StatementType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt"); } @TestMetadata("kt786.kt") public void testKt786() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt786.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt786.kt"); } @TestMetadata("kt799.kt") public void testKt799() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt799.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt799.kt"); } @TestMetadata("lambdasInExclExclAndElvis.kt") public void testLambdasInExclExclAndElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt"); } @TestMetadata("localReturnInsidePropertyAccessor.kt") public void testLocalReturnInsidePropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/localReturnInsidePropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/localReturnInsidePropertyAccessor.kt"); } @TestMetadata("specialConstructsAndPlatformTypes.kt") public void testSpecialConstructsAndPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt"); } @TestMetadata("specialConstructsWithNullableExpectedType.kt") public void testSpecialConstructsWithNullableExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/specialConstructsWithNullableExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/specialConstructsWithNullableExpectedType.kt"); } @TestMetadata("tryReturnType.kt") public void testTryReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt"); } @TestMetadata("typeInferenceForExclExcl.kt") public void testTypeInferenceForExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt"); } @TestMetadata("valVarCatchParameter.kt") public void testValVarCatchParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/valVarCatchParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/valVarCatchParameter.kt"); } @TestMetadata("valVarLoopParameter.kt") public void testValVarLoopParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt"); } @TestMetadata("whenInResultOfLambda.kt") public void testWhenInResultOfLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt"); } @TestMetadata("whenToAnyDiscriminatingUsages.kt") public void testWhenToAnyDiscriminatingUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/whenToAnyDiscriminatingUsages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/whenToAnyDiscriminatingUsages.kt"); } @TestMetadata("when.kt234.kt973.kt") public void testWhen_kt234_kt973() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt"); } } @@ -4780,148 +4130,134 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CyclicHierarchy extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCyclicHierarchy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classIndirectlyInheritsNested.kt") public void testClassIndirectlyInheritsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/classIndirectlyInheritsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/classIndirectlyInheritsNested.kt"); } @TestMetadata("classInheritsNested.kt") public void testClassInheritsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/classInheritsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/classInheritsNested.kt"); } @TestMetadata("commonSupertypeForCyclicAndUsualTypes.kt") public void testCommonSupertypeForCyclicAndUsualTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt"); } @TestMetadata("commonSupertypeForCyclicTypes.kt") public void testCommonSupertypeForCyclicTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicTypes.kt"); } @TestMetadata("cyclicHierarchy.kt") public void testCyclicHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt"); } @TestMetadata("javaJavaCycle.kt") public void testJavaJavaCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaCycle.kt"); } @TestMetadata("javaJavaNested.kt") public void testJavaJavaNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaNested.kt"); } @TestMetadata("javaKotlinJavaCycle.kt") public void testJavaKotlinJavaCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt"); } @TestMetadata("kotlinJavaCycle.kt") public void testKotlinJavaCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaCycle.kt"); } @TestMetadata("kotlinJavaKotlinCycle.kt") public void testKotlinJavaKotlinCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaKotlinCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaKotlinCycle.kt"); } @TestMetadata("kotlinJavaNestedCycle.kt") public void testKotlinJavaNestedCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt"); } @TestMetadata("kt303.kt") public void testKt303() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt"); } @TestMetadata("nestedClassInSuperClassParameter.kt") public void testNestedClassInSuperClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/nestedClassInSuperClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/nestedClassInSuperClassParameter.kt"); } @TestMetadata("objectInheritsNested.kt") public void testObjectInheritsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/objectInheritsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/objectInheritsNested.kt"); } @TestMetadata("twoClassesWithNestedCycle.kt") public void testTwoClassesWithNestedCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/twoClassesWithNestedCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/twoClassesWithNestedCycle.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithCompanion extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithCompanion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("everythingInOneScope.kt") public void testEverythingInOneScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope.kt"); } @TestMetadata("noMembers.kt") public void testNoMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers.kt"); } @TestMetadata("onlyInterfaces.kt") public void testOnlyInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces.kt"); } @TestMetadata("typeIsLowEnough.kt") public void testTypeIsLowEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/typeIsLowEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/typeIsLowEnough.kt"); } @TestMetadata("withIrrelevantInterface.kt") public void testWithIrrelevantInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface.kt"); } @TestMetadata("withMembers.kt") public void testWithMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers.kt"); } @TestMetadata("withoutTypeReference.kt") public void testWithoutTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withoutTypeReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withoutTypeReference.kt"); } } } @@ -4930,200 +4266,172 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("componentNamedComponent1.kt") public void testComponentNamedComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/componentNamedComponent1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/componentNamedComponent1.kt"); } @TestMetadata("conflictingCopyOverloads.kt") public void testConflictingCopyOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.kt"); } @TestMetadata("conflictingOverloads.kt") public void testConflictingOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt"); } @TestMetadata("copyOfPrivateClass.kt") public void testCopyOfPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/copyOfPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/copyOfPrivateClass.kt"); } @TestMetadata("dataClassExplicitlyOverridingCopyNoDefaults.kt") public void testDataClassExplicitlyOverridingCopyNoDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyNoDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyNoDefaults.kt"); } @TestMetadata("dataClassExplicitlyOverridingCopyWithDefaults.kt") public void testDataClassExplicitlyOverridingCopyWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyWithDefaults.kt"); } @TestMetadata("dataClassNoName.kt") public void testDataClassNoName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassNoName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassNoName.kt"); } @TestMetadata("dataClassNotOverridingCopy.kt") public void testDataClassNotOverridingCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassNotOverridingCopy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassNotOverridingCopy.kt"); } @TestMetadata("dataClassOverridingCopy_lv12.kt") public void testDataClassOverridingCopy_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv12.kt"); } @TestMetadata("dataClassOverridingCopy_lv13.kt") public void testDataClassOverridingCopy_lv13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv13.kt"); } @TestMetadata("dataClassVarargParam.kt") public void testDataClassVarargParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt"); } @TestMetadata("dataInheritance.kt") public void testDataInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataInheritance.kt"); } @TestMetadata("dataObject.kt") public void testDataObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataObject.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/emptyConstructor.kt"); } @TestMetadata("errorTypesInDataClasses.kt") public void testErrorTypesInDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/errorTypesInDataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/errorTypesInDataClasses.kt"); } @TestMetadata("extensionComponentsOnNullable.kt") public void testExtensionComponentsOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt"); } @TestMetadata("finalMembersInBaseClass.kt") public void testFinalMembersInBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/finalMembersInBaseClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/finalMembersInBaseClass.kt"); } @TestMetadata("implementMethodsFromInterface.kt") public void testImplementMethodsFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/implementMethodsFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/implementMethodsFromInterface.kt"); } @TestMetadata("implementTraitWhichHasComponent1.kt") public void testImplementTraitWhichHasComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt"); } @TestMetadata("implementTraitWhichHasFinalComponent1.kt") public void testImplementTraitWhichHasFinalComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt"); } @TestMetadata("innerDataClass.kt") public void testInnerDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/innerDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/innerDataClass.kt"); } @TestMetadata("innerOuterDataClass.kt") public void testInnerOuterDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/innerOuterDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/innerOuterDataClass.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/multiDeclaration.kt"); } @TestMetadata("multiDeclarationFor.kt") public void testMultiDeclarationFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/multiDeclarationFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/multiDeclarationFor.kt"); } @TestMetadata("noConstructor.kt") public void testNoConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/noConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/noConstructor.kt"); } @TestMetadata("notADataClass.kt") public void testNotADataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/notADataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/notADataClass.kt"); } @TestMetadata("oneValParam.kt") public void testOneValParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/oneValParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/oneValParam.kt"); } @TestMetadata("repeatedProperties.kt") public void testRepeatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.kt"); } @TestMetadata("sealedDataClass.kt") public void testSealedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/strange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/strange.kt"); } @TestMetadata("twoValParams.kt") public void testTwoValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/twoValParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/twoValParams.kt"); } @TestMetadata("twoVarParams.kt") public void testTwoVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/twoVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/twoVarParams.kt"); } } @@ -5131,70 +4439,69 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataFlow extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CalleeExpression.kt") public void testCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/CalleeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/CalleeExpression.kt"); } @TestMetadata("EmptyIf.kt") public void testEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/EmptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/EmptyIf.kt"); } @TestMetadata("IsExpression.kt") public void testIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt"); } @TestMetadata("WhenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Assignment extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/assignment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignToNewVal.kt") public void testAssignToNewVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/assignToNewVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/assignToNewVal.kt"); } @TestMetadata("kt6118.kt") public void testKt6118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/kt6118.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/kt6118.kt"); } @TestMetadata("uninitializedValIsCheck.kt") public void testUninitializedValIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValIsCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValIsCheck.kt"); } @TestMetadata("uninitializedValNullability.kt") public void testUninitializedValNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/when.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/when.kt"); } } @@ -5202,80 +4509,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt2835.kt") public void testKt2835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/kt2835.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/kt2835.kt"); } @TestMetadata("LocalClassBase.kt") public void testLocalClassBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt"); } @TestMetadata("LocalClassDefaultParameters.kt") public void testLocalClassDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt"); } @TestMetadata("LocalClassDelegatedProperties.kt") public void testLocalClassDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegatedProperties.kt"); } @TestMetadata("LocalClassDelegation.kt") public void testLocalClassDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt"); } @TestMetadata("LocalClassFunctions.kt") public void testLocalClassFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt"); } @TestMetadata("LocalClassInMemberOfLocalClass.kt") public void testLocalClassInMemberOfLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInMemberOfLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInMemberOfLocalClass.kt"); } @TestMetadata("LocalClassInitializer.kt") public void testLocalClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt"); } @TestMetadata("LocalClassProperty.kt") public void testLocalClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassProperty.kt"); } @TestMetadata("LocalObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt"); } @TestMetadata("LocalObjectDelegation.kt") public void testLocalObjectDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt"); } @TestMetadata("NestedLocalClass.kt") public void testNestedLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/NestedLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/NestedLocalClass.kt"); } } } @@ -5284,340 +4583,294 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataFlowInfoTraversal extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataFlowInfoTraversal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AndOr.kt") public void testAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.kt"); } @TestMetadata("ArrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt"); } @TestMetadata("ArrayExpression.kt") public void testArrayExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayExpression.kt"); } @TestMetadata("ArrayGetSetConvention.kt") public void testArrayGetSetConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt"); } @TestMetadata("ArrayIndices.kt") public void testArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayIndices.kt"); } @TestMetadata("Assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt"); } @TestMetadata("AssignmentInInitializer.kt") public void testAssignmentInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt"); } @TestMetadata("AssignmentOperation.kt") public void testAssignmentOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentOperation.kt"); } @TestMetadata("AssignmentToArrayElement.kt") public void testAssignmentToArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentToArrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentToArrayElement.kt"); } @TestMetadata("BinaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt"); } @TestMetadata("BinaryExpressionBooleanOperations.kt") public void testBinaryExpressionBooleanOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.kt"); } @TestMetadata("BinaryExpressionCompareToConvention.kt") public void testBinaryExpressionCompareToConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt"); } @TestMetadata("BinaryExpressionContainsConvention.kt") public void testBinaryExpressionContainsConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionContainsConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionContainsConvention.kt"); } @TestMetadata("BinaryExpressionElvis.kt") public void testBinaryExpressionElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.kt"); } @TestMetadata("BinaryExpressionEqualsConvention.kt") public void testBinaryExpressionEqualsConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt"); } @TestMetadata("BinaryExpressionIdentifier.kt") public void testBinaryExpressionIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt"); } @TestMetadata("BinaryExpressionPlusConvention.kt") public void testBinaryExpressionPlusConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt"); } @TestMetadata("Condition.kt") public void testCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Condition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Condition.kt"); } @TestMetadata("ContinueOuterLoop.kt") public void testContinueOuterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ContinueOuterLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ContinueOuterLoop.kt"); } @TestMetadata("DeepIf.kt") public void testDeepIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt"); } @TestMetadata("DoWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt"); } @TestMetadata("DoWhileCondition.kt") public void testDoWhileCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.kt"); } @TestMetadata("Elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.kt"); } @TestMetadata("ExclExcl.kt") public void testExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt"); } @TestMetadata("ForLoopRange.kt") public void testForLoopRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ForLoopRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ForLoopRange.kt"); } @TestMetadata("FunctionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.kt"); } @TestMetadata("IfStatement.kt") public void testIfStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.kt"); } @TestMetadata("IfThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.kt"); } @TestMetadata("IfThenElseBothInvalid.kt") public void testIfThenElseBothInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.kt"); } @TestMetadata("IsExpression.kt") public void testIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IsExpression.kt"); } @TestMetadata("kt4332WhenBranches.kt") public void testKt4332WhenBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt4332WhenBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt4332WhenBranches.kt"); } @TestMetadata("kt5155WhenBranches.kt") public void testKt5155WhenBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt"); } @TestMetadata("kt5182WhenBranches.kt") public void testKt5182WhenBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5182WhenBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5182WhenBranches.kt"); } @TestMetadata("ManyIfs.kt") public void testManyIfs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/MultiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/MultiDeclaration.kt"); } @TestMetadata("ObjectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt"); } @TestMetadata("QualifiedExpression.kt") public void testQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.kt"); } @TestMetadata("Return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt"); } @TestMetadata("StringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/StringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/StringTemplate.kt"); } @TestMetadata("ThisSuper.kt") public void testThisSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.kt"); } @TestMetadata("Throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.kt"); } @TestMetadata("TryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt"); } @TestMetadata("TryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.kt"); } @TestMetadata("UnaryExpression.kt") public void testUnaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/UnaryExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/UnaryExpression.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/When.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/When.kt"); } @TestMetadata("WhenEntryAs.kt") public void testWhenEntryAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryAs.kt"); } @TestMetadata("WhenEntryIs.kt") public void testWhenEntryIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.kt"); } @TestMetadata("WhenIn.kt") public void testWhenIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenIn.kt"); } @TestMetadata("WhenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenSubject.kt"); } @TestMetadata("While.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt"); } @TestMetadata("WhileCondition.kt") public void testWhileCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smartcasts extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartcasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("SmartcastAmbiguitites.kt") public void testSmartcastAmbiguitites() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt"); } @TestMetadata("SmartcastsForStableIdentifiers.kt") public void testSmartcastsForStableIdentifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt"); } } } @@ -5626,292 +4879,254 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationChecks extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationChecks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousObjectExpressionType.kt") public void testAmbiguousObjectExpressionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt"); } @TestMetadata("anonymousFunAsLastExpressionInBlock.kt") public void testAnonymousFunAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt"); } @TestMetadata("anonymousFunUnusedLastExpressionInBlock.kt") public void testAnonymousFunUnusedLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunUnusedLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunUnusedLastExpressionInBlock.kt"); } @TestMetadata("ComponentFunctionReturnTypeMismatch.kt") public void testComponentFunctionReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt"); } @TestMetadata("ConflictingAndRedundantProjections.kt") public void testConflictingAndRedundantProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt"); } @TestMetadata("DataFlowInMultiDeclInFor.kt") public void testDataFlowInMultiDeclInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt"); } @TestMetadata("DataFlowInfoInMultiDecl.kt") public void testDataFlowInfoInMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt"); } @TestMetadata("FunctionWithMissingNames.kt") public void testFunctionWithMissingNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt"); } @TestMetadata("illegalModifiersOnClass.kt") public void testIllegalModifiersOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt"); } @TestMetadata("kClassInSignature.kt") public void testKClassInSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kClassInSignature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kClassInSignature.kt"); } @TestMetadata("kt1141.kt") public void testKt1141() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt"); } @TestMetadata("kt1193.kt") public void testKt1193() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt1193.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt1193.kt"); } @TestMetadata("kt2096.kt") public void testKt2096() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2096.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2096.kt"); } @TestMetadata("kt2142.kt") public void testKt2142() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2142.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2142.kt"); } @TestMetadata("kt2397.kt") public void testKt2397() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt"); } @TestMetadata("kt2631_MultipleDeclaration.kt") public void testKt2631_MultipleDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.kt"); } @TestMetadata("kt2643MultiDeclInControlFlow.kt") public void testKt2643MultiDeclInControlFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt"); } @TestMetadata("kt559.kt") public void testKt559() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt559.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt559.kt"); } @TestMetadata("localDeclarationModifiers.kt") public void testLocalDeclarationModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt"); } @TestMetadata("localFunctionNoInheritVisibility.kt") public void testLocalFunctionNoInheritVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/localFunctionNoInheritVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/localFunctionNoInheritVisibility.kt"); } @TestMetadata("LocalVariableWithNoTypeInformation.kt") public void testLocalVariableWithNoTypeInformation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt"); } @TestMetadata("mulitpleVarargParameters.kt") public void testMulitpleVarargParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/mulitpleVarargParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/mulitpleVarargParameters.kt"); } @TestMetadata("MultiDeclarationErrors.kt") public void testMultiDeclarationErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt"); } @TestMetadata("namedFunAsLastExpressionInBlock.kt") public void testNamedFunAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt"); } @TestMetadata("packageDeclarationModifiers.kt") public void testPackageDeclarationModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/packageDeclarationModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/packageDeclarationModifiers.kt"); } @TestMetadata("propertyInPackageHasNoInheritVisibility.kt") public void testPropertyInPackageHasNoInheritVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt"); } @TestMetadata("RedeclarationsInMultiDecl.kt") public void testRedeclarationsInMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt"); } @TestMetadata("ScalaLikeNamedFun.kt") public void testScalaLikeNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ScalaLikeNamedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ScalaLikeNamedFun.kt"); } @TestMetadata("sealedOnMembers.kt") public void testSealedOnMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/sealedOnMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/sealedOnMembers.kt"); } @TestMetadata("unambiguousObjectExpressionType.kt") public void testUnambiguousObjectExpressionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/unambiguousObjectExpressionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/unambiguousObjectExpressionType.kt"); } @TestMetadata("valVarFunctionParameter.kt") public void testValVarFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/valVarFunctionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/valVarFunctionParameter.kt"); } @TestMetadata("VarianceOnFunctionAndPropertyTypeParameters.kt") public void testVarianceOnFunctionAndPropertyTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/VarianceOnFunctionAndPropertyTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/VarianceOnFunctionAndPropertyTypeParameters.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringDeclarations extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDestructuringDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("destructuringDeclarationAssignedUnresolved.kt") public void testDestructuringDeclarationAssignedUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt"); } @TestMetadata("destructuringDeclarationMissingInitializer.kt") public void testDestructuringDeclarationMissingInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt"); } @TestMetadata("DoubleDeclForLoop.kt") public void testDoubleDeclForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt"); } @TestMetadata("FolLoopTypeComponentTypeMismatch.kt") public void testFolLoopTypeComponentTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt"); } @TestMetadata("ForLoopComponentFunctionAmbiguity.kt") public void testForLoopComponentFunctionAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt"); } @TestMetadata("ForLoopComponentFunctionMissing.kt") public void testForLoopComponentFunctionMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt"); } @TestMetadata("ForLoopMissingLoopParameter.kt") public void testForLoopMissingLoopParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt"); } @TestMetadata("ForLoopWithExtensions.kt") public void testForLoopWithExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt"); } @TestMetadata("ForWithExplicitTypes.kt") public void testForWithExplicitTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt"); } @TestMetadata("kt2829.kt") public void testKt2829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/kt2829.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/kt2829.kt"); } @TestMetadata("lastDestructuringDeclarationInBlock.kt") public void testLastDestructuringDeclarationInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/lastDestructuringDeclarationInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/lastDestructuringDeclarationInBlock.kt"); } @TestMetadata("RedeclarationInForLoop.kt") public void testRedeclarationInForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt"); } @TestMetadata("SingleDeclForLoop.kt") public void testSingleDeclForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt"); } @TestMetadata("underscore.kt") public void testUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt"); } } @@ -5919,26 +5134,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FiniteBoundRestriction extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFiniteBoundRestriction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CasesWithOneTypeParameter.kt") public void testCasesWithOneTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithOneTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithOneTypeParameter.kt"); } @TestMetadata("CasesWithTwoTypeParameters.kt") public void testCasesWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithTwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithTwoTypeParameters.kt"); } @TestMetadata("JavaSuperType.kt") public void testJavaSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt"); } } @@ -5946,26 +5162,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonExpansiveInheritanceRestriction extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonExpansiveInheritanceRestriction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("JavaWithKotlin.kt") public void testJavaWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin.kt"); } @TestMetadata("JavaWithKotlin2.kt") public void testJavaWithKotlin2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin2.kt"); } @TestMetadata("PureKotlin.kt") public void testPureKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/PureKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/PureKotlin.kt"); } } } @@ -5974,20 +5191,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt5232.kt") public void testKt5232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/defaultArguments/kt5232.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/defaultArguments/kt5232.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/defaultArguments/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/defaultArguments/superCall.kt"); } } @@ -5995,22 +5214,23 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("absentErrorAboutInitializer.kt") public void testAbsentErrorAboutInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutInitializer.kt"); } @TestMetadata("absentErrorAboutType.kt") public void testAbsentErrorAboutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutType.kt"); } @TestMetadata("abstractDelegatedProperty.kt") public void testAbstractDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/abstractDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/abstractDelegatedProperty.kt"); } public void testAllFilesPresentInDelegatedProperty() throws Exception { @@ -6019,310 +5239,264 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("backingField.kt") public void testBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/backingField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/backingField.kt"); } @TestMetadata("defaultGetter.kt") public void testDefaultGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/defaultGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/defaultGetter.kt"); } @TestMetadata("defaultSetter.kt") public void testDefaultSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.kt"); } @TestMetadata("delegatedPropertyOverridedInTrait.kt") public void testDelegatedPropertyOverridedInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt"); } @TestMetadata("delegatedPropertyOverridedInTraitTypeMismatch.kt") public void testDelegatedPropertyOverridedInTraitTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt"); } @TestMetadata("disallowImplInTypeParameter.kt") public void testDisallowImplInTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt"); } @TestMetadata("genericGetter.kt") public void testGenericGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/genericGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/genericGetter.kt"); } @TestMetadata("getterWithSubtype.kt") public void testGetterWithSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/getterWithSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/getterWithSubtype.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt"); } @TestMetadata("incompleteTypeInference.kt") public void testIncompleteTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.kt"); } @TestMetadata("kt4640.kt") public void testKt4640() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/kt4640.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/kt4640.kt"); } @TestMetadata("localVariable.kt") public void testLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/localVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/localVariable.kt"); } @TestMetadata("localWithSmartCast.kt") public void testLocalWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/localWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/localWithSmartCast.kt"); } @TestMetadata("missedGetter.kt") public void testMissedGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.kt"); } @TestMetadata("missedSetter.kt") public void testMissedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/missedSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/missedSetter.kt"); } @TestMetadata("nonDefaultAccessors.kt") public void testNonDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt"); } @TestMetadata("propertyDefferedType.kt") public void testPropertyDefferedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.kt"); } @TestMetadata("recursiveType.kt") public void testRecursiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt"); } @TestMetadata("redundantGetter.kt") public void testRedundantGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/redundantGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/redundantGetter.kt"); } @TestMetadata("redundantSetter.kt") public void testRedundantSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/redundantSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/redundantSetter.kt"); } @TestMetadata("setterThisTypeMismatch.kt") public void testSetterThisTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt"); } @TestMetadata("setterWithSupertype.kt") public void testSetterWithSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt"); } @TestMetadata("severalReceivers.kt") public void testSeveralReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/severalReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/severalReceivers.kt"); } @TestMetadata("thisInDelegate.kt") public void testThisInDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.kt"); } @TestMetadata("thisOfAnyType.kt") public void testThisOfAnyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisOfAnyType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisOfAnyType.kt"); } @TestMetadata("thisOfNothingNullableType.kt") public void testThisOfNothingNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.kt"); } @TestMetadata("thisOfNothingType.kt") public void testThisOfNothingType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.kt"); } @TestMetadata("twoGetMethods.kt") public void testTwoGetMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt"); } @TestMetadata("typeMismatchForGetReturnType.kt") public void testTypeMismatchForGetReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt"); } @TestMetadata("typeMismatchForGetWithGeneric.kt") public void testTypeMismatchForGetWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.kt"); } @TestMetadata("typeMismatchForSetParameter.kt") public void testTypeMismatchForSetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt"); } @TestMetadata("typeMismatchForThisGetParameter.kt") public void testTypeMismatchForThisGetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.kt"); } @TestMetadata("wrongCountOfParametersInGet.kt") public void testWrongCountOfParametersInGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.kt"); } @TestMetadata("wrongCountOfParametersInSet.kt") public void testWrongCountOfParametersInSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInSet.kt"); } @TestMetadata("wrongSetterReturnType.kt") public void testWrongSetterReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/wrongSetterReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/wrongSetterReturnType.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegateExpressionAsLambda.kt") public void testDelegateExpressionAsLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/delegateExpressionAsLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/delegateExpressionAsLambda.kt"); } @TestMetadata("differentDelegatedExpressions.kt") public void testDifferentDelegatedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt"); } @TestMetadata("extensionGet.kt") public void testExtensionGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionGet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionGet.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt"); } @TestMetadata("genericMethodInGenericClass.kt") public void testGenericMethodInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt"); } @TestMetadata("genericMethods.kt") public void testGenericMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.kt"); } @TestMetadata("labeledDelegatedExpression.kt") public void testLabeledDelegatedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt"); } @TestMetadata("manyIncompleteCandidates.kt") public void testManyIncompleteCandidates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt"); } @TestMetadata("noErrorsForImplicitConstraints.kt") public void testNoErrorsForImplicitConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt"); } @TestMetadata("noExpectedTypeForSupertypeConstraint.kt") public void testNoExpectedTypeForSupertypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt"); } @TestMetadata("resultTypeOfLambdaForConventionMethods.kt") public void testResultTypeOfLambdaForConventionMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/resultTypeOfLambdaForConventionMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/resultTypeOfLambdaForConventionMethods.kt"); } @TestMetadata("typeOfLazyDelegatedPropertyWithObject.kt") public void testTypeOfLazyDelegatedPropertyWithObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/typeOfLazyDelegatedPropertyWithObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/typeOfLazyDelegatedPropertyWithObject.kt"); } @TestMetadata("useCompleterWithoutExpectedType.kt") public void testUseCompleterWithoutExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/useCompleterWithoutExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/useCompleterWithoutExpectedType.kt"); } @TestMetadata("useExpectedType.kt") public void testUseExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt"); } @TestMetadata("useExpectedTypeForVal.kt") public void testUseExpectedTypeForVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedTypeForVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedTypeForVal.kt"); } } @@ -6330,86 +5504,77 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commonCaseForInference.kt") public void testCommonCaseForInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt"); } @TestMetadata("genericProvideDelegate.kt") public void testGenericProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/genericProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/genericProvideDelegate.kt"); } @TestMetadata("hostAndReceiver1.kt") public void testHostAndReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.kt"); } @TestMetadata("hostAndReceiver2.kt") public void testHostAndReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt"); } @TestMetadata("hostAndReceiver3.kt") public void testHostAndReceiver3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.kt"); } @TestMetadata("inferenceFromReceiver1.kt") public void testInferenceFromReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt"); } @TestMetadata("inferenceFromReceiver2.kt") public void testInferenceFromReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); } @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); } @TestMetadata("noOperatorModifierOnProvideDelegate.kt") public void testNoOperatorModifierOnProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt"); } @TestMetadata("provideDelegateOperatorDeclaration.kt") public void testProvideDelegateOperatorDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOperatorDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOperatorDeclaration.kt"); } @TestMetadata("setValue.kt") public void testSetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt"); } @TestMetadata("simpleProvideDelegate.kt") public void testSimpleProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); } @TestMetadata("unsupportedOperatorProvideDelegate.kt") public void testUnsupportedOperatorProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); } } } @@ -6418,94 +5583,89 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegationAndOverriding.kt") public void testDelegationAndOverriding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt"); } @TestMetadata("DelegationExpectedType.kt") public void testDelegationExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt"); } @TestMetadata("DelegationNotTotrait.kt") public void testDelegationNotTotrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt"); } @TestMetadata("DelegationToJavaIface.kt") public void testDelegationToJavaIface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.kt"); } @TestMetadata("Delegation_ClashingFunctions.kt") public void testDelegation_ClashingFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt"); } @TestMetadata("Delegation_Hierarchy.kt") public void testDelegation_Hierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt"); } @TestMetadata("Delegation_MultipleDelegates.kt") public void testDelegation_MultipleDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt"); } @TestMetadata("Delegation_ScopeInitializationOrder.kt") public void testDelegation_ScopeInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt"); } @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/kt8154.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/kt8154.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/delegation/clashes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Clashes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClashes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/clashes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finalMemberOverridden.kt") public void testFinalMemberOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt"); } @TestMetadata("propertyTypeMismatch.kt") public void testPropertyTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/propertyTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/propertyTypeMismatch.kt"); } @TestMetadata("returnTypeMismatch.kt") public void testReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/returnTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/returnTypeMismatch.kt"); } @TestMetadata("varOverriddenByVal.kt") public void testVarOverriddenByVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/varOverriddenByVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/varOverriddenByVal.kt"); } } @@ -6513,32 +5673,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CovariantOverrides extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCovariantOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/covariantOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fromClass.kt") public void testFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/fromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/fromClass.kt"); } @TestMetadata("irrelevant.kt") public void testIrrelevant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/irrelevant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/irrelevant.kt"); } @TestMetadata("kt13952.kt") public void testKt13952() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/kt13952.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/kt13952.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/simple.kt"); } } @@ -6546,10 +5706,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberHidesSupertypeOverride extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractOverride.kt") public void testAbstractOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/abstractOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/abstractOverride.kt"); } public void testAllFilesPresentInMemberHidesSupertypeOverride() throws Exception { @@ -6558,86 +5721,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("delegationToSubType.kt") public void testDelegationToSubType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubType.kt"); } @TestMetadata("delegationToSubTypeProperty.kt") public void testDelegationToSubTypeProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeProperty.kt"); } @TestMetadata("delegationToSubTypeWithOverride.kt") public void testDelegationToSubTypeWithOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverride.kt"); } @TestMetadata("delegationToSubTypeWithOverrideProperty.kt") public void testDelegationToSubTypeWithOverrideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverrideProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverrideProperty.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/diamond.kt"); } @TestMetadata("explicitOverride.kt") public void testExplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/explicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/explicitOverride.kt"); } @TestMetadata("fakeOverrideInTheMiddle.kt") public void testFakeOverrideInTheMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/fakeOverrideInTheMiddle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/fakeOverrideInTheMiddle.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/generic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/generic.kt"); } @TestMetadata("sameDelegationInHierarchy.kt") public void testSameDelegationInHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy.kt"); } @TestMetadata("sameDelegationInHierarchy2.kt") public void testSameDelegationInHierarchy2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy2.kt"); } @TestMetadata("severalDelegates.kt") public void testSeveralDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simple.kt"); } @TestMetadata("simpleNoOverride.kt") public void testSimpleNoOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleNoOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleNoOverride.kt"); } @TestMetadata("simpleProp.kt") public void testSimpleProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleProp.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleProp.kt"); } } } @@ -6646,44 +5795,42 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedSafeCall.kt") public void testAnnotatedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.kt"); } @TestMetadata("checkDeparenthesizedType.kt") public void testCheckDeparenthesizedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt"); } @TestMetadata("labeledSafeCall.kt") public void testLabeledSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/labeledSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/labeledSafeCall.kt"); } @TestMetadata("multiParenthesizedSafeCall.kt") public void testMultiParenthesizedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/multiParenthesizedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/multiParenthesizedSafeCall.kt"); } @TestMetadata("parenthesizedSafeCall.kt") public void testParenthesizedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/parenthesizedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/parenthesizedSafeCall.kt"); } @TestMetadata("ParenthesizedVariable.kt") public void testParenthesizedVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/ParenthesizedVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/ParenthesizedVariable.kt"); } } @@ -6691,200 +5838,172 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deprecated extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationUsage.kt") public void testAnnotationUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt"); } @TestMetadata("classWithCompanionObject.kt") public void testClassWithCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/classWithCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/classWithCompanionObject.kt"); } @TestMetadata("companionObjectUsage.kt") public void testCompanionObjectUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/companionObjectUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/companionObjectUsage.kt"); } @TestMetadata("componentUsage.kt") public void testComponentUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/componentUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/componentUsage.kt"); } @TestMetadata("deprecatedConstructor.kt") public void testDeprecatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedConstructor.kt"); } @TestMetadata("deprecatedError.kt") public void testDeprecatedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedError.kt"); } @TestMetadata("deprecatedErrorBuilder.kt") public void testDeprecatedErrorBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedErrorBuilder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedErrorBuilder.kt"); } @TestMetadata("deprecatedHidden.kt") public void testDeprecatedHidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); } @TestMetadata("deprecatedInheritance.kt") public void testDeprecatedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); } @TestMetadata("deprecatedPropertyInheritance.kt") public void testDeprecatedPropertyInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt"); } @TestMetadata("functionUsage.kt") public void testFunctionUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/functionUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/functionUsage.kt"); } @TestMetadata("genericConstructorUsage.kt") public void testGenericConstructorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/genericConstructorUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/genericConstructorUsage.kt"); } @TestMetadata("hiddenPropertyAccessors.kt") public void testHiddenPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/hiddenPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/hiddenPropertyAccessors.kt"); } @TestMetadata("importJavaSamInterface.kt") public void testImportJavaSamInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/importJavaSamInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/importJavaSamInterface.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/imports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/imports.kt"); } @TestMetadata("iteratorUsage.kt") public void testIteratorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/iteratorUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/iteratorUsage.kt"); } @TestMetadata("javaDeprecated.kt") public void testJavaDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/javaDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/javaDeprecated.kt"); } @TestMetadata("javaDeprecatedInheritance.kt") public void testJavaDeprecatedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/javaDeprecatedInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/javaDeprecatedInheritance.kt"); } @TestMetadata("javaDocDeprecated.kt") public void testJavaDocDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/javaDocDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/javaDocDeprecated.kt"); } @TestMetadata("nestedTypesUsage.kt") public void testNestedTypesUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/nestedTypesUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/nestedTypesUsage.kt"); } @TestMetadata("objectUsage.kt") public void testObjectUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/objectUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/objectUsage.kt"); } @TestMetadata("propertyUsage.kt") public void testPropertyUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/propertyUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/propertyUsage.kt"); } @TestMetadata("propertyUseSiteTargetedAnnotations.kt") public void testPropertyUseSiteTargetedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/propertyUseSiteTargetedAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/propertyUseSiteTargetedAnnotations.kt"); } @TestMetadata("propertyWithInvoke.kt") public void testPropertyWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/propertyWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/propertyWithInvoke.kt"); } @TestMetadata("thisUsage.kt") public void testThisUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/thisUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/thisUsage.kt"); } @TestMetadata("typeUsage.kt") public void testTypeUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typeUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typeUsage.kt"); } @TestMetadata("typealiasCompanionObject.kt") public void testTypealiasCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasCompanionObject.kt"); } @TestMetadata("typealiasConstructor.kt") public void testTypealiasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.kt"); } @TestMetadata("typealiasForDeprecatedClass.kt") public void testTypealiasForDeprecatedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasForDeprecatedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasForDeprecatedClass.kt"); } @TestMetadata("typealiasUsage.kt") public void testTypealiasUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasUsage.kt"); } @TestMetadata("unusedImport.kt") public void testUnusedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/unusedImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/unusedImport.kt"); } @TestMetadata("warningOnConstructorErrorOnClass.kt") public void testWarningOnConstructorErrorOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/warningOnConstructorErrorOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/warningOnConstructorErrorOnClass.kt"); } } @@ -6892,36 +6011,40 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateJvmSignature extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("caseInProperties.kt") public void testCaseInProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/caseInProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/caseInProperties.kt"); } @TestMetadata("missingNames.kt") public void testMissingNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/vararg.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AccidentalOverrides extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accidentalOverrideFromGrandparent.kt") public void testAccidentalOverrideFromGrandparent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/accidentalOverrideFromGrandparent.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/accidentalOverrideFromGrandparent.kt"); } public void testAllFilesPresentInAccidentalOverrides() throws Exception { @@ -6930,86 +6053,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("classFunctionOverriddenByProperty.kt") public void testClassFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByProperty.kt"); } @TestMetadata("classFunctionOverriddenByPropertyInConstructor.kt") public void testClassFunctionOverriddenByPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyInConstructor.kt"); } @TestMetadata("classFunctionOverriddenByPropertyNoGetter.kt") public void testClassFunctionOverriddenByPropertyNoGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyNoGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyNoGetter.kt"); } @TestMetadata("classPropertyOverriddenByFunction.kt") public void testClassPropertyOverriddenByFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt"); } @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/defaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/defaultFunction.kt"); } @TestMetadata("delegatedFunctionOverriddenByProperty.kt") public void testDelegatedFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt"); } @TestMetadata("genericClassFunction.kt") public void testGenericClassFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/genericClassFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/genericClassFunction.kt"); } @TestMetadata("overridesNothing.kt") public void testOverridesNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt"); } @TestMetadata("privateClassFunctionOverriddenByProperty.kt") public void testPrivateClassFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/privateClassFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/privateClassFunctionOverriddenByProperty.kt"); } @TestMetadata("require.kt") public void testRequire() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt"); } @TestMetadata("traitFunctionOverriddenByProperty.kt") public void testTraitFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt"); } @TestMetadata("traitFunctionOverriddenByPropertyNoImpl.kt") public void testTraitFunctionOverriddenByPropertyNoImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt"); } @TestMetadata("traitPropertyOverriddenByFunction.kt") public void testTraitPropertyOverriddenByFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt"); } @TestMetadata("traitPropertyOverriddenByFunctionNoImpl.kt") public void testTraitPropertyOverriddenByFunctionNoImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt"); } } @@ -7017,26 +6126,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bridges extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/class.kt"); } @TestMetadata("fakeOverrideTrait.kt") public void testFakeOverrideTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt"); } } @@ -7044,110 +6154,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Erasure extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErasure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("clashFromInterfaceAndSuperClass.kt") public void testClashFromInterfaceAndSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/clashFromInterfaceAndSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/clashFromInterfaceAndSuperClass.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/collections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/collections.kt"); } @TestMetadata("delegateToTwoTraits.kt") public void testDelegateToTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); } @TestMetadata("delegationAndOwnMethod.kt") public void testDelegationAndOwnMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); } @TestMetadata("delegationToTraitImplAndOwnMethod.kt") public void testDelegationToTraitImplAndOwnMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); } @TestMetadata("extensionProperties.kt") public void testExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/extensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/extensionProperties.kt"); } @TestMetadata("genericType.kt") public void testGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/genericType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/genericType.kt"); } @TestMetadata("inheritFromTwoTraits.kt") public void testInheritFromTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt"); } @TestMetadata("kotlinAndJavaCollections.kt") public void testKotlinAndJavaCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/kotlinAndJavaCollections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/kotlinAndJavaCollections.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/nullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/nullableType.kt"); } @TestMetadata("superTraitAndDelegationToTraitImpl.kt") public void testSuperTraitAndDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt"); } @TestMetadata("twoTraitsAndOwnFunction.kt") public void testTwoTraitsAndOwnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt"); } @TestMetadata("typeMappedToJava.kt") public void testTypeMappedToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeMappedToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeMappedToJava.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameter.kt"); } @TestMetadata("typeParameterWithBound.kt") public void testTypeParameterWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt"); } @TestMetadata("typeParameterWithTwoBounds.kt") public void testTypeParameterWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt"); } @TestMetadata("typeParameterWithTwoBoundsInWhere.kt") public void testTypeParameterWithTwoBoundsInWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt"); } } @@ -7155,20 +6252,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FinalMembersFromBuiltIns extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumMembers.kt") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt"); } @TestMetadata("waitNotifyGetClass.kt") public void testWaitNotifyGetClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass.kt"); } } @@ -7176,122 +6275,107 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionAndProperty extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionAndProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt"); } @TestMetadata("classPropertyInConstructor.kt") public void testClassPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classPropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classPropertyInConstructor.kt"); } @TestMetadata("extensionFunctionAndNormalFunction.kt") public void testExtensionFunctionAndNormalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionFunctionAndNormalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionFunctionAndNormalFunction.kt"); } @TestMetadata("extensionPropertyAndFunction.kt") public void testExtensionPropertyAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionPropertyAndFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionPropertyAndFunction.kt"); } @TestMetadata("functionAndSetter.kt") public void testFunctionAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndSetter.kt"); } @TestMetadata("functionAndVar.kt") public void testFunctionAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndVar.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClass.kt"); } @TestMetadata("localClassInClass.kt") public void testLocalClassInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClassInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClassInClass.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/object.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); } @TestMetadata("objectExpressionInConstructor.kt") public void testObjectExpressionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpressionInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpressionInConstructor.kt"); } @TestMetadata("privateClassPropertyNoClash.kt") public void testPrivateClassPropertyNoClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/privateClassPropertyNoClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/privateClassPropertyNoClash.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevel.kt"); } @TestMetadata("topLevelDifferentFiles.kt") public void testTopLevelDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelDifferentFiles.kt"); } @TestMetadata("topLevelGetter.kt") public void testTopLevelGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelGetter.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt"); } @TestMetadata("withErrorTypes.kt") public void testWithErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt"); } } @@ -7299,68 +6383,62 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialNames extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt"); } @TestMetadata("classObjectCopiedField.kt") public void testClassObjectCopiedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt"); } @TestMetadata("classObjectCopiedFieldObject.kt") public void testClassObjectCopiedFieldObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt"); } @TestMetadata("dataClassCopy.kt") public void testDataClassCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/dataClassCopy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/dataClassCopy.kt"); } @TestMetadata("defaults.kt") public void testDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/defaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/defaults.kt"); } @TestMetadata("delegationBy.kt") public void testDelegationBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/enum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/enum.kt"); } @TestMetadata("innerClassField.kt") public void testInnerClassField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/innerClassField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/innerClassField.kt"); } @TestMetadata("instance.kt") public void testInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/instance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/instance.kt"); } @TestMetadata("propertyMetadataCache.kt") public void testPropertyMetadataCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.kt"); } } @@ -7368,44 +6446,42 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jkjk.kt") public void testJkjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/jkjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/jkjk.kt"); } @TestMetadata("kotlinClassExtendsJavaClass.kt") public void testKotlinClassExtendsJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClass.kt"); } @TestMetadata("kotlinClassExtendsJavaClassExtendsJavaClass.kt") public void testKotlinClassExtendsJavaClassExtendsJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClassExtendsJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClassExtendsJavaClass.kt"); } @TestMetadata("kotlinClassImplementsJavaInterface.kt") public void testKotlinClassImplementsJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterface.kt"); } @TestMetadata("kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt") public void testKotlinClassImplementsJavaInterfaceExtendsJavaInteface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt"); } @TestMetadata("kotlinMembersVsJavaNonVisibleStatics.kt") public void testKotlinMembersVsJavaNonVisibleStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); } } @@ -7413,14 +6489,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Synthesized extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSynthesized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumValuesValueOf.kt") public void testEnumValuesValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized/enumValuesValueOf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized/enumValuesValueOf.kt"); } } @@ -7428,32 +6507,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TraitImpl extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTraitImpl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("oneTrait.kt") public void testOneTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt"); } @TestMetadata("traitFunctionOverriddenByPropertyInTrait.kt") public void testTraitFunctionOverriddenByPropertyInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitFunctionOverriddenByPropertyInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitFunctionOverriddenByPropertyInTrait.kt"); } @TestMetadata("traitPropertyOverriddenByFunctionInTrait.kt") public void testTraitPropertyOverriddenByFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitPropertyOverriddenByFunctionInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitPropertyOverriddenByFunctionInTrait.kt"); } @TestMetadata("twoTraits.kt") public void testTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt"); } } } @@ -7462,26 +6541,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DynamicTypes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDynamicTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegationBy.kt") public void testDelegationBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt"); } @TestMetadata("unsupported.kt") public void testUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/unsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dynamicTypes/unsupported.kt"); } @TestMetadata("withInvisibleSynthesized.kt") public void testWithInvisibleSynthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.kt"); } } @@ -7489,22 +6569,23 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractEnum.kt") public void testAbstractEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/AbstractEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/AbstractEnum.kt"); } @TestMetadata("AbstractInEnum.kt") public void testAbstractInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/AbstractInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/AbstractInEnum.kt"); } @TestMetadata("AbstractOverrideInEnum.kt") public void testAbstractOverrideInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -7513,382 +6594,324 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("classObjectInEnum.kt") public void testClassObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt"); } @TestMetadata("classObjectInEnumPrivate.kt") public void testClassObjectInEnumPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt"); } @TestMetadata("commonSupertype.kt") public void testCommonSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/commonSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/commonSupertype.kt"); } @TestMetadata("compareTwoDifferentEnums.kt") public void testCompareTwoDifferentEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/compareTwoDifferentEnums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/compareTwoDifferentEnums.kt"); } @TestMetadata("ConstructorCallFromOutside.kt") public void testConstructorCallFromOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.kt"); } @TestMetadata("constructorWithDefaultParametersOnly.kt") public void testConstructorWithDefaultParametersOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/constructorWithDefaultParametersOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/constructorWithDefaultParametersOnly.kt"); } @TestMetadata("dontCreatePackageTypeForEnumEntry.kt") public void testDontCreatePackageTypeForEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/emptyConstructor.kt"); } @TestMetadata("entryShouldBeOfEnumType.kt") public void testEntryShouldBeOfEnumType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/entryShouldBeOfEnumType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/entryShouldBeOfEnumType.kt"); } @TestMetadata("enumEntryCannotHaveClassObject.kt") public void testEnumEntryCannotHaveClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt"); } @TestMetadata("enumEntryInAbstractEnum.kt") public void testEnumEntryInAbstractEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumEntryInAbstractEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumEntryInAbstractEnum.kt"); } @TestMetadata("enumImplementingTrait.kt") public void testEnumImplementingTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt"); } @TestMetadata("enumInheritance.kt") public void testEnumInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumInheritance.kt"); } @TestMetadata("enumIsAssignableToBuiltInEnum.kt") public void testEnumIsAssignableToBuiltInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumIsAssignableToBuiltInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumIsAssignableToBuiltInEnum.kt"); } @TestMetadata("enumMissingName.kt") public void testEnumMissingName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumMissingName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumMissingName.kt"); } @TestMetadata("enumModifier.kt") public void testEnumModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumModifier.kt"); } @TestMetadata("enumStarImport.kt") public void testEnumStarImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumStarImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumStarImport.kt"); } @TestMetadata("enumSubjectTypeCheck.kt") public void testEnumSubjectTypeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumSubjectTypeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumSubjectTypeCheck.kt"); } @TestMetadata("enumWithAnnotationKeyword.kt") public void testEnumWithAnnotationKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumWithAnnotationKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumWithAnnotationKeyword.kt"); } @TestMetadata("enumWithEmptyName.kt") public void testEnumWithEmptyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumWithEmptyName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumWithEmptyName.kt"); } @TestMetadata("ExplicitConstructorCall.kt") public void testExplicitConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/ExplicitConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/ExplicitConstructorCall.kt"); } @TestMetadata("extendingEnumDirectly.kt") public void testExtendingEnumDirectly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/extendingEnumDirectly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/extendingEnumDirectly.kt"); } @TestMetadata("extensionNamedAsEnumEntry.kt") public void testExtensionNamedAsEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/extensionNamedAsEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/extensionNamedAsEnumEntry.kt"); } @TestMetadata("ifEnumEntry.kt") public void testIfEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/ifEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/ifEnumEntry.kt"); } @TestMetadata("importEnumFromJava.kt") public void testImportEnumFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/importEnumFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/importEnumFromJava.kt"); } @TestMetadata("inheritFromEnumEntry.kt") public void testInheritFromEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inheritFromEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inheritFromEnumEntry.kt"); } @TestMetadata("inheritanceFromEnum.kt") public void testInheritanceFromEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inline.kt"); } @TestMetadata("InsideEntryConstructorCall.kt") public void testInsideEntryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/InsideEntryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/InsideEntryConstructorCall.kt"); } @TestMetadata("InsideSecondaryConstructorCall.kt") public void testInsideSecondaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/InsideSecondaryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/InsideSecondaryConstructorCall.kt"); } @TestMetadata("interfaceWithEnumKeyword.kt") public void testInterfaceWithEnumKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/interfaceWithEnumKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/interfaceWithEnumKeyword.kt"); } @TestMetadata("isEnumEntry.kt") public void testIsEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/isEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/isEnumEntry.kt"); } @TestMetadata("javaEnumValueOfMethod.kt") public void testJavaEnumValueOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumValueOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumValueOfMethod.kt"); } @TestMetadata("javaEnumValuesMethod.kt") public void testJavaEnumValuesMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumValuesMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumValuesMethod.kt"); } @TestMetadata("javaEnumWithAbstractFun.kt") public void testJavaEnumWithAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithAbstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithAbstractFun.kt"); } @TestMetadata("javaEnumWithFuns.kt") public void testJavaEnumWithFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithFuns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithFuns.kt"); } @TestMetadata("javaEnumWithNameClashing.kt") public void testJavaEnumWithNameClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithNameClashing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithNameClashing.kt"); } @TestMetadata("javaEnumWithProperty.kt") public void testJavaEnumWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithProperty.kt"); } @TestMetadata("kt2834.kt") public void testKt2834() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/kt2834.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/kt2834.kt"); } @TestMetadata("kt8972_cloneNotAllowed.kt") public void testKt8972_cloneNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt"); } @TestMetadata("localEnums.kt") public void testLocalEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/localEnums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/localEnums.kt"); } @TestMetadata("modifiersOnEnumEntry.kt") public void testModifiersOnEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt"); } @TestMetadata("multipleConstructors.kt") public void testMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/multipleConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/multipleConstructors.kt"); } @TestMetadata("NonPrivateConstructor.kt") public void testNonPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/NonPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/NonPrivateConstructor.kt"); } @TestMetadata("openMemberInEnum.kt") public void testOpenMemberInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/openMemberInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/openMemberInEnum.kt"); } @TestMetadata("overrideFinalEnumMethods.kt") public void testOverrideFinalEnumMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.kt"); } @TestMetadata("SecondaryConstructorCall.kt") public void testSecondaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt"); } @TestMetadata("starImportNestedClassAndEntries.kt") public void testStarImportNestedClassAndEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt"); } @TestMetadata("typeParametersInEnum.kt") public void testTypeParametersInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/typeParametersInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/typeParametersInEnum.kt"); } @TestMetadata("valuesValueOfAndEntriesAccessibility.kt") public void testValuesValueOfAndEntriesAccessibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt"); } @TestMetadata("wrongUnitializedEnumCompanion.kt") public void testWrongUnitializedEnumCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/wrongUnitializedEnumCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/wrongUnitializedEnumCompanion.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/enum/inner") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/enum/inner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("existingClassObject.kt") public void testExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt"); } @TestMetadata("insideClass.kt") public void testInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideClass.kt"); } @TestMetadata("insideClassObject.kt") public void testInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt"); } @TestMetadata("insideEnum.kt") public void testInsideEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnum.kt"); } @TestMetadata("insideEnumEntry.kt") public void testInsideEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry.kt"); } @TestMetadata("insideInnerClassNotAllowed.kt") public void testInsideInnerClassNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideInnerClassNotAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideInnerClassNotAllowed.kt"); } @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideObject.kt"); } @TestMetadata("insideTrait.kt") public void testInsideTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt"); } @TestMetadata("redeclarationInClassObject.kt") public void testRedeclarationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt"); } @TestMetadata("twoEnums.kt") public void testTwoEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/twoEnums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/twoEnums.kt"); } @TestMetadata("twoEnumsInClassObjectAndInnerClass.kt") public void testTwoEnumsInClassObjectAndInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt"); } } } @@ -7897,146 +6920,127 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Evaluate extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEvaluate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/evaluate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("binaryMinusDepOnExpType.kt") public void testBinaryMinusDepOnExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.kt"); } @TestMetadata("binaryMinusIndepWoExpType.kt") public void testBinaryMinusIndepWoExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.kt"); } @TestMetadata("binaryMinusIndependentExpType.kt") public void testBinaryMinusIndependentExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.kt"); } @TestMetadata("divisionByZero.kt") public void testDivisionByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/divisionByZero.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/divisionByZero.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/float.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/float.kt"); } @TestMetadata("floatLiteralOutOfRange.kt") public void testFloatLiteralOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/floatLiteralOutOfRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/floatLiteralOutOfRange.kt"); } @TestMetadata("infixFunOverBuiltinMemberInConst.kt") public void testInfixFunOverBuiltinMemberInConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/infixFunOverBuiltinMemberInConst.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/infixFunOverBuiltinMemberInConst.kt"); } @TestMetadata("intOverflow.kt") public void testIntOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/intOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/intOverflow.kt"); } @TestMetadata("intOverflowWithJavaProperties.kt") public void testIntOverflowWithJavaProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/intOverflowWithJavaProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/intOverflowWithJavaProperties.kt"); } @TestMetadata("integer.kt") public void testInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/integer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/integer.kt"); } @TestMetadata("logicWithNumber.kt") public void testLogicWithNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/logicWithNumber.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/logicWithNumber.kt"); } @TestMetadata("longOverflow.kt") public void testLongOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/longOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/longOverflow.kt"); } @TestMetadata("noOverflowWithZero.kt") public void testNoOverflowWithZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/noOverflowWithZero.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/noOverflowWithZero.kt"); } @TestMetadata("numberBinaryOperations.kt") public void testNumberBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.kt"); } @TestMetadata("numberBinaryOperationsCall.kt") public void testNumberBinaryOperationsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.kt"); } @TestMetadata("numberBinaryOperationsInfixCall.kt") public void testNumberBinaryOperationsInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.kt"); } @TestMetadata("otherOverflow.kt") public void testOtherOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/otherOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/otherOverflow.kt"); } @TestMetadata("parentesized.kt") public void testParentesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/parentesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/parentesized.kt"); } @TestMetadata("qualifiedExpressions.kt") public void testQualifiedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/qualifiedExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/qualifiedExpressions.kt"); } @TestMetadata("unaryMinusDepOnExpType.kt") public void testUnaryMinusDepOnExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.kt"); } @TestMetadata("unaryMinusIndepWoExpType.kt") public void testUnaryMinusIndepWoExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.kt"); } @TestMetadata("unaryMinusIndependentExpType.kt") public void testUnaryMinusIndependentExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.kt"); } @TestMetadata("wrongLongSuffix.kt") public void testWrongLongSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/wrongLongSuffix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/wrongLongSuffix.kt"); } } @@ -8044,152 +7048,132 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Exposed extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExposed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/exposed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/delegate.kt"); } @TestMetadata("exceptionOnFakeInvisible.kt") public void testExceptionOnFakeInvisible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.kt"); } @TestMetadata("functional.kt") public void testFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/functional.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/functional.kt"); } @TestMetadata("implements.kt") public void testImplements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/implements.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/implements.kt"); } @TestMetadata("inaccessibleType.kt") public void testInaccessibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/inaccessibleType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/inaccessibleType.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/internal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/internal.kt"); } @TestMetadata("internalAndProtected.kt") public void testInternalAndProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/internalAndProtected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/internalAndProtected.kt"); } @TestMetadata("internalFromLocal.kt") public void testInternalFromLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/internalFromLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/internalFromLocal.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/local.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/local.kt"); } @TestMetadata("localFromInternal.kt") public void testLocalFromInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localFromInternal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localFromInternal.kt"); } @TestMetadata("localFromPrivate.kt") public void testLocalFromPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localFromPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localFromPrivate.kt"); } @TestMetadata("localInFunReturnType.kt") public void testLocalInFunReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localInFunReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localInFunReturnType.kt"); } @TestMetadata("localInMemberType.kt") public void testLocalInMemberType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localInMemberType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localInMemberType.kt"); } @TestMetadata("localInPropertyType.kt") public void testLocalInPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localInPropertyType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localInPropertyType.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/nested.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/object.kt"); } @TestMetadata("packagePrivate.kt") public void testPackagePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/packagePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/packagePrivate.kt"); } @TestMetadata("privateFromLocal.kt") public void testPrivateFromLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/privateFromLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/privateFromLocal.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protected.kt"); } @TestMetadata("protectedInProtected.kt") public void testProtectedInProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protectedInProtected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protectedInProtected.kt"); } @TestMetadata("protectedJava.kt") public void testProtectedJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protectedJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protectedJava.kt"); } @TestMetadata("protectedSameWay.kt") public void testProtectedSameWay() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protectedSameWay.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protectedSameWay.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/simple.kt"); } @TestMetadata("typeArgs.kt") public void testTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/typeArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/typeArgs.kt"); } } @@ -8197,110 +7181,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Extensions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/extensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/classObject.kt"); } @TestMetadata("ExtensionFunctions.kt") public void testExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt"); } @TestMetadata("extensionMemberInClassObject.kt") public void testExtensionMemberInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt"); } @TestMetadata("extensionPropertyVsParameter.kt") public void testExtensionPropertyVsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/extensionPropertyVsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/extensionPropertyVsParameter.kt"); } @TestMetadata("ExtensionsCalledOnSuper.kt") public void testExtensionsCalledOnSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt"); } @TestMetadata("GenericIterator.kt") public void testGenericIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/GenericIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/GenericIterator.kt"); } @TestMetadata("GenericIterator2.kt") public void testGenericIterator2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt"); } @TestMetadata("kt1875.kt") public void testKt1875() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt1875.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt1875.kt"); } @TestMetadata("kt2317.kt") public void testKt2317() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt2317.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt2317.kt"); } @TestMetadata("kt3470.kt") public void testKt3470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt3470.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt3470.kt"); } @TestMetadata("kt3563.kt") public void testKt3563() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt3563.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt3563.kt"); } @TestMetadata("kt819ExtensionProperties.kt") public void testKt819ExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt"); } @TestMetadata("noClassObjectsInJava.kt") public void testNoClassObjectsInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/noClassObjectsInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/noClassObjectsInJava.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/object.kt"); } @TestMetadata("throwOutCandidatesByReceiver.kt") public void testThrowOutCandidatesByReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt"); } @TestMetadata("throwOutCandidatesByReceiver2.kt") public void testThrowOutCandidatesByReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt"); } @TestMetadata("variableInvoke.kt") public void testVariableInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/variableInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/variableInvoke.kt"); } } @@ -8308,110 +7279,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionAsExpression extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionAsExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionAsExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoLabels.kt") public void testAutoLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/AutoLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/AutoLabels.kt"); } @TestMetadata("Common.kt") public void testCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/Common.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/Common.kt"); } @TestMetadata("DifficultInferenceForParameter.kt") public void testDifficultInferenceForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/DifficultInferenceForParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/DifficultInferenceForParameter.kt"); } @TestMetadata("ForbiddenNonLocalReturn.kt") public void testForbiddenNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ForbiddenNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ForbiddenNonLocalReturn.kt"); } @TestMetadata("FunctionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt"); } @TestMetadata("InferenceParametersTypes.kt") public void testInferenceParametersTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt"); } @TestMetadata("MissingParameterTypes.kt") public void testMissingParameterTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt"); } @TestMetadata("NameDeprecation.kt") public void testNameDeprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.kt"); } @TestMetadata("NoOverloadError.kt") public void testNoOverloadError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/NoOverloadError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/NoOverloadError.kt"); } @TestMetadata("Parameters.kt") public void testParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/Parameters.kt"); } @TestMetadata("ReceiverByExpectedType.kt") public void testReceiverByExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt"); } @TestMetadata("ReturnAndLabels.kt") public void testReturnAndLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ReturnAndLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ReturnAndLabels.kt"); } @TestMetadata("ReturnTypeCheck.kt") public void testReturnTypeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ReturnTypeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ReturnTypeCheck.kt"); } @TestMetadata("ScopeCheck.kt") public void testScopeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt"); } @TestMetadata("WithGenericParameters.kt") public void testWithGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt"); } @TestMetadata("WithOuterGeneric.kt") public void testWithOuterGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/WithOuterGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/WithOuterGeneric.kt"); } @TestMetadata("WithoutBody.kt") public void testWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.kt"); } } @@ -8419,232 +7377,204 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignmentOperationInLambda.kt") public void testAssignmentOperationInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambda.kt"); } @TestMetadata("assignmentOperationInLambdaWithExpectedType.kt") public void testAssignmentOperationInLambdaWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt"); } @TestMetadata("DeprecatedSyntax.kt") public void testDeprecatedSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt"); } @TestMetadata("ExpectedParameterTypeMismatchVariance.kt") public void testExpectedParameterTypeMismatchVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt"); } @TestMetadata("ExpectedParametersTypesMismatch.kt") public void testExpectedParametersTypesMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt"); } @TestMetadata("functionExpressionAsLastExpressionInBlock.kt") public void testFunctionExpressionAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionExpressionAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionExpressionAsLastExpressionInBlock.kt"); } @TestMetadata("functionLIteralInBlockInIf.kt") public void testFunctionLIteralInBlockInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt"); } @TestMetadata("functionLiteralInIf.kt") public void testFunctionLiteralInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt"); } @TestMetadata("functionLiteralWithoutArgumentList.kt") public void testFunctionLiteralWithoutArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralWithoutArgumentList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralWithoutArgumentList.kt"); } @TestMetadata("higherOrderCallMissingParameters.kt") public void testHigherOrderCallMissingParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/higherOrderCallMissingParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/higherOrderCallMissingParameters.kt"); } @TestMetadata("kt11733.kt") public void testKt11733() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt11733.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt11733.kt"); } @TestMetadata("kt11733_1.kt") public void testKt11733_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.kt"); } @TestMetadata("kt16016.kt") public void testKt16016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt16016.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt16016.kt"); } @TestMetadata("kt2906.kt") public void testKt2906() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt2906.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt2906.kt"); } @TestMetadata("kt3343.kt") public void testKt3343() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt3343.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt3343.kt"); } @TestMetadata("kt4529.kt") public void testKt4529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt4529.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt4529.kt"); } @TestMetadata("kt6541_extensionForExtensionFunction.kt") public void testKt6541_extensionForExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.kt"); } @TestMetadata("kt6869.kt") public void testKt6869() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt6869.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt6869.kt"); } @TestMetadata("kt7383_starProjectedFunction.kt") public void testKt7383_starProjectedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt"); } @TestMetadata("LabeledFunctionLiterals.kt") public void testLabeledFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt"); } @TestMetadata("returnNull.kt") public void testReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt"); } @TestMetadata("returnNullWithReturn.kt") public void testReturnNullWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt"); } @TestMetadata("underscopeParameters.kt") public void testUnderscopeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt"); } @TestMetadata("unusedLiteral.kt") public void testUnusedLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteral.kt"); } @TestMetadata("unusedLiteralInsideUnitLiteral.kt") public void testUnusedLiteralInsideUnitLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteralInsideUnitLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteralInsideUnitLiteral.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringInLambdas extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDestructuringInLambdas() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexInference.kt") public void testComplexInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt"); } @TestMetadata("extensionComponents.kt") public void testExtensionComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/extensionComponents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/extensionComponents.kt"); } @TestMetadata("inferredFunctionalType.kt") public void testInferredFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt"); } @TestMetadata("modifiers.kt") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/modifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/modifiers.kt"); } @TestMetadata("noExpectedType.kt") public void testNoExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt"); } @TestMetadata("redeclaration.kt") public void testRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt"); } @TestMetadata("shadowing.kt") public void testShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/shadowing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/shadowing.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt"); } @TestMetadata("underscore.kt") public void testUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); } @TestMetadata("unusedParameters.kt") public void testUnusedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unusedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unusedParameters.kt"); } } @@ -8652,170 +7582,147 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/return"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoLabels.kt") public void testAutoLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabels.kt"); } @TestMetadata("AutoLabelsNonLocal.kt") public void testAutoLabelsNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabelsNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabelsNonLocal.kt"); } @TestMetadata("ForbiddenNonLocalReturnNoType.kt") public void testForbiddenNonLocalReturnNoType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt"); } @TestMetadata("IfInReturnedExpression.kt") public void testIfInReturnedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/IfInReturnedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/IfInReturnedExpression.kt"); } @TestMetadata("IfWithoutElse.kt") public void testIfWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElse.kt"); } @TestMetadata("IfWithoutElseWithExplicitType.kt") public void testIfWithoutElseWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElseWithExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElseWithExplicitType.kt"); } @TestMetadata("LambdaWithParameter.kt") public void testLambdaWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LambdaWithParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LambdaWithParameter.kt"); } @TestMetadata("LocalAndNonLocalReturnInLambda.kt") public void testLocalAndNonLocalReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalAndNonLocalReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalAndNonLocalReturnInLambda.kt"); } @TestMetadata("LocalReturnExplicitLabelNoParens.kt") public void testLocalReturnExplicitLabelNoParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelNoParens.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelNoParens.kt"); } @TestMetadata("LocalReturnExplicitLabelParens.kt") public void testLocalReturnExplicitLabelParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelParens.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelParens.kt"); } @TestMetadata("LocalReturnHasTypeNothing.kt") public void testLocalReturnHasTypeNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnHasTypeNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnHasTypeNothing.kt"); } @TestMetadata("LocalReturnInNestedFunction.kt") public void testLocalReturnInNestedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedFunction.kt"); } @TestMetadata("LocalReturnInNestedLambda.kt") public void testLocalReturnInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedLambda.kt"); } @TestMetadata("LocalReturnNoCoercionToUnit.kt") public void testLocalReturnNoCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt"); } @TestMetadata("LocalReturnNull.kt") public void testLocalReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNull.kt"); } @TestMetadata("LocalReturnSecondUnit.kt") public void testLocalReturnSecondUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnSecondUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnSecondUnit.kt"); } @TestMetadata("LocalReturnUnit.kt") public void testLocalReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnit.kt"); } @TestMetadata("LocalReturnUnitAndDontCareType.kt") public void testLocalReturnUnitAndDontCareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt"); } @TestMetadata("LocalReturnUnitWithBodyExpression.kt") public void testLocalReturnUnitWithBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitWithBodyExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitWithBodyExpression.kt"); } @TestMetadata("LocalReturnWithExpectedType.kt") public void testLocalReturnWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExpectedType.kt"); } @TestMetadata("LocalReturnWithExplicitUnit.kt") public void testLocalReturnWithExplicitUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExplicitUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExplicitUnit.kt"); } @TestMetadata("LocalReturnsWithExplicitReturnType.kt") public void testLocalReturnsWithExplicitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt"); } @TestMetadata("MixedReturnsFromLambda.kt") public void testMixedReturnsFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt"); } @TestMetadata("NoCommonSystem.kt") public void testNoCommonSystem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt"); } @TestMetadata("SmartCastWithExplicitType.kt") public void testSmartCastWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCastWithExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCastWithExplicitType.kt"); } @TestMetadata("unresolvedReferenceInReturnBlock.kt") public void testUnresolvedReferenceInReturnBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/unresolvedReferenceInReturnBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/unresolvedReferenceInReturnBlock.kt"); } } } @@ -8824,214 +7731,189 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentsForT.kt") public void testArgumentsForT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/argumentsForT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/argumentsForT.kt"); } @TestMetadata("commonSupertypeContravariant.kt") public void testCommonSupertypeContravariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant.kt"); } @TestMetadata("commonSupertypeContravariant2.kt") public void testCommonSupertypeContravariant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant2.kt"); } @TestMetadata("doNotCaptureSupertype.kt") public void testDoNotCaptureSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/doNotCaptureSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/doNotCaptureSupertype.kt"); } @TestMetadata("genericsInType.kt") public void testGenericsInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/genericsInType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/genericsInType.kt"); } @TestMetadata("InconsistentTypeParameterBounds.kt") public void testInconsistentTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/InconsistentTypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/InconsistentTypeParameterBounds.kt"); } @TestMetadata("invalidArgumentsNumberInWhere.kt") public void testInvalidArgumentsNumberInWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/invalidArgumentsNumberInWhere.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/invalidArgumentsNumberInWhere.kt"); } @TestMetadata("kt1575-Class.kt") public void testKt1575_Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt1575-Class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt1575-Class.kt"); } @TestMetadata("kt1575-Function.kt") public void testKt1575_Function() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt1575-Function.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt1575-Function.kt"); } @TestMetadata("kt5508.kt") public void testKt5508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt5508.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt5508.kt"); } @TestMetadata("kt9203.kt") public void testKt9203() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt9203.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt9203.kt"); } @TestMetadata("kt9203_1.kt") public void testKt9203_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt9203_1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt9203_1.kt"); } @TestMetadata("kt9985.kt") public void testKt9985() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt9985.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt9985.kt"); } @TestMetadata("Projections.kt") public void testProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/Projections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/Projections.kt"); } @TestMetadata("PseudoRawTypes.kt") public void testPseudoRawTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/PseudoRawTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/PseudoRawTypes.kt"); } @TestMetadata("RawTypeInIsExpression.kt") public void testRawTypeInIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RawTypeInIsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RawTypeInIsExpression.kt"); } @TestMetadata("RawTypeInIsPattern.kt") public void testRawTypeInIsPattern() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RawTypeInIsPattern.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RawTypeInIsPattern.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/recursive.kt"); } @TestMetadata("RecursiveUpperBoundCheck.kt") public void testRecursiveUpperBoundCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundCheck.kt"); } @TestMetadata("RecursiveUpperBoundWithTwoArguments.kt") public void testRecursiveUpperBoundWithTwoArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundWithTwoArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundWithTwoArguments.kt"); } @TestMetadata("resolveGenericBoundsBeforeSupertypes.kt") public void testResolveGenericBoundsBeforeSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt"); } @TestMetadata("sameTypeParameterUse.kt") public void testSameTypeParameterUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/sameTypeParameterUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/sameTypeParameterUse.kt"); } @TestMetadata("suppressVarianceConflict.kt") public void testSuppressVarianceConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.kt"); } @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/TypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/TypeParameterBounds.kt"); } @TestMetadata("TypeParametersInTypeParameterBounds.kt") public void testTypeParametersInTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/TypeParametersInTypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/TypeParametersInTypeParameterBounds.kt"); } @TestMetadata("unresolvedClassifierInWhere.kt") public void testUnresolvedClassifierInWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/unresolvedClassifierInWhere.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/unresolvedClassifierInWhere.kt"); } @TestMetadata("wildcardInValueParameter.kt") public void testWildcardInValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt"); } @TestMetadata("wrongNumberOfTypeArgumentsDiagnostic.kt") public void testWrongNumberOfTypeArgumentsDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedParameters extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapturedParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/capturedParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLocalClass.kt") public void testInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt"); } @TestMetadata("localWithTypeParameter.kt") public void testLocalWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/localWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/localWithTypeParameter.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt"); } @TestMetadata("uncheckedCast.kt") public void testUncheckedCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/uncheckedCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/uncheckedCast.kt"); } } @@ -9039,20 +7921,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CyclicBounds extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCyclicBounds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/cyclicBounds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/cyclicBounds/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/cyclicBounds/functions.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/cyclicBounds/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/cyclicBounds/inClass.kt"); } } @@ -9060,208 +7944,184 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bareTypes.kt") public void testBareTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypes.kt"); } @TestMetadata("bareTypesComplex.kt") public void testBareTypesComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt"); } @TestMetadata("checkBoundsOuter.kt") public void testCheckBoundsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/checkBoundsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/checkBoundsOuter.kt"); } @TestMetadata("importedInner.kt") public void testImportedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/importedInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/importedInner.kt"); } @TestMetadata("innerSuperCall.kt") public void testInnerSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt"); } @TestMetadata("innerSuperCallSecondary.kt") public void testInnerSuperCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt"); } @TestMetadata("innerTP.kt") public void testInnerTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt"); } @TestMetadata("innerUncheckedCast.kt") public void testInnerUncheckedCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt"); } @TestMetadata("innerVariance.kt") public void testInnerVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerVariance.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt"); } @TestMetadata("j+k.kt") public void testJ_k() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/j+k.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/j+k.kt"); } @TestMetadata("j+k_complex.kt") public void testJ_k_complex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/j+k_complex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/j+k_complex.kt"); } @TestMetadata("kt3357.kt") public void testKt3357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt"); } @TestMetadata("kt408.kt") public void testKt408() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/kt408.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt408.kt"); } @TestMetadata("kt6325.kt") public void testKt6325() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt"); } @TestMetadata("outerArgumentsRequired.kt") public void testOuterArgumentsRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/outerArgumentsRequired.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/outerArgumentsRequired.kt"); } @TestMetadata("parameterShadowing.kt") public void testParameterShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt"); } @TestMetadata("qualifiedOuter.kt") public void testQualifiedOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt"); } @TestMetadata("qualifiedTypesResolution.kt") public void testQualifiedTypesResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedTypesResolution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedTypesResolution.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simple.kt"); } @TestMetadata("simpleIn.kt") public void testSimpleIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.kt"); } @TestMetadata("simpleOut.kt") public void testSimpleOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOut.kt"); } @TestMetadata("simpleOutUseSite.kt") public void testSimpleOutUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt"); } @TestMetadata("substitutedMemberScope.kt") public void testSubstitutedMemberScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplicitArguments extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplicitArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fromCompanionObject.kt") public void testFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject.kt"); } @TestMetadata("fromOuterClassInObjectLiteral.kt") public void testFromOuterClassInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromOuterClassInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromOuterClassInObjectLiteral.kt"); } @TestMetadata("fromSuperClasses.kt") public void testFromSuperClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.kt"); } @TestMetadata("fromSuperClassesLocal.kt") public void testFromSuperClassesLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt"); } @TestMetadata("fromSuperClassesLocalInsideInner.kt") public void testFromSuperClassesLocalInsideInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt"); } @TestMetadata("fromSuperClassesTransitive.kt") public void testFromSuperClassesTransitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.kt"); } @TestMetadata("inStaticScope.kt") public void testInStaticScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/inStaticScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/inStaticScope.kt"); } @TestMetadata("secondLevelDepth.kt") public void testSecondLevelDepth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt"); } } } @@ -9270,50 +8130,47 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultipleBoundsMemberScope extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultipleBoundsMemberScope() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingReturnType.kt") public void testConflictingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/conflictingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/conflictingReturnType.kt"); } @TestMetadata("flexibleTypes.kt") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/flexibleTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/flexibleTypes.kt"); } @TestMetadata("mostSpecific.kt") public void testMostSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/mostSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/mostSpecific.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/properties.kt"); } @TestMetadata("propertiesConflict.kt") public void testPropertiesConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt"); } @TestMetadata("validTypeParameters.kt") public void testValidTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/validTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/validTypeParameters.kt"); } } @@ -9321,98 +8178,87 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullability extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/nullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedTypeWithPlatformSupertype.kt") public void testCapturedTypeWithPlatformSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/capturedTypeWithPlatformSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/capturedTypeWithPlatformSupertype.kt"); } @TestMetadata("correctSubstitutionForIncorporationConstraint.kt") public void testCorrectSubstitutionForIncorporationConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/correctSubstitutionForIncorporationConstraint.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/correctSubstitutionForIncorporationConstraint.kt"); } @TestMetadata("declarationsBoundsViolation.kt") public void testDeclarationsBoundsViolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/declarationsBoundsViolation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/declarationsBoundsViolation.kt"); } @TestMetadata("expressionsBoundsViolation.kt") public void testExpressionsBoundsViolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt"); } @TestMetadata("functionalBound.kt") public void testFunctionalBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt"); } @TestMetadata("nullToGeneric.kt") public void testNullToGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.kt"); } @TestMetadata("smartCastRefinedClass.kt") public void testSmartCastRefinedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.kt"); } @TestMetadata("smartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt"); } @TestMetadata("smartCastsOnThis.kt") public void testSmartCastsOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt"); } @TestMetadata("smartCastsValueArgument.kt") public void testSmartCastsValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt"); } @TestMetadata("tpBoundsViolation.kt") public void testTpBoundsViolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt"); } @TestMetadata("tpBoundsViolationVariance.kt") public void testTpBoundsViolationVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt"); } @TestMetadata("tpInBounds.kt") public void testTpInBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt"); } @TestMetadata("useAsReceiver.kt") public void testUseAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt"); } @TestMetadata("useAsValueArgument.kt") public void testUseAsValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt"); } } @@ -9420,10 +8266,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProjectionsScope extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAll.kt") public void testAddAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt"); } public void testAllFilesPresentInProjectionsScope() throws Exception { @@ -9432,152 +8281,127 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("approximateDispatchReceiver.kt") public void testApproximateDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/approximateDispatchReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/approximateDispatchReceiver.kt"); } @TestMetadata("extensionReceiverTypeMismatch.kt") public void testExtensionReceiverTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt"); } @TestMetadata("extensionResultSubstitution.kt") public void testExtensionResultSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionResultSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionResultSubstitution.kt"); } @TestMetadata("flexibleProjectedScope.kt") public void testFlexibleProjectedScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/flexibleProjectedScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/flexibleProjectedScope.kt"); } @TestMetadata("inValueParameter.kt") public void testInValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt"); } @TestMetadata("iterateOnExtension.kt") public void testIterateOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/iterateOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/iterateOnExtension.kt"); } @TestMetadata("kt7296.kt") public void testKt7296() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt"); } @TestMetadata("kt8647.kt") public void testKt8647() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/kt8647.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/kt8647.kt"); } @TestMetadata("lambdaArgument.kt") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/lambdaArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/lambdaArgument.kt"); } @TestMetadata("leakedApproximatedType.kt") public void testLeakedApproximatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.kt"); } @TestMetadata("MLOut.kt") public void testMLOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/MLOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/MLOut.kt"); } @TestMetadata("multipleArgumentProjectedOut.kt") public void testMultipleArgumentProjectedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt"); } @TestMetadata("platformSuperClass.kt") public void testPlatformSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt"); } @TestMetadata("projectedOutConventions.kt") public void testProjectedOutConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt"); } @TestMetadata("projectedOutSmartCast.kt") public void testProjectedOutSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt"); } @TestMetadata("recursiveUpperBoundStar.kt") public void testRecursiveUpperBoundStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.kt"); } @TestMetadata("recursiveUpperBoundStarOut.kt") public void testRecursiveUpperBoundStarOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStarOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStarOut.kt"); } @TestMetadata("starNullability.kt") public void testStarNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.kt"); } @TestMetadata("starNullabilityRecursive.kt") public void testStarNullabilityRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt"); } @TestMetadata("superClass.kt") public void testSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/superClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/superClass.kt"); } @TestMetadata("typeMismatchConventions.kt") public void testTypeMismatchConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt"); } @TestMetadata("typeMismatchInLambda.kt") public void testTypeMismatchInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt"); } @TestMetadata("typeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt"); } @TestMetadata("unsafeVarianceStar.kt") public void testUnsafeVarianceStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt"); } } @@ -9585,38 +8409,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StarProjections extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStarProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/starProjections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkBounds.kt") public void testCheckBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/checkBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/checkBounds.kt"); } @TestMetadata("collectionInheritedFromJava.kt") public void testCollectionInheritedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt"); } @TestMetadata("inheritedFromJava.kt") public void testInheritedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt"); } @TestMetadata("inheritedFromKotlin.kt") public void testInheritedFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromKotlin.kt"); } @TestMetadata("invalid.kt") public void testInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt"); } } @@ -9624,80 +8447,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TpAsReified extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTpAsReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/tpAsReified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CapturedAsReified.kt") public void testCapturedAsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt"); } @TestMetadata("ClassDereference.kt") public void testClassDereference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/ClassDereference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/ClassDereference.kt"); } @TestMetadata("Conventions.kt") public void testConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt"); } @TestMetadata("GenericAsReifiedArgument.kt") public void testGenericAsReifiedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/GenericAsReifiedArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/GenericAsReifiedArgument.kt"); } @TestMetadata("InConstructor.kt") public void testInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt"); } @TestMetadata("InFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt"); } @TestMetadata("InProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt"); } @TestMetadata("InType.kt") public void testInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt"); } @TestMetadata("InlineableReified.kt") public void testInlineableReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt"); } @TestMetadata("LocalFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt"); } @TestMetadata("NotInlineableReified.kt") public void testNotInlineableReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt"); } @TestMetadata("ReifiedClass.kt") public void testReifiedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt"); } } @@ -9705,32 +8520,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarProjection extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarProjection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/varProjection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("setterNotProjectedOutAssign.kt") public void testSetterNotProjectedOutAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt"); } @TestMetadata("setterProjectedOutAssign.kt") public void testSetterProjectedOutAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt"); } @TestMetadata("setterProjectedOutNoPlusAssign.kt") public void testSetterProjectedOutNoPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt"); } @TestMetadata("setterProjectedOutPlusAssignDefined.kt") public void testSetterProjectedOutPlusAssignDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt"); } } } @@ -9739,326 +8554,277 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AllUnderImportsAmbiguity.kt") public void testAllUnderImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); } @TestMetadata("AllUnderImportsLessPriority.kt") public void testAllUnderImportsLessPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); } @TestMetadata("AllUnderImportsSamePriorityForFunction.kt") public void testAllUnderImportsSamePriorityForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForFunction.kt"); } @TestMetadata("AllUnderImportsSamePriorityForProperty.kt") public void testAllUnderImportsSamePriorityForProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt"); } @TestMetadata("CheckJavaVisibility.kt") public void testCheckJavaVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CheckJavaVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CheckJavaVisibility.kt"); } @TestMetadata("CheckVisibility.kt") public void testCheckVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CheckVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CheckVisibility.kt"); } @TestMetadata("ClassClash.kt") public void testClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ClassClash.kt"); } @TestMetadata("ClassClashStarImport.kt") public void testClassClashStarImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt"); } @TestMetadata("ClassImportsConflicting.kt") public void testClassImportsConflicting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ClassImportsConflicting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ClassImportsConflicting.kt"); } @TestMetadata("CurrentPackageAndAllUnderImport.kt") public void testCurrentPackageAndAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); } @TestMetadata("CurrentPackageAndExplicitImport.kt") public void testCurrentPackageAndExplicitImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); } @TestMetadata("DefaultImportsPriority.kt") public void testDefaultImportsPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/DefaultImportsPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/DefaultImportsPriority.kt"); } @TestMetadata("ExplicitImportsAmbiguity.kt") public void testExplicitImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ExplicitImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ExplicitImportsAmbiguity.kt"); } @TestMetadata("ExplicitImportsUnambiguityForFunction.kt") public void testExplicitImportsUnambiguityForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ExplicitImportsUnambiguityForFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ExplicitImportsUnambiguityForFunction.kt"); } @TestMetadata("ExplicitPackageImportsAmbiguity.kt") public void testExplicitPackageImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ExplicitPackageImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ExplicitPackageImportsAmbiguity.kt"); } @TestMetadata("ImportClassClash.kt") public void testImportClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportClassClash.kt"); } @TestMetadata("ImportFromCompanionObject.kt") public void testImportFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.kt"); } @TestMetadata("ImportFromCurrentWithDifferentName.kt") public void testImportFromCurrentWithDifferentName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromCurrentWithDifferentName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromCurrentWithDifferentName.kt"); } @TestMetadata("ImportFromObject.kt") public void testImportFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromObject.kt"); } @TestMetadata("ImportFromRootPackage.kt") public void testImportFromRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromRootPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromRootPackage.kt"); } @TestMetadata("importFunctionWithAllUnderImport.kt") public void testImportFunctionWithAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImport.kt"); } @TestMetadata("importFunctionWithAllUnderImportAfterNamedImport.kt") public void testImportFunctionWithAllUnderImportAfterNamedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImportAfterNamedImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImportAfterNamedImport.kt"); } @TestMetadata("ImportHidingDefinitionInTheSameFile.kt") public void testImportHidingDefinitionInTheSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportHidingDefinitionInTheSameFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportHidingDefinitionInTheSameFile.kt"); } @TestMetadata("ImportNestedWithDifferentName.kt") public void testImportNestedWithDifferentName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportNestedWithDifferentName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportNestedWithDifferentName.kt"); } @TestMetadata("ImportObjectAndUseAsSupertype.kt") public void testImportObjectAndUseAsSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportObjectAndUseAsSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportObjectAndUseAsSupertype.kt"); } @TestMetadata("ImportObjectHidesCurrentPackage.kt") public void testImportObjectHidesCurrentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportObjectHidesCurrentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportObjectHidesCurrentPackage.kt"); } @TestMetadata("ImportOverloadFunctions.kt") public void testImportOverloadFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.kt"); } @TestMetadata("ImportPrivateMember.kt") public void testImportPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportPrivateMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportPrivateMember.kt"); } @TestMetadata("ImportPrivateMemberFromOtherFile.kt") public void testImportPrivateMemberFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportPrivateMemberFromOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportPrivateMemberFromOtherFile.kt"); } @TestMetadata("ImportPrivateMembersWithStar.kt") public void testImportPrivateMembersWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportPrivateMembersWithStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportPrivateMembersWithStar.kt"); } @TestMetadata("ImportProtectedClass.kt") public void testImportProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportProtectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportProtectedClass.kt"); } @TestMetadata("ImportResolutionOrder.kt") public void testImportResolutionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportResolutionOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportResolutionOrder.kt"); } @TestMetadata("ImportTwoTimes.kt") public void testImportTwoTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportTwoTimes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportTwoTimes.kt"); } @TestMetadata("ImportTwoTimesStar.kt") public void testImportTwoTimesStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportTwoTimesStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportTwoTimesStar.kt"); } @TestMetadata("Imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/Imports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/Imports.kt"); } @TestMetadata("ImportsConflicting.kt") public void testImportsConflicting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportsConflicting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportsConflicting.kt"); } @TestMetadata("InaccessiblePrivateClass.kt") public void testInaccessiblePrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.kt"); } @TestMetadata("JavaPackageLocalClassNotImported.kt") public void testJavaPackageLocalClassNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/JavaPackageLocalClassNotImported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/JavaPackageLocalClassNotImported.kt"); } @TestMetadata("kt13112.kt") public void testKt13112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/kt13112.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/kt13112.kt"); } @TestMetadata("MalformedImports.kt") public void testMalformedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/MalformedImports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/MalformedImports.kt"); } @TestMetadata("NestedClassClash.kt") public void testNestedClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/NestedClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/NestedClassClash.kt"); } @TestMetadata("OperatorRenameOnImport.kt") public void testOperatorRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/OperatorRenameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/OperatorRenameOnImport.kt"); } @TestMetadata("PackageLocalClassNotImported.kt") public void testPackageLocalClassNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageLocalClassNotImported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PackageLocalClassNotImported.kt"); } @TestMetadata("PackageLocalClassReferencedError.kt") public void testPackageLocalClassReferencedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.kt"); } @TestMetadata("PackageVsClass.kt") public void testPackageVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PackageVsClass.kt"); } @TestMetadata("PrivateClassNotImported.kt") public void testPrivateClassNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PrivateClassNotImported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PrivateClassNotImported.kt"); } @TestMetadata("PrivateClassReferencedError.kt") public void testPrivateClassReferencedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.kt"); } @TestMetadata("propertyClassFileDependencyRecursion.kt") public void testPropertyClassFileDependencyRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/propertyClassFileDependencyRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/propertyClassFileDependencyRecursion.kt"); } @TestMetadata("RenameOnImport.kt") public void testRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/RenameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/RenameOnImport.kt"); } @TestMetadata("StarImportFromObject.kt") public void testStarImportFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/SyntaxError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/SyntaxError.kt"); } @TestMetadata("TopLevelClassVsPackage.kt") public void testTopLevelClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); } @TestMetadata("WrongImport.kt") public void testWrongImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/WrongImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/WrongImport.kt"); } } @@ -10066,238 +8832,209 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IncompleteCode extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIncompleteCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayBracketsRange.kt") public void testArrayBracketsRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/arrayBracketsRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/arrayBracketsRange.kt"); } @TestMetadata("checkNothingIsSubtype.kt") public void testCheckNothingIsSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt"); } @TestMetadata("controlStructuresErrors.kt") public void testControlStructuresErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt"); } @TestMetadata("illegalSelectorCallableReference.kt") public void testIllegalSelectorCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/illegalSelectorCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/illegalSelectorCallableReference.kt"); } @TestMetadata("inExpr.kt") public void testInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/inExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/inExpr.kt"); } @TestMetadata("incompleteAssignment.kt") public void testIncompleteAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/incompleteAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/incompleteAssignment.kt"); } @TestMetadata("incompleteEquals.kt") public void testIncompleteEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/incompleteEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/incompleteEquals.kt"); } @TestMetadata("kt1955.kt") public void testKt1955() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/kt1955.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/kt1955.kt"); } @TestMetadata("kt2014.kt") public void testKt2014() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/kt2014.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/kt2014.kt"); } @TestMetadata("kt4866UnresolvedArrayAccess.kt") public void testKt4866UnresolvedArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt"); } @TestMetadata("NoSenselessComparisonForErrorType.kt") public void testNoSenselessComparisonForErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt"); } @TestMetadata("plusOnTheRight.kt") public void testPlusOnTheRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt"); } @TestMetadata("pseudocodeTraverseNextInstructions.kt") public void testPseudocodeTraverseNextInstructions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/pseudocodeTraverseNextInstructions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/pseudocodeTraverseNextInstructions.kt"); } @TestMetadata("senselessComparisonWithNull.kt") public void testSenselessComparisonWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/senselessComparisonWithNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/senselessComparisonWithNull.kt"); } @TestMetadata("SupertypeOfErrorType.kt") public void testSupertypeOfErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/SupertypeOfErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/SupertypeOfErrorType.kt"); } @TestMetadata("typeParameterOnLhsOfDot.kt") public void testTypeParameterOnLhsOfDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/typeParameterOnLhsOfDot.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/typeParameterOnLhsOfDot.kt"); } @TestMetadata("unresolvedArguments.kt") public void testUnresolvedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt"); } @TestMetadata("unresolvedOperation.kt") public void testUnresolvedOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt"); } @TestMetadata("variableDeclarationInSelector.kt") public void testVariableDeclarationInSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/variableDeclarationInSelector.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/variableDeclarationInSelector.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DiagnosticWithSyntaxError extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDiagnosticWithSyntaxError() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayExpression.kt") public void testArrayExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt"); } @TestMetadata("checkBackingFieldException.kt") public void testCheckBackingFieldException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.kt"); } @TestMetadata("completeFunctionArgumentsOfNestedCalls.kt") public void testCompleteFunctionArgumentsOfNestedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt"); } @TestMetadata("declarationAfterDotSelectorExpected.kt") public void testDeclarationAfterDotSelectorExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterDotSelectorExpected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterDotSelectorExpected.kt"); } @TestMetadata("declarationAfterIncompleteElvis.kt") public void testDeclarationAfterIncompleteElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterIncompleteElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterIncompleteElvis.kt"); } @TestMetadata("funEquals.kt") public void testFunEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funEquals.kt"); } @TestMetadata("funKeyword.kt") public void testFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funKeyword.kt"); } @TestMetadata("funcitonTypes.kt") public void testFuncitonTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funcitonTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funcitonTypes.kt"); } @TestMetadata("incompleteEnumReference.kt") public void testIncompleteEnumReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteEnumReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteEnumReference.kt"); } @TestMetadata("incompleteVal.kt") public void testIncompleteVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteVal.kt"); } @TestMetadata("incompleteValWithAccessor.kt") public void testIncompleteValWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteValWithAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteValWithAccessor.kt"); } @TestMetadata("incompleteWhen.kt") public void testIncompleteWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteWhen.kt"); } @TestMetadata("namedFun.kt") public void testNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/namedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/namedFun.kt"); } @TestMetadata("noTypeParamsInReturnType.kt") public void testNoTypeParamsInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt"); } @TestMetadata("typeReferenceError.kt") public void testTypeReferenceError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/typeReferenceError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/typeReferenceError.kt"); } @TestMetadata("valNoName.kt") public void testValNoName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valNoName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valNoName.kt"); } @TestMetadata("valWithNoNameBeforeNextDeclarationWithModifiers.kt") public void testValWithNoNameBeforeNextDeclarationWithModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameBeforeNextDeclarationWithModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameBeforeNextDeclarationWithModifiers.kt"); } @TestMetadata("valWithNoNameInBlock.kt") public void testValWithNoNameInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.kt"); } } } @@ -10306,454 +9043,389 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotCompleteResolveAmbiguity.kt") public void testCannotCompleteResolveAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt"); } @TestMetadata("cannotCompleteResolveFunctionLiteralsNoUse.kt") public void testCannotCompleteResolveFunctionLiteralsNoUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt"); } @TestMetadata("cannotCompleteResolveNoInfoForParameter.kt") public void testCannotCompleteResolveNoInfoForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt"); } @TestMetadata("cannotCompleteResolveNoneApplicable.kt") public void testCannotCompleteResolveNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoneApplicable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoneApplicable.kt"); } @TestMetadata("cannotCompleteResolveWithFunctionLiterals.kt") public void testCannotCompleteResolveWithFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt"); } @TestMetadata("completeInferenceIfManyFailed.kt") public void testCompleteInferenceIfManyFailed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt"); } @TestMetadata("conflictingSubstitutions.kt") public void testConflictingSubstitutions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt"); } @TestMetadata("dependOnExpectedType.kt") public void testDependOnExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt"); } @TestMetadata("dependantOnVariance.kt") public void testDependantOnVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt"); } @TestMetadata("dependantOnVarianceNullable.kt") public void testDependantOnVarianceNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/dependantOnVarianceNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/dependantOnVarianceNullable.kt"); } @TestMetadata("expectedTypeAdditionalTest.kt") public void testExpectedTypeAdditionalTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt"); } @TestMetadata("expectedTypeDoubleReceiver.kt") public void testExpectedTypeDoubleReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt"); } @TestMetadata("expectedTypeFromCast.kt") public void testExpectedTypeFromCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt"); } @TestMetadata("expectedTypeFromCastComplexExpression.kt") public void testExpectedTypeFromCastComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt"); } @TestMetadata("expectedTypeFromCastParenthesized.kt") public void testExpectedTypeFromCastParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.kt"); } @TestMetadata("expectedTypeWithGenerics.kt") public void testExpectedTypeWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt"); } @TestMetadata("findViewById.kt") public void testFindViewById() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/findViewById.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/findViewById.kt"); } @TestMetadata("fixVariableToNothing.kt") public void testFixVariableToNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/fixVariableToNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/fixVariableToNothing.kt"); } @TestMetadata("fixationOrderForProperConstraints.kt") public void testFixationOrderForProperConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt"); } @TestMetadata("flexibleTypesAsUpperBound.kt") public void testFlexibleTypesAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/flexibleTypesAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/flexibleTypesAsUpperBound.kt"); } @TestMetadata("functionPlaceholderError.kt") public void testFunctionPlaceholderError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt"); } @TestMetadata("hasErrorInConstrainingTypes.kt") public void testHasErrorInConstrainingTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt"); } @TestMetadata("immutableArrayList.kt") public void testImmutableArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/immutableArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/immutableArrayList.kt"); } @TestMetadata("implicitInvokeExtensionWithFunctionalArgument.kt") public void testImplicitInvokeExtensionWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeInCompanionObjectWithFunctionalArgument.kt") public void testImplicitInvokeInCompanionObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeInObjectWithFunctionalArgument.kt") public void testImplicitInvokeInObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeWithFunctionLiteralArgument.kt") public void testImplicitInvokeWithFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt"); } @TestMetadata("inferInFunctionLiterals.kt") public void testInferInFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/inferInFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/inferInFunctionLiterals.kt"); } @TestMetadata("inferInFunctionLiteralsWithReturn.kt") public void testInferInFunctionLiteralsWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/inferInFunctionLiteralsWithReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/inferInFunctionLiteralsWithReturn.kt"); } @TestMetadata("intersectionTypeMultipleBoundsAsReceiver.kt") public void testIntersectionTypeMultipleBoundsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/intersectionTypeMultipleBoundsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/intersectionTypeMultipleBoundsAsReceiver.kt"); } @TestMetadata("invokeLambdaAsFunction.kt") public void testInvokeLambdaAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/invokeLambdaAsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/invokeLambdaAsFunction.kt"); } @TestMetadata("kt11963.kt") public void testKt11963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt11963.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt11963.kt"); } @TestMetadata("kt12399.kt") public void testKt12399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt12399.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt12399.kt"); } @TestMetadata("kt1293.kt") public void testKt1293() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt1293.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt1293.kt"); } @TestMetadata("kt3184.kt") public void testKt3184() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt3184.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt3184.kt"); } @TestMetadata("kt6175.kt") public void testKt6175() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt6175.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt6175.kt"); } @TestMetadata("kt619.kt") public void testKt619() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt619.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt619.kt"); } @TestMetadata("lambdaInValInitializerWithAnonymousFunctions.kt") public void testLambdaInValInitializerWithAnonymousFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt"); } @TestMetadata("listConstructor.kt") public void testListConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/listConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/listConstructor.kt"); } @TestMetadata("mapFunction.kt") public void testMapFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/mapFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/mapFunction.kt"); } @TestMetadata("mostSpecificAfterInference.kt") public void testMostSpecificAfterInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt"); } @TestMetadata("noInformationForParameter.kt") public void testNoInformationForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt"); } @TestMetadata("nullableTypeArgumentWithNotNullUpperBound.kt") public void testNullableTypeArgumentWithNotNullUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nullableTypeArgumentWithNotNullUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nullableTypeArgumentWithNotNullUpperBound.kt"); } @TestMetadata("nullableUpperBound.kt") public void testNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nullableUpperBound.kt"); } @TestMetadata("opposite.kt") public void testOpposite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/opposite.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/opposite.kt"); } @TestMetadata("possibleCycleOnConstraints.kt") public void testPossibleCycleOnConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt"); } @TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt") public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt"); } @TestMetadata("tryNumberLowerBoundsBeforeUpperBounds.kt") public void testTryNumberLowerBoundsBeforeUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/tryNumberLowerBoundsBeforeUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/tryNumberLowerBoundsBeforeUpperBounds.kt"); } @TestMetadata("typeConstructorMismatch.kt") public void testTypeConstructorMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt"); } @TestMetadata("typeInferenceExpectedTypeMismatch.kt") public void testTypeInferenceExpectedTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt"); } @TestMetadata("useFunctionLiteralsToInferType.kt") public void testUseFunctionLiteralsToInferType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/useFunctionLiteralsToInferType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/useFunctionLiteralsToInferType.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedTypes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapturedTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/capturedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("approximateBeforeFixation.kt") public void testApproximateBeforeFixation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/approximateBeforeFixation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/approximateBeforeFixation.kt"); } @TestMetadata("cannotCaptureInProjection.kt") public void testCannotCaptureInProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt"); } @TestMetadata("captureForNullableTypes.kt") public void testCaptureForNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt"); } @TestMetadata("captureForPlatformTypes.kt") public void testCaptureForPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.kt"); } @TestMetadata("captureFromNullableTypeVariable.kt") public void testCaptureFromNullableTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt"); } @TestMetadata("captureFromSubtyping.kt") public void testCaptureFromSubtyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromSubtyping.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromSubtyping.kt"); } @TestMetadata("captureFromTypeParameterUpperBound.kt") public void testCaptureFromTypeParameterUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.kt"); } @TestMetadata("captureTypeOnlyOnTopLevel.kt") public void testCaptureTypeOnlyOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt"); } @TestMetadata("capturedType.kt") public void testCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt"); } @TestMetadata("capturedTypeAndApproximation.kt") public void testCapturedTypeAndApproximation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt"); } @TestMetadata("capturedTypeSubstitutedIntoOppositeProjection.kt") public void testCapturedTypeSubstitutedIntoOppositeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeSubstitutedIntoOppositeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeSubstitutedIntoOppositeProjection.kt"); } @TestMetadata("capturedTypeWithTypeVariableSubtyping.kt") public void testCapturedTypeWithTypeVariableSubtyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeWithTypeVariableSubtyping.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeWithTypeVariableSubtyping.kt"); } @TestMetadata("expectedTypeMismatchWithInVariance.kt") public void testExpectedTypeMismatchWithInVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt"); } @TestMetadata("kt2570.kt") public void testKt2570() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2570.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2570.kt"); } @TestMetadata("kt2872.kt") public void testKt2872() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt"); } @TestMetadata("memberScopeOfCaptured.kt") public void testMemberScopeOfCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/memberScopeOfCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/memberScopeOfCaptured.kt"); } @TestMetadata("noCaptureTypeErrorForNonTopLevel.kt") public void testNoCaptureTypeErrorForNonTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt"); } @TestMetadata("notApproximateWhenCopyDescriptors.kt") public void testNotApproximateWhenCopyDescriptors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/notApproximateWhenCopyDescriptors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/notApproximateWhenCopyDescriptors.kt"); } @TestMetadata("overApproximationForInCaptured.kt") public void testOverApproximationForInCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForInCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForInCaptured.kt"); } @TestMetadata("overApproximationForOutCaptured.kt") public void testOverApproximationForOutCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForOutCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForOutCaptured.kt"); } @TestMetadata("starProjectionRegression.kt") public void testStarProjectionRegression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/starProjectionRegression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/starProjectionRegression.kt"); } } @@ -10761,38 +9433,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CoercionToUnit extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoercionToUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/coercionToUnit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("coercionWithExpectedType.kt") public void testCoercionWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedType.kt"); } @TestMetadata("coercionWithExpectedTypeAndBound.kt") public void testCoercionWithExpectedTypeAndBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedTypeAndBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedTypeAndBound.kt"); } @TestMetadata("coercionWithoutExpectedType.kt") public void testCoercionWithoutExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.kt"); } @TestMetadata("indirectCoercionWithExpectedType.kt") public void testIndirectCoercionWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/indirectCoercionWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/indirectCoercionWithExpectedType.kt"); } @TestMetadata("noCoercion.kt") public void testNoCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/noCoercion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/noCoercion.kt"); } } @@ -10800,56 +9471,52 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CommonSystem extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommonSystem() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/commonSystem"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundOnNullableVariable.kt") public void testBoundOnNullableVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/boundOnNullableVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/boundOnNullableVariable.kt"); } @TestMetadata("dontCaptureTypeVariable.kt") public void testDontCaptureTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/dontCaptureTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/dontCaptureTypeVariable.kt"); } @TestMetadata("fixVariablesInRightOrder.kt") public void testFixVariablesInRightOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/fixVariablesInRightOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/fixVariablesInRightOrder.kt"); } @TestMetadata("genericCandidateInGenericClass.kt") public void testGenericCandidateInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/genericCandidateInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/genericCandidateInGenericClass.kt"); } @TestMetadata("inferenceWithUpperBoundsInLambda.kt") public void testInferenceWithUpperBoundsInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/inferenceWithUpperBoundsInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/inferenceWithUpperBoundsInLambda.kt"); } @TestMetadata("kt3372toCollection.kt") public void testKt3372toCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/kt3372toCollection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt3372toCollection.kt"); } @TestMetadata("nestedLambdas.kt") public void testNestedLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt"); } @TestMetadata("theSameFunctionInArgs.kt") public void testTheSameFunctionInArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt"); } } @@ -10857,80 +9524,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constraints extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstraints() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/constraints"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constraintOnFunctionLiteral.kt") public void testConstraintOnFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt"); } @TestMetadata("equalityConstraintOnNullableType.kt") public void testEqualityConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt"); } @TestMetadata("ignoreConstraintFromImplicitInNothing.kt") public void testIgnoreConstraintFromImplicitInNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt"); } @TestMetadata("kt6320.kt") public void testKt6320() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt"); } @TestMetadata("kt7351ConstraintFromUnitExpectedType.kt") public void testKt7351ConstraintFromUnitExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt"); } @TestMetadata("kt7433.kt") public void testKt7433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt7433.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt7433.kt"); } @TestMetadata("kt8879.kt") public void testKt8879() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt"); } @TestMetadata("notNullConstraintOnNullableType.kt") public void testNotNullConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt"); } @TestMetadata("operationsOnIntegerValueTypes.kt") public void testOperationsOnIntegerValueTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/operationsOnIntegerValueTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/operationsOnIntegerValueTypes.kt"); } @TestMetadata("returnLambdaFromLambda.kt") public void testReturnLambdaFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/returnLambdaFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/returnLambdaFromLambda.kt"); } @TestMetadata("subtypeConstraintOnNullableType.kt") public void testSubtypeConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt"); } @TestMetadata("supertypeConstraintOnNullableType.kt") public void testSupertypeConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt"); } } @@ -10938,80 +9597,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedCalls extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNestedCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/arrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/arrayAccess.kt"); } @TestMetadata("binaryExpressions.kt") public void testBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt"); } @TestMetadata("checkTypesForQualifiedProperties.kt") public void testCheckTypesForQualifiedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.kt"); } @TestMetadata("completeNestedCallsForArraySetExpression.kt") public void testCompleteNestedCallsForArraySetExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsForArraySetExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsForArraySetExpression.kt"); } @TestMetadata("completeNestedCallsInference.kt") public void testCompleteNestedCallsInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsInference.kt"); } @TestMetadata("completeNestedForVariableAsFunctionCall.kt") public void testCompleteNestedForVariableAsFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt"); } @TestMetadata("externalTypeParameter.kt") public void testExternalTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/externalTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/externalTypeParameter.kt"); } @TestMetadata("inferenceForNestedBinaryCall.kt") public void testInferenceForNestedBinaryCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/inferenceForNestedBinaryCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/inferenceForNestedBinaryCall.kt"); } @TestMetadata("kt3395.kt") public void testKt3395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3395.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3395.kt"); } @TestMetadata("kt3461checkTypes.kt") public void testKt3461checkTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.kt"); } @TestMetadata("makeNullableIfSafeCall.kt") public void testMakeNullableIfSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt"); } @TestMetadata("nontrivialCallExpression.kt") public void testNontrivialCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/nontrivialCallExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/nontrivialCallExpression.kt"); } } @@ -11019,32 +9670,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RecursiveLocalFuns extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecursiveLocalFuns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localFactorial.kt") public void testLocalFactorial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt"); } @TestMetadata("recursiveFun.kt") public void testRecursiveFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt"); } @TestMetadata("recursiveLambda.kt") public void testRecursiveLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt"); } @TestMetadata("selfCall.kt") public void testSelfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt"); } } @@ -11052,320 +9703,272 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("compareBy.kt") public void testCompareBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/compareBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/compareBy.kt"); } @TestMetadata("kt1029.kt") public void testKt1029() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1029.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1029.kt"); } @TestMetadata("kt1031.kt") public void testKt1031() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1031.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1031.kt"); } @TestMetadata("kt1127.kt") public void testKt1127() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt"); } @TestMetadata("kt1145.kt") public void testKt1145() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1145.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1145.kt"); } @TestMetadata("kt1358.kt") public void testKt1358() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1358.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1358.kt"); } @TestMetadata("kt1410.kt") public void testKt1410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1410.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1410.kt"); } @TestMetadata("kt1718.kt") public void testKt1718() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1718.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1718.kt"); } @TestMetadata("kt1944.kt") public void testKt1944() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1944.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1944.kt"); } @TestMetadata("kt2057.kt") public void testKt2057() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2057.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2057.kt"); } @TestMetadata("kt2179.kt") public void testKt2179() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2179.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2179.kt"); } @TestMetadata("kt2200.kt") public void testKt2200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt"); } @TestMetadata("kt2283.kt") public void testKt2283() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt"); } @TestMetadata("kt2286.kt") public void testKt2286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt"); } @TestMetadata("kt2294.kt") public void testKt2294() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2294.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2294.kt"); } @TestMetadata("kt2320.kt") public void testKt2320() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt"); } @TestMetadata("kt2324.kt") public void testKt2324() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2324.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2324.kt"); } @TestMetadata("kt2407.kt") public void testKt2407() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2407.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2407.kt"); } @TestMetadata("kt2445.kt") public void testKt2445() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt"); } @TestMetadata("kt2459.kt") public void testKt2459() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2459.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2459.kt"); } @TestMetadata("kt2484.kt") public void testKt2484() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2484.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2484.kt"); } @TestMetadata("kt2505.kt") public void testKt2505() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt"); } @TestMetadata("kt2514.kt") public void testKt2514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2514.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2514.kt"); } @TestMetadata("kt2588.kt") public void testKt2588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2588.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2588.kt"); } @TestMetadata("kt2741.kt") public void testKt2741() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2741.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2741.kt"); } @TestMetadata("kt2754.kt") public void testKt2754() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2754.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2754.kt"); } @TestMetadata("kt2838.kt") public void testKt2838() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt"); } @TestMetadata("kt2841.kt") public void testKt2841() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt"); } @TestMetadata("kt2841_it.kt") public void testKt2841_it() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt"); } @TestMetadata("kt2841_it_this.kt") public void testKt2841_it_this() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt"); } @TestMetadata("kt2841_this.kt") public void testKt2841_this() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt"); } @TestMetadata("kt2842.kt") public void testKt2842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt"); } @TestMetadata("kt2883.kt") public void testKt2883() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt"); } @TestMetadata("kt3007.kt") public void testKt3007() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3007.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3007.kt"); } @TestMetadata("kt3038.kt") public void testKt3038() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3038.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3038.kt"); } @TestMetadata("kt3150.kt") public void testKt3150() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3150.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3150.kt"); } @TestMetadata("kt3174.kt") public void testKt3174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3174.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3174.kt"); } @TestMetadata("kt3301.kt") public void testKt3301() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt"); } @TestMetadata("kt3344.kt") public void testKt3344() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3344.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3344.kt"); } @TestMetadata("kt3496.kt") public void testKt3496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3496.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3496.kt"); } @TestMetadata("kt3496_2.kt") public void testKt3496_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3496_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3496_2.kt"); } @TestMetadata("kt3559.kt") public void testKt3559() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3559.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3559.kt"); } @TestMetadata("kt4420.kt") public void testKt4420() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt"); } @TestMetadata("kt702.kt") public void testKt702() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt702.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt702.kt"); } @TestMetadata("kt731.kt") public void testKt731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt731.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt731.kt"); } @TestMetadata("kt742.kt") public void testKt742() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt742.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt742.kt"); } @TestMetadata("kt8132.kt") public void testKt8132() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt8132.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt8132.kt"); } @TestMetadata("kt832.kt") public void testKt832() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt832.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt832.kt"); } @TestMetadata("kt943.kt") public void testKt943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt943.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt943.kt"); } @TestMetadata("kt9461.kt") public void testKt9461() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt9461.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt9461.kt"); } @TestMetadata("kt948.kt") public void testKt948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt948.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt948.kt"); } @TestMetadata("noRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor.kt") public void testNoRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/noRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/noRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor.kt"); } } @@ -11373,68 +9976,62 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReportingImprovements extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReportingImprovements() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/reportingImprovements"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotInferParameterTypeWithInference.kt") public void testCannotInferParameterTypeWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt"); } @TestMetadata("ErrorTypeAsGenericParameter.kt") public void testErrorTypeAsGenericParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.kt"); } @TestMetadata("FunctionPlaceholder.kt") public void testFunctionPlaceholder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt"); } @TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt") public void testNoAmbiguityForDifferentFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt"); } @TestMetadata("reportUnresolvedReferenceWrongReceiverForManyCandidates.kt") public void testReportUnresolvedReferenceWrongReceiverForManyCandidates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.kt"); } @TestMetadata("subtypeForInvariantWithErrorGenerics.kt") public void testSubtypeForInvariantWithErrorGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt"); } @TestMetadata("typeInferenceFailedOnComponentN.kt") public void testTypeInferenceFailedOnComponentN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt"); } @TestMetadata("typeInferenceFailedOnIteratorCall.kt") public void testTypeInferenceFailedOnIteratorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt"); } @TestMetadata("wrongArgumentExtensionFunction.kt") public void testWrongArgumentExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.kt"); } @TestMetadata("wrongArgumentPassedToLocalExtensionFunction.kt") public void testWrongArgumentPassedToLocalExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt"); } } @@ -11442,38 +10039,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Substitutions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubstitutions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/substitutions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegationAndInference.kt") public void testDelegationAndInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/delegationAndInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/delegationAndInference.kt"); } @TestMetadata("kt6081SubstituteIntoClassCorrectly.kt") public void testKt6081SubstituteIntoClassCorrectly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/kt6081SubstituteIntoClassCorrectly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/kt6081SubstituteIntoClassCorrectly.kt"); } @TestMetadata("simpleSubstitutionCheckTypeArgumentsNotTypeParameters.kt") public void testSimpleSubstitutionCheckTypeArgumentsNotTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.kt"); } @TestMetadata("substitutionIntoAnonymousClass.kt") public void testSubstitutionIntoAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.kt"); } @TestMetadata("substitutionIntoInnerClass.kt") public void testSubstitutionIntoInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.kt"); } } @@ -11481,50 +10077,47 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UpperBounds extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUpperBounds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/upperBounds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingSubstitutionsFromUpperBound.kt") public void testConflictingSubstitutionsFromUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/conflictingSubstitutionsFromUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/conflictingSubstitutionsFromUpperBound.kt"); } @TestMetadata("doNotInferFromBoundsOnly.kt") public void testDoNotInferFromBoundsOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt"); } @TestMetadata("intersectUpperBounds.kt") public void testIntersectUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt"); } @TestMetadata("kt2856.kt") public void testKt2856() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/kt2856.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/kt2856.kt"); } @TestMetadata("nonNullUpperBound.kt") public void testNonNullUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt"); } @TestMetadata("useBoundsIfUnknownParameters.kt") public void testUseBoundsIfUnknownParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt"); } @TestMetadata("useBoundsToInferTypeParamsSimple.kt") public void testUseBoundsToInferTypeParamsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt"); } } } @@ -11533,20 +10126,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Infos extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInfos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/infos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropertiesWithBackingFields.kt") public void testPropertiesWithBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/infos/PropertiesWithBackingFields.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/infos/PropertiesWithBackingFields.kt"); } @TestMetadata("SmartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/infos/SmartCasts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/infos/SmartCasts.kt"); } } @@ -11554,310 +10149,269 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/anonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/anonymousObjects.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/assignment.kt"); } @TestMetadata("capture.kt") public void testCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/capture.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/capture.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/constructor.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/default.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/default.kt"); } @TestMetadata("defaultLambdaInlineDisable.kt") public void testDefaultLambdaInlineDisable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); } @TestMetadata("defaultLambdaInlineSuspend.kt") public void testDefaultLambdaInlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineSuspend.kt"); } @TestMetadata("defaultLambdaInlining.kt") public void testDefaultLambdaInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/defaultLambdaInlining.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlining.kt"); } @TestMetadata("extensionOnFunction.kt") public void testExtensionOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/extensionOnFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/extensionOnFunction.kt"); } @TestMetadata("fromInlineToNoInline.kt") public void testFromInlineToNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/fromInlineToNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/fromInlineToNoInline.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/functions.kt"); } @TestMetadata("inlineLambdaInDefaultInlineParameter.kt") public void testInlineLambdaInDefaultInlineParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); } @TestMetadata("inlineLambdaInDefaultInlineParameterDisabled.kt") public void testInlineLambdaInDefaultInlineParameterDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); } @TestMetadata("inlineReified.kt") public void testInlineReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/inlineReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/inlineReified.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/invoke.kt"); } @TestMetadata("isCheck.kt") public void testIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/isCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/isCheck.kt"); } @TestMetadata("kt15410.kt") public void testKt15410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt15410.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/kt15410.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/kt19679.kt"); } @TestMetadata("kt4869.kt") public void testKt4869() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt4869.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/kt4869.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/labeled.kt"); } @TestMetadata("lambdaCast.kt") public void testLambdaCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/lambdaCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/lambdaCast.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/localFun.kt"); } @TestMetadata("messagesForUnsupportedInInline.kt") public void testMessagesForUnsupportedInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/messagesForUnsupportedInInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/messagesForUnsupportedInInline.kt"); } @TestMetadata("nonVirtualMembersWithInline.kt") public void testNonVirtualMembersWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt"); } @TestMetadata("nothingToInline.kt") public void testNothingToInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nothingToInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nothingToInline.kt"); } @TestMetadata("nullabilityOperations.kt") public void testNullabilityOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nullabilityOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nullabilityOperations.kt"); } @TestMetadata("nullableFunction.kt") public void testNullableFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nullableFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nullableFunction.kt"); } @TestMetadata("overrideWithInline.kt") public void testOverrideWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/overrideWithInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/overrideWithInline.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/parenthesized.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/privateClass.kt"); } @TestMetadata("propagation.kt") public void testPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/propagation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/propagation.kt"); } @TestMetadata("protectedDepecation.kt") public void testProtectedDepecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/protectedDepecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/protectedDepecation.kt"); } @TestMetadata("publishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/publishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/publishedApi.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/recursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/recursion.kt"); } @TestMetadata("returns.kt") public void testReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/returns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/returns.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/sam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/sam.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/stringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/stringTemplate.kt"); } @TestMetadata("unsupportedConstruction.kt") public void testUnsupportedConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/vararg.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/when.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/when.kt"); } @TestMetadata("wrongUsage.kt") public void testWrongUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/wrongUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/wrongUsage.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryExpressions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/binaryExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("andOr.kt") public void testAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/andOr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/andOr.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/arrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/arrayAccess.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/assignment.kt"); } @TestMetadata("comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/comparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/comparison.kt"); } @TestMetadata("componentAccess.kt") public void testComponentAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/componentAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/componentAccess.kt"); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/contains.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/contains.kt"); } @TestMetadata("mathOperations.kt") public void testMathOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/mathOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/mathOperations.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/rangeTo.kt"); } } @@ -11865,116 +10419,102 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjects.kt"); } @TestMetadata("anonymousObjectsNested.kt") public void testAnonymousObjectsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjectsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjectsNested.kt"); } @TestMetadata("explicitReturnType.kt") public void testExplicitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/explicitReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/explicitReturnType.kt"); } @TestMetadata("fromOnlyLocal.kt") public void testFromOnlyLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/fromOnlyLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/fromOnlyLocal.kt"); } @TestMetadata("inlineLambda.kt") public void testInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/inlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/inlineLambda.kt"); } @TestMetadata("labeledReturn.kt") public void testLabeledReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/labeledReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/labeledReturn.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsNonFunction.kt"); } @TestMetadata("lambdaWithGlobalReturnsInsideOnlyLocalOne.kt") public void testLambdaWithGlobalReturnsInsideOnlyLocalOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaWithGlobalReturnsInsideOnlyLocalOne.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaWithGlobalReturnsInsideOnlyLocalOne.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/localFun.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineAnnotation.kt") public void testNoInlineAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineAnnotation.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineLambda.kt"); } @TestMetadata("nonInlinedClass.kt") public void testNonInlinedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nonInlinedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nonInlinedClass.kt"); } @TestMetadata("onlyLocalReturnLambda.kt") public void testOnlyLocalReturnLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambda.kt"); } @TestMetadata("onlyLocalReturnLambdaBinaryExpr.kt") public void testOnlyLocalReturnLambdaBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambdaBinaryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambdaBinaryExpr.kt"); } @TestMetadata("propertyAccessorsAndConstructor.kt") public void testPropertyAccessorsAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/propertyAccessorsAndConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/propertyAccessorsAndConstructor.kt"); } @TestMetadata("toOnlyLocal.kt") public void testToOnlyLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/toOnlyLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/toOnlyLocal.kt"); } } @@ -11982,62 +10522,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonPublicMember extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonPublicMember() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonPublicMember"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inNonPublicClass.kt") public void testInNonPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicClass.kt"); } @TestMetadata("inNonPublicInnerClass.kt") public void testInNonPublicInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicInnerClass.kt"); } @TestMetadata("inPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPackage.kt"); } @TestMetadata("inPublicClass.kt") public void testInPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPublicClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPublicClass.kt"); } @TestMetadata("kt14887.kt") public void testKt14887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.kt"); } @TestMetadata("localClass2.kt") public void testLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass2.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt"); } @TestMetadata("publishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/publishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/publishedApi.kt"); } } @@ -12045,32 +10580,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/invoke.kt"); } @TestMetadata("propertyWithBackingField.kt") public void testPropertyWithBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/propertyWithBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/propertyWithBackingField.kt"); } @TestMetadata("unsupportedConstruction.kt") public void testUnsupportedConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/unsupportedConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/unsupportedConstruction.kt"); } @TestMetadata("virtualProperty.kt") public void testVirtualProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/virtualProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/virtualProperty.kt"); } } @@ -12078,14 +10613,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt4341.kt") public void testKt4341() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/regressions/kt4341.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/regressions/kt4341.kt"); } } @@ -12093,26 +10631,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryExpressions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnaryExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/unaryExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mathOperation.kt") public void testMathOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions/mathOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unaryExpressions/mathOperation.kt"); } @TestMetadata("notOnCall.kt") public void testNotOnCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOnCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOnCall.kt"); } @TestMetadata("notOperation.kt") public void testNotOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOperation.kt"); } } } @@ -12121,26 +10660,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicInlineClassDeclaration.kt") public void testBasicInlineClassDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclaration.kt"); } @TestMetadata("basicInlineClassDeclarationDisabled.kt") public void testBasicInlineClassDeclarationDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclarationDisabled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclarationDisabled.kt"); } @TestMetadata("inlineClassDeclarationCheck.kt") public void testInlineClassDeclarationCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt"); } } @@ -12148,16 +10688,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingToJavaNestedClass.kt") public void testAccessingToJavaNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/accessingToJavaNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/accessingToJavaNestedClass.kt"); } @TestMetadata("accessingToKotlinNestedClass.kt") public void testAccessingToKotlinNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/accessingToKotlinNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/accessingToKotlinNestedClass.kt"); } public void testAllFilesPresentInInner() throws Exception { @@ -12166,328 +10708,279 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("annotationInInnerClass.kt") public void testAnnotationInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt"); } @TestMetadata("classesInClassObjectHeader.kt") public void testClassesInClassObjectHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt"); } @TestMetadata("constructorAccess.kt") public void testConstructorAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/constructorAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/constructorAccess.kt"); } @TestMetadata("deepInnerClass.kt") public void testDeepInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/deepInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/deepInnerClass.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/enumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/enumEntries.kt"); } @TestMetadata("enumInInnerClass.kt") public void testEnumInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/enumInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/enumInInnerClass.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/extensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/extensionFun.kt"); } @TestMetadata("extensionLambdaInsideNestedClass.kt") public void testExtensionLambdaInsideNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); } @TestMetadata("illegalModifier.kt") public void testIllegalModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); } @TestMetadata("illegalModifier_lv12.kt") public void testIllegalModifier_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/illegalModifier_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/illegalModifier_lv12.kt"); } @TestMetadata("innerClassInEnumEntryClassMemberResolve.kt") public void testInnerClassInEnumEntryClassMemberResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); } @TestMetadata("innerClassInEnumEntryClass_lv11.kt") public void testInnerClassInEnumEntryClass_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); } @TestMetadata("innerClassInEnumEntryClass_lv12.kt") public void testInnerClassInEnumEntryClass_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv12.kt"); } @TestMetadata("innerClassInEnumEntryClass_lv13.kt") public void testInnerClassInEnumEntryClass_lv13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv13.kt"); } @TestMetadata("InnerClassNameClash.kt") public void testInnerClassNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/InnerClassNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/InnerClassNameClash.kt"); } @TestMetadata("innerClassesInStaticParameters.kt") public void testInnerClassesInStaticParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt"); } @TestMetadata("innerConstructorsFromQualifiers.kt") public void testInnerConstructorsFromQualifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiers.kt"); } @TestMetadata("innerConstructorsFromQualifiersWithIrrelevantCandidate.kt") public void testInnerConstructorsFromQualifiersWithIrrelevantCandidate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.kt"); } @TestMetadata("innerErrorForClassObjects.kt") public void testInnerErrorForClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt"); } @TestMetadata("innerErrorForObjects.kt") public void testInnerErrorForObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerErrorForObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerErrorForObjects.kt"); } @TestMetadata("innerThisSuper.kt") public void testInnerThisSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerThisSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerThisSuper.kt"); } @TestMetadata("interfaceInInnerClass.kt") public void testInterfaceInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/interfaceInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/interfaceInInnerClass.kt"); } @TestMetadata("kt5854.kt") public void testKt5854() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/kt5854.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/kt5854.kt"); } @TestMetadata("kt6026.kt") public void testKt6026() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/kt6026.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/kt6026.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/localClass.kt"); } @TestMetadata("localClassInsideNested.kt") public void testLocalClassInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/localClassInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/localClassInsideNested.kt"); } @TestMetadata("localThisSuper.kt") public void testLocalThisSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/localThisSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/localThisSuper.kt"); } @TestMetadata("modality.kt") public void testModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/modality.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/modality.kt"); } @TestMetadata("nestedClassAccessedViaInstanceReference.kt") public void testNestedClassAccessedViaInstanceReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt"); } @TestMetadata("nestedClassExtendsOuter.kt") public void testNestedClassExtendsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuter.kt"); } @TestMetadata("nestedClassExtendsOuterGeneric.kt") public void testNestedClassExtendsOuterGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuterGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuterGeneric.kt"); } @TestMetadata("nestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassInObject.kt"); } @TestMetadata("nestedClassNotAllowed.kt") public void testNestedClassNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed.kt"); } @TestMetadata("nestedObject.kt") public void testNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedObject.kt"); } @TestMetadata("nestedVsInnerAccessOuterMember.kt") public void testNestedVsInnerAccessOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt"); } @TestMetadata("outerGenericParam.kt") public void testOuterGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/outerGenericParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/outerGenericParam.kt"); } @TestMetadata("outerProtectedMember.kt") public void testOuterProtectedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt"); } @TestMetadata("outerSuperClassMember.kt") public void testOuterSuperClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/outerSuperClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/outerSuperClassMember.kt"); } @TestMetadata("referenceToSelfInLocal.kt") public void testReferenceToSelfInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/referenceToSelfInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/referenceToSelfInLocal.kt"); } @TestMetadata("resolvePackageClassInObjects.kt") public void testResolvePackageClassInObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt"); } @TestMetadata("selfAnnotationForClassObject.kt") public void testSelfAnnotationForClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt"); } @TestMetadata("traits.kt") public void testTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/traits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/traits.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/visibility.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inner/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectOfNestedClass.kt") public void testClassObjectOfNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt"); } @TestMetadata("constructNestedClass.kt") public void testConstructNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/constructNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/constructNestedClass.kt"); } @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/dataLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/dataLocalVariable.kt"); } @TestMetadata("enumConstant.kt") public void testEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/enumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/enumConstant.kt"); } @TestMetadata("genericNestedClass.kt") public void testGenericNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt"); } @TestMetadata("importNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/importNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/importNestedClass.kt"); } @TestMetadata("nestedClassInPackage.kt") public void testNestedClassInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedClassInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedClassInPackage.kt"); } @TestMetadata("nestedEnumConstant.kt") public void testNestedEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedEnumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedEnumConstant.kt"); } @TestMetadata("nestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedObjects.kt"); } @TestMetadata("typePosition.kt") public void testTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/typePosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/typePosition.kt"); } } } @@ -12496,10 +10989,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class J_k extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessClassObjectFromJava.kt") public void testAccessClassObjectFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt"); } public void testAllFilesPresentInJ_k() throws Exception { @@ -12508,478 +11004,404 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("ambiguousSamAdapters.kt") public void testAmbiguousSamAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/ambiguousSamAdapters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/ambiguousSamAdapters.kt"); } @TestMetadata("annotationWithArgumentsMissingDependencies.kt") public void testAnnotationWithArgumentsMissingDependencies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/annotationWithArgumentsMissingDependencies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/annotationWithArgumentsMissingDependencies.kt"); } @TestMetadata("annotationsInheritance.kt") public void testAnnotationsInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/annotationsInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/annotationsInheritance.kt"); } @TestMetadata("arrayOfStarParametrized.kt") public void testArrayOfStarParametrized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/arrayOfStarParametrized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/arrayOfStarParametrized.kt"); } @TestMetadata("callableReferencesStaticMemberClash.kt") public void testCallableReferencesStaticMemberClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/callableReferencesStaticMemberClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/callableReferencesStaticMemberClash.kt"); } @TestMetadata("canDeclareIfSamAdapterIsInherited.kt") public void testCanDeclareIfSamAdapterIsInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/canDeclareIfSamAdapterIsInherited.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/canDeclareIfSamAdapterIsInherited.kt"); } @TestMetadata("collectorInference.kt") public void testCollectorInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectorInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectorInference.kt"); } @TestMetadata("computeIfAbsentConcurrent.kt") public void testComputeIfAbsentConcurrent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.kt"); } @TestMetadata("contravariantIterable.kt") public void testContravariantIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/contravariantIterable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/contravariantIterable.kt"); } @TestMetadata("defaultMethods.kt") public void testDefaultMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/defaultMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods.kt"); } @TestMetadata("defaultMethodsIndirectInheritance.kt") public void testDefaultMethodsIndirectInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); } @TestMetadata("defaultMethods_warning.kt") public void testDefaultMethods_warning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); } @TestMetadata("differentFilename.kt") public void testDifferentFilename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/differentFilename.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/differentFilename.kt"); } @TestMetadata("enumGetOrdinal.kt") public void testEnumGetOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/enumGetOrdinal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/enumGetOrdinal.kt"); } @TestMetadata("exceptionMessage.kt") public void testExceptionMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/exceptionMessage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/exceptionMessage.kt"); } @TestMetadata("fieldOverridesField.kt") public void testFieldOverridesField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/fieldOverridesField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/fieldOverridesField.kt"); } @TestMetadata("fieldOverridesFieldOfDifferentType.kt") public void testFieldOverridesFieldOfDifferentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/fieldOverridesFieldOfDifferentType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/fieldOverridesFieldOfDifferentType.kt"); } @TestMetadata("fieldOverridesNothing.kt") public void testFieldOverridesNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/fieldOverridesNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/fieldOverridesNothing.kt"); } @TestMetadata("finalCollectionSize.kt") public void testFinalCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/finalCollectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/finalCollectionSize.kt"); } @TestMetadata("flexibleNothing.kt") public void testFlexibleNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/flexibleNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/flexibleNothing.kt"); } @TestMetadata("genericConstructorWithMultipleBounds.kt") public void testGenericConstructorWithMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt"); } @TestMetadata("GenericsInSupertypes.kt") public void testGenericsInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt"); } @TestMetadata("inheritAbstractSamAdapter.kt") public void testInheritAbstractSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/inheritAbstractSamAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/inheritAbstractSamAdapter.kt"); } @TestMetadata("inheritanceStaticMethodFromInterface.kt") public void testInheritanceStaticMethodFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt"); } @TestMetadata("InheritedGenericFunction.kt") public void testInheritedGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.kt"); } @TestMetadata("InnerClassFromJava.kt") public void testInnerClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt"); } @TestMetadata("innerNestedClassFromJava.kt") public void testInnerNestedClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); } @TestMetadata("invisiblePackagePrivateInheritedMember.kt") public void testInvisiblePackagePrivateInheritedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.kt"); } @TestMetadata("javaStaticImport.kt") public void testJavaStaticImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt"); } @TestMetadata("KJKInheritance.kt") public void testKJKInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt"); } @TestMetadata("KJKInheritanceGeneric.kt") public void testKJKInheritanceGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/KJKInheritanceGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/KJKInheritanceGeneric.kt"); } @TestMetadata("kt1402.kt") public void testKt1402() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt1402.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt1402.kt"); } @TestMetadata("kt1431.kt") public void testKt1431() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt1431.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt1431.kt"); } @TestMetadata("kt1730_implementCharSequence.kt") public void testKt1730_implementCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt1730_implementCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt1730_implementCharSequence.kt"); } @TestMetadata("kt2152.kt") public void testKt2152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2152.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2152.kt"); } @TestMetadata("kt2394.kt") public void testKt2394() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2394.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2394.kt"); } @TestMetadata("kt2606.kt") public void testKt2606() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2606.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2606.kt"); } @TestMetadata("kt2619.kt") public void testKt2619() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2619.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2619.kt"); } @TestMetadata("kt2641.kt") public void testKt2641() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2641.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2641.kt"); } @TestMetadata("kt2890.kt") public void testKt2890() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2890.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2890.kt"); } @TestMetadata("kt3307.kt") public void testKt3307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt3307.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt3307.kt"); } @TestMetadata("kt3311.kt") public void testKt3311() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt3311.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt3311.kt"); } @TestMetadata("kt6720_abstractProperty.kt") public void testKt6720_abstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt"); } @TestMetadata("kt7523.kt") public void testKt7523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt7523.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt7523.kt"); } @TestMetadata("matchers.kt") public void testMatchers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/matchers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/matchers.kt"); } @TestMetadata("mutableIterator.kt") public void testMutableIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt"); } @TestMetadata("nullForOptionalOrElse.kt") public void testNullForOptionalOrElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt"); } @TestMetadata("overrideRawType.kt") public void testOverrideRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/overrideRawType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/overrideRawType.kt"); } @TestMetadata("OverrideVararg.kt") public void testOverrideVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/OverrideVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/OverrideVararg.kt"); } @TestMetadata("overrideWithSamAndTypeParameter.kt") public void testOverrideWithSamAndTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.kt"); } @TestMetadata("packagePrivateClassStaticMember.kt") public void testPackagePrivateClassStaticMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/packagePrivateClassStaticMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/packagePrivateClassStaticMember.kt"); } @TestMetadata("packageVisibility.kt") public void testPackageVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/packageVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/packageVisibility.kt"); } @TestMetadata("privateFieldOverridesNothing.kt") public void testPrivateFieldOverridesNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/privateFieldOverridesNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/privateFieldOverridesNothing.kt"); } @TestMetadata("privateNestedClassStaticMember.kt") public void testPrivateNestedClassStaticMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/privateNestedClassStaticMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/privateNestedClassStaticMember.kt"); } @TestMetadata("protectedStaticSamePackage.kt") public void testProtectedStaticSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); } @TestMetadata("recursionWithJavaSyntheticProperty.kt") public void testRecursionWithJavaSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursionWithJavaSyntheticProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursionWithJavaSyntheticProperty.kt"); } @TestMetadata("recursiveRawUpperBound.kt") public void testRecursiveRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound.kt"); } @TestMetadata("recursiveRawUpperBound2.kt") public void testRecursiveRawUpperBound2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound2.kt"); } @TestMetadata("recursiveRawUpperBound3.kt") public void testRecursiveRawUpperBound3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound3.kt"); } @TestMetadata("samInConstructorWithGenerics.kt") public void testSamInConstructorWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samInConstructorWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samInConstructorWithGenerics.kt"); } @TestMetadata("samWithConsumer.kt") public void testSamWithConsumer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samWithConsumer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samWithConsumer.kt"); } @TestMetadata("selectMoreSpecific.kt") public void testSelectMoreSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.kt"); } @TestMetadata("serializable.kt") public void testSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/serializable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/serializable.kt"); } @TestMetadata("shadowingPrimitiveStaticField.kt") public void testShadowingPrimitiveStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/shadowingPrimitiveStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/shadowingPrimitiveStaticField.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/Simple.kt"); } @TestMetadata("specialBridges.kt") public void testSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/specialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt"); } @TestMetadata("StaticMembersFromSuperclasses.kt") public void testStaticMembersFromSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/StaticMembersFromSuperclasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/StaticMembersFromSuperclasses.kt"); } @TestMetadata("staticMethodInClass.kt") public void testStaticMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/staticMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/staticMethodInClass.kt"); } @TestMetadata("SupertypeArgumentsNullability-NotNull-SpecialTypes.kt") public void testSupertypeArgumentsNullability_NotNull_SpecialTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.kt"); } @TestMetadata("SupertypeArgumentsNullability-NotNull-UserTypes.kt") public void testSupertypeArgumentsNullability_NotNull_UserTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.kt"); } @TestMetadata("SupertypeArgumentsNullability-SpecialTypes.kt") public void testSupertypeArgumentsNullability_SpecialTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.kt"); } @TestMetadata("SupertypeArgumentsNullability-UserTypes.kt") public void testSupertypeArgumentsNullability_UserTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt"); } @TestMetadata("traitDefaultCall.kt") public void testTraitDefaultCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt"); } @TestMetadata("typeAliasWithSamConstructor.kt") public void testTypeAliasWithSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/typeAliasWithSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/typeAliasWithSamConstructor.kt"); } @TestMetadata("UnboxingNulls.kt") public void testUnboxingNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt"); } @TestMetadata("wrongVarianceInJava.kt") public void testWrongVarianceInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BrokenCode extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBrokenCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/brokenCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classDuplicates.kt") public void testClassDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode/classDuplicates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/brokenCode/classDuplicates.kt"); } @TestMetadata("fieldDuplicates.kt") public void testFieldDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode/fieldDuplicates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/brokenCode/fieldDuplicates.kt"); } } @@ -12987,116 +11409,102 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionOverrides extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollectionOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/collectionOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("charBuffer.kt") public void testCharBuffer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/charBuffer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/charBuffer.kt"); } @TestMetadata("collectionStringImpl.kt") public void testCollectionStringImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/collectionStringImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/collectionStringImpl.kt"); } @TestMetadata("commonCollections.kt") public void testCommonCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.kt"); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.kt"); } @TestMetadata("containsAll.kt") public void testContainsAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.kt"); } @TestMetadata("containsAndOverload.kt") public void testContainsAndOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.kt"); } @TestMetadata("getCharSequence.kt") public void testGetCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/getCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/getCharSequence.kt"); } @TestMetadata("irrelevantCharAtAbstract.kt") public void testIrrelevantCharAtAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantCharAtAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantCharAtAbstract.kt"); } @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequence.kt"); } @TestMetadata("irrelevantImplCharSequenceKotlin.kt") public void testIrrelevantImplCharSequenceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequenceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequenceKotlin.kt"); } @TestMetadata("irrelevantImplMutableList.kt") public void testIrrelevantImplMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableList.kt"); } @TestMetadata("irrelevantImplMutableListKotlin.kt") public void testIrrelevantImplMutableListKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableListKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableListKotlin.kt"); } @TestMetadata("irrelevantMapGetAbstract.kt") public void testIrrelevantMapGetAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt"); } @TestMetadata("mapGetOverride.kt") public void testMapGetOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.kt"); } @TestMetadata("overridesBuiltinNoMagic.kt") public void testOverridesBuiltinNoMagic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.kt"); } @TestMetadata("removeAt.kt") public void testRemoveAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.kt"); } @TestMetadata("removeAtInt.kt") public void testRemoveAtInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.kt"); } @TestMetadata("sizeFromKotlinOverriddenInJava.kt") public void testSizeFromKotlinOverriddenInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/sizeFromKotlinOverriddenInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/sizeFromKotlinOverriddenInJava.kt"); } } @@ -13104,62 +11512,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericConstructor extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/genericConstructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classTypeParameterInferredFromArgument.kt") public void testClassTypeParameterInferredFromArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt"); } @TestMetadata("noClassTypeParameters.kt") public void testNoClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.kt"); } @TestMetadata("noClassTypeParametersInvParameter.kt") public void testNoClassTypeParametersInvParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt"); } @TestMetadata("selfTypes.kt") public void testSelfTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/selfTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/selfTypes.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt"); } @TestMetadata("superCallImpossibleToInfer.kt") public void testSuperCallImpossibleToInfer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt"); } @TestMetadata("withClassTypeParameters.kt") public void testWithClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.kt"); } } @@ -13167,26 +11570,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveOverrides extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/primitiveOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt11140.kt") public void testKt11140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/kt11140.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/kt11140.kt"); } @TestMetadata("notNullAnnotated.kt") public void testNotNullAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt"); } @TestMetadata("specializedMap.kt") public void testSpecializedMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.kt"); } } @@ -13194,32 +11598,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/interface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/interface.kt"); } @TestMetadata("isName.kt") public void testIsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/isName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/isName.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/val.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/var.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/var.kt"); } } @@ -13227,62 +11631,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enhancedSamConstructor.kt") public void testEnhancedSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt"); } @TestMetadata("fakeOverrideFunctionForStaticSam.kt") public void testFakeOverrideFunctionForStaticSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/fakeOverrideFunctionForStaticSam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/fakeOverrideFunctionForStaticSam.kt"); } @TestMetadata("inheritedStaticSam.kt") public void testInheritedStaticSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/inheritedStaticSam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/inheritedStaticSam.kt"); } @TestMetadata("privateCandidatesWithWrongArguments.kt") public void testPrivateCandidatesWithWrongArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.kt"); } @TestMetadata("samOnTypeParameter.kt") public void testSamOnTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/samOnTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/samOnTypeParameter.kt"); } @TestMetadata("staticSamFromImportWithStar.kt") public void testStaticSamFromImportWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/staticSamFromImportWithStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/staticSamFromImportWithStar.kt"); } @TestMetadata("staticSamWithExplicitImport.kt") public void testStaticSamWithExplicitImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/staticSamWithExplicitImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/staticSamWithExplicitImport.kt"); } @TestMetadata("typeInferenceOnSamAdapters.kt") public void testTypeInferenceOnSamAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/typeInferenceOnSamAdapters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/typeInferenceOnSamAdapters.kt"); } @TestMetadata("withDefaultMethods.kt") public void testWithDefaultMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/withDefaultMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/withDefaultMethods.kt"); } } @@ -13290,38 +11689,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamByProjectedType extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamByProjectedType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/samByProjectedType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("genericInReturnType.kt") public void testGenericInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt"); } @TestMetadata("genericInValueParameter.kt") public void testGenericInValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInValueParameter.kt"); } @TestMetadata("genericSuperWildcard.kt") public void testGenericSuperWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericSuperWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericSuperWildcard.kt"); } @TestMetadata("noAdapterBecuaseOfRecursiveUpperBound.kt") public void testNoAdapterBecuaseOfRecursiveUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt"); } @TestMetadata("starProjectionComplexUpperBound.kt") public void testStarProjectionComplexUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/starProjectionComplexUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/starProjectionComplexUpperBound.kt"); } } @@ -13329,98 +11727,87 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultEnum.kt") public void testDefaultEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultEnum.kt"); } @TestMetadata("defaultLongLiteral.kt") public void testDefaultLongLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultLongLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultLongLiteral.kt"); } @TestMetadata("defaultNull.kt") public void testDefaultNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNull.kt"); } @TestMetadata("defaultNullAndParameter.kt") public void testDefaultNullAndParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNullAndParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNullAndParameter.kt"); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultParameter.kt"); } @TestMetadata("emptyParameterName.kt") public void testEmptyParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/emptyParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/emptyParameterName.kt"); } @TestMetadata("notNullVarargOverride.kt") public void testNotNullVarargOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/notNullVarargOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/notNullVarargOverride.kt"); } @TestMetadata("nullableVarargOverride.kt") public void testNullableVarargOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/nullableVarargOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/nullableVarargOverride.kt"); } @TestMetadata("overridesDefaultValue.kt") public void testOverridesDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesDefaultValue.kt"); } @TestMetadata("overridesParameterName.kt") public void testOverridesParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesParameterName.kt"); } @TestMetadata("reorderedParameterNames.kt") public void testReorderedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/reorderedParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/reorderedParameterNames.kt"); } @TestMetadata("sameParameterName.kt") public void testSameParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/sameParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/sameParameterName.kt"); } @TestMetadata("specialCharsParameterName.kt") public void testSpecialCharsParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/specialCharsParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/specialCharsParameterName.kt"); } @TestMetadata("stableParameterName.kt") public void testStableParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/stableParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/stableParameterName.kt"); } @TestMetadata("staticMethodWithDefaultValue.kt") public void testStaticMethodWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/staticMethodWithDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/staticMethodWithDefaultValue.kt"); } } @@ -13428,20 +11815,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltIns extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hashtableInheritance.kt") public void testHashtableInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/hashtableInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/hashtableInheritance.kt"); } @TestMetadata("securityProvider.kt") public void testSecurityProvider() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt"); } } @@ -13449,38 +11838,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/arrayList.kt"); } @TestMetadata("returnCollection.kt") public void testReturnCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/returnCollection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/returnCollection.kt"); } @TestMetadata("shapeMismatchInCovariantPosition.kt") public void testShapeMismatchInCovariantPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPosition.kt"); } @TestMetadata("shapeMismatchInCovariantPositionGeneric.kt") public void testShapeMismatchInCovariantPositionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPositionGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPositionGeneric.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/typeParameter.kt"); } } } @@ -13489,16 +11877,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java8Overrides extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractBaseClassMemberNotImplemented.kt") public void testAbstractBaseClassMemberNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/abstractBaseClassMemberNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractBaseClassMemberNotImplemented.kt"); } @TestMetadata("abstractVsAbstract.kt") public void testAbstractVsAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/abstractVsAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractVsAbstract.kt"); } public void testAllFilesPresentInJava8Overrides() throws Exception { @@ -13507,44 +11897,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("defaultVsAbstract.kt") public void testDefaultVsAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/defaultVsAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/defaultVsAbstract.kt"); } @TestMetadata("hidingMethodOfAny.kt") public void testHidingMethodOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/hidingMethodOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/hidingMethodOfAny.kt"); } @TestMetadata("implementingMethodOfAny.kt") public void testImplementingMethodOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/implementingMethodOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/implementingMethodOfAny.kt"); } @TestMetadata("notAMethodOfAny.kt") public void testNotAMethodOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/notAMethodOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/notAMethodOfAny.kt"); } @TestMetadata("overridingMethodOfAnyChain.kt") public void testOverridingMethodOfAnyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyChain.kt"); } @TestMetadata("overridingMethodOfAnyDiamond.kt") public void testOverridingMethodOfAnyDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyDiamond.kt"); } @TestMetadata("singleRelevantDefault.kt") public void testSingleRelevantDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/singleRelevantDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/singleRelevantDefault.kt"); } } @@ -13552,80 +11935,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("automaticLabelFromInfixOperator.kt") public void testAutomaticLabelFromInfixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/automaticLabelFromInfixOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/automaticLabelFromInfixOperator.kt"); } @TestMetadata("kt1703.kt") public void testKt1703() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt1703.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt1703.kt"); } @TestMetadata("kt361.kt") public void testKt361() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt361.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt361.kt"); } @TestMetadata("kt3920.kt") public void testKt3920() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt3920.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt3920.kt"); } @TestMetadata("kt3988.kt") public void testKt3988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt3988.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt3988.kt"); } @TestMetadata("kt4247.kt") public void testKt4247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt4247.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt4247.kt"); } @TestMetadata("kt4586.kt") public void testKt4586() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt4586.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt4586.kt"); } @TestMetadata("kt4603.kt") public void testKt4603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt4603.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt4603.kt"); } @TestMetadata("kt591.kt") public void testKt591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt591.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt591.kt"); } @TestMetadata("labelReferencesInsideObjectExpressions.kt") public void testLabelReferencesInsideObjectExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt"); } @TestMetadata("labeledFunctionLiteral.kt") public void testLabeledFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/labeledFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/labeledFunctionLiteral.kt"); } @TestMetadata("labelsMustBeNamed.kt") public void testLabelsMustBeNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/labelsMustBeNamed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/labelsMustBeNamed.kt"); } } @@ -13633,52 +12008,54 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("modifierApplicability.kt") public void testModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); } @TestMetadata("modifierApplicability_lv12.kt") public void testModifierApplicability_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/modifierApplicability_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability_lv12.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/setter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/setter.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/lateinit/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inapplicableLateinitModifier.kt") public void testInapplicableLateinitModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/local/inapplicableLateinitModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/local/inapplicableLateinitModifier.kt"); } @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/local/localLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/local/localLateinit.kt"); } @TestMetadata("uninitialized.kt") public void testUninitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/local/uninitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/local/uninitialized.kt"); } } } @@ -13687,20 +12064,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/library/Collections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/library/Collections.kt"); } @TestMetadata("kt828.kt") public void testKt828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/library/kt828.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/library/kt828.kt"); } } @@ -13708,20 +12087,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalClasses extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localAnnotationClass.kt") public void testLocalAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/localClasses/localAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/localClasses/localAnnotationClass.kt"); } @TestMetadata("localAnnotationClassError.kt") public void testLocalAnnotationClassError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/localClasses/localAnnotationClassError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/localClasses/localAnnotationClassError.kt"); } } @@ -13729,160 +12110,144 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/annotations.kt"); } @TestMetadata("defaultModifier.kt") public void testDefaultModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt"); } @TestMetadata("IllegalModifiers.kt") public void testIllegalModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt"); } @TestMetadata("incompatibleVarianceModifiers.kt") public void testIncompatibleVarianceModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt"); } @TestMetadata("inlineParameters.kt") public void testInlineParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/inlineParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/inlineParameters.kt"); } @TestMetadata("internalInInterface.kt") public void testInternalInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/internalInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/internalInInterface.kt"); } @TestMetadata("modifierOnParameterInFunctionType.kt") public void testModifierOnParameterInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/modifierOnParameterInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/modifierOnParameterInFunctionType.kt"); } @TestMetadata("NoLocalVisibility.kt") public void testNoLocalVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/NoLocalVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/NoLocalVisibility.kt"); } @TestMetadata("openInInterface.kt") public void testOpenInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/openInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/openInInterface.kt"); } @TestMetadata("primaryConstructorMissingBrackets.kt") public void testPrimaryConstructorMissingBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingBrackets.kt"); } @TestMetadata("primaryConstructorMissingKeyword.kt") public void testPrimaryConstructorMissingKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.kt"); } @TestMetadata("privateInInterface.kt") public void testPrivateInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/privateInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/privateInInterface.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/protected.kt"); } @TestMetadata("redundantTargets.kt") public void testRedundantTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/redundantTargets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/redundantTargets.kt"); } @TestMetadata("repeatedModifiers.kt") public void testRepeatedModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/modifiers/const") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Const extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/const"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("applicability.kt") public void testApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/applicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/applicability.kt"); } @TestMetadata("arrayInAnnotationArgumentType.kt") public void testArrayInAnnotationArgumentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt"); } @TestMetadata("constInteraction.kt") public void testConstInteraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/constInteraction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/constInteraction.kt"); } @TestMetadata("fromJava.kt") public void testFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/fromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/fromJava.kt"); } @TestMetadata("fromJavaSubclass.kt") public void testFromJavaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/fromJavaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/fromJavaSubclass.kt"); } @TestMetadata("kt12248.kt") public void testKt12248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/kt12248.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/kt12248.kt"); } @TestMetadata("kt15913.kt") public void testKt15913() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); } @TestMetadata("noDivisionByZeroFeature.kt") public void testNoDivisionByZeroFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); } @TestMetadata("types.kt") public void testTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/types.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/types.kt"); } } @@ -13890,26 +12255,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorInfix extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorInfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/operatorInfix"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LocalFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt"); } @TestMetadata("MemberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt"); } } } @@ -13918,130 +12284,119 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multimodule extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultimodule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/internal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/internal.kt"); } @TestMetadata("kt14249.kt") public void testKt14249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/kt14249.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/kt14249.kt"); } @TestMetadata("packagePrivate.kt") public void testPackagePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/packagePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/packagePrivate.kt"); } @TestMetadata("publishedApiInternal.kt") public void testPublishedApiInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.kt"); } @TestMetadata("redundantElseInWhen.kt") public void testRedundantElseInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.kt"); } @TestMetadata("varargConflict.kt") public void testVarargConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/varargConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/varargConflict.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateClass extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("collectionMethodStub.kt") public void testCollectionMethodStub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/collectionMethodStub.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/collectionMethodStub.kt"); } @TestMetadata("differentGenericArguments.kt") public void testDifferentGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArguments.kt"); } @TestMetadata("differentGenericArgumentsReversed.kt") public void testDifferentGenericArgumentsReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.kt"); } @TestMetadata("duplicateClass.kt") public void testDuplicateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateClass.kt"); } @TestMetadata("duplicateNestedClasses.kt") public void testDuplicateNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt"); } @TestMetadata("duplicateSuperClass.kt") public void testDuplicateSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt"); } @TestMetadata("genericArgumentNumberMismatch.kt") public void testGenericArgumentNumberMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericArgumentNumberMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericArgumentNumberMismatch.kt"); } @TestMetadata("genericSuperClass.kt") public void testGenericSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt"); } @TestMetadata("inTheSameModuleWithUsage.kt") public void testInTheSameModuleWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsage.kt"); } @TestMetadata("inTheSameModuleWithUsageNoTypeAnnotation.kt") public void testInTheSameModuleWithUsageNoTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsageNoTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsageNoTypeAnnotation.kt"); } @TestMetadata("members.kt") public void testMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/members.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/members.kt"); } @TestMetadata("sameClassNameDifferentPackages.kt") public void testSameClassNameDifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt"); } @TestMetadata("sameGenericArguments.kt") public void testSameGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameGenericArguments.kt"); } } @@ -14049,158 +12404,137 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateMethod extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateMethod() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classGenericsInParams.kt") public void testClassGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt"); } @TestMetadata("classGenericsInParamsBoundMismatch.kt") public void testClassGenericsInParamsBoundMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt"); } @TestMetadata("classGenericsInParamsIndexMismatch.kt") public void testClassGenericsInParamsIndexMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt"); } @TestMetadata("classGenericsInParamsNameMismatch.kt") public void testClassGenericsInParamsNameMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt"); } @TestMetadata("classGenericsInReturnType.kt") public void testClassGenericsInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt"); } @TestMetadata("classVsFunctionGenericsInParamsMismatch.kt") public void testClassVsFunctionGenericsInParamsMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt"); } @TestMetadata("covariantReturnTypes.kt") public void testCovariantReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt"); } @TestMetadata("differenceInParamNames.kt") public void testDifferenceInParamNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt"); } @TestMetadata("differentGenericsInParams.kt") public void testDifferentGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt"); } @TestMetadata("differentNumberOfParams.kt") public void testDifferentNumberOfParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt"); } @TestMetadata("differentReturnTypes.kt") public void testDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt"); } @TestMetadata("extensionMatch.kt") public void testExtensionMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt"); } @TestMetadata("functionGenericsInParams.kt") public void testFunctionGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt"); } @TestMetadata("functionGenericsInParamsBoundsMismatch.kt") public void testFunctionGenericsInParamsBoundsMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt"); } @TestMetadata("functionGenericsInParamsEqNull.kt") public void testFunctionGenericsInParamsEqNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt"); } @TestMetadata("functionGenericsInParamsNotIs.kt") public void testFunctionGenericsInParamsNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt"); } @TestMetadata("functionGenericsInParamsReturnFooT.kt") public void testFunctionGenericsInParamsReturnFooT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt"); } @TestMetadata("functionGenericsInParamsReturnT.kt") public void testFunctionGenericsInParamsReturnT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt"); } @TestMetadata("incompleteCodeNoNoneApplicable.kt") public void testIncompleteCodeNoNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/incompleteCodeNoNoneApplicable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/incompleteCodeNoNoneApplicable.kt"); } @TestMetadata("noGenericsInParams.kt") public void testNoGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt"); } @TestMetadata("noParams.kt") public void testNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt"); } @TestMetadata("sameGenericsInParams.kt") public void testSameGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt"); } @TestMetadata("simpleWithInheritance.kt") public void testSimpleWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt"); } @TestMetadata("sinceKotlin.kt") public void testSinceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sinceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sinceKotlin.kt"); } @TestMetadata("substitutedGenericInParams.kt") public void testSubstitutedGenericInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt"); } } @@ -14208,32 +12542,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateSuper extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentSuperTraits.kt") public void testDifferentSuperTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt"); } @TestMetadata("sameSuperTrait.kt") public void testSameSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt"); } @TestMetadata("sameSuperTraitDifferentBounds.kt") public void testSameSuperTraitDifferentBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt"); } @TestMetadata("sameSuperTraitGenerics.kt") public void testSameSuperTraitGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt"); } } @@ -14241,32 +12575,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HiddenClass extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHiddenClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/hiddenClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deprecatedHiddenImportPriority.kt") public void testDeprecatedHiddenImportPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenImportPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenImportPriority.kt"); } @TestMetadata("deprecatedHiddenMultipleClasses.kt") public void testDeprecatedHiddenMultipleClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt"); } @TestMetadata("sinceKotlinImportPriority.kt") public void testSinceKotlinImportPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinImportPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinImportPriority.kt"); } @TestMetadata("sinceKotlinMultipleClasses.kt") public void testSinceKotlinMultipleClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt"); } } } @@ -14275,106 +12609,99 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("headerFunInNonHeaderClass.kt") public void testHeaderFunInNonHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerFunInNonHeaderClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerFunInNonHeaderClass.kt"); } @TestMetadata("implDelegatedMember.kt") public void testImplDelegatedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/implDelegatedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/implDelegatedMember.kt"); } @TestMetadata("implDynamic.kt") public void testImplDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/implDynamic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/implDynamic.kt"); } @TestMetadata("implFakeOverride.kt") public void testImplFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/implFakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/implFakeOverride.kt"); } @TestMetadata("incompatibles.kt") public void testIncompatibles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/incompatibles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/incompatibles.kt"); } @TestMetadata("modifierApplicability.kt") public void testModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt"); } @TestMetadata("namedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt"); } @TestMetadata("privateTopLevelDeclarations.kt") public void testPrivateTopLevelDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationArgumentEquality.kt") public void testAnnotationArgumentEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationArgumentEquality.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationArgumentEquality.kt"); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotations.kt"); } @TestMetadata("annotationsViaActualTypeAlias.kt") public void testAnnotationsViaActualTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/constructor.kt"); } @TestMetadata("expectedDeclaresDefaultArguments.kt") public void testExpectedDeclaresDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedDeclaresDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedDeclaresDefaultArguments.kt"); } @TestMetadata("expectedInheritsDefaultArguments.kt") public void testExpectedInheritsDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedInheritsDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedInheritsDefaultArguments.kt"); } @TestMetadata("expectedVsNonExpectedWithDefaults.kt") public void testExpectedVsNonExpectedWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedVsNonExpectedWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedVsNonExpectedWithDefaults.kt"); } } @@ -14382,14 +12709,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deprecated extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/deprecated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("header.kt") public void testHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/deprecated/header.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/deprecated/header.kt"); } } @@ -14397,10 +12727,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("additionalEntriesInImpl.kt") public void testAdditionalEntriesInImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/additionalEntriesInImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/additionalEntriesInImpl.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -14409,26 +12742,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("constructorInHeaderEnum.kt") public void testConstructorInHeaderEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/constructorInHeaderEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/constructorInHeaderEnum.kt"); } @TestMetadata("differentEntryOrder.kt") public void testDifferentEntryOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/differentEntryOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/differentEntryOrder.kt"); } @TestMetadata("enumEntryWithBody.kt") public void testEnumEntryWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/enumEntryWithBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/enumEntryWithBody.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/simpleEnum.kt"); } } @@ -14436,32 +12765,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generic extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/generic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionTypeParameterBounds.kt") public void testFunctionTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/functionTypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/functionTypeParameterBounds.kt"); } @TestMetadata("genericMemberBounds.kt") public void testGenericMemberBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/genericMemberBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/genericMemberBounds.kt"); } @TestMetadata("membersInGenericClass.kt") public void testMembersInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/membersInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/membersInGenericClass.kt"); } @TestMetadata("typeParameterBoundsDifferentOrderActualMissing.kt") public void testTypeParameterBoundsDifferentOrderActualMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/typeParameterBoundsDifferentOrderActualMissing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/typeParameterBoundsDifferentOrderActualMissing.kt"); } } @@ -14469,22 +12798,23 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HeaderClass extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("actualClassWithDefaultValuesInAnnotationViaTypealias.kt") public void testActualClassWithDefaultValuesInAnnotationViaTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDefaultValuesInAnnotationViaTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDefaultValuesInAnnotationViaTypealias.kt"); } @TestMetadata("actualClassWithDifferentConstructors.kt") public void testActualClassWithDifferentConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDifferentConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDifferentConstructors.kt"); } @TestMetadata("actualMissing.kt") public void testActualMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualMissing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualMissing.kt"); } public void testAllFilesPresentInHeaderClass() throws Exception { @@ -14493,164 +12823,137 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("classKinds.kt") public void testClassKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/classKinds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/classKinds.kt"); } @TestMetadata("dontOverrideMethodsFromInterfaceInCommonCode.kt") public void testDontOverrideMethodsFromInterfaceInCommonCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/dontOverrideMethodsFromInterfaceInCommonCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/dontOverrideMethodsFromInterfaceInCommonCode.kt"); } @TestMetadata("expectClassWithExplicitAbstractMember.kt") public void testExpectClassWithExplicitAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.kt"); } @TestMetadata("expectClassWithoutConstructor.kt") public void testExpectClassWithoutConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithoutConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithoutConstructor.kt"); } @TestMetadata("expectDeclarationWithStrongIncompatibilities.kt") public void testExpectDeclarationWithStrongIncompatibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithStrongIncompatibilities.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithStrongIncompatibilities.kt"); } @TestMetadata("expectDeclarationWithWeakIncompatibilities.kt") public void testExpectDeclarationWithWeakIncompatibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithWeakIncompatibilities.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithWeakIncompatibilities.kt"); } @TestMetadata("expectFinalActualOpen.kt") public void testExpectFinalActualOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFinalActualOpen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFinalActualOpen.kt"); } @TestMetadata("explicitConstructorDelegation.kt") public void testExplicitConstructorDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/explicitConstructorDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/explicitConstructorDelegation.kt"); } @TestMetadata("extendExpectedClassWithAbstractMember.kt") public void testExtendExpectedClassWithAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.kt"); } @TestMetadata("extendExpectedClassWithoutExplicitOverrideOfMethod.kt") public void testExtendExpectedClassWithoutExplicitOverrideOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithoutExplicitOverrideOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithoutExplicitOverrideOfMethod.kt"); } @TestMetadata("extraHeaderOnMembers.kt") public void testExtraHeaderOnMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/extraHeaderOnMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/extraHeaderOnMembers.kt"); } @TestMetadata("functionAndPropertyWithSameName.kt") public void testFunctionAndPropertyWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/functionAndPropertyWithSameName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/functionAndPropertyWithSameName.kt"); } @TestMetadata("genericClassImplTypeAlias.kt") public void testGenericClassImplTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/genericClassImplTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/genericClassImplTypeAlias.kt"); } @TestMetadata("headerClassMember.kt") public void testHeaderClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassMember.kt"); } @TestMetadata("headerClassWithFunctionBody.kt") public void testHeaderClassWithFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt"); } @TestMetadata("implDataClass.kt") public void testImplDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/implDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/implDataClass.kt"); } @TestMetadata("implOpenClass.kt") public void testImplOpenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/implOpenClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/implOpenClass.kt"); } @TestMetadata("inheritanceByDelegationInExpectClass.kt") public void testInheritanceByDelegationInExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/inheritanceByDelegationInExpectClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/inheritanceByDelegationInExpectClass.kt"); } @TestMetadata("memberPropertyKinds.kt") public void testMemberPropertyKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/memberPropertyKinds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/memberPropertyKinds.kt"); } @TestMetadata("modalityCheckForExplicitAndImplicitOverride.kt") public void testModalityCheckForExplicitAndImplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/modalityCheckForExplicitAndImplicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/modalityCheckForExplicitAndImplicitOverride.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClasses.kt"); } @TestMetadata("nestedClassesWithErrors.kt") public void testNestedClassesWithErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClassesWithErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClassesWithErrors.kt"); } @TestMetadata("noImplKeywordOnMember.kt") public void testNoImplKeywordOnMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/noImplKeywordOnMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/noImplKeywordOnMember.kt"); } @TestMetadata("privateMembers.kt") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/privateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/privateMembers.kt"); } @TestMetadata("simpleHeaderClass.kt") public void testSimpleHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/simpleHeaderClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/simpleHeaderClass.kt"); } @TestMetadata("smartCastOnExpectClass.kt") public void testSmartCastOnExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/smartCastOnExpectClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/smartCastOnExpectClass.kt"); } @TestMetadata("superClass.kt") public void testSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/superClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/superClass.kt"); } } @@ -14658,20 +12961,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("flexibleTypes.kt") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/java/flexibleTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/java/flexibleTypes.kt"); } @TestMetadata("parameterNames.kt") public void testParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/java/parameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/java/parameterNames.kt"); } } @@ -14679,86 +12984,77 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelFun extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTopLevelFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callHeaderFun.kt") public void testCallHeaderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callHeaderFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callHeaderFun.kt"); } @TestMetadata("callableReferenceOnExpectFun.kt") public void testCallableReferenceOnExpectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt"); } @TestMetadata("conflictingHeaderDeclarations.kt") public void testConflictingHeaderDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingHeaderDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingHeaderDeclarations.kt"); } @TestMetadata("conflictingImplDeclarations.kt") public void testConflictingImplDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.kt"); } @TestMetadata("functionModifiers.kt") public void testFunctionModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/functionModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/functionModifiers.kt"); } @TestMetadata("headerAndImplInDIfferentPackages.kt") public void testHeaderAndImplInDIfferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerAndImplInDIfferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerAndImplInDIfferentPackages.kt"); } @TestMetadata("headerDeclarationWithBody.kt") public void testHeaderDeclarationWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.kt"); } @TestMetadata("headerWithoutImpl.kt") public void testHeaderWithoutImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerWithoutImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerWithoutImpl.kt"); } @TestMetadata("implDeclarationWithoutBody.kt") public void testImplDeclarationWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implDeclarationWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implDeclarationWithoutBody.kt"); } @TestMetadata("implWithoutHeader.kt") public void testImplWithoutHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implWithoutHeader.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implWithoutHeader.kt"); } @TestMetadata("inlineFun.kt") public void testInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/inlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/inlineFun.kt"); } @TestMetadata("simpleHeaderFun.kt") public void testSimpleHeaderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/simpleHeaderFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/simpleHeaderFun.kt"); } @TestMetadata("valueParameterModifiers.kt") public void testValueParameterModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/valueParameterModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/valueParameterModifiers.kt"); } } @@ -14766,20 +13062,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelProperty extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTopLevelProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentKindsOfProperties.kt") public void testDifferentKindsOfProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/differentKindsOfProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/differentKindsOfProperties.kt"); } @TestMetadata("simpleHeaderVar.kt") public void testSimpleHeaderVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/simpleHeaderVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/simpleHeaderVar.kt"); } } } @@ -14788,86 +13086,77 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NamedArguments extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNamedArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/namedArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allowForJavaAnnotation.kt") public void testAllowForJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.kt"); } @TestMetadata("ambiguousNamedArguments1.kt") public void testAmbiguousNamedArguments1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments1.kt"); } @TestMetadata("ambiguousNamedArguments2.kt") public void testAmbiguousNamedArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments2.kt"); } @TestMetadata("ambiguousNamedArgumentsWithGenerics1.kt") public void testAmbiguousNamedArgumentsWithGenerics1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics1.kt"); } @TestMetadata("ambiguousNamedArgumentsWithGenerics2.kt") public void testAmbiguousNamedArgumentsWithGenerics2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics2.kt"); } @TestMetadata("ambiguousNamedArgumentsWithGenerics3.kt") public void testAmbiguousNamedArgumentsWithGenerics3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.kt"); } @TestMetadata("disallowForJavaConstructor.kt") public void testDisallowForJavaConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaConstructor.kt"); } @TestMetadata("disallowForJavaMethods.kt") public void testDisallowForJavaMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaMethods.kt"); } @TestMetadata("disallowForSamAdapterConstructor.kt") public void testDisallowForSamAdapterConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt"); } @TestMetadata("disallowForSamAdapterFunction.kt") public void testDisallowForSamAdapterFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt"); } @TestMetadata("namedArgumentsAndDefaultValues.kt") public void testNamedArgumentsAndDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt"); } @TestMetadata("namedArgumentsInOverloads.kt") public void testNamedArgumentsInOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverloads.kt"); } @TestMetadata("namedArgumentsInOverrides.kt") public void testNamedArgumentsInOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverrides.kt"); } } @@ -14875,230 +13164,197 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityAndSmartCasts extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityAndSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AssertNotNull.kt") public void testAssertNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt"); } @TestMetadata("dataFlowInfoAfterExclExcl.kt") public void testDataFlowInfoAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/dataFlowInfoAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/dataFlowInfoAfterExclExcl.kt"); } @TestMetadata("equalityUnderNotNullCheck.kt") public void testEqualityUnderNotNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/equalityUnderNotNullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/equalityUnderNotNullCheck.kt"); } @TestMetadata("funcLiteralArgsInsideAmbiguity.kt") public void testFuncLiteralArgsInsideAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideAmbiguity.kt"); } @TestMetadata("funcLiteralArgsInsideUnresolvedFunction.kt") public void testFuncLiteralArgsInsideUnresolvedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideUnresolvedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideUnresolvedFunction.kt"); } @TestMetadata("InfixCallNullability.kt") public void testInfixCallNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt"); } @TestMetadata("kt1270.kt") public void testKt1270() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt"); } @TestMetadata("kt1680.kt") public void testKt1680() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1680.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1680.kt"); } @TestMetadata("kt1778.kt") public void testKt1778() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1778.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1778.kt"); } @TestMetadata("kt2109.kt") public void testKt2109() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2109.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2109.kt"); } @TestMetadata("kt2125.kt") public void testKt2125() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2125.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2125.kt"); } @TestMetadata("kt2146.kt") public void testKt2146() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2146.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2146.kt"); } @TestMetadata("kt2164.kt") public void testKt2164() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt"); } @TestMetadata("kt2176.kt") public void testKt2176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2176.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2176.kt"); } @TestMetadata("kt2195.kt") public void testKt2195() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2195.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2195.kt"); } @TestMetadata("kt2212.kt") public void testKt2212() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2212.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2212.kt"); } @TestMetadata("kt2216.kt") public void testKt2216() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt"); } @TestMetadata("kt2223.kt") public void testKt2223() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2223.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2223.kt"); } @TestMetadata("kt2234.kt") public void testKt2234() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2234.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2234.kt"); } @TestMetadata("kt2336.kt") public void testKt2336() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2336.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2336.kt"); } @TestMetadata("kt244.kt") public void testKt244() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt244.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt244.kt"); } @TestMetadata("kt362.kt") public void testKt362() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.kt"); } @TestMetadata("noSenselessNullOnNullableType.kt") public void testNoSenselessNullOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noSenselessNullOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noSenselessNullOnNullableType.kt"); } @TestMetadata("noUnnecessaryNotNullAssertionOnErrorType.kt") public void testNoUnnecessaryNotNullAssertionOnErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noUnnecessaryNotNullAssertionOnErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noUnnecessaryNotNullAssertionOnErrorType.kt"); } @TestMetadata("notnullTypesFromJavaWithSmartcast.kt") public void testNotnullTypesFromJavaWithSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.kt"); } @TestMetadata("NullableNothingIsExactlyNull.kt") public void testNullableNothingIsExactlyNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/NullableNothingIsExactlyNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/NullableNothingIsExactlyNull.kt"); } @TestMetadata("nullableReceiverWithOverloadedMethod.kt") public void testNullableReceiverWithOverloadedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.kt"); } @TestMetadata("PreferExtensionsOnNullableReceiver.kt") public void testPreferExtensionsOnNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/PreferExtensionsOnNullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/PreferExtensionsOnNullableReceiver.kt"); } @TestMetadata("QualifiedExpressionNullability.kt") public void testQualifiedExpressionNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt"); } @TestMetadata("ReceiverNullability.kt") public void testReceiverNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt"); } @TestMetadata("SenselessNullInWhen.kt") public void testSenselessNullInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/SenselessNullInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/SenselessNullInWhen.kt"); } @TestMetadata("senslessComparisonWithNullOnTypeParameters.kt") public void testSenslessComparisonWithNullOnTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/senslessComparisonWithNullOnTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/senslessComparisonWithNullOnTypeParameters.kt"); } @TestMetadata("smartCastReceiverWithGenerics.kt") public void testSmartCastReceiverWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastReceiverWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastReceiverWithGenerics.kt"); } @TestMetadata("smartCastsAndBooleanExpressions.kt") public void testSmartCastsAndBooleanExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastsAndBooleanExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastsAndBooleanExpressions.kt"); } @TestMetadata("unnecessaryNotNullAssertion.kt") public void testUnnecessaryNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt"); } @TestMetadata("unstableSmartcastWhenOpenGetterWithOverloading.kt") public void testUnstableSmartcastWhenOpenGetterWithOverloading() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWhenOpenGetterWithOverloading.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWhenOpenGetterWithOverloading.kt"); } @TestMetadata("unstableSmartcastWithOverloadedExtensions.kt") public void testUnstableSmartcastWithOverloadedExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWithOverloadedExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWithOverloadedExtensions.kt"); } } @@ -15106,80 +13362,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableTypes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullableTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/nullableTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("baseWithNullableUpperBound.kt") public void testBaseWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/baseWithNullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/baseWithNullableUpperBound.kt"); } @TestMetadata("elvisOnUnit.kt") public void testElvisOnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/elvisOnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/elvisOnUnit.kt"); } @TestMetadata("nullAssertOnTypeWithNullableUpperBound.kt") public void testNullAssertOnTypeWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt"); } @TestMetadata("nullableArgumentForIn.kt") public void testNullableArgumentForIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.kt"); } @TestMetadata("nullableArgumentToNonNullParameterPlatform.kt") public void testNullableArgumentToNonNullParameterPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt"); } @TestMetadata("nullableArgumentToNonNullParameterSimple.kt") public void testNullableArgumentToNonNullParameterSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt"); } @TestMetadata("redundantNullable.kt") public void testRedundantNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/redundantNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/redundantNullable.kt"); } @TestMetadata("redundantNullableInSupertype.kt") public void testRedundantNullableInSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt"); } @TestMetadata("safeAccessOnUnit.kt") public void testSafeAccessOnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/safeAccessOnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/safeAccessOnUnit.kt"); } @TestMetadata("safeCallOnTypeWithNullableUpperBound.kt") public void testSafeCallOnTypeWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt"); } @TestMetadata("safeCallWithInvoke.kt") public void testSafeCallWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.kt"); } @TestMetadata("uselessElvis.kt") public void testUselessElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt"); } } @@ -15187,32 +13435,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Numbers extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNumbers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/numbers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("characterIsNotANumber.kt") public void testCharacterIsNotANumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt"); } @TestMetadata("doublesInSimpleConstraints.kt") public void testDoublesInSimpleConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt"); } @TestMetadata("intValuesOutOfRange.kt") public void testIntValuesOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt"); } @TestMetadata("numbersInSimpleConstraints.kt") public void testNumbersInSimpleConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt"); } } @@ -15220,226 +13468,199 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnInnerObject.kt") public void testInvokeOnInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt"); } @TestMetadata("kt2240.kt") public void testKt2240() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt2240.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt2240.kt"); } @TestMetadata("kt5527.kt") public void testKt5527() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt5527.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt5527.kt"); } @TestMetadata("localObjectInsideObject.kt") public void testLocalObjectInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/localObjectInsideObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/localObjectInsideObject.kt"); } @TestMetadata("localObjects.kt") public void testLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/localObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/localObjects.kt"); } @TestMetadata("nestedClassInAnonymousObject.kt") public void testNestedClassInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/nestedClassInAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/nestedClassInAnonymousObject.kt"); } @TestMetadata("objectInsideFun.kt") public void testObjectInsideFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/objectInsideFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/objectInsideFun.kt"); } @TestMetadata("objectLiteralExpressionTypeMismatch.kt") public void testObjectLiteralExpressionTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt"); } @TestMetadata("Objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/Objects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/Objects.kt"); } @TestMetadata("ObjectsInheritance.kt") public void testObjectsInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/ObjectsInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/ObjectsInheritance.kt"); } @TestMetadata("ObjectsLocal.kt") public void testObjectsLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt"); } @TestMetadata("ObjectsNested.kt") public void testObjectsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/ObjectsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/ObjectsNested.kt"); } @TestMetadata("OpenInObject.kt") public void testOpenInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/OpenInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/OpenInObject.kt"); } @TestMetadata("upperBoundViolated.kt") public void testUpperBoundViolated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/objects/kt21515") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/objects/kt21515"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationConstructor.kt") public void testAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/annotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/annotationConstructor.kt"); } @TestMetadata("callableReferenceComplexCasesWithImportsOld.kt") public void testCallableReferenceComplexCasesWithImportsOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferenceComplexCasesWithImportsOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferenceComplexCasesWithImportsOld.kt"); } @TestMetadata("callableReferencesComplexCasesWithQualificationOld.kt") public void testCallableReferencesComplexCasesWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.kt"); } @TestMetadata("callableReferencesNew.kt") public void testCallableReferencesNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesNew.kt"); } @TestMetadata("callableReferencesOld.kt") public void testCallableReferencesOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOld.kt"); } @TestMetadata("callableReferencesOldComplexCases.kt") public void testCallableReferencesOldComplexCases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOldComplexCases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOldComplexCases.kt"); } @TestMetadata("callableReferencesWithQualificationNew.kt") public void testCallableReferencesWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationNew.kt"); } @TestMetadata("callableReferencesWithQualificationOld.kt") public void testCallableReferencesWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationOld.kt"); } @TestMetadata("classifierFromCompanionObjectNew.kt") public void testClassifierFromCompanionObjectNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectNew.kt"); } @TestMetadata("classifierFromCompanionObjectOld.kt") public void testClassifierFromCompanionObjectOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectOld.kt"); } @TestMetadata("classifierFromCompanionObjectWithQualificationNew.kt") public void testClassifierFromCompanionObjectWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationNew.kt"); } @TestMetadata("classifierFromCompanionObjectWithQualificationOld.kt") public void testClassifierFromCompanionObjectWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationOld.kt"); } @TestMetadata("classifierIsVisibleByTwoPaths.kt") public void testClassifierIsVisibleByTwoPaths() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierIsVisibleByTwoPaths.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierIsVisibleByTwoPaths.kt"); } @TestMetadata("inheritedFromDeprecatedNew.kt") public void testInheritedFromDeprecatedNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedNew.kt"); } @TestMetadata("inheritedFromDeprecatedOld.kt") public void testInheritedFromDeprecatedOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedOld.kt"); } @TestMetadata("inheritedFromDeprecatedWithQualificationNew.kt") public void testInheritedFromDeprecatedWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationNew.kt"); } @TestMetadata("inheritedFromDeprecatedWithQualificationOld.kt") public void testInheritedFromDeprecatedWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationOld.kt"); } @TestMetadata("useDeprecatedConstructorNew.kt") public void testUseDeprecatedConstructorNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorNew.kt"); } @TestMetadata("useDeprecatedConstructorOld.kt") public void testUseDeprecatedConstructorOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorOld.kt"); } @TestMetadata("useDeprecatedConstructorWithQualificationNew.kt") public void testUseDeprecatedConstructorWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationNew.kt"); } @TestMetadata("useDeprecatedConstructorWithQualificationOld.kt") public void testUseDeprecatedConstructorWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationOld.kt"); } } } @@ -15448,134 +13669,117 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorRem extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorRem() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorRem"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DeprecatedModAssignOperatorConventions.kt") public void testDeprecatedModAssignOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt"); } @TestMetadata("deprecatedModConvention.kt") public void testDeprecatedModConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.kt"); } @TestMetadata("DeprecatedModOperatorConventions.kt") public void testDeprecatedModOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt"); } @TestMetadata("doNotResolveToInapplicableRem.kt") public void testDoNotResolveToInapplicableRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt"); } @TestMetadata("modWithRemAssign.kt") public void testModWithRemAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); } @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") public void testNoDeprecatedModConventionWithoutFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); } @TestMetadata("noOperatorRemFeature.kt") public void testNoOperatorRemFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); } @TestMetadata("noWarningForModFromBuiltinsWhenApi1_0.kt") public void testNoWarningForModFromBuiltinsWhenApi1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt"); } @TestMetadata("numberRemConversions.kt") public void testNumberRemConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.kt"); } @TestMetadata("operatorRem.kt") public void testOperatorRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/operatorRem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/operatorRem.kt"); } @TestMetadata("preferRemAsExtentionOverMod.kt") public void testPreferRemAsExtentionOverMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemAsExtentionOverMod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemAsExtentionOverMod.kt"); } @TestMetadata("preferRemAsMemberOverMod.kt") public void testPreferRemAsMemberOverMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemAsMemberOverMod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemAsMemberOverMod.kt"); } @TestMetadata("preferRemFromCompanionObjectOverRem.kt") public void testPreferRemFromCompanionObjectOverRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt"); } @TestMetadata("preferRemOverModInLocalFunctions.kt") public void testPreferRemOverModInLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt"); } @TestMetadata("preferRemWithImplicitReceivers.kt") public void testPreferRemWithImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt"); } @TestMetadata("prefereRemAsExtensionOverMemberMod.kt") public void testPrefereRemAsExtensionOverMemberMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/prefereRemAsExtensionOverMemberMod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/prefereRemAsExtensionOverMemberMod.kt"); } @TestMetadata("remAndRemAssignAmbiguity.kt") public void testRemAndRemAssignAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remAndRemAssignAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/remAndRemAssignAmbiguity.kt"); } @TestMetadata("remWithModAndModAssign.kt") public void testRemWithModAndModAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remWithModAndModAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/remWithModAndModAssign.kt"); } @TestMetadata("remWithModAssign.kt") public void testRemWithModAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remWithModAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/remWithModAssign.kt"); } @TestMetadata("resolveModIfRemIsHidden.kt") public void testResolveModIfRemIsHidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); } @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") public void testResolveToModWhenNoOperatorRemFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); } } @@ -15583,92 +13787,82 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorsOverloading extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorsOverloading() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorsOverloading"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AssignOperatorAmbiguity.kt") public void testAssignOperatorAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/AssignOperatorAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/AssignOperatorAmbiguity.kt"); } @TestMetadata("AssignmentOperations.kt") public void testAssignmentOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/AssignmentOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/AssignmentOperations.kt"); } @TestMetadata("assignmentOperationsCheckReturnType.kt") public void testAssignmentOperationsCheckReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt"); } @TestMetadata("compareToNullable.kt") public void testCompareToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt"); } @TestMetadata("InconsistentGetSet.kt") public void testInconsistentGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.kt"); } @TestMetadata("IteratorAmbiguity.kt") public void testIteratorAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt"); } @TestMetadata("kt1028.kt") public void testKt1028() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt1028.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt1028.kt"); } @TestMetadata("kt11300.kt") public void testKt11300() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt11300.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt11300.kt"); } @TestMetadata("kt13330.kt") public void testKt13330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt"); } @TestMetadata("kt13349.kt") public void testKt13349() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt13349.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt13349.kt"); } @TestMetadata("kt3450.kt") public void testKt3450() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt3450.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt3450.kt"); } @TestMetadata("plusAssignOnArray.kt") public void testPlusAssignOnArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnArray.kt"); } @TestMetadata("plusAssignOnLocal.kt") public void testPlusAssignOnLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnLocal.kt"); } @TestMetadata("plusAssignOnProperty.kt") public void testPlusAssignOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnProperty.kt"); } } @@ -15676,164 +13870,142 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Overload extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverload() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/overload"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConflictingOlverloadsGenericFunctions.kt") public void testConflictingOlverloadsGenericFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOlverloadsGenericFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOlverloadsGenericFunctions.kt"); } @TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt") public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.kt"); } @TestMetadata("ConflictingOverloadsFunsDifferentReturnInPackage.kt") public void testConflictingOverloadsFunsDifferentReturnInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.kt"); } @TestMetadata("ConflictingOverloadsIdenticalExtFunsInPackage.kt") public void testConflictingOverloadsIdenticalExtFunsInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.kt"); } @TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt") public void testConflictingOverloadsIdenticalFunsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt"); } @TestMetadata("ConflictingOverloadsIdenticalFunsTPInClass.kt") public void testConflictingOverloadsIdenticalFunsTPInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsTPInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsTPInClass.kt"); } @TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt") public void testConflictingOverloadsIdenticalValsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalValsInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalValsInClass.kt"); } @TestMetadata("ConflictingOverloadsValsDifferentTypeInClass.kt") public void testConflictingOverloadsValsDifferentTypeInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsValsDifferentTypeInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsValsDifferentTypeInClass.kt"); } @TestMetadata("ConstructorVsFunOverload.kt") public void testConstructorVsFunOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/defaultParameters.kt"); } @TestMetadata("EmptyArgumentListInLambda.kt") public void testEmptyArgumentListInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt"); } @TestMetadata("ExtFunDifferentReceiver.kt") public void testExtFunDifferentReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ExtFunDifferentReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ExtFunDifferentReceiver.kt"); } @TestMetadata("FunNoConflictInDifferentPackages.kt") public void testFunNoConflictInDifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt"); } @TestMetadata("kt10939.kt") public void testKt10939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt10939.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt10939.kt"); } @TestMetadata("kt1998.kt") public void testKt1998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt1998.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt1998.kt"); } @TestMetadata("kt2493.kt") public void testKt2493() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt2493.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt2493.kt"); } @TestMetadata("kt7068.kt") public void testKt7068() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt7068.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt7068.kt"); } @TestMetadata("kt7068_2.kt") public void testKt7068_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt7068_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt7068_2.kt"); } @TestMetadata("kt7440.kt") public void testKt7440() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt7440.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt"); } @TestMetadata("LocalFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/LocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/LocalFunctions.kt"); } @TestMetadata("onlyPrivateOverloadsDiagnostic.kt") public void testOnlyPrivateOverloadsDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/onlyPrivateOverloadsDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/onlyPrivateOverloadsDiagnostic.kt"); } @TestMetadata("OverloadFunRegularAndExt.kt") public void testOverloadFunRegularAndExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/OverloadFunRegularAndExt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/OverloadFunRegularAndExt.kt"); } @TestMetadata("OverloadVarAndFunInClass.kt") public void testOverloadVarAndFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/OverloadVarAndFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/OverloadVarAndFunInClass.kt"); } @TestMetadata("SyntheticAndNotSynthetic.kt") public void testSyntheticAndNotSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/SyntheticAndNotSynthetic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/SyntheticAndNotSynthetic.kt"); } @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt"); } @TestMetadata("UnsubstitutedJavaGenetics.kt") public void testUnsubstitutedJavaGenetics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/UnsubstitutedJavaGenetics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/UnsubstitutedJavaGenetics.kt"); } } @@ -15841,40 +14013,38 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractFunImplemented.kt") public void testAbstractFunImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractFunImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractFunImplemented.kt"); } @TestMetadata("AbstractFunNotImplemented.kt") public void testAbstractFunNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractFunNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractFunNotImplemented.kt"); } @TestMetadata("AbstractValImplemented.kt") public void testAbstractValImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractValImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractValImplemented.kt"); } @TestMetadata("AbstractValNotImplemented.kt") public void testAbstractValNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractValNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractValNotImplemented.kt"); } @TestMetadata("AbstractVarImplemented.kt") public void testAbstractVarImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractVarImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractVarImplemented.kt"); } @TestMetadata("AbstractVarNotImplemented.kt") public void testAbstractVarNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractVarNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractVarNotImplemented.kt"); } public void testAllFilesPresentInOverride() throws Exception { @@ -15883,370 +14053,314 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("AllPrivateFromSuperTypes.kt") public void testAllPrivateFromSuperTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt"); } @TestMetadata("ComplexValRedeclaration.kt") public void testComplexValRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ComplexValRedeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ComplexValRedeclaration.kt"); } @TestMetadata("ConflictingFunctionSignatureFromSuperclass.kt") public void testConflictingFunctionSignatureFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ConflictingFunctionSignatureFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ConflictingFunctionSignatureFromSuperclass.kt"); } @TestMetadata("ConflictingPropertySignatureFromSuperclass.kt") public void testConflictingPropertySignatureFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ConflictingPropertySignatureFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ConflictingPropertySignatureFromSuperclass.kt"); } @TestMetadata("DefaultParameterValueInOverride.kt") public void testDefaultParameterValueInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DefaultParameterValueInOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DefaultParameterValueInOverride.kt"); } @TestMetadata("DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt") public void testDefaultParameterValues_NoErrorsWhenInheritingFromOneTypeTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/Delegation.kt"); } @TestMetadata("DelegationFun.kt") public void testDelegationFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DelegationFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DelegationFun.kt"); } @TestMetadata("DelegationVal.kt") public void testDelegationVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DelegationVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DelegationVal.kt"); } @TestMetadata("DelegationVar.kt") public void testDelegationVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DelegationVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DelegationVar.kt"); } @TestMetadata("DuplicateMethod.kt") public void testDuplicateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DuplicateMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DuplicateMethod.kt"); } @TestMetadata("EqualityOfIntersectionTypes.kt") public void testEqualityOfIntersectionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt"); } @TestMetadata("ExtendFunctionClass.kt") public void testExtendFunctionClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ExtendFunctionClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ExtendFunctionClass.kt"); } @TestMetadata("FakeOverrideAbstractAndNonAbstractFun.kt") public void testFakeOverrideAbstractAndNonAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt"); } @TestMetadata("FakeOverrideDifferentDeclarationSignatures.kt") public void testFakeOverrideDifferentDeclarationSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt"); } @TestMetadata("FakeOverrideModality1.kt") public void testFakeOverrideModality1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideModality1.kt"); } @TestMetadata("FakeOverrideModality2.kt") public void testFakeOverrideModality2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideModality2.kt"); } @TestMetadata("FakeOverrideModality3.kt") public void testFakeOverrideModality3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt"); } @TestMetadata("Generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/Generics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/Generics.kt"); } @TestMetadata("InvisiblePotentialOverride.kt") public void testInvisiblePotentialOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/InvisiblePotentialOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/InvisiblePotentialOverride.kt"); } @TestMetadata("kt12358.kt") public void testKt12358() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12358.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt12358.kt"); } @TestMetadata("kt12467.kt") public void testKt12467() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12467.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt12467.kt"); } @TestMetadata("kt12482.kt") public void testKt12482() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12482.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt12482.kt"); } @TestMetadata("kt1862.kt") public void testKt1862() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt1862.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt1862.kt"); } @TestMetadata("kt2052.kt") public void testKt2052() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt2052.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt2052.kt"); } @TestMetadata("kt2491.kt") public void testKt2491() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt2491.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt2491.kt"); } @TestMetadata("kt4763.kt") public void testKt4763() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt4763.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt4763.kt"); } @TestMetadata("kt4763property.kt") public void testKt4763property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt4763property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt4763property.kt"); } @TestMetadata("kt4785.kt") public void testKt4785() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt4785.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt4785.kt"); } @TestMetadata("kt6014.kt") public void testKt6014() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt6014.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt6014.kt"); } @TestMetadata("kt880.kt") public void testKt880() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt880.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt880.kt"); } @TestMetadata("kt8990.kt") public void testKt8990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt8990.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt8990.kt"); } @TestMetadata("MissingDelegate.kt") public void testMissingDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MissingDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MissingDelegate.kt"); } @TestMetadata("MultipleDefaultParametersInSupertypes.kt") public void testMultipleDefaultParametersInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt"); } @TestMetadata("MultipleDefaultParametersInSupertypesNoOverride.kt") public void testMultipleDefaultParametersInSupertypesNoOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt"); } @TestMetadata("MultipleDefaultsAndNamesInSupertypes.kt") public void testMultipleDefaultsAndNamesInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt"); } @TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt") public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt"); } @TestMetadata("NonGenerics.kt") public void testNonGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/NonGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/NonGenerics.kt"); } @TestMetadata("ObjectDelegationManyImpl.kt") public void testObjectDelegationManyImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt"); } @TestMetadata("overrideMemberFromFinalClass.kt") public void testOverrideMemberFromFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.kt"); } @TestMetadata("OverrideWithErrors.kt") public void testOverrideWithErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/OverrideWithErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/OverrideWithErrors.kt"); } @TestMetadata("OverridingFinalMember.kt") public void testOverridingFinalMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt"); } @TestMetadata("ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt") public void testParameterDefaultValues_DefaultValueFromOnlyOneSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt"); } @TestMetadata("ParentInheritsManyImplementations.kt") public void testParentInheritsManyImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/PropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/PropertyInConstructor.kt"); } @TestMetadata("ProtectedAndPrivateFromSupertypes.kt") public void testProtectedAndPrivateFromSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt"); } @TestMetadata("SuspiciousCase1.kt") public void testSuspiciousCase1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt"); } @TestMetadata("ToAbstractMembersFromSuper-kt1996.kt") public void testToAbstractMembersFromSuper_kt1996() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClashesOnInheritance extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClashesOnInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/override/clashesOnInheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("covariantOverrides.kt") public void testCovariantOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/covariantOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/covariantOverrides.kt"); } @TestMetadata("flexibleReturnType.kt") public void testFlexibleReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnType.kt"); } @TestMetadata("flexibleReturnTypeIn.kt") public void testFlexibleReturnTypeIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeIn.kt"); } @TestMetadata("flexibleReturnTypeList.kt") public void testFlexibleReturnTypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeList.kt"); } @TestMetadata("genericWithUpperBound.kt") public void testGenericWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/genericWithUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/genericWithUpperBound.kt"); } @TestMetadata("kt13355.kt") public void testKt13355() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355.kt"); } @TestMetadata("kt13355viaJava.kt") public void testKt13355viaJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355viaJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355viaJava.kt"); } @TestMetadata("kt9550.kt") public void testKt9550() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt9550.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt9550.kt"); } @TestMetadata("returnTypeMismatch.kt") public void testReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/returnTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/returnTypeMismatch.kt"); } @TestMetadata("unrelatedInherited.kt") public void testUnrelatedInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/unrelatedInherited.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/unrelatedInherited.kt"); } @TestMetadata("valTypeMismatch.kt") public void testValTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/valTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/valTypeMismatch.kt"); } @TestMetadata("varTypeMismatch.kt") public void testVarTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/varTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/varTypeMismatch.kt"); } } @@ -16254,56 +14368,52 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterNames extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/override/parameterNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeOnOverrideDiagnostic.kt") public void testChangeOnOverrideDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt"); } @TestMetadata("differentNamesInSupertypesDiagnostic.kt") public void testDifferentNamesInSupertypesDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt"); } @TestMetadata("invokeInFunctionClass.kt") public void testInvokeInFunctionClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/invokeInFunctionClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/invokeInFunctionClass.kt"); } @TestMetadata("jjkHierarchy.kt") public void testJjkHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/jjkHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/jjkHierarchy.kt"); } @TestMetadata("kjkHierarchy.kt") public void testKjkHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt"); } @TestMetadata("kjkWithSeveralSupers.kt") public void testKjkWithSeveralSupers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt"); } @TestMetadata("kotlinInheritsBothJavaAndKotlin.kt") public void testKotlinInheritsBothJavaAndKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt"); } @TestMetadata("kotlinInheritsJava.kt") public void testKotlinInheritsJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt"); } } @@ -16311,32 +14421,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/override/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classAndTwoInterfaceBounds.kt") public void testClassAndTwoInterfaceBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/classAndTwoInterfaceBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/classAndTwoInterfaceBounds.kt"); } @TestMetadata("differentSetsOfBounds.kt") public void testDifferentSetsOfBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/differentSetsOfBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/differentSetsOfBounds.kt"); } @TestMetadata("kt9850.kt") public void testKt9850() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt"); } @TestMetadata("simpleVisitorTwoAccepts.kt") public void testSimpleVisitorTwoAccepts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/simpleVisitorTwoAccepts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/simpleVisitorTwoAccepts.kt"); } } } @@ -16345,26 +14455,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParenthesizedTypes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParenthesizedTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/parenthesizedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationsOnNullableParenthesizedTypes.kt") public void testAnnotationsOnNullableParenthesizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnNullableParenthesizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnNullableParenthesizedTypes.kt"); } @TestMetadata("annotationsOnParenthesizedTypes.kt") public void testAnnotationsOnParenthesizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnParenthesizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnParenthesizedTypes.kt"); } @TestMetadata("splitModifierList.kt") public void testSplitModifierList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes/splitModifierList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/parenthesizedTypes/splitModifierList.kt"); } } @@ -16372,184 +14483,164 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegateByComplexInheritance.kt") public void testDelegateByComplexInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/delegateByComplexInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/delegateByComplexInheritance.kt"); } @TestMetadata("dereference.kt") public void testDereference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/dereference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/dereference.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/elvis.kt"); } @TestMetadata("explicitFlexibleNoPackage.kt") public void testExplicitFlexibleNoPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleNoPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleNoPackage.kt"); } @TestMetadata("explicitFlexibleWithPackage.kt") public void testExplicitFlexibleWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleWithPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleWithPackage.kt"); } @TestMetadata("getParentOfType.kt") public void testGetParentOfType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/getParentOfType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/getParentOfType.kt"); } @TestMetadata("inference.kt") public void testInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/inference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/inference.kt"); } @TestMetadata("intVsIntegerAmbiguity.kt") public void testIntVsIntegerAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/intVsIntegerAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/intVsIntegerAmbiguity.kt"); } @TestMetadata("javaEmptyList.kt") public void testJavaEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/javaEmptyList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/javaEmptyList.kt"); } @TestMetadata("methodTypeParameterDefaultBound.kt") public void testMethodTypeParameterDefaultBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt"); } @TestMetadata("noAnnotationInClassPath.kt") public void testNoAnnotationInClassPath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/noAnnotationInClassPath.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/noAnnotationInClassPath.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullableTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullableTypeArgument.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/override.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/override.kt"); } @TestMetadata("rawOverrides.kt") public void testRawOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt"); } @TestMetadata("rawSamOverrides.kt") public void testRawSamOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/safeCall.kt"); } @TestMetadata("samAdapterInConstructor.kt") public void testSamAdapterInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/samAdapterInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/samAdapterInConstructor.kt"); } @TestMetadata("samConstructor.kt") public void testSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/samConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/samConstructor.kt"); } @TestMetadata("supertypeArgumentsExplicit.kt") public void testSupertypeArgumentsExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt"); } @TestMetadata("supertypeTypeArguments.kt") public void testSupertypeTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CommonSupertype extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommonSupertype() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/commonSupertype"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("collectionOrNull.kt") public void testCollectionOrNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/collectionOrNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/collectionOrNull.kt"); } @TestMetadata("inferenceWithBound.kt") public void testInferenceWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/inferenceWithBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/inferenceWithBound.kt"); } @TestMetadata("mixedElvis.kt") public void testMixedElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedElvis.kt"); } @TestMetadata("mixedIf.kt") public void testMixedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedIf.kt"); } @TestMetadata("recursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/recursiveGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/recursiveGeneric.kt"); } @TestMetadata("stringOrNull.kt") public void testStringOrNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/stringOrNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/stringOrNull.kt"); } @TestMetadata("typeOfElvis.kt") public void testTypeOfElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/typeOfElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/typeOfElvis.kt"); } @TestMetadata("withNothing.kt") public void testWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt"); } } @@ -16557,56 +14648,52 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericVarianceViolation extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericVarianceViolation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("listSuperType.kt") public void testListSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.kt"); } @TestMetadata("rawTypes.kt") public void testRawTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/rawTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/rawTypes.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/simple.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/smartCast.kt"); } @TestMetadata("strangeVariance.kt") public void testStrangeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/strangeVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/strangeVariance.kt"); } @TestMetadata("userDefinedOut.kt") public void testUserDefinedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/userDefinedOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/userDefinedOut.kt"); } @TestMetadata("valueFromJava.kt") public void testValueFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/valueFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/valueFromJava.kt"); } @TestMetadata("wildcards.kt") public void testWildcards() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/wildcards.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/wildcards.kt"); } } @@ -16614,14 +14701,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intersection extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntersection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/intersection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/intersection/map.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/intersection/map.kt"); } } @@ -16629,110 +14719,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodCall extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMethodCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/methodCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("entrySet.kt") public void testEntrySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/entrySet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/entrySet.kt"); } @TestMetadata("genericsAndArrays.kt") public void testGenericsAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/genericsAndArrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/genericsAndArrays.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/int.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/int.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/intArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/intArray.kt"); } @TestMetadata("javaCollectionToKotlin.kt") public void testJavaCollectionToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaCollectionToKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaCollectionToKotlin.kt"); } @TestMetadata("javaToJava.kt") public void testJavaToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToJava.kt"); } @TestMetadata("javaToKotlin.kt") public void testJavaToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToKotlin.kt"); } @TestMetadata("kotlinCollectionToJava.kt") public void testKotlinCollectionToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/kotlinCollectionToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/kotlinCollectionToJava.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/list.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/list.kt"); } @TestMetadata("multipleExactBounds.kt") public void testMultipleExactBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt"); } @TestMetadata("multipleExactBoundsNullable.kt") public void testMultipleExactBoundsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt"); } @TestMetadata("objectArray.kt") public void testObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/objectArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/objectArray.kt"); } @TestMetadata("overloadingForSubclass.kt") public void testOverloadingForSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/overloadingForSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/overloadingForSubclass.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/sam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/sam.kt"); } @TestMetadata("singleton.kt") public void testSingleton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/string.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/string.kt"); } @TestMetadata("visitor.kt") public void testVisitor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/visitor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/visitor.kt"); } } @@ -16740,50 +14817,47 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullTypeParameter extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNullTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enhancementFromAnnotation.kt") public void testEnhancementFromAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt"); } @TestMetadata("enhancementFromKotlin.kt") public void testEnhancementFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromKotlin.kt"); } @TestMetadata("methodTypeParameter.kt") public void testMethodTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt"); } @TestMetadata("noInheritanceReturnType.kt") public void testNoInheritanceReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt"); } @TestMetadata("noInheritanceValueParameter.kt") public void testNoInheritanceValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.kt"); } @TestMetadata("onTypeProjection.kt") public void testOnTypeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt"); } @TestMetadata("substitutionInSuperType.kt") public void testSubstitutionInSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.kt"); } } @@ -16791,194 +14865,167 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityWarnings extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arithmetic.kt") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/array.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/array.kt"); } @TestMetadata("assignToVar.kt") public void testAssignToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt"); } @TestMetadata("dataFlowInfo.kt") public void testDataFlowInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt"); } @TestMetadata("derefenceExtension.kt") public void testDerefenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceExtension.kt"); } @TestMetadata("derefenceMember.kt") public void testDerefenceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceMember.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/for.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/for.kt"); } @TestMetadata("functionArguments.kt") public void testFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.kt"); } @TestMetadata("inferenceInConditionals.kt") public void testInferenceInConditionals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/inferenceInConditionals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/inferenceInConditionals.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt"); } @TestMetadata("kt6829.kt") public void testKt6829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/kt6829.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/kt6829.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/multiDeclaration.kt"); } @TestMetadata("noWarningOnDoubleElvis.kt") public void testNoWarningOnDoubleElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/noWarningOnDoubleElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/noWarningOnDoubleElvis.kt"); } @TestMetadata("notNullAfterSafeCall.kt") public void testNotNullAfterSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAfterSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAfterSafeCall.kt"); } @TestMetadata("notNullAssertion.kt") public void testNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertion.kt"); } @TestMetadata("notNullAssertionInCall.kt") public void testNotNullAssertionInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertionInCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertionInCall.kt"); } @TestMetadata("notNullTypeMarkedWithNullableAnnotation.kt") public void testNotNullTypeMarkedWithNullableAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt"); } @TestMetadata("passToJava.kt") public void testPassToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/primitiveArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/primitiveArray.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt"); } @TestMetadata("senselessComparisonEquals.kt") public void testSenselessComparisonEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonEquals.kt"); } @TestMetadata("senselessComparisonIdentityEquals.kt") public void testSenselessComparisonIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonIdentityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonIdentityEquals.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt"); } @TestMetadata("uselessElvisInCall.kt") public void testUselessElvisInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisInCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisInCall.kt"); } @TestMetadata("uselessElvisRightIsNull.kt") public void testUselessElvisRightIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisRightIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisRightIsNull.kt"); } } @@ -16986,110 +15033,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RawTypes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRawTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/rawTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt"); } @TestMetadata("errorType.kt") public void testErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/errorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/errorType.kt"); } @TestMetadata("genericInnerClass.kt") public void testGenericInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.kt"); } @TestMetadata("interClassesRecursion.kt") public void testInterClassesRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/interClassesRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/interClassesRecursion.kt"); } @TestMetadata("nonGenericRawMember.kt") public void testNonGenericRawMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.kt"); } @TestMetadata("nonTrivialErasure.kt") public void testNonTrivialErasure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonTrivialErasure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonTrivialErasure.kt"); } @TestMetadata("rawEnhancment.kt") public void testRawEnhancment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawEnhancment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawEnhancment.kt"); } @TestMetadata("rawSupertype.kt") public void testRawSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.kt"); } @TestMetadata("rawSupertypeOverride.kt") public void testRawSupertypeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertypeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertypeOverride.kt"); } @TestMetadata("rawTypeInUpperBound.kt") public void testRawTypeInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt"); } @TestMetadata("rawWithInProjection.kt") public void testRawWithInProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawWithInProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawWithInProjection.kt"); } @TestMetadata("recursiveBound.kt") public void testRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt"); } @TestMetadata("samRaw.kt") public void testSamRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/samRaw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/samRaw.kt"); } @TestMetadata("saveRawCapabilitiesAfterSubtitution.kt") public void testSaveRawCapabilitiesAfterSubtitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/saveRawCapabilitiesAfterSubtitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/saveRawCapabilitiesAfterSubtitution.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.kt"); } @TestMetadata("starProjectionToRaw.kt") public void testStarProjectionToRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt"); } @TestMetadata("typeEnhancement.kt") public void testTypeEnhancement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.kt"); } } @@ -17097,32 +15131,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeEnhancement extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeEnhancement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("overriddenExtensions.kt") public void testOverriddenExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.kt"); } @TestMetadata("saveAnnotationAfterSubstitution.kt") public void testSaveAnnotationAfterSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.kt"); } @TestMetadata("supertypeDifferentParameterNullability.kt") public void testSupertypeDifferentParameterNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentParameterNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentParameterNullability.kt"); } @TestMetadata("supertypeDifferentReturnNullability.kt") public void testSupertypeDifferentReturnNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentReturnNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentReturnNullability.kt"); } } } @@ -17131,26 +15165,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateInFile extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrivateInFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/privateInFile"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt12429.kt") public void testKt12429() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/privateInFile/kt12429.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/privateInFile/kt12429.kt"); } @TestMetadata("topLevelAnnotationCall.kt") public void testTopLevelAnnotationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/privateInFile/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/privateInFile/visibility.kt"); } } @@ -17158,100 +15193,94 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionPropertyMustHaveAccessorsOrBeAbstract.kt") public void testExtensionPropertyMustHaveAccessorsOrBeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.kt"); } @TestMetadata("lateinitOnTopLevel.kt") public void testLateinitOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/lateinitOnTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/lateinitOnTopLevel.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InferenceFromGetters extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInferenceFromGetters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/properties/inferenceFromGetters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("blockBodyGetter.kt") public void testBlockBodyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/blockBodyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/blockBodyGetter.kt"); } @TestMetadata("cantBeInferred.kt") public void testCantBeInferred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt"); } @TestMetadata("explicitGetterType.kt") public void testExplicitGetterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/explicitGetterType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/explicitGetterType.kt"); } @TestMetadata("members.kt") public void testMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/members.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/members.kt"); } @TestMetadata("nullAsNothing.kt") public void testNullAsNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt"); } @TestMetadata("overrides.kt") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/overrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/overrides.kt"); } @TestMetadata("primaryConstructorParameter.kt") public void testPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt"); } @TestMetadata("recursiveGetter.kt") public void testRecursiveGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); } @TestMetadata("unsupportedInferenceFromGetters.kt") public void testUnsupportedInferenceFromGetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); } @TestMetadata("vars.kt") public void testVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/vars.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/vars.kt"); } } } @@ -17260,62 +15289,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("calleeExpressionAsCallExpression.kt") public void testCalleeExpressionAsCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt"); } @TestMetadata("GenericClassVsPackage.kt") public void testGenericClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); } @TestMetadata("JavaQualifier.kt") public void testJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/JavaQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/JavaQualifier.kt"); } @TestMetadata("nullCalleeExpression.kt") public void testNullCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt"); } @TestMetadata("PackageVsClass.kt") public void testPackageVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); } @TestMetadata("PackageVsClass2.kt") public void testPackageVsClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); } @TestMetadata("PackageVsRootClass.kt") public void testPackageVsRootClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); } @TestMetadata("TypeWithError.kt") public void testTypeWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/TypeWithError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/TypeWithError.kt"); } @TestMetadata("visibleClassVsQualifiedClass.kt") public void testVisibleClassVsQualifiedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); } } @@ -17323,10 +15347,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reassignment extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterfor.kt") public void testAfterfor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/afterfor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/afterfor.kt"); } public void testAllFilesPresentInReassignment() throws Exception { @@ -17335,50 +15362,42 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("dowhile.kt") public void testDowhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/dowhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/dowhile.kt"); } @TestMetadata("else.kt") public void testElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/else.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/else.kt"); } @TestMetadata("foronly.kt") public void testForonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/foronly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/foronly.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/if.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/if.kt"); } @TestMetadata("ifelse.kt") public void testIfelse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/ifelse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/ifelse.kt"); } @TestMetadata("noifelse.kt") public void testNoifelse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/noifelse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/noifelse.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/when.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/when.kt"); } @TestMetadata("whiletrue.kt") public void testWhiletrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/whiletrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/whiletrue.kt"); } } @@ -17386,10 +15405,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Recovery extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("absentLeftHandSide.kt") public void testAbsentLeftHandSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt"); } public void testAllFilesPresentInRecovery() throws Exception { @@ -17398,26 +15420,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("emptyTypeArgs.kt") public void testEmptyTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/emptyTypeArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/emptyTypeArgs.kt"); } @TestMetadata("namelessInJava.kt") public void testNamelessInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/namelessInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/namelessInJava.kt"); } @TestMetadata("namelessMembers.kt") public void testNamelessMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/namelessMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/namelessMembers.kt"); } @TestMetadata("namelessToplevelDeclarations.kt") public void testNamelessToplevelDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt"); } } @@ -17425,274 +15443,239 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Redeclarations extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassRedeclarationInDifferentFiles.kt") public void testClassRedeclarationInDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt"); } @TestMetadata("ConflictingExtensionProperties.kt") public void testConflictingExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/ConflictingExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/ConflictingExtensionProperties.kt"); } @TestMetadata("DuplicateParameterNamesInFunctionType.kt") public void testDuplicateParameterNamesInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/DuplicateParameterNamesInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/DuplicateParameterNamesInFunctionType.kt"); } @TestMetadata("EnumName.kt") public void testEnumName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/EnumName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/EnumName.kt"); } @TestMetadata("FunVsCtorInDifferentFiles.kt") public void testFunVsCtorInDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/FunVsCtorInDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/FunVsCtorInDifferentFiles.kt"); } @TestMetadata("interfaceTypeParameters.kt") public void testInterfaceTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/interfaceTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/interfaceTypeParameters.kt"); } @TestMetadata("kt2418.kt") public void testKt2418() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/kt2418.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/kt2418.kt"); } @TestMetadata("kt2438.kt") public void testKt2438() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/kt2438.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/kt2438.kt"); } @TestMetadata("kt470.kt") public void testKt470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/kt470.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/kt470.kt"); } @TestMetadata("MultiFilePackageRedeclaration.kt") public void testMultiFilePackageRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/MultiFilePackageRedeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/MultiFilePackageRedeclaration.kt"); } @TestMetadata("NoRedeclarationForClassesInDefaultObject.kt") public void testNoRedeclarationForClassesInDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForClassesInDefaultObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForClassesInDefaultObject.kt"); } @TestMetadata("NoRedeclarationForEnumEntriesAndDefaultObjectMembers.kt") public void testNoRedeclarationForEnumEntriesAndDefaultObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForEnumEntriesAndDefaultObjectMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForEnumEntriesAndDefaultObjectMembers.kt"); } @TestMetadata("PropertyAndFunInClass.kt") public void testPropertyAndFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/PropertyAndFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/PropertyAndFunInClass.kt"); } @TestMetadata("PropertyAndInnerClass.kt") public void testPropertyAndInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt"); } @TestMetadata("RedeclarationInDefaultObject.kt") public void testRedeclarationInDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInDefaultObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInDefaultObject.kt"); } @TestMetadata("RedeclarationInMultiFile.kt") public void testRedeclarationInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInMultiFile.kt"); } @TestMetadata("RedeclarationMainInFile.kt") public void testRedeclarationMainInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt"); } @TestMetadata("RedeclarationMainInMultiFile.kt") public void testRedeclarationMainInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInMultiFile.kt"); } @TestMetadata("Redeclarations.kt") public void testRedeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/Redeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/Redeclarations.kt"); } @TestMetadata("RedeclarationsInObjects.kt") public void testRedeclarationsInObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationsInObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationsInObjects.kt"); } @TestMetadata("RedeclaredTypeParameters.kt") public void testRedeclaredTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclaredTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclaredTypeParameters.kt"); } @TestMetadata("RedeclaringPrivateToFile.kt") public void testRedeclaringPrivateToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.kt"); } @TestMetadata("ScriptAndClassConflict.kt") public void testScriptAndClassConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/ScriptAndClassConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/ScriptAndClassConflict.kt"); } @TestMetadata("SingletonAndFunctionSameName.kt") public void testSingletonAndFunctionSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/SingletonAndFunctionSameName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/SingletonAndFunctionSameName.kt"); } @TestMetadata("TopLevelPropertyVsClassifier.kt") public void testTopLevelPropertyVsClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TopLevelPropertyVsClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TopLevelPropertyVsClassifier.kt"); } @TestMetadata("TypeAliasCtorVsFun.kt") public void testTypeAliasCtorVsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasCtorVsFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TypeAliasCtorVsFun.kt"); } @TestMetadata("TypeAliasVsClass.kt") public void testTypeAliasVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsClass.kt"); } @TestMetadata("TypeAliasVsProperty.kt") public void testTypeAliasVsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsProperty.kt"); } @TestMetadata("typeParameterWithTwoBounds.kt") public void testTypeParameterWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/typeParameterWithTwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/typeParameterWithTwoBounds.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ShadowedExtension extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShadowedExtension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionFunShadowedByInnerClassConstructor.kt") public void testExtensionFunShadowedByInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByInnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByInnerClassConstructor.kt"); } @TestMetadata("extensionFunShadowedByMemberFun.kt") public void testExtensionFunShadowedByMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberFun.kt"); } @TestMetadata("extensionFunShadowedByMemberPropertyWithInvoke.kt") public void testExtensionFunShadowedByMemberPropertyWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberPropertyWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberPropertyWithInvoke.kt"); } @TestMetadata("extensionFunShadowedBySynthesizedMemberFun.kt") public void testExtensionFunShadowedBySynthesizedMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedBySynthesizedMemberFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedBySynthesizedMemberFun.kt"); } @TestMetadata("extensionFunVsMemberExtensionFun.kt") public void testExtensionFunVsMemberExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunVsMemberExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunVsMemberExtensionFun.kt"); } @TestMetadata("extensionOnErrorType.kt") public void testExtensionOnErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnErrorType.kt"); } @TestMetadata("extensionOnNullableReceiver.kt") public void testExtensionOnNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnNullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnNullableReceiver.kt"); } @TestMetadata("extensionPropertyShadowedByMemberProperty.kt") public void testExtensionPropertyShadowedByMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionPropertyShadowedByMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionPropertyShadowedByMemberProperty.kt"); } @TestMetadata("extensionShadowedByDelegatedMember.kt") public void testExtensionShadowedByDelegatedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionShadowedByDelegatedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionShadowedByDelegatedMember.kt"); } @TestMetadata("extensionVsNonPublicMember.kt") public void testExtensionVsNonPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionVsNonPublicMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionVsNonPublicMember.kt"); } @TestMetadata("infixExtensionVsNonInfixMember.kt") public void testInfixExtensionVsNonInfixMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/infixExtensionVsNonInfixMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/infixExtensionVsNonInfixMember.kt"); } @TestMetadata("localExtensionShadowedByMember.kt") public void testLocalExtensionShadowedByMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/localExtensionShadowedByMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/localExtensionShadowedByMember.kt"); } @TestMetadata("memberExtensionShadowedByMember.kt") public void testMemberExtensionShadowedByMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/memberExtensionShadowedByMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/memberExtensionShadowedByMember.kt"); } @TestMetadata("operatorExtensionVsNonOperatorMember.kt") public void testOperatorExtensionVsNonOperatorMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/operatorExtensionVsNonOperatorMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/operatorExtensionVsNonOperatorMember.kt"); } } } @@ -17701,14 +15684,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noReflectionInClassPath.kt") public void testNoReflectionInClassPath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reflection/noReflectionInClassPath.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reflection/noReflectionInClassPath.kt"); } } @@ -17716,874 +15702,739 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguityOnLazyTypeComputation.kt") public void testAmbiguityOnLazyTypeComputation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/AmbiguityOnLazyTypeComputation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/AmbiguityOnLazyTypeComputation.kt"); } @TestMetadata("AssignmentsUnderOperators.kt") public void testAssignmentsUnderOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/AssignmentsUnderOperators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/AssignmentsUnderOperators.kt"); } @TestMetadata("CoercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/CoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/CoercionToUnit.kt"); } @TestMetadata("correctResultSubstitutorForErrorCandidate.kt") public void testCorrectResultSubstitutorForErrorCandidate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt"); } @TestMetadata("delegationWithReceiver.kt") public void testDelegationWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/delegationWithReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/delegationWithReceiver.kt"); } @TestMetadata("DoubleDefine.kt") public void testDoubleDefine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/DoubleDefine.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/DoubleDefine.kt"); } @TestMetadata("ea40964.kt") public void testEa40964() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea40964.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea40964.kt"); } @TestMetadata("ea43298.kt") public void testEa43298() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea43298.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea43298.kt"); } @TestMetadata("ea53340.kt") public void testEa53340() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea53340.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea53340.kt"); } @TestMetadata("ea65509.kt") public void testEa65509() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea65509.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea65509.kt"); } @TestMetadata("ea66984.kt") public void testEa66984() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea66984.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea66984.kt"); } @TestMetadata("ea69735.kt") public void testEa69735() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea69735.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea69735.kt"); } @TestMetadata("ea72837.kt") public void testEa72837() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea72837.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea72837.kt"); } @TestMetadata("ea76264.kt") public void testEa76264() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea76264.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea76264.kt"); } @TestMetadata("ErrorsOnIbjectExpressionsAsParameters.kt") public void testErrorsOnIbjectExpressionsAsParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ErrorsOnIbjectExpressionsAsParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ErrorsOnIbjectExpressionsAsParameters.kt"); } @TestMetadata("intchar.kt") public void testIntchar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/intchar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/intchar.kt"); } @TestMetadata("itselfAsUpperBound.kt") public void testItselfAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBound.kt"); } @TestMetadata("itselfAsUpperBoundInClass.kt") public void testItselfAsUpperBoundInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClass.kt"); } @TestMetadata("itselfAsUpperBoundInClassNotNull.kt") public void testItselfAsUpperBoundInClassNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClassNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClassNotNull.kt"); } @TestMetadata("itselfAsUpperBoundLocal.kt") public void testItselfAsUpperBoundLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt"); } @TestMetadata("itselfAsUpperBoundMember.kt") public void testItselfAsUpperBoundMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundMember.kt"); } @TestMetadata("itselfAsUpperBoundNotNull.kt") public void testItselfAsUpperBoundNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundNotNull.kt"); } @TestMetadata("Jet11.kt") public void testJet11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet11.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet11.kt"); } @TestMetadata("Jet121.kt") public void testJet121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet121.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet121.kt"); } @TestMetadata("Jet124.kt") public void testJet124() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet124.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet124.kt"); } @TestMetadata("Jet169.kt") public void testJet169() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet169.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet169.kt"); } @TestMetadata("Jet17.kt") public void testJet17() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet17.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet17.kt"); } @TestMetadata("Jet183.kt") public void testJet183() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet183.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet183.kt"); } @TestMetadata("Jet183-1.kt") public void testJet183_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet183-1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet183-1.kt"); } @TestMetadata("Jet53.kt") public void testJet53() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet53.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet53.kt"); } @TestMetadata("Jet67.kt") public void testJet67() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet67.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet67.kt"); } @TestMetadata("Jet68.kt") public void testJet68() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet68.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet68.kt"); } @TestMetadata("Jet69.kt") public void testJet69() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet69.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet69.kt"); } @TestMetadata("Jet72.kt") public void testJet72() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet72.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet72.kt"); } @TestMetadata("Jet81.kt") public void testJet81() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet81.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet81.kt"); } @TestMetadata("kt10243.kt") public void testKt10243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10243.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10243.kt"); } @TestMetadata("kt10243a.kt") public void testKt10243a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10243a.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10243a.kt"); } @TestMetadata("kt10633.kt") public void testKt10633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10633.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10633.kt"); } @TestMetadata("kt10824.kt") public void testKt10824() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10824.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10824.kt"); } @TestMetadata("kt10843.kt") public void testKt10843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10843.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10843.kt"); } @TestMetadata("kt127.kt") public void testKt127() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt127.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt127.kt"); } @TestMetadata("kt128.kt") public void testKt128() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt128.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt128.kt"); } @TestMetadata("kt13685.kt") public void testKt13685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt13685.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt13685.kt"); } @TestMetadata("kt13954.kt") public void testKt13954() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt13954.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt13954.kt"); } @TestMetadata("kt14740.kt") public void testKt14740() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt14740.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt14740.kt"); } @TestMetadata("kt1489_1728.kt") public void testKt1489_1728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt"); } @TestMetadata("kt1550.kt") public void testKt1550() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1550.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1550.kt"); } @TestMetadata("kt16086.kt") public void testKt16086() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt16086.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt16086.kt"); } @TestMetadata("kt16086_2.kt") public void testKt16086_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt16086_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt16086_2.kt"); } @TestMetadata("kt1639-JFrame.kt") public void testKt1639_JFrame() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1639-JFrame.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1639-JFrame.kt"); } @TestMetadata("kt1647.kt") public void testKt1647() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1647.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1647.kt"); } @TestMetadata("kt1736.kt") public void testKt1736() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1736.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1736.kt"); } @TestMetadata("kt174.kt") public void testKt174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt174.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt174.kt"); } @TestMetadata("kt201.kt") public void testKt201() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt201.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt201.kt"); } @TestMetadata("kt235.kt") public void testKt235() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt235.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt235.kt"); } @TestMetadata("kt2376.kt") public void testKt2376() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt2376.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt2376.kt"); } @TestMetadata("kt251.kt") public void testKt251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt251.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt251.kt"); } @TestMetadata("kt258.kt") public void testKt258() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt258.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt258.kt"); } @TestMetadata("kt26.kt") public void testKt26() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt26.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt26.kt"); } @TestMetadata("kt26-1.kt") public void testKt26_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt26-1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt26-1.kt"); } @TestMetadata("kt2768.kt") public void testKt2768() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt2768.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt2768.kt"); } @TestMetadata("kt282.kt") public void testKt282() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt282.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt282.kt"); } @TestMetadata("kt287.kt") public void testKt287() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt287.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt287.kt"); } @TestMetadata("kt2956.kt") public void testKt2956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt2956.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt2956.kt"); } @TestMetadata("kt302.kt") public void testKt302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt302.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt302.kt"); } @TestMetadata("kt306.kt") public void testKt306() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt306.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt306.kt"); } @TestMetadata("kt307.kt") public void testKt307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt307.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt307.kt"); } @TestMetadata("kt312.kt") public void testKt312() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt312.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt312.kt"); } @TestMetadata("kt313.kt") public void testKt313() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt313.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt313.kt"); } @TestMetadata("kt316.kt") public void testKt316() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt316.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt316.kt"); } @TestMetadata("kt328.kt") public void testKt328() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt328.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt328.kt"); } @TestMetadata("kt334.kt") public void testKt334() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt334.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt334.kt"); } @TestMetadata("kt335.336.kt") public void testKt335_336() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt335.336.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt335.336.kt"); } @TestMetadata("kt337.kt") public void testKt337() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt337.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt337.kt"); } @TestMetadata("kt352.kt") public void testKt352() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt352.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt352.kt"); } @TestMetadata("kt353.kt") public void testKt353() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt353.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt353.kt"); } @TestMetadata("kt3535.kt") public void testKt3535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3535.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3535.kt"); } @TestMetadata("kt3647.kt") public void testKt3647() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3647.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3647.kt"); } @TestMetadata("kt3731.kt") public void testKt3731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3731.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3731.kt"); } @TestMetadata("kt3810.kt") public void testKt3810() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3810.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3810.kt"); } @TestMetadata("kt385.109.441.kt") public void testKt385_109_441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt385.109.441.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt385.109.441.kt"); } @TestMetadata("kt394.kt") public void testKt394() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt394.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt394.kt"); } @TestMetadata("kt398.kt") public void testKt398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt398.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt398.kt"); } @TestMetadata("kt399.kt") public void testKt399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt399.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt399.kt"); } @TestMetadata("kt402.kt") public void testKt402() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt402.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt402.kt"); } @TestMetadata("kt41.kt") public void testKt41() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt41.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt41.kt"); } @TestMetadata("kt411.kt") public void testKt411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt411.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt411.kt"); } @TestMetadata("kt439.kt") public void testKt439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt439.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt439.kt"); } @TestMetadata("kt442.kt") public void testKt442() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt442.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt442.kt"); } @TestMetadata("kt443.kt") public void testKt443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt443.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt443.kt"); } @TestMetadata("kt455.kt") public void testKt455() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt455.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt455.kt"); } @TestMetadata("kt456.kt") public void testKt456() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt456.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt456.kt"); } @TestMetadata("kt459.kt") public void testKt459() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt459.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt459.kt"); } @TestMetadata("kt469.kt") public void testKt469() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt469.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt469.kt"); } @TestMetadata("kt4693.kt") public void testKt4693() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt4693.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt4693.kt"); } @TestMetadata("kt4827.kt") public void testKt4827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt4827.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt4827.kt"); } @TestMetadata("kt498.kt") public void testKt498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt498.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt498.kt"); } @TestMetadata("kt524.kt") public void testKt524() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt524.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt524.kt"); } @TestMetadata("kt526UnresolvedReferenceInnerStatic.kt") public void testKt526UnresolvedReferenceInnerStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt"); } @TestMetadata("kt5326.kt") public void testKt5326() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt5326.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt5326.kt"); } @TestMetadata("kt5362.kt") public void testKt5362() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt5362.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt5362.kt"); } @TestMetadata("kt549.kt") public void testKt549() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt549.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt549.kt"); } @TestMetadata("kt557.kt") public void testKt557() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt557.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt557.kt"); } @TestMetadata("kt571.kt") public void testKt571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt571.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt571.kt"); } @TestMetadata("kt575.kt") public void testKt575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt575.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt575.kt"); } @TestMetadata("kt58.kt") public void testKt58() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt58.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt58.kt"); } @TestMetadata("kt580.kt") public void testKt580() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt580.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt580.kt"); } @TestMetadata("kt588.kt") public void testKt588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt588.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt588.kt"); } @TestMetadata("kt597.kt") public void testKt597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt597.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt597.kt"); } @TestMetadata("kt600.kt") public void testKt600() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt600.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt600.kt"); } @TestMetadata("kt604.kt") public void testKt604() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt604.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt604.kt"); } @TestMetadata("kt618.kt") public void testKt618() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt618.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt618.kt"); } @TestMetadata("kt629.kt") public void testKt629() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt629.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt629.kt"); } @TestMetadata("kt630.kt") public void testKt630() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt630.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt630.kt"); } @TestMetadata("kt6508.kt") public void testKt6508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt6508.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt6508.kt"); } @TestMetadata("kt688.kt") public void testKt688() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt688.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt688.kt"); } @TestMetadata("kt691.kt") public void testKt691() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt691.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt691.kt"); } @TestMetadata("kt701.kt") public void testKt701() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt701.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt701.kt"); } @TestMetadata("kt716.kt") public void testKt716() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt716.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt716.kt"); } @TestMetadata("kt743.kt") public void testKt743() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt743.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt743.kt"); } @TestMetadata("kt750.kt") public void testKt750() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt750.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt750.kt"); } @TestMetadata("kt762.kt") public void testKt762() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt762.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt762.kt"); } @TestMetadata("kt7804.kt") public void testKt7804() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7804.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7804.kt"); } @TestMetadata("kt847.kt") public void testKt847() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt847.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt847.kt"); } @TestMetadata("kt860.kt") public void testKt860() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt860.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt860.kt"); } @TestMetadata("kt9620.kt") public void testKt9620() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9620.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9620.kt"); } @TestMetadata("kt9633.kt") public void testKt9633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9633.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9633.kt"); } @TestMetadata("kt9682.kt") public void testKt9682() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9682.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9682.kt"); } @TestMetadata("kt9808.kt") public void testKt9808() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9808.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9808.kt"); } @TestMetadata("noThis.kt") public void testNoThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/noThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/noThis.kt"); } @TestMetadata("OrphanStarProjection.kt") public void testOrphanStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/OrphanStarProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/OrphanStarProjection.kt"); } @TestMetadata("OutProjections.kt") public void testOutProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/OutProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/OutProjections.kt"); } @TestMetadata("OverrideResolution.kt") public void testOverrideResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/OverrideResolution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/OverrideResolution.kt"); } @TestMetadata("propertyWithExtensionTypeInvoke.kt") public void testPropertyWithExtensionTypeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/propertyWithExtensionTypeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/propertyWithExtensionTypeInvoke.kt"); } @TestMetadata("resolveSubclassOfList.kt") public void testResolveSubclassOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/resolveSubclassOfList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/resolveSubclassOfList.kt"); } @TestMetadata("SpecififcityByReceiver.kt") public void testSpecififcityByReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt"); } @TestMetadata("TypeMismatchOnUnaryOperations.kt") public void testTypeMismatchOnUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt"); } @TestMetadata("TypeParameterAsASupertype.kt") public void testTypeParameterAsASupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/TypeParameterAsASupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/TypeParameterAsASupertype.kt"); } @TestMetadata("UnavaliableQualifiedThis.kt") public void testUnavaliableQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt"); } @TestMetadata("WrongTraceInCallResolver.kt") public void testWrongTraceInCallResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/WrongTraceInCallResolver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/WrongTraceInCallResolver.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/regressions/kt7585") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt7585 extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt7585() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions/kt7585"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7585/base.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7585/base.kt"); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7585/java.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7585/java.kt"); } @TestMetadata("twoparents.kt") public void testTwoparents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7585/twoparents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7585/twoparents.kt"); } } } @@ -18592,298 +16443,259 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguityOnPropertiesWithTheSamePackageName.kt") public void testAmbiguityOnPropertiesWithTheSamePackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/ambiguityOnPropertiesWithTheSamePackageName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/ambiguityOnPropertiesWithTheSamePackageName.kt"); } @TestMetadata("ambiguityWithTwoCorrespondingFunctionTypes.kt") public void testAmbiguityWithTwoCorrespondingFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/ambiguityWithTwoCorrespondingFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/ambiguityWithTwoCorrespondingFunctionTypes.kt"); } @TestMetadata("anonymousObjectFromTopLevelMember.kt") public void testAnonymousObjectFromTopLevelMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt"); } @TestMetadata("capturedTypesInLambdaParameter.kt") public void testCapturedTypesInLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/constructorVsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/constructorVsCompanion.kt"); } @TestMetadata("CycleInTypeArgs.kt") public void testCycleInTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/CycleInTypeArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/CycleInTypeArgs.kt"); } @TestMetadata("HiddenDeclarations.kt") public void testHiddenDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt"); } @TestMetadata("implicitReceiverProperty.kt") public void testImplicitReceiverProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/implicitReceiverProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/implicitReceiverProperty.kt"); } @TestMetadata("incompleteConstructorInvocation.kt") public void testIncompleteConstructorInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/incompleteConstructorInvocation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/incompleteConstructorInvocation.kt"); } @TestMetadata("inferenceInLinkedLambdas.kt") public void testInferenceInLinkedLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdas.kt"); } @TestMetadata("inferenceInLinkedLambdasDependentOnExpectedType.kt") public void testInferenceInLinkedLambdasDependentOnExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdasDependentOnExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdasDependentOnExpectedType.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/localObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/localObject.kt"); } @TestMetadata("objectLiteralAsArgument.kt") public void testObjectLiteralAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/objectLiteralAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/objectLiteralAsArgument.kt"); } @TestMetadata("parameterAsDefaultValueInLocalFunction.kt") public void testParameterAsDefaultValueInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/parameterAsDefaultValueInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/parameterAsDefaultValueInLocalFunction.kt"); } @TestMetadata("resolveAnnotatedLambdaArgument.kt") public void testResolveAnnotatedLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt"); } @TestMetadata("resolveTypeArgsForUnresolvedCall.kt") public void testResolveTypeArgsForUnresolvedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt"); } @TestMetadata("resolveWithFunctionLiteralWithId.kt") public void testResolveWithFunctionLiteralWithId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralWithId.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralWithId.kt"); } @TestMetadata("resolveWithFunctionLiterals.kt") public void testResolveWithFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiterals.kt"); } @TestMetadata("resolveWithFunctionLiteralsOverload.kt") public void testResolveWithFunctionLiteralsOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralsOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralsOverload.kt"); } @TestMetadata("resolveWithGenerics.kt") public void testResolveWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithGenerics.kt"); } @TestMetadata("resolveWithRedeclarationError.kt") public void testResolveWithRedeclarationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.kt"); } @TestMetadata("resolveWithSpecifiedFunctionLiteralWithId.kt") public void testResolveWithSpecifiedFunctionLiteralWithId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt"); } @TestMetadata("resolveWithoutGenerics.kt") public void testResolveWithoutGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithoutGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithoutGenerics.kt"); } @TestMetadata("typeParameterInDefaultValueInLocalFunction.kt") public void testTypeParameterInDefaultValueInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/typeParameterInDefaultValueInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/typeParameterInDefaultValueInLocalFunction.kt"); } @TestMetadata("wrongNumberOfTypeArguments.kt") public void testWrongNumberOfTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt"); } @TestMetadata("wrongReceiver.kt") public void testWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DslMarker extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDslMarker() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/dslMarker"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedTypeArgument.kt") public void testAnnotatedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/annotatedTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/annotatedTypeArgument.kt"); } @TestMetadata("dslMarkerOnTypealias.kt") public void testDslMarkerOnTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerOnTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerOnTypealias.kt"); } @TestMetadata("dslMarkerWithTypealiasRecursion.kt") public void testDslMarkerWithTypealiasRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt"); } @TestMetadata("inheritedMarker.kt") public void testInheritedMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/inheritedMarker.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/inheritedMarker.kt"); } @TestMetadata("insideTopLevelExtension.kt") public void testInsideTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtension.kt"); } @TestMetadata("insideTopLevelExtensionAnnotatedType.kt") public void testInsideTopLevelExtensionAnnotatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtensionAnnotatedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtensionAnnotatedType.kt"); } @TestMetadata("markersIntersection.kt") public void testMarkersIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt"); } @TestMetadata("nestedWithSameReceiver.kt") public void testNestedWithSameReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/nestedWithSameReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/nestedWithSameReceiver.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/properties.kt"); } @TestMetadata("simpleAnnotatedClasses.kt") public void testSimpleAnnotatedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedClasses.kt"); } @TestMetadata("simpleAnnotatedTypes.kt") public void testSimpleAnnotatedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedTypes.kt"); } @TestMetadata("substitutedReceiverAnnotatedClasses.kt") public void testSubstitutedReceiverAnnotatedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedClasses.kt"); } @TestMetadata("substitutedReceiverAnnotatedType.kt") public void testSubstitutedReceiverAnnotatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt"); } @TestMetadata("threeImplicitReceivers.kt") public void testThreeImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt"); } @TestMetadata("threeImplicitReceivers2.kt") public void testThreeImplicitReceivers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt"); } @TestMetadata("twoImplicitReceivers.kt") public void testTwoImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/twoImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/twoImplicitReceivers.kt"); } @TestMetadata("twoLanguages.kt") public void testTwoLanguages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/twoLanguages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/twoLanguages.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); } @TestMetadata("useOfExtensions.kt") public void testUseOfExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/useOfExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/useOfExtensions.kt"); } @TestMetadata("usingWith.kt") public void testUsingWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWith.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWith.kt"); } @TestMetadata("usingWithThis.kt") public void testUsingWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWithThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWithThis.kt"); } } @@ -18891,184 +16703,164 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionValueAsNonExtension.kt") public void testExtensionValueAsNonExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt"); } @TestMetadata("functionExpectedWhenSeveralInvokesExist.kt") public void testFunctionExpectedWhenSeveralInvokesExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt"); } @TestMetadata("implicitInvoke.kt") public void testImplicitInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/implicitInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/implicitInvoke.kt"); } @TestMetadata("invokeAndSmartCast.kt") public void testInvokeAndSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt"); } @TestMetadata("invokeAsExtension.kt") public void testInvokeAsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt"); } @TestMetadata("invokeAsMember.kt") public void testInvokeAsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt"); } @TestMetadata("invokeAsMemberExtension.kt") public void testInvokeAsMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt"); } @TestMetadata("invokeAsMemberExtensionToExplicitReceiver.kt") public void testInvokeAsMemberExtensionToExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt"); } @TestMetadata("invokeNonExtensionLambdaInContext.kt") public void testInvokeNonExtensionLambdaInContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeNonExtensionLambdaInContext.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeNonExtensionLambdaInContext.kt"); } @TestMetadata("invokeOnVariableWithExtensionFunctionType.kt") public void testInvokeOnVariableWithExtensionFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt"); } @TestMetadata("KT-4372.kt") public void testKT_4372() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt"); } @TestMetadata("kt3772.kt") public void testKt3772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt3772.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt3772.kt"); } @TestMetadata("kt3833-invokeInsideNestedClass.kt") public void testKt3833_invokeInsideNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt"); } @TestMetadata("kt4204-completeNestedCallsForInvoke.kt") public void testKt4204_completeNestedCallsForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt4204-completeNestedCallsForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4204-completeNestedCallsForInvoke.kt"); } @TestMetadata("kt4321InvokeOnEnum.kt") public void testKt4321InvokeOnEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt"); } @TestMetadata("kt9517.kt") public void testKt9517() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt9517.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt9517.kt"); } @TestMetadata("kt9805.kt") public void testKt9805() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt9805.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt9805.kt"); } @TestMetadata("reportFunctionExpectedWhenOneInvokeExist.kt") public void testReportFunctionExpectedWhenOneInvokeExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt"); } @TestMetadata("valNamedInvoke.kt") public void testValNamedInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt"); } @TestMetadata("wrongInvokeExtension.kt") public void testWrongInvokeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/wrongInvokeExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/wrongInvokeExtension.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Errors extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErrors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke/errors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguityForInvoke.kt") public void testAmbiguityForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/ambiguityForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/ambiguityForInvoke.kt"); } @TestMetadata("invisibleInvoke.kt") public void testInvisibleInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.kt"); } @TestMetadata("receiverPresenceErrorForInvoke.kt") public void testReceiverPresenceErrorForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/receiverPresenceErrorForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/receiverPresenceErrorForInvoke.kt"); } @TestMetadata("typeInferenceErrorForInvoke.kt") public void testTypeInferenceErrorForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt"); } @TestMetadata("unresolvedInvoke.kt") public void testUnresolvedInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/unresolvedInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/unresolvedInvoke.kt"); } @TestMetadata("unsafeCallWithInvoke.kt") public void testUnsafeCallWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/unsafeCallWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/unsafeCallWithInvoke.kt"); } @TestMetadata("wrongReceiverForInvokeOnExpression.kt") public void testWrongReceiverForInvokeOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.kt"); } @TestMetadata("wrongReceiverTypeForInvoke.kt") public void testWrongReceiverTypeForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt"); } } } @@ -19077,62 +16869,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedCalls extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNestedCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("analyzeArgsInFreeExpressionPosition.kt") public void testAnalyzeArgsInFreeExpressionPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt"); } @TestMetadata("analyzeUnmappedArguments.kt") public void testAnalyzeUnmappedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeUnmappedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeUnmappedArguments.kt"); } @TestMetadata("argumentsInParentheses.kt") public void testArgumentsInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt"); } @TestMetadata("completeTypeInferenceForNestedInNoneApplicable.kt") public void testCompleteTypeInferenceForNestedInNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt"); } @TestMetadata("completeUnmappedArguments.kt") public void testCompleteUnmappedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeUnmappedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeUnmappedArguments.kt"); } @TestMetadata("kt5971NestedSafeCall.kt") public void testKt5971NestedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.kt"); } @TestMetadata("kt7597.kt") public void testKt7597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt"); } @TestMetadata("manyInapplicableCandidatesWithLambdas.kt") public void testManyInapplicableCandidatesWithLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt"); } @TestMetadata("twoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt"); } } @@ -19140,26 +16927,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoCandidates extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoCandidates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/noCandidates"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt2787.kt") public void testKt2787() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/kt2787.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/noCandidates/kt2787.kt"); } @TestMetadata("resolvedToClassifier.kt") public void testResolvedToClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.kt"); } @TestMetadata("resolvedToClassifierWithReceiver.kt") public void testResolvedToClassifierWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.kt"); } } @@ -19167,86 +16955,77 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OverloadConflicts extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverloadConflicts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/overloadConflicts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allLambdas.kt") public void testAllLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt"); } @TestMetadata("extensionReceiverAndVarargs.kt") public void testExtensionReceiverAndVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/extensionReceiverAndVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/extensionReceiverAndVarargs.kt"); } @TestMetadata("genericWithProjection.kt") public void testGenericWithProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt"); } @TestMetadata("kt10472.kt") public void testKt10472() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10472.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10472.kt"); } @TestMetadata("kt10640.kt") public void testKt10640() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt"); } @TestMetadata("numberOfDefaults.kt") public void testNumberOfDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/numberOfDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/numberOfDefaults.kt"); } @TestMetadata("originalExamples.kt") public void testOriginalExamples() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt"); } @TestMetadata("varargWithMoreSpecificSignature.kt") public void testVarargWithMoreSpecificSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargWithMoreSpecificSignature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargWithMoreSpecificSignature.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargs.kt"); } @TestMetadata("varargsInDifferentPositions.kt") public void testVarargsInDifferentPositions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt"); } @TestMetadata("varargsMixed.kt") public void testVarargsMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt"); } @TestMetadata("varargsWithRecursiveGenerics.kt") public void testVarargsWithRecursiveGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsWithRecursiveGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsWithRecursiveGenerics.kt"); } @TestMetadata("withVariance.kt") public void testWithVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt"); } } @@ -19254,80 +17033,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Priority extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPriority() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/priority"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeExtensionVsOther.kt") public void testInvokeExtensionVsOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther.kt"); } @TestMetadata("invokeExtensionVsOther2.kt") public void testInvokeExtensionVsOther2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther2.kt"); } @TestMetadata("kt10219.kt") public void testKt10219() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt10219.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt10219.kt"); } @TestMetadata("kt10510.kt") public void testKt10510() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt10510.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt10510.kt"); } @TestMetadata("kt9810.kt") public void testKt9810() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt9810.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt9810.kt"); } @TestMetadata("kt9965.kt") public void testKt9965() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt9965.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt9965.kt"); } @TestMetadata("localExtVsNonLocalExt.kt") public void testLocalExtVsNonLocalExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/localExtVsNonLocalExt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/localExtVsNonLocalExt.kt"); } @TestMetadata("memberVsLocalExt.kt") public void testMemberVsLocalExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/memberVsLocalExt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/memberVsLocalExt.kt"); } @TestMetadata("staticVsImplicitReceiverMember.kt") public void testStaticVsImplicitReceiverMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/staticVsImplicitReceiverMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/staticVsImplicitReceiverMember.kt"); } @TestMetadata("synthesizedMembersVsExtension.kt") public void testSynthesizedMembersVsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/synthesizedMembersVsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/synthesizedMembersVsExtension.kt"); } @TestMetadata("syntheticPropertiesVsExtensions.kt") public void testSyntheticPropertiesVsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsExtensions.kt"); } @TestMetadata("syntheticPropertiesVsMembers.kt") public void testSyntheticPropertiesVsMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsMembers.kt"); } } @@ -19335,44 +17106,42 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialConstructions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialConstructions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/specialConstructions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constantsInIf.kt") public void testConstantsInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt"); } @TestMetadata("elvisAsCall.kt") public void testElvisAsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt"); } @TestMetadata("exclExclAsCall.kt") public void testExclExclAsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt"); } @TestMetadata("inferenceForElvis.kt") public void testInferenceForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/inferenceForElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/inferenceForElvis.kt"); } @TestMetadata("multipleSuperClasses.kt") public void testMultipleSuperClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt"); } @TestMetadata("reportTypeMismatchDeeplyOnBranches.kt") public void testReportTypeMismatchDeeplyOnBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt"); } } } @@ -19381,322 +17150,279 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Scopes extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScopes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguityBetweenRootAndPackage.kt") public void testAmbiguityBetweenRootAndPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/AmbiguityBetweenRootAndPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/AmbiguityBetweenRootAndPackage.kt"); } @TestMetadata("AmbiguousNonExtensions.kt") public void testAmbiguousNonExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/AmbiguousNonExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/AmbiguousNonExtensions.kt"); } @TestMetadata("genericVsNested.kt") public void testGenericVsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/genericVsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/genericVsNested.kt"); } @TestMetadata("implicitReceiverMemberVsParameter.kt") public void testImplicitReceiverMemberVsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/implicitReceiverMemberVsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/implicitReceiverMemberVsParameter.kt"); } @TestMetadata("initializerScopeOfExtensionProperty.kt") public void testInitializerScopeOfExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt"); } @TestMetadata("invisibleSetter.kt") public void testInvisibleSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/invisibleSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/invisibleSetter.kt"); } @TestMetadata("kt1078.kt") public void testKt1078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1078.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1078.kt"); } @TestMetadata("kt1080.kt") public void testKt1080() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1080.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1080.kt"); } @TestMetadata("kt1244.kt") public void testKt1244() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1244.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1244.kt"); } @TestMetadata("kt1248.kt") public void testKt1248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1248.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1248.kt"); } @TestMetadata("kt151.kt") public void testKt151() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt151.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt151.kt"); } @TestMetadata("kt1579.kt") public void testKt1579() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1579.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1579.kt"); } @TestMetadata("kt1579_map_entry.kt") public void testKt1579_map_entry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1579_map_entry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1579_map_entry.kt"); } @TestMetadata("kt1580.kt") public void testKt1580() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1580.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1580.kt"); } @TestMetadata("kt1642.kt") public void testKt1642() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1642.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1642.kt"); } @TestMetadata("kt1738.kt") public void testKt1738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1738.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1738.kt"); } @TestMetadata("kt1805.kt") public void testKt1805() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1805.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1805.kt"); } @TestMetadata("kt1806.kt") public void testKt1806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1806.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1806.kt"); } @TestMetadata("kt1822.kt") public void testKt1822() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1822.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1822.kt"); } @TestMetadata("kt1942.kt") public void testKt1942() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1942.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1942.kt"); } @TestMetadata("kt2262.kt") public void testKt2262() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt2262.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt2262.kt"); } @TestMetadata("kt250.617.10.kt") public void testKt250_617_10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt"); } @TestMetadata("kt323.kt") public void testKt323() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt323.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt323.kt"); } @TestMetadata("kt37.kt") public void testKt37() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt37.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt37.kt"); } @TestMetadata("kt587.kt") public void testKt587() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt587.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt587.kt"); } @TestMetadata("kt900.kt") public void testKt900() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt900.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt900.kt"); } @TestMetadata("kt900-1.kt") public void testKt900_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt900-1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt900-1.kt"); } @TestMetadata("kt900-2.kt") public void testKt900_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt900-2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt900-2.kt"); } @TestMetadata("kt939.kt") public void testKt939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt939.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt939.kt"); } @TestMetadata("kt9430.kt") public void testKt9430() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt9430.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt9430.kt"); } @TestMetadata("NoAmbiguityBetweenRootAndPackage.kt") public void testNoAmbiguityBetweenRootAndPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/NoAmbiguityBetweenRootAndPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/NoAmbiguityBetweenRootAndPackage.kt"); } @TestMetadata("sameClassNameResolve.kt") public void testSameClassNameResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/sameClassNameResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/sameClassNameResolve.kt"); } @TestMetadata("stopResolutionOnAmbiguity.kt") public void testStopResolutionOnAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/visibility.kt"); } @TestMetadata("visibility2.kt") public void testVisibility2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/visibility2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/visibility2.kt"); } @TestMetadata("visibility3.kt") public void testVisibility3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/visibility3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/visibility3.kt"); } @TestMetadata("VisibilityInClassObject.kt") public void testVisibilityInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt"); } @TestMetadata("VisibilityInheritModifier.kt") public void testVisibilityInheritModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/scopes/classHeader") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassHeader extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassHeader() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/classHeader"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationOnClass.kt") public void testAnnotationOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt"); } @TestMetadata("annotationOnConstructors.kt") public void testAnnotationOnConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnConstructors.kt"); } @TestMetadata("classGenericParameters.kt") public void testClassGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/classGenericParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/classGenericParameters.kt"); } @TestMetadata("classParents.kt") public void testClassParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/classParents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/classParents.kt"); } @TestMetadata("companionObjectParents.kt") public void testCompanionObjectParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectParents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectParents.kt"); } @TestMetadata("companionObjectSuperConstructorArguments.kt") public void testCompanionObjectSuperConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectSuperConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectSuperConstructorArguments.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/constructors.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/delegation.kt"); } @TestMetadata("objectParents.kt") public void testObjectParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.kt"); } @TestMetadata("objectSuperConstructorArguments.kt") public void testObjectSuperConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/objectSuperConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/objectSuperConstructorArguments.kt"); } @TestMetadata("simpleDelegation.kt") public void testSimpleDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/simpleDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/simpleDelegation.kt"); } @TestMetadata("superConstructorArguments.kt") public void testSuperConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArguments.kt"); } @TestMetadata("superConstructorArgumentsInSecondaryConstructor.kt") public void testSuperConstructorArgumentsInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArgumentsInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArgumentsInSecondaryConstructor.kt"); } } @@ -19704,212 +17430,192 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/companionObject.kt"); } @TestMetadata("companionObjectAfterJava.kt") public void testCompanionObjectAfterJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectAfterJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectAfterJava.kt"); } @TestMetadata("companionObjectsOrder.kt") public void testCompanionObjectsOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectsOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectsOrder.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt"); } @TestMetadata("kt3856.kt") public void testKt3856() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/kt3856.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/kt3856.kt"); } @TestMetadata("methodsPriority.kt") public void testMethodsPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt"); } @TestMetadata("nestedClassesFromInterface.kt") public void testNestedClassesFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedClassesFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedClassesFromInterface.kt"); } @TestMetadata("nestedCompanionClass.kt") public void testNestedCompanionClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClass.kt"); } @TestMetadata("nestedCompanionClassVsNested.kt") public void testNestedCompanionClassVsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNested.kt"); } @TestMetadata("nestedCompanionClassVsNestedJava.kt") public void testNestedCompanionClassVsNestedJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNestedJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNestedJava.kt"); } @TestMetadata("nestedFromJava.kt") public void testNestedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJava.kt"); } @TestMetadata("nestedFromJavaAfterKotlin.kt") public void testNestedFromJavaAfterKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJavaAfterKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJavaAfterKotlin.kt"); } @TestMetadata("nestedVsToplevelClass.kt") public void testNestedVsToplevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedVsToplevelClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedVsToplevelClass.kt"); } @TestMetadata("severalCompanions.kt") public void testSeveralCompanions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/severalCompanions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/severalCompanions.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hidePrivateByPublic.kt") public void testHidePrivateByPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.kt"); } @TestMetadata("jjkj.kt") public void testJjkj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/jjkj.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/jjkj.kt"); } @TestMetadata("kjk.kt") public void testKjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/kjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/kjk.kt"); } @TestMetadata("localVsStatic.kt") public void testLocalVsStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt"); } @TestMetadata("nameClash0.kt") public void testNameClash0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash0.kt"); } @TestMetadata("nameClash1.kt") public void testNameClash1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash1.kt"); } @TestMetadata("nameClash2.kt") public void testNameClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash2.kt"); } @TestMetadata("oneInterfaceManyTimes.kt") public void testOneInterfaceManyTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/oneInterfaceManyTimes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/oneInterfaceManyTimes.kt"); } @TestMetadata("overloadStatic.kt") public void testOverloadStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/overloadStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/overloadStatic.kt"); } @TestMetadata("staticFunVsImport.kt") public void testStaticFunVsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticFunVsImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticFunVsImport.kt"); } @TestMetadata("staticPropertyVsImport.kt") public void testStaticPropertyVsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticPropertyVsImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticPropertyVsImport.kt"); } @TestMetadata("staticVsCompanion.kt") public void testStaticVsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsCompanion.kt"); } @TestMetadata("staticVsMember.kt") public void testStaticVsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.kt"); } @TestMetadata("staticVsOuter.kt") public void testStaticVsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsOuter.kt"); } @TestMetadata("staticsFromjava.kt") public void testStaticsFromjava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjava.kt"); } @TestMetadata("staticsFromjavaAfterKotlin.kt") public void testStaticsFromjavaAfterKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjavaAfterKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjavaAfterKotlin.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompanionObject extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessToStaticMembersOfParentClass.kt") public void testAccessToStaticMembersOfParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass.kt"); } @TestMetadata("accessToStaticMembersOfParentClassJKJ.kt") public void testAccessToStaticMembersOfParentClassJKJ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ.kt"); } public void testAllFilesPresentInCompanionObject() throws Exception { @@ -19918,20 +17624,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("inheritFromContainingClass.kt") public void testInheritFromContainingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt"); } @TestMetadata("inheritFromJava.kt") public void testInheritFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava.kt"); } @TestMetadata("inheritFromJavaAfterKotlin.kt") public void testInheritFromJavaAfterKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin.kt"); } } } @@ -19941,104 +17644,92 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedVisibility extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/protectedVisibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexCompanion.kt") public void testComplexCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/complexCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/complexCompanion.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructors.kt"); } @TestMetadata("constructorsInner.kt") public void testConstructorsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructorsInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructorsInner.kt"); } @TestMetadata("innerClassInJava.kt") public void testInnerClassInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerClassInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerClassInJava.kt"); } @TestMetadata("innerProtectedClass.kt") public void testInnerProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.kt"); } @TestMetadata("javaInheritedInKotlin.kt") public void testJavaInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.kt"); } @TestMetadata("kt7971.kt") public void testKt7971() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/kt7971.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/kt7971.kt"); } @TestMetadata("nonSuperCallConstructor.kt") public void testNonSuperCallConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt"); } @TestMetadata("nonSuperCallConstructorJavaDifferentPackage.kt") public void testNonSuperCallConstructorJavaDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaDifferentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaDifferentPackage.kt"); } @TestMetadata("nonSuperCallConstructorJavaSamePackage.kt") public void testNonSuperCallConstructorJavaSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaSamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaSamePackage.kt"); } @TestMetadata("protectedCallOnSubClass.kt") public void testProtectedCallOnSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.kt"); } @TestMetadata("smartcastOnExtensionReceiver.kt") public void testSmartcastOnExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/smartcastOnExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/smartcastOnExtensionReceiver.kt"); } @TestMetadata("syntheticPropertyExtensions.kt") public void testSyntheticPropertyExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.kt"); } @TestMetadata("syntheticSAMExtensions.kt") public void testSyntheticSAMExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt"); } @TestMetadata("unstableSmartCast.kt") public void testUnstableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt"); } @TestMetadata("withSmartcast.kt") public void testWithSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/withSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/withSmartcast.kt"); } } } @@ -20047,14 +17738,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/script"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("varInScript.kt") public void testVarInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/varInScript.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/varInScript.kt"); } } @@ -20062,230 +17756,197 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DerivedTopLevel.kt") public void testDerivedTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt"); } @TestMetadata("DoubleInner.kt") public void testDoubleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/DoubleInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/DoubleInner.kt"); } @TestMetadata("ExhaustiveOnRoot.kt") public void testExhaustiveOnRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.kt"); } @TestMetadata("ExhaustiveOnTree.kt") public void testExhaustiveOnTree() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.kt"); } @TestMetadata("ExhaustiveOnTriangleStar.kt") public void testExhaustiveOnTriangleStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.kt"); } @TestMetadata("ExhaustiveWhen.kt") public void testExhaustiveWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.kt"); } @TestMetadata("ExhaustiveWhenDoubleInner.kt") public void testExhaustiveWhenDoubleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.kt"); } @TestMetadata("ExhaustiveWhenMultipleInner.kt") public void testExhaustiveWhenMultipleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.kt"); } @TestMetadata("ExhaustiveWhenNegated.kt") public void testExhaustiveWhenNegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.kt"); } @TestMetadata("ExhaustiveWhenNegatedTwice.kt") public void testExhaustiveWhenNegatedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.kt"); } @TestMetadata("ExhaustiveWhenOnNestedSealed.kt") public void testExhaustiveWhenOnNestedSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.kt"); } @TestMetadata("ExhaustiveWhenOnNullable.kt") public void testExhaustiveWhenOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.kt"); } @TestMetadata("ExhaustiveWhenWithAdditionalMember.kt") public void testExhaustiveWhenWithAdditionalMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.kt"); } @TestMetadata("ExhaustiveWhenWithElse.kt") public void testExhaustiveWhenWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.kt"); } @TestMetadata("Local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/Local.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/Local.kt"); } @TestMetadata("LocalSealed.kt") public void testLocalSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/LocalSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/LocalSealed.kt"); } @TestMetadata("NestedSealed.kt") public void testNestedSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NestedSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NestedSealed.kt"); } @TestMetadata("NeverConstructed.kt") public void testNeverConstructed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverConstructed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverConstructed.kt"); } @TestMetadata("NeverDerivedFromNested.kt") public void testNeverDerivedFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt"); } @TestMetadata("NeverEnum.kt") public void testNeverEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverEnum.kt"); } @TestMetadata("NeverFinal.kt") public void testNeverFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverFinal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverFinal.kt"); } @TestMetadata("NeverInterface.kt") public void testNeverInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverInterface.kt"); } @TestMetadata("NeverObject.kt") public void testNeverObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverObject.kt"); } @TestMetadata("NeverOpen.kt") public void testNeverOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverOpen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverOpen.kt"); } @TestMetadata("NonExhaustiveWhen.kt") public void testNonExhaustiveWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.kt"); } @TestMetadata("NonExhaustiveWhenNegated.kt") public void testNonExhaustiveWhenNegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.kt"); } @TestMetadata("NonExhaustiveWhenWithAdditionalCase.kt") public void testNonExhaustiveWhenWithAdditionalCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.kt"); } @TestMetadata("NonExhaustiveWhenWithAnyCase.kt") public void testNonExhaustiveWhenWithAnyCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.kt"); } @TestMetadata("NonPrivateConstructor.kt") public void testNonPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.kt"); } @TestMetadata("NotFinal.kt") public void testNotFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NotFinal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NotFinal.kt"); } @TestMetadata("OperationWhen.kt") public void testOperationWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/OperationWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/OperationWhen.kt"); } @TestMetadata("RedundantAbstract.kt") public void testRedundantAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/RedundantAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/RedundantAbstract.kt"); } @TestMetadata("TreeWhen.kt") public void testTreeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/TreeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/TreeWhen.kt"); } @TestMetadata("TreeWhenFunctional.kt") public void testTreeWhenFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.kt"); } @TestMetadata("TreeWhenFunctionalNoIs.kt") public void testTreeWhenFunctionalNoIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.kt"); } @TestMetadata("WhenOnEmptySealed.kt") public void testWhenOnEmptySealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.kt"); } @TestMetadata("WithInterface.kt") public void testWithInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/WithInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/WithInterface.kt"); } } @@ -20293,300 +17954,260 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentsResolveInBodyAndDelegationCall.kt") public void testArgumentsResolveInBodyAndDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.kt"); } @TestMetadata("classInitializersWithoutPrimary.kt") public void testClassInitializersWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/classInitializersWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/classInitializersWithoutPrimary.kt"); } @TestMetadata("companionObjectScope.kt") public void testCompanionObjectScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/companionObjectScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/companionObjectScope.kt"); } @TestMetadata("constructorCallType.kt") public void testConstructorCallType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt"); } @TestMetadata("constructorInObject.kt") public void testConstructorInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.kt"); } @TestMetadata("constructorInTrait.kt") public void testConstructorInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt"); } @TestMetadata("ctrsAnnotationResolve.kt") public void testCtrsAnnotationResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.kt"); } @TestMetadata("cyclicDelegationCalls.kt") public void testCyclicDelegationCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/cyclicDelegationCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/cyclicDelegationCalls.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/dataClasses.kt"); } @TestMetadata("dataFlowInDelegationCall.kt") public void testDataFlowInDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/dataFlowInDelegationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/dataFlowInDelegationCall.kt"); } @TestMetadata("delegationByWithoutPrimary.kt") public void testDelegationByWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/enums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/enums.kt"); } @TestMetadata("errorsOnEmptyDelegationCall.kt") public void testErrorsOnEmptyDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.kt"); } @TestMetadata("expectedPrimaryConstructorCall.kt") public void testExpectedPrimaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/expectedPrimaryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/expectedPrimaryConstructorCall.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/generics.kt"); } @TestMetadata("generics2.kt") public void testGenerics2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/generics2.kt"); } @TestMetadata("generics3.kt") public void testGenerics3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/generics3.kt"); } @TestMetadata("headerSupertypeInitialization.kt") public void testHeaderSupertypeInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerSupertypeInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerSupertypeInitialization.kt"); } @TestMetadata("implicitSuperCallErrorsIfPrimary.kt") public void testImplicitSuperCallErrorsIfPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/implicitSuperCallErrorsIfPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/implicitSuperCallErrorsIfPrimary.kt"); } @TestMetadata("initializationFromOtherInstance.kt") public void testInitializationFromOtherInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/initializationFromOtherInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/initializationFromOtherInstance.kt"); } @TestMetadata("kt6992.kt") public void testKt6992() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6992.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/kt6992.kt"); } @TestMetadata("kt6993.kt") public void testKt6993() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.kt"); } @TestMetadata("kt6994.kt") public void testKt6994() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.kt"); } @TestMetadata("lambdaInDelegation.kt") public void testLambdaInDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/lambdaInDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/lambdaInDelegation.kt"); } @TestMetadata("nestedExtendsInner.kt") public void testNestedExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/nestedExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/nestedExtendsInner.kt"); } @TestMetadata("noDefaultIfEmptySecondary.kt") public void testNoDefaultIfEmptySecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/noDefaultIfEmptySecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/noDefaultIfEmptySecondary.kt"); } @TestMetadata("noPrimaryConstructor.kt") public void testNoPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/noPrimaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/noPrimaryConstructor.kt"); } @TestMetadata("noSupertypeInitWithSecondaryConstructors.kt") public void testNoSupertypeInitWithSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt"); } @TestMetadata("propertyInitializationWithPrimary.kt") public void testPropertyInitializationWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithPrimary.kt"); } @TestMetadata("propertyInitializationWithoutPrimary.kt") public void testPropertyInitializationWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithoutPrimary.kt"); } @TestMetadata("redeclarations.kt") public void testRedeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarations.kt"); } @TestMetadata("redeclarationsOfConstructorsIgnored.kt") public void testRedeclarationsOfConstructorsIgnored() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarationsOfConstructorsIgnored.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarationsOfConstructorsIgnored.kt"); } @TestMetadata("reportResolutionErrorOnImplicitOnce.kt") public void testReportResolutionErrorOnImplicitOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/reportResolutionErrorOnImplicitOnce.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/reportResolutionErrorOnImplicitOnce.kt"); } @TestMetadata("resolvePropertyInitializerWithoutPrimary.kt") public void testResolvePropertyInitializerWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/resolvePropertyInitializerWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/resolvePropertyInitializerWithoutPrimary.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/return.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/return.kt"); } @TestMetadata("superAnyNonEmpty.kt") public void testSuperAnyNonEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/superAnyNonEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/superAnyNonEmpty.kt"); } @TestMetadata("superSecondaryNonExisting.kt") public void testSuperSecondaryNonExisting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt"); } @TestMetadata("thisNonExisting.kt") public void testThisNonExisting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/thisNonExisting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/thisNonExisting.kt"); } @TestMetadata("unreachableCode.kt") public void testUnreachableCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/unreachableCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/unreachableCode.kt"); } @TestMetadata("useOfPropertiesWithPrimary.kt") public void testUseOfPropertiesWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithPrimary.kt"); } @TestMetadata("useOfPropertiesWithoutPrimary.kt") public void testUseOfPropertiesWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithoutPrimary.kt"); } @TestMetadata("valOrValAndModifiersInCtr.kt") public void testValOrValAndModifiersInCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/valOrValAndModifiersInCtr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/valOrValAndModifiersInCtr.kt"); } @TestMetadata("varargsInDelegationCallToPrimary.kt") public void testVarargsInDelegationCallToPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToPrimary.kt"); } @TestMetadata("varargsInDelegationCallToSecondary.kt") public void testVarargsInDelegationCallToSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToSecondary.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HeaderCallChecker extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessBaseGenericFromInnerExtendingSameBase.kt") public void testAccessBaseGenericFromInnerExtendingSameBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.kt"); } @TestMetadata("accessBaseGenericFromInnerExtendingSameBase2.kt") public void testAccessBaseGenericFromInnerExtendingSameBase2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.kt"); } @TestMetadata("accessBaseWithSameExtension.kt") public void testAccessBaseWithSameExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.kt"); } @TestMetadata("accessGenericBaseWithSameExtension.kt") public void testAccessGenericBaseWithSameExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.kt"); } public void testAllFilesPresentInHeaderCallChecker() throws Exception { @@ -20595,92 +18216,77 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("innerInstanceCreation.kt") public void testInnerInstanceCreation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.kt"); } @TestMetadata("lambdaAsArgument.kt") public void testLambdaAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/lambdaAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/lambdaAsArgument.kt"); } @TestMetadata("memberFunAccess.kt") public void testMemberFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.kt"); } @TestMetadata("objectLiteralAsArgument.kt") public void testObjectLiteralAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsArgument.kt"); } @TestMetadata("objectLiteralAsDefaultValueParameter.kt") public void testObjectLiteralAsDefaultValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.kt"); } @TestMetadata("operatorCall.kt") public void testOperatorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/operatorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/operatorCall.kt"); } @TestMetadata("passingInstance.kt") public void testPassingInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/passingInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/passingInstance.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.kt"); } @TestMetadata("propertyAccessUnitialized.kt") public void testPropertyAccessUnitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.kt"); } @TestMetadata("superFunAccess.kt") public void testSuperFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.kt"); } @TestMetadata("superFunAccessOverriden.kt") public void testSuperFunAccessOverriden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.kt"); } @TestMetadata("superPropertyAccess.kt") public void testSuperPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.kt"); } @TestMetadata("thisAsExtensionReceiver.kt") public void testThisAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.kt"); } @TestMetadata("usingOuterInstance.kt") public void testUsingOuterInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterInstance.kt"); } @TestMetadata("usingOuterProperty.kt") public void testUsingOuterProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterProperty.kt"); } } } @@ -20689,20 +18295,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SenselessComparison extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSenselessComparison() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/senselessComparison"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noExplicitType.kt") public void testNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/senselessComparison/noExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/senselessComparison/noExplicitType.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/senselessComparison/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/senselessComparison/parenthesized.kt"); } } @@ -20710,80 +18318,72 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Shadowing extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShadowing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/shadowing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noNameShadowingForSimpleParameters.kt") public void testNoNameShadowingForSimpleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/noNameShadowingForSimpleParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/noNameShadowingForSimpleParameters.kt"); } @TestMetadata("ShadowLambdaParameter.kt") public void testShadowLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowLambdaParameter.kt"); } @TestMetadata("ShadowMultiDeclarationWithFunParameter.kt") public void testShadowMultiDeclarationWithFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt"); } @TestMetadata("ShadowParameterInFunctionBody.kt") public void testShadowParameterInFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInFunctionBody.kt"); } @TestMetadata("ShadowParameterInNestedBlockInFor.kt") public void testShadowParameterInNestedBlockInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInNestedBlockInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInNestedBlockInFor.kt"); } @TestMetadata("ShadowPropertyInClosure.kt") public void testShadowPropertyInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInClosure.kt"); } @TestMetadata("ShadowPropertyInFor.kt") public void testShadowPropertyInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFor.kt"); } @TestMetadata("ShadowPropertyInFunction.kt") public void testShadowPropertyInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFunction.kt"); } @TestMetadata("ShadowVariableInFor.kt") public void testShadowVariableInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInFor.kt"); } @TestMetadata("ShadowVariableInNestedBlock.kt") public void testShadowVariableInNestedBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedBlock.kt"); } @TestMetadata("ShadowVariableInNestedClosure.kt") public void testShadowVariableInNestedClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosure.kt"); } @TestMetadata("ShadowVariableInNestedClosureParam.kt") public void testShadowVariableInNestedClosureParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosureParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosureParam.kt"); } } @@ -20791,10 +18391,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterBinaryExpr.kt") public void testAfterBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/afterBinaryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/afterBinaryExpr.kt"); } public void testAllFilesPresentInSmartCasts() throws Exception { @@ -20803,670 +18406,564 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("alwaysNull.kt") public void testAlwaysNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt"); } @TestMetadata("alwaysNullWithJava.kt") public void testAlwaysNullWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt"); } @TestMetadata("classObjectMember.kt") public void testClassObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt"); } @TestMetadata("combineWithNoSelectorInfo.kt") public void testCombineWithNoSelectorInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt"); } @TestMetadata("comparisonUnderAnd.kt") public void testComparisonUnderAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt"); } @TestMetadata("complexComparison.kt") public void testComplexComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt"); } @TestMetadata("complexConditionsWithExcl.kt") public void testComplexConditionsWithExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/complexConditionsWithExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/complexConditionsWithExcl.kt"); } @TestMetadata("dataFlowInfoForArguments.kt") public void testDataFlowInfoForArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/dataFlowInfoForArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/dataFlowInfoForArguments.kt"); } @TestMetadata("doubleLambdaArgument.kt") public void testDoubleLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/doubleLambdaArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/doubleLambdaArgument.kt"); } @TestMetadata("elvisExclExcl.kt") public void testElvisExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExclExcl.kt"); } @TestMetadata("elvisExclExclMerge.kt") public void testElvisExclExclMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclMerge.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclMerge.kt"); } @TestMetadata("elvisExclExclPlatform.kt") public void testElvisExclExclPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.kt"); } @TestMetadata("elvisExprNotNull.kt") public void testElvisExprNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt"); } @TestMetadata("elvisNothingRHS.kt") public void testElvisNothingRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisNothingRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisNothingRHS.kt"); } @TestMetadata("elvisRHS.kt") public void testElvisRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisRHS.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/equals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/equals.kt"); } @TestMetadata("exclUnderAnd.kt") public void testExclUnderAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/exclUnderAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/exclUnderAnd.kt"); } @TestMetadata("explicitDefaultGetter.kt") public void testExplicitDefaultGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt"); } @TestMetadata("extensionSafeCall.kt") public void testExtensionSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/extensionSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/extensionSafeCall.kt"); } @TestMetadata("fakeSmartCastOnEquality.kt") public void testFakeSmartCastOnEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.kt"); } @TestMetadata("falseReceiverSmartCast.kt") public void testFalseReceiverSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/falseReceiverSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/falseReceiverSmartCast.kt"); } @TestMetadata("falseUnnecessaryCall.kt") public void testFalseUnnecessaryCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/falseUnnecessaryCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/falseUnnecessaryCall.kt"); } @TestMetadata("fieldExclExcl.kt") public void testFieldExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.kt"); } @TestMetadata("fieldInGetter.kt") public void testFieldInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fieldInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fieldInGetter.kt"); } @TestMetadata("fieldPlus.kt") public void testFieldPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fieldPlus.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fieldPlus.kt"); } @TestMetadata("genericIntersection.kt") public void testGenericIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/genericIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/genericIntersection.kt"); } @TestMetadata("genericSet.kt") public void testGenericSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/genericSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/genericSet.kt"); } @TestMetadata("ifCascadeExprNotNull.kt") public void testIfCascadeExprNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifCascadeExprNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifCascadeExprNotNull.kt"); } @TestMetadata("ifExprInConditionNonNull.kt") public void testIfExprInConditionNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifExprInConditionNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifExprInConditionNonNull.kt"); } @TestMetadata("ifExprInWhenSubjectNonNull.kt") public void testIfExprInWhenSubjectNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifExprInWhenSubjectNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifExprInWhenSubjectNonNull.kt"); } @TestMetadata("ifExprNonNull.kt") public void testIfExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifExprNonNull.kt"); } @TestMetadata("ifWhenExprNonNull.kt") public void testIfWhenExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifWhenExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifWhenExprNonNull.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/implicitReceiver.kt"); } @TestMetadata("implicitToGrandSon.kt") public void testImplicitToGrandSon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/implicitToGrandSon.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/implicitToGrandSon.kt"); } @TestMetadata("incDecToNull.kt") public void testIncDecToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/incDecToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/incDecToNull.kt"); } @TestMetadata("kt10232.kt") public void testKt10232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt10232.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt10232.kt"); } @TestMetadata("kt10444.kt") public void testKt10444() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt10444.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt10444.kt"); } @TestMetadata("kt10483.kt") public void testKt10483() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt10483.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt10483.kt"); } @TestMetadata("kt1461.kt") public void testKt1461() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt1461.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt1461.kt"); } @TestMetadata("kt2422.kt") public void testKt2422() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt2422.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt2422.kt"); } @TestMetadata("kt2865.kt") public void testKt2865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt2865.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt2865.kt"); } @TestMetadata("kt3224.kt") public void testKt3224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3224.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3224.kt"); } @TestMetadata("kt3244.kt") public void testKt3244() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3244.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3244.kt"); } @TestMetadata("kt3572.kt") public void testKt3572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3572.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3572.kt"); } @TestMetadata("kt3711.kt") public void testKt3711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3711.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3711.kt"); } @TestMetadata("kt3899.kt") public void testKt3899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3899.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3899.kt"); } @TestMetadata("kt3993.kt") public void testKt3993() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3993.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3993.kt"); } @TestMetadata("kt5427.kt") public void testKt5427() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt5427.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt5427.kt"); } @TestMetadata("kt5455.kt") public void testKt5455() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt5455.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt5455.kt"); } @TestMetadata("kt6819.kt") public void testKt6819() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt6819.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt6819.kt"); } @TestMetadata("kt7561.kt") public void testKt7561() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt7561.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt7561.kt"); } @TestMetadata("lambdaAndArgument.kt") public void testLambdaAndArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgument.kt"); } @TestMetadata("lambdaAndArgumentFun.kt") public void testLambdaAndArgumentFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgumentFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgumentFun.kt"); } @TestMetadata("lambdaArgumentNoSubstitutedReturn.kt") public void testLambdaArgumentNoSubstitutedReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentNoSubstitutedReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentNoSubstitutedReturn.kt"); } @TestMetadata("lambdaArgumentWithBoundWithoutType.kt") public void testLambdaArgumentWithBoundWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt"); } @TestMetadata("lambdaArgumentWithExpectedGenericType.kt") public void testLambdaArgumentWithExpectedGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithExpectedGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithExpectedGenericType.kt"); } @TestMetadata("lambdaArgumentWithoutType.kt") public void testLambdaArgumentWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutType.kt"); } @TestMetadata("lambdaArgumentWithoutTypeIf.kt") public void testLambdaArgumentWithoutTypeIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIf.kt"); } @TestMetadata("lambdaArgumentWithoutTypeIfMerge.kt") public void testLambdaArgumentWithoutTypeIfMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIfMerge.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIfMerge.kt"); } @TestMetadata("lambdaArgumentWithoutTypeWhen.kt") public void testLambdaArgumentWithoutTypeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeWhen.kt"); } @TestMetadata("lambdaCall.kt") public void testLambdaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaCall.kt"); } @TestMetadata("lambdaCallAnnotated.kt") public void testLambdaCallAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaCallAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaCallAnnotated.kt"); } @TestMetadata("lambdaDeclaresAndModifies.kt") public void testLambdaDeclaresAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifies.kt"); } @TestMetadata("lambdaDeclaresAndModifiesInLoop.kt") public void testLambdaDeclaresAndModifiesInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInLoop.kt"); } @TestMetadata("lambdaDeclaresAndModifiesInSecondary.kt") public void testLambdaDeclaresAndModifiesInSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInSecondary.kt"); } @TestMetadata("lambdaDeclaresAndModifiesWithDirectEq.kt") public void testLambdaDeclaresAndModifiesWithDirectEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.kt"); } @TestMetadata("lambdaUsesOwnerModifies.kt") public void testLambdaUsesOwnerModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); } @TestMetadata("level_1_0.kt") public void testLevel_1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); } @TestMetadata("localClassChanges.kt") public void testLocalClassChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localClassChanges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localClassChanges.kt"); } @TestMetadata("localFunBetween.kt") public void testLocalFunBetween() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localFunBetween.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localFunBetween.kt"); } @TestMetadata("localFunChanges.kt") public void testLocalFunChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt"); } @TestMetadata("localObjectChanges.kt") public void testLocalObjectChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localObjectChanges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localObjectChanges.kt"); } @TestMetadata("multipleResolvedCalls.kt") public void testMultipleResolvedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/multipleResolvedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/multipleResolvedCalls.kt"); } @TestMetadata("noErrorCheckForPackageLevelVal.kt") public void testNoErrorCheckForPackageLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.kt"); } @TestMetadata("noUnnecessarySmartCastForReceiver.kt") public void testNoUnnecessarySmartCastForReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/noUnnecessarySmartCastForReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/noUnnecessarySmartCastForReceiver.kt"); } @TestMetadata("notNullorNotNull.kt") public void testNotNullorNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/notNullorNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/notNullorNotNull.kt"); } @TestMetadata("openInSealed.kt") public void testOpenInSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/openInSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/openInSealed.kt"); } @TestMetadata("ownerDeclaresBothModifies.kt") public void testOwnerDeclaresBothModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.kt"); } @TestMetadata("propertyAsCondition.kt") public void testPropertyAsCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt"); } @TestMetadata("propertyToNotNull.kt") public void testPropertyToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt"); } @TestMetadata("safeAs.kt") public void testSafeAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safeAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safeAs.kt"); } @TestMetadata("severalSmartCastsOnReified.kt") public void testSeveralSmartCastsOnReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/severalSmartCastsOnReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/severalSmartCastsOnReified.kt"); } @TestMetadata("shortIfExprNotNull.kt") public void testShortIfExprNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/shortIfExprNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/shortIfExprNotNull.kt"); } @TestMetadata("smartCastAndArgumentApproximation.kt") public void testSmartCastAndArgumentApproximation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastAndArgumentApproximation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastAndArgumentApproximation.kt"); } @TestMetadata("smartCastOnElvis.kt") public void testSmartCastOnElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastOnElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnElvis.kt"); } @TestMetadata("smartCastOnIf.kt") public void testSmartCastOnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); } @TestMetadata("smartCastOnWhen.kt") public void testSmartCastOnWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); } @TestMetadata("thisWithLabel.kt") public void testThisWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/thisWithLabel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/thisWithLabel.kt"); } @TestMetadata("thisWithLabelAsReceiverPart.kt") public void testThisWithLabelAsReceiverPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/thisWithLabelAsReceiverPart.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/thisWithLabelAsReceiverPart.kt"); } @TestMetadata("threeImplicitReceivers.kt") public void testThreeImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/threeImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/threeImplicitReceivers.kt"); } @TestMetadata("twoImplicitReceivers.kt") public void testTwoImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/twoImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/twoImplicitReceivers.kt"); } @TestMetadata("typeDegradation.kt") public void testTypeDegradation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/typeDegradation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/typeDegradation.kt"); } @TestMetadata("typeInComparison.kt") public void testTypeInComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt"); } @TestMetadata("unstableToStable.kt") public void testUnstableToStable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/unstableToStable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/unstableToStable.kt"); } @TestMetadata("unstableToStableTypes.kt") public void testUnstableToStableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/unstableToStableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/unstableToStableTypes.kt"); } @TestMetadata("varChangedInInitializer.kt") public void testVarChangedInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varChangedInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varChangedInInitializer.kt"); } @TestMetadata("varChangedInLocalInitializer.kt") public void testVarChangedInLocalInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varChangedInLocalInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varChangedInLocalInitializer.kt"); } @TestMetadata("varInAccessor.kt") public void testVarInAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInAccessor.kt"); } @TestMetadata("varInInitNoPrimary.kt") public void testVarInInitNoPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInInitNoPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInInitNoPrimary.kt"); } @TestMetadata("varInInitializer.kt") public void testVarInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInInitializer.kt"); } @TestMetadata("varInSecondaryConstructor.kt") public void testVarInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInSecondaryConstructor.kt"); } @TestMetadata("varInsideLocalFun.kt") public void testVarInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInsideLocalFun.kt"); } @TestMetadata("whenExprNonNull.kt") public void testWhenExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenExprNonNull.kt"); } @TestMetadata("whenIfExprNonNull.kt") public void testWhenIfExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenIfExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenIfExprNonNull.kt"); } @TestMetadata("whenSubjectImpossible.kt") public void testWhenSubjectImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossible.kt"); } @TestMetadata("whenSubjectImpossibleJava.kt") public void testWhenSubjectImpossibleJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossibleJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossibleJava.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Castchecks extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCastchecks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicOff.kt") public void testBasicOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); } @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.kt"); } @TestMetadata("impossible.kt") public void testImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/impossible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/impossible.kt"); } @TestMetadata("insideCall.kt") public void testInsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/insideCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/insideCall.kt"); } @TestMetadata("smartCastOfNullableExpressionWithExpectedType.kt") @@ -21477,8 +18974,7 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt"); } } @@ -21486,26 +18982,27 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Elvis extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicOff.kt") public void testBasicOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOff.kt"); } @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOn.kt"); } @TestMetadata("impossible.kt") public void testImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt"); } } @@ -21513,74 +19010,67 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dependentOnPrevArg.kt") public void testDependentOnPrevArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/dependentOnPrevArg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/dependentOnPrevArg.kt"); } @TestMetadata("intersectionTypes.kt") public void testIntersectionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt"); } @TestMetadata("kt1275.kt") public void testKt1275() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt1275.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt1275.kt"); } @TestMetadata("kt1355.kt") public void testKt1355() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt1355.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt1355.kt"); } @TestMetadata("kt2746.kt") public void testKt2746() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt2746.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt2746.kt"); } @TestMetadata("kt2851.kt") public void testKt2851() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt2851.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt2851.kt"); } @TestMetadata("kt4009.kt") public void testKt4009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt"); } @TestMetadata("kt4403.kt") public void testKt4403() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt"); } @TestMetadata("kt4415.kt") public void testKt4415() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt"); } @TestMetadata("kt6242.kt") public void testKt6242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt6242.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt6242.kt"); } @TestMetadata("smartCastOnReceiver.kt") public void testSmartCastOnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt"); } } @@ -21588,92 +19078,82 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntersectionScope extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntersectionScope() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/intersectionScope"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictTypeParameters.kt") public void testConflictTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictTypeParameters.kt"); } @TestMetadata("conflictingReturnType.kt") public void testConflictingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictingReturnType.kt"); } @TestMetadata("flexibleTypes.kt") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt"); } @TestMetadata("moreSpecificSetter.kt") public void testMoreSpecificSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificSetter.kt"); } @TestMetadata("moreSpecificVisibility.kt") public void testMoreSpecificVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificVisibility.kt"); } @TestMetadata("mostSpecific.kt") public void testMostSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecific.kt"); } @TestMetadata("mostSpecificIrrelevant.kt") public void testMostSpecificIrrelevant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecificIrrelevant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecificIrrelevant.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/properties.kt"); } @TestMetadata("propertiesConflict.kt") public void testPropertiesConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/propertiesConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/propertiesConflict.kt"); } @TestMetadata("refineReturnType.kt") public void testRefineReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/refineReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/refineReturnType.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/simple.kt"); } @TestMetadata("unstableSmartCast.kt") public void testUnstableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt"); } @TestMetadata("validTypeParameters.kt") public void testValidTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParameters.kt"); } @TestMetadata("validTypeParametersNoSmartCast.kt") public void testValidTypeParametersNoSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParametersNoSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParametersNoSmartCast.kt"); } } @@ -21681,326 +19161,277 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Loops extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLoops() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/loops"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignElvisIfBreakInsideWhileTrue.kt") public void testAssignElvisIfBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/assignElvisIfBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/assignElvisIfBreakInsideWhileTrue.kt"); } @TestMetadata("assignWhenInsideWhileTrue.kt") public void testAssignWhenInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/assignWhenInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/assignWhenInsideWhileTrue.kt"); } @TestMetadata("callBreakBetweenInsideDoWhile.kt") public void testCallBreakBetweenInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakBetweenInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakBetweenInsideDoWhile.kt"); } @TestMetadata("callBreakFirstInsideDoWhile.kt") public void testCallBreakFirstInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakFirstInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakFirstInsideDoWhile.kt"); } @TestMetadata("callBreakInsideDoWhile.kt") public void testCallBreakInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakInsideDoWhile.kt"); } @TestMetadata("callBreakSecondInsideDoWhile.kt") public void testCallBreakSecondInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakSecondInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakSecondInsideDoWhile.kt"); } @TestMetadata("callBreakThirdInsideDoWhile.kt") public void testCallBreakThirdInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakThirdInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakThirdInsideDoWhile.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhile.kt"); } @TestMetadata("doWhileBreak.kt") public void testDoWhileBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileBreak.kt"); } @TestMetadata("doWhileContinue.kt") public void testDoWhileContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileContinue.kt"); } @TestMetadata("doWhileEarlyBreak.kt") public void testDoWhileEarlyBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyBreak.kt"); } @TestMetadata("doWhileEarlyContinue.kt") public void testDoWhileEarlyContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyContinue.kt"); } @TestMetadata("doWhileInCondition.kt") public void testDoWhileInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInCondition.kt"); } @TestMetadata("doWhileInConditionWithBreak.kt") public void testDoWhileInConditionWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInConditionWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInConditionWithBreak.kt"); } @TestMetadata("doWhileLiteral.kt") public void testDoWhileLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileLiteral.kt"); } @TestMetadata("doWhileNotNullBreak.kt") public void testDoWhileNotNullBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNotNullBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNotNullBreak.kt"); } @TestMetadata("doWhileNull.kt") public void testDoWhileNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNull.kt"); } @TestMetadata("doWhileNullWithBreak.kt") public void testDoWhileNullWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNullWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNullWithBreak.kt"); } @TestMetadata("elvisBreakInsideDoWhile.kt") public void testElvisBreakInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisBreakInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisBreakInsideDoWhile.kt"); } @TestMetadata("elvisIfBreakInsideWhileTrue.kt") public void testElvisIfBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt"); } @TestMetadata("elvisInsideDoWhile.kt") public void testElvisInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisInsideDoWhile.kt"); } @TestMetadata("elvisLeftBreakInsideWhileTrue.kt") public void testElvisLeftBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisLeftBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisLeftBreakInsideWhileTrue.kt"); } @TestMetadata("ifBlockInsideDoWhile.kt") public void testIfBlockInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBlockInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBlockInsideDoWhile.kt"); } @TestMetadata("ifBreakAssignInsideDoWhile.kt") public void testIfBreakAssignInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideDoWhile.kt"); } @TestMetadata("ifBreakAssignInsideWhileTrue.kt") public void testIfBreakAssignInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideWhileTrue.kt"); } @TestMetadata("ifBreakExprInsideWhileTrue.kt") public void testIfBreakExprInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakExprInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakExprInsideWhileTrue.kt"); } @TestMetadata("ifElseBlockInsideDoWhile.kt") public void testIfElseBlockInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifElseBlockInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifElseBlockInsideDoWhile.kt"); } @TestMetadata("ifInsideDoWhile.kt") public void testIfInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifInsideDoWhile.kt"); } @TestMetadata("leftElvisBreakInsideWhileTrue.kt") public void testLeftElvisBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/leftElvisBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/leftElvisBreakInsideWhileTrue.kt"); } @TestMetadata("nestedDoWhile.kt") public void testNestedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhile.kt"); } @TestMetadata("nestedDoWhileWithLongContinue.kt") public void testNestedDoWhileWithLongContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhileWithLongContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhileWithLongContinue.kt"); } @TestMetadata("nestedLoops.kt") public void testNestedLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoops.kt"); } @TestMetadata("nestedLoopsShort.kt") public void testNestedLoopsShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsShort.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsShort.kt"); } @TestMetadata("nestedLoopsWithBreak.kt") public void testNestedLoopsWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithBreak.kt"); } @TestMetadata("nestedLoopsWithLongBreak.kt") public void testNestedLoopsWithLongBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongBreak.kt"); } @TestMetadata("nestedLoopsWithLongContinue.kt") public void testNestedLoopsWithLongContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongContinue.kt"); } @TestMetadata("plusAssignWhenInsideDoWhile.kt") public void testPlusAssignWhenInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/plusAssignWhenInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/plusAssignWhenInsideDoWhile.kt"); } @TestMetadata("safeCallBreakInsideDoWhile.kt") public void testSafeCallBreakInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallBreakInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallBreakInsideDoWhile.kt"); } @TestMetadata("safeCallInsideDoWhile.kt") public void testSafeCallInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallInsideDoWhile.kt"); } @TestMetadata("useInsideDoWhile.kt") public void testUseInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/useInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/useInsideDoWhile.kt"); } @TestMetadata("whenInsideWhileTrue.kt") public void testWhenInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whenInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whenInsideWhileTrue.kt"); } @TestMetadata("whenReturnInsideWhileTrue.kt") public void testWhenReturnInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whenReturnInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whenReturnInsideWhileTrue.kt"); } @TestMetadata("whileInCondition.kt") public void testWhileInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileInCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileInCondition.kt"); } @TestMetadata("whileInConditionWithBreak.kt") public void testWhileInConditionWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileInConditionWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileInConditionWithBreak.kt"); } @TestMetadata("whileNull.kt") public void testWhileNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileNull.kt"); } @TestMetadata("whileNullWithBreak.kt") public void testWhileNullWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileNullWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileNullWithBreak.kt"); } @TestMetadata("whileSimple.kt") public void testWhileSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileSimple.kt"); } @TestMetadata("whileTrivial.kt") public void testWhileTrivial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrivial.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrivial.kt"); } @TestMetadata("whileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrue.kt"); } @TestMetadata("whileTrueBreakReturn.kt") public void testWhileTrueBreakReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueBreakReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueBreakReturn.kt"); } @TestMetadata("whileTrueEarlyBreak.kt") public void testWhileTrueEarlyBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueEarlyBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueEarlyBreak.kt"); } @TestMetadata("whileTrueReturn.kt") public void testWhileTrueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueReturn.kt"); } @TestMetadata("WhileTrueWithBreakInIfCondition.kt") public void testWhileTrueWithBreakInIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.kt"); } } @@ -22008,56 +19439,52 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectLiterals extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjectLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/objectLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/assignment.kt"); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/base.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/base.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt"); } @TestMetadata("exclexcl.kt") public void testExclexcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt"); } @TestMetadata("exclexclArgument.kt") public void testExclexclArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclArgument.kt"); } @TestMetadata("exclexclTwoArgument.kt") public void testExclexclTwoArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclTwoArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclTwoArgument.kt"); } @TestMetadata("kt7110.kt") public void testKt7110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/kt7110.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/kt7110.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/receiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/receiver.kt"); } } @@ -22065,62 +19492,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublicVals extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublicVals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/publicVals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customGetter.kt") public void testCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/customGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/customGetter.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt"); } @TestMetadata("kt4409.kt") public void testKt4409() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt"); } @TestMetadata("kt5502.kt") public void testKt5502() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt5502.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt5502.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/open.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/open.kt"); } @TestMetadata("otherModule.kt") public void testOtherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/otherModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/otherModule.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/protected.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/simple.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/var.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/var.kt"); } } @@ -22128,182 +19550,157 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Safecalls extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSafecalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/safecalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anotherVal.kt") public void testAnotherVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/anotherVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/anotherVal.kt"); } @TestMetadata("argument.kt") public void testArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/argument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/argument.kt"); } @TestMetadata("chainAndUse.kt") public void testChainAndUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainAndUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainAndUse.kt"); } @TestMetadata("chainInChain.kt") public void testChainInChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainInChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainInChain.kt"); } @TestMetadata("chainMixedUnsafe.kt") public void testChainMixedUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainMixedUnsafe.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainMixedUnsafe.kt"); } @TestMetadata("doubleCall.kt") public void testDoubleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/doubleCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/doubleCall.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/extension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/extension.kt"); } @TestMetadata("extensionCall.kt") public void testExtensionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/extensionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/extensionCall.kt"); } @TestMetadata("falseArgument.kt") public void testFalseArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseArgument.kt"); } @TestMetadata("falseChain.kt") public void testFalseChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseChain.kt"); } @TestMetadata("falseExtension.kt") public void testFalseExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseExtension.kt"); } @TestMetadata("falseSecondArgument.kt") public void testFalseSecondArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseSecondArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseSecondArgument.kt"); } @TestMetadata("innerReceiver.kt") public void testInnerReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/innerReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/innerReceiver.kt"); } @TestMetadata("insideCall.kt") public void testInsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideCall.kt"); } @TestMetadata("insideIfExpr.kt") public void testInsideIfExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideIfExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideIfExpr.kt"); } @TestMetadata("longChain.kt") public void testLongChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/longChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/longChain.kt"); } @TestMetadata("nullableReceiver.kt") public void testNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiver.kt"); } @TestMetadata("nullableReceiverInLongChain.kt") public void testNullableReceiverInLongChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverInLongChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverInLongChain.kt"); } @TestMetadata("nullableReceiverWithExclExcl.kt") public void testNullableReceiverWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt"); } @TestMetadata("nullableReceiverWithFlexible.kt") public void testNullableReceiverWithFlexible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithFlexible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithFlexible.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/property.kt"); } @TestMetadata("propertyChain.kt") public void testPropertyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/propertyChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/propertyChain.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiver.kt"); } @TestMetadata("receiverAndChain.kt") public void testReceiverAndChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChain.kt"); } @TestMetadata("receiverAndChainFalse.kt") public void testReceiverAndChainFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); } @TestMetadata("safeAccessReceiverNotNull.kt") public void testSafeAccessReceiverNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/simple.kt"); } @TestMetadata("simpleNullableReceiver.kt") public void testSimpleNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.kt"); } @TestMetadata("twoArgs.kt") public void testTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/twoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/twoArgs.kt"); } } @@ -22311,10 +19708,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorAndFunction.kt") public void testAccessorAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/accessorAndFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/accessorAndFunction.kt"); } public void testAllFilesPresentInVariables() throws Exception { @@ -22323,146 +19723,122 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/assignment.kt"); } @TestMetadata("assignmentConversion.kt") public void testAssignmentConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/assignmentConversion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/assignmentConversion.kt"); } @TestMetadata("doWhileWithMiddleBreak.kt") public void testDoWhileWithMiddleBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/doWhileWithMiddleBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/doWhileWithMiddleBreak.kt"); } @TestMetadata("ifElseBlockInsideDoWhile.kt") public void testIfElseBlockInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhile.kt"); } @TestMetadata("ifElseBlockInsideDoWhileWithBreak.kt") public void testIfElseBlockInsideDoWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhileWithBreak.kt"); } @TestMetadata("ifNullAssignment.kt") public void testIfNullAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt"); } @TestMetadata("ifVarIs.kt") public void testIfVarIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIs.kt"); } @TestMetadata("ifVarIsAnd.kt") public void testIfVarIsAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsAnd.kt"); } @TestMetadata("ifVarIsChanged.kt") public void testIfVarIsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.kt"); } @TestMetadata("inPropertySam.kt") public void testInPropertySam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/inPropertySam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/inPropertySam.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/infix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/infix.kt"); } @TestMetadata("initialization.kt") public void testInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/initialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/initialization.kt"); } @TestMetadata("kt7599.kt") public void testKt7599() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt"); } @TestMetadata("lambdaBetweenArguments.kt") public void testLambdaBetweenArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/property.kt"); } @TestMetadata("propertyNotNeeded.kt") public void testPropertyNotNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt"); } @TestMetadata("propertySubtype.kt") public void testPropertySubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtype.kt"); } @TestMetadata("propertySubtypeInMember.kt") public void testPropertySubtypeInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMember.kt"); } @TestMetadata("propertySubtypeInMemberCheck.kt") public void testPropertySubtypeInMemberCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMemberCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMemberCheck.kt"); } @TestMetadata("varAsUse.kt") public void testVarAsUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/varAsUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/varAsUse.kt"); } @TestMetadata("varChangedInLoop.kt") public void testVarChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/varChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/varChangedInLoop.kt"); } @TestMetadata("varNotChangedInLoop.kt") public void testVarNotChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/varNotChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/varNotChangedInLoop.kt"); } @TestMetadata("whileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/whileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/whileTrue.kt"); } @TestMetadata("whileWithBreak.kt") public void testWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.kt"); } } @@ -22470,320 +19846,272 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varnotnull extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarnotnull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/varnotnull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignNestedWhile.kt") public void testAssignNestedWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignNestedWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignNestedWhile.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt"); } @TestMetadata("boundInitializer.kt") public void testBoundInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.kt"); } @TestMetadata("boundInitializerWrong.kt") public void testBoundInitializerWrong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt"); } @TestMetadata("capturedInClosureModifiedBefore.kt") public void testCapturedInClosureModifiedBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); } @TestMetadata("capturedInClosureOff.kt") public void testCapturedInClosureOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); } @TestMetadata("doWhileWithBreak.kt") public void testDoWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.kt"); } @TestMetadata("doWhileWithMiddleBreak.kt") public void testDoWhileWithMiddleBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.kt"); } @TestMetadata("forEach.kt") public void testForEach() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt"); } @TestMetadata("forEachWithBreak.kt") public void testForEachWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt"); } @TestMetadata("forEachWithContinue.kt") public void testForEachWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt"); } @TestMetadata("ifVarNotNull.kt") public void testIfVarNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNull.kt"); } @TestMetadata("ifVarNotNullAnd.kt") public void testIfVarNotNullAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNullAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNullAnd.kt"); } @TestMetadata("ifVarNullElse.kt") public void testIfVarNullElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullElse.kt"); } @TestMetadata("ifVarNullReturn.kt") public void testIfVarNullReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullReturn.kt"); } @TestMetadata("inference.kt") public void testInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/inference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/inference.kt"); } @TestMetadata("infiniteWhileWithBreak.kt") public void testInfiniteWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infix.kt"); } @TestMetadata("initInTryReturnInCatch.kt") public void testInitInTryReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt"); } @TestMetadata("initialization.kt") public void testInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt"); } @TestMetadata("iterations.kt") public void testIterations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/iterations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/iterations.kt"); } @TestMetadata("nestedDoWhile.kt") public void testNestedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedDoWhile.kt"); } @TestMetadata("nestedLoops.kt") public void testNestedLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedLoops.kt"); } @TestMetadata("nestedWhile.kt") public void testNestedWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedWhile.kt"); } @TestMetadata("plusplusMinusminus.kt") public void testPlusplusMinusminus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt"); } @TestMetadata("postfixNotnullClassIncrement.kt") public void testPostfixNotnullClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt"); } @TestMetadata("postfixNullableClassIncrement.kt") public void testPostfixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableClassIncrement.kt"); } @TestMetadata("postfixNullableIncrement.kt") public void testPostfixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableIncrement.kt"); } @TestMetadata("prefixNotnullClassIncrement.kt") public void testPrefixNotnullClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt"); } @TestMetadata("prefixNullableClassIncrement.kt") public void testPrefixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.kt"); } @TestMetadata("prefixNullableIncrement.kt") public void testPrefixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableIncrement.kt"); } @TestMetadata("setNotNullInTry.kt") public void testSetNotNullInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.kt"); } @TestMetadata("setNullInTry.kt") public void testSetNullInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTry.kt"); } @TestMetadata("setNullInTryFinally.kt") public void testSetNullInTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); } @TestMetadata("setNullInTryUnsound.kt") public void testSetNullInTryUnsound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); } @TestMetadata("setSameInTry.kt") public void testSetSameInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setSameInTry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setSameInTry.kt"); } @TestMetadata("toFlexibleType.kt") public void testToFlexibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/toFlexibleType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/toFlexibleType.kt"); } @TestMetadata("unnecessary.kt") public void testUnnecessary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessary.kt"); } @TestMetadata("unnecessaryWithBranch.kt") public void testUnnecessaryWithBranch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithBranch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithBranch.kt"); } @TestMetadata("unnecessaryWithMap.kt") public void testUnnecessaryWithMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt"); } @TestMetadata("varCapturedInClosure.kt") public void testVarCapturedInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInClosure.kt"); } @TestMetadata("varCapturedInInlineClosure.kt") public void testVarCapturedInInlineClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt"); } @TestMetadata("varCapturedInSafeClosure.kt") public void testVarCapturedInSafeClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInSafeClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInSafeClosure.kt"); } @TestMetadata("varChangedInLoop.kt") public void testVarChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varChangedInLoop.kt"); } @TestMetadata("varCheck.kt") public void testVarCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCheck.kt"); } @TestMetadata("varIntNull.kt") public void testVarIntNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt"); } @TestMetadata("varNotChangedInLoop.kt") public void testVarNotChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNotChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNotChangedInLoop.kt"); } @TestMetadata("varNull.kt") public void testVarNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt"); } @TestMetadata("whileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.kt"); } @TestMetadata("whileTrueWithBracketSet.kt") public void testWhileTrueWithBracketSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.kt"); } @TestMetadata("whileTrueWithBrackets.kt") public void testWhileTrueWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.kt"); } @TestMetadata("whileWithBreak.kt") public void testWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.kt"); } } } @@ -22792,130 +20120,119 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceCompatibility extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunctionAlways.kt") public void testInlineFunctionAlways() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); } @TestMetadata("noCallableReferencesWithEmptyLHS.kt") public void testNoCallableReferencesWithEmptyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); } @TestMetadata("noDataClassInheritance.kt") public void testNoDataClassInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); } @TestMetadata("noInlineProperty.kt") public void testNoInlineProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); } @TestMetadata("noLocalDelegatedProperty.kt") public void testNoLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); } @TestMetadata("noLocalDelegatedPropertyInScript.kt") public void testNoLocalDelegatedPropertyInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kt"); } @TestMetadata("noMultiplatformProjects.kt") public void testNoMultiplatformProjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.kt"); } @TestMetadata("noTopLevelSealedInheritance.kt") public void testNoTopLevelSealedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ApiVersion extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInApiVersion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/annotations.kt"); } @TestMetadata("classesAndConstructors.kt") public void testClassesAndConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/classesAndConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/classesAndConstructors.kt"); } @TestMetadata("overriddenMembers.kt") public void testOverriddenMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/overriddenMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/overriddenMembers.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/propertyAccessors.kt"); } @TestMetadata("simpleMembers.kt") public void testSimpleMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/simpleMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/simpleMembers.kt"); } @TestMetadata("sinceOldVersionIsOK.kt") public void testSinceOldVersionIsOK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/sinceOldVersionIsOK.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/sinceOldVersionIsOK.kt"); } @TestMetadata("typealiasesAsCompanionObjects.kt") public void testTypealiasesAsCompanionObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt"); } @TestMetadata("typealiasesAsConstructors.kt") public void testTypealiasesAsConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsConstructors.kt"); } @TestMetadata("typealiasesAsObjects.kt") public void testTypealiasesAsObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsObjects.kt"); } @TestMetadata("typealiasesAsTypes.kt") public void testTypealiasesAsTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsTypes.kt"); } @TestMetadata("typealiasesOnImport.kt") public void testTypealiasesOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); } } @@ -22923,32 +20240,32 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoBoundCallableReferences extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundCallableReference.kt") public void testBoundCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); } @TestMetadata("boundClassLiteral.kt") public void testBoundClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); } @TestMetadata("qualifiedJavaClassLiteralInKClassExtension.kt") public void testQualifiedJavaClassLiteralInKClassExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); } @TestMetadata("qualifiedJavaClassReferenceInKClassExtension.kt") public void testQualifiedJavaClassReferenceInKClassExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); } } } @@ -22957,38 +20274,37 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Substitutions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubstitutions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/substitutions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt1558-short.kt") public void testKt1558_short() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/kt1558-short.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/kt1558-short.kt"); } @TestMetadata("kt4887.kt") public void testKt4887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/kt4887.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/kt4887.kt"); } @TestMetadata("starProjections.kt") public void testStarProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/starProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/starProjections.kt"); } @TestMetadata("upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt") public void testUpperBoundsSubstitutionForOverloadResolutionWithAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt"); } @TestMetadata("upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt") public void testUpperBoundsSubstitutionForOverloadResolutionWithErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt"); } } @@ -22996,110 +20312,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Subtyping extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubtyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/subtyping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extFunctionTypeAsSuperType.kt") public void testExtFunctionTypeAsSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/extFunctionTypeAsSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/extFunctionTypeAsSuperType.kt"); } @TestMetadata("findClosestCorrespondingSupertype.kt") public void testFindClosestCorrespondingSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt"); } @TestMetadata("functionTypeAsSuperType.kt") public void testFunctionTypeAsSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/functionTypeAsSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/functionTypeAsSuperType.kt"); } @TestMetadata("invariantArgumentForTypeParameterWithMultipleBounds.kt") public void testInvariantArgumentForTypeParameterWithMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/invariantArgumentForTypeParameterWithMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/invariantArgumentForTypeParameterWithMultipleBounds.kt"); } @TestMetadata("javaAndKotlinSuperType.kt") public void testJavaAndKotlinSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt"); } @TestMetadata("kt2069.kt") public void testKt2069() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt2069.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt2069.kt"); } @TestMetadata("kt2744.kt") public void testKt2744() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt2744.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt2744.kt"); } @TestMetadata("kt304.kt") public void testKt304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt304.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt304.kt"); } @TestMetadata("kt3159.kt") public void testKt3159() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt3159.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt3159.kt"); } @TestMetadata("kt-1457.kt") public void testKt_1457() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt-1457.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt-1457.kt"); } @TestMetadata("localAnonymousObjects.kt") public void testLocalAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/localAnonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/localAnonymousObjects.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/localClasses.kt"); } @TestMetadata("memberAnonymousObjects.kt") public void testMemberAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/memberAnonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/memberAnonymousObjects.kt"); } @TestMetadata("nestedIntoLocalClasses.kt") public void testNestedIntoLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt"); } @TestMetadata("nestedLocalClasses.kt") public void testNestedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt"); } @TestMetadata("topLevelAnonymousObjects.kt") public void testTopLevelAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/topLevelAnonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/topLevelAnonymousObjects.kt"); } @TestMetadata("unresolvedSupertype.kt") public void testUnresolvedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/unresolvedSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/unresolvedSupertype.kt"); } } @@ -23107,6 +20410,10 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuppress() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -23115,68 +20422,62 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AllWarnings extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAllWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/allWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("suppressWarningsOnAnonymousObjectInVariable.kt") public void testSuppressWarningsOnAnonymousObjectInVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnAnonymousObjectInVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnAnonymousObjectInVariable.kt"); } @TestMetadata("suppressWarningsOnClass.kt") public void testSuppressWarningsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClass.kt"); } @TestMetadata("suppressWarningsOnClassObject.kt") public void testSuppressWarningsOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt"); } @TestMetadata("suppressWarningsOnExpression.kt") public void testSuppressWarningsOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnExpression.kt"); } @TestMetadata("suppressWarningsOnFile.kt") public void testSuppressWarningsOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFile.kt"); } @TestMetadata("suppressWarningsOnFunction.kt") public void testSuppressWarningsOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFunction.kt"); } @TestMetadata("suppressWarningsOnObject.kt") public void testSuppressWarningsOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnObject.kt"); } @TestMetadata("suppressWarningsOnParameter.kt") public void testSuppressWarningsOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnParameter.kt"); } @TestMetadata("suppressWarningsOnProperty.kt") public void testSuppressWarningsOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnProperty.kt"); } @TestMetadata("suppressWarningsOnPropertyAccessor.kt") public void testSuppressWarningsOnPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnPropertyAccessor.kt"); } } @@ -23184,62 +20485,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ManyWarnings extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInManyWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/manyWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/mixed.kt"); } @TestMetadata("onClass.kt") public void testOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClass.kt"); } @TestMetadata("onClassObject.kt") public void testOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt"); } @TestMetadata("onExpression.kt") public void testOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onExpression.kt"); } @TestMetadata("onFunction.kt") public void testOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onFunction.kt"); } @TestMetadata("onObject.kt") public void testOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onObject.kt"); } @TestMetadata("onParameter.kt") public void testOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onParameter.kt"); } @TestMetadata("onProperty.kt") public void testOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onProperty.kt"); } @TestMetadata("onPropertyAccessor.kt") public void testOnPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onPropertyAccessor.kt"); } } @@ -23247,74 +20543,67 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OneWarning extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOneWarning() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/oneWarning"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("onBlockStatement.kt") public void testOnBlockStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatement.kt"); } @TestMetadata("onBlockStatementSameLine.kt") public void testOnBlockStatementSameLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatementSameLine.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatementSameLine.kt"); } @TestMetadata("onClass.kt") public void testOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onClass.kt"); } @TestMetadata("onClassObject.kt") public void testOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt"); } @TestMetadata("onExpression.kt") public void testOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onExpression.kt"); } @TestMetadata("onFunction.kt") public void testOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onFunction.kt"); } @TestMetadata("onLocalVariable.kt") public void testOnLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onLocalVariable.kt"); } @TestMetadata("onObject.kt") public void testOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onObject.kt"); } @TestMetadata("onParameter.kt") public void testOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onParameter.kt"); } @TestMetadata("onProperty.kt") public void testOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onProperty.kt"); } @TestMetadata("onPropertyAccessor.kt") public void testOnPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onPropertyAccessor.kt"); } } } @@ -23323,6 +20612,10 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticExtensions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -23331,10 +20624,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaProperties extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbbreviationName.kt") public void testAbbreviationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/AbbreviationName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/AbbreviationName.kt"); } public void testAllFilesPresentInJavaProperties() throws Exception { @@ -23343,170 +20639,142 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("Bases.kt") public void testBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Bases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Bases.kt"); } @TestMetadata("CompiledClass.kt") public void testCompiledClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/CompiledClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/CompiledClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.kt"); } @TestMetadata("FalseGetters.kt") public void testFalseGetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseGetters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseGetters.kt"); } @TestMetadata("FalseSetters.kt") public void testFalseSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseSetters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseSetters.kt"); } @TestMetadata("FromTwoBases.kt") public void testFromTwoBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FromTwoBases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FromTwoBases.kt"); } @TestMetadata("GenericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GenericClass.kt"); } @TestMetadata("GetA.kt") public void testGetA() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Getter.kt"); } @TestMetadata("GetterAndSetter.kt") public void testGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetterAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetterAndSetter.kt"); } @TestMetadata("ImplicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/ImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/ImplicitReceiver.kt"); } @TestMetadata("IsNaming.kt") public void testIsNaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/IsNaming.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/IsNaming.kt"); } @TestMetadata("JavaOverridesKotlin.kt") public void testJavaOverridesKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/JavaOverridesKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/JavaOverridesKotlin.kt"); } @TestMetadata("KotlinOverridesJava.kt") public void testKotlinOverridesJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.kt"); } @TestMetadata("KotlinOverridesJava2.kt") public void testKotlinOverridesJava2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava2.kt"); } @TestMetadata("KotlinOverridesJava3.kt") public void testKotlinOverridesJava3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava3.kt"); } @TestMetadata("KotlinOverridesJava4.kt") public void testKotlinOverridesJava4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava4.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava4.kt"); } @TestMetadata("KotlinOverridesJava5.kt") public void testKotlinOverridesJava5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava5.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava5.kt"); } @TestMetadata("OnlyAscii.kt") public void testOnlyAscii() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyAscii.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyAscii.kt"); } @TestMetadata("OnlyPublic.kt") public void testOnlyPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.kt"); } @TestMetadata("OverrideGetterOnly.kt") public void testOverrideGetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OverrideGetterOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OverrideGetterOnly.kt"); } @TestMetadata("SetterHasHigherAccess.kt") public void testSetterHasHigherAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.kt"); } @TestMetadata("SetterOnly.kt") public void testSetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterOnly.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCast.kt"); } @TestMetadata("SmartCastImplicitReceiver.kt") public void testSmartCastImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCastImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCastImplicitReceiver.kt"); } @TestMetadata("SyntheticJavaPropertyReference.kt") public void testSyntheticJavaPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SyntheticJavaPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SyntheticJavaPropertyReference.kt"); } @TestMetadata("TypeAnnotation.kt") public void testTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeAnnotation.kt"); } @TestMetadata("TypeParameterReceiver.kt") public void testTypeParameterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeParameterReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeParameterReceiver.kt"); } } @@ -23514,110 +20782,97 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamAdapters extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Deprecated.kt"); } @TestMetadata("GenericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt"); } @TestMetadata("GenericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt"); } @TestMetadata("GenericMethodInGenericClass.kt") public void testGenericMethodInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt"); } @TestMetadata("InnerClassInGeneric.kt") public void testInnerClassInGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt"); } @TestMetadata("NoNamedArgsAllowed.kt") public void testNoNamedArgsAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt"); } @TestMetadata("overloadResolution.kt") public void testOverloadResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolution.kt"); } @TestMetadata("overloadResolutionStatic.kt") public void testOverloadResolutionStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); } @TestMetadata("overloadResolutionStaticWithoutRefinedSams.kt") public void testOverloadResolutionStaticWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); } @TestMetadata("overloadResolutionWithoutRefinedSams.kt") public void testOverloadResolutionWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); } @TestMetadata("PackageLocal.kt") public void testPackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.kt"); } @TestMetadata("ParameterTypeAnnotation.kt") public void testParameterTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt"); } @TestMetadata("PassNull.kt") public void testPassNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PassNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PassNull.kt"); } @TestMetadata("Private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.kt"); } @TestMetadata("Protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.kt"); } @TestMetadata("ReturnTypeAnnotation.kt") public void testReturnTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ReturnTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ReturnTypeAnnotation.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.kt"); } } } @@ -23626,94 +20881,89 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TargetedBuiltIns extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("concurrentMapRemove.kt") public void testConcurrentMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt"); } @TestMetadata("forEachRemainingNullability.kt") public void testForEachRemainingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt"); } @TestMetadata("getOrDefault.kt") public void testGetOrDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.kt"); } @TestMetadata("mutableMapRemove.kt") public void testMutableMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt"); } @TestMetadata("removeIf.kt") public void testRemoveIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/removeIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/removeIf.kt"); } @TestMetadata("stream.kt") public void testStream() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BackwardCompatibility extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBackwardCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/basic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/basic.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/delegation.kt"); } @TestMetadata("derivedInterfaces.kt") public void testDerivedInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfaces.kt"); } @TestMetadata("derivedInterfacesWithKotlinFun.kt") public void testDerivedInterfacesWithKotlinFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfacesWithKotlinFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfacesWithKotlinFun.kt"); } @TestMetadata("fillInStackTrace.kt") public void testFillInStackTrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/fillInStackTrace.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/fillInStackTrace.kt"); } @TestMetadata("finalize.kt") public void testFinalize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt"); } @TestMetadata("hashMapGetOrDefault.kt") public void testHashMapGetOrDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.kt"); } } } @@ -23722,184 +20972,164 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThisAndSuper extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThisAndSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambigousLabelOnThis.kt") public void testAmbigousLabelOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/ambigousLabelOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/ambigousLabelOnThis.kt"); } @TestMetadata("genericQualifiedSuperOverridden.kt") public void testGenericQualifiedSuperOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/genericQualifiedSuperOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/genericQualifiedSuperOverridden.kt"); } @TestMetadata("notAccessibleSuperInTrait.kt") public void testNotAccessibleSuperInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt"); } @TestMetadata("qualifiedSuperOverridden.kt") public void testQualifiedSuperOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/qualifiedSuperOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/qualifiedSuperOverridden.kt"); } @TestMetadata("QualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/QualifiedThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/QualifiedThis.kt"); } @TestMetadata("Super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/Super.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/Super.kt"); } @TestMetadata("superInExtensionFunction.kt") public void testSuperInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt"); } @TestMetadata("superInExtensionFunctionCall.kt") public void testSuperInExtensionFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunctionCall.kt"); } @TestMetadata("superInToplevelFunction.kt") public void testSuperInToplevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt"); } @TestMetadata("superIsNotAnExpression.kt") public void testSuperIsNotAnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superIsNotAnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superIsNotAnExpression.kt"); } @TestMetadata("thisInFunctionLiterals.kt") public void testThisInFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt"); } @TestMetadata("thisInInnerClasses.kt") public void testThisInInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInInnerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInInnerClasses.kt"); } @TestMetadata("thisInPropertyInitializer.kt") public void testThisInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt"); } @TestMetadata("thisInToplevelFunction.kt") public void testThisInToplevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInToplevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInToplevelFunction.kt"); } @TestMetadata("traitSuperCall.kt") public void testTraitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnqualifiedSuper extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnqualifiedSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousSuperWithGenerics.kt") public void testAmbiguousSuperWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt"); } @TestMetadata("unqualifiedSuper.kt") public void testUnqualifiedSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt"); } @TestMetadata("unqualifiedSuperWithAbstractMembers.kt") public void testUnqualifiedSuperWithAbstractMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt"); } @TestMetadata("unqualifiedSuperWithCallableProperty.kt") public void testUnqualifiedSuperWithCallableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt"); } @TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt") public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithDeeperHierarchies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithDeeperHierarchies.kt"); } @TestMetadata("unqualifiedSuperWithGenerics.kt") public void testUnqualifiedSuperWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithGenerics.kt"); } @TestMetadata("unqualifiedSuperWithInnerClass.kt") public void testUnqualifiedSuperWithInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInnerClass.kt"); } @TestMetadata("unqualifiedSuperWithInterfaces.kt") public void testUnqualifiedSuperWithInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt"); } @TestMetadata("unqualifiedSuperWithLocalClass.kt") public void testUnqualifiedSuperWithLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithLocalClass.kt"); } @TestMetadata("unqualifiedSuperWithUnresolvedBase.kt") public void testUnqualifiedSuperWithUnresolvedBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt"); } @TestMetadata("withMethodOfAnyOverridenInInterface.kt") public void testWithMethodOfAnyOverridenInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOfAnyOverridenInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOfAnyOverridenInInterface.kt"); } @TestMetadata("withMethodOverriddenInAnotherSupertype.kt") public void testWithMethodOverriddenInAnotherSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOverriddenInAnotherSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOverriddenInAnotherSupertype.kt"); } @TestMetadata("withMethodsOfAny.kt") public void testWithMethodsOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodsOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodsOfAny.kt"); } } } @@ -23908,20 +21138,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TraitWithRequired extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTraitWithRequired() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/traitWithRequired"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("traitRequiresAny.kt") public void testTraitRequiresAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt"); } @TestMetadata("traitSupertypeList.kt") public void testTraitSupertypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt"); } } @@ -23929,62 +21161,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotHaveManyClassUpperBounds.kt") public void testCannotHaveManyClassUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/cannotHaveManyClassUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/cannotHaveManyClassUpperBounds.kt"); } @TestMetadata("deprecatedSyntax.kt") public void testDeprecatedSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/deprecatedSyntax.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/deprecatedSyntax.kt"); } @TestMetadata("extFunctionTypeAsUpperBound.kt") public void testExtFunctionTypeAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/extFunctionTypeAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/extFunctionTypeAsUpperBound.kt"); } @TestMetadata("functionTypeAsUpperBound.kt") public void testFunctionTypeAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/functionTypeAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/functionTypeAsUpperBound.kt"); } @TestMetadata("misplacedConstraints.kt") public void testMisplacedConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt"); } @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParameters.kt"); } @TestMetadata("propertyTypeParametersWithUpperBounds.kt") public void testPropertyTypeParametersWithUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParametersWithUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParametersWithUpperBounds.kt"); } @TestMetadata("repeatedBound.kt") public void testRepeatedBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/repeatedBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/repeatedBound.kt"); } @TestMetadata("upperBoundCannotBeArray.kt") public void testUpperBoundCannotBeArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/upperBoundCannotBeArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/upperBoundCannotBeArray.kt"); } } @@ -23992,10 +21219,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("aliasesOnly.kt") public void testAliasesOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/aliasesOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/aliasesOnly.kt"); } public void testAllFilesPresentInTypealias() throws Exception { @@ -24004,554 +21234,462 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/annotationsOnTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/annotationsOnTypeAliases.kt"); } @TestMetadata("boundViolationInTypeAliasConstructor.kt") public void testBoundViolationInTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt"); } @TestMetadata("boundsViolationInDeepTypeAliasExpansion.kt") public void testBoundsViolationInDeepTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt"); } @TestMetadata("boundsViolationInTypeAliasExpansion.kt") public void testBoundsViolationInTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt"); } @TestMetadata("boundsViolationInTypeAliasRHS.kt") public void testBoundsViolationInTypeAliasRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasRHS.kt"); } @TestMetadata("capturingTypeParametersFromOuterClass.kt") public void testCapturingTypeParametersFromOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/capturingTypeParametersFromOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/capturingTypeParametersFromOuterClass.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/classReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/classReference.kt"); } @TestMetadata("conflictingProjections.kt") public void testConflictingProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/conflictingProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/conflictingProjections.kt"); } @TestMetadata("constructorCallThroughPrivateAlias.kt") public void testConstructorCallThroughPrivateAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/constructorCallThroughPrivateAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/constructorCallThroughPrivateAlias.kt"); } @TestMetadata("cyclicInheritanceViaTypeAlias.kt") public void testCyclicInheritanceViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/cyclicInheritanceViaTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/cyclicInheritanceViaTypeAlias.kt"); } @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/enumEntryQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/enumEntryQualifier.kt"); } @TestMetadata("exposedExpandedType.kt") public void testExposedExpandedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/exposedExpandedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/exposedExpandedType.kt"); } @TestMetadata("functionTypeInTypeAlias.kt") public void testFunctionTypeInTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/functionTypeInTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/functionTypeInTypeAlias.kt"); } @TestMetadata("genericTypeAliasConstructor.kt") public void testGenericTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/genericTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/genericTypeAliasConstructor.kt"); } @TestMetadata("genericTypeAliasObject.kt") public void testGenericTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/genericTypeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/genericTypeAliasObject.kt"); } @TestMetadata("illegalTypeInTypeAliasExpansion.kt") public void testIllegalTypeInTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/illegalTypeInTypeAliasExpansion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/illegalTypeInTypeAliasExpansion.kt"); } @TestMetadata("import.kt") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/import.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/import.kt"); } @TestMetadata("importFromTypeAliasObject.kt") public void testImportFromTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/importFromTypeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/importFromTypeAliasObject.kt"); } @TestMetadata("inGenerics.kt") public void testInGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inGenerics.kt"); } @TestMetadata("inSupertypesList.kt") public void testInSupertypesList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt"); } @TestMetadata("inheritedNestedTypeAlias.kt") public void testInheritedNestedTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inheritedNestedTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inheritedNestedTypeAlias.kt"); } @TestMetadata("inhreritedTypeAliasQualifiedByDerivedClass.kt") public void testInhreritedTypeAliasQualifiedByDerivedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inhreritedTypeAliasQualifiedByDerivedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inhreritedTypeAliasQualifiedByDerivedClass.kt"); } @TestMetadata("innerClassTypeAliasConstructor.kt") public void testInnerClassTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt"); } @TestMetadata("innerClassTypeAliasConstructorInSupertypes.kt") public void testInnerClassTypeAliasConstructorInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } @TestMetadata("innerTypeAliasAsType.kt") public void testInnerTypeAliasAsType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType.kt"); } @TestMetadata("innerTypeAliasAsType2.kt") public void testInnerTypeAliasAsType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType2.kt"); } @TestMetadata("innerTypeAliasConstructor.kt") public void testInnerTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt"); } @TestMetadata("isAsWithTypeAlias.kt") public void testIsAsWithTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/isAsWithTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/isAsWithTypeAlias.kt"); } @TestMetadata("javaStaticMembersViaTypeAlias.kt") public void testJavaStaticMembersViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/javaStaticMembersViaTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/javaStaticMembersViaTypeAlias.kt"); } @TestMetadata("kt14498.kt") public void testKt14498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14498.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14498.kt"); } @TestMetadata("kt14498a.kt") public void testKt14498a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14498a.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14498a.kt"); } @TestMetadata("kt14518.kt") public void testKt14518() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14518.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14518.kt"); } @TestMetadata("kt14641.kt") public void testKt14641() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14641.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14641.kt"); } @TestMetadata("kt15734.kt") public void testKt15734() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt15734.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt15734.kt"); } @TestMetadata("kt19601.kt") public void testKt19601() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt19601.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt19601.kt"); } @TestMetadata("localTypeAlias.kt") public void testLocalTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAlias.kt"); } @TestMetadata("localTypeAliasConstructor.kt") public void testLocalTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAliasConstructor.kt"); } @TestMetadata("localTypeAliasModifiers.kt") public void testLocalTypeAliasModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAliasModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAliasModifiers.kt"); } @TestMetadata("localTypeAliasRecursive.kt") public void testLocalTypeAliasRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAliasRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAliasRecursive.kt"); } @TestMetadata("methodReference.kt") public void testMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/methodReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/methodReference.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/nested.kt"); } @TestMetadata("nestedCapturingTypeParameters.kt") public void testNestedCapturingTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.kt"); } @TestMetadata("nestedSubstituted.kt") public void testNestedSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/nestedSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/nestedSubstituted.kt"); } @TestMetadata("noApproximationInTypeAliasArgumentSubstitution.kt") public void testNoApproximationInTypeAliasArgumentSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt"); } @TestMetadata("noRHS.kt") public void testNoRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/noRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/noRHS.kt"); } @TestMetadata("parameterRestrictions.kt") public void testParameterRestrictions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/parameterRestrictions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/parameterRestrictions.kt"); } @TestMetadata("parameterSubstitution.kt") public void testParameterSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/parameterSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/parameterSubstitution.kt"); } @TestMetadata("privateInFile.kt") public void testPrivateInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/projectionsInTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/projectionsInTypeAliasConstructor.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/recursive.kt"); } @TestMetadata("returnTypeNothingShouldBeSpecifiedExplicitly.kt") public void testReturnTypeNothingShouldBeSpecifiedExplicitly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/returnTypeNothingShouldBeSpecifiedExplicitly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/returnTypeNothingShouldBeSpecifiedExplicitly.kt"); } @TestMetadata("simpleTypeAlias.kt") public void testSimpleTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/simpleTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/simpleTypeAlias.kt"); } @TestMetadata("starProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/starProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/starProjection.kt"); } @TestMetadata("starProjectionInTypeAliasArgument.kt") public void testStarProjectionInTypeAliasArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/starProjectionInTypeAliasArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/starProjectionInTypeAliasArgument.kt"); } @TestMetadata("substitutionVariance.kt") public void testSubstitutionVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/substitutionVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/substitutionVariance.kt"); } @TestMetadata("throwJLException.kt") public void testThrowJLException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/throwJLException.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/throwJLException.kt"); } @TestMetadata("topLevelTypeAliasesOnly.kt") public void testTopLevelTypeAliasesOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/topLevelTypeAliasesOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/topLevelTypeAliasesOnly.kt"); } @TestMetadata("typeAliasArgumentsInCompanionObject.kt") public void testTypeAliasArgumentsInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInCompanionObject.kt"); } @TestMetadata("typeAliasArgumentsInConstructor.kt") public void testTypeAliasArgumentsInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInConstructor.kt"); } @TestMetadata("typeAliasAsBareType.kt") public void testTypeAliasAsBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasAsBareType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasAsBareType.kt"); } @TestMetadata("typeAliasAsQualifier.kt") public void testTypeAliasAsQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt"); } @TestMetadata("typeAliasAsSuperQualifier.kt") public void testTypeAliasAsSuperQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt"); } @TestMetadata("typeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.kt"); } @TestMetadata("typeAliasConstructorCrazyProjections.kt") public void testTypeAliasConstructorCrazyProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt"); } @TestMetadata("typeAliasConstructorForInterface.kt") public void testTypeAliasConstructorForInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForInterface.kt"); } @TestMetadata("typeAliasConstructorForProjection.kt") public void testTypeAliasConstructorForProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt"); } @TestMetadata("typeAliasConstructorForProjectionInSupertypes.kt") public void testTypeAliasConstructorForProjectionInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt"); } @TestMetadata("typeAliasConstructorInSuperCall.kt") public void testTypeAliasConstructorInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInSuperCall.kt"); } @TestMetadata("typeAliasConstructorInferenceInSupertypesList.kt") public void testTypeAliasConstructorInferenceInSupertypesList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInferenceInSupertypesList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInferenceInSupertypesList.kt"); } @TestMetadata("typeAliasConstructorReturnType.kt") public void testTypeAliasConstructorReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInference.kt") public void testTypeAliasConstructorTypeArgumentsInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt") public void testTypeAliasConstructorTypeArgumentsInferenceWithNestedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt") public void testTypeAliasConstructorTypeArgumentsInferenceWithNestedCalls2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt") public void testTypeAliasConstructorTypeArgumentsInferenceWithPhantomTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt"); } @TestMetadata("typeAliasConstructorVsFunction.kt") public void testTypeAliasConstructorVsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorVsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorVsFunction.kt"); } @TestMetadata("typeAliasConstructorWrongClass.kt") public void testTypeAliasConstructorWrongClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt"); } @TestMetadata("typeAliasConstructorWrongVisibility.kt") public void testTypeAliasConstructorWrongVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt"); } @TestMetadata("typeAliasExpansionRepeatedAnnotations.kt") public void testTypeAliasExpansionRepeatedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasExpansionRepeatedAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasExpansionRepeatedAnnotations.kt"); } @TestMetadata("typeAliasForProjectionInSuperInterfaces.kt") public void testTypeAliasForProjectionInSuperInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasForProjectionInSuperInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasForProjectionInSuperInterfaces.kt"); } @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasInAnonymousObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasInAnonymousObjectType.kt"); } @TestMetadata("typeAliasInvisibleObject.kt") public void testTypeAliasInvisibleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasInvisibleObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasInvisibleObject.kt"); } @TestMetadata("typeAliasNotNull.kt") public void testTypeAliasNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasNotNull.kt"); } @TestMetadata("typeAliasObject.kt") public void testTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasObject.kt"); } @TestMetadata("typeAliasObjectWithInvoke.kt") public void testTypeAliasObjectWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.kt"); } @TestMetadata("typeAliasShouldExpandToClass.kt") public void testTypeAliasShouldExpandToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasShouldExpandToClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasShouldExpandToClass.kt"); } @TestMetadata("typealiasRhsAnnotations.kt") public void testTypealiasRhsAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotations.kt"); } @TestMetadata("typealiasRhsAnnotationsInArguments.kt") public void testTypealiasRhsAnnotationsInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotationsInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotationsInArguments.kt"); } @TestMetadata("typealiasRhsRepeatedAnnotationInArguments.kt") public void testTypealiasRhsRepeatedAnnotationInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotationInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotationInArguments.kt"); } @TestMetadata("typealiasRhsRepeatedAnnotations.kt") public void testTypealiasRhsRepeatedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); } @TestMetadata("unsupportedTypeAlias.kt") public void testUnsupportedTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); } @TestMetadata("unusedTypeAliasParameter.kt") public void testUnusedTypeAliasParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/unusedTypeAliasParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/unusedTypeAliasParameter.kt"); } @TestMetadata("wrongNumberOfArgumentsInTypeAliasConstructor.kt") public void testWrongNumberOfArgumentsInTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt"); } } @@ -24559,20 +21697,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnderscoresInNumericLiterals extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnderscoresInNumericLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("illegalUnderscores.kt") public void testIllegalUnderscores() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); } @TestMetadata("noUnderscores.kt") public void testNoUnderscores() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); } } @@ -24580,14 +21720,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unit extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/unit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nullableUnit.kt") public void testNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/unit/nullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/unit/nullableUnit.kt"); } } @@ -24595,158 +21738,137 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousVararg.kt") public void testAmbiguousVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/AmbiguousVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/AmbiguousVararg.kt"); } @TestMetadata("assignNonConstSingleArrayElementAsVarargInAnnotation.kt") public void testAssignNonConstSingleArrayElementAsVarargInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt"); } @TestMetadata("assignNonConstSingleArrayElementAsVarargInAnnotationError.kt") public void testAssignNonConstSingleArrayElementAsVarargInAnnotationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt"); } @TestMetadata("assigningArraysToVarargsInAnnotations.kt") public void testAssigningArraysToVarargsInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt"); } @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation.kt") public void testAssigningSingleElementsInNamedFormAnnDeprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt"); } @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation.kt") public void testAssigningSingleElementsInNamedFormFunDeprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt"); } @TestMetadata("kt1781.kt") public void testKt1781() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1781.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1781.kt"); } @TestMetadata("kt1835.kt") public void testKt1835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1835.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1835.kt"); } @TestMetadata("kt1838-param.kt") public void testKt1838_param() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1838-param.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1838-param.kt"); } @TestMetadata("kt1838-val.kt") public void testKt1838_val() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1838-val.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1838-val.kt"); } @TestMetadata("kt2163.kt") public void testKt2163() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt2163.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt2163.kt"); } @TestMetadata("kt422.kt") public void testKt422() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt422.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt422.kt"); } @TestMetadata("MoreSpecificVarargsOfEqualLength.kt") public void testMoreSpecificVarargsOfEqualLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/MoreSpecificVarargsOfEqualLength.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/MoreSpecificVarargsOfEqualLength.kt"); } @TestMetadata("MostSepcificVarargsWithJava.kt") public void testMostSepcificVarargsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/MostSepcificVarargsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/MostSepcificVarargsWithJava.kt"); } @TestMetadata("NilaryVsVararg.kt") public void testNilaryVsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); } @TestMetadata("noAssigningArraysToVarargsFeature.kt") public void testNoAssigningArraysToVarargsFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); } @TestMetadata("NullableTypeForVarargArgument.kt") public void testNullableTypeForVarargArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt"); } @TestMetadata("UnaryVsVararg.kt") public void testUnaryVsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/UnaryVsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/UnaryVsVararg.kt"); } @TestMetadata("varargInSetter.kt") public void testVarargInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargInSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargInSetter.kt"); } @TestMetadata("varargIterator.kt") public void testVarargIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargIterator.kt"); } @TestMetadata("varargOfNothing.kt") public void testVarargOfNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargOfNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargOfNothing.kt"); } @TestMetadata("varargsAndFunctionLiterals.kt") public void testVarargsAndFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndFunctionLiterals.kt"); } @TestMetadata("varargsAndOut1.kt") public void testVarargsAndOut1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndOut1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndOut1.kt"); } @TestMetadata("varargsAndOut2.kt") public void testVarargsAndOut2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndOut2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndOut2.kt"); } @TestMetadata("varargsAndPair.kt") public void testVarargsAndPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndPair.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndPair.kt"); } } @@ -24754,90 +21876,85 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variance extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/variance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/Class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/Class.kt"); } @TestMetadata("ea1337846.kt") public void testEa1337846() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/ea1337846.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/ea1337846.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/Function.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/Function.kt"); } @TestMetadata("FunctionTypes.kt") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/FunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/FunctionTypes.kt"); } @TestMetadata("InPosition.kt") public void testInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/InPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/InPosition.kt"); } @TestMetadata("InvariantPosition.kt") public void testInvariantPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/InvariantPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/InvariantPosition.kt"); } @TestMetadata("NullableTypes.kt") public void testNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/NullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/NullableTypes.kt"); } @TestMetadata("OutPosition.kt") public void testOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/OutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/OutPosition.kt"); } @TestMetadata("PrimaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt"); } @TestMetadata("ValProperty.kt") public void testValProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/ValProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/ValProperty.kt"); } @TestMetadata("VarProperty.kt") public void testVarProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/VarProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/VarProperty.kt"); } @TestMetadata("Visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/Visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/Visibility.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/variance/privateToThis") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateToThis extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/Abstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/Abstract.kt"); } public void testAllFilesPresentInPrivateToThis() throws Exception { @@ -24846,26 +21963,22 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("FunctionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt"); } @TestMetadata("GetVal.kt") public void testGetVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt"); } @TestMetadata("SetVar.kt") public void testSetVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt"); } @TestMetadata("ValReassigned.kt") public void testValReassigned() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/ValReassigned.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/ValReassigned.kt"); } } } @@ -24874,386 +21987,327 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedWhenStatement.kt") public void testAnnotatedWhenStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.kt"); } @TestMetadata("BranchBypassVal.kt") public void testBranchBypassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchBypassVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchBypassVal.kt"); } @TestMetadata("BranchBypassVar.kt") public void testBranchBypassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchBypassVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchBypassVar.kt"); } @TestMetadata("BranchFalseBypass.kt") public void testBranchFalseBypass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchFalseBypass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchFalseBypass.kt"); } @TestMetadata("BranchFalseBypassElse.kt") public void testBranchFalseBypassElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchFalseBypassElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchFalseBypassElse.kt"); } @TestMetadata("CommaInWhenConditionWithoutArgument.kt") public void testCommaInWhenConditionWithoutArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/CommaInWhenConditionWithoutArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/CommaInWhenConditionWithoutArgument.kt"); } @TestMetadata("DuplicatedLabels.kt") public void testDuplicatedLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/DuplicatedLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/DuplicatedLabels.kt"); } @TestMetadata("ElseOnNullableEnum.kt") public void testElseOnNullableEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ElseOnNullableEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ElseOnNullableEnum.kt"); } @TestMetadata("ElseOnNullableEnumWithSmartCast.kt") public void testElseOnNullableEnumWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ElseOnNullableEnumWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ElseOnNullableEnumWithSmartCast.kt"); } @TestMetadata("EmptyConditionWithExpression.kt") public void testEmptyConditionWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpression.kt"); } @TestMetadata("EmptyConditionWithExpressionEnum.kt") public void testEmptyConditionWithExpressionEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpressionEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpressionEnum.kt"); } @TestMetadata("ExhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBoolean.kt"); } @TestMetadata("ExhaustiveBooleanBrackets.kt") public void testExhaustiveBooleanBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanBrackets.kt"); } @TestMetadata("ExhaustiveBooleanComplex.kt") public void testExhaustiveBooleanComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanComplex.kt"); } @TestMetadata("ExhaustiveBooleanNullable.kt") public void testExhaustiveBooleanNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt"); } @TestMetadata("ExhaustiveBreakContinue.kt") public void testExhaustiveBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBreakContinue.kt"); } @TestMetadata("ExhaustiveEnumIs.kt") public void testExhaustiveEnumIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveEnumIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveEnumIs.kt"); } @TestMetadata("ExhaustiveEnumMixed.kt") public void testExhaustiveEnumMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveEnumMixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveEnumMixed.kt"); } @TestMetadata("ExhaustiveInitialization.kt") public void testExhaustiveInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveInitialization.kt"); } @TestMetadata("ExhaustiveNoInitialization.kt") public void testExhaustiveNoInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveNoInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveNoInitialization.kt"); } @TestMetadata("ExhaustiveNullable.kt") public void testExhaustiveNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt"); } @TestMetadata("ExhaustivePlatformEnum.kt") public void testExhaustivePlatformEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnum.kt"); } @TestMetadata("ExhaustivePlatformEnumAnnotated.kt") public void testExhaustivePlatformEnumAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumAnnotated.kt"); } @TestMetadata("ExhaustivePlatformEnumElse.kt") public void testExhaustivePlatformEnumElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumElse.kt"); } @TestMetadata("ExhaustivePlatformEnumNull.kt") public void testExhaustivePlatformEnumNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt"); } @TestMetadata("ExhaustivePlatformEnumStatement.kt") public void testExhaustivePlatformEnumStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumStatement.kt"); } @TestMetadata("ExhaustiveReturn.kt") public void testExhaustiveReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveReturn.kt"); } @TestMetadata("ExhaustiveReturnThrow.kt") public void testExhaustiveReturnThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveReturnThrow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveReturnThrow.kt"); } @TestMetadata("ExhaustiveValOverConditionalInit.kt") public void testExhaustiveValOverConditionalInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt"); } @TestMetadata("ExhaustiveVarOverConditionalInit.kt") public void testExhaustiveVarOverConditionalInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheck.kt") public void testExhaustiveWithNullabilityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheck.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheckBefore.kt") public void testExhaustiveWithNullabilityCheckBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBefore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBefore.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheckBoolean.kt") public void testExhaustiveWithNullabilityCheckBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBoolean.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheckElse.kt") public void testExhaustiveWithNullabilityCheckElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckElse.kt"); } @TestMetadata("kt10439.kt") public void testKt10439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt10439.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt10439.kt"); } @TestMetadata("kt10809.kt") public void testKt10809() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt10809.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt10809.kt"); } @TestMetadata("kt10811.kt") public void testKt10811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt10811.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt10811.kt"); } @TestMetadata("kt4434.kt") public void testKt4434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt4434.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt4434.kt"); } @TestMetadata("kt9929.kt") public void testKt9929() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt9929.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt9929.kt"); } @TestMetadata("kt9972.kt") public void testKt9972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt9972.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt9972.kt"); } @TestMetadata("NoElseExpectedUnit.kt") public void testNoElseExpectedUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseExpectedUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseExpectedUnit.kt"); } @TestMetadata("NoElseNoExpectedType.kt") public void testNoElseNoExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseNoExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseNoExpectedType.kt"); } @TestMetadata("NoElseReturnedCoercionToUnit.kt") public void testNoElseReturnedCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedCoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedCoercionToUnit.kt"); } @TestMetadata("NoElseReturnedFromLambdaExpectedInt.kt") public void testNoElseReturnedFromLambdaExpectedInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedFromLambdaExpectedInt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedFromLambdaExpectedInt.kt"); } @TestMetadata("NoElseReturnedNonUnit.kt") public void testNoElseReturnedNonUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedNonUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedNonUnit.kt"); } @TestMetadata("NoElseReturnedUnit.kt") public void testNoElseReturnedUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedUnit.kt"); } @TestMetadata("NoElseWhenStatement.kt") public void testNoElseWhenStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseWhenStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseWhenStatement.kt"); } @TestMetadata("NonExhaustiveBooleanNullable.kt") public void testNonExhaustiveBooleanNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt"); } @TestMetadata("NonExhaustivePlatformEnum.kt") public void testNonExhaustivePlatformEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustivePlatformEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustivePlatformEnum.kt"); } @TestMetadata("NonExhaustiveWarning.kt") public void testNonExhaustiveWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt"); } @TestMetadata("NonExhaustiveWarningElse.kt") public void testNonExhaustiveWarningElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningElse.kt"); } @TestMetadata("NonExhaustiveWarningFalse.kt") public void testNonExhaustiveWarningFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningFalse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningFalse.kt"); } @TestMetadata("NonExhaustiveWarningForSealedClass.kt") public void testNonExhaustiveWarningForSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt"); } @TestMetadata("NonExhaustiveWarningNull.kt") public void testNonExhaustiveWarningNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt"); } @TestMetadata("NonExhaustiveWithNullabilityCheck.kt") public void testNonExhaustiveWithNullabilityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWithNullabilityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWithNullabilityCheck.kt"); } @TestMetadata("PropertyNotInitialized.kt") public void testPropertyNotInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/PropertyNotInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/PropertyNotInitialized.kt"); } @TestMetadata("RedundantElse.kt") public void testRedundantElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/RedundantElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/RedundantElse.kt"); } @TestMetadata("ReservedExhaustiveWhen.kt") public void testReservedExhaustiveWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ReservedExhaustiveWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ReservedExhaustiveWhen.kt"); } @TestMetadata("TopLevelSealed.kt") public void testTopLevelSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/TopLevelSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/TopLevelSealed.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/When.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/When.kt"); } @TestMetadata("whenAndLambdaWithExpectedType.kt") public void testWhenAndLambdaWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt"); } @TestMetadata("WhenTypeDisjunctions.kt") public void testWhenTypeDisjunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/WhenTypeDisjunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/WhenTypeDisjunctions.kt"); } @TestMetadata("whenWithNothingAndLambdas.kt") public void testWhenWithNothingAndLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt"); } } } @@ -25262,10 +22316,13 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AccessForwardDeclarationInScript.kts") public void testAccessForwardDeclarationInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/AccessForwardDeclarationInScript.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/AccessForwardDeclarationInScript.kts"); } public void testAllFilesPresentInScript() throws Exception { @@ -25274,68 +22331,57 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestMetadata("ComplexScript.kts") public void testComplexScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/ComplexScript.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/ComplexScript.kts"); } @TestMetadata("destructuringDeclarationsScript.kts") public void testDestructuringDeclarationsScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/destructuringDeclarationsScript.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/destructuringDeclarationsScript.kts"); } @TestMetadata("imports.kts") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/imports.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/imports.kts"); } @TestMetadata("LateInit.kts") public void testLateInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/LateInit.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/LateInit.kts"); } @TestMetadata("NestedInnerClass.kts") public void testNestedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/NestedInnerClass.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/NestedInnerClass.kts"); } @TestMetadata("PrivateVal.kts") public void testPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/PrivateVal.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/PrivateVal.kts"); } @TestMetadata("resolveInitializerOfDestructuringDeclarationOnce.kts") public void testResolveInitializerOfDestructuringDeclarationOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/resolveInitializerOfDestructuringDeclarationOnce.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/resolveInitializerOfDestructuringDeclarationOnce.kts"); } @TestMetadata("SimpleScript.kts") public void testSimpleScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/SimpleScript.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/SimpleScript.kts"); } @TestMetadata("topLevelPropertiesWithGetSet.kts") public void testTopLevelPropertiesWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/topLevelPropertiesWithGetSet.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/topLevelPropertiesWithGetSet.kts"); } @TestMetadata("topLevelVariable.kts") public void testTopLevelVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/topLevelVariable.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/topLevelVariable.kts"); } @TestMetadata("typealiasInScript.kts") public void testTypealiasInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/typealiasInScript.kts"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/typealiasInScript.kts"); } } @@ -25343,6 +22389,10 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Diagnostics extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -25351,6 +22401,10 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -25359,14 +22413,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt6176.kt") public void testKt6176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); } } @@ -25374,6 +22431,10 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -25382,68 +22443,62 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnObjects extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOnObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass1.kt") public void testInvokeOnClassObjectOfNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass2.kt") public void testInvokeOnClassObjectOfNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); } @TestMetadata("invokeOnEnum1.kt") public void testInvokeOnEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); } @TestMetadata("invokeOnEnum2.kt") public void testInvokeOnEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); } @TestMetadata("invokeOnImportedEnum1.kt") public void testInvokeOnImportedEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); } @TestMetadata("invokeOnImportedEnum2.kt") public void testInvokeOnImportedEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); } } } @@ -25452,230 +22507,197 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailRecursion extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailRecursion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); } @TestMetadata("defaultArgsOverridden.kt") public void testDefaultArgsOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); } @TestMetadata("extensionTailCall.kt") public void testExtensionTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); } @TestMetadata("functionWithNoTails.kt") public void testFunctionWithNoTails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); } @TestMetadata("functionWithNonTailRecursions.kt") public void testFunctionWithNonTailRecursions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); } @TestMetadata("functionWithoutAnnotation.kt") public void testFunctionWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); } @TestMetadata("insideElvis.kt") public void testInsideElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); } @TestMetadata("labeledThisReferences.kt") public void testLabeledThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); } @TestMetadata("loops.kt") public void testLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); } @TestMetadata("multilevelBlocks.kt") public void testMultilevelBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); } @TestMetadata("recursiveCallInLambda.kt") public void testRecursiveCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); } @TestMetadata("recursiveCallInLocalFunction.kt") public void testRecursiveCallInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); } @TestMetadata("recursiveInnerFunction.kt") public void testRecursiveInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); } @TestMetadata("returnIf.kt") public void testReturnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); } @TestMetadata("returnInCatch.kt") public void testReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); } @TestMetadata("returnInIfInFinally.kt") public void testReturnInIfInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); } @TestMetadata("simpleBlock.kt") public void testSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); } @TestMetadata("simpleReturnWithElse.kt") public void testSimpleReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); } @TestMetadata("tailRecursionInFinally.kt") public void testTailRecursionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); } @TestMetadata("thisReferences.kt") public void testThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); } @TestMetadata("unitBlocks.kt") public void testUnitBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); } @TestMetadata("whenWithCondition.kt") public void testWhenWithCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); } @TestMetadata("whenWithInRange.kt") public void testWhenWithInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); } @TestMetadata("whenWithoutCondition.kt") public void testWhenWithoutCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); } } } @@ -25684,14 +22706,17 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt4172.kt") public void testKt4172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated.java index e0ba3908def..61208180267 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated extends AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestsWithJsStdLibAndBackendCompilation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,32 +33,32 @@ public class DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated extends A @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("recursionCycle.kt") public void testRecursionCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycle.kt"); } @TestMetadata("recursionCycleLambda.kt") public void testRecursionCycleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleLambda.kt"); } @TestMetadata("recursionCycleWithPublicFun.kt") public void testRecursionCycleWithPublicFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithPublicFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithPublicFun.kt"); } @TestMetadata("recursionCycleWithStdlibCall.kt") public void testRecursionCycleWithStdlibCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithStdlibCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/inline/recursionCycleWithStdlibCall.kt"); } } @@ -62,14 +66,17 @@ public class DiagnosticsTestWithJsStdLibAndBackendCompilationGenerated extends A @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnsupportedFeatures extends AbstractDiagnosticsTestWithJsStdLibAndBackendCompilation { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnsupportedFeatures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/unsupportedFeatures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/unsupportedFeatures/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLibAndBackendCompilation/unsupportedFeatures/annotations.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibGenerated.java index 4af25db4d53..c6a6926f22e 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithJsStdLibGenerated.java @@ -21,316 +21,274 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestsWithJsStdLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implementingFunction.kt") public void testImplementingFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/implementingFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/implementingFunction.kt"); } @TestMetadata("localClassMetadata.kt") public void testLocalClassMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/localClassMetadata.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/localClassMetadata.kt"); } @TestMetadata("noImpl.kt") public void testNoImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/noImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/noImpl.kt"); } @TestMetadata("platformDependent.kt") public void testPlatformDependent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/platformDependent.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/platformDependent.kt"); } @TestMetadata("runtimeAnnotations.kt") public void testRuntimeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/runtimeAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/runtimeAnnotations.kt"); } @TestMetadata("wrongMultipleInheritance.kt") public void testWrongMultipleInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DynamicTypes extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDynamicTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allowedDynamicFunctionType.kt") public void testAllowedDynamicFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/allowedDynamicFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/allowedDynamicFunctionType.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/assignment.kt"); } @TestMetadata("block.kt") public void testBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/block.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/block.kt"); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/callableReferences.kt"); } @TestMetadata("classDelegateBy.kt") public void testClassDelegateBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/classDelegateBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/classDelegateBy.kt"); } @TestMetadata("comparisonToNull.kt") public void testComparisonToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/comparisonToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/comparisonToNull.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conditions.kt"); } @TestMetadata("conventions.kt") public void testConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/destructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/destructuring.kt"); } @TestMetadata("dynamicCalls.kt") public void testDynamicCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCalls.kt"); } @TestMetadata("dynamicCallsWithLambdas.kt") public void testDynamicCallsWithLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCallsWithLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCallsWithLambdas.kt"); } @TestMetadata("dynamicCastTarget.kt") public void testDynamicCastTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicCastTarget.kt"); } @TestMetadata("dynamicExtension.kt") public void testDynamicExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicExtension.kt"); } @TestMetadata("dynamicSafeCalls.kt") public void testDynamicSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicSafeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicSafeCalls.kt"); } @TestMetadata("dynamicVsGeneric.kt") public void testDynamicVsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicVsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/dynamicVsGeneric.kt"); } @TestMetadata("extensionVals.kt") public void testExtensionVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVals.kt"); } @TestMetadata("extensionVars.kt") public void testExtensionVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVars.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionVars.kt"); } @TestMetadata("extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensions.kt"); } @TestMetadata("extensionsToDynamic.kt") public void testExtensionsToDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionsToDynamic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/extensionsToDynamic.kt"); } @TestMetadata("implicitDynamicReceiver.kt") public void testImplicitDynamicReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/implicitDynamicReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/implicitDynamicReceiver.kt"); } @TestMetadata("inExpression.kt") public void testInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inExpression.kt"); } @TestMetadata("indexedAccess.kt") public void testIndexedAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/indexedAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/indexedAccess.kt"); } @TestMetadata("inference.kt") public void testInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/inference.kt"); } @TestMetadata("membersOfAny.kt") public void testMembersOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/membersOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/membersOfAny.kt"); } @TestMetadata("namedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/namedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/namedArguments.kt"); } @TestMetadata("noUnsupportedInLocals.kt") public void testNoUnsupportedInLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/nullable.kt"); } @TestMetadata("overloading.kt") public void testOverloading() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloading.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloading.kt"); } @TestMetadata("overloadingAmbiguity.kt") public void testOverloadingAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloadingAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overloadingAmbiguity.kt"); } @TestMetadata("overrides.kt") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/overrides.kt"); } @TestMetadata("propertyDelegateBy.kt") public void testPropertyDelegateBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/propertyDelegateBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/propertyDelegateBy.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/protected.kt"); } @TestMetadata("rangeExpression.kt") public void testRangeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/rangeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/rangeExpression.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/reified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/reified.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/smartCast.kt"); } @TestMetadata("spreadOperator.kt") public void testSpreadOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/spreadOperator.kt"); } @TestMetadata("staticCallsInDynamicContext.kt") public void testStaticCallsInDynamicContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/staticCallsInDynamicContext.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/staticCallsInDynamicContext.kt"); } @TestMetadata("staticExtensions.kt") public void testStaticExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/staticExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/staticExtensions.kt"); } @TestMetadata("substitution.kt") public void testSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/substitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/substitution.kt"); } @TestMetadata("supertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/supertypesAndBounds.kt"); } @TestMetadata("typealiasExpandingToDynamic.kt") public void testTypealiasExpandingToDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/typealiasExpandingToDynamic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/typealiasExpandingToDynamic.kt"); } @TestMetadata("typealiasWithAnnotatedDynamic.kt") public void testTypealiasWithAnnotatedDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/typealiasWithAnnotatedDynamic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/typealiasWithAnnotatedDynamic.kt"); } @TestMetadata("typealiasWithDynamic.kt") public void testTypealiasWithDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/typealiasWithDynamic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/typealiasWithDynamic.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/varargs.kt"); } } @@ -338,14 +296,17 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/inline/Reified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/inline/Reified.kt"); } } @@ -353,44 +314,42 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsCode extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jsCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentIsLiteral.kt") public void testArgumentIsLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/argumentIsLiteral.kt"); } @TestMetadata("badAssignment.kt") public void testBadAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/badAssignment.kt"); } @TestMetadata("deleteOperation.kt") public void testDeleteOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/deleteOperation.kt"); } @TestMetadata("error.kt") public void testError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/error.kt"); } @TestMetadata("noJavaScriptProduced.kt") public void testNoJavaScriptProduced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/noJavaScriptProduced.kt"); } @TestMetadata("warning.kt") public void testWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jsCode/warning.kt"); } } @@ -398,14 +357,17 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmDeclarations extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cloneable.kt") public void testCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations/cloneable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/jvmDeclarations/cloneable.kt"); } } @@ -413,62 +375,57 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Module extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/module"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dualModuleFromUmd.kt") public void testDualModuleFromUmd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/dualModuleFromUmd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/dualModuleFromUmd.kt"); } @TestMetadata("incompleteReifiedArg.kt") public void testIncompleteReifiedArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/incompleteReifiedArg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/incompleteReifiedArg.kt"); } @TestMetadata("jsModuleNonExternal.kt") public void testJsModuleNonExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/jsModuleNonExternal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/jsModuleNonExternal.kt"); } @TestMetadata("jsModuleWithoutParameters.kt") public void testJsModuleWithoutParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/jsModuleWithoutParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/jsModuleWithoutParameters.kt"); } @TestMetadata("jsVarProhibited.kt") public void testJsVarProhibited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/jsVarProhibited.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/jsVarProhibited.kt"); } @TestMetadata("nestedProhibited.kt") public void testNestedProhibited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/nestedProhibited.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/nestedProhibited.kt"); } @TestMetadata("prohibitedOnNonNative.kt") public void testProhibitedOnNonNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/prohibitedOnNonNative.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/prohibitedOnNonNative.kt"); } @TestMetadata("wrongCallToModule.kt") public void testWrongCallToModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/wrongCallToModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/wrongCallToModule.kt"); } @TestMetadata("wrongCallToNonModule.kt") public void testWrongCallToNonModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/wrongCallToNonModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/module/wrongCallToNonModule.kt"); } } @@ -476,194 +433,167 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Name extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/name"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bridgeClash.kt") public void testBridgeClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/bridgeClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/bridgeClash.kt"); } @TestMetadata("builtinClash.kt") public void testBuiltinClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/builtinClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/builtinClash.kt"); } @TestMetadata("classAndFunction.kt") public void testClassAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/classAndFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/classAndFunction.kt"); } @TestMetadata("classAndTypealias.kt") public void testClassAndTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/classAndTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/classAndTypealias.kt"); } @TestMetadata("classLevelMethodAndProperty.kt") public void testClassLevelMethodAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/classLevelMethodAndProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/classLevelMethodAndProperty.kt"); } @TestMetadata("conflictingNamesFromSuperclass.kt") public void testConflictingNamesFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/conflictingNamesFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/conflictingNamesFromSuperclass.kt"); } @TestMetadata("declarationClash.kt") public void testDeclarationClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/declarationClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/declarationClash.kt"); } @TestMetadata("extensionPropertyAndMethod.kt") public void testExtensionPropertyAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt"); } @TestMetadata("illegalName.kt") public void testIllegalName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/illegalName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/illegalName.kt"); } @TestMetadata("illegalPackageName.kt") public void testIllegalPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/illegalPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/illegalPackageName.kt"); } @TestMetadata("jsNameAndOverridden.kt") public void testJsNameAndOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt"); } @TestMetadata("jsNameClash.kt") public void testJsNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt"); } @TestMetadata("jsNameClashWithDefault.kt") public void testJsNameClashWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClashWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClashWithDefault.kt"); } @TestMetadata("jsNameMissingOnAccessors.kt") public void testJsNameMissingOnAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameMissingOnAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameMissingOnAccessors.kt"); } @TestMetadata("jsNameOnAccessors.kt") public void testJsNameOnAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt"); } @TestMetadata("jsNameOnOverride.kt") public void testJsNameOnOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnOverride.kt"); } @TestMetadata("jsNameOnPropertyAndAccessor.kt") public void testJsNameOnPropertyAndAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnPropertyAndAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnPropertyAndAccessor.kt"); } @TestMetadata("jsNamePrihibitedOnPrimaryConstructor.kt") public void testJsNamePrihibitedOnPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNamePrihibitedOnPrimaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNamePrihibitedOnPrimaryConstructor.kt"); } @TestMetadata("jsNameProhibitedOnExtensionProperty.kt") public void testJsNameProhibitedOnExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameProhibitedOnExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameProhibitedOnExtensionProperty.kt"); } @TestMetadata("jsNameUseTargetOnProperty.kt") public void testJsNameUseTargetOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameUseTargetOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameUseTargetOnProperty.kt"); } @TestMetadata("jsNameWithoutParameter.kt") public void testJsNameWithoutParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameWithoutParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameWithoutParameter.kt"); } @TestMetadata("methodAndMethod.kt") public void testMethodAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt"); } @TestMetadata("nameSwapInOverride.kt") public void testNameSwapInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/nameSwapInOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/nameSwapInOverride.kt"); } @TestMetadata("overrideOverloadedNativeFunction.kt") public void testOverrideOverloadedNativeFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/overrideOverloadedNativeFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/overrideOverloadedNativeFunction.kt"); } @TestMetadata("packageAndMethod.kt") public void testPackageAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt"); } @TestMetadata("packageAndProperty.kt") public void testPackageAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt"); } @TestMetadata("privateJsNameClash.kt") public void testPrivateJsNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/privateJsNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/privateJsNameClash.kt"); } @TestMetadata("propertyAndMethodInImplementor.kt") public void testPropertyAndMethodInImplementor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInImplementor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInImplementor.kt"); } @TestMetadata("propertyAndMethodInSubclass.kt") public void testPropertyAndMethodInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInSubclass.kt"); } @TestMetadata("topLevelMethodAndJsNameConstructor.kt") public void testTopLevelMethodAndJsNameConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt"); } @TestMetadata("topLevelMethodAndProperty.kt") public void testTopLevelMethodAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndProperty.kt"); } } @@ -671,178 +601,159 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNative() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInitializer.kt") public void testAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/anonymousInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/anonymousInitializer.kt"); } @TestMetadata("body.kt") public void testBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/body.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/body.kt"); } @TestMetadata("delegatedConstructorCall.kt") public void testDelegatedConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/delegatedConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/delegatedConstructorCall.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/delegation.kt"); } @TestMetadata("enumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/enumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/enumEntry.kt"); } @TestMetadata("extensionFunctionAndProperty.kt") public void testExtensionFunctionAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/extensionFunctionAndProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/extensionFunctionAndProperty.kt"); } @TestMetadata("extensionFunctionArgumentOrReturnType.kt") public void testExtensionFunctionArgumentOrReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/extensionFunctionArgumentOrReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/extensionFunctionArgumentOrReturnType.kt"); } @TestMetadata("externalInterfaceNested.kt") public void testExternalInterfaceNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/externalInterfaceNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/externalInterfaceNested.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/inheritance.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/inline.kt"); } @TestMetadata("inlineExtensionToNative.kt") public void testInlineExtensionToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/inlineExtensionToNative.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/inlineExtensionToNative.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/innerClass.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nested.kt"); } @TestMetadata("nonAbstractMembersOfInterface.kt") public void testNonAbstractMembersOfInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nonAbstractMembersOfInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nonAbstractMembersOfInterface.kt"); } @TestMetadata("overrideOptionalParam.kt") public void testOverrideOptionalParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/overrideOptionalParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/overrideOptionalParam.kt"); } @TestMetadata("privateMembers.kt") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/privateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/privateMembers.kt"); } @TestMetadata("propertyParameter.kt") public void testPropertyParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/propertyParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/propertyParameter.kt"); } @TestMetadata("wrongTarget.kt") public void testWrongTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/wrongTarget.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/wrongTarget.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NativeGetter extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNativeGetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("onLocalExtensionFun.kt") public void testOnLocalExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalExtensionFun.kt"); } @TestMetadata("onLocalNonNativeClassMembers.kt") public void testOnLocalNonNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt"); } @TestMetadata("onLocalOtherDeclarations.kt") public void testOnLocalOtherDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt"); } @TestMetadata("onNativeClassMembers.kt") public void testOnNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNativeClassMembers.kt"); } @TestMetadata("onNestedDeclarationsInsideNativeClass.kt") public void testOnNestedDeclarationsInsideNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNativeClass.kt"); } @TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt") public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt"); } @TestMetadata("onNonNativeClassMembers.kt") public void testOnNonNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNonNativeClassMembers.kt"); } @TestMetadata("onToplevelExtensionFun.kt") public void testOnToplevelExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelExtensionFun.kt"); } @TestMetadata("onToplevelOtherDeclarations.kt") public void testOnToplevelOtherDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelOtherDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onToplevelOtherDeclarations.kt"); } } @@ -850,62 +761,57 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NativeInvoke extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNativeInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("onLocalExtensionFun.kt") public void testOnLocalExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalExtensionFun.kt"); } @TestMetadata("onLocalNonNativeClassMembers.kt") public void testOnLocalNonNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt"); } @TestMetadata("onLocalOtherDeclarations.kt") public void testOnLocalOtherDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt"); } @TestMetadata("onNativeClassMembers.kt") public void testOnNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNativeClassMembers.kt"); } @TestMetadata("onNestedDeclarationsInsideNativeClass.kt") public void testOnNestedDeclarationsInsideNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNativeClass.kt"); } @TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt") public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt"); } @TestMetadata("onNonNativeClassMembers.kt") public void testOnNonNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNonNativeClassMembers.kt"); } @TestMetadata("onToplevelExtensionFun.kt") public void testOnToplevelExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelExtensionFun.kt"); } @TestMetadata("onToplevelOtherDeclarations.kt") public void testOnToplevelOtherDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelOtherDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onToplevelOtherDeclarations.kt"); } } @@ -913,62 +819,57 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NativeSetter extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNativeSetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("onLocalExtensionFun.kt") public void testOnLocalExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalExtensionFun.kt"); } @TestMetadata("onLocalNonNativeClassMembers.kt") public void testOnLocalNonNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt"); } @TestMetadata("onLocalOtherDeclarations.kt") public void testOnLocalOtherDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt"); } @TestMetadata("onNativeClassMembers.kt") public void testOnNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNativeClassMembers.kt"); } @TestMetadata("onNestedDeclarationsInsideNativeClass.kt") public void testOnNestedDeclarationsInsideNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNativeClass.kt"); } @TestMetadata("onNestedDeclarationsInsideNonNativeClass.kt") public void testOnNestedDeclarationsInsideNonNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt"); } @TestMetadata("onNonNativeClassMembers.kt") public void testOnNonNativeClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNonNativeClassMembers.kt"); } @TestMetadata("onToplevelExtensionFun.kt") public void testOnToplevelExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelExtensionFun.kt"); } @TestMetadata("onToplevelOtherDeclarations.kt") public void testOnToplevelOtherDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelOtherDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onToplevelOtherDeclarations.kt"); } } @@ -976,32 +877,32 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OptionlBody extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptionlBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("native.kt") public void testNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/native.kt"); } @TestMetadata("nativeGetter.kt") public void testNativeGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeGetter.kt"); } @TestMetadata("nativeInvoke.kt") public void testNativeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeInvoke.kt"); } @TestMetadata("nativeSetter.kt") public void testNativeSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody/nativeSetter.kt"); } } @@ -1009,38 +910,37 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rtti extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRtti() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("castToNativeInterface.kt") public void testCastToNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/castToNativeInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/castToNativeInterface.kt"); } @TestMetadata("checkForNativeInterface.kt") public void testCheckForNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/checkForNativeInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/checkForNativeInterface.kt"); } @TestMetadata("nativeInterfaceAsReifiedTypeArgument.kt") public void testNativeInterfaceAsReifiedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/nativeInterfaceAsReifiedTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/nativeInterfaceAsReifiedTypeArgument.kt"); } @TestMetadata("nativeInterfaceClassLiteral.kt") public void testNativeInterfaceClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/nativeInterfaceClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/nativeInterfaceClassLiteral.kt"); } @TestMetadata("whenIsNativeInterface.kt") public void testWhenIsNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/whenIsNativeInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/whenIsNativeInterface.kt"); } } @@ -1048,32 +948,32 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnusedParam extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnusedParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("native.kt") public void testNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/native.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/native.kt"); } @TestMetadata("nativeGetter.kt") public void testNativeGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeGetter.kt"); } @TestMetadata("nativeInvoke.kt") public void testNativeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeInvoke.kt"); } @TestMetadata("nativeSetter.kt") public void testNativeSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/native/unusedParam/nativeSetter.kt"); } } } @@ -1082,20 +982,22 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Qualifier extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/qualifier"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jsQualifierNonExternal.kt") public void testJsQualifierNonExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/qualifier/jsQualifierNonExternal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/qualifier/jsQualifierNonExternal.kt"); } @TestMetadata("wrongQualifier.kt") public void testWrongQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/qualifier/wrongQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/qualifier/wrongQualifier.kt"); } } @@ -1103,14 +1005,17 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractDiagnosticsTestWithJsStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("reflectionApi.kt") public void testReflectionApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/reflection/reflectionApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJsStdLib/reflection/reflectionApi.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index da4fb1107fe..6465e3c8e8a 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAllProjection.kt") public void testAddAllProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/addAllProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/addAllProjection.kt"); } public void testAllFilesPresentInTestsWithStdLib() throws Exception { @@ -33,246 +36,216 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestMetadata("ArrayOfNothing.kt") public void testArrayOfNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt"); } @TestMetadata("CallCompanionProtectedNonStatic.kt") public void testCallCompanionProtectedNonStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt"); } @TestMetadata("CallToMainRedeclaredInMultiFile.kt") public void testCallToMainRedeclaredInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/CallToMainRedeclaredInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/CallToMainRedeclaredInMultiFile.kt"); } @TestMetadata("commonCollections.kt") public void testCommonCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt"); } @TestMetadata("elvisOnJavaList.kt") public void testElvisOnJavaList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.kt"); } @TestMetadata("elvisOnUnitInLet.kt") public void testElvisOnUnitInLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt"); } @TestMetadata("hugeUnresolvedKotlinxHtml.kt") public void testHugeUnresolvedKotlinxHtml() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/hugeUnresolvedKotlinxHtml.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/hugeUnresolvedKotlinxHtml.kt"); } @TestMetadata("ifElseJavaList.kt") public void testIfElseJavaList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/ifElseJavaList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/ifElseJavaList.kt"); } @TestMetadata("implicitCastToAny.kt") public void testImplicitCastToAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/implicitCastToAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/implicitCastToAny.kt"); } @TestMetadata("InaccessibleInternalClass.kt") public void testInaccessibleInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/InaccessibleInternalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/InaccessibleInternalClass.kt"); } @TestMetadata("instar.kt") public void testInstar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/instar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/instar.kt"); } @TestMetadata("javaClassOnCompanion.kt") public void testJavaClassOnCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/javaClassOnCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/javaClassOnCompanion.kt"); } @TestMetadata("javaForKClass.kt") public void testJavaForKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/javaForKClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/javaForKClass.kt"); } @TestMetadata("kt9078.kt") public void testKt9078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt9078.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/kt9078.kt"); } @TestMetadata("kt9985.kt") public void testKt9985() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt9985.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/kt9985.kt"); } @TestMetadata("outstar.kt") public void testOutstar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/outstar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/outstar.kt"); } @TestMetadata("overrideWithFunctionalType.kt") public void testOverrideWithFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt"); } @TestMetadata("PropertyDelegateWithPrivateSet.kt") public void testPropertyDelegateWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/PropertyDelegateWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/PropertyDelegateWithPrivateSet.kt"); } @TestMetadata("pureReifiable.kt") public void testPureReifiable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt"); } @TestMetadata("pureReifiableArrayOperations.kt") public void testPureReifiableArrayOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/pureReifiableArrayOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/pureReifiableArrayOperations.kt"); } @TestMetadata("RedeclarationMainInMultiFileClass.kt") public void testRedeclarationMainInMultiFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/RedeclarationMainInMultiFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/RedeclarationMainInMultiFileClass.kt"); } @TestMetadata("RenameOnImportHidesDefaultImport.kt") public void testRenameOnImportHidesDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt"); } @TestMetadata("shadowingInDestructuring.kt") public void testShadowingInDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/shadowingInDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/shadowingInDestructuring.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectAnnotatedWithItsKClass.kt") public void testClassObjectAnnotatedWithItsKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.kt"); } @TestMetadata("defaultValueMustBeConstant.kt") public void testDefaultValueMustBeConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.kt"); } @TestMetadata("JvmSyntheticOnDelegate.kt") public void testJvmSyntheticOnDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/JvmSyntheticOnDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/JvmSyntheticOnDelegate.kt"); } @TestMetadata("qualifiedCallValue.kt") public void testQualifiedCallValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.kt"); } @TestMetadata("strictfpOnClass.kt") public void testStrictfpOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt"); } @TestMetadata("Synchronized.kt") public void testSynchronized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/Synchronized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/Synchronized.kt"); } @TestMetadata("targetuse.kt") public void testTargetuse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/targetuse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/targetuse.kt"); } @TestMetadata("TransientOnDelegate.kt") public void testTransientOnDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/TransientOnDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/TransientOnDelegate.kt"); } @TestMetadata("Volatile.kt") public void testVolatile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/Volatile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/Volatile.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationApplicability extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationApplicability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationsOnUseSiteTargets.kt") public void testAnnotationsOnUseSiteTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/annotationsOnUseSiteTargets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/annotationsOnUseSiteTargets.kt"); } @TestMetadata("illegalPlatformName.kt") public void testIllegalPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/illegalPlatformName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/illegalPlatformName.kt"); } @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/jvmName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/jvmName.kt"); } @TestMetadata("multifileClassPart.kt") public void testMultifileClassPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPart.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPart.kt"); } @TestMetadata("multifileClassPartWithJavaAnnotation.kt") public void testMultifileClassPartWithJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPartWithJavaAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPartWithJavaAnnotation.kt"); } @TestMetadata("suppressOnFunctionReference.kt") public void testSuppressOnFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt"); } } @@ -280,32 +253,32 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationParameterMustBeConstant extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt"); } @TestMetadata("useOfNonConstVal.kt") public void testUseOfNonConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/useOfNonConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/useOfNonConstVal.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.kt"); } } @@ -313,56 +286,52 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationParameters extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10136.kt") public void testKt10136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/kt10136.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/kt10136.kt"); } @TestMetadata("nonConstValAsArgument.kt") public void testNonConstValAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/nonConstValAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/nonConstValAsArgument.kt"); } @TestMetadata("orderWithValue.kt") public void testOrderWithValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.kt"); } @TestMetadata("orderWithoutValue.kt") public void testOrderWithoutValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.kt"); } @TestMetadata("valueArray.kt") public void testValueArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.kt"); } @TestMetadata("valueArrayAndOtherDefault.kt") public void testValueArrayAndOtherDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt"); } @TestMetadata("valueArrayOnly.kt") public void testValueArrayOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.kt"); } @TestMetadata("valueArrayWithDefault.kt") public void testValueArrayWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.kt"); } } @@ -370,20 +339,22 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationWithVarargParameter extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationWithVarargParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaAnnotationWithVarargArgument.kt") public void testJavaAnnotationWithVarargArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.kt"); } @TestMetadata("kotlinAnnotationWithVarargArgument.kt") public void testKotlinAnnotationWithVarargArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.kt"); } } @@ -391,80 +362,72 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAnnotationsWithKClassParameter extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAnnotationsWithKClassParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationAsArgument.kt") public void testAnnotationAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.kt"); } @TestMetadata("arg.kt") public void testArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.kt"); } @TestMetadata("argAndOtherDefault.kt") public void testArgAndOtherDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.kt"); } @TestMetadata("argArray.kt") public void testArgArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.kt"); } @TestMetadata("argWithDefault.kt") public void testArgWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.kt"); } @TestMetadata("argWithDefaultAndOther.kt") public void testArgWithDefaultAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.kt"); } @TestMetadata("twoArgs.kt") public void testTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.kt"); } @TestMetadata("value.kt") public void testValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.kt"); } @TestMetadata("valueAndOtherDefault.kt") public void testValueAndOtherDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.kt"); } @TestMetadata("valueArray.kt") public void testValueArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt"); } @TestMetadata("valueWithDefault.kt") public void testValueWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.kt"); } @TestMetadata("valueWithDefaultAndOther.kt") public void testValueWithDefaultAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.kt"); } } @@ -472,104 +435,92 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmDefault extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt"); } @TestMetadata("javaOverride.kt") public void testJavaOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt"); } @TestMetadata("jvmDefaultInInheritance.kt") public void testJvmDefaultInInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt"); } @TestMetadata("jvmDefaults.kt") public void testJvmDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaults.kt"); } @TestMetadata("jvmDefaultsWithJava.kt") public void testJvmDefaultsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt"); } @TestMetadata("noJvmDefaultFlag.kt") public void testNoJvmDefaultFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt"); } @TestMetadata("notInterface.kt") public void testNotInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt"); } @TestMetadata("simpleOverride.kt") public void testSimpleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt"); } @TestMetadata("simplePropertyOverride.kt") public void testSimplePropertyOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt"); } @TestMetadata("superCallAmbiguity.kt") public void testSuperCallAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt"); } @TestMetadata("superCallAmbiguity2.kt") public void testSuperCallAmbiguity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt"); } @TestMetadata("superCallAmbiguity3.kt") public void testSuperCallAmbiguity3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt"); } @TestMetadata("target6.kt") public void testTarget6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt"); } @TestMetadata("target8.kt") public void testTarget8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt"); } } @@ -577,32 +528,32 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmField extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("clashWithCompanionObjectField.kt") public void testClashWithCompanionObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/clashWithCompanionObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/clashWithCompanionObjectField.kt"); } @TestMetadata("inMultiFileFacade.kt") public void testInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inMultiFileFacade.kt"); } @TestMetadata("inSingleFileFacade.kt") public void testInSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inSingleFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inSingleFileFacade.kt"); } @TestMetadata("jvmFieldApplicability.kt") public void testJvmFieldApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/jvmFieldApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/jvmFieldApplicability.kt"); } } @@ -610,26 +561,27 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOverloads extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("JvmOverloadWithNoDefaults.kt") public void testJvmOverloadWithNoDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/JvmOverloadWithNoDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/JvmOverloadWithNoDefaults.kt"); } @TestMetadata("jvmOverloadsOnAbstractMethods.kt") public void testJvmOverloadsOnAbstractMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt"); } @TestMetadata("jvmOverloadsOnPrivate.kt") public void testJvmOverloadsOnPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); } } @@ -637,14 +589,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("incorrectJvmPackageName.kt") public void testIncorrectJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.kt"); } } @@ -652,14 +607,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmSpecialFunctions extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmSpecialFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apiVersionIsAtLeastHasConstArguments.kt") public void testApiVersionIsAtLeastHasConstArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions/apiVersionIsAtLeastHasConstArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions/apiVersionIsAtLeastHasConstArguments.kt"); } } @@ -667,74 +625,67 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constOrJvmFieldProperty.kt") public void testConstOrJvmFieldProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constOrJvmFieldProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constOrJvmFieldProperty.kt"); } @TestMetadata("constructorProperty.kt") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructorProperty.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructors.kt"); } @TestMetadata("finalAndAbstract.kt") public void testFinalAndAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/finalAndAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/finalAndAbstract.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions.kt"); } @TestMetadata("functions_LL13.kt") public void testFunctions_LL13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt"); } @TestMetadata("interfaceCompanion_LL12.kt") public void testInterfaceCompanion_LL12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL12.kt"); } @TestMetadata("interfaceCompanion_LL13_16.kt") public void testInterfaceCompanion_LL13_16() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt"); } @TestMetadata("interfaceCompanion_LL13_18.kt") public void testInterfaceCompanion_LL13_18() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_18.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_18.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt"); } } @@ -742,50 +693,47 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClass extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kClassArrayInAnnotationsInVariance.kt") public void testKClassArrayInAnnotationsInVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.kt"); } @TestMetadata("kClassArrayInAnnotationsOutVariance.kt") public void testKClassArrayInAnnotationsOutVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.kt"); } @TestMetadata("kClassInAnnotation.kt") public void testKClassInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.kt"); } @TestMetadata("kClassInAnnotationsInVariance.kt") public void testKClassInAnnotationsInVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.kt"); } @TestMetadata("kClassInAnnotationsOutVariance.kt") public void testKClassInAnnotationsOutVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.kt"); } @TestMetadata("kClassInvariantTP.kt") public void testKClassInvariantTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.kt"); } @TestMetadata("kClassOutArrayInAnnotationsOutVariance.kt") public void testKClassOutArrayInAnnotationsOutVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.kt"); } } @@ -793,38 +741,37 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProhibitPositionedArgument extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProhibitPositionedArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kotlinAnnotation.kt") public void testKotlinAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.kt"); } @TestMetadata("tooManyArgs.kt") public void testTooManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.kt"); } @TestMetadata("withValue.kt") public void testWithValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.kt"); } @TestMetadata("withoutValue.kt") public void testWithoutValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.kt"); } } } @@ -833,14 +780,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Builtins extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builtins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/builtins/arraysAreCloneable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/builtins/arraysAreCloneable.kt"); } } @@ -848,26 +798,27 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/cast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsInsideIn.kt") public void testAsInsideIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/cast/AsInsideIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/cast/AsInsideIn.kt"); } @TestMetadata("IsArray.kt") public void testIsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/cast/IsArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/cast/IsArray.kt"); } @TestMetadata("IsReified.kt") public void testIsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/cast/IsReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/cast/IsReified.kt"); } } @@ -875,6 +826,10 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -883,6 +838,10 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Controlflow extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlflow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -891,104 +850,92 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FlowInlining extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFlowInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakContinuesInInlinedLambda.kt") public void testBreakContinuesInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/expressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/expressionBody.kt"); } @TestMetadata("implicitCastToAnyInReturnType.kt") public void testImplicitCastToAnyInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/implicitCastToAnyInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/implicitCastToAnyInReturnType.kt"); } @TestMetadata("inlinedLambdaAlwaysThrows.kt") public void testInlinedLambdaAlwaysThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/inlinedLambdaAlwaysThrows.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/inlinedLambdaAlwaysThrows.kt"); } @TestMetadata("irrelevantUnknownClosure.kt") public void testIrrelevantUnknownClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/irrelevantUnknownClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/irrelevantUnknownClosure.kt"); } @TestMetadata("labeledReturns.kt") public void testLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/labeledReturns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/labeledReturns.kt"); } @TestMetadata("nestedTryCatchFinally.kt") public void testNestedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchFinally.kt"); } @TestMetadata("nestedTryCatchs.kt") public void testNestedTryCatchs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchs.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonLocalReturn.kt"); } @TestMetadata("nonReturningInlinedLambda.kt") public void testNonReturningInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonReturningInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonReturningInlinedLambda.kt"); } @TestMetadata("severalJumpOutsFromInlinedLambda.kt") public void testSeveralJumpOutsFromInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/severalJumpOutsFromInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/severalJumpOutsFromInlinedLambda.kt"); } @TestMetadata("throwIfNotCalled.kt") public void testThrowIfNotCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/throwIfNotCalled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/throwIfNotCalled.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatch.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatchFinally.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.kt"); } @TestMetadata("unreachableCode.kt") public void testUnreachableCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/unreachableCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/unreachableCode.kt"); } } @@ -996,6 +943,10 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Initialization extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInitialization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1004,26 +955,27 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AtLeastOnce extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAtLeastOnce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("valDefiniteReassignment.kt") public void testValDefiniteReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/valDefiniteReassignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/valDefiniteReassignment.kt"); } @TestMetadata("varDefiniteInitialization.kt") public void testVarDefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varDefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varDefiniteInitialization.kt"); } @TestMetadata("varIndefiniteIntialization.kt") public void testVarIndefiniteIntialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varIndefiniteIntialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varIndefiniteIntialization.kt"); } } @@ -1031,44 +983,42 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExactlyOnce extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExactlyOnce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("valDefiniteInitialization.kt") public void testValDefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteInitialization.kt"); } @TestMetadata("valDefiniteReassignment.kt") public void testValDefiniteReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteReassignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteReassignment.kt"); } @TestMetadata("valIndefiniteInitialization.kt") public void testValIndefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valIndefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valIndefiniteInitialization.kt"); } @TestMetadata("varDefiniteInitalization.kt") public void testVarDefiniteInitalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varDefiniteInitalization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varDefiniteInitalization.kt"); } @TestMetadata("varIndefiniteInitialization.kt") public void testVarIndefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varIndefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varIndefiniteInitialization.kt"); } @TestMetadata("withReceiver.kt") public void testWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/withReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/withReceiver.kt"); } } @@ -1076,14 +1026,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unknown extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnknown() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unknownInvocations.kt") public void testUnknownInvocations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown/unknownInvocations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown/unknownInvocations.kt"); } } } @@ -1093,58 +1046,59 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Dsl extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDsl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("useBeforeDeclaration.kt") public void testUseBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Errors extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErrors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("booleanComparisons.kt") public void testBooleanComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/booleanComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/booleanComparisons.kt"); } @TestMetadata("callInContractDescription.kt") public void testCallInContractDescription() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/callInContractDescription.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/callInContractDescription.kt"); } @TestMetadata("nestedConditionalEffects.kt") public void testNestedConditionalEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/nestedConditionalEffects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/nestedConditionalEffects.kt"); } @TestMetadata("notFirstStatement.kt") public void testNotFirstStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.kt"); } @TestMetadata("referenceToProperty.kt") public void testReferenceToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/referenceToProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/referenceToProperty.kt"); } @TestMetadata("unlabeledReceiver.kt") public void testUnlabeledReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/unlabeledReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/unlabeledReceiver.kt"); } } } @@ -1153,38 +1107,37 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromStdlib extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("check.kt") public void testCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/check.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/check.kt"); } @TestMetadata("fromStandardKt.kt") public void testFromStandardKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/fromStandardKt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/fromStandardKt.kt"); } @TestMetadata("isNullOrBlank.kt") public void testIsNullOrBlank() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrBlank.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrBlank.kt"); } @TestMetadata("isNullOrEmpty.kt") public void testIsNullOrEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrEmpty.kt"); } @TestMetadata("require.kt") public void testRequire() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/require.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/require.kt"); } } @@ -1192,94 +1145,89 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smartcasts extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartcasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchExceptionSpilling.kt") public void testCatchExceptionSpilling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/catchExceptionSpilling.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/catchExceptionSpilling.kt"); } @TestMetadata("compositions.kt") public void testCompositions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/compositions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/compositions.kt"); } @TestMetadata("deeplyNested.kt") public void testDeeplyNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/deeplyNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/deeplyNested.kt"); } @TestMetadata("intersectingInfo.kt") public void testIntersectingInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectingInfo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectingInfo.kt"); } @TestMetadata("intersectionTypes.kt") public void testIntersectionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectionTypes.kt"); } @TestMetadata("nullabilitySmartcastWhenNullability.kt") public void testNullabilitySmartcastWhenNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/nullabilitySmartcastWhenNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/nullabilitySmartcastWhenNullability.kt"); } @TestMetadata("partiallyIncorrect.kt") public void testPartiallyIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/partiallyIncorrect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/partiallyIncorrect.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/receiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/receiver.kt"); } @TestMetadata("throwsEffect.kt") public void testThrowsEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/throwsEffect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/throwsEffect.kt"); } @TestMetadata("typeSmartcastWhenNullability.kt") public void testTypeSmartcastWhenNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/typeSmartcastWhenNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/typeSmartcastWhenNullability.kt"); } @TestMetadata("unreachableBranches.kt") public void testUnreachableBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/unreachableBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/unreachableBranches.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multieffect extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultieffect() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implicitIff.kt") public void testImplicitIff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/implicitIff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/implicitIff.kt"); } @TestMetadata("returnsAndCalls.kt") public void testReturnsAndCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/returnsAndCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/returnsAndCalls.kt"); } } @@ -1287,62 +1235,57 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorsTests extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorsTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("andOperator.kt") public void testAndOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperator.kt"); } @TestMetadata("andOperatorWithConstant.kt") public void testAndOperatorWithConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithConstant.kt"); } @TestMetadata("andOperatorWithUnknown.kt") public void testAndOperatorWithUnknown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithUnknown.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithUnknown.kt"); } @TestMetadata("equalsOperator.kt") public void testEqualsOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsOperator.kt"); } @TestMetadata("equalsWithNullableBoolean.kt") public void testEqualsWithNullableBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsWithNullableBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsWithNullableBoolean.kt"); } @TestMetadata("isInstanceOperator.kt") public void testIsInstanceOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/isInstanceOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/isInstanceOperator.kt"); } @TestMetadata("orOperator.kt") public void testOrOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperator.kt"); } @TestMetadata("orOperatorWithConstant.kt") public void testOrOperatorWithConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithConstant.kt"); } @TestMetadata("orOperatorWithUnknown.kt") public void testOrOperatorWithUnknown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithUnknown.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithUnknown.kt"); } } @@ -1350,26 +1293,27 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("withSubject.kt") public void testWithSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubject.kt"); } @TestMetadata("withSubjectNullableBoolean.kt") public void testWithSubjectNullableBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubjectNullableBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubjectNullableBoolean.kt"); } @TestMetadata("withoutSubject.kt") public void testWithoutSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withoutSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withoutSubject.kt"); } } } @@ -1379,280 +1323,244 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReferences.kt"); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutineContext.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutineContext.kt"); } @TestMetadata("coroutinesDisabled.kt") public void testCoroutinesDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesDisabled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesDisabled.kt"); } @TestMetadata("coroutinesEnabledWithWarning.kt") public void testCoroutinesEnabledWithWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesEnabledWithWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesEnabledWithWarning.kt"); } @TestMetadata("illegalSuspendCalls.kt") public void testIllegalSuspendCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCalls.kt"); } @TestMetadata("illegalSuspendCallsForDelegated.kt") public void testIllegalSuspendCallsForDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCallsForDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCallsForDelegated.kt"); } @TestMetadata("irrelevantSuspendDeclarations.kt") public void testIrrelevantSuspendDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/irrelevantSuspendDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/irrelevantSuspendDeclarations.kt"); } @TestMetadata("kt18292.kt") public void testKt18292() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); } @TestMetadata("lambdaExpectedType.kt") public void testLambdaExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt"); } @TestMetadata("mixingSuspendability.kt") public void testMixingSuspendability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/mixingSuspendability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/mixingSuspendability.kt"); } @TestMetadata("modifierFormForNonBuiltInSuspend.kt") public void testModifierFormForNonBuiltInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspend.kt"); } @TestMetadata("modifierFormForNonBuiltInSuspendWithAnyParameter.kt") public void testModifierFormForNonBuiltInSuspendWithAnyParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspendWithAnyParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspendWithAnyParameter.kt"); } @TestMetadata("noDefaultCoroutineImports.kt") public void testNoDefaultCoroutineImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); } @TestMetadata("nonLocalSuspension.kt") public void testNonLocalSuspension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonLocalSuspension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonLocalSuspension.kt"); } @TestMetadata("nonModifierFormForBuiltIn.kt") public void testNonModifierFormForBuiltIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltIn.kt"); } @TestMetadata("nonModifierFormForBuiltInRenameOnImport.kt") public void testNonModifierFormForBuiltInRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInRenameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInRenameOnImport.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/operators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/operators.kt"); } @TestMetadata("returnLabelForBuiltInSuspend.kt") public void testReturnLabelForBuiltInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/returnLabelForBuiltInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/returnLabelForBuiltInSuspend.kt"); } @TestMetadata("suspendApplicability.kt") public void testSuspendApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); } @TestMetadata("suspendConflictsWithNoSuspend.kt") public void testSuspendConflictsWithNoSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.kt"); } @TestMetadata("suspendCoroutineOrReturn.kt") public void testSuspendCoroutineOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); } @TestMetadata("suspendCoroutineUnavailableWithNewAPI.kt") public void testSuspendCoroutineUnavailableWithNewAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithNewAPI.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithNewAPI.kt"); } @TestMetadata("suspendCoroutineUnavailableWithOldAPI.kt") public void testSuspendCoroutineUnavailableWithOldAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt"); } @TestMetadata("suspendDestructuring.kt") public void testSuspendDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendDestructuring.kt"); } @TestMetadata("suspendExternalFunctions.kt") public void testSuspendExternalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt"); } @TestMetadata("suspendFunctions.kt") public void testSuspendFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); } @TestMetadata("suspendLambda.kt") public void testSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendOverridability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendOverridability.kt"); } @TestMetadata("suspesionInDefaultValue.kt") public void testSuspesionInDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspesionInDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspesionInDefaultValue.kt"); } @TestMetadata("tryCatchLambda.kt") public void testTryCatchLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tryCatchLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tryCatchLambda.kt"); } @TestMetadata("unsupported.kt") public void testUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("correctMember.kt") public void testCorrectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/correctMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/correctMember.kt"); } @TestMetadata("extensionPriority.kt") public void testExtensionPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionPriority.kt"); } @TestMetadata("extensionSuspend.kt") public void testExtensionSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionSuspend.kt"); } @TestMetadata("incorrectCalls.kt") public void testIncorrectCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/incorrectCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/incorrectCalls.kt"); } @TestMetadata("kt15516.kt") public void testKt15516() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt15516.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt15516.kt"); } @TestMetadata("recursiveGenerators.kt") public void testRecursiveGenerators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators.kt"); } @TestMetadata("recursiveGenerators2.kt") public void testRecursiveGenerators2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt"); } @TestMetadata("returnTypeInference.kt") public void testReturnTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference.kt"); } @TestMetadata("returnTypeInference2.kt") public void testReturnTypeInference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference2.kt"); } @TestMetadata("simpleGenerator.kt") public void testSimpleGenerator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/simpleGenerator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/simpleGenerator.kt"); } @TestMetadata("typeFromReceiver.kt") public void testTypeFromReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/typeFromReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/typeFromReceiver.kt"); } @TestMetadata("withParameter.kt") public void testWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withParameter.kt"); } @TestMetadata("withUninferredParameter.kt") public void testWithUninferredParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt"); } } @@ -1660,80 +1568,72 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineCrossinline extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineCrossinline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") public void testInlineOrdinaryOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") public void testInlineOrdinaryOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfOrdinary.kt") public void testInlineOrdinaryOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); } @TestMetadata("inlineOrdinaryOfSuspend.kt") public void testInlineOrdinaryOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); } } @@ -1741,38 +1641,37 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RestrictSuspension extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRestrictSuspension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allMembersAllowed.kt") public void testAllMembersAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); } @TestMetadata("extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); } @TestMetadata("notRelatedFun.kt") public void testNotRelatedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); } @TestMetadata("sameInstance.kt") public void testSameInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); } @TestMetadata("simpleForbidden.kt") public void testSimpleForbidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); } } @@ -1780,92 +1679,82 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionType extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionVsSuspendFunction.kt") public void testFunctionVsSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.kt"); } @TestMetadata("inference1.kt") public void testInference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference1.kt"); } @TestMetadata("inference2.kt") public void testInference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference2.kt"); } @TestMetadata("inference3.kt") public void testInference3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference3.kt"); } @TestMetadata("inference4.kt") public void testInference4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference4.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference4.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inline.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/invoke.kt"); } @TestMetadata("lambdaInOverriddenValInitializer.kt") public void testLambdaInOverriddenValInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt"); } @TestMetadata("lambdaInValInitializer.kt") public void testLambdaInValInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInValInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInValInitializer.kt"); } @TestMetadata("modifierApplicability.kt") public void testModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/modifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/modifierApplicability.kt"); } @TestMetadata("noInvokeForSuspendFunction.kt") public void testNoInvokeForSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noInvokeForSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noInvokeForSuspendFunction.kt"); } @TestMetadata("noValueParameters.kt") public void testNoValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noValueParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noValueParameters.kt"); } @TestMetadata("nullableSuspendFunction.kt") public void testNullableSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt"); } @TestMetadata("suspendFunctionNIsUnresolved.kt") public void testSuspendFunctionNIsUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt"); } } @@ -1873,44 +1762,42 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCalls extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forbidden.kt") public void testForbidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); } @TestMetadata("localFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt"); } @TestMetadata("nothingTypedSuspendFunction.kt") public void testNothingTypedSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/recursive.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); } @TestMetadata("valid.kt") public void testValid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); } } } @@ -1919,76 +1806,74 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateJvmSignature extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/delegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/delegatedProperty.kt"); } @TestMetadata("jvmNames.kt") public void testJvmNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNames.kt"); } @TestMetadata("jvmNamesDuplicate.kt") public void testJvmNamesDuplicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNamesDuplicate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNamesDuplicate.kt"); } @TestMetadata("jvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmOverloads.kt"); } @TestMetadata("jvmStaticInClassObject.kt") public void testJvmStaticInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInClassObject.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInObject.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jjk.kt") public void testJjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jjk.kt"); } @TestMetadata("jk.kt") public void testJk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jk.kt"); } @TestMetadata("jkjk.kt") public void testJkjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jkjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jkjk.kt"); } @TestMetadata("kotlinMembersVsJavaNonVisibleStatics.kt") public void testKotlinMembersVsJavaNonVisibleStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); } } } @@ -1997,146 +1882,127 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Experimental extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExperimental() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/experimental"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt"); } @TestMetadata("bodyUsageInSameModule.kt") public void testBodyUsageInSameModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsageInSameModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsageInSameModule.kt"); } @TestMetadata("bodyUsages.kt") public void testBodyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt"); } @TestMetadata("classMembersOverlyExperimental.kt") public void testClassMembersOverlyExperimental() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt"); } @TestMetadata("compilationVsLinkageVsRuntime.kt") public void testCompilationVsLinkageVsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/compilationVsLinkageVsRuntime.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/compilationVsLinkageVsRuntime.kt"); } @TestMetadata("constVal.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt"); } @TestMetadata("deeplyNestedClass.kt") public void testDeeplyNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt"); } @TestMetadata("errors.kt") public void testErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt"); } @TestMetadata("experimentalOnWholeModule.kt") public void testExperimentalOnWholeModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnWholeModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnWholeModule.kt"); } @TestMetadata("experimentalWithNoImpact.kt") public void testExperimentalWithNoImpact() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalWithNoImpact.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalWithNoImpact.kt"); } @TestMetadata("incorrectTargetsForExperimentalAnnotation.kt") public void testIncorrectTargetsForExperimentalAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt"); } @TestMetadata("incorrectUseExperimental.kt") public void testIncorrectUseExperimental() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt"); } @TestMetadata("indirectBodyUsageInAnotherModule.kt") public void testIndirectBodyUsageInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/indirectBodyUsageInAnotherModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/indirectBodyUsageInAnotherModule.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt"); } @TestMetadata("overrideDifferentExperimentalities.kt") public void testOverrideDifferentExperimentalities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt"); } @TestMetadata("scripts.kt") public void testScripts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt"); } @TestMetadata("typealias.kt") public void testTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt"); } @TestMetadata("useExperimentalOnFile.kt") public void testUseExperimentalOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt"); } @TestMetadata("useExperimentalOnWholeModule.kt") public void testUseExperimentalOnWholeModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnWholeModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnWholeModule.kt"); } @TestMetadata("useExperimentalTargets.kt") public void testUseExperimentalTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalTargets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalTargets.kt"); } @TestMetadata("useExperimentalWithSeveralAnnotations.kt") public void testUseExperimentalWithSeveralAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt"); } } @@ -2144,38 +2010,37 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayLoop extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInArrayLoop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedRangeVariableAssignmentBefore13.kt") public void testCapturedRangeVariableAssignmentBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/capturedRangeVariableAssignmentBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/capturedRangeVariableAssignmentBefore13.kt"); } @TestMetadata("forInFieldUpdatedInLoopBodyBefore13.kt") public void testForInFieldUpdatedInLoopBodyBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/forInFieldUpdatedInLoopBodyBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/forInFieldUpdatedInLoopBodyBefore13.kt"); } @TestMetadata("rangeLocalDelegatedPropertyAssignmentBefore13.kt") public void testRangeLocalDelegatedPropertyAssignmentBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeLocalDelegatedPropertyAssignmentBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeLocalDelegatedPropertyAssignmentBefore13.kt"); } @TestMetadata("rangeVariableAssignment13.kt") public void testRangeVariableAssignment13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignment13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignment13.kt"); } @TestMetadata("rangeVariableAssignmentBefore13.kt") public void testRangeVariableAssignmentBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignmentBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignmentBefore13.kt"); } } @@ -2183,14 +2048,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("pseudocodeMemoryOverhead.kt") public void testPseudocodeMemoryOverhead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt"); } } @@ -2198,88 +2066,84 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/arrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/arrayConstructor.kt"); } @TestMetadata("kt11266.kt") public void testKt11266() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt"); } @TestMetadata("kt1558.kt") public void testKt1558() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt"); } @TestMetadata("kt3458.kt") public void testKt3458() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt3458.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt3458.kt"); } @TestMetadata("kt4975.kt") public void testKt4975() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationsForResolve extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationsForResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exactAnnotation.kt") public void testExactAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotation.kt"); } @TestMetadata("internalAnnotationsOnTypes.kt") public void testInternalAnnotationsOnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt"); } @TestMetadata("noInferAndLowPriority.kt") public void testNoInferAndLowPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.kt"); } @TestMetadata("noInferAnnotation.kt") public void testNoInferAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.kt"); } @TestMetadata("onlyInputTypesAndLowPriority.kt") public void testOnlyInputTypesAndLowPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.kt"); } @TestMetadata("onlyInputTypesAnnotationWithPlatformTypes.kt") public void testOnlyInputTypesAnnotationWithPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt"); } @TestMetadata("resolveWithOnlyInputTypesAnnotation.kt") public void testResolveWithOnlyInputTypesAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.kt"); } } } @@ -2288,14 +2152,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOnlySuppressesNothingToInline.kt") public void testInlineOnlySuppressesNothingToInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt"); } } @@ -2303,14 +2170,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("patternCompileCallableReference.kt") public void testPatternCompileCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/java/patternCompileCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/java/patternCompileCallableReference.kt"); } } @@ -2318,14 +2188,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt7585 extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt7585() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/kt7585"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt7585/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/kt7585/delegate.kt"); } } @@ -2333,14 +2206,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("isInitialized.kt") public void testIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/lateinit/isInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/lateinit/isInitialized.kt"); } } @@ -2348,10 +2224,13 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/abstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/abstract.kt"); } public void testAllFilesPresentInNative() throws Exception { @@ -2360,50 +2239,42 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestMetadata("body.kt") public void testBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/body.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/body.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/constructor.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/inline.kt"); } @TestMetadata("noBody.kt") public void testNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt"); } @TestMetadata("nonFunction.kt") public void testNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/override.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/override.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/reified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/reified.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/trait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/trait.kt"); } } @@ -2411,68 +2282,62 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PurelyImplementedCollection extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPurelyImplementedCollection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayList.kt"); } @TestMetadata("arrayListNullable.kt") public void testArrayListNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayListNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayListNullable.kt"); } @TestMetadata("customClassMutableCollection.kt") public void testCustomClassMutableCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.kt"); } @TestMetadata("customClassMutableList.kt") public void testCustomClassMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.kt"); } @TestMetadata("invalidFqName.kt") public void testInvalidFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.kt"); } @TestMetadata("maps.kt") public void testMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.kt"); } @TestMetadata("mapsWithNullableKey.kt") public void testMapsWithNullableKey() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt"); } @TestMetadata("mapsWithNullableValues.kt") public void testMapsWithNullableValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.kt"); } @TestMetadata("sets.kt") public void testSets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/sets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/sets.kt"); } @TestMetadata("wrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.kt"); } } @@ -2480,62 +2345,57 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regression extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/regression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ea63992.kt") public void testEa63992() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt"); } @TestMetadata("ea65206.kt") public void testEa65206() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea65206.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea65206.kt"); } @TestMetadata("ea66827_dataClassWrongToString.kt") public void testEa66827_dataClassWrongToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt"); } @TestMetadata("ea70485_functionTypeInheritor.kt") public void testEa70485_functionTypeInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.kt"); } @TestMetadata("ea70880_illegalJvmName.kt") public void testEa70880_illegalJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.kt"); } @TestMetadata("kt10001.kt") public void testKt10001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt10001.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt10001.kt"); } @TestMetadata("kt2082.kt") public void testKt2082() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.kt"); } @TestMetadata("kt9345.kt") public void testKt9345() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt9345.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt9345.kt"); } @TestMetadata("kt9820_javaFunctionTypeInheritor.kt") public void testKt9820_javaFunctionTypeInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.kt"); } } @@ -2543,32 +2403,32 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayConstruction.kt") public void testArrayConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/arrayConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/arrayConstruction.kt"); } @TestMetadata("arrayOfNullsReified.kt") public void testArrayOfNullsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/arrayOfNullsReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/arrayOfNullsReified.kt"); } @TestMetadata("nonCallableReiefied.kt") public void testNonCallableReiefied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/nonCallableReiefied.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/nonCallableReiefied.kt"); } @TestMetadata("reifiedNothingSubstitution.kt") public void testReifiedNothingSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/reifiedNothingSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/reifiedNothingSubstitution.kt"); } } @@ -2576,86 +2436,77 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hidesMembers.kt") public void testHidesMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.kt"); } @TestMetadata("hidesMembers2.kt") public void testHidesMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.kt"); } @TestMetadata("javaPackageMembers.kt") public void testJavaPackageMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/javaPackageMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/javaPackageMembers.kt"); } @TestMetadata("javaStaticMembers.kt") public void testJavaStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt"); } @TestMetadata("kt10103.kt") public void testKt10103() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt"); } @TestMetadata("kt10732a.kt") public void testKt10732a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10732a.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10732a.kt"); } @TestMetadata("kt4711.kt") public void testKt4711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt4711.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/kt4711.kt"); } @TestMetadata("samAgainstFunctionalType.kt") public void testSamAgainstFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.kt"); } @TestMetadata("samConstructorVsFun.kt") public void testSamConstructorVsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samConstructorVsFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samConstructorVsFun.kt"); } @TestMetadata("samOverloadsWithGenerics.kt") public void testSamOverloadsWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); } @TestMetadata("samOverloadsWithGenericsWithoutRefinedSams.kt") public void testSamOverloadsWithGenericsWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); } @TestMetadata("samOverloadsWithKtFunction.kt") public void testSamOverloadsWithKtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); } @TestMetadata("samOverloadsWithKtFunctionWithoutRefinedSams.kt") public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); } } @@ -2663,86 +2514,77 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smartcasts extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartcasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/smartcasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forEachSafe.kt") public void testForEachSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachSafe.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachSafe.kt"); } @TestMetadata("forEachUnsafe.kt") public void testForEachUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/kt10463.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/kt10463.kt"); } @TestMetadata("lazyDeclaresAndModifies.kt") public void testLazyDeclaresAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/lazyDeclaresAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/lazyDeclaresAndModifies.kt"); } @TestMetadata("letAlwaysChangesToNotNull.kt") public void testLetAlwaysChangesToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.kt"); } @TestMetadata("letChangesToNotNull.kt") public void testLetChangesToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNotNull.kt"); } @TestMetadata("letChangesToNull.kt") public void testLetChangesToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNull.kt"); } @TestMetadata("letChangesToNullComplex.kt") public void testLetChangesToNullComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNullComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNullComplex.kt"); } @TestMetadata("letMergeNotNull.kt") public void testLetMergeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.kt"); } @TestMetadata("letStable.kt") public void testLetStable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letStable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letStable.kt"); } @TestMetadata("letUsesOwnReceiver.kt") public void testLetUsesOwnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letUsesOwnReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letUsesOwnReceiver.kt"); } @TestMetadata("listOfGeneric.kt") public void testListOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt"); } @TestMetadata("withChangesToNull.kt") public void testWithChangesToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt"); } } @@ -2750,14 +2592,17 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceCompatibility extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noDefaultImportOfKotlinComparisons.kt") public void testNoDefaultImportOfKotlinComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); } } @@ -2765,20 +2610,22 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TargetedBuiltIns extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("blackListed.kt") public void testBlackListed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); } } @@ -2786,44 +2633,42 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exceptionTypeAliases.kt") public void testExceptionTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliases.kt"); } @TestMetadata("exceptionTypeAliasesInvisibleWithApiVersion1_0.kt") public void testExceptionTypeAliasesInvisibleWithApiVersion1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); } @TestMetadata("exceptionTypeAliasesInvisibleWithoutFeature.kt") public void testExceptionTypeAliasesInvisibleWithoutFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); } @TestMetadata("hashMapTypeAlias.kt") public void testHashMapTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/hashMapTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/hashMapTypeAlias.kt"); } @TestMetadata("typeAliasSamAdapterConstructors.kt") public void testTypeAliasSamAdapterConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt"); } @TestMetadata("typeAliasSamAdapterConstructors2.kt") public void testTypeAliasSamAdapterConstructors2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt"); } } @@ -2831,26 +2676,27 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt3213.kt") public void testKt3213() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs/kt3213.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/varargs/kt3213.kt"); } @TestMetadata("kt4172j.kt") public void testKt4172j() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs/kt4172j.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/varargs/kt4172j.kt"); } @TestMetadata("kt5534.kt") public void testKt5534() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.kt"); } } @@ -2858,26 +2704,27 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractDiagnosticsTestWithStdLib { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10192.kt") public void testKt10192() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt"); } @TestMetadata("kt10807.kt") public void testKt10807() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/when/kt10807.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/when/kt10807.kt"); } @TestMetadata("noTypeArgumentsInConstructor.kt") public void testNoTypeArgumentsInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/when/noTypeArgumentsInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/when/noTypeArgumentsInConstructor.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsWithJdk9TestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsWithJdk9TestGenerated.java index ab40b5d7422..4f4718939fd 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsWithJdk9TestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsWithJdk9TestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticsWithJdk9TestGenerated extends AbstractDiagnosticsWithJdk9Test { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestsWithJava9() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJava9"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt11167.kt") public void testKt11167() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJava9/kt11167.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithJava9/kt11167.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java index 96304b7e14f..7453058abab 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathTestGenerated.java @@ -21,108 +21,106 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("android_support.kt") public void testAndroid_support() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/android_support.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); } @TestMetadata("androidx.kt") public void testAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/androidx.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); } @TestMetadata("aosp.kt") public void testAosp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/aosp.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); } @TestMetadata("findBugsSimple.kt") public void testFindBugsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); } @TestMetadata("irrelevantQualifierNicknames.kt") public void testIrrelevantQualifierNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); } @TestMetadata("lombokSimple.kt") public void testLombokSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); } @TestMetadata("rxjava.kt") public void testRxjava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonNullNever.kt") public void testNonNullNever() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIgnore() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); } } @@ -130,178 +128,159 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); } @TestMetadata("localInference.kt") public void testLocalInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); } @TestMetadata("nullabilityGenerics.kt") public void testNullabilityGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); } @TestMetadata("safeCalls.kt") public void testSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arithmetic.kt") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); } @TestMetadata("assignToVar.kt") public void testAssignToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); } @TestMetadata("dataFlowInfo.kt") public void testDataFlowInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); } @TestMetadata("derefenceExtension.kt") public void testDerefenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); } @TestMetadata("derefenceMember.kt") public void testDerefenceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); } @TestMetadata("functionArguments.kt") public void testFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); } @TestMetadata("kt6829.kt") public void testKt6829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); } @TestMetadata("passToJava.kt") public void testPassToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); } @TestMetadata("uselessElvisRightIsNull.kt") public void testUselessElvisRightIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); } } @@ -309,56 +288,52 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("equalsOnNonNull.kt") public void testEqualsOnNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -367,62 +342,57 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("forceFlexibility.kt") public void testForceFlexibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); } @TestMetadata("forceFlexibleOverOverrides.kt") public void testForceFlexibleOverOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -431,6 +401,10 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -439,62 +413,57 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customMigration.kt") public void testCustomMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); } @TestMetadata("globalIgnore.kt") public void testGlobalIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); } @TestMetadata("globalWarningMigrationIgnore.kt") public void testGlobalWarningMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); } @TestMetadata("migrationError.kt") public void testMigrationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); } @TestMetadata("migrationIgnore.kt") public void testMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); } @TestMetadata("migrationWarning.kt") public void testMigrationWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); } @TestMetadata("overrideConflicts.kt") public void testOverrideConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); } @TestMetadata("specialCollision.kt") public void testSpecialCollision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); } @TestMetadata("stateRefinement.kt") public void testStateRefinement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); } } } @@ -503,14 +472,17 @@ public class ForeignAnnotationsNoAnnotationInClasspathTestGenerated extends Abst @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAndNicknameMigrationPolicy.kt") public void testDefaultAndNicknameMigrationPolicy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java index 9494b559b54..f772d39b59e 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated.java @@ -21,108 +21,106 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("android_support.kt") public void testAndroid_support() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/android_support.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); } @TestMetadata("androidx.kt") public void testAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/androidx.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); } @TestMetadata("aosp.kt") public void testAosp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/aosp.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); } @TestMetadata("findBugsSimple.kt") public void testFindBugsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); } @TestMetadata("irrelevantQualifierNicknames.kt") public void testIrrelevantQualifierNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); } @TestMetadata("lombokSimple.kt") public void testLombokSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); } @TestMetadata("rxjava.kt") public void testRxjava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/rxjava.kt"); } @TestMetadata("compiler/testData/foreignAnnotations/tests/jsr305") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jsr305 extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonNullNever.kt") public void testNonNullNever() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - doTest(fileName); + 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 AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIgnore() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); } } @@ -130,178 +128,159 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); } @TestMetadata("localInference.kt") public void testLocalInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); } @TestMetadata("nullabilityGenerics.kt") public void testNullabilityGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); } @TestMetadata("safeCalls.kt") public void testSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - doTest(fileName); + 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 AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arithmetic.kt") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); } @TestMetadata("assignToVar.kt") public void testAssignToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); } @TestMetadata("dataFlowInfo.kt") public void testDataFlowInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); } @TestMetadata("derefenceExtension.kt") public void testDerefenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); } @TestMetadata("derefenceMember.kt") public void testDerefenceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); } @TestMetadata("functionArguments.kt") public void testFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); } @TestMetadata("kt6829.kt") public void testKt6829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); } @TestMetadata("passToJava.kt") public void testPassToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); } @TestMetadata("uselessElvisRightIsNull.kt") public void testUselessElvisRightIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); } } @@ -309,56 +288,52 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("equalsOnNonNull.kt") public void testEqualsOnNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -367,62 +342,57 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("forceFlexibility.kt") public void testForceFlexibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); } @TestMetadata("forceFlexibleOverOverrides.kt") public void testForceFlexibleOverOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -431,6 +401,10 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -439,62 +413,57 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customMigration.kt") public void testCustomMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); } @TestMetadata("globalIgnore.kt") public void testGlobalIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); } @TestMetadata("globalWarningMigrationIgnore.kt") public void testGlobalWarningMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); } @TestMetadata("migrationError.kt") public void testMigrationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); } @TestMetadata("migrationIgnore.kt") public void testMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); } @TestMetadata("migrationWarning.kt") public void testMigrationWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); } @TestMetadata("overrideConflicts.kt") public void testOverrideConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); } @TestMetadata("specialCollision.kt") public void testSpecialCollision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); } @TestMetadata("stateRefinement.kt") public void testStateRefinement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); } } } @@ -503,14 +472,17 @@ public class ForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTestGe @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsNoAnnotationInClasspathWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAndNicknameMigrationPolicy.kt") public void testDefaultAndNicknameMigrationPolicy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java index 6e2dae54ff7..71b89560089 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/ForeignAnnotationsTestGenerated.java @@ -21,108 +21,106 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("android_support.kt") public void testAndroid_support() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/android_support.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); } @TestMetadata("androidx.kt") public void testAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/androidx.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); } @TestMetadata("aosp.kt") public void testAosp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/aosp.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); } @TestMetadata("findBugsSimple.kt") public void testFindBugsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); } @TestMetadata("irrelevantQualifierNicknames.kt") public void testIrrelevantQualifierNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); } @TestMetadata("lombokSimple.kt") public void testLombokSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); } @TestMetadata("rxjava.kt") public void testRxjava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonNullNever.kt") public void testNonNullNever() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIgnore() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); } } @@ -130,178 +128,159 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityWarnings extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); } @TestMetadata("localInference.kt") public void testLocalInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); } @TestMetadata("nullabilityGenerics.kt") public void testNullabilityGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); } @TestMetadata("safeCalls.kt") public void testSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arithmetic.kt") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); } @TestMetadata("assignToVar.kt") public void testAssignToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); } @TestMetadata("dataFlowInfo.kt") public void testDataFlowInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); } @TestMetadata("derefenceExtension.kt") public void testDerefenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); } @TestMetadata("derefenceMember.kt") public void testDerefenceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); } @TestMetadata("functionArguments.kt") public void testFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); } @TestMetadata("kt6829.kt") public void testKt6829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); } @TestMetadata("passToJava.kt") public void testPassToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); } @TestMetadata("uselessElvisRightIsNull.kt") public void testUselessElvisRightIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); } } @@ -309,56 +288,52 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("equalsOnNonNull.kt") public void testEqualsOnNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -367,62 +342,57 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("forceFlexibility.kt") public void testForceFlexibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); } @TestMetadata("forceFlexibleOverOverrides.kt") public void testForceFlexibleOverOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -431,6 +401,10 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jsr305NullabilityWarnings extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -439,62 +413,57 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customMigration.kt") public void testCustomMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); } @TestMetadata("globalIgnore.kt") public void testGlobalIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); } @TestMetadata("globalWarningMigrationIgnore.kt") public void testGlobalWarningMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); } @TestMetadata("migrationError.kt") public void testMigrationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); } @TestMetadata("migrationIgnore.kt") public void testMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); } @TestMetadata("migrationWarning.kt") public void testMigrationWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); } @TestMetadata("overrideConflicts.kt") public void testOverrideConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); } @TestMetadata("specialCollision.kt") public void testSpecialCollision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); } @TestMetadata("stateRefinement.kt") public void testStateRefinement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); } } } @@ -503,14 +472,17 @@ public class ForeignAnnotationsTestGenerated extends AbstractForeignAnnotationsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAndNicknameMigrationPolicy.kt") public void testDefaultAndNicknameMigrationPolicy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java index e83b462b4b8..3aa1be39eeb 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAllProjection.kt") public void testAddAllProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/addAllProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/addAllProjection.kt"); } public void testAllFilesPresentInTestsWithStdLib() throws Exception { @@ -33,246 +36,216 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestMetadata("ArrayOfNothing.kt") public void testArrayOfNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt"); } @TestMetadata("CallCompanionProtectedNonStatic.kt") public void testCallCompanionProtectedNonStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/CallCompanionProtectedNonStatic.kt"); } @TestMetadata("CallToMainRedeclaredInMultiFile.kt") public void testCallToMainRedeclaredInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/CallToMainRedeclaredInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/CallToMainRedeclaredInMultiFile.kt"); } @TestMetadata("commonCollections.kt") public void testCommonCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/commonCollections.kt"); } @TestMetadata("elvisOnJavaList.kt") public void testElvisOnJavaList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnJavaList.kt"); } @TestMetadata("elvisOnUnitInLet.kt") public void testElvisOnUnitInLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/elvisOnUnitInLet.kt"); } @TestMetadata("hugeUnresolvedKotlinxHtml.kt") public void testHugeUnresolvedKotlinxHtml() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/hugeUnresolvedKotlinxHtml.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/hugeUnresolvedKotlinxHtml.kt"); } @TestMetadata("ifElseJavaList.kt") public void testIfElseJavaList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/ifElseJavaList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/ifElseJavaList.kt"); } @TestMetadata("implicitCastToAny.kt") public void testImplicitCastToAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/implicitCastToAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/implicitCastToAny.kt"); } @TestMetadata("InaccessibleInternalClass.kt") public void testInaccessibleInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/InaccessibleInternalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/InaccessibleInternalClass.kt"); } @TestMetadata("instar.kt") public void testInstar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/instar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/instar.kt"); } @TestMetadata("javaClassOnCompanion.kt") public void testJavaClassOnCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/javaClassOnCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/javaClassOnCompanion.kt"); } @TestMetadata("javaForKClass.kt") public void testJavaForKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/javaForKClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/javaForKClass.kt"); } @TestMetadata("kt9078.kt") public void testKt9078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt9078.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/kt9078.kt"); } @TestMetadata("kt9985.kt") public void testKt9985() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt9985.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/kt9985.kt"); } @TestMetadata("outstar.kt") public void testOutstar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/outstar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/outstar.kt"); } @TestMetadata("overrideWithFunctionalType.kt") public void testOverrideWithFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/overrideWithFunctionalType.kt"); } @TestMetadata("PropertyDelegateWithPrivateSet.kt") public void testPropertyDelegateWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/PropertyDelegateWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/PropertyDelegateWithPrivateSet.kt"); } @TestMetadata("pureReifiable.kt") public void testPureReifiable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/pureReifiable.kt"); } @TestMetadata("pureReifiableArrayOperations.kt") public void testPureReifiableArrayOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/pureReifiableArrayOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/pureReifiableArrayOperations.kt"); } @TestMetadata("RedeclarationMainInMultiFileClass.kt") public void testRedeclarationMainInMultiFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/RedeclarationMainInMultiFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/RedeclarationMainInMultiFileClass.kt"); } @TestMetadata("RenameOnImportHidesDefaultImport.kt") public void testRenameOnImportHidesDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/RenameOnImportHidesDefaultImport.kt"); } @TestMetadata("shadowingInDestructuring.kt") public void testShadowingInDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/shadowingInDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/shadowingInDestructuring.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectAnnotatedWithItsKClass.kt") public void testClassObjectAnnotatedWithItsKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/ClassObjectAnnotatedWithItsKClass.kt"); } @TestMetadata("defaultValueMustBeConstant.kt") public void testDefaultValueMustBeConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/defaultValueMustBeConstant.kt"); } @TestMetadata("JvmSyntheticOnDelegate.kt") public void testJvmSyntheticOnDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/JvmSyntheticOnDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/JvmSyntheticOnDelegate.kt"); } @TestMetadata("qualifiedCallValue.kt") public void testQualifiedCallValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/qualifiedCallValue.kt"); } @TestMetadata("strictfpOnClass.kt") public void testStrictfpOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/strictfpOnClass.kt"); } @TestMetadata("Synchronized.kt") public void testSynchronized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/Synchronized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/Synchronized.kt"); } @TestMetadata("targetuse.kt") public void testTargetuse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/targetuse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/targetuse.kt"); } @TestMetadata("TransientOnDelegate.kt") public void testTransientOnDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/TransientOnDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/TransientOnDelegate.kt"); } @TestMetadata("Volatile.kt") public void testVolatile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/Volatile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/Volatile.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationApplicability extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationApplicability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationsOnUseSiteTargets.kt") public void testAnnotationsOnUseSiteTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/annotationsOnUseSiteTargets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/annotationsOnUseSiteTargets.kt"); } @TestMetadata("illegalPlatformName.kt") public void testIllegalPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/illegalPlatformName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/illegalPlatformName.kt"); } @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/jvmName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/jvmName.kt"); } @TestMetadata("multifileClassPart.kt") public void testMultifileClassPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPart.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPart.kt"); } @TestMetadata("multifileClassPartWithJavaAnnotation.kt") public void testMultifileClassPartWithJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPartWithJavaAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/multifileClassPartWithJavaAnnotation.kt"); } @TestMetadata("suppressOnFunctionReference.kt") public void testSuppressOnFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationApplicability/suppressOnFunctionReference.kt"); } } @@ -280,32 +253,32 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationParameterMustBeConstant extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/array.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/simple.kt"); } @TestMetadata("useOfNonConstVal.kt") public void testUseOfNonConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/useOfNonConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/useOfNonConstVal.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameterMustBeConstant/vararg.kt"); } } @@ -313,56 +286,52 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationParameters extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10136.kt") public void testKt10136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/kt10136.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/kt10136.kt"); } @TestMetadata("nonConstValAsArgument.kt") public void testNonConstValAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/nonConstValAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/nonConstValAsArgument.kt"); } @TestMetadata("orderWithValue.kt") public void testOrderWithValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithValue.kt"); } @TestMetadata("orderWithoutValue.kt") public void testOrderWithoutValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/orderWithoutValue.kt"); } @TestMetadata("valueArray.kt") public void testValueArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArray.kt"); } @TestMetadata("valueArrayAndOtherDefault.kt") public void testValueArrayAndOtherDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayAndOtherDefault.kt"); } @TestMetadata("valueArrayOnly.kt") public void testValueArrayOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayOnly.kt"); } @TestMetadata("valueArrayWithDefault.kt") public void testValueArrayWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationParameters/valueArrayWithDefault.kt"); } } @@ -370,20 +339,22 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationWithVarargParameter extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationWithVarargParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaAnnotationWithVarargArgument.kt") public void testJavaAnnotationWithVarargArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/javaAnnotationWithVarargArgument.kt"); } @TestMetadata("kotlinAnnotationWithVarargArgument.kt") public void testKotlinAnnotationWithVarargArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/annotationWithVarargParameter/kotlinAnnotationWithVarargArgument.kt"); } } @@ -391,80 +362,72 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAnnotationsWithKClassParameter extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAnnotationsWithKClassParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationAsArgument.kt") public void testAnnotationAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/annotationAsArgument.kt"); } @TestMetadata("arg.kt") public void testArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/arg.kt"); } @TestMetadata("argAndOtherDefault.kt") public void testArgAndOtherDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argAndOtherDefault.kt"); } @TestMetadata("argArray.kt") public void testArgArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argArray.kt"); } @TestMetadata("argWithDefault.kt") public void testArgWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefault.kt"); } @TestMetadata("argWithDefaultAndOther.kt") public void testArgWithDefaultAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/argWithDefaultAndOther.kt"); } @TestMetadata("twoArgs.kt") public void testTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/twoArgs.kt"); } @TestMetadata("value.kt") public void testValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/value.kt"); } @TestMetadata("valueAndOtherDefault.kt") public void testValueAndOtherDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueAndOtherDefault.kt"); } @TestMetadata("valueArray.kt") public void testValueArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueArray.kt"); } @TestMetadata("valueWithDefault.kt") public void testValueWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefault.kt"); } @TestMetadata("valueWithDefaultAndOther.kt") public void testValueWithDefaultAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/javaAnnotationsWithKClassParameter/valueWithDefaultAndOther.kt"); } } @@ -472,104 +435,92 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmDefault extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/generic.kt"); } @TestMetadata("javaOverride.kt") public void testJavaOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/javaOverride.kt"); } @TestMetadata("jvmDefaultInInheritance.kt") public void testJvmDefaultInInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultInInheritance.kt"); } @TestMetadata("jvmDefaults.kt") public void testJvmDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaults.kt"); } @TestMetadata("jvmDefaultsWithJava.kt") public void testJvmDefaultsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/jvmDefaultsWithJava.kt"); } @TestMetadata("noJvmDefaultFlag.kt") public void testNoJvmDefaultFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/noJvmDefaultFlag.kt"); } @TestMetadata("notInterface.kt") public void testNotInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/notInterface.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/propertyAccessor.kt"); } @TestMetadata("simpleOverride.kt") public void testSimpleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simpleOverride.kt"); } @TestMetadata("simplePropertyOverride.kt") public void testSimplePropertyOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/simplePropertyOverride.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCall.kt"); } @TestMetadata("superCallAmbiguity.kt") public void testSuperCallAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity.kt"); } @TestMetadata("superCallAmbiguity2.kt") public void testSuperCallAmbiguity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity2.kt"); } @TestMetadata("superCallAmbiguity3.kt") public void testSuperCallAmbiguity3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/superCallAmbiguity3.kt"); } @TestMetadata("target6.kt") public void testTarget6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target6.kt"); } @TestMetadata("target8.kt") public void testTarget8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmDefault/target8.kt"); } } @@ -577,32 +528,32 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmField extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("clashWithCompanionObjectField.kt") public void testClashWithCompanionObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/clashWithCompanionObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/clashWithCompanionObjectField.kt"); } @TestMetadata("inMultiFileFacade.kt") public void testInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inMultiFileFacade.kt"); } @TestMetadata("inSingleFileFacade.kt") public void testInSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inSingleFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/inSingleFileFacade.kt"); } @TestMetadata("jvmFieldApplicability.kt") public void testJvmFieldApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/jvmFieldApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmField/jvmFieldApplicability.kt"); } } @@ -610,26 +561,27 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOverloads extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("JvmOverloadWithNoDefaults.kt") public void testJvmOverloadWithNoDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/JvmOverloadWithNoDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/JvmOverloadWithNoDefaults.kt"); } @TestMetadata("jvmOverloadsOnAbstractMethods.kt") public void testJvmOverloadsOnAbstractMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnAbstractMethods.kt"); } @TestMetadata("jvmOverloadsOnPrivate.kt") public void testJvmOverloadsOnPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmOverloads/jvmOverloadsOnPrivate.kt"); } } @@ -637,14 +589,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("incorrectJvmPackageName.kt") public void testIncorrectJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmPackageName/incorrectJvmPackageName.kt"); } } @@ -652,14 +607,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmSpecialFunctions extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmSpecialFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apiVersionIsAtLeastHasConstArguments.kt") public void testApiVersionIsAtLeastHasConstArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions/apiVersionIsAtLeastHasConstArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmSpecialFunctions/apiVersionIsAtLeastHasConstArguments.kt"); } } @@ -667,74 +625,67 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constOrJvmFieldProperty.kt") public void testConstOrJvmFieldProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constOrJvmFieldProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constOrJvmFieldProperty.kt"); } @TestMetadata("constructorProperty.kt") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructorProperty.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/constructors.kt"); } @TestMetadata("finalAndAbstract.kt") public void testFinalAndAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/finalAndAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/finalAndAbstract.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions.kt"); } @TestMetadata("functions_LL13.kt") public void testFunctions_LL13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/functions_LL13.kt"); } @TestMetadata("interfaceCompanion_LL12.kt") public void testInterfaceCompanion_LL12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL12.kt"); } @TestMetadata("interfaceCompanion_LL13_16.kt") public void testInterfaceCompanion_LL13_16() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_16.kt"); } @TestMetadata("interfaceCompanion_LL13_18.kt") public void testInterfaceCompanion_LL13_18() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_18.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/interfaceCompanion_LL13_18.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/localFun.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/jvmStatic/property.kt"); } } @@ -742,50 +693,47 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClass extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kClassArrayInAnnotationsInVariance.kt") public void testKClassArrayInAnnotationsInVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsInVariance.kt"); } @TestMetadata("kClassArrayInAnnotationsOutVariance.kt") public void testKClassArrayInAnnotationsOutVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassArrayInAnnotationsOutVariance.kt"); } @TestMetadata("kClassInAnnotation.kt") public void testKClassInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotation.kt"); } @TestMetadata("kClassInAnnotationsInVariance.kt") public void testKClassInAnnotationsInVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsInVariance.kt"); } @TestMetadata("kClassInAnnotationsOutVariance.kt") public void testKClassInAnnotationsOutVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInAnnotationsOutVariance.kt"); } @TestMetadata("kClassInvariantTP.kt") public void testKClassInvariantTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassInvariantTP.kt"); } @TestMetadata("kClassOutArrayInAnnotationsOutVariance.kt") public void testKClassOutArrayInAnnotationsOutVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/kClass/kClassOutArrayInAnnotationsOutVariance.kt"); } } @@ -793,38 +741,37 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProhibitPositionedArgument extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProhibitPositionedArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kotlinAnnotation.kt") public void testKotlinAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/kotlinAnnotation.kt"); } @TestMetadata("tooManyArgs.kt") public void testTooManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/tooManyArgs.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/typeMismatch.kt"); } @TestMetadata("withValue.kt") public void testWithValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withValue.kt"); } @TestMetadata("withoutValue.kt") public void testWithoutValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/annotations/prohibitPositionedArgument/withoutValue.kt"); } } } @@ -833,14 +780,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Builtins extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/builtins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/builtins/arraysAreCloneable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/builtins/arraysAreCloneable.kt"); } } @@ -848,26 +798,27 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/cast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsInsideIn.kt") public void testAsInsideIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/cast/AsInsideIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/cast/AsInsideIn.kt"); } @TestMetadata("IsArray.kt") public void testIsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/cast/IsArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/cast/IsArray.kt"); } @TestMetadata("IsReified.kt") public void testIsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/cast/IsReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/cast/IsReified.kt"); } } @@ -875,6 +826,10 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -883,6 +838,10 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Controlflow extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlflow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -891,104 +850,92 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FlowInlining extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFlowInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakContinuesInInlinedLambda.kt") public void testBreakContinuesInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/breakContinuesInInlinedLambda.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/expressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/expressionBody.kt"); } @TestMetadata("implicitCastToAnyInReturnType.kt") public void testImplicitCastToAnyInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/implicitCastToAnyInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/implicitCastToAnyInReturnType.kt"); } @TestMetadata("inlinedLambdaAlwaysThrows.kt") public void testInlinedLambdaAlwaysThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/inlinedLambdaAlwaysThrows.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/inlinedLambdaAlwaysThrows.kt"); } @TestMetadata("irrelevantUnknownClosure.kt") public void testIrrelevantUnknownClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/irrelevantUnknownClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/irrelevantUnknownClosure.kt"); } @TestMetadata("labeledReturns.kt") public void testLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/labeledReturns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/labeledReturns.kt"); } @TestMetadata("nestedTryCatchFinally.kt") public void testNestedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchFinally.kt"); } @TestMetadata("nestedTryCatchs.kt") public void testNestedTryCatchs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nestedTryCatchs.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonLocalReturn.kt"); } @TestMetadata("nonReturningInlinedLambda.kt") public void testNonReturningInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonReturningInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/nonReturningInlinedLambda.kt"); } @TestMetadata("severalJumpOutsFromInlinedLambda.kt") public void testSeveralJumpOutsFromInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/severalJumpOutsFromInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/severalJumpOutsFromInlinedLambda.kt"); } @TestMetadata("throwIfNotCalled.kt") public void testThrowIfNotCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/throwIfNotCalled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/throwIfNotCalled.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatch.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/tryCatchFinally.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/typeMismatch.kt"); } @TestMetadata("unreachableCode.kt") public void testUnreachableCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/unreachableCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/flowInlining/unreachableCode.kt"); } } @@ -996,6 +943,10 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Initialization extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInitialization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1004,26 +955,27 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AtLeastOnce extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAtLeastOnce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("valDefiniteReassignment.kt") public void testValDefiniteReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/valDefiniteReassignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/valDefiniteReassignment.kt"); } @TestMetadata("varDefiniteInitialization.kt") public void testVarDefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varDefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varDefiniteInitialization.kt"); } @TestMetadata("varIndefiniteIntialization.kt") public void testVarIndefiniteIntialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varIndefiniteIntialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/atLeastOnce/varIndefiniteIntialization.kt"); } } @@ -1031,44 +983,42 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExactlyOnce extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExactlyOnce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("valDefiniteInitialization.kt") public void testValDefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteInitialization.kt"); } @TestMetadata("valDefiniteReassignment.kt") public void testValDefiniteReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteReassignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valDefiniteReassignment.kt"); } @TestMetadata("valIndefiniteInitialization.kt") public void testValIndefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valIndefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/valIndefiniteInitialization.kt"); } @TestMetadata("varDefiniteInitalization.kt") public void testVarDefiniteInitalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varDefiniteInitalization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varDefiniteInitalization.kt"); } @TestMetadata("varIndefiniteInitialization.kt") public void testVarIndefiniteInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varIndefiniteInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/varIndefiniteInitialization.kt"); } @TestMetadata("withReceiver.kt") public void testWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/withReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/exactlyOnce/withReceiver.kt"); } } @@ -1076,14 +1026,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unknown extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnknown() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unknownInvocations.kt") public void testUnknownInvocations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown/unknownInvocations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/controlflow/initialization/unknown/unknownInvocations.kt"); } } } @@ -1093,58 +1046,59 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Dsl extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDsl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("useBeforeDeclaration.kt") public void testUseBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/useBeforeDeclaration.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Errors extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErrors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("booleanComparisons.kt") public void testBooleanComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/booleanComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/booleanComparisons.kt"); } @TestMetadata("callInContractDescription.kt") public void testCallInContractDescription() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/callInContractDescription.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/callInContractDescription.kt"); } @TestMetadata("nestedConditionalEffects.kt") public void testNestedConditionalEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/nestedConditionalEffects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/nestedConditionalEffects.kt"); } @TestMetadata("notFirstStatement.kt") public void testNotFirstStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/notFirstStatement.kt"); } @TestMetadata("referenceToProperty.kt") public void testReferenceToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/referenceToProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/referenceToProperty.kt"); } @TestMetadata("unlabeledReceiver.kt") public void testUnlabeledReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/unlabeledReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/dsl/errors/unlabeledReceiver.kt"); } } } @@ -1153,38 +1107,37 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromStdlib extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("check.kt") public void testCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/check.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/check.kt"); } @TestMetadata("fromStandardKt.kt") public void testFromStandardKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/fromStandardKt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/fromStandardKt.kt"); } @TestMetadata("isNullOrBlank.kt") public void testIsNullOrBlank() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrBlank.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrBlank.kt"); } @TestMetadata("isNullOrEmpty.kt") public void testIsNullOrEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrEmpty.kt"); } @TestMetadata("require.kt") public void testRequire() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/require.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/require.kt"); } } @@ -1192,94 +1145,89 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smartcasts extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartcasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchExceptionSpilling.kt") public void testCatchExceptionSpilling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/catchExceptionSpilling.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/catchExceptionSpilling.kt"); } @TestMetadata("compositions.kt") public void testCompositions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/compositions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/compositions.kt"); } @TestMetadata("deeplyNested.kt") public void testDeeplyNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/deeplyNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/deeplyNested.kt"); } @TestMetadata("intersectingInfo.kt") public void testIntersectingInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectingInfo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectingInfo.kt"); } @TestMetadata("intersectionTypes.kt") public void testIntersectionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/intersectionTypes.kt"); } @TestMetadata("nullabilitySmartcastWhenNullability.kt") public void testNullabilitySmartcastWhenNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/nullabilitySmartcastWhenNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/nullabilitySmartcastWhenNullability.kt"); } @TestMetadata("partiallyIncorrect.kt") public void testPartiallyIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/partiallyIncorrect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/partiallyIncorrect.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/receiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/receiver.kt"); } @TestMetadata("throwsEffect.kt") public void testThrowsEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/throwsEffect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/throwsEffect.kt"); } @TestMetadata("typeSmartcastWhenNullability.kt") public void testTypeSmartcastWhenNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/typeSmartcastWhenNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/typeSmartcastWhenNullability.kt"); } @TestMetadata("unreachableBranches.kt") public void testUnreachableBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/unreachableBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/unreachableBranches.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multieffect extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultieffect() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implicitIff.kt") public void testImplicitIff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/implicitIff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/implicitIff.kt"); } @TestMetadata("returnsAndCalls.kt") public void testReturnsAndCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/returnsAndCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/multieffect/returnsAndCalls.kt"); } } @@ -1287,62 +1235,57 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorsTests extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorsTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("andOperator.kt") public void testAndOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperator.kt"); } @TestMetadata("andOperatorWithConstant.kt") public void testAndOperatorWithConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithConstant.kt"); } @TestMetadata("andOperatorWithUnknown.kt") public void testAndOperatorWithUnknown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithUnknown.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/andOperatorWithUnknown.kt"); } @TestMetadata("equalsOperator.kt") public void testEqualsOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsOperator.kt"); } @TestMetadata("equalsWithNullableBoolean.kt") public void testEqualsWithNullableBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsWithNullableBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/equalsWithNullableBoolean.kt"); } @TestMetadata("isInstanceOperator.kt") public void testIsInstanceOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/isInstanceOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/isInstanceOperator.kt"); } @TestMetadata("orOperator.kt") public void testOrOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperator.kt"); } @TestMetadata("orOperatorWithConstant.kt") public void testOrOperatorWithConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithConstant.kt"); } @TestMetadata("orOperatorWithUnknown.kt") public void testOrOperatorWithUnknown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithUnknown.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/operatorsTests/orOperatorWithUnknown.kt"); } } @@ -1350,26 +1293,27 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("withSubject.kt") public void testWithSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubject.kt"); } @TestMetadata("withSubjectNullableBoolean.kt") public void testWithSubjectNullableBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubjectNullableBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withSubjectNullableBoolean.kt"); } @TestMetadata("withoutSubject.kt") public void testWithoutSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withoutSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/contracts/smartcasts/when/withoutSubject.kt"); } } } @@ -1379,280 +1323,244 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/callableReferences.kt"); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutineContext.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutineContext.kt"); } @TestMetadata("coroutinesDisabled.kt") public void testCoroutinesDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesDisabled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesDisabled.kt"); } @TestMetadata("coroutinesEnabledWithWarning.kt") public void testCoroutinesEnabledWithWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesEnabledWithWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/coroutinesEnabledWithWarning.kt"); } @TestMetadata("illegalSuspendCalls.kt") public void testIllegalSuspendCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCalls.kt"); } @TestMetadata("illegalSuspendCallsForDelegated.kt") public void testIllegalSuspendCallsForDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCallsForDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/illegalSuspendCallsForDelegated.kt"); } @TestMetadata("irrelevantSuspendDeclarations.kt") public void testIrrelevantSuspendDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/irrelevantSuspendDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/irrelevantSuspendDeclarations.kt"); } @TestMetadata("kt18292.kt") public void testKt18292() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/kt18292.kt"); } @TestMetadata("lambdaExpectedType.kt") public void testLambdaExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/lambdaExpectedType.kt"); } @TestMetadata("mixingSuspendability.kt") public void testMixingSuspendability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/mixingSuspendability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/mixingSuspendability.kt"); } @TestMetadata("modifierFormForNonBuiltInSuspend.kt") public void testModifierFormForNonBuiltInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspend.kt"); } @TestMetadata("modifierFormForNonBuiltInSuspendWithAnyParameter.kt") public void testModifierFormForNonBuiltInSuspendWithAnyParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspendWithAnyParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/modifierFormForNonBuiltInSuspendWithAnyParameter.kt"); } @TestMetadata("noDefaultCoroutineImports.kt") public void testNoDefaultCoroutineImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/noDefaultCoroutineImports.kt"); } @TestMetadata("nonLocalSuspension.kt") public void testNonLocalSuspension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonLocalSuspension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonLocalSuspension.kt"); } @TestMetadata("nonModifierFormForBuiltIn.kt") public void testNonModifierFormForBuiltIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltIn.kt"); } @TestMetadata("nonModifierFormForBuiltInRenameOnImport.kt") public void testNonModifierFormForBuiltInRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInRenameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/nonModifierFormForBuiltInRenameOnImport.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/operators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/operators.kt"); } @TestMetadata("returnLabelForBuiltInSuspend.kt") public void testReturnLabelForBuiltInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/returnLabelForBuiltInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/returnLabelForBuiltInSuspend.kt"); } @TestMetadata("suspendApplicability.kt") public void testSuspendApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendApplicability.kt"); } @TestMetadata("suspendConflictsWithNoSuspend.kt") public void testSuspendConflictsWithNoSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.kt"); } @TestMetadata("suspendCoroutineOrReturn.kt") public void testSuspendCoroutineOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt"); } @TestMetadata("suspendCoroutineUnavailableWithNewAPI.kt") public void testSuspendCoroutineUnavailableWithNewAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithNewAPI.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithNewAPI.kt"); } @TestMetadata("suspendCoroutineUnavailableWithOldAPI.kt") public void testSuspendCoroutineUnavailableWithOldAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineUnavailableWithOldAPI.kt"); } @TestMetadata("suspendDestructuring.kt") public void testSuspendDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendDestructuring.kt"); } @TestMetadata("suspendExternalFunctions.kt") public void testSuspendExternalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendExternalFunctions.kt"); } @TestMetadata("suspendFunctions.kt") public void testSuspendFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctions.kt"); } @TestMetadata("suspendLambda.kt") public void testSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendLambda.kt"); } @TestMetadata("suspendOverridability.kt") public void testSuspendOverridability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendOverridability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendOverridability.kt"); } @TestMetadata("suspesionInDefaultValue.kt") public void testSuspesionInDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspesionInDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspesionInDefaultValue.kt"); } @TestMetadata("tryCatchLambda.kt") public void testTryCatchLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tryCatchLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tryCatchLambda.kt"); } @TestMetadata("unsupported.kt") public void testUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/unsupported.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("correctMember.kt") public void testCorrectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/correctMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/correctMember.kt"); } @TestMetadata("extensionPriority.kt") public void testExtensionPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionPriority.kt"); } @TestMetadata("extensionSuspend.kt") public void testExtensionSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionSuspend.kt"); } @TestMetadata("incorrectCalls.kt") public void testIncorrectCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/incorrectCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/incorrectCalls.kt"); } @TestMetadata("kt15516.kt") public void testKt15516() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt15516.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt15516.kt"); } @TestMetadata("recursiveGenerators.kt") public void testRecursiveGenerators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators.kt"); } @TestMetadata("recursiveGenerators2.kt") public void testRecursiveGenerators2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/recursiveGenerators2.kt"); } @TestMetadata("returnTypeInference.kt") public void testReturnTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference.kt"); } @TestMetadata("returnTypeInference2.kt") public void testReturnTypeInference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/returnTypeInference2.kt"); } @TestMetadata("simpleGenerator.kt") public void testSimpleGenerator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/simpleGenerator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/simpleGenerator.kt"); } @TestMetadata("typeFromReceiver.kt") public void testTypeFromReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/typeFromReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/typeFromReceiver.kt"); } @TestMetadata("withParameter.kt") public void testWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withParameter.kt"); } @TestMetadata("withUninferredParameter.kt") public void testWithUninferredParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/withUninferredParameter.kt"); } } @@ -1660,80 +1568,72 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineCrossinline extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineCrossinline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOrdinaryOfCrossinlineOrdinary.kt") public void testInlineOrdinaryOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineOrdinary.kt") public void testInlineOrdinaryOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineOrdinary.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfOrdinary.kt") public void testInlineOrdinaryOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfOrdinary.kt"); } @TestMetadata("inlineOrdinaryOfSuspend.kt") public void testInlineOrdinaryOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineOrdinaryOfSuspend.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inlineCrossinline/inlineSuspendOfSuspend.kt"); } } @@ -1741,38 +1641,37 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RestrictSuspension extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRestrictSuspension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allMembersAllowed.kt") public void testAllMembersAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/allMembersAllowed.kt"); } @TestMetadata("extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/extensions.kt"); } @TestMetadata("notRelatedFun.kt") public void testNotRelatedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/notRelatedFun.kt"); } @TestMetadata("sameInstance.kt") public void testSameInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/sameInstance.kt"); } @TestMetadata("simpleForbidden.kt") public void testSimpleForbidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/simpleForbidden.kt"); } } @@ -1780,92 +1679,82 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionType extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionVsSuspendFunction.kt") public void testFunctionVsSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/functionVsSuspendFunction.kt"); } @TestMetadata("inference1.kt") public void testInference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference1.kt"); } @TestMetadata("inference2.kt") public void testInference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference2.kt"); } @TestMetadata("inference3.kt") public void testInference3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference3.kt"); } @TestMetadata("inference4.kt") public void testInference4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference4.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inference4.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/inline.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/invoke.kt"); } @TestMetadata("lambdaInOverriddenValInitializer.kt") public void testLambdaInOverriddenValInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInOverriddenValInitializer.kt"); } @TestMetadata("lambdaInValInitializer.kt") public void testLambdaInValInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInValInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/lambdaInValInitializer.kt"); } @TestMetadata("modifierApplicability.kt") public void testModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/modifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/modifierApplicability.kt"); } @TestMetadata("noInvokeForSuspendFunction.kt") public void testNoInvokeForSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noInvokeForSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noInvokeForSuspendFunction.kt"); } @TestMetadata("noValueParameters.kt") public void testNoValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noValueParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/noValueParameters.kt"); } @TestMetadata("nullableSuspendFunction.kt") public void testNullableSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/nullableSuspendFunction.kt"); } @TestMetadata("suspendFunctionNIsUnresolved.kt") public void testSuspendFunctionNIsUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendFunctionType/suspendFunctionNIsUnresolved.kt"); } } @@ -1873,44 +1762,42 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCalls extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forbidden.kt") public void testForbidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/forbidden.kt"); } @TestMetadata("localFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/localFunctions.kt"); } @TestMetadata("nothingTypedSuspendFunction.kt") public void testNothingTypedSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/recursive.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/tryCatch.kt"); } @TestMetadata("valid.kt") public void testValid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/valid.kt"); } } } @@ -1919,76 +1806,74 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateJvmSignature extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/delegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/delegatedProperty.kt"); } @TestMetadata("jvmNames.kt") public void testJvmNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNames.kt"); } @TestMetadata("jvmNamesDuplicate.kt") public void testJvmNamesDuplicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNamesDuplicate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNamesDuplicate.kt"); } @TestMetadata("jvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmOverloads.kt"); } @TestMetadata("jvmStaticInClassObject.kt") public void testJvmStaticInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInClassObject.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmStaticInObject.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jjk.kt") public void testJjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jjk.kt"); } @TestMetadata("jk.kt") public void testJk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jk.kt"); } @TestMetadata("jkjk.kt") public void testJkjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jkjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/jkjk.kt"); } @TestMetadata("kotlinMembersVsJavaNonVisibleStatics.kt") public void testKotlinMembersVsJavaNonVisibleStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); } } } @@ -1997,146 +1882,127 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Experimental extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExperimental() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/experimental"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt"); } @TestMetadata("bodyUsageInSameModule.kt") public void testBodyUsageInSameModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsageInSameModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsageInSameModule.kt"); } @TestMetadata("bodyUsages.kt") public void testBodyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsages.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt"); } @TestMetadata("classMembersOverlyExperimental.kt") public void testClassMembersOverlyExperimental() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt"); } @TestMetadata("compilationVsLinkageVsRuntime.kt") public void testCompilationVsLinkageVsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/compilationVsLinkageVsRuntime.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/compilationVsLinkageVsRuntime.kt"); } @TestMetadata("constVal.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt"); } @TestMetadata("deeplyNestedClass.kt") public void testDeeplyNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt"); } @TestMetadata("errors.kt") public void testErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt"); } @TestMetadata("experimentalOnWholeModule.kt") public void testExperimentalOnWholeModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnWholeModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnWholeModule.kt"); } @TestMetadata("experimentalWithNoImpact.kt") public void testExperimentalWithNoImpact() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalWithNoImpact.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalWithNoImpact.kt"); } @TestMetadata("incorrectTargetsForExperimentalAnnotation.kt") public void testIncorrectTargetsForExperimentalAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt"); } @TestMetadata("incorrectUseExperimental.kt") public void testIncorrectUseExperimental() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt"); } @TestMetadata("indirectBodyUsageInAnotherModule.kt") public void testIndirectBodyUsageInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/indirectBodyUsageInAnotherModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/indirectBodyUsageInAnotherModule.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt"); } @TestMetadata("overrideDifferentExperimentalities.kt") public void testOverrideDifferentExperimentalities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt"); } @TestMetadata("scripts.kt") public void testScripts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt"); } @TestMetadata("typealias.kt") public void testTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt"); } @TestMetadata("useExperimentalOnFile.kt") public void testUseExperimentalOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt"); } @TestMetadata("useExperimentalOnWholeModule.kt") public void testUseExperimentalOnWholeModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnWholeModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnWholeModule.kt"); } @TestMetadata("useExperimentalTargets.kt") public void testUseExperimentalTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalTargets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalTargets.kt"); } @TestMetadata("useExperimentalWithSeveralAnnotations.kt") public void testUseExperimentalWithSeveralAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt"); } } @@ -2144,38 +2010,37 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayLoop extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInArrayLoop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedRangeVariableAssignmentBefore13.kt") public void testCapturedRangeVariableAssignmentBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/capturedRangeVariableAssignmentBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/capturedRangeVariableAssignmentBefore13.kt"); } @TestMetadata("forInFieldUpdatedInLoopBodyBefore13.kt") public void testForInFieldUpdatedInLoopBodyBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/forInFieldUpdatedInLoopBodyBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/forInFieldUpdatedInLoopBodyBefore13.kt"); } @TestMetadata("rangeLocalDelegatedPropertyAssignmentBefore13.kt") public void testRangeLocalDelegatedPropertyAssignmentBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeLocalDelegatedPropertyAssignmentBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeLocalDelegatedPropertyAssignmentBefore13.kt"); } @TestMetadata("rangeVariableAssignment13.kt") public void testRangeVariableAssignment13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignment13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignment13.kt"); } @TestMetadata("rangeVariableAssignmentBefore13.kt") public void testRangeVariableAssignmentBefore13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignmentBefore13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/forInArrayLoop/rangeVariableAssignmentBefore13.kt"); } } @@ -2183,14 +2048,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("pseudocodeMemoryOverhead.kt") public void testPseudocodeMemoryOverhead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/functionLiterals/pseudocodeMemoryOverhead.kt"); } } @@ -2198,88 +2066,84 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/arrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/arrayConstructor.kt"); } @TestMetadata("kt11266.kt") public void testKt11266() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt"); } @TestMetadata("kt1558.kt") public void testKt1558() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt1558.kt"); } @TestMetadata("kt3458.kt") public void testKt3458() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt3458.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt3458.kt"); } @TestMetadata("kt4975.kt") public void testKt4975() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); } @TestMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationsForResolve extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationsForResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exactAnnotation.kt") public void testExactAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/exactAnnotation.kt"); } @TestMetadata("internalAnnotationsOnTypes.kt") public void testInternalAnnotationsOnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/internalAnnotationsOnTypes.kt"); } @TestMetadata("noInferAndLowPriority.kt") public void testNoInferAndLowPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.kt"); } @TestMetadata("noInferAnnotation.kt") public void testNoInferAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAnnotation.kt"); } @TestMetadata("onlyInputTypesAndLowPriority.kt") public void testOnlyInputTypesAndLowPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.kt"); } @TestMetadata("onlyInputTypesAnnotationWithPlatformTypes.kt") public void testOnlyInputTypesAnnotationWithPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAnnotationWithPlatformTypes.kt"); } @TestMetadata("resolveWithOnlyInputTypesAnnotation.kt") public void testResolveWithOnlyInputTypesAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/resolveWithOnlyInputTypesAnnotation.kt"); } } } @@ -2288,14 +2152,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOnlySuppressesNothingToInline.kt") public void testInlineOnlySuppressesNothingToInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/inline/inlineOnlySuppressesNothingToInline.kt"); } } @@ -2303,14 +2170,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("patternCompileCallableReference.kt") public void testPatternCompileCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/java/patternCompileCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/java/patternCompileCallableReference.kt"); } } @@ -2318,14 +2188,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt7585 extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt7585() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/kt7585"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/kt7585/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/kt7585/delegate.kt"); } } @@ -2333,14 +2206,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("isInitialized.kt") public void testIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/lateinit/isInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/lateinit/isInitialized.kt"); } } @@ -2348,10 +2224,13 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/abstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/abstract.kt"); } public void testAllFilesPresentInNative() throws Exception { @@ -2360,50 +2239,42 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestMetadata("body.kt") public void testBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/body.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/body.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/constructor.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/inline.kt"); } @TestMetadata("noBody.kt") public void testNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/noBody.kt"); } @TestMetadata("nonFunction.kt") public void testNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/nonFunction.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/override.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/override.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/reified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/reified.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/native/trait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/native/trait.kt"); } } @@ -2411,68 +2282,62 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PurelyImplementedCollection extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPurelyImplementedCollection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayList.kt"); } @TestMetadata("arrayListNullable.kt") public void testArrayListNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayListNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/arrayListNullable.kt"); } @TestMetadata("customClassMutableCollection.kt") public void testCustomClassMutableCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.kt"); } @TestMetadata("customClassMutableList.kt") public void testCustomClassMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.kt"); } @TestMetadata("invalidFqName.kt") public void testInvalidFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.kt"); } @TestMetadata("maps.kt") public void testMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/maps.kt"); } @TestMetadata("mapsWithNullableKey.kt") public void testMapsWithNullableKey() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableKey.kt"); } @TestMetadata("mapsWithNullableValues.kt") public void testMapsWithNullableValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/mapsWithNullableValues.kt"); } @TestMetadata("sets.kt") public void testSets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/sets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/sets.kt"); } @TestMetadata("wrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.kt"); } } @@ -2480,62 +2345,57 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regression extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/regression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ea63992.kt") public void testEa63992() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea63992.kt"); } @TestMetadata("ea65206.kt") public void testEa65206() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea65206.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea65206.kt"); } @TestMetadata("ea66827_dataClassWrongToString.kt") public void testEa66827_dataClassWrongToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea66827_dataClassWrongToString.kt"); } @TestMetadata("ea70485_functionTypeInheritor.kt") public void testEa70485_functionTypeInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea70485_functionTypeInheritor.kt"); } @TestMetadata("ea70880_illegalJvmName.kt") public void testEa70880_illegalJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/ea70880_illegalJvmName.kt"); } @TestMetadata("kt10001.kt") public void testKt10001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt10001.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt10001.kt"); } @TestMetadata("kt2082.kt") public void testKt2082() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt2082.kt"); } @TestMetadata("kt9345.kt") public void testKt9345() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt9345.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt9345.kt"); } @TestMetadata("kt9820_javaFunctionTypeInheritor.kt") public void testKt9820_javaFunctionTypeInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.kt"); } } @@ -2543,32 +2403,32 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayConstruction.kt") public void testArrayConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/arrayConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/arrayConstruction.kt"); } @TestMetadata("arrayOfNullsReified.kt") public void testArrayOfNullsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/arrayOfNullsReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/arrayOfNullsReified.kt"); } @TestMetadata("nonCallableReiefied.kt") public void testNonCallableReiefied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/nonCallableReiefied.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/nonCallableReiefied.kt"); } @TestMetadata("reifiedNothingSubstitution.kt") public void testReifiedNothingSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/reified/reifiedNothingSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/reified/reifiedNothingSubstitution.kt"); } } @@ -2576,86 +2436,77 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hidesMembers.kt") public void testHidesMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers.kt"); } @TestMetadata("hidesMembers2.kt") public void testHidesMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/hidesMembers2.kt"); } @TestMetadata("javaPackageMembers.kt") public void testJavaPackageMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/javaPackageMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/javaPackageMembers.kt"); } @TestMetadata("javaStaticMembers.kt") public void testJavaStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/javaStaticMembers.kt"); } @TestMetadata("kt10103.kt") public void testKt10103() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10103.kt"); } @TestMetadata("kt10732a.kt") public void testKt10732a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10732a.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/kt10732a.kt"); } @TestMetadata("kt4711.kt") public void testKt4711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/kt4711.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/kt4711.kt"); } @TestMetadata("samAgainstFunctionalType.kt") public void testSamAgainstFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samAgainstFunctionalType.kt"); } @TestMetadata("samConstructorVsFun.kt") public void testSamConstructorVsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samConstructorVsFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samConstructorVsFun.kt"); } @TestMetadata("samOverloadsWithGenerics.kt") public void testSamOverloadsWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenerics.kt"); } @TestMetadata("samOverloadsWithGenericsWithoutRefinedSams.kt") public void testSamOverloadsWithGenericsWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt"); } @TestMetadata("samOverloadsWithKtFunction.kt") public void testSamOverloadsWithKtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunction.kt"); } @TestMetadata("samOverloadsWithKtFunctionWithoutRefinedSams.kt") public void testSamOverloadsWithKtFunctionWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt"); } } @@ -2663,86 +2514,77 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smartcasts extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartcasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/smartcasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forEachSafe.kt") public void testForEachSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachSafe.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachSafe.kt"); } @TestMetadata("forEachUnsafe.kt") public void testForEachUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/forEachUnsafe.kt"); } @TestMetadata("kt10463.kt") public void testKt10463() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/kt10463.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/kt10463.kt"); } @TestMetadata("lazyDeclaresAndModifies.kt") public void testLazyDeclaresAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/lazyDeclaresAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/lazyDeclaresAndModifies.kt"); } @TestMetadata("letAlwaysChangesToNotNull.kt") public void testLetAlwaysChangesToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letAlwaysChangesToNotNull.kt"); } @TestMetadata("letChangesToNotNull.kt") public void testLetChangesToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNotNull.kt"); } @TestMetadata("letChangesToNull.kt") public void testLetChangesToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNull.kt"); } @TestMetadata("letChangesToNullComplex.kt") public void testLetChangesToNullComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNullComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letChangesToNullComplex.kt"); } @TestMetadata("letMergeNotNull.kt") public void testLetMergeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letMergeNotNull.kt"); } @TestMetadata("letStable.kt") public void testLetStable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letStable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letStable.kt"); } @TestMetadata("letUsesOwnReceiver.kt") public void testLetUsesOwnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letUsesOwnReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/letUsesOwnReceiver.kt"); } @TestMetadata("listOfGeneric.kt") public void testListOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/listOfGeneric.kt"); } @TestMetadata("withChangesToNull.kt") public void testWithChangesToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/smartcasts/withChangesToNull.kt"); } } @@ -2750,14 +2592,17 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceCompatibility extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noDefaultImportOfKotlinComparisons.kt") public void testNoDefaultImportOfKotlinComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/sourceCompatibility/noDefaultImportOfKotlinComparisons.kt"); } } @@ -2765,20 +2610,22 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TargetedBuiltIns extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("blackListed.kt") public void testBlackListed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/unsupportedFeature.kt"); } } @@ -2786,44 +2633,42 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exceptionTypeAliases.kt") public void testExceptionTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliases.kt"); } @TestMetadata("exceptionTypeAliasesInvisibleWithApiVersion1_0.kt") public void testExceptionTypeAliasesInvisibleWithApiVersion1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithApiVersion1_0.kt"); } @TestMetadata("exceptionTypeAliasesInvisibleWithoutFeature.kt") public void testExceptionTypeAliasesInvisibleWithoutFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/exceptionTypeAliasesInvisibleWithoutFeature.kt"); } @TestMetadata("hashMapTypeAlias.kt") public void testHashMapTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/hashMapTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/hashMapTypeAlias.kt"); } @TestMetadata("typeAliasSamAdapterConstructors.kt") public void testTypeAliasSamAdapterConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors.kt"); } @TestMetadata("typeAliasSamAdapterConstructors2.kt") public void testTypeAliasSamAdapterConstructors2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/typealias/typeAliasSamAdapterConstructors2.kt"); } } @@ -2831,26 +2676,27 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt3213.kt") public void testKt3213() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs/kt3213.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/varargs/kt3213.kt"); } @TestMetadata("kt4172j.kt") public void testKt4172j() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs/kt4172j.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/varargs/kt4172j.kt"); } @TestMetadata("kt5534.kt") public void testKt5534() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/varargs/kt5534.kt"); } } @@ -2858,26 +2704,27 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractDiagnosticsTestWithStdLibUsingJavac { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithStdLib/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10192.kt") public void testKt10192() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/when/kt10192.kt"); } @TestMetadata("kt10807.kt") public void testKt10807() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/when/kt10807.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/when/kt10807.kt"); } @TestMetadata("noTypeArgumentsInConstructor.kt") public void testNoTypeArgumentsInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/when/noTypeArgumentsInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/testsWithStdLib/when/noTypeArgumentsInConstructor.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index c271d45e979..a5e2ebef6fe 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java @@ -23,34 +23,33 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tests extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Abstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Abstract.kt"); } @TestMetadata("AbstractAccessor.kt") public void testAbstractAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractAccessor.kt"); } @TestMetadata("AbstractInAbstractClass.kt") public void testAbstractInAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractInAbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractInAbstractClass.kt"); } @TestMetadata("AbstractInClass.kt") public void testAbstractInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractInClass.kt"); } @TestMetadata("AbstractInTrait.kt") public void testAbstractInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AbstractInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AbstractInTrait.kt"); } public void testAllFilesPresentInTests() throws Exception { @@ -59,1290 +58,1086 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("AnonymousInitializerVarAndConstructor.kt") public void testAnonymousInitializerVarAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AnonymousInitializerVarAndConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AnonymousInitializerVarAndConstructor.kt"); } @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AnonymousInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AnonymousInitializers.kt"); } @TestMetadata("AssignToArrayElement.kt") public void testAssignToArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AssignToArrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AssignToArrayElement.kt"); } @TestMetadata("AutoCreatedIt.kt") public void testAutoCreatedIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/AutoCreatedIt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/AutoCreatedIt.kt"); } @TestMetadata("BacktickNames.kt") public void testBacktickNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BacktickNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BacktickNames.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Basic.kt"); } @TestMetadata("BinaryCallsOnNullableValues.kt") public void testBinaryCallsOnNullableValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt"); } @TestMetadata("Bounds.kt") public void testBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Bounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Bounds.kt"); } @TestMetadata("BreakContinue.kt") public void testBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BreakContinue.kt"); } @TestMetadata("BreakContinueInWhen.kt") public void testBreakContinueInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/BreakContinueInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/BreakContinueInWhen.kt"); } @TestMetadata("Builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Builders.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Builders.kt"); } @TestMetadata("Casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Casts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Casts.kt"); } @TestMetadata("CharacterLiterals.kt") public void testCharacterLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/CharacterLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/CharacterLiterals.kt"); } @TestMetadata("checkType.kt") public void testCheckType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkType.kt"); } @TestMetadata("CompareToWithErrorType.kt") public void testCompareToWithErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/CompareToWithErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/CompareToWithErrorType.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Constants.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Constants.kt"); } @TestMetadata("Constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Constructors.kt"); } @TestMetadata("ConstructorsOfPrimitives.kt") public void testConstructorsOfPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ConstructorsOfPrimitives.kt"); } @TestMetadata("CovariantOverrideType.kt") public void testCovariantOverrideType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/CovariantOverrideType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/CovariantOverrideType.kt"); } @TestMetadata("DefaultValueForParameterInFunctionType.kt") public void testDefaultValueForParameterInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DefaultValueForParameterInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DefaultValueForParameterInFunctionType.kt"); } @TestMetadata("DefaultValuesCheckWithoutBody.kt") public void testDefaultValuesCheckWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DefaultValuesCheckWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DefaultValuesCheckWithoutBody.kt"); } @TestMetadata("DefaultValuesTypechecking.kt") public void testDefaultValuesTypechecking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt"); } @TestMetadata("DeferredTypes.kt") public void testDeferredTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeferredTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DeferredTypes.kt"); } @TestMetadata("DeprecatedGetSetPropertyDelegateConvention.kt") public void testDeprecatedGetSetPropertyDelegateConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DeprecatedGetSetPropertyDelegateConvention.kt"); } @TestMetadata("DeprecatedUnaryOperatorConventions.kt") public void testDeprecatedUnaryOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt"); } @TestMetadata("DiamondFunction.kt") public void testDiamondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DiamondFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DiamondFunction.kt"); } @TestMetadata("DiamondFunctionGeneric.kt") public void testDiamondFunctionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DiamondFunctionGeneric.kt"); } @TestMetadata("DiamondProperty.kt") public void testDiamondProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/DiamondProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/DiamondProperty.kt"); } @TestMetadata("Dollar.kt") public void testDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Dollar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Dollar.kt"); } @TestMetadata("EnumEntryAsType.kt") public void testEnumEntryAsType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/EnumEntryAsType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/EnumEntryAsType.kt"); } @TestMetadata("ExtensionCallInvoke.kt") public void testExtensionCallInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ExtensionCallInvoke.kt"); } @TestMetadata("ExternalAccessors.kt") public void testExternalAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ExternalAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ExternalAccessors.kt"); } @TestMetadata("ExternalAndAbstract.kt") public void testExternalAndAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ExternalAndAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ExternalAndAbstract.kt"); } @TestMetadata("fileDependencyRecursion.kt") public void testFileDependencyRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/fileDependencyRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/fileDependencyRecursion.kt"); } @TestMetadata("ForRangeConventions.kt") public void testForRangeConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ForRangeConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ForRangeConventions.kt"); } @TestMetadata("FreeFunctionCalledAsExtension.kt") public void testFreeFunctionCalledAsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FreeFunctionCalledAsExtension.kt"); } @TestMetadata("FunctionCalleeExpressions.kt") public void testFunctionCalleeExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt"); } @TestMetadata("FunctionParameterWithoutType.kt") public void testFunctionParameterWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FunctionParameterWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FunctionParameterWithoutType.kt"); } @TestMetadata("FunctionReturnTypes.kt") public void testFunctionReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/FunctionReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/FunctionReturnTypes.kt"); } @TestMetadata("GenericArgumentConsistency.kt") public void testGenericArgumentConsistency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/GenericArgumentConsistency.kt"); } @TestMetadata("GenericFunctionIsLessSpecific.kt") public void testGenericFunctionIsLessSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/GenericFunctionIsLessSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/GenericFunctionIsLessSpecific.kt"); } @TestMetadata("IdentityComparisonWithPrimitives.kt") public void testIdentityComparisonWithPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IdentityComparisonWithPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IdentityComparisonWithPrimitives.kt"); } @TestMetadata("implicitIntersection.kt") public void testImplicitIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/implicitIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/implicitIntersection.kt"); } @TestMetadata("implicitNestedIntersection.kt") public void testImplicitNestedIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/implicitNestedIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/implicitNestedIntersection.kt"); } @TestMetadata("implicitNothing.kt") public void testImplicitNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/implicitNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/implicitNothing.kt"); } @TestMetadata("IncDec.kt") public void testIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IncDec.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IncDec.kt"); } @TestMetadata("IncorrectCharacterLiterals.kt") public void testIncorrectCharacterLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IncorrectCharacterLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IncorrectCharacterLiterals.kt"); } @TestMetadata("InferNullabilityInThenBlock.kt") public void testInferNullabilityInThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/InferNullabilityInThenBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/InferNullabilityInThenBlock.kt"); } @TestMetadata("Infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Infix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Infix.kt"); } @TestMetadata("InfixModifierApplicability.kt") public void testInfixModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/InfixModifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/InfixModifierApplicability.kt"); } @TestMetadata("InvokeAndRecursiveResolve.kt") public void testInvokeAndRecursiveResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt"); } @TestMetadata("IsExpressions.kt") public void testIsExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/IsExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/IsExpressions.kt"); } @TestMetadata("kt13401.kt") public void testKt13401() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt13401.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt13401.kt"); } @TestMetadata("kt310.kt") public void testKt310() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt310.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt310.kt"); } @TestMetadata("kt435.kt") public void testKt435() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt435.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt435.kt"); } @TestMetadata("kt53.kt") public void testKt53() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/kt53.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/kt53.kt"); } @TestMetadata("LValueAssignment.kt") public void testLValueAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LValueAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/LValueAssignment.kt"); } @TestMetadata("LiteralAsResult.kt") public void testLiteralAsResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LiteralAsResult.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/LiteralAsResult.kt"); } @TestMetadata("LocalClassAndShortSubpackageNames.kt") public void testLocalClassAndShortSubpackageNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/LocalClassAndShortSubpackageNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/LocalClassAndShortSubpackageNames.kt"); } @TestMetadata("localInterfaces.kt") public void testLocalInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/localInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/localInterfaces.kt"); } @TestMetadata("MultilineStringTemplates.kt") public void testMultilineStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MultilineStringTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/MultilineStringTemplates.kt"); } @TestMetadata("MultipleBounds.kt") public void testMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/MultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/MultipleBounds.kt"); } @TestMetadata("NamedFunctionTypeParameterInSupertype.kt") public void testNamedFunctionTypeParameterInSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/NamedFunctionTypeParameterInSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/NamedFunctionTypeParameterInSupertype.kt"); } @TestMetadata("Nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Nullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Nullability.kt"); } @TestMetadata("NumberPrefixAndSuffix.kt") public void testNumberPrefixAndSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/NumberPrefixAndSuffix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/NumberPrefixAndSuffix.kt"); } @TestMetadata("ObjectWithConstructor.kt") public void testObjectWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ObjectWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ObjectWithConstructor.kt"); } @TestMetadata("OperatorChecks.kt") public void testOperatorChecks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OperatorChecks.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OperatorChecks.kt"); } @TestMetadata("Operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Operators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Operators.kt"); } @TestMetadata("OperatorsWithWrongNames.kt") public void testOperatorsWithWrongNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OperatorsWithWrongNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OperatorsWithWrongNames.kt"); } @TestMetadata("OverrideFunctionWithParamDefaultValue.kt") public void testOverrideFunctionWithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverrideFunctionWithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverrideFunctionWithParamDefaultValue.kt"); } @TestMetadata("OverridenFunctionAndSpecifiedTypeParameter.kt") public void testOverridenFunctionAndSpecifiedTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverridenFunctionAndSpecifiedTypeParameter.kt"); } @TestMetadata("OverridenSetterVisibility.kt") public void testOverridenSetterVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverridenSetterVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverridenSetterVisibility.kt"); } @TestMetadata("OverridingVarByVal.kt") public void testOverridingVarByVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/OverridingVarByVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/OverridingVarByVal.kt"); } @TestMetadata("PackageInExpressionPosition.kt") public void testPackageInExpressionPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt"); } @TestMetadata("PackageInTypePosition.kt") public void testPackageInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageInTypePosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PackageInTypePosition.kt"); } @TestMetadata("PackageQualified.kt") public void testPackageQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PackageQualified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PackageQualified.kt"); } @TestMetadata("PrimaryConstructors.kt") public void testPrimaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PrimaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PrimaryConstructors.kt"); } @TestMetadata("PrivateFromOuterPackage.kt") public void testPrivateFromOuterPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PrivateFromOuterPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PrivateFromOuterPackage.kt"); } @TestMetadata("PrivateSetterForOverridden.kt") public void testPrivateSetterForOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PrivateSetterForOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PrivateSetterForOverridden.kt"); } @TestMetadata("ProcessingEmptyImport.kt") public void testProcessingEmptyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ProcessingEmptyImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ProcessingEmptyImport.kt"); } @TestMetadata("ProjectionOnFunctionArgumentErrror.kt") public void testProjectionOnFunctionArgumentErrror() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ProjectionOnFunctionArgumentErrror.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ProjectionOnFunctionArgumentErrror.kt"); } @TestMetadata("ProjectionsInSupertypes.kt") public void testProjectionsInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ProjectionsInSupertypes.kt"); } @TestMetadata("Properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Properties.kt"); } @TestMetadata("PropertyInitializers.kt") public void testPropertyInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/PropertyInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/PropertyInitializers.kt"); } @TestMetadata("publishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/publishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/publishedApi.kt"); } @TestMetadata("QualifiedExpressions.kt") public void testQualifiedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/QualifiedExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/QualifiedExpressions.kt"); } @TestMetadata("RecursiveResolve.kt") public void testRecursiveResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/RecursiveResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/RecursiveResolve.kt"); } @TestMetadata("RecursiveTypeInference.kt") public void testRecursiveTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/RecursiveTypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/RecursiveTypeInference.kt"); } @TestMetadata("ReserveYield.kt") public void testReserveYield() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ReserveYield.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ReserveYield.kt"); } @TestMetadata("ReserveYield2.kt") public void testReserveYield2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ReserveYield2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ReserveYield2.kt"); } @TestMetadata("ResolveOfJavaGenerics.kt") public void testResolveOfJavaGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt"); } @TestMetadata("ResolveToJava.kt") public void testResolveToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ResolveToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ResolveToJava.kt"); } @TestMetadata("Return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Return.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Return.kt"); } @TestMetadata("ReturnInFunctionWithoutBody.kt") public void testReturnInFunctionWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ReturnInFunctionWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ReturnInFunctionWithoutBody.kt"); } @TestMetadata("SafeCallInvoke.kt") public void testSafeCallInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallInvoke.kt"); } @TestMetadata("SafeCallNonNullReceiver.kt") public void testSafeCallNonNullReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallNonNullReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallNonNullReceiver.kt"); } @TestMetadata("SafeCallNonNullReceiverReturnNull.kt") public void testSafeCallNonNullReceiverReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt"); } @TestMetadata("SafeCallOnFakePackage.kt") public void testSafeCallOnFakePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallOnFakePackage.kt"); } @TestMetadata("SafeCallOnSuperReceiver.kt") public void testSafeCallOnSuperReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SafeCallOnSuperReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SafeCallOnSuperReceiver.kt"); } @TestMetadata("Serializable.kt") public void testSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Serializable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Serializable.kt"); } @TestMetadata("SetterVisibility.kt") public void testSetterVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SetterVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SetterVisibility.kt"); } @TestMetadata("ShiftFunctionTypes.kt") public void testShiftFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ShiftFunctionTypes.kt"); } @TestMetadata("SingleUnderscoreUnsupported.kt") public void testSingleUnderscoreUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SingleUnderscoreUnsupported.kt"); } @TestMetadata("StarsInFunctionCalls.kt") public void testStarsInFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/StarsInFunctionCalls.kt"); } @TestMetadata("StringPrefixAndSuffix.kt") public void testStringPrefixAndSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/StringPrefixAndSuffix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/StringPrefixAndSuffix.kt"); } @TestMetadata("StringTemplates.kt") public void testStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/StringTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/StringTemplates.kt"); } @TestMetadata("SupertypeListChecks.kt") public void testSupertypeListChecks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SupertypeListChecks.kt"); } @TestMetadata("SyntaxErrorInTestHighlighting.kt") public void testSyntaxErrorInTestHighlighting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlighting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlighting.kt"); } @TestMetadata("SyntaxErrorInTestHighlightingEof.kt") public void testSyntaxErrorInTestHighlightingEof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlightingEof.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/SyntaxErrorInTestHighlightingEof.kt"); } @TestMetadata("tailRecOverridden.kt") public void testTailRecOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/tailRecOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/tailRecOverridden.kt"); } @TestMetadata("tailRecursionComplex.kt") public void testTailRecursionComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/tailRecursionComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/tailRecursionComplex.kt"); } @TestMetadata("TraitOverrideObjectMethods.kt") public void testTraitOverrideObjectMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TraitOverrideObjectMethods.kt"); } @TestMetadata("TraitWithConstructor.kt") public void testTraitWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TraitWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TraitWithConstructor.kt"); } @TestMetadata("TypeInference.kt") public void testTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TypeInference.kt"); } @TestMetadata("TypeMismatchOnOverrideWithSyntaxErrors.kt") public void testTypeMismatchOnOverrideWithSyntaxErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/TypeMismatchOnOverrideWithSyntaxErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/TypeMismatchOnOverrideWithSyntaxErrors.kt"); } @TestMetadata("Underscore.kt") public void testUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Underscore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Underscore.kt"); } @TestMetadata("UnderscoreUsageInAnnotation.kt") public void testUnderscoreUsageInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInAnnotation.kt"); } @TestMetadata("UnderscoreUsageInCall.kt") public void testUnderscoreUsageInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInCall.kt"); } @TestMetadata("UnderscoreUsageInCallableRefTypeLHS.kt") public void testUnderscoreUsageInCallableRefTypeLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInCallableRefTypeLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInCallableRefTypeLHS.kt"); } @TestMetadata("UnderscoreUsageInType.kt") public void testUnderscoreUsageInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInType.kt"); } @TestMetadata("UnderscoreUsageInVariableAsFunctionCall.kt") public void testUnderscoreUsageInVariableAsFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnderscoreUsageInVariableAsFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnderscoreUsageInVariableAsFunctionCall.kt"); } @TestMetadata("UnitByDefaultForFunctionTypes.kt") public void testUnitByDefaultForFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnitByDefaultForFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnitByDefaultForFunctionTypes.kt"); } @TestMetadata("UnitValue.kt") public void testUnitValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnitValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnitValue.kt"); } @TestMetadata("Unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Unresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Unresolved.kt"); } @TestMetadata("UnusedInDestructuring.kt") public void testUnusedInDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedInDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedInDestructuring.kt"); } @TestMetadata("UnusedParameters.kt") public void testUnusedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedParameters.kt"); } @TestMetadata("UnusedParametersVersion10.kt") public void testUnusedParametersVersion10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedParametersVersion10.kt"); } @TestMetadata("UnusedVariables.kt") public void testUnusedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/UnusedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/UnusedVariables.kt"); } @TestMetadata("ValAndFunOverrideCompatibilityClash.kt") public void testValAndFunOverrideCompatibilityClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.kt"); } @TestMetadata("VarargTypes.kt") public void testVarargTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/VarargTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/VarargTypes.kt"); } @TestMetadata("Varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Varargs.kt"); } @TestMetadata("Variance.kt") public void testVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/Variance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/Variance.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbigiousAnnotationConstructor.kt") public void testAmbigiousAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt"); } @TestMetadata("AnnotatedConstructor.kt") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructor.kt"); } @TestMetadata("AnnotatedConstructorParams.kt") public void testAnnotatedConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedConstructorParams.kt"); } @TestMetadata("annotatedExpressionInsideAnnotation.kt") public void testAnnotatedExpressionInsideAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotatedExpressionInsideAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotatedExpressionInsideAnnotation.kt"); } @TestMetadata("AnnotatedLocalObjectFun.kt") public void testAnnotatedLocalObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectFun.kt"); } @TestMetadata("AnnotatedLocalObjectProperty.kt") public void testAnnotatedLocalObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLocalObjectProperty.kt"); } @TestMetadata("AnnotatedLoop.kt") public void testAnnotatedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedLoop.kt"); } @TestMetadata("AnnotatedResultType.kt") public void testAnnotatedResultType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedResultType.kt"); } @TestMetadata("AnnotatedTryCatch.kt") public void testAnnotatedTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotatedTryCatch.kt"); } @TestMetadata("AnnotationAsDefaultParameter.kt") public void testAnnotationAsDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationAsDefaultParameter.kt"); } @TestMetadata("AnnotationForClassTypeParameter.kt") public void testAnnotationForClassTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationForClassTypeParameter.kt"); } @TestMetadata("AnnotationForFunctionTypeParameter.kt") public void testAnnotationForFunctionTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationForFunctionTypeParameter.kt"); } @TestMetadata("AnnotationForObject.kt") public void testAnnotationForObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationForObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationForObject.kt"); } @TestMetadata("AnnotationIdentifier.kt") public void testAnnotationIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationIdentifier.kt"); } @TestMetadata("annotationInheritance.kt") public void testAnnotationInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationInheritance.kt"); } @TestMetadata("annotationModifier.kt") public void testAnnotationModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationModifier.kt"); } @TestMetadata("AnnotationOnObject.kt") public void testAnnotationOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationOnObject.kt"); } @TestMetadata("annotationOnParameterInFunctionType.kt") public void testAnnotationOnParameterInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationOnParameterInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationOnParameterInFunctionType.kt"); } @TestMetadata("AnnotationsForClasses.kt") public void testAnnotationsForClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationsForClasses.kt"); } @TestMetadata("AnnotationsForPropertyTypeParameter.kt") public void testAnnotationsForPropertyTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/AnnotationsForPropertyTypeParameter.kt"); } @TestMetadata("annotationsOnLambdaAsCallArgument.kt") public void testAnnotationsOnLambdaAsCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationsOnLambdaAsCallArgument.kt"); } @TestMetadata("annotationsOnNullableTypes.kt") public void testAnnotationsOnNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationsOnNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationsOnNullableTypes.kt"); } @TestMetadata("atAnnotationResolve.kt") public void testAtAnnotationResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/atAnnotationResolve.kt"); } @TestMetadata("BasicAnnotations.kt") public void testBasicAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/BasicAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/BasicAnnotations.kt"); } @TestMetadata("blockLevelOnTheSameLineWarning.kt") public void testBlockLevelOnTheSameLineWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/blockLevelOnTheSameLineWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/blockLevelOnTheSameLineWarning.kt"); } @TestMetadata("ConstructorCall.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/ConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/ConstructorCall.kt"); } @TestMetadata("DanglingInScript.kt") public void testDanglingInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingInScript.kt"); } @TestMetadata("DanglingMixed.kt") public void testDanglingMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingMixed.kt"); } @TestMetadata("DanglingNoBrackets.kt") public void testDanglingNoBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingNoBrackets.kt"); } @TestMetadata("DanglingWithBrackets.kt") public void testDanglingWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/DanglingWithBrackets.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/Deprecated.kt"); } @TestMetadata("deprecatedRepeatable.kt") public void testDeprecatedRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/deprecatedRepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/deprecatedRepeatable.kt"); } @TestMetadata("extensionFunctionType.kt") public void testExtensionFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/extensionFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/extensionFunctionType.kt"); } @TestMetadata("forParameterAnnotationResolve.kt") public void testForParameterAnnotationResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/forParameterAnnotationResolve.kt"); } @TestMetadata("illegalRequireKotlinValue.kt") public void testIllegalRequireKotlinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/illegalRequireKotlinValue.kt"); } @TestMetadata("illegalSinceKotlinValue.kt") public void testIllegalSinceKotlinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/illegalSinceKotlinValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/illegalSinceKotlinValue.kt"); } @TestMetadata("inheritFromAnnotationClass.kt") public void testInheritFromAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass.kt"); } @TestMetadata("inheritFromAnnotationClass2.kt") public void testInheritFromAnnotationClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/inheritFromAnnotationClass2.kt"); } @TestMetadata("invalidTypesInAnnotationConstructor.kt") public void testInvalidTypesInAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/invalidTypesInAnnotationConstructor.kt"); } @TestMetadata("JavaAnnotationConstructors.kt") public void testJavaAnnotationConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/JavaAnnotationConstructors.kt"); } @TestMetadata("javaRepeatable.kt") public void testJavaRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/javaRepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatable.kt"); } @TestMetadata("javaRepeatableRetention.kt") public void testJavaRepeatableRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/javaRepeatableRetention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/javaRepeatableRetention.kt"); } @TestMetadata("javaUnrepeatable.kt") public void testJavaUnrepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/javaUnrepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/javaUnrepeatable.kt"); } @TestMetadata("kt1860-negative.kt") public void testKt1860_negative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt"); } @TestMetadata("kt1860-positive.kt") public void testKt1860_positive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt"); } @TestMetadata("kt1886annotationBody.kt") public void testKt1886annotationBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/kt1886annotationBody.kt"); } @TestMetadata("missingValOnParameter.kt") public void testMissingValOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/missingValOnParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/missingValOnParameter.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/MultiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/MultiDeclaration.kt"); } @TestMetadata("MutuallyRecursivelyAnnotatedGlobalFunction.kt") public void testMutuallyRecursivelyAnnotatedGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/MutuallyRecursivelyAnnotatedGlobalFunction.kt"); } @TestMetadata("nestedClassesInAnnotations.kt") public void testNestedClassesInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/nestedClassesInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/nestedClassesInAnnotations.kt"); } @TestMetadata("noNameProperty.kt") public void testNoNameProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/noNameProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/noNameProperty.kt"); } @TestMetadata("NonAnnotationClass.kt") public void testNonAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/NonAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/NonAnnotationClass.kt"); } @TestMetadata("onExpression.kt") public void testOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onExpression.kt"); } @TestMetadata("onFunctionParameter.kt") public void testOnFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onFunctionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onFunctionParameter.kt"); } @TestMetadata("onInitializer.kt") public void testOnInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onInitializer.kt"); } @TestMetadata("onLoops.kt") public void testOnLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onLoops.kt"); } @TestMetadata("onLoopsUnreachable.kt") public void testOnLoopsUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onLoopsUnreachable.kt"); } @TestMetadata("onMultiDeclaration.kt") public void testOnMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/onMultiDeclaration.kt"); } @TestMetadata("RecursivelyAnnotated.kt") public void testRecursivelyAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotated.kt"); } @TestMetadata("RecursivelyAnnotatedFunctionParameter.kt") public void testRecursivelyAnnotatedFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedFunctionParameter.kt"); } @TestMetadata("RecursivelyAnnotatedGlobalFunction.kt") public void testRecursivelyAnnotatedGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalFunction.kt"); } @TestMetadata("RecursivelyAnnotatedGlobalProperty.kt") public void testRecursivelyAnnotatedGlobalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedGlobalProperty.kt"); } @TestMetadata("RecursivelyAnnotatedParameter.kt") public void testRecursivelyAnnotatedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameter.kt"); } @TestMetadata("RecursivelyAnnotatedParameterType.kt") public void testRecursivelyAnnotatedParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterType.kt"); } @TestMetadata("RecursivelyAnnotatedParameterWithAt.kt") public void testRecursivelyAnnotatedParameterWithAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedParameterWithAt.kt"); } @TestMetadata("RecursivelyAnnotatedProperty.kt") public void testRecursivelyAnnotatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyAnnotatedProperty.kt"); } @TestMetadata("RecursivelyIncorrectlyAnnotatedParameter.kt") public void testRecursivelyIncorrectlyAnnotatedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/RecursivelyIncorrectlyAnnotatedParameter.kt"); } @TestMetadata("typeAnnotations.kt") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/typeAnnotations.kt"); } @TestMetadata("typeParameterAsAnnotation.kt") public void testTypeParameterAsAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/typeParameterAsAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/typeParameterAsAnnotation.kt"); } @TestMetadata("UnresolvedAnnotationOnObject.kt") public void testUnresolvedAnnotationOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/UnresolvedAnnotationOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/UnresolvedAnnotationOnObject.kt"); } @TestMetadata("unresolvedReferenceRange.kt") public void testUnresolvedReferenceRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/unresolvedReferenceRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/unresolvedReferenceRange.kt"); } @TestMetadata("WrongAnnotationArgsOnObject.kt") public void testWrongAnnotationArgsOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/WrongAnnotationArgsOnObject.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationParameterMustBeConstant extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationParameterMustBeConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationConstructorDefaultParameter.kt") public void testAnnotationConstructorDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/annotationConstructorDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/annotationConstructorDefaultParameter.kt"); } @TestMetadata("booleanLocalVal.kt") public void testBooleanLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/booleanLocalVal.kt"); } @TestMetadata("compareAndEquals.kt") public void testCompareAndEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/compareAndEquals.kt"); } @TestMetadata("enumConst.kt") public void testEnumConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/enumConst.kt"); } @TestMetadata("javaProperties.kt") public void testJavaProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/javaProperties.kt"); } @TestMetadata("kotlinProperties.kt") public void testKotlinProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/kotlinProperties.kt"); } @TestMetadata("standaloneInExpression.kt") public void testStandaloneInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/standaloneInExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/standaloneInExpression.kt"); } @TestMetadata("strings.kt") public void testStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/annotationParameterMustBeConstant/strings.kt"); } } @@ -1350,126 +1145,115 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Options extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/options"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationAsArg.kt") public void testAnnotationAsArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/annotationAsArg.kt"); } @TestMetadata("annotationAsArgComplex.kt") public void testAnnotationAsArgComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/annotationAsArgComplex.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/assignment.kt"); } @TestMetadata("documented.kt") public void testDocumented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/documented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/documented.kt"); } @TestMetadata("forParam.kt") public void testForParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/forParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/forParam.kt"); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/functionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/functionExpression.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/functions.kt"); } @TestMetadata("javaDocumented.kt") public void testJavaDocumented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/javaDocumented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/javaDocumented.kt"); } @TestMetadata("javaKotlinTargetRetention.kt") public void testJavaKotlinTargetRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/javaKotlinTargetRetention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/javaKotlinTargetRetention.kt"); } @TestMetadata("javaretention.kt") public void testJavaretention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/javaretention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/javaretention.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/multiDeclaration.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/objectLiteral.kt"); } @TestMetadata("prefix.kt") public void testPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/prefix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/prefix.kt"); } @TestMetadata("repeatable.kt") public void testRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/repeatable.kt"); } @TestMetadata("retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/retention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/retention.kt"); } @TestMetadata("setterParam.kt") public void testSetterParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/setterParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/setterParam.kt"); } @TestMetadata("target.kt") public void testTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/target.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/target.kt"); } @TestMetadata("unrepeatable.kt") public void testUnrepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/unrepeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/unrepeatable.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/annotations/options/targets") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Targets extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessors.kt") public void testAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/accessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/accessors.kt"); } public void testAllFilesPresentInTargets() throws Exception { @@ -1478,128 +1262,107 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/annotation.kt"); } @TestMetadata("classifier.kt") public void testClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/classifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/classifier.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/constructor.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/empty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/empty.kt"); } @TestMetadata("expr.kt") public void testExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/expr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/expr.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/field.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/file.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/file.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/function.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/function.kt"); } @TestMetadata("funtypeargs.kt") public void testFuntypeargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/funtypeargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/funtypeargs.kt"); } @TestMetadata("incorrect.kt") public void testIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/incorrect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/incorrect.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/init.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/init.kt"); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/java.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/java.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/local.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/local.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/nested.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/property.kt"); } @TestMetadata("returntype.kt") public void testReturntype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/returntype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/returntype.kt"); } @TestMetadata("suppress.kt") public void testSuppress() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/suppress.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/suppress.kt"); } @TestMetadata("type.kt") public void testType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/type.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/type.kt"); } @TestMetadata("typeParams.kt") public void testTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/typeParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/typeParams.kt"); } @TestMetadata("typeargs.kt") public void testTypeargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/typeargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/typeargs.kt"); } @TestMetadata("valueparam.kt") public void testValueparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/options/targets/valueparam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/options/targets/valueparam.kt"); } } } @@ -1608,110 +1371,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateAnnotations.kt") public void testDelegateAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/DelegateAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/DelegateAnnotations.kt"); } @TestMetadata("diagnosticFileAnnotationInWrongPlace.kt") public void testDiagnosticFileAnnotationInWrongPlace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticFileAnnotationInWrongPlace.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticFileAnnotationInWrongPlace.kt"); } @TestMetadata("diagnosticWithoutPackage.kt") public void testDiagnosticWithoutPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackage.kt"); } @TestMetadata("diagnosticWithoutPackageWithSimpleAnnotation.kt") public void testDiagnosticWithoutPackageWithSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackageWithSimpleAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/diagnosticWithoutPackageWithSimpleAnnotation.kt"); } @TestMetadata("FieldAnnotations.kt") public void testFieldAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FieldAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FieldAnnotations.kt"); } @TestMetadata("fileAnnotationWithoutColon.kt") public void testFileAnnotationWithoutColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/fileAnnotationWithoutColon.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/fileAnnotationWithoutColon.kt"); } @TestMetadata("FileAnnotations.kt") public void testFileAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FileAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/FileAnnotations.kt"); } @TestMetadata("GetterAnnotations.kt") public void testGetterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/GetterAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/GetterAnnotations.kt"); } @TestMetadata("ParamAnnotations.kt") public void testParamAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ParamAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ParamAnnotations.kt"); } @TestMetadata("PropertyAnnotations.kt") public void testPropertyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/PropertyAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/PropertyAnnotations.kt"); } @TestMetadata("ReceiverAnnotations.kt") public void testReceiverAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ReceiverAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/ReceiverAnnotations.kt"); } @TestMetadata("receiverUseSiteTargetOnExtensionFunction.kt") public void testReceiverUseSiteTargetOnExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/receiverUseSiteTargetOnExtensionFunction.kt"); } @TestMetadata("repeatable.kt") public void testRepeatable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/repeatable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/repeatable.kt"); } @TestMetadata("SetterAnnotations.kt") public void testSetterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SetterAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SetterAnnotations.kt"); } @TestMetadata("SparamAnnotations.kt") public void testSparamAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SparamAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/SparamAnnotations.kt"); } @TestMetadata("wrongParamAnnotationsOnTypes.kt") public void testWrongParamAnnotationsOnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypes.kt"); } @TestMetadata("wrongParamAnnotationsOnTypesError.kt") public void testWrongParamAnnotationsOnTypesError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/annotations/withUseSiteTarget/wrongParamAnnotationsOnTypesError.kt"); } } } @@ -1720,128 +1470,112 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BackingField extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBackingField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/backingField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CustomGetSet.kt") public void testCustomGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetSet.kt"); } @TestMetadata("CustomGetVal.kt") public void testCustomGetVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetVal.kt"); } @TestMetadata("CustomGetValGlobal.kt") public void testCustomGetValGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetValGlobal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetValGlobal.kt"); } @TestMetadata("CustomGetVar.kt") public void testCustomGetVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomGetVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomGetVar.kt"); } @TestMetadata("CustomSet.kt") public void testCustomSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/CustomSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/CustomSet.kt"); } @TestMetadata("ExtensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/ExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/ExtensionProperty.kt"); } @TestMetadata("FieldAsParam.kt") public void testFieldAsParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldAsParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldAsParam.kt"); } @TestMetadata("FieldAsProperty.kt") public void testFieldAsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldAsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldAsProperty.kt"); } @TestMetadata("FieldDerived.kt") public void testFieldDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldDerived.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldDerived.kt"); } @TestMetadata("FieldInInterface.kt") public void testFieldInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldInInterface.kt"); } @TestMetadata("FieldInLocal.kt") public void testFieldInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldInLocal.kt"); } @TestMetadata("FieldOnVal.kt") public void testFieldOnVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldOnVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldOnVal.kt"); } @TestMetadata("FieldOnVar.kt") public void testFieldOnVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldOnVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldOnVar.kt"); } @TestMetadata("FieldReassignment.kt") public void testFieldReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldReassignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment.kt"); } @TestMetadata("FieldReassignmentError.kt") public void testFieldReassignmentError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldReassignmentError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignmentError.kt"); } @TestMetadata("FieldShadow.kt") public void testFieldShadow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/FieldShadow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/FieldShadow.kt"); } @TestMetadata("InitCustomSetter.kt") public void testInitCustomSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/InitCustomSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/InitCustomSetter.kt"); } @TestMetadata("InitOpenSetter.kt") public void testInitOpenSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/InitOpenSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/InitOpenSetter.kt"); } @TestMetadata("kt782packageLevel.kt") public void testKt782packageLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/kt782packageLevel.kt"); } @TestMetadata("SetterWithExplicitType.kt") public void testSetterWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/backingField/SetterWithExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/backingField/SetterWithExplicitType.kt"); } } @@ -1849,208 +1583,184 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bareType.kt") public void testBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bareType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bareType.kt"); } @TestMetadata("callableReferenceAsLastExpressionInBlock.kt") public void testCallableReferenceAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/callableReferenceAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/callableReferenceAsLastExpressionInBlock.kt"); } @TestMetadata("classVsPackage.kt") public void testClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/classVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/classVsPackage.kt"); } @TestMetadata("ea81649_errorPropertyLHS.kt") public void testEa81649_errorPropertyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/ea81649_errorPropertyLHS.kt"); } @TestMetadata("emptyLhs.kt") public void testEmptyLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/emptyLhs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/emptyLhs.kt"); } @TestMetadata("kt15439_completeCall.kt") public void testKt15439_completeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/kt15439_completeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/kt15439_completeCall.kt"); } @TestMetadata("kt7430_wrongClassOnLHS.kt") public void testKt7430_wrongClassOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/kt7430_wrongClassOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/kt7430_wrongClassOnLHS.kt"); } @TestMetadata("memberExtensionsImportedFromObjectsUnsupported.kt") public void testMemberExtensionsImportedFromObjectsUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/memberExtensionsImportedFromObjectsUnsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/memberExtensionsImportedFromObjectsUnsupported.kt"); } @TestMetadata("packageInLhs.kt") public void testPackageInLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/packageInLhs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/packageInLhs.kt"); } @TestMetadata("parsingPriorityOfGenericArgumentsVsLess.kt") public void testParsingPriorityOfGenericArgumentsVsLess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/parsingPriorityOfGenericArgumentsVsLess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/parsingPriorityOfGenericArgumentsVsLess.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/sam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/sam.kt"); } @TestMetadata("unused.kt") public void testUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/unused.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/unused.kt"); } @TestMetadata("whitespacesInExpression.kt") public void testWhitespacesInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/whitespacesInExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/whitespacesInExpression.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classVsStarImportedCompanion.kt") public void testClassVsStarImportedCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedCompanion.kt"); } @TestMetadata("classVsStarImportedObject.kt") public void testClassVsStarImportedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/classVsStarImportedObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/companionObject.kt"); } @TestMetadata("controlFlow.kt") public void testControlFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/controlFlow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/controlFlow.kt"); } @TestMetadata("dataFlow.kt") public void testDataFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/dataFlow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/dataFlow.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/expectedType.kt"); } @TestMetadata("expressionWithNullableType.kt") public void testExpressionWithNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/expressionWithNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/expressionWithNullableType.kt"); } @TestMetadata("functionCallWithoutArguments.kt") public void testFunctionCallWithoutArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/functionCallWithoutArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/functionCallWithoutArguments.kt"); } @TestMetadata("innerNested.kt") public void testInnerNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/innerNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/innerNested.kt"); } @TestMetadata("kt12843.kt") public void testKt12843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/kt12843.kt"); } @TestMetadata("noThisInSuperCall.kt") public void testNoThisInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/noThisInSuperCall.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/object.kt"); } @TestMetadata("privateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/privateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/privateToThis.kt"); } @TestMetadata("referenceToStaticMethodOnInstance.kt") public void testReferenceToStaticMethodOnInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/referenceToStaticMethodOnInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/referenceToStaticMethodOnInstance.kt"); } @TestMetadata("reservedExpressionSyntax.kt") public void testReservedExpressionSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax.kt"); } @TestMetadata("reservedExpressionSyntax2.kt") public void testReservedExpressionSyntax2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax2.kt"); } @TestMetadata("reservedExpressionSyntax3.kt") public void testReservedExpressionSyntax3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt"); } @TestMetadata("syntheticExtensionOnLHS.kt") public void testSyntheticExtensionOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/syntheticExtensionOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/syntheticExtensionOnLHS.kt"); } @TestMetadata("valueOfTypeParameterType.kt") public void testValueOfTypeParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/bound/valueOfTypeParameterType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/bound/valueOfTypeParameterType.kt"); } } @@ -2058,10 +1768,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractClassConstructors.kt") public void testAbstractClassConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/abstractClassConstructors.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -2070,302 +1783,252 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("ambiguityTopLevelVsTopLevel.kt") public void testAmbiguityTopLevelVsTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/ambiguityTopLevelVsTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/ambiguityTopLevelVsTopLevel.kt"); } @TestMetadata("annotationClassConstructor.kt") public void testAnnotationClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/annotationClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/annotationClassConstructor.kt"); } @TestMetadata("callableRefrenceOnNestedObject.kt") public void testCallableRefrenceOnNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/callableRefrenceOnNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/callableRefrenceOnNestedObject.kt"); } @TestMetadata("classMemberVsConstructorLikeFunction.kt") public void testClassMemberVsConstructorLikeFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/classMemberVsConstructorLikeFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/classMemberVsConstructorLikeFunction.kt"); } @TestMetadata("constructorFromClass.kt") public void testConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromClass.kt"); } @TestMetadata("constructorFromCompanion.kt") public void testConstructorFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromCompanion.kt"); } @TestMetadata("constructorFromExtension.kt") public void testConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtension.kt"); } @TestMetadata("constructorFromExtensionInClass.kt") public void testConstructorFromExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromExtensionInClass.kt"); } @TestMetadata("constructorFromTopLevel.kt") public void testConstructorFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorFromTopLevel.kt"); } @TestMetadata("constructorOfNestedClassInObject.kt") public void testConstructorOfNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/constructorOfNestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/constructorOfNestedClassInObject.kt"); } @TestMetadata("differentPackageClass.kt") public void testDifferentPackageClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/differentPackageClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/differentPackageClass.kt"); } @TestMetadata("differentPackageExtension.kt") public void testDifferentPackageExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/differentPackageExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/differentPackageExtension.kt"); } @TestMetadata("differentPackageTopLevel.kt") public void testDifferentPackageTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/differentPackageTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/differentPackageTopLevel.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/empty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/empty.kt"); } @TestMetadata("extensionFromTopLevel.kt") public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionFromTopLevel.kt"); } @TestMetadata("extensionInClassDisallowed.kt") public void testExtensionInClassDisallowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionInClassDisallowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionInClassDisallowed.kt"); } @TestMetadata("extensionOnNullable.kt") public void testExtensionOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionOnNullable.kt"); } @TestMetadata("extensionToSupertype.kt") public void testExtensionToSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt"); } @TestMetadata("fakeOverrideType.kt") public void testFakeOverrideType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/fakeOverrideType.kt"); } @TestMetadata("genericClassFromTopLevel.kt") public void testGenericClassFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/genericClassFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/genericClassFromTopLevel.kt"); } @TestMetadata("importedInnerConstructor.kt") public void testImportedInnerConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/importedInnerConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/importedInnerConstructor.kt"); } @TestMetadata("innerConstructorFromClass.kt") public void testInnerConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromClass.kt"); } @TestMetadata("innerConstructorFromExtension.kt") public void testInnerConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromExtension.kt"); } @TestMetadata("innerConstructorFromTopLevel.kt") public void testInnerConstructorFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/innerConstructorFromTopLevel.kt"); } @TestMetadata("javaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/javaStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/javaStaticMethod.kt"); } @TestMetadata("lhsNotAClass.kt") public void testLhsNotAClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/lhsNotAClass.kt"); } @TestMetadata("localConstructor.kt") public void testLocalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructor.kt"); } @TestMetadata("localConstructorFromExtensionInLocalClass.kt") public void testLocalConstructorFromExtensionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromExtensionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromExtensionInLocalClass.kt"); } @TestMetadata("localConstructorFromLocalClass.kt") public void testLocalConstructorFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalClass.kt"); } @TestMetadata("localConstructorFromLocalExtension.kt") public void testLocalConstructorFromLocalExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localConstructorFromLocalExtension.kt"); } @TestMetadata("localNamedFun.kt") public void testLocalNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFun.kt"); } @TestMetadata("localNamedFunFromExtensionInLocalClass.kt") public void testLocalNamedFunFromExtensionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromExtensionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromExtensionInLocalClass.kt"); } @TestMetadata("localNamedFunFromLocalClass.kt") public void testLocalNamedFunFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalClass.kt"); } @TestMetadata("localNamedFunFromLocalExtension.kt") public void testLocalNamedFunFromLocalExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/localNamedFunFromLocalExtension.kt"); } @TestMetadata("longQualifiedName.kt") public void testLongQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedName.kt"); } @TestMetadata("longQualifiedNameGeneric.kt") public void testLongQualifiedNameGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedNameGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/longQualifiedNameGeneric.kt"); } @TestMetadata("memberFromTopLevel.kt") public void testMemberFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/memberFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/memberFromTopLevel.kt"); } @TestMetadata("nestedConstructorFromClass.kt") public void testNestedConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromClass.kt"); } @TestMetadata("nestedConstructorFromExtension.kt") public void testNestedConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromExtension.kt"); } @TestMetadata("nestedConstructorFromTopLevel.kt") public void testNestedConstructorFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/nestedConstructorFromTopLevel.kt"); } @TestMetadata("noAmbiguityLocalVsTopLevel.kt") public void testNoAmbiguityLocalVsTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityLocalVsTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityLocalVsTopLevel.kt"); } @TestMetadata("noAmbiguityMemberVsExtension.kt") public void testNoAmbiguityMemberVsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsExtension.kt"); } @TestMetadata("noAmbiguityMemberVsTopLevel.kt") public void testNoAmbiguityMemberVsTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/noAmbiguityMemberVsTopLevel.kt"); } @TestMetadata("privateStaticAndPublicMember.kt") public void testPrivateStaticAndPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/privateStaticAndPublicMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/privateStaticAndPublicMember.kt"); } @TestMetadata("renameOnImport.kt") public void testRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/renameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/renameOnImport.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromExtensionInClass.kt") public void testTopLevelFromExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromExtensionInClass.kt"); } @TestMetadata("topLevelFromTopLevel.kt") public void testTopLevelFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/topLevelFromTopLevel.kt"); } @TestMetadata("unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/function/unresolved.kt"); } } @@ -2373,104 +2036,92 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generic extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/generic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentAndReturnExpectedType.kt") public void testArgumentAndReturnExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt"); } @TestMetadata("argumentExpectedType.kt") public void testArgumentExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/argumentExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/argumentExpectedType.kt"); } @TestMetadata("dependOnArgumentType.kt") public void testDependOnArgumentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/dependOnArgumentType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/dependOnArgumentType.kt"); } @TestMetadata("expectedFunctionType.kt") public void testExpectedFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/expectedFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/expectedFunctionType.kt"); } @TestMetadata("explicitTypeArguments.kt") public void testExplicitTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt"); } @TestMetadata("genericExtensionFunction.kt") public void testGenericExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt"); } @TestMetadata("genericFunctionsWithNullableTypes.kt") public void testGenericFunctionsWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt"); } @TestMetadata("kt10968.kt") public void testKt10968() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt10968.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt10968.kt"); } @TestMetadata("kt11075.kt") public void testKt11075() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt11075.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt11075.kt"); } @TestMetadata("kt12286.kt") public void testKt12286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt12286.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt12286.kt"); } @TestMetadata("kt7470.kt") public void testKt7470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/kt7470.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/kt7470.kt"); } @TestMetadata("nestedCallWithOverload.kt") public void testNestedCallWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt"); } @TestMetadata("noInferenceFeatureForCallableReferences.kt") public void testNoInferenceFeatureForCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/noInferenceFeatureForCallableReferences.kt"); } @TestMetadata("resolutionGenericCallableWithNullableTypes.kt") public void testResolutionGenericCallableWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt"); } @TestMetadata("resolutionWithGenericCallable.kt") public void testResolutionWithGenericCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt"); } @TestMetadata("specialCalls.kt") public void testSpecialCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt"); } } @@ -2478,16 +2129,18 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractPropertyViaSubclasses.kt") public void testAbstractPropertyViaSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/abstractPropertyViaSubclasses.kt"); } @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -2496,92 +2149,77 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("classFromClass.kt") public void testClassFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/classFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/classFromClass.kt"); } @TestMetadata("extensionFromTopLevel.kt") public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/extensionFromTopLevel.kt"); } @TestMetadata("extensionPropertyOnNullable.kt") public void testExtensionPropertyOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/extensionPropertyOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/extensionPropertyOnNullable.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/genericClass.kt"); } @TestMetadata("javaInstanceField.kt") public void testJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/javaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/javaInstanceField.kt"); } @TestMetadata("javaStaticFieldViaImport.kt") public void testJavaStaticFieldViaImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/javaStaticFieldViaImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/javaStaticFieldViaImport.kt"); } @TestMetadata("kt7564.kt") public void testKt7564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/kt7564.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/kt7564.kt"); } @TestMetadata("kt7945_unrelatedClass.kt") public void testKt7945_unrelatedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt"); } @TestMetadata("localVariable.kt") public void testLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/localVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/localVariable.kt"); } @TestMetadata("memberFromTopLevel.kt") public void testMemberFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.kt"); } @TestMetadata("protectedVarFromClass.kt") public void testProtectedVarFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/protectedVarFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/protectedVarFromClass.kt"); } @TestMetadata("returnTypeDependentOnGenericProperty.kt") public void testReturnTypeDependentOnGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/returnTypeDependentOnGenericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/returnTypeDependentOnGenericProperty.kt"); } @TestMetadata("samePriorityForFunctionsAndProperties.kt") public void testSamePriorityForFunctionsAndProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/samePriorityForFunctionsAndProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/samePriorityForFunctionsAndProperties.kt"); } @TestMetadata("syntheticProperties.kt") public void testSyntheticProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/syntheticProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/syntheticProperties.kt"); } @TestMetadata("topLevelFromTopLevel.kt") public void testTopLevelFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.kt"); } } @@ -2589,158 +2227,137 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousWithVararg.kt") public void testAmbiguousWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/ambiguousWithVararg.kt"); } @TestMetadata("byArgType.kt") public void testByArgType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byArgType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/byArgType.kt"); } @TestMetadata("byGenericArgType.kt") public void testByGenericArgType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt"); } @TestMetadata("byValType.kt") public void testByValType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/byValType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/byValType.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/constructor.kt"); } @TestMetadata("innerClassConstructorOnOuterClassInstance.kt") public void testInnerClassConstructorOnOuterClassInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/innerClassConstructorOnOuterClassInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/innerClassConstructorOnOuterClassInstance.kt"); } @TestMetadata("intersectionTypeOverloadWithWrongParameter.kt") public void testIntersectionTypeOverloadWithWrongParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt"); } @TestMetadata("kt10036.kt") public void testKt10036() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036.kt"); } @TestMetadata("kt10036_bound.kt") public void testKt10036_bound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036_bound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt10036_bound.kt"); } @TestMetadata("kt12338.kt") public void testKt12338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt12338.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt12338.kt"); } @TestMetadata("kt12751.kt") public void testKt12751() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt12751.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt12751.kt"); } @TestMetadata("kt8596.kt") public void testKt8596() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt8596.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt8596.kt"); } @TestMetadata("kt9601.kt") public void testKt9601() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/kt9601.kt"); } @TestMetadata("moreSpecificAmbiguousExtensions.kt") public void testMoreSpecificAmbiguousExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificAmbiguousExtensions.kt"); } @TestMetadata("moreSpecificSimple.kt") public void testMoreSpecificSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/moreSpecificSimple.kt"); } @TestMetadata("noFakeDescriptorForObject.kt") public void testNoFakeDescriptorForObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/noFakeDescriptorForObject.kt"); } @TestMetadata("overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/overloads.kt"); } @TestMetadata("overloadsBound.kt") public void testOverloadsBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsBound.kt"); } @TestMetadata("overloadsMember.kt") public void testOverloadsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/overloadsMember.kt"); } @TestMetadata("valVsFun.kt") public void testValVsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/valVsFun.kt"); } @TestMetadata("withAs.kt") public void testWithAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withAs.kt"); } @TestMetadata("withExtFun.kt") public void testWithExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withExtFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withExtFun.kt"); } @TestMetadata("withGenericFun.kt") public void testWithGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt"); } @TestMetadata("withPlaceholderTypes.kt") public void testWithPlaceholderTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt"); } @TestMetadata("withVararg.kt") public void testWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/callableReference/resolve/withVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withVararg.kt"); } } } @@ -2749,496 +2366,424 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsArray.kt") public void testAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsArray.kt"); } @TestMetadata("AsErasedError.kt") public void testAsErasedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedError.kt"); } @TestMetadata("AsErasedFine.kt") public void testAsErasedFine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedFine.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedFine.kt"); } @TestMetadata("AsErasedStar.kt") public void testAsErasedStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedStar.kt"); } @TestMetadata("AsErasedWarning.kt") public void testAsErasedWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsErasedWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsErasedWarning.kt"); } @TestMetadata("AsInBinaryUnary.kt") public void testAsInBinaryUnary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt"); } @TestMetadata("AsInBlockWithReturnType.kt") public void testAsInBlockWithReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt"); } @TestMetadata("AsInExpressionBody.kt") public void testAsInExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInExpressionBody.kt"); } @TestMetadata("AsInPropertyAndPropertyAccessor.kt") public void testAsInPropertyAndPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsInPropertyAndPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsInPropertyAndPropertyAccessor.kt"); } @TestMetadata("AsNothing.kt") public void testAsNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsNothing.kt"); } @TestMetadata("AsTypeAlias.kt") public void testAsTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsTypeAlias.kt"); } @TestMetadata("AsWithOtherParameter.kt") public void testAsWithOtherParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/AsWithOtherParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/AsWithOtherParameter.kt"); } @TestMetadata("checkCastToNullableType.kt") public void testCheckCastToNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/checkCastToNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/checkCastToNullableType.kt"); } @TestMetadata("constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/constants.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/constants.kt"); } @TestMetadata("DowncastMap.kt") public void testDowncastMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/DowncastMap.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/DowncastMap.kt"); } @TestMetadata("ExtensionAsNonExtension.kt") public void testExtensionAsNonExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/ExtensionAsNonExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/ExtensionAsNonExtension.kt"); } @TestMetadata("FlexibleTargetType.kt") public void testFlexibleTargetType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/FlexibleTargetType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/FlexibleTargetType.kt"); } @TestMetadata("IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt") public void testIsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForDerivedWithOneSubstitutedAndOneSameGeneric.kt"); } @TestMetadata("IsErasedAllowForExactSupertypeCheck.kt") public void testIsErasedAllowForExactSupertypeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForExactSupertypeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForExactSupertypeCheck.kt"); } @TestMetadata("IsErasedAllowForOverridenVarianceWithProjection.kt") public void testIsErasedAllowForOverridenVarianceWithProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForOverridenVarianceWithProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForOverridenVarianceWithProjection.kt"); } @TestMetadata("IsErasedAllowForSupertypeCheckWithContrvariance.kt") public void testIsErasedAllowForSupertypeCheckWithContrvariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithContrvariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithContrvariance.kt"); } @TestMetadata("IsErasedAllowForSupertypeCheckWithCovariance.kt") public void testIsErasedAllowForSupertypeCheckWithCovariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithCovariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForSupertypeCheckWithCovariance.kt"); } @TestMetadata("IsErasedAllowForTypeWithIrrelevantMixin.kt") public void testIsErasedAllowForTypeWithIrrelevantMixin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithIrrelevantMixin.kt"); } @TestMetadata("IsErasedAllowForTypeWithTwoSameTypeSubstitutions.kt") public void testIsErasedAllowForTypeWithTwoSameTypeSubstitutions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithTwoSameTypeSubstitutions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithTwoSameTypeSubstitutions.kt"); } @TestMetadata("IsErasedAllowForTypeWithoutTypeArguments.kt") public void testIsErasedAllowForTypeWithoutTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithoutTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowForTypeWithoutTypeArguments.kt"); } @TestMetadata("IsErasedAllowFromOut.kt") public void testIsErasedAllowFromOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut.kt"); } @TestMetadata("IsErasedAllowFromOut2.kt") public void testIsErasedAllowFromOut2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOut2.kt"); } @TestMetadata("IsErasedAllowFromOutAtClass.kt") public void testIsErasedAllowFromOutAtClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOutAtClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowFromOutAtClass.kt"); } @TestMetadata("IsErasedAllowParameterSubtype.kt") public void testIsErasedAllowParameterSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowParameterSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowParameterSubtype.kt"); } @TestMetadata("IsErasedAllowSameClassParameter.kt") public void testIsErasedAllowSameClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameClassParameter.kt"); } @TestMetadata("IsErasedAllowSameParameterParameter.kt") public void testIsErasedAllowSameParameterParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameParameterParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedAllowSameParameterParameter.kt"); } @TestMetadata("isErasedAnyAndStarred.kt") public void testIsErasedAnyAndStarred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/isErasedAnyAndStarred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/isErasedAnyAndStarred.kt"); } @TestMetadata("IsErasedDisallowDifferentArgInvariantPosition.kt") public void testIsErasedDisallowDifferentArgInvariantPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowDifferentArgInvariantPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowDifferentArgInvariantPosition.kt"); } @TestMetadata("IsErasedDisallowForOverridenVariance.kt") public void testIsErasedDisallowForOverridenVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForOverridenVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForOverridenVariance.kt"); } @TestMetadata("IsErasedDisallowForTypeWithConstraints.kt") public void testIsErasedDisallowForTypeWithConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowForTypeWithConstraints.kt"); } @TestMetadata("IsErasedDisallowFromAny.kt") public void testIsErasedDisallowFromAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromAny.kt"); } @TestMetadata("IsErasedDisallowFromIn.kt") public void testIsErasedDisallowFromIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromIn.kt"); } @TestMetadata("IsErasedDisallowFromOut.kt") public void testIsErasedDisallowFromOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOut.kt"); } @TestMetadata("IsErasedDisallowFromOutAtClass.kt") public void testIsErasedDisallowFromOutAtClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOutAtClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDisallowFromOutAtClass.kt"); } @TestMetadata("IsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid.kt") public void testIsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithFirstInvalid.kt"); } @TestMetadata("IsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid.kt") public void testIsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedDissallowForSubtypeMappedToTwoParamsWithSecondInvalid.kt"); } @TestMetadata("IsErasedNonGeneric.kt") public void testIsErasedNonGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedNonGeneric.kt"); } @TestMetadata("IsErasedNullableTasT.kt") public void testIsErasedNullableTasT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedNullableTasT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedNullableTasT.kt"); } @TestMetadata("IsErasedStar.kt") public void testIsErasedStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedStar.kt"); } @TestMetadata("isErasedTAndStarred.kt") public void testIsErasedTAndStarred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/isErasedTAndStarred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/isErasedTAndStarred.kt"); } @TestMetadata("IsErasedTasT.kt") public void testIsErasedTasT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedTasT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedTasT.kt"); } @TestMetadata("IsErasedToErrorType.kt") public void testIsErasedToErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedToErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedToErrorType.kt"); } @TestMetadata("isErasedUnrelatedAndStarred.kt") public void testIsErasedUnrelatedAndStarred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/isErasedUnrelatedAndStarred.kt"); } @TestMetadata("IsErasedUpcastToNonReified.kt") public void testIsErasedUpcastToNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsErasedUpcastToNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsErasedUpcastToNonReified.kt"); } @TestMetadata("IsForTypeWithComplexUpperBound.kt") public void testIsForTypeWithComplexUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsForTypeWithComplexUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsForTypeWithComplexUpperBound.kt"); } @TestMetadata("IsRecursionSustainable.kt") public void testIsRecursionSustainable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsRecursionSustainable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsRecursionSustainable.kt"); } @TestMetadata("IsTraits.kt") public void testIsTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsTraits.kt"); } @TestMetadata("IsWithCycleUpperBounds.kt") public void testIsWithCycleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/IsWithCycleUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/IsWithCycleUpperBounds.kt"); } @TestMetadata("kt15161.kt") public void testKt15161() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/kt15161.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/kt15161.kt"); } @TestMetadata("kt614.kt") public void testKt614() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/kt614.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/kt614.kt"); } @TestMetadata("nothingAs.kt") public void testNothingAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/nothingAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/nothingAs.kt"); } @TestMetadata("NullableToNullable.kt") public void testNullableToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/NullableToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/NullableToNullable.kt"); } @TestMetadata("StableTypeForUselessCast.kt") public void testStableTypeForUselessCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/StableTypeForUselessCast.kt"); } @TestMetadata("UselessSafeCast.kt") public void testUselessSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt"); } @TestMetadata("WhenErasedDisallowFromAny.kt") public void testWhenErasedDisallowFromAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/WhenErasedDisallowFromAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/WhenErasedDisallowFromAny.kt"); } @TestMetadata("WhenWithExpression.kt") public void testWhenWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/WhenWithExpression.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/cast/bare") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bare extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBare() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/bare"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsNestedBare.kt") public void testAsNestedBare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/AsNestedBare.kt"); } @TestMetadata("AsNullable.kt") public void testAsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/AsNullable.kt"); } @TestMetadata("AsNullableNotEnough.kt") public void testAsNullableNotEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/AsNullableNotEnough.kt"); } @TestMetadata("EitherAs.kt") public void testEitherAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherAs.kt"); } @TestMetadata("EitherIs.kt") public void testEitherIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherIs.kt"); } @TestMetadata("EitherNotIs.kt") public void testEitherNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherNotIs.kt"); } @TestMetadata("EitherSafeAs.kt") public void testEitherSafeAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherSafeAs.kt"); } @TestMetadata("EitherWhen.kt") public void testEitherWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/EitherWhen.kt"); } @TestMetadata("ErrorsInSubstitution.kt") public void testErrorsInSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/ErrorsInSubstitution.kt"); } @TestMetadata("FromErrorType.kt") public void testFromErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/FromErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/FromErrorType.kt"); } @TestMetadata("NullableAs.kt") public void testNullableAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAs.kt"); } @TestMetadata("NullableAsNotEnough.kt") public void testNullableAsNotEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAsNotEnough.kt"); } @TestMetadata("NullableAsNullable.kt") public void testNullableAsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullable.kt"); } @TestMetadata("NullableAsNullableNotEnough.kt") public void testNullableAsNullableNotEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/NullableAsNullableNotEnough.kt"); } @TestMetadata("RedundantNullable.kt") public void testRedundantNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/RedundantNullable.kt"); } @TestMetadata("ToErrorType.kt") public void testToErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/ToErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/ToErrorType.kt"); } @TestMetadata("UnrelatedAs.kt") public void testUnrelatedAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/UnrelatedAs.kt"); } @TestMetadata("UnrelatedColon.kt") public void testUnrelatedColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/UnrelatedColon.kt"); } @TestMetadata("UnrelatedIs.kt") public void testUnrelatedIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/bare/UnrelatedIs.kt"); } } @@ -3246,38 +2791,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NeverSucceeds extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNeverSucceeds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cast/neverSucceeds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CastToNotNullSuper.kt") public void testCastToNotNullSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/CastToNotNullSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/CastToNotNullSuper.kt"); } @TestMetadata("MappedDirect.kt") public void testMappedDirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedDirect.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedDirect.kt"); } @TestMetadata("MappedSubtypes.kt") public void testMappedSubtypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedSubtypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/MappedSubtypes.kt"); } @TestMetadata("NoGenericsRelated.kt") public void testNoGenericsRelated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsRelated.kt"); } @TestMetadata("NoGenericsUnrelated.kt") public void testNoGenericsUnrelated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cast/neverSucceeds/NoGenericsUnrelated.kt"); } } } @@ -3286,50 +2830,47 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/checkArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayAccessSet.kt") public void testArrayAccessSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSet.kt"); } @TestMetadata("arrayAccessSetTooManyArgs.kt") public void testArrayAccessSetTooManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt"); } @TestMetadata("booleanExpressions.kt") public void testBooleanExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt"); } @TestMetadata("kt1897_diagnostic_part.kt") public void testKt1897_diagnostic_part() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt"); } @TestMetadata("kt1940.kt") public void testKt1940() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/kt1940.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/kt1940.kt"); } @TestMetadata("overloadedFunction.kt") public void testOverloadedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt"); } @TestMetadata("SpreadVarargs.kt") public void testSpreadVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt"); } } @@ -3337,92 +2878,82 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiteral extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/classLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/arrays.kt"); } @TestMetadata("classAndObjectLiteralType.kt") public void testClassAndObjectLiteralType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/classAndObjectLiteralType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/classAndObjectLiteralType.kt"); } @TestMetadata("classLiteralType.kt") public void testClassLiteralType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/classLiteralType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/classLiteralType.kt"); } @TestMetadata("expressionWithNullableType.kt") public void testExpressionWithNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/expressionWithNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/expressionWithNullableType.kt"); } @TestMetadata("genericArrays.kt") public void testGenericArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/genericArrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/genericArrays.kt"); } @TestMetadata("genericClasses.kt") public void testGenericClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/genericClasses.kt"); } @TestMetadata("inAnnotationArguments.kt") public void testInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/inAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/inAnnotationArguments.kt"); } @TestMetadata("integerValueType.kt") public void testIntegerValueType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/integerValueType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/integerValueType.kt"); } @TestMetadata("nonClassesOnLHS.kt") public void testNonClassesOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/nonClassesOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/nonClassesOnLHS.kt"); } @TestMetadata("qualifiedClassLiteral.kt") public void testQualifiedClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/qualifiedClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/qualifiedClassLiteral.kt"); } @TestMetadata("simpleClassLiteral.kt") public void testSimpleClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/simpleClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/simpleClassLiteral.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/smartCast.kt"); } @TestMetadata("typealiases.kt") public void testTypealiases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/typealiases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/typealiases.kt"); } @TestMetadata("unresolvedClass.kt") public void testUnresolvedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classLiteral/unresolvedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classLiteral/unresolvedClass.kt"); } } @@ -3430,116 +2961,102 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObjects extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/classObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builtInClassObjects.kt") public void testBuiltInClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/builtInClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/builtInClassObjects.kt"); } @TestMetadata("ClassObjectCannotAccessClassFields.kt") public void testClassObjectCannotAccessClassFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjectCannotAccessClassFields.kt"); } @TestMetadata("classObjectHeader.kt") public void testClassObjectHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/classObjectHeader.kt"); } @TestMetadata("classObjectInLocalClass.kt") public void testClassObjectInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/classObjectInLocalClass.kt"); } @TestMetadata("classObjectRedeclaration.kt") public void testClassObjectRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/classObjectRedeclaration.kt"); } @TestMetadata("ClassObjectVisibility.kt") public void testClassObjectVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjectVisibility.kt"); } @TestMetadata("ClassObjects.kt") public void testClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/ClassObjects.kt"); } @TestMetadata("companionObjectOfPrivateClassVisibility.kt") public void testCompanionObjectOfPrivateClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/companionObjectOfPrivateClassVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/companionObjectOfPrivateClassVisibility.kt"); } @TestMetadata("importClassInClassObject.kt") public void testImportClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/importClassInClassObject.kt"); } @TestMetadata("InnerClassAccessThroughClassObject.kt") public void testInnerClassAccessThroughClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt"); } @TestMetadata("InnerClassAccessThroughEnum.kt") public void testInnerClassAccessThroughEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt"); } @TestMetadata("InnerClassClassObject.kt") public void testInnerClassClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassClassObject.kt"); } @TestMetadata("invisibleClassObjects.kt") public void testInvisibleClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt"); } @TestMetadata("kt3866.kt") public void testKt3866() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/kt3866.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/kt3866.kt"); } @TestMetadata("multipleDissallowedDefaultObjects.kt") public void testMultipleDissallowedDefaultObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/multipleDissallowedDefaultObjects.kt"); } @TestMetadata("nestedClassInPrivateClassObject.kt") public void testNestedClassInPrivateClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/nestedClassInPrivateClassObject.kt"); } @TestMetadata("resolveFunctionInsideClassObject.kt") public void testResolveFunctionInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/resolveFunctionInsideClassObject.kt"); } @TestMetadata("typeParametersInObject.kt") public void testTypeParametersInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/classObjects/typeParametersInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/classObjects/typeParametersInObject.kt"); } } @@ -3547,68 +3064,62 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionLiterals extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollectionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentsOfAnnotation.kt") public void testArgumentsOfAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt"); } @TestMetadata("argumentsOfAnnotationWithKClass.kt") public void testArgumentsOfAnnotationWithKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt"); } @TestMetadata("basicCollectionLiterals.kt") public void testBasicCollectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt"); } @TestMetadata("collectionLiteralsAsPrimitiveArrays.kt") public void testCollectionLiteralsAsPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsAsPrimitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsAsPrimitiveArrays.kt"); } @TestMetadata("collectionLiteralsWithVarargs.kt") public void testCollectionLiteralsWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt"); } @TestMetadata("defaultValuesInAnnotation.kt") public void testDefaultValuesInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt"); } @TestMetadata("defaultValuesWithConstantsInAnnotation.kt") public void testDefaultValuesWithConstantsInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesWithConstantsInAnnotation.kt"); } @TestMetadata("noArrayLiteralsInAnnotationsFeature.kt") public void testNoArrayLiteralsInAnnotationsFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/noArrayLiteralsInAnnotationsFeature.kt"); } @TestMetadata("noCollectionLiterals.kt") public void testNoCollectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt"); } @TestMetadata("resolveToFunctionFromBuiltIns.kt") public void testResolveToFunctionFromBuiltIns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/collectionLiterals/resolveToFunctionFromBuiltIns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/collectionLiterals/resolveToFunctionFromBuiltIns.kt"); } } @@ -3616,16 +3127,18 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstructorConsistency extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterInitialization.kt") public void testAfterInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/afterInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/afterInitialization.kt"); } @TestMetadata("aliencall.kt") public void testAliencall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/aliencall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/aliencall.kt"); } public void testAllFilesPresentInConstructorConsistency() throws Exception { @@ -3634,146 +3147,122 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/assignment.kt"); } @TestMetadata("backing.kt") public void testBacking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/backing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/backing.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/basic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/basic.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/companion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/companion.kt"); } @TestMetadata("comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/comparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/comparison.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/delegate.kt"); } @TestMetadata("derived.kt") public void testDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/derived.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/derived.kt"); } @TestMetadata("derivedProperty.kt") public void testDerivedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/derivedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/derivedProperty.kt"); } @TestMetadata("getset.kt") public void testGetset() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/getset.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/getset.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/init.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/init.kt"); } @TestMetadata("initializerWithSecondaryConstructor.kt") public void testInitializerWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/initializerWithSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/initializerWithSecondaryConstructor.kt"); } @TestMetadata("initwithgetter.kt") public void testInitwithgetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/initwithgetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/initwithgetter.kt"); } @TestMetadata("inspection.kt") public void testInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/inspection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/inspection.kt"); } @TestMetadata("lambdaInObject.kt") public void testLambdaInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/lambdaInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/lambdaInObject.kt"); } @TestMetadata("lateInit.kt") public void testLateInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/lateInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/lateInit.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/localObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/localObject.kt"); } @TestMetadata("multipleAreNull.kt") public void testMultipleAreNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/multipleAreNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/multipleAreNull.kt"); } @TestMetadata("nobacking.kt") public void testNobacking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/nobacking.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/nobacking.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/open.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/open.kt"); } @TestMetadata("openProperty.kt") public void testOpenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/openProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/openProperty.kt"); } @TestMetadata("outer.kt") public void testOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/outer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/outer.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/property.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/propertyAccess.kt"); } @TestMetadata("twoSecondaryConstructors.kt") public void testTwoSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/constructorConsistency/twoSecondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/constructorConsistency/twoSecondaryConstructors.kt"); } } @@ -3781,634 +3270,539 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlowAnalysis extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlFlowAnalysis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignedInFinally.kt") public void testAssignedInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignedInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignedInFinally.kt"); } @TestMetadata("assignmentInLocalsInConstructor.kt") public void testAssignmentInLocalsInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignmentInLocalsInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignmentInLocalsInConstructor.kt"); } @TestMetadata("backingFieldInsideGetter.kt") public void testBackingFieldInsideGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter.kt"); } @TestMetadata("breakContinueInTryFinally.kt") public void testBreakContinueInTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakContinueInTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakContinueInTryFinally.kt"); } @TestMetadata("breakInsideLocal.kt") public void testBreakInsideLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakInsideLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakInsideLocal.kt"); } @TestMetadata("breakOrContinueInLoopCondition.kt") public void testBreakOrContinueInLoopCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakOrContinueInLoopCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/breakOrContinueInLoopCondition.kt"); } @TestMetadata("checkInnerLocalDeclarations.kt") public void testCheckInnerLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkInnerLocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkInnerLocalDeclarations.kt"); } @TestMetadata("checkPropertyAccessor.kt") public void testCheckPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/checkPropertyAccessor.kt"); } @TestMetadata("constructorPropertyInterdependence.kt") public void testConstructorPropertyInterdependence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/constructorPropertyInterdependence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/constructorPropertyInterdependence.kt"); } @TestMetadata("definiteReturnInWhen.kt") public void testDefiniteReturnInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturnInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturnInWhen.kt"); } @TestMetadata("delegatedPropertyEarlyAccess.kt") public void testDelegatedPropertyEarlyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedPropertyEarlyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/delegatedPropertyEarlyAccess.kt"); } @TestMetadata("doWhileAssignment.kt") public void testDoWhileAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileAssignment.kt"); } @TestMetadata("doWhileNotDefined.kt") public void testDoWhileNotDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileNotDefined.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/doWhileNotDefined.kt"); } @TestMetadata("elvisNotProcessed.kt") public void testElvisNotProcessed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt"); } @TestMetadata("enumCompanionInterdependence.kt") public void testEnumCompanionInterdependence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumCompanionInterdependence.kt"); } @TestMetadata("enumInterdependence.kt") public void testEnumInterdependence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumInterdependence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/enumInterdependence.kt"); } @TestMetadata("fieldAsClassDelegate.kt") public void testFieldAsClassDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt"); } @TestMetadata("infiniteLoops.kt") public void testInfiniteLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/infiniteLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/infiniteLoops.kt"); } @TestMetadata("initializationInLambda.kt") public void testInitializationInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLambda.kt"); } @TestMetadata("initializationInLocalClass.kt") public void testInitializationInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalClass.kt"); } @TestMetadata("initializationInLocalFun.kt") public void testInitializationInLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalFun.kt"); } @TestMetadata("initializationInLocalViaExplicitThis.kt") public void testInitializationInLocalViaExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt"); } @TestMetadata("kt1001.kt") public void testKt1001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1001.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1001.kt"); } @TestMetadata("kt1027.kt") public void testKt1027() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1027.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1027.kt"); } @TestMetadata("kt1066.kt") public void testKt1066() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1066.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1066.kt"); } @TestMetadata("kt10805.kt") public void testKt10805() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt"); } @TestMetadata("kt10823.kt") public void testKt10823() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10823.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10823.kt"); } @TestMetadata("kt1156.kt") public void testKt1156() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1156.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1156.kt"); } @TestMetadata("kt1185enums.kt") public void testKt1185enums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1185enums.kt"); } @TestMetadata("kt1189.kt") public void testKt1189() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1189.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1189.kt"); } @TestMetadata("kt1191.kt") public void testKt1191() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1191.kt"); } @TestMetadata("kt1219.1301.kt") public void testKt1219_1301() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1219.1301.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1219.1301.kt"); } @TestMetadata("kt1571.kt") public void testKt1571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1571.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1571.kt"); } @TestMetadata("kt1977.kt") public void testKt1977() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1977.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt1977.kt"); } @TestMetadata("kt2166_kt2103.kt") public void testKt2166_kt2103() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2166_kt2103.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2166_kt2103.kt"); } @TestMetadata("kt2226.kt") public void testKt2226() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2226.kt"); } @TestMetadata("kt2330.kt") public void testKt2330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2330.kt"); } @TestMetadata("kt2334.kt") public void testKt2334() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2334.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2334.kt"); } @TestMetadata("kt2369.kt") public void testKt2369() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2369.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2369.kt"); } @TestMetadata("kt2845.kt") public void testKt2845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2845.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2845.kt"); } @TestMetadata("kt2960.kt") public void testKt2960() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2960.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2960.kt"); } @TestMetadata("kt2972.kt") public void testKt2972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2972.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt2972.kt"); } @TestMetadata("kt3444.kt") public void testKt3444() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3444.kt"); } @TestMetadata("kt3501.kt") public void testKt3501() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3501.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt3501.kt"); } @TestMetadata("kt4126.kt") public void testKt4126() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4126.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4126.kt"); } @TestMetadata("kt4405.kt") public void testKt4405() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4405.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt4405.kt"); } @TestMetadata("kt510.kt") public void testKt510() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt510.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt510.kt"); } @TestMetadata("kt607.kt") public void testKt607() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt607.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt607.kt"); } @TestMetadata("kt609.kt") public void testKt609() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt609.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt609.kt"); } @TestMetadata("kt610.kt") public void testKt610() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt610.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt610.kt"); } @TestMetadata("kt6788.kt") public void testKt6788() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt6788.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt6788.kt"); } @TestMetadata("kt776.kt") public void testKt776() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt776.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt776.kt"); } @TestMetadata("kt843.kt") public void testKt843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt843.kt"); } @TestMetadata("kt897.kt") public void testKt897() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt897.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/kt897.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/localClasses.kt"); } @TestMetadata("localObjectInConstructor.kt") public void testLocalObjectInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/localObjectInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/localObjectInConstructor.kt"); } @TestMetadata("nestedTryFinally.kt") public void testNestedTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/nestedTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/nestedTryFinally.kt"); } @TestMetadata("nonLocalReturnUnreachable.kt") public void testNonLocalReturnUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnUnreachable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnUnreachable.kt"); } @TestMetadata("nonLocalReturnWithFinally.kt") public void testNonLocalReturnWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnWithFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/nonLocalReturnWithFinally.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/privateSetter.kt"); } @TestMetadata("propertiesInitWithOtherInstance.kt") public void testPropertiesInitWithOtherInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstance.kt"); } @TestMetadata("propertiesInitWithOtherInstanceInner.kt") public void testPropertiesInitWithOtherInstanceInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceInner.kt"); } @TestMetadata("propertiesInitWithOtherInstanceThisLabel.kt") public void testPropertiesInitWithOtherInstanceThisLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceThisLabel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesInitWithOtherInstanceThisLabel.kt"); } @TestMetadata("propertiesOrderInPackage.kt") public void testPropertiesOrderInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesOrderInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/propertiesOrderInPackage.kt"); } @TestMetadata("reassignmentInTryCatch.kt") public void testReassignmentInTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatch.kt"); } @TestMetadata("reassignmentInTryCatchWithJumps.kt") public void testReassignmentInTryCatchWithJumps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatchWithJumps.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/reassignmentInTryCatchWithJumps.kt"); } @TestMetadata("referenceToPropertyInitializer.kt") public void testReferenceToPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/referenceToPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/referenceToPropertyInitializer.kt"); } @TestMetadata("repeatUnitializedErrorOnlyForLocalVars.kt") public void testRepeatUnitializedErrorOnlyForLocalVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/repeatUnitializedErrorOnlyForLocalVars.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/repeatUnitializedErrorOnlyForLocalVars.kt"); } @TestMetadata("scopeOfAnonymousInitializer.kt") public void testScopeOfAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/scopeOfAnonymousInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/scopeOfAnonymousInitializer.kt"); } @TestMetadata("throwInLambda.kt") public void testThrowInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt"); } @TestMetadata("tryWithAssignmentUsedInCatch.kt") public void testTryWithAssignmentUsedInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/tryWithAssignmentUsedInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/tryWithAssignmentUsedInCatch.kt"); } @TestMetadata("uninitializedInLocalDeclarations.kt") public void testUninitializedInLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/uninitializedInLocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/uninitializedInLocalDeclarations.kt"); } @TestMetadata("UninitializedOrReassignedVariables.kt") public void testUninitializedOrReassignedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt"); } @TestMetadata("unmappedArgs.kt") public void testUnmappedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unmappedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unmappedArgs.kt"); } @TestMetadata("unresolvedReference.kt") public void testUnresolvedReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unresolvedReference.kt"); } @TestMetadata("unusedInAnonymous.kt") public void testUnusedInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unusedInAnonymous.kt"); } @TestMetadata("useUninitializedInLambda.kt") public void testUseUninitializedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/useUninitializedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/useUninitializedInLambda.kt"); } @TestMetadata("varInitializationInIfInCycle.kt") public void testVarInitializationInIfInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/varInitializationInIfInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/varInitializationInIfInCycle.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCode extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeadCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commasAndWhitespaces.kt") public void testCommasAndWhitespaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commasAndWhitespaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commasAndWhitespaces.kt"); } @TestMetadata("commentsInDeadCode.kt") public void testCommentsInDeadCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commentsInDeadCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/commentsInDeadCode.kt"); } @TestMetadata("deadCallInInvokeCall.kt") public void testDeadCallInInvokeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInInvokeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInInvokeCall.kt"); } @TestMetadata("deadCallInReceiver.kt") public void testDeadCallInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCallInReceiver.kt"); } @TestMetadata("deadCodeDifferentExamples.kt") public void testDeadCodeDifferentExamples() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeDifferentExamples.kt"); } @TestMetadata("deadCodeFromDifferentSources.kt") public void testDeadCodeFromDifferentSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeFromDifferentSources.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeFromDifferentSources.kt"); } @TestMetadata("deadCodeInArrayAccess.kt") public void testDeadCodeInArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInArrayAccess.kt"); } @TestMetadata("deadCodeInAssignment.kt") public void testDeadCodeInAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInAssignment.kt"); } @TestMetadata("deadCodeInBinaryExpressions.kt") public void testDeadCodeInBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInBinaryExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInBinaryExpressions.kt"); } @TestMetadata("deadCodeInCalls.kt") public void testDeadCodeInCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInCalls.kt"); } @TestMetadata("deadCodeInDeadCode.kt") public void testDeadCodeInDeadCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInDeadCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInDeadCode.kt"); } @TestMetadata("deadCodeInIf.kt") public void testDeadCodeInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInIf.kt"); } @TestMetadata("deadCodeInInnerExpressions.kt") public void testDeadCodeInInnerExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInInnerExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInInnerExpressions.kt"); } @TestMetadata("deadCodeInLocalDeclarations.kt") public void testDeadCodeInLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLocalDeclarations.kt"); } @TestMetadata("deadCodeInLoops.kt") public void testDeadCodeInLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInLoops.kt"); } @TestMetadata("deadCodeInReturn.kt") public void testDeadCodeInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInReturn.kt"); } @TestMetadata("deadCodeInUnaryExpr.kt") public void testDeadCodeInUnaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInUnaryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInUnaryExpr.kt"); } @TestMetadata("deadCodeInWhileFromBreak.kt") public void testDeadCodeInWhileFromBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInWhileFromBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInWhileFromBreak.kt"); } @TestMetadata("expressionInUnitLiteral.kt") public void testExpressionInUnitLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/expressionInUnitLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/expressionInUnitLiteral.kt"); } @TestMetadata("kt2585_1.kt") public void testKt2585_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_1.kt"); } @TestMetadata("kt2585_2.kt") public void testKt2585_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_2.kt"); } @TestMetadata("kt2585_3.kt") public void testKt2585_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt2585_3.kt"); } @TestMetadata("kt3162tryAsInitializer.kt") public void testKt3162tryAsInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt3162tryAsInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt3162tryAsInitializer.kt"); } @TestMetadata("kt5200DeadCodeInLambdas.kt") public void testKt5200DeadCodeInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt5200DeadCodeInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/kt5200DeadCodeInLambdas.kt"); } @TestMetadata("returnInDeadLambda.kt") public void testReturnInDeadLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/returnInDeadLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/returnInDeadLambda.kt"); } } @@ -4416,32 +3810,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefiniteReturn extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefiniteReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt3444_ReturnFromLocalFunctions.kt") public void testKt3444_ReturnFromLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt3444_ReturnFromLocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt3444_ReturnFromLocalFunctions.kt"); } @TestMetadata("kt4034.kt") public void testKt4034() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/kt4034.kt"); } @TestMetadata("ReturnFromFunctionInObject.kt") public void testReturnFromFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/ReturnFromFunctionInObject.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/simpleClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/definiteReturn/simpleClass.kt"); } } @@ -4449,80 +3843,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnnecessaryLateinit extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnnecessaryLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lateinitRecursiveInLambda.kt") public void testLateinitRecursiveInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitRecursiveInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitRecursiveInLambda.kt"); } @TestMetadata("lateinitWithConstructor.kt") public void testLateinitWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithConstructor.kt"); } @TestMetadata("lateinitWithErroneousDelegation.kt") public void testLateinitWithErroneousDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithErroneousDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithErroneousDelegation.kt"); } @TestMetadata("lateinitWithInit.kt") public void testLateinitWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithInit.kt"); } @TestMetadata("lateinitWithMultipleConstructors.kt") public void testLateinitWithMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructors.kt"); } @TestMetadata("lateinitWithMultipleConstructorsAndDelegation.kt") public void testLateinitWithMultipleConstructorsAndDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructorsAndDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithMultipleConstructorsAndDelegation.kt"); } @TestMetadata("lateinitWithPlusAssign.kt") public void testLateinitWithPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPlusAssign.kt"); } @TestMetadata("lateinitWithPrimaryConstructorAndConstructor.kt") public void testLateinitWithPrimaryConstructorAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPrimaryConstructorAndConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/lateinitWithPrimaryConstructorAndConstructor.kt"); } @TestMetadata("normalLateinit.kt") public void testNormalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinit.kt"); } @TestMetadata("normalLateinitWithTwoConstructors.kt") public void testNormalLateinitWithTwoConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinitWithTwoConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/normalLateinitWithTwoConstructors.kt"); } @TestMetadata("secondaryConstructorDelegateItself.kt") public void testSecondaryConstructorDelegateItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateItself.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateItself.kt"); } @TestMetadata("secondaryConstructorDelegateLoop.kt") public void testSecondaryConstructorDelegateLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateLoop.kt"); } } } @@ -4531,248 +3917,212 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchGenerics.kt") public void testCatchGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchGenerics.kt"); } @TestMetadata("catchInnerClassesOfGenerics.kt") public void testCatchInnerClassesOfGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics.kt"); } @TestMetadata("catchInnerClassesOfGenerics_deprecation.kt") public void testCatchInnerClassesOfGenerics_deprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchInnerClassesOfGenerics_deprecation.kt"); } @TestMetadata("catchWithDefault.kt") public void testCatchWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchWithDefault.kt"); } @TestMetadata("catchingLocalClassesCapturingTypeParameters.kt") public void testCatchingLocalClassesCapturingTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/catchingLocalClassesCapturingTypeParameters.kt"); } @TestMetadata("commonSupertypeOfT.kt") public void testCommonSupertypeOfT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/commonSupertypeOfT.kt"); } @TestMetadata("continueAndBreakLabelWithSameFunctionName.kt") public void testContinueAndBreakLabelWithSameFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt"); } @TestMetadata("emptyIf.kt") public void testEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/emptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/emptyIf.kt"); } @TestMetadata("ForLoopWithExtensionIteratorOnNullable.kt") public void testForLoopWithExtensionIteratorOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt"); } @TestMetadata("forLoopWithNullableRange.kt") public void testForLoopWithNullableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt"); } @TestMetadata("forWithNullableIterator.kt") public void testForWithNullableIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.kt"); } @TestMetadata("ForWithoutBraces.kt") public void testForWithoutBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ForWithoutBraces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ForWithoutBraces.kt"); } @TestMetadata("ForbidStatementAsDirectFunctionBody.kt") public void testForbidStatementAsDirectFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt"); } @TestMetadata("ifElseIntersection.kt") public void testIfElseIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt"); } @TestMetadata("ifInResultOfLambda.kt") public void testIfInResultOfLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt"); } @TestMetadata("ifToAnyDiscriminatingUsages.kt") public void testIfToAnyDiscriminatingUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt"); } @TestMetadata("ifWhenToAnyComplexExpressions.kt") public void testIfWhenToAnyComplexExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifWhenToAnyComplexExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifWhenToAnyComplexExpressions.kt"); } @TestMetadata("ifWhenWithoutElse.kt") public void testIfWhenWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt"); } @TestMetadata("improperElseInExpression.kt") public void testImproperElseInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt"); } @TestMetadata("jumpAcrossFunctionBoundary.kt") public void testJumpAcrossFunctionBoundary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/jumpAcrossFunctionBoundary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/jumpAcrossFunctionBoundary.kt"); } @TestMetadata("kt10322.kt") public void testKt10322() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt10322.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt10322.kt"); } @TestMetadata("kt10706.kt") public void testKt10706() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt10706.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt10706.kt"); } @TestMetadata("kt10717.kt") public void testKt10717() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt10717.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt10717.kt"); } @TestMetadata("kt1075.kt") public void testKt1075() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt1075.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt1075.kt"); } @TestMetadata("kt4310.kt") public void testKt4310() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt4310.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt4310.kt"); } @TestMetadata("kt657.kt") public void testKt657() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt657.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt657.kt"); } @TestMetadata("kt770.kt351.kt735_StatementType.kt") public void testKt770_kt351_kt735_StatementType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt"); } @TestMetadata("kt786.kt") public void testKt786() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt786.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt786.kt"); } @TestMetadata("kt799.kt") public void testKt799() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/kt799.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/kt799.kt"); } @TestMetadata("lambdasInExclExclAndElvis.kt") public void testLambdasInExclExclAndElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt"); } @TestMetadata("localReturnInsidePropertyAccessor.kt") public void testLocalReturnInsidePropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/localReturnInsidePropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/localReturnInsidePropertyAccessor.kt"); } @TestMetadata("specialConstructsAndPlatformTypes.kt") public void testSpecialConstructsAndPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt"); } @TestMetadata("specialConstructsWithNullableExpectedType.kt") public void testSpecialConstructsWithNullableExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/specialConstructsWithNullableExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/specialConstructsWithNullableExpectedType.kt"); } @TestMetadata("tryReturnType.kt") public void testTryReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt"); } @TestMetadata("typeInferenceForExclExcl.kt") public void testTypeInferenceForExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt"); } @TestMetadata("valVarCatchParameter.kt") public void testValVarCatchParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/valVarCatchParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/valVarCatchParameter.kt"); } @TestMetadata("valVarLoopParameter.kt") public void testValVarLoopParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt"); } @TestMetadata("whenInResultOfLambda.kt") public void testWhenInResultOfLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt"); } @TestMetadata("whenToAnyDiscriminatingUsages.kt") public void testWhenToAnyDiscriminatingUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/whenToAnyDiscriminatingUsages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/whenToAnyDiscriminatingUsages.kt"); } @TestMetadata("when.kt234.kt973.kt") public void testWhen_kt234_kt973() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt"); } } @@ -4780,148 +4130,134 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CyclicHierarchy extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCyclicHierarchy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classIndirectlyInheritsNested.kt") public void testClassIndirectlyInheritsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/classIndirectlyInheritsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/classIndirectlyInheritsNested.kt"); } @TestMetadata("classInheritsNested.kt") public void testClassInheritsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/classInheritsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/classInheritsNested.kt"); } @TestMetadata("commonSupertypeForCyclicAndUsualTypes.kt") public void testCommonSupertypeForCyclicAndUsualTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt"); } @TestMetadata("commonSupertypeForCyclicTypes.kt") public void testCommonSupertypeForCyclicTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicTypes.kt"); } @TestMetadata("cyclicHierarchy.kt") public void testCyclicHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt"); } @TestMetadata("javaJavaCycle.kt") public void testJavaJavaCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaCycle.kt"); } @TestMetadata("javaJavaNested.kt") public void testJavaJavaNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/javaJavaNested.kt"); } @TestMetadata("javaKotlinJavaCycle.kt") public void testJavaKotlinJavaCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/javaKotlinJavaCycle.kt"); } @TestMetadata("kotlinJavaCycle.kt") public void testKotlinJavaCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaCycle.kt"); } @TestMetadata("kotlinJavaKotlinCycle.kt") public void testKotlinJavaKotlinCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaKotlinCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaKotlinCycle.kt"); } @TestMetadata("kotlinJavaNestedCycle.kt") public void testKotlinJavaNestedCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kotlinJavaNestedCycle.kt"); } @TestMetadata("kt303.kt") public void testKt303() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt"); } @TestMetadata("nestedClassInSuperClassParameter.kt") public void testNestedClassInSuperClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/nestedClassInSuperClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/nestedClassInSuperClassParameter.kt"); } @TestMetadata("objectInheritsNested.kt") public void testObjectInheritsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/objectInheritsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/objectInheritsNested.kt"); } @TestMetadata("twoClassesWithNestedCycle.kt") public void testTwoClassesWithNestedCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/twoClassesWithNestedCycle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/twoClassesWithNestedCycle.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithCompanion extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithCompanion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("everythingInOneScope.kt") public void testEverythingInOneScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope.kt"); } @TestMetadata("noMembers.kt") public void testNoMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers.kt"); } @TestMetadata("onlyInterfaces.kt") public void testOnlyInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces.kt"); } @TestMetadata("typeIsLowEnough.kt") public void testTypeIsLowEnough() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/typeIsLowEnough.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/typeIsLowEnough.kt"); } @TestMetadata("withIrrelevantInterface.kt") public void testWithIrrelevantInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface.kt"); } @TestMetadata("withMembers.kt") public void testWithMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers.kt"); } @TestMetadata("withoutTypeReference.kt") public void testWithoutTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withoutTypeReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withoutTypeReference.kt"); } } } @@ -4930,200 +4266,172 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("componentNamedComponent1.kt") public void testComponentNamedComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/componentNamedComponent1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/componentNamedComponent1.kt"); } @TestMetadata("conflictingCopyOverloads.kt") public void testConflictingCopyOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.kt"); } @TestMetadata("conflictingOverloads.kt") public void testConflictingOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/conflictingOverloads.kt"); } @TestMetadata("copyOfPrivateClass.kt") public void testCopyOfPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/copyOfPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/copyOfPrivateClass.kt"); } @TestMetadata("dataClassExplicitlyOverridingCopyNoDefaults.kt") public void testDataClassExplicitlyOverridingCopyNoDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyNoDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyNoDefaults.kt"); } @TestMetadata("dataClassExplicitlyOverridingCopyWithDefaults.kt") public void testDataClassExplicitlyOverridingCopyWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyWithDefaults.kt"); } @TestMetadata("dataClassNoName.kt") public void testDataClassNoName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassNoName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassNoName.kt"); } @TestMetadata("dataClassNotOverridingCopy.kt") public void testDataClassNotOverridingCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassNotOverridingCopy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassNotOverridingCopy.kt"); } @TestMetadata("dataClassOverridingCopy_lv12.kt") public void testDataClassOverridingCopy_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv12.kt"); } @TestMetadata("dataClassOverridingCopy_lv13.kt") public void testDataClassOverridingCopy_lv13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassOverridingCopy_lv13.kt"); } @TestMetadata("dataClassVarargParam.kt") public void testDataClassVarargParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt"); } @TestMetadata("dataInheritance.kt") public void testDataInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataInheritance.kt"); } @TestMetadata("dataObject.kt") public void testDataObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/dataObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/dataObject.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/emptyConstructor.kt"); } @TestMetadata("errorTypesInDataClasses.kt") public void testErrorTypesInDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/errorTypesInDataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/errorTypesInDataClasses.kt"); } @TestMetadata("extensionComponentsOnNullable.kt") public void testExtensionComponentsOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt"); } @TestMetadata("finalMembersInBaseClass.kt") public void testFinalMembersInBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/finalMembersInBaseClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/finalMembersInBaseClass.kt"); } @TestMetadata("implementMethodsFromInterface.kt") public void testImplementMethodsFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/implementMethodsFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/implementMethodsFromInterface.kt"); } @TestMetadata("implementTraitWhichHasComponent1.kt") public void testImplementTraitWhichHasComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasComponent1.kt"); } @TestMetadata("implementTraitWhichHasFinalComponent1.kt") public void testImplementTraitWhichHasFinalComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/implementTraitWhichHasFinalComponent1.kt"); } @TestMetadata("innerDataClass.kt") public void testInnerDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/innerDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/innerDataClass.kt"); } @TestMetadata("innerOuterDataClass.kt") public void testInnerOuterDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/innerOuterDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/innerOuterDataClass.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/multiDeclaration.kt"); } @TestMetadata("multiDeclarationFor.kt") public void testMultiDeclarationFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/multiDeclarationFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/multiDeclarationFor.kt"); } @TestMetadata("noConstructor.kt") public void testNoConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/noConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/noConstructor.kt"); } @TestMetadata("notADataClass.kt") public void testNotADataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/notADataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/notADataClass.kt"); } @TestMetadata("oneValParam.kt") public void testOneValParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/oneValParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/oneValParam.kt"); } @TestMetadata("repeatedProperties.kt") public void testRepeatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/repeatedProperties.kt"); } @TestMetadata("sealedDataClass.kt") public void testSealedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/sealedDataClass.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/strange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/strange.kt"); } @TestMetadata("twoValParams.kt") public void testTwoValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/twoValParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/twoValParams.kt"); } @TestMetadata("twoVarParams.kt") public void testTwoVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataClasses/twoVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataClasses/twoVarParams.kt"); } } @@ -5131,70 +4439,69 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataFlow extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CalleeExpression.kt") public void testCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/CalleeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/CalleeExpression.kt"); } @TestMetadata("EmptyIf.kt") public void testEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/EmptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/EmptyIf.kt"); } @TestMetadata("IsExpression.kt") public void testIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt"); } @TestMetadata("WhenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Assignment extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/assignment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignToNewVal.kt") public void testAssignToNewVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/assignToNewVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/assignToNewVal.kt"); } @TestMetadata("kt6118.kt") public void testKt6118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/kt6118.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/kt6118.kt"); } @TestMetadata("uninitializedValIsCheck.kt") public void testUninitializedValIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValIsCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValIsCheck.kt"); } @TestMetadata("uninitializedValNullability.kt") public void testUninitializedValNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/uninitializedValNullability.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/assignment/when.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/assignment/when.kt"); } } @@ -5202,80 +4509,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlow/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt2835.kt") public void testKt2835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/kt2835.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/kt2835.kt"); } @TestMetadata("LocalClassBase.kt") public void testLocalClassBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt"); } @TestMetadata("LocalClassDefaultParameters.kt") public void testLocalClassDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt"); } @TestMetadata("LocalClassDelegatedProperties.kt") public void testLocalClassDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegatedProperties.kt"); } @TestMetadata("LocalClassDelegation.kt") public void testLocalClassDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDelegation.kt"); } @TestMetadata("LocalClassFunctions.kt") public void testLocalClassFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassFunctions.kt"); } @TestMetadata("LocalClassInMemberOfLocalClass.kt") public void testLocalClassInMemberOfLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInMemberOfLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInMemberOfLocalClass.kt"); } @TestMetadata("LocalClassInitializer.kt") public void testLocalClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt"); } @TestMetadata("LocalClassProperty.kt") public void testLocalClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalClassProperty.kt"); } @TestMetadata("LocalObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt"); } @TestMetadata("LocalObjectDelegation.kt") public void testLocalObjectDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/LocalObjectDelegation.kt"); } @TestMetadata("NestedLocalClass.kt") public void testNestedLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlow/local/NestedLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlow/local/NestedLocalClass.kt"); } } } @@ -5284,340 +4583,294 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataFlowInfoTraversal extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataFlowInfoTraversal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AndOr.kt") public void testAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AndOr.kt"); } @TestMetadata("ArrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayAccess.kt"); } @TestMetadata("ArrayExpression.kt") public void testArrayExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayExpression.kt"); } @TestMetadata("ArrayGetSetConvention.kt") public void testArrayGetSetConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayGetSetConvention.kt"); } @TestMetadata("ArrayIndices.kt") public void testArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ArrayIndices.kt"); } @TestMetadata("Assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Assignment.kt"); } @TestMetadata("AssignmentInInitializer.kt") public void testAssignmentInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentInInitializer.kt"); } @TestMetadata("AssignmentOperation.kt") public void testAssignmentOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentOperation.kt"); } @TestMetadata("AssignmentToArrayElement.kt") public void testAssignmentToArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentToArrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/AssignmentToArrayElement.kt"); } @TestMetadata("BinaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt"); } @TestMetadata("BinaryExpressionBooleanOperations.kt") public void testBinaryExpressionBooleanOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionBooleanOperations.kt"); } @TestMetadata("BinaryExpressionCompareToConvention.kt") public void testBinaryExpressionCompareToConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionCompareToConvention.kt"); } @TestMetadata("BinaryExpressionContainsConvention.kt") public void testBinaryExpressionContainsConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionContainsConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionContainsConvention.kt"); } @TestMetadata("BinaryExpressionElvis.kt") public void testBinaryExpressionElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionElvis.kt"); } @TestMetadata("BinaryExpressionEqualsConvention.kt") public void testBinaryExpressionEqualsConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionEqualsConvention.kt"); } @TestMetadata("BinaryExpressionIdentifier.kt") public void testBinaryExpressionIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt"); } @TestMetadata("BinaryExpressionPlusConvention.kt") public void testBinaryExpressionPlusConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionPlusConvention.kt"); } @TestMetadata("Condition.kt") public void testCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Condition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Condition.kt"); } @TestMetadata("ContinueOuterLoop.kt") public void testContinueOuterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ContinueOuterLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ContinueOuterLoop.kt"); } @TestMetadata("DeepIf.kt") public void testDeepIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt"); } @TestMetadata("DoWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhile.kt"); } @TestMetadata("DoWhileCondition.kt") public void testDoWhileCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DoWhileCondition.kt"); } @TestMetadata("Elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Elvis.kt"); } @TestMetadata("ExclExcl.kt") public void testExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt"); } @TestMetadata("ForLoopRange.kt") public void testForLoopRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ForLoopRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ForLoopRange.kt"); } @TestMetadata("FunctionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/FunctionLiteral.kt"); } @TestMetadata("IfStatement.kt") public void testIfStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfStatement.kt"); } @TestMetadata("IfThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElse.kt"); } @TestMetadata("IfThenElseBothInvalid.kt") public void testIfThenElseBothInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IfThenElseBothInvalid.kt"); } @TestMetadata("IsExpression.kt") public void testIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/IsExpression.kt"); } @TestMetadata("kt4332WhenBranches.kt") public void testKt4332WhenBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt4332WhenBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt4332WhenBranches.kt"); } @TestMetadata("kt5155WhenBranches.kt") public void testKt5155WhenBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt"); } @TestMetadata("kt5182WhenBranches.kt") public void testKt5182WhenBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5182WhenBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5182WhenBranches.kt"); } @TestMetadata("ManyIfs.kt") public void testManyIfs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ManyIfs.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/MultiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/MultiDeclaration.kt"); } @TestMetadata("ObjectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt"); } @TestMetadata("QualifiedExpression.kt") public void testQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/QualifiedExpression.kt"); } @TestMetadata("Return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt"); } @TestMetadata("StringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/StringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/StringTemplate.kt"); } @TestMetadata("ThisSuper.kt") public void testThisSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ThisSuper.kt"); } @TestMetadata("Throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Throw.kt"); } @TestMetadata("TryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryCatch.kt"); } @TestMetadata("TryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/TryFinally.kt"); } @TestMetadata("UnaryExpression.kt") public void testUnaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/UnaryExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/UnaryExpression.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/When.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/When.kt"); } @TestMetadata("WhenEntryAs.kt") public void testWhenEntryAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryAs.kt"); } @TestMetadata("WhenEntryIs.kt") public void testWhenEntryIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenEntryIs.kt"); } @TestMetadata("WhenIn.kt") public void testWhenIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenIn.kt"); } @TestMetadata("WhenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenSubject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhenSubject.kt"); } @TestMetadata("While.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/While.kt"); } @TestMetadata("WhileCondition.kt") public void testWhileCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/WhileCondition.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smartcasts extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartcasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("SmartcastAmbiguitites.kt") public void testSmartcastAmbiguitites() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastAmbiguitites.kt"); } @TestMetadata("SmartcastsForStableIdentifiers.kt") public void testSmartcastsForStableIdentifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt"); } } } @@ -5626,292 +4879,254 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationChecks extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationChecks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousObjectExpressionType.kt") public void testAmbiguousObjectExpressionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ambiguousObjectExpressionType.kt"); } @TestMetadata("anonymousFunAsLastExpressionInBlock.kt") public void testAnonymousFunAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt"); } @TestMetadata("anonymousFunUnusedLastExpressionInBlock.kt") public void testAnonymousFunUnusedLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunUnusedLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/anonymousFunUnusedLastExpressionInBlock.kt"); } @TestMetadata("ComponentFunctionReturnTypeMismatch.kt") public void testComponentFunctionReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt"); } @TestMetadata("ConflictingAndRedundantProjections.kt") public void testConflictingAndRedundantProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt"); } @TestMetadata("DataFlowInMultiDeclInFor.kt") public void testDataFlowInMultiDeclInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt"); } @TestMetadata("DataFlowInfoInMultiDecl.kt") public void testDataFlowInfoInMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt"); } @TestMetadata("FunctionWithMissingNames.kt") public void testFunctionWithMissingNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt"); } @TestMetadata("illegalModifiersOnClass.kt") public void testIllegalModifiersOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/illegalModifiersOnClass.kt"); } @TestMetadata("kClassInSignature.kt") public void testKClassInSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kClassInSignature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kClassInSignature.kt"); } @TestMetadata("kt1141.kt") public void testKt1141() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt"); } @TestMetadata("kt1193.kt") public void testKt1193() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt1193.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt1193.kt"); } @TestMetadata("kt2096.kt") public void testKt2096() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2096.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2096.kt"); } @TestMetadata("kt2142.kt") public void testKt2142() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2142.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2142.kt"); } @TestMetadata("kt2397.kt") public void testKt2397() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2397.kt"); } @TestMetadata("kt2631_MultipleDeclaration.kt") public void testKt2631_MultipleDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2631_MultipleDeclaration.kt"); } @TestMetadata("kt2643MultiDeclInControlFlow.kt") public void testKt2643MultiDeclInControlFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt"); } @TestMetadata("kt559.kt") public void testKt559() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/kt559.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/kt559.kt"); } @TestMetadata("localDeclarationModifiers.kt") public void testLocalDeclarationModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt"); } @TestMetadata("localFunctionNoInheritVisibility.kt") public void testLocalFunctionNoInheritVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/localFunctionNoInheritVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/localFunctionNoInheritVisibility.kt"); } @TestMetadata("LocalVariableWithNoTypeInformation.kt") public void testLocalVariableWithNoTypeInformation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt"); } @TestMetadata("mulitpleVarargParameters.kt") public void testMulitpleVarargParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/mulitpleVarargParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/mulitpleVarargParameters.kt"); } @TestMetadata("MultiDeclarationErrors.kt") public void testMultiDeclarationErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt"); } @TestMetadata("namedFunAsLastExpressionInBlock.kt") public void testNamedFunAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt"); } @TestMetadata("packageDeclarationModifiers.kt") public void testPackageDeclarationModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/packageDeclarationModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/packageDeclarationModifiers.kt"); } @TestMetadata("propertyInPackageHasNoInheritVisibility.kt") public void testPropertyInPackageHasNoInheritVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt"); } @TestMetadata("RedeclarationsInMultiDecl.kt") public void testRedeclarationsInMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt"); } @TestMetadata("ScalaLikeNamedFun.kt") public void testScalaLikeNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/ScalaLikeNamedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/ScalaLikeNamedFun.kt"); } @TestMetadata("sealedOnMembers.kt") public void testSealedOnMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/sealedOnMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/sealedOnMembers.kt"); } @TestMetadata("unambiguousObjectExpressionType.kt") public void testUnambiguousObjectExpressionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/unambiguousObjectExpressionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/unambiguousObjectExpressionType.kt"); } @TestMetadata("valVarFunctionParameter.kt") public void testValVarFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/valVarFunctionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/valVarFunctionParameter.kt"); } @TestMetadata("VarianceOnFunctionAndPropertyTypeParameters.kt") public void testVarianceOnFunctionAndPropertyTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/VarianceOnFunctionAndPropertyTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/VarianceOnFunctionAndPropertyTypeParameters.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringDeclarations extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDestructuringDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("destructuringDeclarationAssignedUnresolved.kt") public void testDestructuringDeclarationAssignedUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt"); } @TestMetadata("destructuringDeclarationMissingInitializer.kt") public void testDestructuringDeclarationMissingInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt"); } @TestMetadata("DoubleDeclForLoop.kt") public void testDoubleDeclForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt"); } @TestMetadata("FolLoopTypeComponentTypeMismatch.kt") public void testFolLoopTypeComponentTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt"); } @TestMetadata("ForLoopComponentFunctionAmbiguity.kt") public void testForLoopComponentFunctionAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt"); } @TestMetadata("ForLoopComponentFunctionMissing.kt") public void testForLoopComponentFunctionMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt"); } @TestMetadata("ForLoopMissingLoopParameter.kt") public void testForLoopMissingLoopParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt"); } @TestMetadata("ForLoopWithExtensions.kt") public void testForLoopWithExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt"); } @TestMetadata("ForWithExplicitTypes.kt") public void testForWithExplicitTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt"); } @TestMetadata("kt2829.kt") public void testKt2829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/kt2829.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/kt2829.kt"); } @TestMetadata("lastDestructuringDeclarationInBlock.kt") public void testLastDestructuringDeclarationInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/lastDestructuringDeclarationInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/lastDestructuringDeclarationInBlock.kt"); } @TestMetadata("RedeclarationInForLoop.kt") public void testRedeclarationInForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt"); } @TestMetadata("SingleDeclForLoop.kt") public void testSingleDeclForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt"); } @TestMetadata("underscore.kt") public void testUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt"); } } @@ -5919,26 +5134,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FiniteBoundRestriction extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFiniteBoundRestriction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CasesWithOneTypeParameter.kt") public void testCasesWithOneTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithOneTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithOneTypeParameter.kt"); } @TestMetadata("CasesWithTwoTypeParameters.kt") public void testCasesWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithTwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/CasesWithTwoTypeParameters.kt"); } @TestMetadata("JavaSuperType.kt") public void testJavaSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt"); } } @@ -5946,26 +5162,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonExpansiveInheritanceRestriction extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonExpansiveInheritanceRestriction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("JavaWithKotlin.kt") public void testJavaWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin.kt"); } @TestMetadata("JavaWithKotlin2.kt") public void testJavaWithKotlin2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/JavaWithKotlin2.kt"); } @TestMetadata("PureKotlin.kt") public void testPureKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/PureKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/declarationChecks/nonExpansiveInheritanceRestriction/PureKotlin.kt"); } } } @@ -5974,20 +5191,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt5232.kt") public void testKt5232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/defaultArguments/kt5232.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/defaultArguments/kt5232.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/defaultArguments/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/defaultArguments/superCall.kt"); } } @@ -5995,22 +5214,23 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("absentErrorAboutInitializer.kt") public void testAbsentErrorAboutInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutInitializer.kt"); } @TestMetadata("absentErrorAboutType.kt") public void testAbsentErrorAboutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/absentErrorAboutType.kt"); } @TestMetadata("abstractDelegatedProperty.kt") public void testAbstractDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/abstractDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/abstractDelegatedProperty.kt"); } public void testAllFilesPresentInDelegatedProperty() throws Exception { @@ -6019,310 +5239,264 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("backingField.kt") public void testBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/backingField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/backingField.kt"); } @TestMetadata("defaultGetter.kt") public void testDefaultGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/defaultGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/defaultGetter.kt"); } @TestMetadata("defaultSetter.kt") public void testDefaultSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/defaultSetter.kt"); } @TestMetadata("delegatedPropertyOverridedInTrait.kt") public void testDelegatedPropertyOverridedInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTrait.kt"); } @TestMetadata("delegatedPropertyOverridedInTraitTypeMismatch.kt") public void testDelegatedPropertyOverridedInTraitTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/delegatedPropertyOverridedInTraitTypeMismatch.kt"); } @TestMetadata("disallowImplInTypeParameter.kt") public void testDisallowImplInTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt"); } @TestMetadata("genericGetter.kt") public void testGenericGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/genericGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/genericGetter.kt"); } @TestMetadata("getterWithSubtype.kt") public void testGetterWithSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/getterWithSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/getterWithSubtype.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inTrait.kt"); } @TestMetadata("incompleteTypeInference.kt") public void testIncompleteTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/incompleteTypeInference.kt"); } @TestMetadata("kt4640.kt") public void testKt4640() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/kt4640.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/kt4640.kt"); } @TestMetadata("localVariable.kt") public void testLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/localVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/localVariable.kt"); } @TestMetadata("localWithSmartCast.kt") public void testLocalWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/localWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/localWithSmartCast.kt"); } @TestMetadata("missedGetter.kt") public void testMissedGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/missedGetter.kt"); } @TestMetadata("missedSetter.kt") public void testMissedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/missedSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/missedSetter.kt"); } @TestMetadata("nonDefaultAccessors.kt") public void testNonDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/nonDefaultAccessors.kt"); } @TestMetadata("propertyDefferedType.kt") public void testPropertyDefferedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/propertyDefferedType.kt"); } @TestMetadata("recursiveType.kt") public void testRecursiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt"); } @TestMetadata("redundantGetter.kt") public void testRedundantGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/redundantGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/redundantGetter.kt"); } @TestMetadata("redundantSetter.kt") public void testRedundantSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/redundantSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/redundantSetter.kt"); } @TestMetadata("setterThisTypeMismatch.kt") public void testSetterThisTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/setterThisTypeMismatch.kt"); } @TestMetadata("setterWithSupertype.kt") public void testSetterWithSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/setterWithSupertype.kt"); } @TestMetadata("severalReceivers.kt") public void testSeveralReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/severalReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/severalReceivers.kt"); } @TestMetadata("thisInDelegate.kt") public void testThisInDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisInDelegate.kt"); } @TestMetadata("thisOfAnyType.kt") public void testThisOfAnyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisOfAnyType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisOfAnyType.kt"); } @TestMetadata("thisOfNothingNullableType.kt") public void testThisOfNothingNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingNullableType.kt"); } @TestMetadata("thisOfNothingType.kt") public void testThisOfNothingType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/thisOfNothingType.kt"); } @TestMetadata("twoGetMethods.kt") public void testTwoGetMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt"); } @TestMetadata("typeMismatchForGetReturnType.kt") public void testTypeMismatchForGetReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt"); } @TestMetadata("typeMismatchForGetWithGeneric.kt") public void testTypeMismatchForGetWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetWithGeneric.kt"); } @TestMetadata("typeMismatchForSetParameter.kt") public void testTypeMismatchForSetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForSetParameter.kt"); } @TestMetadata("typeMismatchForThisGetParameter.kt") public void testTypeMismatchForThisGetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForThisGetParameter.kt"); } @TestMetadata("wrongCountOfParametersInGet.kt") public void testWrongCountOfParametersInGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInGet.kt"); } @TestMetadata("wrongCountOfParametersInSet.kt") public void testWrongCountOfParametersInSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/wrongCountOfParametersInSet.kt"); } @TestMetadata("wrongSetterReturnType.kt") public void testWrongSetterReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/wrongSetterReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/wrongSetterReturnType.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegateExpressionAsLambda.kt") public void testDelegateExpressionAsLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/delegateExpressionAsLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/delegateExpressionAsLambda.kt"); } @TestMetadata("differentDelegatedExpressions.kt") public void testDifferentDelegatedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt"); } @TestMetadata("extensionGet.kt") public void testExtensionGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionGet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionGet.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt"); } @TestMetadata("genericMethodInGenericClass.kt") public void testGenericMethodInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt"); } @TestMetadata("genericMethods.kt") public void testGenericMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethods.kt"); } @TestMetadata("labeledDelegatedExpression.kt") public void testLabeledDelegatedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt"); } @TestMetadata("manyIncompleteCandidates.kt") public void testManyIncompleteCandidates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt"); } @TestMetadata("noErrorsForImplicitConstraints.kt") public void testNoErrorsForImplicitConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt"); } @TestMetadata("noExpectedTypeForSupertypeConstraint.kt") public void testNoExpectedTypeForSupertypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt"); } @TestMetadata("resultTypeOfLambdaForConventionMethods.kt") public void testResultTypeOfLambdaForConventionMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/resultTypeOfLambdaForConventionMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/resultTypeOfLambdaForConventionMethods.kt"); } @TestMetadata("typeOfLazyDelegatedPropertyWithObject.kt") public void testTypeOfLazyDelegatedPropertyWithObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/typeOfLazyDelegatedPropertyWithObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/typeOfLazyDelegatedPropertyWithObject.kt"); } @TestMetadata("useCompleterWithoutExpectedType.kt") public void testUseCompleterWithoutExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/useCompleterWithoutExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/useCompleterWithoutExpectedType.kt"); } @TestMetadata("useExpectedType.kt") public void testUseExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt"); } @TestMetadata("useExpectedTypeForVal.kt") public void testUseExpectedTypeForVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedTypeForVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedTypeForVal.kt"); } } @@ -6330,86 +5504,77 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commonCaseForInference.kt") public void testCommonCaseForInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt"); } @TestMetadata("genericProvideDelegate.kt") public void testGenericProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/genericProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/genericProvideDelegate.kt"); } @TestMetadata("hostAndReceiver1.kt") public void testHostAndReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver1.kt"); } @TestMetadata("hostAndReceiver2.kt") public void testHostAndReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt"); } @TestMetadata("hostAndReceiver3.kt") public void testHostAndReceiver3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver3.kt"); } @TestMetadata("inferenceFromReceiver1.kt") public void testInferenceFromReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt"); } @TestMetadata("inferenceFromReceiver2.kt") public void testInferenceFromReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); } @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); } @TestMetadata("noOperatorModifierOnProvideDelegate.kt") public void testNoOperatorModifierOnProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt"); } @TestMetadata("provideDelegateOperatorDeclaration.kt") public void testProvideDelegateOperatorDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOperatorDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/provideDelegateOperatorDeclaration.kt"); } @TestMetadata("setValue.kt") public void testSetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt"); } @TestMetadata("simpleProvideDelegate.kt") public void testSimpleProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/simpleProvideDelegate.kt"); } @TestMetadata("unsupportedOperatorProvideDelegate.kt") public void testUnsupportedOperatorProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt"); } } } @@ -6418,94 +5583,89 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegationAndOverriding.kt") public void testDelegationAndOverriding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt"); } @TestMetadata("DelegationExpectedType.kt") public void testDelegationExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt"); } @TestMetadata("DelegationNotTotrait.kt") public void testDelegationNotTotrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationNotTotrait.kt"); } @TestMetadata("DelegationToJavaIface.kt") public void testDelegationToJavaIface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/DelegationToJavaIface.kt"); } @TestMetadata("Delegation_ClashingFunctions.kt") public void testDelegation_ClashingFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_ClashingFunctions.kt"); } @TestMetadata("Delegation_Hierarchy.kt") public void testDelegation_Hierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_Hierarchy.kt"); } @TestMetadata("Delegation_MultipleDelegates.kt") public void testDelegation_MultipleDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_MultipleDelegates.kt"); } @TestMetadata("Delegation_ScopeInitializationOrder.kt") public void testDelegation_ScopeInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/Delegation_ScopeInitializationOrder.kt"); } @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/kt8154.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/kt8154.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/delegation/clashes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Clashes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClashes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/clashes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finalMemberOverridden.kt") public void testFinalMemberOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt"); } @TestMetadata("propertyTypeMismatch.kt") public void testPropertyTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/propertyTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/propertyTypeMismatch.kt"); } @TestMetadata("returnTypeMismatch.kt") public void testReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/returnTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/returnTypeMismatch.kt"); } @TestMetadata("varOverriddenByVal.kt") public void testVarOverriddenByVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/clashes/varOverriddenByVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/clashes/varOverriddenByVal.kt"); } } @@ -6513,32 +5673,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CovariantOverrides extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCovariantOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/delegation/covariantOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fromClass.kt") public void testFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/fromClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/fromClass.kt"); } @TestMetadata("irrelevant.kt") public void testIrrelevant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/irrelevant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/irrelevant.kt"); } @TestMetadata("kt13952.kt") public void testKt13952() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/kt13952.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/kt13952.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/covariantOverrides/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/covariantOverrides/simple.kt"); } } @@ -6546,10 +5706,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberHidesSupertypeOverride extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractOverride.kt") public void testAbstractOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/abstractOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/abstractOverride.kt"); } public void testAllFilesPresentInMemberHidesSupertypeOverride() throws Exception { @@ -6558,86 +5721,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("delegationToSubType.kt") public void testDelegationToSubType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubType.kt"); } @TestMetadata("delegationToSubTypeProperty.kt") public void testDelegationToSubTypeProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeProperty.kt"); } @TestMetadata("delegationToSubTypeWithOverride.kt") public void testDelegationToSubTypeWithOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverride.kt"); } @TestMetadata("delegationToSubTypeWithOverrideProperty.kt") public void testDelegationToSubTypeWithOverrideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverrideProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/delegationToSubTypeWithOverrideProperty.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/diamond.kt"); } @TestMetadata("explicitOverride.kt") public void testExplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/explicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/explicitOverride.kt"); } @TestMetadata("fakeOverrideInTheMiddle.kt") public void testFakeOverrideInTheMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/fakeOverrideInTheMiddle.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/fakeOverrideInTheMiddle.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/generic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/generic.kt"); } @TestMetadata("sameDelegationInHierarchy.kt") public void testSameDelegationInHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy.kt"); } @TestMetadata("sameDelegationInHierarchy2.kt") public void testSameDelegationInHierarchy2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/sameDelegationInHierarchy2.kt"); } @TestMetadata("severalDelegates.kt") public void testSeveralDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simple.kt"); } @TestMetadata("simpleNoOverride.kt") public void testSimpleNoOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleNoOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleNoOverride.kt"); } @TestMetadata("simpleProp.kt") public void testSimpleProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleProp.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/simpleProp.kt"); } } } @@ -6646,44 +5795,42 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedSafeCall.kt") public void testAnnotatedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/annotatedSafeCall.kt"); } @TestMetadata("checkDeparenthesizedType.kt") public void testCheckDeparenthesizedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt"); } @TestMetadata("labeledSafeCall.kt") public void testLabeledSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/labeledSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/labeledSafeCall.kt"); } @TestMetadata("multiParenthesizedSafeCall.kt") public void testMultiParenthesizedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/multiParenthesizedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/multiParenthesizedSafeCall.kt"); } @TestMetadata("parenthesizedSafeCall.kt") public void testParenthesizedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/parenthesizedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/parenthesizedSafeCall.kt"); } @TestMetadata("ParenthesizedVariable.kt") public void testParenthesizedVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deparenthesize/ParenthesizedVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deparenthesize/ParenthesizedVariable.kt"); } } @@ -6691,200 +5838,172 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deprecated extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/deprecated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationUsage.kt") public void testAnnotationUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/annotationUsage.kt"); } @TestMetadata("classWithCompanionObject.kt") public void testClassWithCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/classWithCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/classWithCompanionObject.kt"); } @TestMetadata("companionObjectUsage.kt") public void testCompanionObjectUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/companionObjectUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/companionObjectUsage.kt"); } @TestMetadata("componentUsage.kt") public void testComponentUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/componentUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/componentUsage.kt"); } @TestMetadata("deprecatedConstructor.kt") public void testDeprecatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedConstructor.kt"); } @TestMetadata("deprecatedError.kt") public void testDeprecatedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedError.kt"); } @TestMetadata("deprecatedErrorBuilder.kt") public void testDeprecatedErrorBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedErrorBuilder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedErrorBuilder.kt"); } @TestMetadata("deprecatedHidden.kt") public void testDeprecatedHidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedHidden.kt"); } @TestMetadata("deprecatedInheritance.kt") public void testDeprecatedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedInheritance.kt"); } @TestMetadata("deprecatedPropertyInheritance.kt") public void testDeprecatedPropertyInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/deprecatedPropertyInheritance.kt"); } @TestMetadata("functionUsage.kt") public void testFunctionUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/functionUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/functionUsage.kt"); } @TestMetadata("genericConstructorUsage.kt") public void testGenericConstructorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/genericConstructorUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/genericConstructorUsage.kt"); } @TestMetadata("hiddenPropertyAccessors.kt") public void testHiddenPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/hiddenPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/hiddenPropertyAccessors.kt"); } @TestMetadata("importJavaSamInterface.kt") public void testImportJavaSamInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/importJavaSamInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/importJavaSamInterface.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/imports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/imports.kt"); } @TestMetadata("iteratorUsage.kt") public void testIteratorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/iteratorUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/iteratorUsage.kt"); } @TestMetadata("javaDeprecated.kt") public void testJavaDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/javaDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/javaDeprecated.kt"); } @TestMetadata("javaDeprecatedInheritance.kt") public void testJavaDeprecatedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/javaDeprecatedInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/javaDeprecatedInheritance.kt"); } @TestMetadata("javaDocDeprecated.kt") public void testJavaDocDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/javaDocDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/javaDocDeprecated.kt"); } @TestMetadata("nestedTypesUsage.kt") public void testNestedTypesUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/nestedTypesUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/nestedTypesUsage.kt"); } @TestMetadata("objectUsage.kt") public void testObjectUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/objectUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/objectUsage.kt"); } @TestMetadata("propertyUsage.kt") public void testPropertyUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/propertyUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/propertyUsage.kt"); } @TestMetadata("propertyUseSiteTargetedAnnotations.kt") public void testPropertyUseSiteTargetedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/propertyUseSiteTargetedAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/propertyUseSiteTargetedAnnotations.kt"); } @TestMetadata("propertyWithInvoke.kt") public void testPropertyWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/propertyWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/propertyWithInvoke.kt"); } @TestMetadata("thisUsage.kt") public void testThisUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/thisUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/thisUsage.kt"); } @TestMetadata("typeUsage.kt") public void testTypeUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typeUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typeUsage.kt"); } @TestMetadata("typealiasCompanionObject.kt") public void testTypealiasCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasCompanionObject.kt"); } @TestMetadata("typealiasConstructor.kt") public void testTypealiasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasConstructor.kt"); } @TestMetadata("typealiasForDeprecatedClass.kt") public void testTypealiasForDeprecatedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasForDeprecatedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasForDeprecatedClass.kt"); } @TestMetadata("typealiasUsage.kt") public void testTypealiasUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/typealiasUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/typealiasUsage.kt"); } @TestMetadata("unusedImport.kt") public void testUnusedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/unusedImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/unusedImport.kt"); } @TestMetadata("warningOnConstructorErrorOnClass.kt") public void testWarningOnConstructorErrorOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/deprecated/warningOnConstructorErrorOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/deprecated/warningOnConstructorErrorOnClass.kt"); } } @@ -6892,36 +6011,40 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateJvmSignature extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("caseInProperties.kt") public void testCaseInProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/caseInProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/caseInProperties.kt"); } @TestMetadata("missingNames.kt") public void testMissingNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/missingNames.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/vararg.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AccidentalOverrides extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accidentalOverrideFromGrandparent.kt") public void testAccidentalOverrideFromGrandparent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/accidentalOverrideFromGrandparent.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/accidentalOverrideFromGrandparent.kt"); } public void testAllFilesPresentInAccidentalOverrides() throws Exception { @@ -6930,86 +6053,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("classFunctionOverriddenByProperty.kt") public void testClassFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByProperty.kt"); } @TestMetadata("classFunctionOverriddenByPropertyInConstructor.kt") public void testClassFunctionOverriddenByPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyInConstructor.kt"); } @TestMetadata("classFunctionOverriddenByPropertyNoGetter.kt") public void testClassFunctionOverriddenByPropertyNoGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyNoGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classFunctionOverriddenByPropertyNoGetter.kt"); } @TestMetadata("classPropertyOverriddenByFunction.kt") public void testClassPropertyOverriddenByFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/classPropertyOverriddenByFunction.kt"); } @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/defaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/defaultFunction.kt"); } @TestMetadata("delegatedFunctionOverriddenByProperty.kt") public void testDelegatedFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/delegatedFunctionOverriddenByProperty.kt"); } @TestMetadata("genericClassFunction.kt") public void testGenericClassFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/genericClassFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/genericClassFunction.kt"); } @TestMetadata("overridesNothing.kt") public void testOverridesNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/overridesNothing.kt"); } @TestMetadata("privateClassFunctionOverriddenByProperty.kt") public void testPrivateClassFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/privateClassFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/privateClassFunctionOverriddenByProperty.kt"); } @TestMetadata("require.kt") public void testRequire() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/require.kt"); } @TestMetadata("traitFunctionOverriddenByProperty.kt") public void testTraitFunctionOverriddenByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByProperty.kt"); } @TestMetadata("traitFunctionOverriddenByPropertyNoImpl.kt") public void testTraitFunctionOverriddenByPropertyNoImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitFunctionOverriddenByPropertyNoImpl.kt"); } @TestMetadata("traitPropertyOverriddenByFunction.kt") public void testTraitPropertyOverriddenByFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunction.kt"); } @TestMetadata("traitPropertyOverriddenByFunctionNoImpl.kt") public void testTraitPropertyOverriddenByFunctionNoImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/accidentalOverrides/traitPropertyOverriddenByFunctionNoImpl.kt"); } } @@ -7017,26 +6126,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bridges extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/class.kt"); } @TestMetadata("fakeOverrideTrait.kt") public void testFakeOverrideTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/fakeOverrideTrait.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/bridges/trait.kt"); } } @@ -7044,110 +6154,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Erasure extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErasure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("clashFromInterfaceAndSuperClass.kt") public void testClashFromInterfaceAndSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/clashFromInterfaceAndSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/clashFromInterfaceAndSuperClass.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/collections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/collections.kt"); } @TestMetadata("delegateToTwoTraits.kt") public void testDelegateToTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegateToTwoTraits.kt"); } @TestMetadata("delegationAndOwnMethod.kt") public void testDelegationAndOwnMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationAndOwnMethod.kt"); } @TestMetadata("delegationToTraitImplAndOwnMethod.kt") public void testDelegationToTraitImplAndOwnMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/delegationToTraitImplAndOwnMethod.kt"); } @TestMetadata("extensionProperties.kt") public void testExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/extensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/extensionProperties.kt"); } @TestMetadata("genericType.kt") public void testGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/genericType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/genericType.kt"); } @TestMetadata("inheritFromTwoTraits.kt") public void testInheritFromTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt"); } @TestMetadata("kotlinAndJavaCollections.kt") public void testKotlinAndJavaCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/kotlinAndJavaCollections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/kotlinAndJavaCollections.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/nullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/nullableType.kt"); } @TestMetadata("superTraitAndDelegationToTraitImpl.kt") public void testSuperTraitAndDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/superTraitAndDelegationToTraitImpl.kt"); } @TestMetadata("twoTraitsAndOwnFunction.kt") public void testTwoTraitsAndOwnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/twoTraitsAndOwnFunction.kt"); } @TestMetadata("typeMappedToJava.kt") public void testTypeMappedToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeMappedToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeMappedToJava.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameter.kt"); } @TestMetadata("typeParameterWithBound.kt") public void testTypeParameterWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithBound.kt"); } @TestMetadata("typeParameterWithTwoBounds.kt") public void testTypeParameterWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBounds.kt"); } @TestMetadata("typeParameterWithTwoBoundsInWhere.kt") public void testTypeParameterWithTwoBoundsInWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/erasure/typeParameterWithTwoBoundsInWhere.kt"); } } @@ -7155,20 +6252,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FinalMembersFromBuiltIns extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFinalMembersFromBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumMembers.kt") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt"); } @TestMetadata("waitNotifyGetClass.kt") public void testWaitNotifyGetClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass.kt"); } } @@ -7176,122 +6275,107 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionAndProperty extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionAndProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classObject.kt"); } @TestMetadata("classPropertyInConstructor.kt") public void testClassPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classPropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/classPropertyInConstructor.kt"); } @TestMetadata("extensionFunctionAndNormalFunction.kt") public void testExtensionFunctionAndNormalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionFunctionAndNormalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionFunctionAndNormalFunction.kt"); } @TestMetadata("extensionPropertyAndFunction.kt") public void testExtensionPropertyAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionPropertyAndFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/extensionPropertyAndFunction.kt"); } @TestMetadata("functionAndSetter.kt") public void testFunctionAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndSetter.kt"); } @TestMetadata("functionAndVar.kt") public void testFunctionAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/functionAndVar.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClass.kt"); } @TestMetadata("localClassInClass.kt") public void testLocalClassInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClassInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/localClassInClass.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/object.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); } @TestMetadata("objectExpressionInConstructor.kt") public void testObjectExpressionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpressionInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/objectExpressionInConstructor.kt"); } @TestMetadata("privateClassPropertyNoClash.kt") public void testPrivateClassPropertyNoClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/privateClassPropertyNoClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/privateClassPropertyNoClash.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevel.kt"); } @TestMetadata("topLevelDifferentFiles.kt") public void testTopLevelDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelDifferentFiles.kt"); } @TestMetadata("topLevelGetter.kt") public void testTopLevelGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/topLevelGetter.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/trait.kt"); } @TestMetadata("withErrorTypes.kt") public void testWithErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/functionAndProperty/withErrorTypes.kt"); } } @@ -7299,68 +6383,62 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialNames extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObject.kt"); } @TestMetadata("classObjectCopiedField.kt") public void testClassObjectCopiedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedField.kt"); } @TestMetadata("classObjectCopiedFieldObject.kt") public void testClassObjectCopiedFieldObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/classObjectCopiedFieldObject.kt"); } @TestMetadata("dataClassCopy.kt") public void testDataClassCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/dataClassCopy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/dataClassCopy.kt"); } @TestMetadata("defaults.kt") public void testDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/defaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/defaults.kt"); } @TestMetadata("delegationBy.kt") public void testDelegationBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/delegationBy.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/enum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/enum.kt"); } @TestMetadata("innerClassField.kt") public void testInnerClassField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/innerClassField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/innerClassField.kt"); } @TestMetadata("instance.kt") public void testInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/instance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/instance.kt"); } @TestMetadata("propertyMetadataCache.kt") public void testPropertyMetadataCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/specialNames/propertyMetadataCache.kt"); } } @@ -7368,44 +6446,42 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jkjk.kt") public void testJkjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/jkjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/jkjk.kt"); } @TestMetadata("kotlinClassExtendsJavaClass.kt") public void testKotlinClassExtendsJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClass.kt"); } @TestMetadata("kotlinClassExtendsJavaClassExtendsJavaClass.kt") public void testKotlinClassExtendsJavaClassExtendsJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClassExtendsJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassExtendsJavaClassExtendsJavaClass.kt"); } @TestMetadata("kotlinClassImplementsJavaInterface.kt") public void testKotlinClassImplementsJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterface.kt"); } @TestMetadata("kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt") public void testKotlinClassImplementsJavaInterfaceExtendsJavaInteface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinClassImplementsJavaInterfaceExtendsJavaInteface.kt"); } @TestMetadata("kotlinMembersVsJavaNonVisibleStatics.kt") public void testKotlinMembersVsJavaNonVisibleStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/statics/kotlinMembersVsJavaNonVisibleStatics.kt"); } } @@ -7413,14 +6489,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Synthesized extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSynthesized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumValuesValueOf.kt") public void testEnumValuesValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized/enumValuesValueOf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/synthesized/enumValuesValueOf.kt"); } } @@ -7428,32 +6507,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TraitImpl extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTraitImpl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("oneTrait.kt") public void testOneTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/oneTrait.kt"); } @TestMetadata("traitFunctionOverriddenByPropertyInTrait.kt") public void testTraitFunctionOverriddenByPropertyInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitFunctionOverriddenByPropertyInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitFunctionOverriddenByPropertyInTrait.kt"); } @TestMetadata("traitPropertyOverriddenByFunctionInTrait.kt") public void testTraitPropertyOverriddenByFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitPropertyOverriddenByFunctionInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/traitPropertyOverriddenByFunctionInTrait.kt"); } @TestMetadata("twoTraits.kt") public void testTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/duplicateJvmSignature/traitImpl/twoTraits.kt"); } } } @@ -7462,26 +6541,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DynamicTypes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDynamicTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/dynamicTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegationBy.kt") public void testDelegationBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dynamicTypes/delegationBy.kt"); } @TestMetadata("unsupported.kt") public void testUnsupported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/unsupported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dynamicTypes/unsupported.kt"); } @TestMetadata("withInvisibleSynthesized.kt") public void testWithInvisibleSynthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/dynamicTypes/withInvisibleSynthesized.kt"); } } @@ -7489,22 +6569,23 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractEnum.kt") public void testAbstractEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/AbstractEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/AbstractEnum.kt"); } @TestMetadata("AbstractInEnum.kt") public void testAbstractInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/AbstractInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/AbstractInEnum.kt"); } @TestMetadata("AbstractOverrideInEnum.kt") public void testAbstractOverrideInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/AbstractOverrideInEnum.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -7513,382 +6594,324 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("classObjectInEnum.kt") public void testClassObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/classObjectInEnum.kt"); } @TestMetadata("classObjectInEnumPrivate.kt") public void testClassObjectInEnumPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/classObjectInEnumPrivate.kt"); } @TestMetadata("commonSupertype.kt") public void testCommonSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/commonSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/commonSupertype.kt"); } @TestMetadata("compareTwoDifferentEnums.kt") public void testCompareTwoDifferentEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/compareTwoDifferentEnums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/compareTwoDifferentEnums.kt"); } @TestMetadata("ConstructorCallFromOutside.kt") public void testConstructorCallFromOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/ConstructorCallFromOutside.kt"); } @TestMetadata("constructorWithDefaultParametersOnly.kt") public void testConstructorWithDefaultParametersOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/constructorWithDefaultParametersOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/constructorWithDefaultParametersOnly.kt"); } @TestMetadata("dontCreatePackageTypeForEnumEntry.kt") public void testDontCreatePackageTypeForEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/emptyConstructor.kt"); } @TestMetadata("entryShouldBeOfEnumType.kt") public void testEntryShouldBeOfEnumType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/entryShouldBeOfEnumType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/entryShouldBeOfEnumType.kt"); } @TestMetadata("enumEntryCannotHaveClassObject.kt") public void testEnumEntryCannotHaveClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumEntryCannotHaveClassObject.kt"); } @TestMetadata("enumEntryInAbstractEnum.kt") public void testEnumEntryInAbstractEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumEntryInAbstractEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumEntryInAbstractEnum.kt"); } @TestMetadata("enumImplementingTrait.kt") public void testEnumImplementingTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumImplementingTrait.kt"); } @TestMetadata("enumInheritance.kt") public void testEnumInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumInheritance.kt"); } @TestMetadata("enumIsAssignableToBuiltInEnum.kt") public void testEnumIsAssignableToBuiltInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumIsAssignableToBuiltInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumIsAssignableToBuiltInEnum.kt"); } @TestMetadata("enumMissingName.kt") public void testEnumMissingName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumMissingName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumMissingName.kt"); } @TestMetadata("enumModifier.kt") public void testEnumModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumModifier.kt"); } @TestMetadata("enumStarImport.kt") public void testEnumStarImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumStarImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumStarImport.kt"); } @TestMetadata("enumSubjectTypeCheck.kt") public void testEnumSubjectTypeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumSubjectTypeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumSubjectTypeCheck.kt"); } @TestMetadata("enumWithAnnotationKeyword.kt") public void testEnumWithAnnotationKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumWithAnnotationKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumWithAnnotationKeyword.kt"); } @TestMetadata("enumWithEmptyName.kt") public void testEnumWithEmptyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/enumWithEmptyName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/enumWithEmptyName.kt"); } @TestMetadata("ExplicitConstructorCall.kt") public void testExplicitConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/ExplicitConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/ExplicitConstructorCall.kt"); } @TestMetadata("extendingEnumDirectly.kt") public void testExtendingEnumDirectly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/extendingEnumDirectly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/extendingEnumDirectly.kt"); } @TestMetadata("extensionNamedAsEnumEntry.kt") public void testExtensionNamedAsEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/extensionNamedAsEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/extensionNamedAsEnumEntry.kt"); } @TestMetadata("ifEnumEntry.kt") public void testIfEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/ifEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/ifEnumEntry.kt"); } @TestMetadata("importEnumFromJava.kt") public void testImportEnumFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/importEnumFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/importEnumFromJava.kt"); } @TestMetadata("inheritFromEnumEntry.kt") public void testInheritFromEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inheritFromEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inheritFromEnumEntry.kt"); } @TestMetadata("inheritanceFromEnum.kt") public void testInheritanceFromEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inheritanceFromEnum.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inline.kt"); } @TestMetadata("InsideEntryConstructorCall.kt") public void testInsideEntryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/InsideEntryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/InsideEntryConstructorCall.kt"); } @TestMetadata("InsideSecondaryConstructorCall.kt") public void testInsideSecondaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/InsideSecondaryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/InsideSecondaryConstructorCall.kt"); } @TestMetadata("interfaceWithEnumKeyword.kt") public void testInterfaceWithEnumKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/interfaceWithEnumKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/interfaceWithEnumKeyword.kt"); } @TestMetadata("isEnumEntry.kt") public void testIsEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/isEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/isEnumEntry.kt"); } @TestMetadata("javaEnumValueOfMethod.kt") public void testJavaEnumValueOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumValueOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumValueOfMethod.kt"); } @TestMetadata("javaEnumValuesMethod.kt") public void testJavaEnumValuesMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumValuesMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumValuesMethod.kt"); } @TestMetadata("javaEnumWithAbstractFun.kt") public void testJavaEnumWithAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithAbstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithAbstractFun.kt"); } @TestMetadata("javaEnumWithFuns.kt") public void testJavaEnumWithFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithFuns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithFuns.kt"); } @TestMetadata("javaEnumWithNameClashing.kt") public void testJavaEnumWithNameClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithNameClashing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithNameClashing.kt"); } @TestMetadata("javaEnumWithProperty.kt") public void testJavaEnumWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/javaEnumWithProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/javaEnumWithProperty.kt"); } @TestMetadata("kt2834.kt") public void testKt2834() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/kt2834.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/kt2834.kt"); } @TestMetadata("kt8972_cloneNotAllowed.kt") public void testKt8972_cloneNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt"); } @TestMetadata("localEnums.kt") public void testLocalEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/localEnums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/localEnums.kt"); } @TestMetadata("modifiersOnEnumEntry.kt") public void testModifiersOnEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/modifiersOnEnumEntry.kt"); } @TestMetadata("multipleConstructors.kt") public void testMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/multipleConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/multipleConstructors.kt"); } @TestMetadata("NonPrivateConstructor.kt") public void testNonPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/NonPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/NonPrivateConstructor.kt"); } @TestMetadata("openMemberInEnum.kt") public void testOpenMemberInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/openMemberInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/openMemberInEnum.kt"); } @TestMetadata("overrideFinalEnumMethods.kt") public void testOverrideFinalEnumMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/overrideFinalEnumMethods.kt"); } @TestMetadata("SecondaryConstructorCall.kt") public void testSecondaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/SecondaryConstructorCall.kt"); } @TestMetadata("starImportNestedClassAndEntries.kt") public void testStarImportNestedClassAndEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/starImportNestedClassAndEntries.kt"); } @TestMetadata("typeParametersInEnum.kt") public void testTypeParametersInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/typeParametersInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/typeParametersInEnum.kt"); } @TestMetadata("valuesValueOfAndEntriesAccessibility.kt") public void testValuesValueOfAndEntriesAccessibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/valuesValueOfAndEntriesAccessibility.kt"); } @TestMetadata("wrongUnitializedEnumCompanion.kt") public void testWrongUnitializedEnumCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/wrongUnitializedEnumCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/wrongUnitializedEnumCompanion.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/enum/inner") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/enum/inner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("existingClassObject.kt") public void testExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/existingClassObject.kt"); } @TestMetadata("insideClass.kt") public void testInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideClass.kt"); } @TestMetadata("insideClassObject.kt") public void testInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideClassObject.kt"); } @TestMetadata("insideEnum.kt") public void testInsideEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnum.kt"); } @TestMetadata("insideEnumEntry.kt") public void testInsideEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry.kt"); } @TestMetadata("insideInnerClassNotAllowed.kt") public void testInsideInnerClassNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideInnerClassNotAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideInnerClassNotAllowed.kt"); } @TestMetadata("insideObject.kt") public void testInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideObject.kt"); } @TestMetadata("insideTrait.kt") public void testInsideTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/insideTrait.kt"); } @TestMetadata("redeclarationInClassObject.kt") public void testRedeclarationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/redeclarationInClassObject.kt"); } @TestMetadata("twoEnums.kt") public void testTwoEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/twoEnums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/twoEnums.kt"); } @TestMetadata("twoEnumsInClassObjectAndInnerClass.kt") public void testTwoEnumsInClassObjectAndInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/enum/inner/twoEnumsInClassObjectAndInnerClass.kt"); } } } @@ -7897,146 +6920,127 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Evaluate extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEvaluate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/evaluate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("binaryMinusDepOnExpType.kt") public void testBinaryMinusDepOnExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/binaryMinusDepOnExpType.kt"); } @TestMetadata("binaryMinusIndepWoExpType.kt") public void testBinaryMinusIndepWoExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndepWoExpType.kt"); } @TestMetadata("binaryMinusIndependentExpType.kt") public void testBinaryMinusIndependentExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/binaryMinusIndependentExpType.kt"); } @TestMetadata("divisionByZero.kt") public void testDivisionByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/divisionByZero.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/divisionByZero.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/float.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/float.kt"); } @TestMetadata("floatLiteralOutOfRange.kt") public void testFloatLiteralOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/floatLiteralOutOfRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/floatLiteralOutOfRange.kt"); } @TestMetadata("infixFunOverBuiltinMemberInConst.kt") public void testInfixFunOverBuiltinMemberInConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/infixFunOverBuiltinMemberInConst.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/infixFunOverBuiltinMemberInConst.kt"); } @TestMetadata("intOverflow.kt") public void testIntOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/intOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/intOverflow.kt"); } @TestMetadata("intOverflowWithJavaProperties.kt") public void testIntOverflowWithJavaProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/intOverflowWithJavaProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/intOverflowWithJavaProperties.kt"); } @TestMetadata("integer.kt") public void testInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/integer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/integer.kt"); } @TestMetadata("logicWithNumber.kt") public void testLogicWithNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/logicWithNumber.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/logicWithNumber.kt"); } @TestMetadata("longOverflow.kt") public void testLongOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/longOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/longOverflow.kt"); } @TestMetadata("noOverflowWithZero.kt") public void testNoOverflowWithZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/noOverflowWithZero.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/noOverflowWithZero.kt"); } @TestMetadata("numberBinaryOperations.kt") public void testNumberBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperations.kt"); } @TestMetadata("numberBinaryOperationsCall.kt") public void testNumberBinaryOperationsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsCall.kt"); } @TestMetadata("numberBinaryOperationsInfixCall.kt") public void testNumberBinaryOperationsInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/numberBinaryOperationsInfixCall.kt"); } @TestMetadata("otherOverflow.kt") public void testOtherOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/otherOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/otherOverflow.kt"); } @TestMetadata("parentesized.kt") public void testParentesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/parentesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/parentesized.kt"); } @TestMetadata("qualifiedExpressions.kt") public void testQualifiedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/qualifiedExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/qualifiedExpressions.kt"); } @TestMetadata("unaryMinusDepOnExpType.kt") public void testUnaryMinusDepOnExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/unaryMinusDepOnExpType.kt"); } @TestMetadata("unaryMinusIndepWoExpType.kt") public void testUnaryMinusIndepWoExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndepWoExpType.kt"); } @TestMetadata("unaryMinusIndependentExpType.kt") public void testUnaryMinusIndependentExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/unaryMinusIndependentExpType.kt"); } @TestMetadata("wrongLongSuffix.kt") public void testWrongLongSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/evaluate/wrongLongSuffix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/evaluate/wrongLongSuffix.kt"); } } @@ -8044,152 +7048,132 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Exposed extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExposed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/exposed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/delegate.kt"); } @TestMetadata("exceptionOnFakeInvisible.kt") public void testExceptionOnFakeInvisible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/exceptionOnFakeInvisible.kt"); } @TestMetadata("functional.kt") public void testFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/functional.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/functional.kt"); } @TestMetadata("implements.kt") public void testImplements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/implements.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/implements.kt"); } @TestMetadata("inaccessibleType.kt") public void testInaccessibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/inaccessibleType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/inaccessibleType.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/internal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/internal.kt"); } @TestMetadata("internalAndProtected.kt") public void testInternalAndProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/internalAndProtected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/internalAndProtected.kt"); } @TestMetadata("internalFromLocal.kt") public void testInternalFromLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/internalFromLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/internalFromLocal.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/local.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/local.kt"); } @TestMetadata("localFromInternal.kt") public void testLocalFromInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localFromInternal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localFromInternal.kt"); } @TestMetadata("localFromPrivate.kt") public void testLocalFromPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localFromPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localFromPrivate.kt"); } @TestMetadata("localInFunReturnType.kt") public void testLocalInFunReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localInFunReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localInFunReturnType.kt"); } @TestMetadata("localInMemberType.kt") public void testLocalInMemberType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localInMemberType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localInMemberType.kt"); } @TestMetadata("localInPropertyType.kt") public void testLocalInPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/localInPropertyType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/localInPropertyType.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/nested.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/object.kt"); } @TestMetadata("packagePrivate.kt") public void testPackagePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/packagePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/packagePrivate.kt"); } @TestMetadata("privateFromLocal.kt") public void testPrivateFromLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/privateFromLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/privateFromLocal.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protected.kt"); } @TestMetadata("protectedInProtected.kt") public void testProtectedInProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protectedInProtected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protectedInProtected.kt"); } @TestMetadata("protectedJava.kt") public void testProtectedJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protectedJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protectedJava.kt"); } @TestMetadata("protectedSameWay.kt") public void testProtectedSameWay() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/protectedSameWay.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/protectedSameWay.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/simple.kt"); } @TestMetadata("typeArgs.kt") public void testTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/exposed/typeArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/exposed/typeArgs.kt"); } } @@ -8197,110 +7181,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Extensions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/extensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/classObject.kt"); } @TestMetadata("ExtensionFunctions.kt") public void testExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt"); } @TestMetadata("extensionMemberInClassObject.kt") public void testExtensionMemberInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/extensionMemberInClassObject.kt"); } @TestMetadata("extensionPropertyVsParameter.kt") public void testExtensionPropertyVsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/extensionPropertyVsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/extensionPropertyVsParameter.kt"); } @TestMetadata("ExtensionsCalledOnSuper.kt") public void testExtensionsCalledOnSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/ExtensionsCalledOnSuper.kt"); } @TestMetadata("GenericIterator.kt") public void testGenericIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/GenericIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/GenericIterator.kt"); } @TestMetadata("GenericIterator2.kt") public void testGenericIterator2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/GenericIterator2.kt"); } @TestMetadata("kt1875.kt") public void testKt1875() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt1875.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt1875.kt"); } @TestMetadata("kt2317.kt") public void testKt2317() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt2317.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt2317.kt"); } @TestMetadata("kt3470.kt") public void testKt3470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt3470.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt3470.kt"); } @TestMetadata("kt3563.kt") public void testKt3563() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt3563.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt3563.kt"); } @TestMetadata("kt819ExtensionProperties.kt") public void testKt819ExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/kt819ExtensionProperties.kt"); } @TestMetadata("noClassObjectsInJava.kt") public void testNoClassObjectsInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/noClassObjectsInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/noClassObjectsInJava.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/object.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/object.kt"); } @TestMetadata("throwOutCandidatesByReceiver.kt") public void testThrowOutCandidatesByReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt"); } @TestMetadata("throwOutCandidatesByReceiver2.kt") public void testThrowOutCandidatesByReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt"); } @TestMetadata("variableInvoke.kt") public void testVariableInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/extensions/variableInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/extensions/variableInvoke.kt"); } } @@ -8308,110 +7279,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionAsExpression extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionAsExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionAsExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoLabels.kt") public void testAutoLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/AutoLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/AutoLabels.kt"); } @TestMetadata("Common.kt") public void testCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/Common.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/Common.kt"); } @TestMetadata("DifficultInferenceForParameter.kt") public void testDifficultInferenceForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/DifficultInferenceForParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/DifficultInferenceForParameter.kt"); } @TestMetadata("ForbiddenNonLocalReturn.kt") public void testForbiddenNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ForbiddenNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ForbiddenNonLocalReturn.kt"); } @TestMetadata("FunctionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt"); } @TestMetadata("InferenceParametersTypes.kt") public void testInferenceParametersTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt"); } @TestMetadata("MissingParameterTypes.kt") public void testMissingParameterTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt"); } @TestMetadata("NameDeprecation.kt") public void testNameDeprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/NameDeprecation.kt"); } @TestMetadata("NoOverloadError.kt") public void testNoOverloadError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/NoOverloadError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/NoOverloadError.kt"); } @TestMetadata("Parameters.kt") public void testParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/Parameters.kt"); } @TestMetadata("ReceiverByExpectedType.kt") public void testReceiverByExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt"); } @TestMetadata("ReturnAndLabels.kt") public void testReturnAndLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ReturnAndLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ReturnAndLabels.kt"); } @TestMetadata("ReturnTypeCheck.kt") public void testReturnTypeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ReturnTypeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ReturnTypeCheck.kt"); } @TestMetadata("ScopeCheck.kt") public void testScopeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/ScopeCheck.kt"); } @TestMetadata("WithGenericParameters.kt") public void testWithGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt"); } @TestMetadata("WithOuterGeneric.kt") public void testWithOuterGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/WithOuterGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/WithOuterGeneric.kt"); } @TestMetadata("WithoutBody.kt") public void testWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionAsExpression/WithoutBody.kt"); } } @@ -8419,232 +7377,204 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignmentOperationInLambda.kt") public void testAssignmentOperationInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambda.kt"); } @TestMetadata("assignmentOperationInLambdaWithExpectedType.kt") public void testAssignmentOperationInLambdaWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt"); } @TestMetadata("DeprecatedSyntax.kt") public void testDeprecatedSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt"); } @TestMetadata("ExpectedParameterTypeMismatchVariance.kt") public void testExpectedParameterTypeMismatchVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt"); } @TestMetadata("ExpectedParametersTypesMismatch.kt") public void testExpectedParametersTypesMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt"); } @TestMetadata("functionExpressionAsLastExpressionInBlock.kt") public void testFunctionExpressionAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionExpressionAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionExpressionAsLastExpressionInBlock.kt"); } @TestMetadata("functionLIteralInBlockInIf.kt") public void testFunctionLIteralInBlockInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt"); } @TestMetadata("functionLiteralInIf.kt") public void testFunctionLiteralInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt"); } @TestMetadata("functionLiteralWithoutArgumentList.kt") public void testFunctionLiteralWithoutArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralWithoutArgumentList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/functionLiteralWithoutArgumentList.kt"); } @TestMetadata("higherOrderCallMissingParameters.kt") public void testHigherOrderCallMissingParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/higherOrderCallMissingParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/higherOrderCallMissingParameters.kt"); } @TestMetadata("kt11733.kt") public void testKt11733() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt11733.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt11733.kt"); } @TestMetadata("kt11733_1.kt") public void testKt11733_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt11733_1.kt"); } @TestMetadata("kt16016.kt") public void testKt16016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt16016.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt16016.kt"); } @TestMetadata("kt2906.kt") public void testKt2906() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt2906.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt2906.kt"); } @TestMetadata("kt3343.kt") public void testKt3343() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt3343.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt3343.kt"); } @TestMetadata("kt4529.kt") public void testKt4529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt4529.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt4529.kt"); } @TestMetadata("kt6541_extensionForExtensionFunction.kt") public void testKt6541_extensionForExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt6541_extensionForExtensionFunction.kt"); } @TestMetadata("kt6869.kt") public void testKt6869() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt6869.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt6869.kt"); } @TestMetadata("kt7383_starProjectedFunction.kt") public void testKt7383_starProjectedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt"); } @TestMetadata("LabeledFunctionLiterals.kt") public void testLabeledFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt"); } @TestMetadata("returnNull.kt") public void testReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/returnNull.kt"); } @TestMetadata("returnNullWithReturn.kt") public void testReturnNullWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt"); } @TestMetadata("underscopeParameters.kt") public void testUnderscopeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/underscopeParameters.kt"); } @TestMetadata("unusedLiteral.kt") public void testUnusedLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteral.kt"); } @TestMetadata("unusedLiteralInsideUnitLiteral.kt") public void testUnusedLiteralInsideUnitLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteralInsideUnitLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/unusedLiteralInsideUnitLiteral.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringInLambdas extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDestructuringInLambdas() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexInference.kt") public void testComplexInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt"); } @TestMetadata("extensionComponents.kt") public void testExtensionComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/extensionComponents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/extensionComponents.kt"); } @TestMetadata("inferredFunctionalType.kt") public void testInferredFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt"); } @TestMetadata("modifiers.kt") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/modifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/modifiers.kt"); } @TestMetadata("noExpectedType.kt") public void testNoExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt"); } @TestMetadata("redeclaration.kt") public void testRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt"); } @TestMetadata("shadowing.kt") public void testShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/shadowing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/shadowing.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt"); } @TestMetadata("underscore.kt") public void testUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt"); } @TestMetadata("unusedParameters.kt") public void testUnusedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unusedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unusedParameters.kt"); } } @@ -8652,170 +7582,147 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/functionLiterals/return"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoLabels.kt") public void testAutoLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabels.kt"); } @TestMetadata("AutoLabelsNonLocal.kt") public void testAutoLabelsNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabelsNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/AutoLabelsNonLocal.kt"); } @TestMetadata("ForbiddenNonLocalReturnNoType.kt") public void testForbiddenNonLocalReturnNoType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt"); } @TestMetadata("IfInReturnedExpression.kt") public void testIfInReturnedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/IfInReturnedExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/IfInReturnedExpression.kt"); } @TestMetadata("IfWithoutElse.kt") public void testIfWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElse.kt"); } @TestMetadata("IfWithoutElseWithExplicitType.kt") public void testIfWithoutElseWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElseWithExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/IfWithoutElseWithExplicitType.kt"); } @TestMetadata("LambdaWithParameter.kt") public void testLambdaWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LambdaWithParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LambdaWithParameter.kt"); } @TestMetadata("LocalAndNonLocalReturnInLambda.kt") public void testLocalAndNonLocalReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalAndNonLocalReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalAndNonLocalReturnInLambda.kt"); } @TestMetadata("LocalReturnExplicitLabelNoParens.kt") public void testLocalReturnExplicitLabelNoParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelNoParens.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelNoParens.kt"); } @TestMetadata("LocalReturnExplicitLabelParens.kt") public void testLocalReturnExplicitLabelParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelParens.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnExplicitLabelParens.kt"); } @TestMetadata("LocalReturnHasTypeNothing.kt") public void testLocalReturnHasTypeNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnHasTypeNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnHasTypeNothing.kt"); } @TestMetadata("LocalReturnInNestedFunction.kt") public void testLocalReturnInNestedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedFunction.kt"); } @TestMetadata("LocalReturnInNestedLambda.kt") public void testLocalReturnInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnInNestedLambda.kt"); } @TestMetadata("LocalReturnNoCoercionToUnit.kt") public void testLocalReturnNoCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt"); } @TestMetadata("LocalReturnNull.kt") public void testLocalReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNull.kt"); } @TestMetadata("LocalReturnSecondUnit.kt") public void testLocalReturnSecondUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnSecondUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnSecondUnit.kt"); } @TestMetadata("LocalReturnUnit.kt") public void testLocalReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnit.kt"); } @TestMetadata("LocalReturnUnitAndDontCareType.kt") public void testLocalReturnUnitAndDontCareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt"); } @TestMetadata("LocalReturnUnitWithBodyExpression.kt") public void testLocalReturnUnitWithBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitWithBodyExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitWithBodyExpression.kt"); } @TestMetadata("LocalReturnWithExpectedType.kt") public void testLocalReturnWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExpectedType.kt"); } @TestMetadata("LocalReturnWithExplicitUnit.kt") public void testLocalReturnWithExplicitUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExplicitUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnWithExplicitUnit.kt"); } @TestMetadata("LocalReturnsWithExplicitReturnType.kt") public void testLocalReturnsWithExplicitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt"); } @TestMetadata("MixedReturnsFromLambda.kt") public void testMixedReturnsFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/MixedReturnsFromLambda.kt"); } @TestMetadata("NoCommonSystem.kt") public void testNoCommonSystem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt"); } @TestMetadata("SmartCastWithExplicitType.kt") public void testSmartCastWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCastWithExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/SmartCastWithExplicitType.kt"); } @TestMetadata("unresolvedReferenceInReturnBlock.kt") public void testUnresolvedReferenceInReturnBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/functionLiterals/return/unresolvedReferenceInReturnBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/functionLiterals/return/unresolvedReferenceInReturnBlock.kt"); } } } @@ -8824,214 +7731,189 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentsForT.kt") public void testArgumentsForT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/argumentsForT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/argumentsForT.kt"); } @TestMetadata("commonSupertypeContravariant.kt") public void testCommonSupertypeContravariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant.kt"); } @TestMetadata("commonSupertypeContravariant2.kt") public void testCommonSupertypeContravariant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/commonSupertypeContravariant2.kt"); } @TestMetadata("doNotCaptureSupertype.kt") public void testDoNotCaptureSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/doNotCaptureSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/doNotCaptureSupertype.kt"); } @TestMetadata("genericsInType.kt") public void testGenericsInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/genericsInType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/genericsInType.kt"); } @TestMetadata("InconsistentTypeParameterBounds.kt") public void testInconsistentTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/InconsistentTypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/InconsistentTypeParameterBounds.kt"); } @TestMetadata("invalidArgumentsNumberInWhere.kt") public void testInvalidArgumentsNumberInWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/invalidArgumentsNumberInWhere.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/invalidArgumentsNumberInWhere.kt"); } @TestMetadata("kt1575-Class.kt") public void testKt1575_Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt1575-Class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt1575-Class.kt"); } @TestMetadata("kt1575-Function.kt") public void testKt1575_Function() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt1575-Function.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt1575-Function.kt"); } @TestMetadata("kt5508.kt") public void testKt5508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt5508.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt5508.kt"); } @TestMetadata("kt9203.kt") public void testKt9203() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt9203.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt9203.kt"); } @TestMetadata("kt9203_1.kt") public void testKt9203_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt9203_1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt9203_1.kt"); } @TestMetadata("kt9985.kt") public void testKt9985() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/kt9985.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/kt9985.kt"); } @TestMetadata("Projections.kt") public void testProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/Projections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/Projections.kt"); } @TestMetadata("PseudoRawTypes.kt") public void testPseudoRawTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/PseudoRawTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/PseudoRawTypes.kt"); } @TestMetadata("RawTypeInIsExpression.kt") public void testRawTypeInIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RawTypeInIsExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RawTypeInIsExpression.kt"); } @TestMetadata("RawTypeInIsPattern.kt") public void testRawTypeInIsPattern() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RawTypeInIsPattern.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RawTypeInIsPattern.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/recursive.kt"); } @TestMetadata("RecursiveUpperBoundCheck.kt") public void testRecursiveUpperBoundCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundCheck.kt"); } @TestMetadata("RecursiveUpperBoundWithTwoArguments.kt") public void testRecursiveUpperBoundWithTwoArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundWithTwoArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundWithTwoArguments.kt"); } @TestMetadata("resolveGenericBoundsBeforeSupertypes.kt") public void testResolveGenericBoundsBeforeSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/resolveGenericBoundsBeforeSupertypes.kt"); } @TestMetadata("sameTypeParameterUse.kt") public void testSameTypeParameterUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/sameTypeParameterUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/sameTypeParameterUse.kt"); } @TestMetadata("suppressVarianceConflict.kt") public void testSuppressVarianceConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/suppressVarianceConflict.kt"); } @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/TypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/TypeParameterBounds.kt"); } @TestMetadata("TypeParametersInTypeParameterBounds.kt") public void testTypeParametersInTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/TypeParametersInTypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/TypeParametersInTypeParameterBounds.kt"); } @TestMetadata("unresolvedClassifierInWhere.kt") public void testUnresolvedClassifierInWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/unresolvedClassifierInWhere.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/unresolvedClassifierInWhere.kt"); } @TestMetadata("wildcardInValueParameter.kt") public void testWildcardInValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/wildcardInValueParameter.kt"); } @TestMetadata("wrongNumberOfTypeArgumentsDiagnostic.kt") public void testWrongNumberOfTypeArgumentsDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedParameters extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapturedParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/capturedParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLocalClass.kt") public void testInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt"); } @TestMetadata("localWithTypeParameter.kt") public void testLocalWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/localWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/localWithTypeParameter.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt"); } @TestMetadata("uncheckedCast.kt") public void testUncheckedCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/capturedParameters/uncheckedCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/capturedParameters/uncheckedCast.kt"); } } @@ -9039,20 +7921,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CyclicBounds extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCyclicBounds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/cyclicBounds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/cyclicBounds/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/cyclicBounds/functions.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/cyclicBounds/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/cyclicBounds/inClass.kt"); } } @@ -9060,208 +7944,184 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bareTypes.kt") public void testBareTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypes.kt"); } @TestMetadata("bareTypesComplex.kt") public void testBareTypesComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt"); } @TestMetadata("checkBoundsOuter.kt") public void testCheckBoundsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/checkBoundsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/checkBoundsOuter.kt"); } @TestMetadata("importedInner.kt") public void testImportedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/importedInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/importedInner.kt"); } @TestMetadata("innerSuperCall.kt") public void testInnerSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt"); } @TestMetadata("innerSuperCallSecondary.kt") public void testInnerSuperCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt"); } @TestMetadata("innerTP.kt") public void testInnerTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt"); } @TestMetadata("innerUncheckedCast.kt") public void testInnerUncheckedCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt"); } @TestMetadata("innerVariance.kt") public void testInnerVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/innerVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/innerVariance.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt"); } @TestMetadata("j+k.kt") public void testJ_k() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/j+k.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/j+k.kt"); } @TestMetadata("j+k_complex.kt") public void testJ_k_complex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/j+k_complex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/j+k_complex.kt"); } @TestMetadata("kt3357.kt") public void testKt3357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt"); } @TestMetadata("kt408.kt") public void testKt408() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/kt408.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt408.kt"); } @TestMetadata("kt6325.kt") public void testKt6325() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/kt6325.kt"); } @TestMetadata("outerArgumentsRequired.kt") public void testOuterArgumentsRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/outerArgumentsRequired.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/outerArgumentsRequired.kt"); } @TestMetadata("parameterShadowing.kt") public void testParameterShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/parameterShadowing.kt"); } @TestMetadata("qualifiedOuter.kt") public void testQualifiedOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt"); } @TestMetadata("qualifiedTypesResolution.kt") public void testQualifiedTypesResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedTypesResolution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedTypesResolution.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simple.kt"); } @TestMetadata("simpleIn.kt") public void testSimpleIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simpleIn.kt"); } @TestMetadata("simpleOut.kt") public void testSimpleOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOut.kt"); } @TestMetadata("simpleOutUseSite.kt") public void testSimpleOutUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt"); } @TestMetadata("substitutedMemberScope.kt") public void testSubstitutedMemberScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/substitutedMemberScope.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplicitArguments extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplicitArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fromCompanionObject.kt") public void testFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject.kt"); } @TestMetadata("fromOuterClassInObjectLiteral.kt") public void testFromOuterClassInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromOuterClassInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromOuterClassInObjectLiteral.kt"); } @TestMetadata("fromSuperClasses.kt") public void testFromSuperClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClasses.kt"); } @TestMetadata("fromSuperClassesLocal.kt") public void testFromSuperClassesLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt"); } @TestMetadata("fromSuperClassesLocalInsideInner.kt") public void testFromSuperClassesLocalInsideInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt"); } @TestMetadata("fromSuperClassesTransitive.kt") public void testFromSuperClassesTransitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesTransitive.kt"); } @TestMetadata("inStaticScope.kt") public void testInStaticScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/inStaticScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/inStaticScope.kt"); } @TestMetadata("secondLevelDepth.kt") public void testSecondLevelDepth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt"); } } } @@ -9270,50 +8130,47 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultipleBoundsMemberScope extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultipleBoundsMemberScope() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingReturnType.kt") public void testConflictingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/conflictingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/conflictingReturnType.kt"); } @TestMetadata("flexibleTypes.kt") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/flexibleTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/flexibleTypes.kt"); } @TestMetadata("mostSpecific.kt") public void testMostSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/mostSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/mostSpecific.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/properties.kt"); } @TestMetadata("propertiesConflict.kt") public void testPropertiesConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/propertiesConflict.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt"); } @TestMetadata("validTypeParameters.kt") public void testValidTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/validTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/validTypeParameters.kt"); } } @@ -9321,98 +8178,87 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullability extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/nullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedTypeWithPlatformSupertype.kt") public void testCapturedTypeWithPlatformSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/capturedTypeWithPlatformSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/capturedTypeWithPlatformSupertype.kt"); } @TestMetadata("correctSubstitutionForIncorporationConstraint.kt") public void testCorrectSubstitutionForIncorporationConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/correctSubstitutionForIncorporationConstraint.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/correctSubstitutionForIncorporationConstraint.kt"); } @TestMetadata("declarationsBoundsViolation.kt") public void testDeclarationsBoundsViolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/declarationsBoundsViolation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/declarationsBoundsViolation.kt"); } @TestMetadata("expressionsBoundsViolation.kt") public void testExpressionsBoundsViolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt"); } @TestMetadata("functionalBound.kt") public void testFunctionalBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt"); } @TestMetadata("nullToGeneric.kt") public void testNullToGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/nullToGeneric.kt"); } @TestMetadata("smartCastRefinedClass.kt") public void testSmartCastRefinedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCastRefinedClass.kt"); } @TestMetadata("smartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt"); } @TestMetadata("smartCastsOnThis.kt") public void testSmartCastsOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt"); } @TestMetadata("smartCastsValueArgument.kt") public void testSmartCastsValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt"); } @TestMetadata("tpBoundsViolation.kt") public void testTpBoundsViolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt"); } @TestMetadata("tpBoundsViolationVariance.kt") public void testTpBoundsViolationVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt"); } @TestMetadata("tpInBounds.kt") public void testTpInBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt"); } @TestMetadata("useAsReceiver.kt") public void testUseAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt"); } @TestMetadata("useAsValueArgument.kt") public void testUseAsValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt"); } } @@ -9420,10 +8266,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProjectionsScope extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAll.kt") public void testAddAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt"); } public void testAllFilesPresentInProjectionsScope() throws Exception { @@ -9432,152 +8281,127 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("approximateDispatchReceiver.kt") public void testApproximateDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/approximateDispatchReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/approximateDispatchReceiver.kt"); } @TestMetadata("extensionReceiverTypeMismatch.kt") public void testExtensionReceiverTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt"); } @TestMetadata("extensionResultSubstitution.kt") public void testExtensionResultSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionResultSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/extensionResultSubstitution.kt"); } @TestMetadata("flexibleProjectedScope.kt") public void testFlexibleProjectedScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/flexibleProjectedScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/flexibleProjectedScope.kt"); } @TestMetadata("inValueParameter.kt") public void testInValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt"); } @TestMetadata("iterateOnExtension.kt") public void testIterateOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/iterateOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/iterateOnExtension.kt"); } @TestMetadata("kt7296.kt") public void testKt7296() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt"); } @TestMetadata("kt8647.kt") public void testKt8647() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/kt8647.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/kt8647.kt"); } @TestMetadata("lambdaArgument.kt") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/lambdaArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/lambdaArgument.kt"); } @TestMetadata("leakedApproximatedType.kt") public void testLeakedApproximatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/leakedApproximatedType.kt"); } @TestMetadata("MLOut.kt") public void testMLOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/MLOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/MLOut.kt"); } @TestMetadata("multipleArgumentProjectedOut.kt") public void testMultipleArgumentProjectedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt"); } @TestMetadata("platformSuperClass.kt") public void testPlatformSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt"); } @TestMetadata("projectedOutConventions.kt") public void testProjectedOutConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt"); } @TestMetadata("projectedOutSmartCast.kt") public void testProjectedOutSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt"); } @TestMetadata("recursiveUpperBoundStar.kt") public void testRecursiveUpperBoundStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStar.kt"); } @TestMetadata("recursiveUpperBoundStarOut.kt") public void testRecursiveUpperBoundStarOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStarOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/recursiveUpperBoundStarOut.kt"); } @TestMetadata("starNullability.kt") public void testStarNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullability.kt"); } @TestMetadata("starNullabilityRecursive.kt") public void testStarNullabilityRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt"); } @TestMetadata("superClass.kt") public void testSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/superClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/superClass.kt"); } @TestMetadata("typeMismatchConventions.kt") public void testTypeMismatchConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt"); } @TestMetadata("typeMismatchInLambda.kt") public void testTypeMismatchInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt"); } @TestMetadata("typeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt"); } @TestMetadata("unsafeVarianceStar.kt") public void testUnsafeVarianceStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt"); } } @@ -9585,38 +8409,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StarProjections extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStarProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/starProjections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkBounds.kt") public void testCheckBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/checkBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/checkBounds.kt"); } @TestMetadata("collectionInheritedFromJava.kt") public void testCollectionInheritedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/collectionInheritedFromJava.kt"); } @TestMetadata("inheritedFromJava.kt") public void testInheritedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromJava.kt"); } @TestMetadata("inheritedFromKotlin.kt") public void testInheritedFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/inheritedFromKotlin.kt"); } @TestMetadata("invalid.kt") public void testInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt"); } } @@ -9624,80 +8447,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TpAsReified extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTpAsReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/tpAsReified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CapturedAsReified.kt") public void testCapturedAsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt"); } @TestMetadata("ClassDereference.kt") public void testClassDereference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/ClassDereference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/ClassDereference.kt"); } @TestMetadata("Conventions.kt") public void testConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/Conventions.kt"); } @TestMetadata("GenericAsReifiedArgument.kt") public void testGenericAsReifiedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/GenericAsReifiedArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/GenericAsReifiedArgument.kt"); } @TestMetadata("InConstructor.kt") public void testInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt"); } @TestMetadata("InFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt"); } @TestMetadata("InProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InProperty.kt"); } @TestMetadata("InType.kt") public void testInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InType.kt"); } @TestMetadata("InlineableReified.kt") public void testInlineableReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt"); } @TestMetadata("LocalFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/LocalFun.kt"); } @TestMetadata("NotInlineableReified.kt") public void testNotInlineableReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/NotInlineableReified.kt"); } @TestMetadata("ReifiedClass.kt") public void testReifiedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/tpAsReified/ReifiedClass.kt"); } } @@ -9705,32 +8520,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarProjection extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarProjection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/varProjection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("setterNotProjectedOutAssign.kt") public void testSetterNotProjectedOutAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterNotProjectedOutAssign.kt"); } @TestMetadata("setterProjectedOutAssign.kt") public void testSetterProjectedOutAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutAssign.kt"); } @TestMetadata("setterProjectedOutNoPlusAssign.kt") public void testSetterProjectedOutNoPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutNoPlusAssign.kt"); } @TestMetadata("setterProjectedOutPlusAssignDefined.kt") public void testSetterProjectedOutPlusAssignDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/generics/varProjection/setterProjectedOutPlusAssignDefined.kt"); } } } @@ -9739,326 +8554,277 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AllUnderImportsAmbiguity.kt") public void testAllUnderImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); } @TestMetadata("AllUnderImportsLessPriority.kt") public void testAllUnderImportsLessPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); } @TestMetadata("AllUnderImportsSamePriorityForFunction.kt") public void testAllUnderImportsSamePriorityForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForFunction.kt"); } @TestMetadata("AllUnderImportsSamePriorityForProperty.kt") public void testAllUnderImportsSamePriorityForProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt"); } @TestMetadata("CheckJavaVisibility.kt") public void testCheckJavaVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CheckJavaVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CheckJavaVisibility.kt"); } @TestMetadata("CheckVisibility.kt") public void testCheckVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CheckVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CheckVisibility.kt"); } @TestMetadata("ClassClash.kt") public void testClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ClassClash.kt"); } @TestMetadata("ClassClashStarImport.kt") public void testClassClashStarImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt"); } @TestMetadata("ClassImportsConflicting.kt") public void testClassImportsConflicting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ClassImportsConflicting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ClassImportsConflicting.kt"); } @TestMetadata("CurrentPackageAndAllUnderImport.kt") public void testCurrentPackageAndAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); } @TestMetadata("CurrentPackageAndExplicitImport.kt") public void testCurrentPackageAndExplicitImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); } @TestMetadata("DefaultImportsPriority.kt") public void testDefaultImportsPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/DefaultImportsPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/DefaultImportsPriority.kt"); } @TestMetadata("ExplicitImportsAmbiguity.kt") public void testExplicitImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ExplicitImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ExplicitImportsAmbiguity.kt"); } @TestMetadata("ExplicitImportsUnambiguityForFunction.kt") public void testExplicitImportsUnambiguityForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ExplicitImportsUnambiguityForFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ExplicitImportsUnambiguityForFunction.kt"); } @TestMetadata("ExplicitPackageImportsAmbiguity.kt") public void testExplicitPackageImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ExplicitPackageImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ExplicitPackageImportsAmbiguity.kt"); } @TestMetadata("ImportClassClash.kt") public void testImportClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportClassClash.kt"); } @TestMetadata("ImportFromCompanionObject.kt") public void testImportFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromCompanionObject.kt"); } @TestMetadata("ImportFromCurrentWithDifferentName.kt") public void testImportFromCurrentWithDifferentName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromCurrentWithDifferentName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromCurrentWithDifferentName.kt"); } @TestMetadata("ImportFromObject.kt") public void testImportFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromObject.kt"); } @TestMetadata("ImportFromRootPackage.kt") public void testImportFromRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportFromRootPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportFromRootPackage.kt"); } @TestMetadata("importFunctionWithAllUnderImport.kt") public void testImportFunctionWithAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImport.kt"); } @TestMetadata("importFunctionWithAllUnderImportAfterNamedImport.kt") public void testImportFunctionWithAllUnderImportAfterNamedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImportAfterNamedImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/importFunctionWithAllUnderImportAfterNamedImport.kt"); } @TestMetadata("ImportHidingDefinitionInTheSameFile.kt") public void testImportHidingDefinitionInTheSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportHidingDefinitionInTheSameFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportHidingDefinitionInTheSameFile.kt"); } @TestMetadata("ImportNestedWithDifferentName.kt") public void testImportNestedWithDifferentName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportNestedWithDifferentName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportNestedWithDifferentName.kt"); } @TestMetadata("ImportObjectAndUseAsSupertype.kt") public void testImportObjectAndUseAsSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportObjectAndUseAsSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportObjectAndUseAsSupertype.kt"); } @TestMetadata("ImportObjectHidesCurrentPackage.kt") public void testImportObjectHidesCurrentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportObjectHidesCurrentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportObjectHidesCurrentPackage.kt"); } @TestMetadata("ImportOverloadFunctions.kt") public void testImportOverloadFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportOverloadFunctions.kt"); } @TestMetadata("ImportPrivateMember.kt") public void testImportPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportPrivateMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportPrivateMember.kt"); } @TestMetadata("ImportPrivateMemberFromOtherFile.kt") public void testImportPrivateMemberFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportPrivateMemberFromOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportPrivateMemberFromOtherFile.kt"); } @TestMetadata("ImportPrivateMembersWithStar.kt") public void testImportPrivateMembersWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportPrivateMembersWithStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportPrivateMembersWithStar.kt"); } @TestMetadata("ImportProtectedClass.kt") public void testImportProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportProtectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportProtectedClass.kt"); } @TestMetadata("ImportResolutionOrder.kt") public void testImportResolutionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportResolutionOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportResolutionOrder.kt"); } @TestMetadata("ImportTwoTimes.kt") public void testImportTwoTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportTwoTimes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportTwoTimes.kt"); } @TestMetadata("ImportTwoTimesStar.kt") public void testImportTwoTimesStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportTwoTimesStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportTwoTimesStar.kt"); } @TestMetadata("Imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/Imports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/Imports.kt"); } @TestMetadata("ImportsConflicting.kt") public void testImportsConflicting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/ImportsConflicting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/ImportsConflicting.kt"); } @TestMetadata("InaccessiblePrivateClass.kt") public void testInaccessiblePrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/InaccessiblePrivateClass.kt"); } @TestMetadata("JavaPackageLocalClassNotImported.kt") public void testJavaPackageLocalClassNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/JavaPackageLocalClassNotImported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/JavaPackageLocalClassNotImported.kt"); } @TestMetadata("kt13112.kt") public void testKt13112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/kt13112.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/kt13112.kt"); } @TestMetadata("MalformedImports.kt") public void testMalformedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/MalformedImports.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/MalformedImports.kt"); } @TestMetadata("NestedClassClash.kt") public void testNestedClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/NestedClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/NestedClassClash.kt"); } @TestMetadata("OperatorRenameOnImport.kt") public void testOperatorRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/OperatorRenameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/OperatorRenameOnImport.kt"); } @TestMetadata("PackageLocalClassNotImported.kt") public void testPackageLocalClassNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageLocalClassNotImported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PackageLocalClassNotImported.kt"); } @TestMetadata("PackageLocalClassReferencedError.kt") public void testPackageLocalClassReferencedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PackageLocalClassReferencedError.kt"); } @TestMetadata("PackageVsClass.kt") public void testPackageVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PackageVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PackageVsClass.kt"); } @TestMetadata("PrivateClassNotImported.kt") public void testPrivateClassNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PrivateClassNotImported.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PrivateClassNotImported.kt"); } @TestMetadata("PrivateClassReferencedError.kt") public void testPrivateClassReferencedError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/PrivateClassReferencedError.kt"); } @TestMetadata("propertyClassFileDependencyRecursion.kt") public void testPropertyClassFileDependencyRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/propertyClassFileDependencyRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/propertyClassFileDependencyRecursion.kt"); } @TestMetadata("RenameOnImport.kt") public void testRenameOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/RenameOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/RenameOnImport.kt"); } @TestMetadata("StarImportFromObject.kt") public void testStarImportFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/StarImportFromObject.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/SyntaxError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/SyntaxError.kt"); } @TestMetadata("TopLevelClassVsPackage.kt") public void testTopLevelClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); } @TestMetadata("WrongImport.kt") public void testWrongImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/imports/WrongImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/imports/WrongImport.kt"); } } @@ -10066,238 +8832,209 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IncompleteCode extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIncompleteCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayBracketsRange.kt") public void testArrayBracketsRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/arrayBracketsRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/arrayBracketsRange.kt"); } @TestMetadata("checkNothingIsSubtype.kt") public void testCheckNothingIsSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt"); } @TestMetadata("controlStructuresErrors.kt") public void testControlStructuresErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/controlStructuresErrors.kt"); } @TestMetadata("illegalSelectorCallableReference.kt") public void testIllegalSelectorCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/illegalSelectorCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/illegalSelectorCallableReference.kt"); } @TestMetadata("inExpr.kt") public void testInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/inExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/inExpr.kt"); } @TestMetadata("incompleteAssignment.kt") public void testIncompleteAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/incompleteAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/incompleteAssignment.kt"); } @TestMetadata("incompleteEquals.kt") public void testIncompleteEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/incompleteEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/incompleteEquals.kt"); } @TestMetadata("kt1955.kt") public void testKt1955() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/kt1955.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/kt1955.kt"); } @TestMetadata("kt2014.kt") public void testKt2014() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/kt2014.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/kt2014.kt"); } @TestMetadata("kt4866UnresolvedArrayAccess.kt") public void testKt4866UnresolvedArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/kt4866UnresolvedArrayAccess.kt"); } @TestMetadata("NoSenselessComparisonForErrorType.kt") public void testNoSenselessComparisonForErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt"); } @TestMetadata("plusOnTheRight.kt") public void testPlusOnTheRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt"); } @TestMetadata("pseudocodeTraverseNextInstructions.kt") public void testPseudocodeTraverseNextInstructions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/pseudocodeTraverseNextInstructions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/pseudocodeTraverseNextInstructions.kt"); } @TestMetadata("senselessComparisonWithNull.kt") public void testSenselessComparisonWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/senselessComparisonWithNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/senselessComparisonWithNull.kt"); } @TestMetadata("SupertypeOfErrorType.kt") public void testSupertypeOfErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/SupertypeOfErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/SupertypeOfErrorType.kt"); } @TestMetadata("typeParameterOnLhsOfDot.kt") public void testTypeParameterOnLhsOfDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/typeParameterOnLhsOfDot.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/typeParameterOnLhsOfDot.kt"); } @TestMetadata("unresolvedArguments.kt") public void testUnresolvedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt"); } @TestMetadata("unresolvedOperation.kt") public void testUnresolvedOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/unresolvedOperation.kt"); } @TestMetadata("variableDeclarationInSelector.kt") public void testVariableDeclarationInSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/variableDeclarationInSelector.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/variableDeclarationInSelector.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DiagnosticWithSyntaxError extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDiagnosticWithSyntaxError() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayExpression.kt") public void testArrayExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt"); } @TestMetadata("checkBackingFieldException.kt") public void testCheckBackingFieldException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/checkBackingFieldException.kt"); } @TestMetadata("completeFunctionArgumentsOfNestedCalls.kt") public void testCompleteFunctionArgumentsOfNestedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/completeFunctionArgumentsOfNestedCalls.kt"); } @TestMetadata("declarationAfterDotSelectorExpected.kt") public void testDeclarationAfterDotSelectorExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterDotSelectorExpected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterDotSelectorExpected.kt"); } @TestMetadata("declarationAfterIncompleteElvis.kt") public void testDeclarationAfterIncompleteElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterIncompleteElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/declarationAfterIncompleteElvis.kt"); } @TestMetadata("funEquals.kt") public void testFunEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funEquals.kt"); } @TestMetadata("funKeyword.kt") public void testFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funKeyword.kt"); } @TestMetadata("funcitonTypes.kt") public void testFuncitonTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funcitonTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/funcitonTypes.kt"); } @TestMetadata("incompleteEnumReference.kt") public void testIncompleteEnumReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteEnumReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteEnumReference.kt"); } @TestMetadata("incompleteVal.kt") public void testIncompleteVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteVal.kt"); } @TestMetadata("incompleteValWithAccessor.kt") public void testIncompleteValWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteValWithAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteValWithAccessor.kt"); } @TestMetadata("incompleteWhen.kt") public void testIncompleteWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/incompleteWhen.kt"); } @TestMetadata("namedFun.kt") public void testNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/namedFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/namedFun.kt"); } @TestMetadata("noTypeParamsInReturnType.kt") public void testNoTypeParamsInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt"); } @TestMetadata("typeReferenceError.kt") public void testTypeReferenceError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/typeReferenceError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/typeReferenceError.kt"); } @TestMetadata("valNoName.kt") public void testValNoName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valNoName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valNoName.kt"); } @TestMetadata("valWithNoNameBeforeNextDeclarationWithModifiers.kt") public void testValWithNoNameBeforeNextDeclarationWithModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameBeforeNextDeclarationWithModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameBeforeNextDeclarationWithModifiers.kt"); } @TestMetadata("valWithNoNameInBlock.kt") public void testValWithNoNameInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/valWithNoNameInBlock.kt"); } } } @@ -10306,454 +9043,389 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotCompleteResolveAmbiguity.kt") public void testCannotCompleteResolveAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt"); } @TestMetadata("cannotCompleteResolveFunctionLiteralsNoUse.kt") public void testCannotCompleteResolveFunctionLiteralsNoUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt"); } @TestMetadata("cannotCompleteResolveNoInfoForParameter.kt") public void testCannotCompleteResolveNoInfoForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt"); } @TestMetadata("cannotCompleteResolveNoneApplicable.kt") public void testCannotCompleteResolveNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoneApplicable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoneApplicable.kt"); } @TestMetadata("cannotCompleteResolveWithFunctionLiterals.kt") public void testCannotCompleteResolveWithFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt"); } @TestMetadata("completeInferenceIfManyFailed.kt") public void testCompleteInferenceIfManyFailed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt"); } @TestMetadata("conflictingSubstitutions.kt") public void testConflictingSubstitutions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt"); } @TestMetadata("dependOnExpectedType.kt") public void testDependOnExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt"); } @TestMetadata("dependantOnVariance.kt") public void testDependantOnVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt"); } @TestMetadata("dependantOnVarianceNullable.kt") public void testDependantOnVarianceNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/dependantOnVarianceNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/dependantOnVarianceNullable.kt"); } @TestMetadata("expectedTypeAdditionalTest.kt") public void testExpectedTypeAdditionalTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt"); } @TestMetadata("expectedTypeDoubleReceiver.kt") public void testExpectedTypeDoubleReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt"); } @TestMetadata("expectedTypeFromCast.kt") public void testExpectedTypeFromCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt"); } @TestMetadata("expectedTypeFromCastComplexExpression.kt") public void testExpectedTypeFromCastComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastComplexExpression.kt"); } @TestMetadata("expectedTypeFromCastParenthesized.kt") public void testExpectedTypeFromCastParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeFromCastParenthesized.kt"); } @TestMetadata("expectedTypeWithGenerics.kt") public void testExpectedTypeWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt"); } @TestMetadata("findViewById.kt") public void testFindViewById() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/findViewById.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/findViewById.kt"); } @TestMetadata("fixVariableToNothing.kt") public void testFixVariableToNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/fixVariableToNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/fixVariableToNothing.kt"); } @TestMetadata("fixationOrderForProperConstraints.kt") public void testFixationOrderForProperConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt"); } @TestMetadata("flexibleTypesAsUpperBound.kt") public void testFlexibleTypesAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/flexibleTypesAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/flexibleTypesAsUpperBound.kt"); } @TestMetadata("functionPlaceholderError.kt") public void testFunctionPlaceholderError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt"); } @TestMetadata("hasErrorInConstrainingTypes.kt") public void testHasErrorInConstrainingTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/hasErrorInConstrainingTypes.kt"); } @TestMetadata("immutableArrayList.kt") public void testImmutableArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/immutableArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/immutableArrayList.kt"); } @TestMetadata("implicitInvokeExtensionWithFunctionalArgument.kt") public void testImplicitInvokeExtensionWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeInCompanionObjectWithFunctionalArgument.kt") public void testImplicitInvokeInCompanionObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeInObjectWithFunctionalArgument.kt") public void testImplicitInvokeInObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeWithFunctionLiteralArgument.kt") public void testImplicitInvokeWithFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt"); } @TestMetadata("inferInFunctionLiterals.kt") public void testInferInFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/inferInFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/inferInFunctionLiterals.kt"); } @TestMetadata("inferInFunctionLiteralsWithReturn.kt") public void testInferInFunctionLiteralsWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/inferInFunctionLiteralsWithReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/inferInFunctionLiteralsWithReturn.kt"); } @TestMetadata("intersectionTypeMultipleBoundsAsReceiver.kt") public void testIntersectionTypeMultipleBoundsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/intersectionTypeMultipleBoundsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/intersectionTypeMultipleBoundsAsReceiver.kt"); } @TestMetadata("invokeLambdaAsFunction.kt") public void testInvokeLambdaAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/invokeLambdaAsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/invokeLambdaAsFunction.kt"); } @TestMetadata("kt11963.kt") public void testKt11963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt11963.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt11963.kt"); } @TestMetadata("kt12399.kt") public void testKt12399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt12399.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt12399.kt"); } @TestMetadata("kt1293.kt") public void testKt1293() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt1293.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt1293.kt"); } @TestMetadata("kt3184.kt") public void testKt3184() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt3184.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt3184.kt"); } @TestMetadata("kt6175.kt") public void testKt6175() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt6175.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt6175.kt"); } @TestMetadata("kt619.kt") public void testKt619() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/kt619.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/kt619.kt"); } @TestMetadata("lambdaInValInitializerWithAnonymousFunctions.kt") public void testLambdaInValInitializerWithAnonymousFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt"); } @TestMetadata("listConstructor.kt") public void testListConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/listConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/listConstructor.kt"); } @TestMetadata("mapFunction.kt") public void testMapFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/mapFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/mapFunction.kt"); } @TestMetadata("mostSpecificAfterInference.kt") public void testMostSpecificAfterInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/mostSpecificAfterInference.kt"); } @TestMetadata("NoInferenceFromDeclaredBounds.kt") public void testNoInferenceFromDeclaredBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt"); } @TestMetadata("noInformationForParameter.kt") public void testNoInformationForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt"); } @TestMetadata("nullableTypeArgumentWithNotNullUpperBound.kt") public void testNullableTypeArgumentWithNotNullUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nullableTypeArgumentWithNotNullUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nullableTypeArgumentWithNotNullUpperBound.kt"); } @TestMetadata("nullableUpperBound.kt") public void testNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nullableUpperBound.kt"); } @TestMetadata("opposite.kt") public void testOpposite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/opposite.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/opposite.kt"); } @TestMetadata("possibleCycleOnConstraints.kt") public void testPossibleCycleOnConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt"); } @TestMetadata("reportAboutUnresolvedReferenceAsUnresolved.kt") public void testReportAboutUnresolvedReferenceAsUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportAboutUnresolvedReferenceAsUnresolved.kt"); } @TestMetadata("tryNumberLowerBoundsBeforeUpperBounds.kt") public void testTryNumberLowerBoundsBeforeUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/tryNumberLowerBoundsBeforeUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/tryNumberLowerBoundsBeforeUpperBounds.kt"); } @TestMetadata("typeConstructorMismatch.kt") public void testTypeConstructorMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt"); } @TestMetadata("typeInferenceExpectedTypeMismatch.kt") public void testTypeInferenceExpectedTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt"); } @TestMetadata("useFunctionLiteralsToInferType.kt") public void testUseFunctionLiteralsToInferType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/useFunctionLiteralsToInferType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/useFunctionLiteralsToInferType.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedTypes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapturedTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/capturedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("approximateBeforeFixation.kt") public void testApproximateBeforeFixation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/approximateBeforeFixation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/approximateBeforeFixation.kt"); } @TestMetadata("cannotCaptureInProjection.kt") public void testCannotCaptureInProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt"); } @TestMetadata("captureForNullableTypes.kt") public void testCaptureForNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt"); } @TestMetadata("captureForPlatformTypes.kt") public void testCaptureForPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureForPlatformTypes.kt"); } @TestMetadata("captureFromNullableTypeVariable.kt") public void testCaptureFromNullableTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt"); } @TestMetadata("captureFromSubtyping.kt") public void testCaptureFromSubtyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromSubtyping.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromSubtyping.kt"); } @TestMetadata("captureFromTypeParameterUpperBound.kt") public void testCaptureFromTypeParameterUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromTypeParameterUpperBound.kt"); } @TestMetadata("captureTypeOnlyOnTopLevel.kt") public void testCaptureTypeOnlyOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt"); } @TestMetadata("capturedType.kt") public void testCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedType.kt"); } @TestMetadata("capturedTypeAndApproximation.kt") public void testCapturedTypeAndApproximation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeAndApproximation.kt"); } @TestMetadata("capturedTypeSubstitutedIntoOppositeProjection.kt") public void testCapturedTypeSubstitutedIntoOppositeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeSubstitutedIntoOppositeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeSubstitutedIntoOppositeProjection.kt"); } @TestMetadata("capturedTypeWithTypeVariableSubtyping.kt") public void testCapturedTypeWithTypeVariableSubtyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeWithTypeVariableSubtyping.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/capturedTypeWithTypeVariableSubtyping.kt"); } @TestMetadata("expectedTypeMismatchWithInVariance.kt") public void testExpectedTypeMismatchWithInVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt"); } @TestMetadata("kt2570.kt") public void testKt2570() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2570.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2570.kt"); } @TestMetadata("kt2872.kt") public void testKt2872() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt"); } @TestMetadata("memberScopeOfCaptured.kt") public void testMemberScopeOfCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/memberScopeOfCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/memberScopeOfCaptured.kt"); } @TestMetadata("noCaptureTypeErrorForNonTopLevel.kt") public void testNoCaptureTypeErrorForNonTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt"); } @TestMetadata("notApproximateWhenCopyDescriptors.kt") public void testNotApproximateWhenCopyDescriptors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/notApproximateWhenCopyDescriptors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/notApproximateWhenCopyDescriptors.kt"); } @TestMetadata("overApproximationForInCaptured.kt") public void testOverApproximationForInCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForInCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForInCaptured.kt"); } @TestMetadata("overApproximationForOutCaptured.kt") public void testOverApproximationForOutCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForOutCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/overApproximationForOutCaptured.kt"); } @TestMetadata("starProjectionRegression.kt") public void testStarProjectionRegression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/capturedTypes/starProjectionRegression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/capturedTypes/starProjectionRegression.kt"); } } @@ -10761,38 +9433,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CoercionToUnit extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoercionToUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/coercionToUnit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("coercionWithExpectedType.kt") public void testCoercionWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedType.kt"); } @TestMetadata("coercionWithExpectedTypeAndBound.kt") public void testCoercionWithExpectedTypeAndBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedTypeAndBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedTypeAndBound.kt"); } @TestMetadata("coercionWithoutExpectedType.kt") public void testCoercionWithoutExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithoutExpectedType.kt"); } @TestMetadata("indirectCoercionWithExpectedType.kt") public void testIndirectCoercionWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/indirectCoercionWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/indirectCoercionWithExpectedType.kt"); } @TestMetadata("noCoercion.kt") public void testNoCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/coercionToUnit/noCoercion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/noCoercion.kt"); } } @@ -10800,56 +9471,52 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CommonSystem extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommonSystem() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/commonSystem"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundOnNullableVariable.kt") public void testBoundOnNullableVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/boundOnNullableVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/boundOnNullableVariable.kt"); } @TestMetadata("dontCaptureTypeVariable.kt") public void testDontCaptureTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/dontCaptureTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/dontCaptureTypeVariable.kt"); } @TestMetadata("fixVariablesInRightOrder.kt") public void testFixVariablesInRightOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/fixVariablesInRightOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/fixVariablesInRightOrder.kt"); } @TestMetadata("genericCandidateInGenericClass.kt") public void testGenericCandidateInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/genericCandidateInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/genericCandidateInGenericClass.kt"); } @TestMetadata("inferenceWithUpperBoundsInLambda.kt") public void testInferenceWithUpperBoundsInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/inferenceWithUpperBoundsInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/inferenceWithUpperBoundsInLambda.kt"); } @TestMetadata("kt3372toCollection.kt") public void testKt3372toCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/kt3372toCollection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/kt3372toCollection.kt"); } @TestMetadata("nestedLambdas.kt") public void testNestedLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/nestedLambdas.kt"); } @TestMetadata("theSameFunctionInArgs.kt") public void testTheSameFunctionInArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/commonSystem/theSameFunctionInArgs.kt"); } } @@ -10857,80 +9524,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constraints extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstraints() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/constraints"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constraintOnFunctionLiteral.kt") public void testConstraintOnFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt"); } @TestMetadata("equalityConstraintOnNullableType.kt") public void testEqualityConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/equalityConstraintOnNullableType.kt"); } @TestMetadata("ignoreConstraintFromImplicitInNothing.kt") public void testIgnoreConstraintFromImplicitInNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt"); } @TestMetadata("kt6320.kt") public void testKt6320() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt"); } @TestMetadata("kt7351ConstraintFromUnitExpectedType.kt") public void testKt7351ConstraintFromUnitExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt7351ConstraintFromUnitExpectedType.kt"); } @TestMetadata("kt7433.kt") public void testKt7433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt7433.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt7433.kt"); } @TestMetadata("kt8879.kt") public void testKt8879() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt"); } @TestMetadata("notNullConstraintOnNullableType.kt") public void testNotNullConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt"); } @TestMetadata("operationsOnIntegerValueTypes.kt") public void testOperationsOnIntegerValueTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/operationsOnIntegerValueTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/operationsOnIntegerValueTypes.kt"); } @TestMetadata("returnLambdaFromLambda.kt") public void testReturnLambdaFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/returnLambdaFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/returnLambdaFromLambda.kt"); } @TestMetadata("subtypeConstraintOnNullableType.kt") public void testSubtypeConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/subtypeConstraintOnNullableType.kt"); } @TestMetadata("supertypeConstraintOnNullableType.kt") public void testSupertypeConstraintOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/constraints/supertypeConstraintOnNullableType.kt"); } } @@ -10938,80 +9597,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedCalls extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNestedCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/arrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/arrayAccess.kt"); } @TestMetadata("binaryExpressions.kt") public void testBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt"); } @TestMetadata("checkTypesForQualifiedProperties.kt") public void testCheckTypesForQualifiedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/checkTypesForQualifiedProperties.kt"); } @TestMetadata("completeNestedCallsForArraySetExpression.kt") public void testCompleteNestedCallsForArraySetExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsForArraySetExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsForArraySetExpression.kt"); } @TestMetadata("completeNestedCallsInference.kt") public void testCompleteNestedCallsInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedCallsInference.kt"); } @TestMetadata("completeNestedForVariableAsFunctionCall.kt") public void testCompleteNestedForVariableAsFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/completeNestedForVariableAsFunctionCall.kt"); } @TestMetadata("externalTypeParameter.kt") public void testExternalTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/externalTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/externalTypeParameter.kt"); } @TestMetadata("inferenceForNestedBinaryCall.kt") public void testInferenceForNestedBinaryCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/inferenceForNestedBinaryCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/inferenceForNestedBinaryCall.kt"); } @TestMetadata("kt3395.kt") public void testKt3395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3395.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3395.kt"); } @TestMetadata("kt3461checkTypes.kt") public void testKt3461checkTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/kt3461checkTypes.kt"); } @TestMetadata("makeNullableIfSafeCall.kt") public void testMakeNullableIfSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/makeNullableIfSafeCall.kt"); } @TestMetadata("nontrivialCallExpression.kt") public void testNontrivialCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/nestedCalls/nontrivialCallExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/nestedCalls/nontrivialCallExpression.kt"); } } @@ -11019,32 +9670,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RecursiveLocalFuns extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecursiveLocalFuns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localFactorial.kt") public void testLocalFactorial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt"); } @TestMetadata("recursiveFun.kt") public void testRecursiveFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt"); } @TestMetadata("recursiveLambda.kt") public void testRecursiveLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt"); } @TestMetadata("selfCall.kt") public void testSelfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt"); } } @@ -11052,320 +9703,272 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("compareBy.kt") public void testCompareBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/compareBy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/compareBy.kt"); } @TestMetadata("kt1029.kt") public void testKt1029() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1029.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1029.kt"); } @TestMetadata("kt1031.kt") public void testKt1031() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1031.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1031.kt"); } @TestMetadata("kt1127.kt") public void testKt1127() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt"); } @TestMetadata("kt1145.kt") public void testKt1145() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1145.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1145.kt"); } @TestMetadata("kt1358.kt") public void testKt1358() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1358.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1358.kt"); } @TestMetadata("kt1410.kt") public void testKt1410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1410.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1410.kt"); } @TestMetadata("kt1718.kt") public void testKt1718() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1718.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1718.kt"); } @TestMetadata("kt1944.kt") public void testKt1944() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt1944.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt1944.kt"); } @TestMetadata("kt2057.kt") public void testKt2057() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2057.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2057.kt"); } @TestMetadata("kt2179.kt") public void testKt2179() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2179.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2179.kt"); } @TestMetadata("kt2200.kt") public void testKt2200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt"); } @TestMetadata("kt2283.kt") public void testKt2283() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt"); } @TestMetadata("kt2286.kt") public void testKt2286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt"); } @TestMetadata("kt2294.kt") public void testKt2294() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2294.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2294.kt"); } @TestMetadata("kt2320.kt") public void testKt2320() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2320.kt"); } @TestMetadata("kt2324.kt") public void testKt2324() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2324.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2324.kt"); } @TestMetadata("kt2407.kt") public void testKt2407() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2407.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2407.kt"); } @TestMetadata("kt2445.kt") public void testKt2445() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt"); } @TestMetadata("kt2459.kt") public void testKt2459() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2459.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2459.kt"); } @TestMetadata("kt2484.kt") public void testKt2484() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2484.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2484.kt"); } @TestMetadata("kt2505.kt") public void testKt2505() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2505.kt"); } @TestMetadata("kt2514.kt") public void testKt2514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2514.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2514.kt"); } @TestMetadata("kt2588.kt") public void testKt2588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2588.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2588.kt"); } @TestMetadata("kt2741.kt") public void testKt2741() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2741.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2741.kt"); } @TestMetadata("kt2754.kt") public void testKt2754() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2754.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2754.kt"); } @TestMetadata("kt2838.kt") public void testKt2838() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt"); } @TestMetadata("kt2841.kt") public void testKt2841() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841.kt"); } @TestMetadata("kt2841_it.kt") public void testKt2841_it() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt"); } @TestMetadata("kt2841_it_this.kt") public void testKt2841_it_this() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841_it_this.kt"); } @TestMetadata("kt2841_this.kt") public void testKt2841_this() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt"); } @TestMetadata("kt2842.kt") public void testKt2842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2842.kt"); } @TestMetadata("kt2883.kt") public void testKt2883() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt"); } @TestMetadata("kt3007.kt") public void testKt3007() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3007.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3007.kt"); } @TestMetadata("kt3038.kt") public void testKt3038() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3038.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3038.kt"); } @TestMetadata("kt3150.kt") public void testKt3150() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3150.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3150.kt"); } @TestMetadata("kt3174.kt") public void testKt3174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3174.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3174.kt"); } @TestMetadata("kt3301.kt") public void testKt3301() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3301.kt"); } @TestMetadata("kt3344.kt") public void testKt3344() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3344.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3344.kt"); } @TestMetadata("kt3496.kt") public void testKt3496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3496.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3496.kt"); } @TestMetadata("kt3496_2.kt") public void testKt3496_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3496_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3496_2.kt"); } @TestMetadata("kt3559.kt") public void testKt3559() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt3559.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt3559.kt"); } @TestMetadata("kt4420.kt") public void testKt4420() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt4420.kt"); } @TestMetadata("kt702.kt") public void testKt702() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt702.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt702.kt"); } @TestMetadata("kt731.kt") public void testKt731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt731.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt731.kt"); } @TestMetadata("kt742.kt") public void testKt742() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt742.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt742.kt"); } @TestMetadata("kt8132.kt") public void testKt8132() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt8132.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt8132.kt"); } @TestMetadata("kt832.kt") public void testKt832() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt832.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt832.kt"); } @TestMetadata("kt943.kt") public void testKt943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt943.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt943.kt"); } @TestMetadata("kt9461.kt") public void testKt9461() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt9461.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt9461.kt"); } @TestMetadata("kt948.kt") public void testKt948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/kt948.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt948.kt"); } @TestMetadata("noRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor.kt") public void testNoRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/regressions/noRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/regressions/noRecursionOnCallingPureKotlinFunctionAsSyntheticJavaAccessor.kt"); } } @@ -11373,68 +9976,62 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReportingImprovements extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReportingImprovements() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/reportingImprovements"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotInferParameterTypeWithInference.kt") public void testCannotInferParameterTypeWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt"); } @TestMetadata("ErrorTypeAsGenericParameter.kt") public void testErrorTypeAsGenericParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/ErrorTypeAsGenericParameter.kt"); } @TestMetadata("FunctionPlaceholder.kt") public void testFunctionPlaceholder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt"); } @TestMetadata("NoAmbiguityForDifferentFunctionTypes.kt") public void testNoAmbiguityForDifferentFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/NoAmbiguityForDifferentFunctionTypes.kt"); } @TestMetadata("reportUnresolvedReferenceWrongReceiverForManyCandidates.kt") public void testReportUnresolvedReferenceWrongReceiverForManyCandidates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/reportUnresolvedReferenceWrongReceiverForManyCandidates.kt"); } @TestMetadata("subtypeForInvariantWithErrorGenerics.kt") public void testSubtypeForInvariantWithErrorGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt"); } @TestMetadata("typeInferenceFailedOnComponentN.kt") public void testTypeInferenceFailedOnComponentN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt"); } @TestMetadata("typeInferenceFailedOnIteratorCall.kt") public void testTypeInferenceFailedOnIteratorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt"); } @TestMetadata("wrongArgumentExtensionFunction.kt") public void testWrongArgumentExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentExtensionFunction.kt"); } @TestMetadata("wrongArgumentPassedToLocalExtensionFunction.kt") public void testWrongArgumentPassedToLocalExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt"); } } @@ -11442,38 +10039,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Substitutions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubstitutions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/substitutions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegationAndInference.kt") public void testDelegationAndInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/delegationAndInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/delegationAndInference.kt"); } @TestMetadata("kt6081SubstituteIntoClassCorrectly.kt") public void testKt6081SubstituteIntoClassCorrectly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/kt6081SubstituteIntoClassCorrectly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/kt6081SubstituteIntoClassCorrectly.kt"); } @TestMetadata("simpleSubstitutionCheckTypeArgumentsNotTypeParameters.kt") public void testSimpleSubstitutionCheckTypeArgumentsNotTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/simpleSubstitutionCheckTypeArgumentsNotTypeParameters.kt"); } @TestMetadata("substitutionIntoAnonymousClass.kt") public void testSubstitutionIntoAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoAnonymousClass.kt"); } @TestMetadata("substitutionIntoInnerClass.kt") public void testSubstitutionIntoInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/substitutions/substitutionIntoInnerClass.kt"); } } @@ -11481,50 +10077,47 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UpperBounds extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUpperBounds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/upperBounds"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingSubstitutionsFromUpperBound.kt") public void testConflictingSubstitutionsFromUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/conflictingSubstitutionsFromUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/conflictingSubstitutionsFromUpperBound.kt"); } @TestMetadata("doNotInferFromBoundsOnly.kt") public void testDoNotInferFromBoundsOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt"); } @TestMetadata("intersectUpperBounds.kt") public void testIntersectUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt"); } @TestMetadata("kt2856.kt") public void testKt2856() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/kt2856.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/kt2856.kt"); } @TestMetadata("nonNullUpperBound.kt") public void testNonNullUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/nonNullUpperBound.kt"); } @TestMetadata("useBoundsIfUnknownParameters.kt") public void testUseBoundsIfUnknownParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt"); } @TestMetadata("useBoundsToInferTypeParamsSimple.kt") public void testUseBoundsToInferTypeParamsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt"); } } } @@ -11533,20 +10126,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Infos extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInfos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/infos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropertiesWithBackingFields.kt") public void testPropertiesWithBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/infos/PropertiesWithBackingFields.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/infos/PropertiesWithBackingFields.kt"); } @TestMetadata("SmartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/infos/SmartCasts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/infos/SmartCasts.kt"); } } @@ -11554,310 +10149,269 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/anonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/anonymousObjects.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/assignment.kt"); } @TestMetadata("capture.kt") public void testCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/capture.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/capture.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/constructor.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/default.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/default.kt"); } @TestMetadata("defaultLambdaInlineDisable.kt") public void testDefaultLambdaInlineDisable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineDisable.kt"); } @TestMetadata("defaultLambdaInlineSuspend.kt") public void testDefaultLambdaInlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlineSuspend.kt"); } @TestMetadata("defaultLambdaInlining.kt") public void testDefaultLambdaInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/defaultLambdaInlining.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/defaultLambdaInlining.kt"); } @TestMetadata("extensionOnFunction.kt") public void testExtensionOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/extensionOnFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/extensionOnFunction.kt"); } @TestMetadata("fromInlineToNoInline.kt") public void testFromInlineToNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/fromInlineToNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/fromInlineToNoInline.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/functions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/functions.kt"); } @TestMetadata("inlineLambdaInDefaultInlineParameter.kt") public void testInlineLambdaInDefaultInlineParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameter.kt"); } @TestMetadata("inlineLambdaInDefaultInlineParameterDisabled.kt") public void testInlineLambdaInDefaultInlineParameterDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt"); } @TestMetadata("inlineReified.kt") public void testInlineReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/inlineReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/inlineReified.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/invoke.kt"); } @TestMetadata("isCheck.kt") public void testIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/isCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/isCheck.kt"); } @TestMetadata("kt15410.kt") public void testKt15410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt15410.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/kt15410.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/kt19679.kt"); } @TestMetadata("kt4869.kt") public void testKt4869() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/kt4869.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/kt4869.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/labeled.kt"); } @TestMetadata("lambdaCast.kt") public void testLambdaCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/lambdaCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/lambdaCast.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/localFun.kt"); } @TestMetadata("messagesForUnsupportedInInline.kt") public void testMessagesForUnsupportedInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/messagesForUnsupportedInInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/messagesForUnsupportedInInline.kt"); } @TestMetadata("nonVirtualMembersWithInline.kt") public void testNonVirtualMembersWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonVirtualMembersWithInline.kt"); } @TestMetadata("nothingToInline.kt") public void testNothingToInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nothingToInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nothingToInline.kt"); } @TestMetadata("nullabilityOperations.kt") public void testNullabilityOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nullabilityOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nullabilityOperations.kt"); } @TestMetadata("nullableFunction.kt") public void testNullableFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nullableFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nullableFunction.kt"); } @TestMetadata("overrideWithInline.kt") public void testOverrideWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/overrideWithInline.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/overrideWithInline.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/parenthesized.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/privateClass.kt"); } @TestMetadata("propagation.kt") public void testPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/propagation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/propagation.kt"); } @TestMetadata("protectedDepecation.kt") public void testProtectedDepecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/protectedDepecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/protectedDepecation.kt"); } @TestMetadata("publishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/publishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/publishedApi.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/recursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/recursion.kt"); } @TestMetadata("returns.kt") public void testReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/returns.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/returns.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/sam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/sam.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/stringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/stringTemplate.kt"); } @TestMetadata("unsupportedConstruction.kt") public void testUnsupportedConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unsupportedConstruction.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/vararg.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/when.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/when.kt"); } @TestMetadata("wrongUsage.kt") public void testWrongUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/wrongUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/wrongUsage.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryExpressions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/binaryExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("andOr.kt") public void testAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/andOr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/andOr.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/arrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/arrayAccess.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/assignment.kt"); } @TestMetadata("comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/comparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/comparison.kt"); } @TestMetadata("componentAccess.kt") public void testComponentAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/componentAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/componentAccess.kt"); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/contains.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/contains.kt"); } @TestMetadata("mathOperations.kt") public void testMathOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/mathOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/mathOperations.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/binaryExpressions/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/binaryExpressions/rangeTo.kt"); } } @@ -11865,116 +10419,102 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjects.kt"); } @TestMetadata("anonymousObjectsNested.kt") public void testAnonymousObjectsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjectsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/anonymousObjectsNested.kt"); } @TestMetadata("explicitReturnType.kt") public void testExplicitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/explicitReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/explicitReturnType.kt"); } @TestMetadata("fromOnlyLocal.kt") public void testFromOnlyLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/fromOnlyLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/fromOnlyLocal.kt"); } @TestMetadata("inlineLambda.kt") public void testInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/inlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/inlineLambda.kt"); } @TestMetadata("labeledReturn.kt") public void testLabeledReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/labeledReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/labeledReturn.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaAsNonFunction.kt"); } @TestMetadata("lambdaWithGlobalReturnsInsideOnlyLocalOne.kt") public void testLambdaWithGlobalReturnsInsideOnlyLocalOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaWithGlobalReturnsInsideOnlyLocalOne.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/lambdaWithGlobalReturnsInsideOnlyLocalOne.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/localFun.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineAnnotation.kt") public void testNoInlineAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineAnnotation.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/noInlineLambda.kt"); } @TestMetadata("nonInlinedClass.kt") public void testNonInlinedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nonInlinedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/nonInlinedClass.kt"); } @TestMetadata("onlyLocalReturnLambda.kt") public void testOnlyLocalReturnLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambda.kt"); } @TestMetadata("onlyLocalReturnLambdaBinaryExpr.kt") public void testOnlyLocalReturnLambdaBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambdaBinaryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/onlyLocalReturnLambdaBinaryExpr.kt"); } @TestMetadata("propertyAccessorsAndConstructor.kt") public void testPropertyAccessorsAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/propertyAccessorsAndConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/propertyAccessorsAndConstructor.kt"); } @TestMetadata("toOnlyLocal.kt") public void testToOnlyLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonLocalReturns/toOnlyLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonLocalReturns/toOnlyLocal.kt"); } } @@ -11982,62 +10522,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonPublicMember extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonPublicMember() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/nonPublicMember"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inNonPublicClass.kt") public void testInNonPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicClass.kt"); } @TestMetadata("inNonPublicInnerClass.kt") public void testInNonPublicInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inNonPublicInnerClass.kt"); } @TestMetadata("inPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPackage.kt"); } @TestMetadata("inPublicClass.kt") public void testInPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPublicClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/inPublicClass.kt"); } @TestMetadata("kt14887.kt") public void testKt14887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/kt14887.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass.kt"); } @TestMetadata("localClass2.kt") public void testLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localClass2.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/localFun.kt"); } @TestMetadata("publishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/nonPublicMember/publishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/nonPublicMember/publishedApi.kt"); } } @@ -12045,32 +10580,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/invoke.kt"); } @TestMetadata("propertyWithBackingField.kt") public void testPropertyWithBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/propertyWithBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/propertyWithBackingField.kt"); } @TestMetadata("unsupportedConstruction.kt") public void testUnsupportedConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/unsupportedConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/unsupportedConstruction.kt"); } @TestMetadata("virtualProperty.kt") public void testVirtualProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/property/virtualProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/property/virtualProperty.kt"); } } @@ -12078,14 +10613,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt4341.kt") public void testKt4341() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/regressions/kt4341.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/regressions/kt4341.kt"); } } @@ -12093,26 +10631,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryExpressions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnaryExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inline/unaryExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mathOperation.kt") public void testMathOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions/mathOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unaryExpressions/mathOperation.kt"); } @TestMetadata("notOnCall.kt") public void testNotOnCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOnCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOnCall.kt"); } @TestMetadata("notOperation.kt") public void testNotOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOperation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inline/unaryExpressions/notOperation.kt"); } } } @@ -12121,26 +10660,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicInlineClassDeclaration.kt") public void testBasicInlineClassDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclaration.kt"); } @TestMetadata("basicInlineClassDeclarationDisabled.kt") public void testBasicInlineClassDeclarationDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclarationDisabled.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inlineClasses/basicInlineClassDeclarationDisabled.kt"); } @TestMetadata("inlineClassDeclarationCheck.kt") public void testInlineClassDeclarationCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inlineClasses/inlineClassDeclarationCheck.kt"); } } @@ -12148,16 +10688,18 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingToJavaNestedClass.kt") public void testAccessingToJavaNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/accessingToJavaNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/accessingToJavaNestedClass.kt"); } @TestMetadata("accessingToKotlinNestedClass.kt") public void testAccessingToKotlinNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/accessingToKotlinNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/accessingToKotlinNestedClass.kt"); } public void testAllFilesPresentInInner() throws Exception { @@ -12166,328 +10708,279 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("annotationInInnerClass.kt") public void testAnnotationInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/annotationInInnerClass.kt"); } @TestMetadata("classesInClassObjectHeader.kt") public void testClassesInClassObjectHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/classesInClassObjectHeader.kt"); } @TestMetadata("constructorAccess.kt") public void testConstructorAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/constructorAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/constructorAccess.kt"); } @TestMetadata("deepInnerClass.kt") public void testDeepInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/deepInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/deepInnerClass.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/enumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/enumEntries.kt"); } @TestMetadata("enumInInnerClass.kt") public void testEnumInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/enumInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/enumInInnerClass.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/extensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/extensionFun.kt"); } @TestMetadata("extensionLambdaInsideNestedClass.kt") public void testExtensionLambdaInsideNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/extensionLambdaInsideNestedClass.kt"); } @TestMetadata("illegalModifier.kt") public void testIllegalModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/illegalModifier.kt"); } @TestMetadata("illegalModifier_lv12.kt") public void testIllegalModifier_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/illegalModifier_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/illegalModifier_lv12.kt"); } @TestMetadata("innerClassInEnumEntryClassMemberResolve.kt") public void testInnerClassInEnumEntryClassMemberResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClassMemberResolve.kt"); } @TestMetadata("innerClassInEnumEntryClass_lv11.kt") public void testInnerClassInEnumEntryClass_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv11.kt"); } @TestMetadata("innerClassInEnumEntryClass_lv12.kt") public void testInnerClassInEnumEntryClass_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv12.kt"); } @TestMetadata("innerClassInEnumEntryClass_lv13.kt") public void testInnerClassInEnumEntryClass_lv13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv13.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassInEnumEntryClass_lv13.kt"); } @TestMetadata("InnerClassNameClash.kt") public void testInnerClassNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/InnerClassNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/InnerClassNameClash.kt"); } @TestMetadata("innerClassesInStaticParameters.kt") public void testInnerClassesInStaticParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerClassesInStaticParameters.kt"); } @TestMetadata("innerConstructorsFromQualifiers.kt") public void testInnerConstructorsFromQualifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiers.kt"); } @TestMetadata("innerConstructorsFromQualifiersWithIrrelevantCandidate.kt") public void testInnerConstructorsFromQualifiersWithIrrelevantCandidate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerConstructorsFromQualifiersWithIrrelevantCandidate.kt"); } @TestMetadata("innerErrorForClassObjects.kt") public void testInnerErrorForClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerErrorForClassObjects.kt"); } @TestMetadata("innerErrorForObjects.kt") public void testInnerErrorForObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerErrorForObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerErrorForObjects.kt"); } @TestMetadata("innerThisSuper.kt") public void testInnerThisSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/innerThisSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/innerThisSuper.kt"); } @TestMetadata("interfaceInInnerClass.kt") public void testInterfaceInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/interfaceInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/interfaceInInnerClass.kt"); } @TestMetadata("kt5854.kt") public void testKt5854() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/kt5854.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/kt5854.kt"); } @TestMetadata("kt6026.kt") public void testKt6026() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/kt6026.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/kt6026.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/localClass.kt"); } @TestMetadata("localClassInsideNested.kt") public void testLocalClassInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/localClassInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/localClassInsideNested.kt"); } @TestMetadata("localThisSuper.kt") public void testLocalThisSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/localThisSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/localThisSuper.kt"); } @TestMetadata("modality.kt") public void testModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/modality.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/modality.kt"); } @TestMetadata("nestedClassAccessedViaInstanceReference.kt") public void testNestedClassAccessedViaInstanceReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassAccessedViaInstanceReference.kt"); } @TestMetadata("nestedClassExtendsOuter.kt") public void testNestedClassExtendsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuter.kt"); } @TestMetadata("nestedClassExtendsOuterGeneric.kt") public void testNestedClassExtendsOuterGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuterGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassExtendsOuterGeneric.kt"); } @TestMetadata("nestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassInObject.kt"); } @TestMetadata("nestedClassNotAllowed.kt") public void testNestedClassNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed.kt"); } @TestMetadata("nestedObject.kt") public void testNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedObject.kt"); } @TestMetadata("nestedVsInnerAccessOuterMember.kt") public void testNestedVsInnerAccessOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/nestedVsInnerAccessOuterMember.kt"); } @TestMetadata("outerGenericParam.kt") public void testOuterGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/outerGenericParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/outerGenericParam.kt"); } @TestMetadata("outerProtectedMember.kt") public void testOuterProtectedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/outerProtectedMember.kt"); } @TestMetadata("outerSuperClassMember.kt") public void testOuterSuperClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/outerSuperClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/outerSuperClassMember.kt"); } @TestMetadata("referenceToSelfInLocal.kt") public void testReferenceToSelfInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/referenceToSelfInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/referenceToSelfInLocal.kt"); } @TestMetadata("resolvePackageClassInObjects.kt") public void testResolvePackageClassInObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/resolvePackageClassInObjects.kt"); } @TestMetadata("selfAnnotationForClassObject.kt") public void testSelfAnnotationForClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/selfAnnotationForClassObject.kt"); } @TestMetadata("traits.kt") public void testTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/traits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/traits.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/visibility.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inner/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectOfNestedClass.kt") public void testClassObjectOfNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/classObjectOfNestedClass.kt"); } @TestMetadata("constructNestedClass.kt") public void testConstructNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/constructNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/constructNestedClass.kt"); } @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/dataLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/dataLocalVariable.kt"); } @TestMetadata("enumConstant.kt") public void testEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/enumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/enumConstant.kt"); } @TestMetadata("genericNestedClass.kt") public void testGenericNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt"); } @TestMetadata("importNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/importNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/importNestedClass.kt"); } @TestMetadata("nestedClassInPackage.kt") public void testNestedClassInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedClassInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedClassInPackage.kt"); } @TestMetadata("nestedEnumConstant.kt") public void testNestedEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedEnumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedEnumConstant.kt"); } @TestMetadata("nestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/nestedObjects.kt"); } @TestMetadata("typePosition.kt") public void testTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/inner/qualifiedExpression/typePosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/inner/qualifiedExpression/typePosition.kt"); } } } @@ -12496,10 +10989,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class J_k extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessClassObjectFromJava.kt") public void testAccessClassObjectFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/accessClassObjectFromJava.kt"); } public void testAllFilesPresentInJ_k() throws Exception { @@ -12508,478 +11004,404 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("ambiguousSamAdapters.kt") public void testAmbiguousSamAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/ambiguousSamAdapters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/ambiguousSamAdapters.kt"); } @TestMetadata("annotationWithArgumentsMissingDependencies.kt") public void testAnnotationWithArgumentsMissingDependencies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/annotationWithArgumentsMissingDependencies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/annotationWithArgumentsMissingDependencies.kt"); } @TestMetadata("annotationsInheritance.kt") public void testAnnotationsInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/annotationsInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/annotationsInheritance.kt"); } @TestMetadata("arrayOfStarParametrized.kt") public void testArrayOfStarParametrized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/arrayOfStarParametrized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/arrayOfStarParametrized.kt"); } @TestMetadata("callableReferencesStaticMemberClash.kt") public void testCallableReferencesStaticMemberClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/callableReferencesStaticMemberClash.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/callableReferencesStaticMemberClash.kt"); } @TestMetadata("canDeclareIfSamAdapterIsInherited.kt") public void testCanDeclareIfSamAdapterIsInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/canDeclareIfSamAdapterIsInherited.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/canDeclareIfSamAdapterIsInherited.kt"); } @TestMetadata("collectorInference.kt") public void testCollectorInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectorInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectorInference.kt"); } @TestMetadata("computeIfAbsentConcurrent.kt") public void testComputeIfAbsentConcurrent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/computeIfAbsentConcurrent.kt"); } @TestMetadata("contravariantIterable.kt") public void testContravariantIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/contravariantIterable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/contravariantIterable.kt"); } @TestMetadata("defaultMethods.kt") public void testDefaultMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/defaultMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods.kt"); } @TestMetadata("defaultMethodsIndirectInheritance.kt") public void testDefaultMethodsIndirectInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/defaultMethodsIndirectInheritance.kt"); } @TestMetadata("defaultMethods_warning.kt") public void testDefaultMethods_warning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/defaultMethods_warning.kt"); } @TestMetadata("differentFilename.kt") public void testDifferentFilename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/differentFilename.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/differentFilename.kt"); } @TestMetadata("enumGetOrdinal.kt") public void testEnumGetOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/enumGetOrdinal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/enumGetOrdinal.kt"); } @TestMetadata("exceptionMessage.kt") public void testExceptionMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/exceptionMessage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/exceptionMessage.kt"); } @TestMetadata("fieldOverridesField.kt") public void testFieldOverridesField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/fieldOverridesField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/fieldOverridesField.kt"); } @TestMetadata("fieldOverridesFieldOfDifferentType.kt") public void testFieldOverridesFieldOfDifferentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/fieldOverridesFieldOfDifferentType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/fieldOverridesFieldOfDifferentType.kt"); } @TestMetadata("fieldOverridesNothing.kt") public void testFieldOverridesNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/fieldOverridesNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/fieldOverridesNothing.kt"); } @TestMetadata("finalCollectionSize.kt") public void testFinalCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/finalCollectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/finalCollectionSize.kt"); } @TestMetadata("flexibleNothing.kt") public void testFlexibleNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/flexibleNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/flexibleNothing.kt"); } @TestMetadata("genericConstructorWithMultipleBounds.kt") public void testGenericConstructorWithMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt"); } @TestMetadata("GenericsInSupertypes.kt") public void testGenericsInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.kt"); } @TestMetadata("inheritAbstractSamAdapter.kt") public void testInheritAbstractSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/inheritAbstractSamAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/inheritAbstractSamAdapter.kt"); } @TestMetadata("inheritanceStaticMethodFromInterface.kt") public void testInheritanceStaticMethodFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/inheritanceStaticMethodFromInterface.kt"); } @TestMetadata("InheritedGenericFunction.kt") public void testInheritedGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/InheritedGenericFunction.kt"); } @TestMetadata("InnerClassFromJava.kt") public void testInnerClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/InnerClassFromJava.kt"); } @TestMetadata("innerNestedClassFromJava.kt") public void testInnerNestedClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/innerNestedClassFromJava.kt"); } @TestMetadata("invisiblePackagePrivateInheritedMember.kt") public void testInvisiblePackagePrivateInheritedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/invisiblePackagePrivateInheritedMember.kt"); } @TestMetadata("javaStaticImport.kt") public void testJavaStaticImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/javaStaticImport.kt"); } @TestMetadata("KJKInheritance.kt") public void testKJKInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt"); } @TestMetadata("KJKInheritanceGeneric.kt") public void testKJKInheritanceGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/KJKInheritanceGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/KJKInheritanceGeneric.kt"); } @TestMetadata("kt1402.kt") public void testKt1402() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt1402.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt1402.kt"); } @TestMetadata("kt1431.kt") public void testKt1431() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt1431.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt1431.kt"); } @TestMetadata("kt1730_implementCharSequence.kt") public void testKt1730_implementCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt1730_implementCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt1730_implementCharSequence.kt"); } @TestMetadata("kt2152.kt") public void testKt2152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2152.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2152.kt"); } @TestMetadata("kt2394.kt") public void testKt2394() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2394.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2394.kt"); } @TestMetadata("kt2606.kt") public void testKt2606() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2606.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2606.kt"); } @TestMetadata("kt2619.kt") public void testKt2619() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2619.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2619.kt"); } @TestMetadata("kt2641.kt") public void testKt2641() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2641.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2641.kt"); } @TestMetadata("kt2890.kt") public void testKt2890() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt2890.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt2890.kt"); } @TestMetadata("kt3307.kt") public void testKt3307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt3307.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt3307.kt"); } @TestMetadata("kt3311.kt") public void testKt3311() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt3311.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt3311.kt"); } @TestMetadata("kt6720_abstractProperty.kt") public void testKt6720_abstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt6720_abstractProperty.kt"); } @TestMetadata("kt7523.kt") public void testKt7523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/kt7523.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/kt7523.kt"); } @TestMetadata("matchers.kt") public void testMatchers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/matchers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/matchers.kt"); } @TestMetadata("mutableIterator.kt") public void testMutableIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/mutableIterator.kt"); } @TestMetadata("nullForOptionalOrElse.kt") public void testNullForOptionalOrElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt"); } @TestMetadata("overrideRawType.kt") public void testOverrideRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/overrideRawType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/overrideRawType.kt"); } @TestMetadata("OverrideVararg.kt") public void testOverrideVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/OverrideVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/OverrideVararg.kt"); } @TestMetadata("overrideWithSamAndTypeParameter.kt") public void testOverrideWithSamAndTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/overrideWithSamAndTypeParameter.kt"); } @TestMetadata("packagePrivateClassStaticMember.kt") public void testPackagePrivateClassStaticMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/packagePrivateClassStaticMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/packagePrivateClassStaticMember.kt"); } @TestMetadata("packageVisibility.kt") public void testPackageVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/packageVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/packageVisibility.kt"); } @TestMetadata("privateFieldOverridesNothing.kt") public void testPrivateFieldOverridesNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/privateFieldOverridesNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/privateFieldOverridesNothing.kt"); } @TestMetadata("privateNestedClassStaticMember.kt") public void testPrivateNestedClassStaticMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/privateNestedClassStaticMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/privateNestedClassStaticMember.kt"); } @TestMetadata("protectedStaticSamePackage.kt") public void testProtectedStaticSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/protectedStaticSamePackage.kt"); } @TestMetadata("recursionWithJavaSyntheticProperty.kt") public void testRecursionWithJavaSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursionWithJavaSyntheticProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursionWithJavaSyntheticProperty.kt"); } @TestMetadata("recursiveRawUpperBound.kt") public void testRecursiveRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound.kt"); } @TestMetadata("recursiveRawUpperBound2.kt") public void testRecursiveRawUpperBound2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound2.kt"); } @TestMetadata("recursiveRawUpperBound3.kt") public void testRecursiveRawUpperBound3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/recursiveRawUpperBound3.kt"); } @TestMetadata("samInConstructorWithGenerics.kt") public void testSamInConstructorWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samInConstructorWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samInConstructorWithGenerics.kt"); } @TestMetadata("samWithConsumer.kt") public void testSamWithConsumer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samWithConsumer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samWithConsumer.kt"); } @TestMetadata("selectMoreSpecific.kt") public void testSelectMoreSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/selectMoreSpecific.kt"); } @TestMetadata("serializable.kt") public void testSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/serializable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/serializable.kt"); } @TestMetadata("shadowingPrimitiveStaticField.kt") public void testShadowingPrimitiveStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/shadowingPrimitiveStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/shadowingPrimitiveStaticField.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/Simple.kt"); } @TestMetadata("specialBridges.kt") public void testSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/specialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/specialBridges.kt"); } @TestMetadata("StaticMembersFromSuperclasses.kt") public void testStaticMembersFromSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/StaticMembersFromSuperclasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/StaticMembersFromSuperclasses.kt"); } @TestMetadata("staticMethodInClass.kt") public void testStaticMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/staticMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/staticMethodInClass.kt"); } @TestMetadata("SupertypeArgumentsNullability-NotNull-SpecialTypes.kt") public void testSupertypeArgumentsNullability_NotNull_SpecialTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-SpecialTypes.kt"); } @TestMetadata("SupertypeArgumentsNullability-NotNull-UserTypes.kt") public void testSupertypeArgumentsNullability_NotNull_UserTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-NotNull-UserTypes.kt"); } @TestMetadata("SupertypeArgumentsNullability-SpecialTypes.kt") public void testSupertypeArgumentsNullability_SpecialTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-SpecialTypes.kt"); } @TestMetadata("SupertypeArgumentsNullability-UserTypes.kt") public void testSupertypeArgumentsNullability_UserTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/SupertypeArgumentsNullability-UserTypes.kt"); } @TestMetadata("traitDefaultCall.kt") public void testTraitDefaultCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/traitDefaultCall.kt"); } @TestMetadata("typeAliasWithSamConstructor.kt") public void testTypeAliasWithSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/typeAliasWithSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/typeAliasWithSamConstructor.kt"); } @TestMetadata("UnboxingNulls.kt") public void testUnboxingNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/UnboxingNulls.kt"); } @TestMetadata("wrongVarianceInJava.kt") public void testWrongVarianceInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BrokenCode extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBrokenCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/brokenCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classDuplicates.kt") public void testClassDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode/classDuplicates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/brokenCode/classDuplicates.kt"); } @TestMetadata("fieldDuplicates.kt") public void testFieldDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/brokenCode/fieldDuplicates.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/brokenCode/fieldDuplicates.kt"); } } @@ -12987,116 +11409,102 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionOverrides extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollectionOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/collectionOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("charBuffer.kt") public void testCharBuffer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/charBuffer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/charBuffer.kt"); } @TestMetadata("collectionStringImpl.kt") public void testCollectionStringImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/collectionStringImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/collectionStringImpl.kt"); } @TestMetadata("commonCollections.kt") public void testCommonCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/commonCollections.kt"); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.kt"); } @TestMetadata("containsAll.kt") public void testContainsAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.kt"); } @TestMetadata("containsAndOverload.kt") public void testContainsAndOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.kt"); } @TestMetadata("getCharSequence.kt") public void testGetCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/getCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/getCharSequence.kt"); } @TestMetadata("irrelevantCharAtAbstract.kt") public void testIrrelevantCharAtAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantCharAtAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantCharAtAbstract.kt"); } @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequence.kt"); } @TestMetadata("irrelevantImplCharSequenceKotlin.kt") public void testIrrelevantImplCharSequenceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequenceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplCharSequenceKotlin.kt"); } @TestMetadata("irrelevantImplMutableList.kt") public void testIrrelevantImplMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableList.kt"); } @TestMetadata("irrelevantImplMutableListKotlin.kt") public void testIrrelevantImplMutableListKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableListKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantImplMutableListKotlin.kt"); } @TestMetadata("irrelevantMapGetAbstract.kt") public void testIrrelevantMapGetAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/irrelevantMapGetAbstract.kt"); } @TestMetadata("mapGetOverride.kt") public void testMapGetOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.kt"); } @TestMetadata("overridesBuiltinNoMagic.kt") public void testOverridesBuiltinNoMagic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.kt"); } @TestMetadata("removeAt.kt") public void testRemoveAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.kt"); } @TestMetadata("removeAtInt.kt") public void testRemoveAtInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.kt"); } @TestMetadata("sizeFromKotlinOverriddenInJava.kt") public void testSizeFromKotlinOverriddenInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/collectionOverrides/sizeFromKotlinOverriddenInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/collectionOverrides/sizeFromKotlinOverriddenInJava.kt"); } } @@ -13104,62 +11512,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericConstructor extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/genericConstructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classTypeParameterInferredFromArgument.kt") public void testClassTypeParameterInferredFromArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt"); } @TestMetadata("noClassTypeParameters.kt") public void testNoClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParameters.kt"); } @TestMetadata("noClassTypeParametersInvParameter.kt") public void testNoClassTypeParametersInvParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt"); } @TestMetadata("selfTypes.kt") public void testSelfTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/selfTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/selfTypes.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt"); } @TestMetadata("superCallImpossibleToInfer.kt") public void testSuperCallImpossibleToInfer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt"); } @TestMetadata("withClassTypeParameters.kt") public void testWithClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/genericConstructor/withClassTypeParameters.kt"); } } @@ -13167,26 +11570,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveOverrides extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/primitiveOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt11140.kt") public void testKt11140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/kt11140.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/kt11140.kt"); } @TestMetadata("notNullAnnotated.kt") public void testNotNullAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/notNullAnnotated.kt"); } @TestMetadata("specializedMap.kt") public void testSpecializedMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/primitiveOverrides/specializedMap.kt"); } } @@ -13194,32 +11598,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/interface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/interface.kt"); } @TestMetadata("isName.kt") public void testIsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/isName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/isName.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/val.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/properties/var.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/properties/var.kt"); } } @@ -13227,62 +11631,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enhancedSamConstructor.kt") public void testEnhancedSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt"); } @TestMetadata("fakeOverrideFunctionForStaticSam.kt") public void testFakeOverrideFunctionForStaticSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/fakeOverrideFunctionForStaticSam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/fakeOverrideFunctionForStaticSam.kt"); } @TestMetadata("inheritedStaticSam.kt") public void testInheritedStaticSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/inheritedStaticSam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/inheritedStaticSam.kt"); } @TestMetadata("privateCandidatesWithWrongArguments.kt") public void testPrivateCandidatesWithWrongArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/privateCandidatesWithWrongArguments.kt"); } @TestMetadata("samOnTypeParameter.kt") public void testSamOnTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/samOnTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/samOnTypeParameter.kt"); } @TestMetadata("staticSamFromImportWithStar.kt") public void testStaticSamFromImportWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/staticSamFromImportWithStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/staticSamFromImportWithStar.kt"); } @TestMetadata("staticSamWithExplicitImport.kt") public void testStaticSamWithExplicitImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/staticSamWithExplicitImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/staticSamWithExplicitImport.kt"); } @TestMetadata("typeInferenceOnSamAdapters.kt") public void testTypeInferenceOnSamAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/typeInferenceOnSamAdapters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/typeInferenceOnSamAdapters.kt"); } @TestMetadata("withDefaultMethods.kt") public void testWithDefaultMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/sam/withDefaultMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/sam/withDefaultMethods.kt"); } } @@ -13290,38 +11689,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamByProjectedType extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamByProjectedType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/samByProjectedType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("genericInReturnType.kt") public void testGenericInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt"); } @TestMetadata("genericInValueParameter.kt") public void testGenericInValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInValueParameter.kt"); } @TestMetadata("genericSuperWildcard.kt") public void testGenericSuperWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericSuperWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericSuperWildcard.kt"); } @TestMetadata("noAdapterBecuaseOfRecursiveUpperBound.kt") public void testNoAdapterBecuaseOfRecursiveUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt"); } @TestMetadata("starProjectionComplexUpperBound.kt") public void testStarProjectionComplexUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/samByProjectedType/starProjectionComplexUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/samByProjectedType/starProjectionComplexUpperBound.kt"); } } @@ -13329,98 +11727,87 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultEnum.kt") public void testDefaultEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultEnum.kt"); } @TestMetadata("defaultLongLiteral.kt") public void testDefaultLongLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultLongLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultLongLiteral.kt"); } @TestMetadata("defaultNull.kt") public void testDefaultNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNull.kt"); } @TestMetadata("defaultNullAndParameter.kt") public void testDefaultNullAndParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNullAndParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultNullAndParameter.kt"); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/defaultParameter.kt"); } @TestMetadata("emptyParameterName.kt") public void testEmptyParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/emptyParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/emptyParameterName.kt"); } @TestMetadata("notNullVarargOverride.kt") public void testNotNullVarargOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/notNullVarargOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/notNullVarargOverride.kt"); } @TestMetadata("nullableVarargOverride.kt") public void testNullableVarargOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/nullableVarargOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/nullableVarargOverride.kt"); } @TestMetadata("overridesDefaultValue.kt") public void testOverridesDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesDefaultValue.kt"); } @TestMetadata("overridesParameterName.kt") public void testOverridesParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/overridesParameterName.kt"); } @TestMetadata("reorderedParameterNames.kt") public void testReorderedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/reorderedParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/reorderedParameterNames.kt"); } @TestMetadata("sameParameterName.kt") public void testSameParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/sameParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/sameParameterName.kt"); } @TestMetadata("specialCharsParameterName.kt") public void testSpecialCharsParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/specialCharsParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/specialCharsParameterName.kt"); } @TestMetadata("stableParameterName.kt") public void testStableParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/stableParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/stableParameterName.kt"); } @TestMetadata("staticMethodWithDefaultValue.kt") public void testStaticMethodWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/staticMethodWithDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/signatureAnnotations/staticMethodWithDefaultValue.kt"); } } @@ -13428,20 +11815,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltIns extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hashtableInheritance.kt") public void testHashtableInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/hashtableInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/hashtableInheritance.kt"); } @TestMetadata("securityProvider.kt") public void testSecurityProvider() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/specialBuiltIns/securityProvider.kt"); } } @@ -13449,38 +11838,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/j+k/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/arrayList.kt"); } @TestMetadata("returnCollection.kt") public void testReturnCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/returnCollection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/returnCollection.kt"); } @TestMetadata("shapeMismatchInCovariantPosition.kt") public void testShapeMismatchInCovariantPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPosition.kt"); } @TestMetadata("shapeMismatchInCovariantPositionGeneric.kt") public void testShapeMismatchInCovariantPositionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPositionGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/shapeMismatchInCovariantPositionGeneric.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/j+k/types/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/j+k/types/typeParameter.kt"); } } } @@ -13489,16 +11877,18 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java8Overrides extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractBaseClassMemberNotImplemented.kt") public void testAbstractBaseClassMemberNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/abstractBaseClassMemberNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractBaseClassMemberNotImplemented.kt"); } @TestMetadata("abstractVsAbstract.kt") public void testAbstractVsAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/abstractVsAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/abstractVsAbstract.kt"); } public void testAllFilesPresentInJava8Overrides() throws Exception { @@ -13507,44 +11897,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("defaultVsAbstract.kt") public void testDefaultVsAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/defaultVsAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/defaultVsAbstract.kt"); } @TestMetadata("hidingMethodOfAny.kt") public void testHidingMethodOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/hidingMethodOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/hidingMethodOfAny.kt"); } @TestMetadata("implementingMethodOfAny.kt") public void testImplementingMethodOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/implementingMethodOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/implementingMethodOfAny.kt"); } @TestMetadata("notAMethodOfAny.kt") public void testNotAMethodOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/notAMethodOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/notAMethodOfAny.kt"); } @TestMetadata("overridingMethodOfAnyChain.kt") public void testOverridingMethodOfAnyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyChain.kt"); } @TestMetadata("overridingMethodOfAnyDiamond.kt") public void testOverridingMethodOfAnyDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/overridingMethodOfAnyDiamond.kt"); } @TestMetadata("singleRelevantDefault.kt") public void testSingleRelevantDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/java8Overrides/singleRelevantDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/java8Overrides/singleRelevantDefault.kt"); } } @@ -13552,80 +11935,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("automaticLabelFromInfixOperator.kt") public void testAutomaticLabelFromInfixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/automaticLabelFromInfixOperator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/automaticLabelFromInfixOperator.kt"); } @TestMetadata("kt1703.kt") public void testKt1703() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt1703.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt1703.kt"); } @TestMetadata("kt361.kt") public void testKt361() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt361.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt361.kt"); } @TestMetadata("kt3920.kt") public void testKt3920() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt3920.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt3920.kt"); } @TestMetadata("kt3988.kt") public void testKt3988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt3988.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt3988.kt"); } @TestMetadata("kt4247.kt") public void testKt4247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt4247.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt4247.kt"); } @TestMetadata("kt4586.kt") public void testKt4586() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt4586.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt4586.kt"); } @TestMetadata("kt4603.kt") public void testKt4603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt4603.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt4603.kt"); } @TestMetadata("kt591.kt") public void testKt591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/kt591.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/kt591.kt"); } @TestMetadata("labelReferencesInsideObjectExpressions.kt") public void testLabelReferencesInsideObjectExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/labelReferencesInsideObjectExpressions.kt"); } @TestMetadata("labeledFunctionLiteral.kt") public void testLabeledFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/labeledFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/labeledFunctionLiteral.kt"); } @TestMetadata("labelsMustBeNamed.kt") public void testLabelsMustBeNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/labels/labelsMustBeNamed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/labels/labelsMustBeNamed.kt"); } } @@ -13633,52 +12008,54 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("modifierApplicability.kt") public void testModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability.kt"); } @TestMetadata("modifierApplicability_lv12.kt") public void testModifierApplicability_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/modifierApplicability_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/modifierApplicability_lv12.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/setter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/setter.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/lateinit/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inapplicableLateinitModifier.kt") public void testInapplicableLateinitModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/local/inapplicableLateinitModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/local/inapplicableLateinitModifier.kt"); } @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/local/localLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/local/localLateinit.kt"); } @TestMetadata("uninitialized.kt") public void testUninitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/lateinit/local/uninitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/lateinit/local/uninitialized.kt"); } } } @@ -13687,20 +12064,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/library/Collections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/library/Collections.kt"); } @TestMetadata("kt828.kt") public void testKt828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/library/kt828.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/library/kt828.kt"); } } @@ -13708,20 +12087,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalClasses extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localAnnotationClass.kt") public void testLocalAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/localClasses/localAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/localClasses/localAnnotationClass.kt"); } @TestMetadata("localAnnotationClassError.kt") public void testLocalAnnotationClassError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/localClasses/localAnnotationClassError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/localClasses/localAnnotationClassError.kt"); } } @@ -13729,160 +12110,144 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/annotations.kt"); } @TestMetadata("defaultModifier.kt") public void testDefaultModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/defaultModifier.kt"); } @TestMetadata("IllegalModifiers.kt") public void testIllegalModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/IllegalModifiers.kt"); } @TestMetadata("incompatibleVarianceModifiers.kt") public void testIncompatibleVarianceModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/incompatibleVarianceModifiers.kt"); } @TestMetadata("inlineParameters.kt") public void testInlineParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/inlineParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/inlineParameters.kt"); } @TestMetadata("internalInInterface.kt") public void testInternalInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/internalInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/internalInInterface.kt"); } @TestMetadata("modifierOnParameterInFunctionType.kt") public void testModifierOnParameterInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/modifierOnParameterInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/modifierOnParameterInFunctionType.kt"); } @TestMetadata("NoLocalVisibility.kt") public void testNoLocalVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/NoLocalVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/NoLocalVisibility.kt"); } @TestMetadata("openInInterface.kt") public void testOpenInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/openInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/openInInterface.kt"); } @TestMetadata("primaryConstructorMissingBrackets.kt") public void testPrimaryConstructorMissingBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingBrackets.kt"); } @TestMetadata("primaryConstructorMissingKeyword.kt") public void testPrimaryConstructorMissingKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/primaryConstructorMissingKeyword.kt"); } @TestMetadata("privateInInterface.kt") public void testPrivateInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/privateInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/privateInInterface.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/protected.kt"); } @TestMetadata("redundantTargets.kt") public void testRedundantTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/redundantTargets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/redundantTargets.kt"); } @TestMetadata("repeatedModifiers.kt") public void testRepeatedModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/repeatedModifiers.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/modifiers/const") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Const extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/const"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("applicability.kt") public void testApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/applicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/applicability.kt"); } @TestMetadata("arrayInAnnotationArgumentType.kt") public void testArrayInAnnotationArgumentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt"); } @TestMetadata("constInteraction.kt") public void testConstInteraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/constInteraction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/constInteraction.kt"); } @TestMetadata("fromJava.kt") public void testFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/fromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/fromJava.kt"); } @TestMetadata("fromJavaSubclass.kt") public void testFromJavaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/fromJavaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/fromJavaSubclass.kt"); } @TestMetadata("kt12248.kt") public void testKt12248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/kt12248.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/kt12248.kt"); } @TestMetadata("kt15913.kt") public void testKt15913() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/kt15913.kt"); } @TestMetadata("noDivisionByZeroFeature.kt") public void testNoDivisionByZeroFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/noDivisionByZeroFeature.kt"); } @TestMetadata("types.kt") public void testTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/const/types.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/const/types.kt"); } } @@ -13890,26 +12255,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorInfix extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorInfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/modifiers/operatorInfix"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LocalFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt"); } @TestMetadata("MemberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt"); } } } @@ -13918,130 +12284,119 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multimodule extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultimodule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/internal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/internal.kt"); } @TestMetadata("kt14249.kt") public void testKt14249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/kt14249.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/kt14249.kt"); } @TestMetadata("packagePrivate.kt") public void testPackagePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/packagePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/packagePrivate.kt"); } @TestMetadata("publishedApiInternal.kt") public void testPublishedApiInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/publishedApiInternal.kt"); } @TestMetadata("redundantElseInWhen.kt") public void testRedundantElseInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/redundantElseInWhen.kt"); } @TestMetadata("varargConflict.kt") public void testVarargConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/varargConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/varargConflict.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateClass extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("collectionMethodStub.kt") public void testCollectionMethodStub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/collectionMethodStub.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/collectionMethodStub.kt"); } @TestMetadata("differentGenericArguments.kt") public void testDifferentGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArguments.kt"); } @TestMetadata("differentGenericArgumentsReversed.kt") public void testDifferentGenericArgumentsReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/differentGenericArgumentsReversed.kt"); } @TestMetadata("duplicateClass.kt") public void testDuplicateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateClass.kt"); } @TestMetadata("duplicateNestedClasses.kt") public void testDuplicateNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateNestedClasses.kt"); } @TestMetadata("duplicateSuperClass.kt") public void testDuplicateSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/duplicateSuperClass.kt"); } @TestMetadata("genericArgumentNumberMismatch.kt") public void testGenericArgumentNumberMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericArgumentNumberMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericArgumentNumberMismatch.kt"); } @TestMetadata("genericSuperClass.kt") public void testGenericSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/genericSuperClass.kt"); } @TestMetadata("inTheSameModuleWithUsage.kt") public void testInTheSameModuleWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsage.kt"); } @TestMetadata("inTheSameModuleWithUsageNoTypeAnnotation.kt") public void testInTheSameModuleWithUsageNoTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsageNoTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/inTheSameModuleWithUsageNoTypeAnnotation.kt"); } @TestMetadata("members.kt") public void testMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/members.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/members.kt"); } @TestMetadata("sameClassNameDifferentPackages.kt") public void testSameClassNameDifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt"); } @TestMetadata("sameGenericArguments.kt") public void testSameGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameGenericArguments.kt"); } } @@ -14049,158 +12404,137 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateMethod extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateMethod() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classGenericsInParams.kt") public void testClassGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParams.kt"); } @TestMetadata("classGenericsInParamsBoundMismatch.kt") public void testClassGenericsInParamsBoundMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsBoundMismatch.kt"); } @TestMetadata("classGenericsInParamsIndexMismatch.kt") public void testClassGenericsInParamsIndexMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsIndexMismatch.kt"); } @TestMetadata("classGenericsInParamsNameMismatch.kt") public void testClassGenericsInParamsNameMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInParamsNameMismatch.kt"); } @TestMetadata("classGenericsInReturnType.kt") public void testClassGenericsInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classGenericsInReturnType.kt"); } @TestMetadata("classVsFunctionGenericsInParamsMismatch.kt") public void testClassVsFunctionGenericsInParamsMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt"); } @TestMetadata("covariantReturnTypes.kt") public void testCovariantReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/covariantReturnTypes.kt"); } @TestMetadata("differenceInParamNames.kt") public void testDifferenceInParamNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differenceInParamNames.kt"); } @TestMetadata("differentGenericsInParams.kt") public void testDifferentGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentGenericsInParams.kt"); } @TestMetadata("differentNumberOfParams.kt") public void testDifferentNumberOfParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentNumberOfParams.kt"); } @TestMetadata("differentReturnTypes.kt") public void testDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/differentReturnTypes.kt"); } @TestMetadata("extensionMatch.kt") public void testExtensionMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/extensionMatch.kt"); } @TestMetadata("functionGenericsInParams.kt") public void testFunctionGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParams.kt"); } @TestMetadata("functionGenericsInParamsBoundsMismatch.kt") public void testFunctionGenericsInParamsBoundsMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsBoundsMismatch.kt"); } @TestMetadata("functionGenericsInParamsEqNull.kt") public void testFunctionGenericsInParamsEqNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsEqNull.kt"); } @TestMetadata("functionGenericsInParamsNotIs.kt") public void testFunctionGenericsInParamsNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsNotIs.kt"); } @TestMetadata("functionGenericsInParamsReturnFooT.kt") public void testFunctionGenericsInParamsReturnFooT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnFooT.kt"); } @TestMetadata("functionGenericsInParamsReturnT.kt") public void testFunctionGenericsInParamsReturnT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/functionGenericsInParamsReturnT.kt"); } @TestMetadata("incompleteCodeNoNoneApplicable.kt") public void testIncompleteCodeNoNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/incompleteCodeNoNoneApplicable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/incompleteCodeNoNoneApplicable.kt"); } @TestMetadata("noGenericsInParams.kt") public void testNoGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noGenericsInParams.kt"); } @TestMetadata("noParams.kt") public void testNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/noParams.kt"); } @TestMetadata("sameGenericsInParams.kt") public void testSameGenericsInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sameGenericsInParams.kt"); } @TestMetadata("simpleWithInheritance.kt") public void testSimpleWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/simpleWithInheritance.kt"); } @TestMetadata("sinceKotlin.kt") public void testSinceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sinceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/sinceKotlin.kt"); } @TestMetadata("substitutedGenericInParams.kt") public void testSubstitutedGenericInParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateMethod/substitutedGenericInParams.kt"); } } @@ -14208,32 +12542,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateSuper extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/duplicateSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentSuperTraits.kt") public void testDifferentSuperTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/differentSuperTraits.kt"); } @TestMetadata("sameSuperTrait.kt") public void testSameSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTrait.kt"); } @TestMetadata("sameSuperTraitDifferentBounds.kt") public void testSameSuperTraitDifferentBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitDifferentBounds.kt"); } @TestMetadata("sameSuperTraitGenerics.kt") public void testSameSuperTraitGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/duplicateSuper/sameSuperTraitGenerics.kt"); } } @@ -14241,32 +12575,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HiddenClass extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHiddenClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multimodule/hiddenClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deprecatedHiddenImportPriority.kt") public void testDeprecatedHiddenImportPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenImportPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenImportPriority.kt"); } @TestMetadata("deprecatedHiddenMultipleClasses.kt") public void testDeprecatedHiddenMultipleClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/deprecatedHiddenMultipleClasses.kt"); } @TestMetadata("sinceKotlinImportPriority.kt") public void testSinceKotlinImportPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinImportPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinImportPriority.kt"); } @TestMetadata("sinceKotlinMultipleClasses.kt") public void testSinceKotlinMultipleClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multimodule/hiddenClass/sinceKotlinMultipleClasses.kt"); } } } @@ -14275,106 +12609,99 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("headerFunInNonHeaderClass.kt") public void testHeaderFunInNonHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerFunInNonHeaderClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerFunInNonHeaderClass.kt"); } @TestMetadata("implDelegatedMember.kt") public void testImplDelegatedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/implDelegatedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/implDelegatedMember.kt"); } @TestMetadata("implDynamic.kt") public void testImplDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/implDynamic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/implDynamic.kt"); } @TestMetadata("implFakeOverride.kt") public void testImplFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/implFakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/implFakeOverride.kt"); } @TestMetadata("incompatibles.kt") public void testIncompatibles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/incompatibles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/incompatibles.kt"); } @TestMetadata("modifierApplicability.kt") public void testModifierApplicability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/modifierApplicability.kt"); } @TestMetadata("namedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt"); } @TestMetadata("privateTopLevelDeclarations.kt") public void testPrivateTopLevelDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/privateTopLevelDeclarations.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationArgumentEquality.kt") public void testAnnotationArgumentEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationArgumentEquality.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationArgumentEquality.kt"); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotations.kt"); } @TestMetadata("annotationsViaActualTypeAlias.kt") public void testAnnotationsViaActualTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/annotationsViaActualTypeAlias.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/constructor.kt"); } @TestMetadata("expectedDeclaresDefaultArguments.kt") public void testExpectedDeclaresDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedDeclaresDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedDeclaresDefaultArguments.kt"); } @TestMetadata("expectedInheritsDefaultArguments.kt") public void testExpectedInheritsDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedInheritsDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedInheritsDefaultArguments.kt"); } @TestMetadata("expectedVsNonExpectedWithDefaults.kt") public void testExpectedVsNonExpectedWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedVsNonExpectedWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/defaultArguments/expectedVsNonExpectedWithDefaults.kt"); } } @@ -14382,14 +12709,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deprecated extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/deprecated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("header.kt") public void testHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/deprecated/header.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/deprecated/header.kt"); } } @@ -14397,10 +12727,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("additionalEntriesInImpl.kt") public void testAdditionalEntriesInImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/additionalEntriesInImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/additionalEntriesInImpl.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -14409,26 +12742,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("constructorInHeaderEnum.kt") public void testConstructorInHeaderEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/constructorInHeaderEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/constructorInHeaderEnum.kt"); } @TestMetadata("differentEntryOrder.kt") public void testDifferentEntryOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/differentEntryOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/differentEntryOrder.kt"); } @TestMetadata("enumEntryWithBody.kt") public void testEnumEntryWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/enumEntryWithBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/enumEntryWithBody.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/enum/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/enum/simpleEnum.kt"); } } @@ -14436,32 +12765,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generic extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/generic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionTypeParameterBounds.kt") public void testFunctionTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/functionTypeParameterBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/functionTypeParameterBounds.kt"); } @TestMetadata("genericMemberBounds.kt") public void testGenericMemberBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/genericMemberBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/genericMemberBounds.kt"); } @TestMetadata("membersInGenericClass.kt") public void testMembersInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/membersInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/membersInGenericClass.kt"); } @TestMetadata("typeParameterBoundsDifferentOrderActualMissing.kt") public void testTypeParameterBoundsDifferentOrderActualMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/generic/typeParameterBoundsDifferentOrderActualMissing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/generic/typeParameterBoundsDifferentOrderActualMissing.kt"); } } @@ -14469,22 +12798,23 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HeaderClass extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("actualClassWithDefaultValuesInAnnotationViaTypealias.kt") public void testActualClassWithDefaultValuesInAnnotationViaTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDefaultValuesInAnnotationViaTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDefaultValuesInAnnotationViaTypealias.kt"); } @TestMetadata("actualClassWithDifferentConstructors.kt") public void testActualClassWithDifferentConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDifferentConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualClassWithDifferentConstructors.kt"); } @TestMetadata("actualMissing.kt") public void testActualMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualMissing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/actualMissing.kt"); } public void testAllFilesPresentInHeaderClass() throws Exception { @@ -14493,164 +12823,137 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("classKinds.kt") public void testClassKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/classKinds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/classKinds.kt"); } @TestMetadata("dontOverrideMethodsFromInterfaceInCommonCode.kt") public void testDontOverrideMethodsFromInterfaceInCommonCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/dontOverrideMethodsFromInterfaceInCommonCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/dontOverrideMethodsFromInterfaceInCommonCode.kt"); } @TestMetadata("expectClassWithExplicitAbstractMember.kt") public void testExpectClassWithExplicitAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithExplicitAbstractMember.kt"); } @TestMetadata("expectClassWithoutConstructor.kt") public void testExpectClassWithoutConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithoutConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectClassWithoutConstructor.kt"); } @TestMetadata("expectDeclarationWithStrongIncompatibilities.kt") public void testExpectDeclarationWithStrongIncompatibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithStrongIncompatibilities.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithStrongIncompatibilities.kt"); } @TestMetadata("expectDeclarationWithWeakIncompatibilities.kt") public void testExpectDeclarationWithWeakIncompatibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithWeakIncompatibilities.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectDeclarationWithWeakIncompatibilities.kt"); } @TestMetadata("expectFinalActualOpen.kt") public void testExpectFinalActualOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFinalActualOpen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/expectFinalActualOpen.kt"); } @TestMetadata("explicitConstructorDelegation.kt") public void testExplicitConstructorDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/explicitConstructorDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/explicitConstructorDelegation.kt"); } @TestMetadata("extendExpectedClassWithAbstractMember.kt") public void testExtendExpectedClassWithAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithAbstractMember.kt"); } @TestMetadata("extendExpectedClassWithoutExplicitOverrideOfMethod.kt") public void testExtendExpectedClassWithoutExplicitOverrideOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithoutExplicitOverrideOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/extendExpectedClassWithoutExplicitOverrideOfMethod.kt"); } @TestMetadata("extraHeaderOnMembers.kt") public void testExtraHeaderOnMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/extraHeaderOnMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/extraHeaderOnMembers.kt"); } @TestMetadata("functionAndPropertyWithSameName.kt") public void testFunctionAndPropertyWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/functionAndPropertyWithSameName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/functionAndPropertyWithSameName.kt"); } @TestMetadata("genericClassImplTypeAlias.kt") public void testGenericClassImplTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/genericClassImplTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/genericClassImplTypeAlias.kt"); } @TestMetadata("headerClassMember.kt") public void testHeaderClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassMember.kt"); } @TestMetadata("headerClassWithFunctionBody.kt") public void testHeaderClassWithFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/headerClassWithFunctionBody.kt"); } @TestMetadata("implDataClass.kt") public void testImplDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/implDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/implDataClass.kt"); } @TestMetadata("implOpenClass.kt") public void testImplOpenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/implOpenClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/implOpenClass.kt"); } @TestMetadata("inheritanceByDelegationInExpectClass.kt") public void testInheritanceByDelegationInExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/inheritanceByDelegationInExpectClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/inheritanceByDelegationInExpectClass.kt"); } @TestMetadata("memberPropertyKinds.kt") public void testMemberPropertyKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/memberPropertyKinds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/memberPropertyKinds.kt"); } @TestMetadata("modalityCheckForExplicitAndImplicitOverride.kt") public void testModalityCheckForExplicitAndImplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/modalityCheckForExplicitAndImplicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/modalityCheckForExplicitAndImplicitOverride.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClasses.kt"); } @TestMetadata("nestedClassesWithErrors.kt") public void testNestedClassesWithErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClassesWithErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/nestedClassesWithErrors.kt"); } @TestMetadata("noImplKeywordOnMember.kt") public void testNoImplKeywordOnMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/noImplKeywordOnMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/noImplKeywordOnMember.kt"); } @TestMetadata("privateMembers.kt") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/privateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/privateMembers.kt"); } @TestMetadata("simpleHeaderClass.kt") public void testSimpleHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/simpleHeaderClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/simpleHeaderClass.kt"); } @TestMetadata("smartCastOnExpectClass.kt") public void testSmartCastOnExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/smartCastOnExpectClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/smartCastOnExpectClass.kt"); } @TestMetadata("superClass.kt") public void testSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/headerClass/superClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/headerClass/superClass.kt"); } } @@ -14658,20 +12961,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("flexibleTypes.kt") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/java/flexibleTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/java/flexibleTypes.kt"); } @TestMetadata("parameterNames.kt") public void testParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/java/parameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/java/parameterNames.kt"); } } @@ -14679,86 +12984,77 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelFun extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTopLevelFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callHeaderFun.kt") public void testCallHeaderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callHeaderFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callHeaderFun.kt"); } @TestMetadata("callableReferenceOnExpectFun.kt") public void testCallableReferenceOnExpectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt"); } @TestMetadata("conflictingHeaderDeclarations.kt") public void testConflictingHeaderDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingHeaderDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingHeaderDeclarations.kt"); } @TestMetadata("conflictingImplDeclarations.kt") public void testConflictingImplDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.kt"); } @TestMetadata("functionModifiers.kt") public void testFunctionModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/functionModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/functionModifiers.kt"); } @TestMetadata("headerAndImplInDIfferentPackages.kt") public void testHeaderAndImplInDIfferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerAndImplInDIfferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerAndImplInDIfferentPackages.kt"); } @TestMetadata("headerDeclarationWithBody.kt") public void testHeaderDeclarationWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.kt"); } @TestMetadata("headerWithoutImpl.kt") public void testHeaderWithoutImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerWithoutImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerWithoutImpl.kt"); } @TestMetadata("implDeclarationWithoutBody.kt") public void testImplDeclarationWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implDeclarationWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implDeclarationWithoutBody.kt"); } @TestMetadata("implWithoutHeader.kt") public void testImplWithoutHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implWithoutHeader.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/implWithoutHeader.kt"); } @TestMetadata("inlineFun.kt") public void testInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/inlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/inlineFun.kt"); } @TestMetadata("simpleHeaderFun.kt") public void testSimpleHeaderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/simpleHeaderFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/simpleHeaderFun.kt"); } @TestMetadata("valueParameterModifiers.kt") public void testValueParameterModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/valueParameterModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelFun/valueParameterModifiers.kt"); } } @@ -14766,20 +13062,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelProperty extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTopLevelProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentKindsOfProperties.kt") public void testDifferentKindsOfProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/differentKindsOfProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/differentKindsOfProperties.kt"); } @TestMetadata("simpleHeaderVar.kt") public void testSimpleHeaderVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/simpleHeaderVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/multiplatform/topLevelProperty/simpleHeaderVar.kt"); } } } @@ -14788,86 +13086,77 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NamedArguments extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNamedArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/namedArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allowForJavaAnnotation.kt") public void testAllowForJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/allowForJavaAnnotation.kt"); } @TestMetadata("ambiguousNamedArguments1.kt") public void testAmbiguousNamedArguments1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments1.kt"); } @TestMetadata("ambiguousNamedArguments2.kt") public void testAmbiguousNamedArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArguments2.kt"); } @TestMetadata("ambiguousNamedArgumentsWithGenerics1.kt") public void testAmbiguousNamedArgumentsWithGenerics1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics1.kt"); } @TestMetadata("ambiguousNamedArgumentsWithGenerics2.kt") public void testAmbiguousNamedArgumentsWithGenerics2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics2.kt"); } @TestMetadata("ambiguousNamedArgumentsWithGenerics3.kt") public void testAmbiguousNamedArgumentsWithGenerics3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/ambiguousNamedArgumentsWithGenerics3.kt"); } @TestMetadata("disallowForJavaConstructor.kt") public void testDisallowForJavaConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaConstructor.kt"); } @TestMetadata("disallowForJavaMethods.kt") public void testDisallowForJavaMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaMethods.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaMethods.kt"); } @TestMetadata("disallowForSamAdapterConstructor.kt") public void testDisallowForSamAdapterConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt"); } @TestMetadata("disallowForSamAdapterFunction.kt") public void testDisallowForSamAdapterFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt"); } @TestMetadata("namedArgumentsAndDefaultValues.kt") public void testNamedArgumentsAndDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt"); } @TestMetadata("namedArgumentsInOverloads.kt") public void testNamedArgumentsInOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverloads.kt"); } @TestMetadata("namedArgumentsInOverrides.kt") public void testNamedArgumentsInOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsInOverrides.kt"); } } @@ -14875,230 +13164,197 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityAndSmartCasts extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityAndSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AssertNotNull.kt") public void testAssertNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt"); } @TestMetadata("dataFlowInfoAfterExclExcl.kt") public void testDataFlowInfoAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/dataFlowInfoAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/dataFlowInfoAfterExclExcl.kt"); } @TestMetadata("equalityUnderNotNullCheck.kt") public void testEqualityUnderNotNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/equalityUnderNotNullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/equalityUnderNotNullCheck.kt"); } @TestMetadata("funcLiteralArgsInsideAmbiguity.kt") public void testFuncLiteralArgsInsideAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideAmbiguity.kt"); } @TestMetadata("funcLiteralArgsInsideUnresolvedFunction.kt") public void testFuncLiteralArgsInsideUnresolvedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideUnresolvedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/funcLiteralArgsInsideUnresolvedFunction.kt"); } @TestMetadata("InfixCallNullability.kt") public void testInfixCallNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt"); } @TestMetadata("kt1270.kt") public void testKt1270() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1270.kt"); } @TestMetadata("kt1680.kt") public void testKt1680() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1680.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1680.kt"); } @TestMetadata("kt1778.kt") public void testKt1778() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1778.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt1778.kt"); } @TestMetadata("kt2109.kt") public void testKt2109() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2109.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2109.kt"); } @TestMetadata("kt2125.kt") public void testKt2125() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2125.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2125.kt"); } @TestMetadata("kt2146.kt") public void testKt2146() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2146.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2146.kt"); } @TestMetadata("kt2164.kt") public void testKt2164() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt"); } @TestMetadata("kt2176.kt") public void testKt2176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2176.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2176.kt"); } @TestMetadata("kt2195.kt") public void testKt2195() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2195.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2195.kt"); } @TestMetadata("kt2212.kt") public void testKt2212() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2212.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2212.kt"); } @TestMetadata("kt2216.kt") public void testKt2216() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt"); } @TestMetadata("kt2223.kt") public void testKt2223() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2223.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2223.kt"); } @TestMetadata("kt2234.kt") public void testKt2234() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2234.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2234.kt"); } @TestMetadata("kt2336.kt") public void testKt2336() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2336.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2336.kt"); } @TestMetadata("kt244.kt") public void testKt244() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt244.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt244.kt"); } @TestMetadata("kt362.kt") public void testKt362() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt362.kt"); } @TestMetadata("noSenselessNullOnNullableType.kt") public void testNoSenselessNullOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noSenselessNullOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noSenselessNullOnNullableType.kt"); } @TestMetadata("noUnnecessaryNotNullAssertionOnErrorType.kt") public void testNoUnnecessaryNotNullAssertionOnErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noUnnecessaryNotNullAssertionOnErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/noUnnecessaryNotNullAssertionOnErrorType.kt"); } @TestMetadata("notnullTypesFromJavaWithSmartcast.kt") public void testNotnullTypesFromJavaWithSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/notnullTypesFromJavaWithSmartcast.kt"); } @TestMetadata("NullableNothingIsExactlyNull.kt") public void testNullableNothingIsExactlyNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/NullableNothingIsExactlyNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/NullableNothingIsExactlyNull.kt"); } @TestMetadata("nullableReceiverWithOverloadedMethod.kt") public void testNullableReceiverWithOverloadedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/nullableReceiverWithOverloadedMethod.kt"); } @TestMetadata("PreferExtensionsOnNullableReceiver.kt") public void testPreferExtensionsOnNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/PreferExtensionsOnNullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/PreferExtensionsOnNullableReceiver.kt"); } @TestMetadata("QualifiedExpressionNullability.kt") public void testQualifiedExpressionNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/QualifiedExpressionNullability.kt"); } @TestMetadata("ReceiverNullability.kt") public void testReceiverNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/ReceiverNullability.kt"); } @TestMetadata("SenselessNullInWhen.kt") public void testSenselessNullInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/SenselessNullInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/SenselessNullInWhen.kt"); } @TestMetadata("senslessComparisonWithNullOnTypeParameters.kt") public void testSenslessComparisonWithNullOnTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/senslessComparisonWithNullOnTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/senslessComparisonWithNullOnTypeParameters.kt"); } @TestMetadata("smartCastReceiverWithGenerics.kt") public void testSmartCastReceiverWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastReceiverWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastReceiverWithGenerics.kt"); } @TestMetadata("smartCastsAndBooleanExpressions.kt") public void testSmartCastsAndBooleanExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastsAndBooleanExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/smartCastsAndBooleanExpressions.kt"); } @TestMetadata("unnecessaryNotNullAssertion.kt") public void testUnnecessaryNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt"); } @TestMetadata("unstableSmartcastWhenOpenGetterWithOverloading.kt") public void testUnstableSmartcastWhenOpenGetterWithOverloading() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWhenOpenGetterWithOverloading.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWhenOpenGetterWithOverloading.kt"); } @TestMetadata("unstableSmartcastWithOverloadedExtensions.kt") public void testUnstableSmartcastWithOverloadedExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWithOverloadedExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unstableSmartcastWithOverloadedExtensions.kt"); } } @@ -15106,80 +13362,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableTypes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullableTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/nullableTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("baseWithNullableUpperBound.kt") public void testBaseWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/baseWithNullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/baseWithNullableUpperBound.kt"); } @TestMetadata("elvisOnUnit.kt") public void testElvisOnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/elvisOnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/elvisOnUnit.kt"); } @TestMetadata("nullAssertOnTypeWithNullableUpperBound.kt") public void testNullAssertOnTypeWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt"); } @TestMetadata("nullableArgumentForIn.kt") public void testNullableArgumentForIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentForIn.kt"); } @TestMetadata("nullableArgumentToNonNullParameterPlatform.kt") public void testNullableArgumentToNonNullParameterPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt"); } @TestMetadata("nullableArgumentToNonNullParameterSimple.kt") public void testNullableArgumentToNonNullParameterSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt"); } @TestMetadata("redundantNullable.kt") public void testRedundantNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/redundantNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/redundantNullable.kt"); } @TestMetadata("redundantNullableInSupertype.kt") public void testRedundantNullableInSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/redundantNullableInSupertype.kt"); } @TestMetadata("safeAccessOnUnit.kt") public void testSafeAccessOnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/safeAccessOnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/safeAccessOnUnit.kt"); } @TestMetadata("safeCallOnTypeWithNullableUpperBound.kt") public void testSafeCallOnTypeWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt"); } @TestMetadata("safeCallWithInvoke.kt") public void testSafeCallWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/safeCallWithInvoke.kt"); } @TestMetadata("uselessElvis.kt") public void testUselessElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt"); } } @@ -15187,32 +13435,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Numbers extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNumbers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/numbers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("characterIsNotANumber.kt") public void testCharacterIsNotANumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt"); } @TestMetadata("doublesInSimpleConstraints.kt") public void testDoublesInSimpleConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt"); } @TestMetadata("intValuesOutOfRange.kt") public void testIntValuesOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt"); } @TestMetadata("numbersInSimpleConstraints.kt") public void testNumbersInSimpleConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt"); } } @@ -15220,226 +13468,199 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnInnerObject.kt") public void testInvokeOnInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/invokeOnInnerObject.kt"); } @TestMetadata("kt2240.kt") public void testKt2240() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt2240.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt2240.kt"); } @TestMetadata("kt5527.kt") public void testKt5527() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt5527.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt5527.kt"); } @TestMetadata("localObjectInsideObject.kt") public void testLocalObjectInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/localObjectInsideObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/localObjectInsideObject.kt"); } @TestMetadata("localObjects.kt") public void testLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/localObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/localObjects.kt"); } @TestMetadata("nestedClassInAnonymousObject.kt") public void testNestedClassInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/nestedClassInAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/nestedClassInAnonymousObject.kt"); } @TestMetadata("objectInsideFun.kt") public void testObjectInsideFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/objectInsideFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/objectInsideFun.kt"); } @TestMetadata("objectLiteralExpressionTypeMismatch.kt") public void testObjectLiteralExpressionTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/objectLiteralExpressionTypeMismatch.kt"); } @TestMetadata("Objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/Objects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/Objects.kt"); } @TestMetadata("ObjectsInheritance.kt") public void testObjectsInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/ObjectsInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/ObjectsInheritance.kt"); } @TestMetadata("ObjectsLocal.kt") public void testObjectsLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/ObjectsLocal.kt"); } @TestMetadata("ObjectsNested.kt") public void testObjectsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/ObjectsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/ObjectsNested.kt"); } @TestMetadata("OpenInObject.kt") public void testOpenInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/OpenInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/OpenInObject.kt"); } @TestMetadata("upperBoundViolated.kt") public void testUpperBoundViolated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/upperBoundViolated.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/objects/kt21515") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/objects/kt21515"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationConstructor.kt") public void testAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/annotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/annotationConstructor.kt"); } @TestMetadata("callableReferenceComplexCasesWithImportsOld.kt") public void testCallableReferenceComplexCasesWithImportsOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferenceComplexCasesWithImportsOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferenceComplexCasesWithImportsOld.kt"); } @TestMetadata("callableReferencesComplexCasesWithQualificationOld.kt") public void testCallableReferencesComplexCasesWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesComplexCasesWithQualificationOld.kt"); } @TestMetadata("callableReferencesNew.kt") public void testCallableReferencesNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesNew.kt"); } @TestMetadata("callableReferencesOld.kt") public void testCallableReferencesOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOld.kt"); } @TestMetadata("callableReferencesOldComplexCases.kt") public void testCallableReferencesOldComplexCases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOldComplexCases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesOldComplexCases.kt"); } @TestMetadata("callableReferencesWithQualificationNew.kt") public void testCallableReferencesWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationNew.kt"); } @TestMetadata("callableReferencesWithQualificationOld.kt") public void testCallableReferencesWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/callableReferencesWithQualificationOld.kt"); } @TestMetadata("classifierFromCompanionObjectNew.kt") public void testClassifierFromCompanionObjectNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectNew.kt"); } @TestMetadata("classifierFromCompanionObjectOld.kt") public void testClassifierFromCompanionObjectOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectOld.kt"); } @TestMetadata("classifierFromCompanionObjectWithQualificationNew.kt") public void testClassifierFromCompanionObjectWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationNew.kt"); } @TestMetadata("classifierFromCompanionObjectWithQualificationOld.kt") public void testClassifierFromCompanionObjectWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierFromCompanionObjectWithQualificationOld.kt"); } @TestMetadata("classifierIsVisibleByTwoPaths.kt") public void testClassifierIsVisibleByTwoPaths() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/classifierIsVisibleByTwoPaths.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/classifierIsVisibleByTwoPaths.kt"); } @TestMetadata("inheritedFromDeprecatedNew.kt") public void testInheritedFromDeprecatedNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedNew.kt"); } @TestMetadata("inheritedFromDeprecatedOld.kt") public void testInheritedFromDeprecatedOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedOld.kt"); } @TestMetadata("inheritedFromDeprecatedWithQualificationNew.kt") public void testInheritedFromDeprecatedWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationNew.kt"); } @TestMetadata("inheritedFromDeprecatedWithQualificationOld.kt") public void testInheritedFromDeprecatedWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/inheritedFromDeprecatedWithQualificationOld.kt"); } @TestMetadata("useDeprecatedConstructorNew.kt") public void testUseDeprecatedConstructorNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorNew.kt"); } @TestMetadata("useDeprecatedConstructorOld.kt") public void testUseDeprecatedConstructorOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorOld.kt"); } @TestMetadata("useDeprecatedConstructorWithQualificationNew.kt") public void testUseDeprecatedConstructorWithQualificationNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationNew.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationNew.kt"); } @TestMetadata("useDeprecatedConstructorWithQualificationOld.kt") public void testUseDeprecatedConstructorWithQualificationOld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationOld.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/objects/kt21515/useDeprecatedConstructorWithQualificationOld.kt"); } } } @@ -15448,134 +13669,117 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorRem extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorRem() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorRem"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DeprecatedModAssignOperatorConventions.kt") public void testDeprecatedModAssignOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt"); } @TestMetadata("deprecatedModConvention.kt") public void testDeprecatedModConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/deprecatedModConvention.kt"); } @TestMetadata("DeprecatedModOperatorConventions.kt") public void testDeprecatedModOperatorConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt"); } @TestMetadata("doNotResolveToInapplicableRem.kt") public void testDoNotResolveToInapplicableRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt"); } @TestMetadata("modWithRemAssign.kt") public void testModWithRemAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/modWithRemAssign.kt"); } @TestMetadata("noDeprecatedModConventionWithoutFeature.kt") public void testNoDeprecatedModConventionWithoutFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/noDeprecatedModConventionWithoutFeature.kt"); } @TestMetadata("noOperatorRemFeature.kt") public void testNoOperatorRemFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/noOperatorRemFeature.kt"); } @TestMetadata("noWarningForModFromBuiltinsWhenApi1_0.kt") public void testNoWarningForModFromBuiltinsWhenApi1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt"); } @TestMetadata("numberRemConversions.kt") public void testNumberRemConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/numberRemConversions.kt"); } @TestMetadata("operatorRem.kt") public void testOperatorRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/operatorRem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/operatorRem.kt"); } @TestMetadata("preferRemAsExtentionOverMod.kt") public void testPreferRemAsExtentionOverMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemAsExtentionOverMod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemAsExtentionOverMod.kt"); } @TestMetadata("preferRemAsMemberOverMod.kt") public void testPreferRemAsMemberOverMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemAsMemberOverMod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemAsMemberOverMod.kt"); } @TestMetadata("preferRemFromCompanionObjectOverRem.kt") public void testPreferRemFromCompanionObjectOverRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt"); } @TestMetadata("preferRemOverModInLocalFunctions.kt") public void testPreferRemOverModInLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemOverModInLocalFunctions.kt"); } @TestMetadata("preferRemWithImplicitReceivers.kt") public void testPreferRemWithImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt"); } @TestMetadata("prefereRemAsExtensionOverMemberMod.kt") public void testPrefereRemAsExtensionOverMemberMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/prefereRemAsExtensionOverMemberMod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/prefereRemAsExtensionOverMemberMod.kt"); } @TestMetadata("remAndRemAssignAmbiguity.kt") public void testRemAndRemAssignAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remAndRemAssignAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/remAndRemAssignAmbiguity.kt"); } @TestMetadata("remWithModAndModAssign.kt") public void testRemWithModAndModAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remWithModAndModAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/remWithModAndModAssign.kt"); } @TestMetadata("remWithModAssign.kt") public void testRemWithModAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/remWithModAssign.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/remWithModAssign.kt"); } @TestMetadata("resolveModIfRemIsHidden.kt") public void testResolveModIfRemIsHidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/resolveModIfRemIsHidden.kt"); } @TestMetadata("resolveToModWhenNoOperatorRemFeature.kt") public void testResolveToModWhenNoOperatorRemFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorRem/resolveToModWhenNoOperatorRemFeature.kt"); } } @@ -15583,92 +13787,82 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorsOverloading extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorsOverloading() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/operatorsOverloading"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AssignOperatorAmbiguity.kt") public void testAssignOperatorAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/AssignOperatorAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/AssignOperatorAmbiguity.kt"); } @TestMetadata("AssignmentOperations.kt") public void testAssignmentOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/AssignmentOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/AssignmentOperations.kt"); } @TestMetadata("assignmentOperationsCheckReturnType.kt") public void testAssignmentOperationsCheckReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/assignmentOperationsCheckReturnType.kt"); } @TestMetadata("compareToNullable.kt") public void testCompareToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/compareToNullable.kt"); } @TestMetadata("InconsistentGetSet.kt") public void testInconsistentGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.kt"); } @TestMetadata("IteratorAmbiguity.kt") public void testIteratorAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/IteratorAmbiguity.kt"); } @TestMetadata("kt1028.kt") public void testKt1028() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt1028.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt1028.kt"); } @TestMetadata("kt11300.kt") public void testKt11300() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt11300.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt11300.kt"); } @TestMetadata("kt13330.kt") public void testKt13330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt"); } @TestMetadata("kt13349.kt") public void testKt13349() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt13349.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt13349.kt"); } @TestMetadata("kt3450.kt") public void testKt3450() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/kt3450.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/kt3450.kt"); } @TestMetadata("plusAssignOnArray.kt") public void testPlusAssignOnArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnArray.kt"); } @TestMetadata("plusAssignOnLocal.kt") public void testPlusAssignOnLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnLocal.kt"); } @TestMetadata("plusAssignOnProperty.kt") public void testPlusAssignOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/operatorsOverloading/plusAssignOnProperty.kt"); } } @@ -15676,164 +13870,142 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Overload extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverload() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/overload"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConflictingOlverloadsGenericFunctions.kt") public void testConflictingOlverloadsGenericFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOlverloadsGenericFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOlverloadsGenericFunctions.kt"); } @TestMetadata("ConflictingOverloadsFunsDifferentReturnInClass.kt") public void testConflictingOverloadsFunsDifferentReturnInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.kt"); } @TestMetadata("ConflictingOverloadsFunsDifferentReturnInPackage.kt") public void testConflictingOverloadsFunsDifferentReturnInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.kt"); } @TestMetadata("ConflictingOverloadsIdenticalExtFunsInPackage.kt") public void testConflictingOverloadsIdenticalExtFunsInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.kt"); } @TestMetadata("ConflictingOverloadsIdenticalFunsInClass.kt") public void testConflictingOverloadsIdenticalFunsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt"); } @TestMetadata("ConflictingOverloadsIdenticalFunsTPInClass.kt") public void testConflictingOverloadsIdenticalFunsTPInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsTPInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsTPInClass.kt"); } @TestMetadata("ConflictingOverloadsIdenticalValsInClass.kt") public void testConflictingOverloadsIdenticalValsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalValsInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalValsInClass.kt"); } @TestMetadata("ConflictingOverloadsValsDifferentTypeInClass.kt") public void testConflictingOverloadsValsDifferentTypeInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsValsDifferentTypeInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConflictingOverloadsValsDifferentTypeInClass.kt"); } @TestMetadata("ConstructorVsFunOverload.kt") public void testConstructorVsFunOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ConstructorVsFunOverload.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/defaultParameters.kt"); } @TestMetadata("EmptyArgumentListInLambda.kt") public void testEmptyArgumentListInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt"); } @TestMetadata("ExtFunDifferentReceiver.kt") public void testExtFunDifferentReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/ExtFunDifferentReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/ExtFunDifferentReceiver.kt"); } @TestMetadata("FunNoConflictInDifferentPackages.kt") public void testFunNoConflictInDifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/FunNoConflictInDifferentPackages.kt"); } @TestMetadata("kt10939.kt") public void testKt10939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt10939.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt10939.kt"); } @TestMetadata("kt1998.kt") public void testKt1998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt1998.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt1998.kt"); } @TestMetadata("kt2493.kt") public void testKt2493() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt2493.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt2493.kt"); } @TestMetadata("kt7068.kt") public void testKt7068() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt7068.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt7068.kt"); } @TestMetadata("kt7068_2.kt") public void testKt7068_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt7068_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt7068_2.kt"); } @TestMetadata("kt7440.kt") public void testKt7440() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/kt7440.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt"); } @TestMetadata("LocalFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/LocalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/LocalFunctions.kt"); } @TestMetadata("onlyPrivateOverloadsDiagnostic.kt") public void testOnlyPrivateOverloadsDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/onlyPrivateOverloadsDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/onlyPrivateOverloadsDiagnostic.kt"); } @TestMetadata("OverloadFunRegularAndExt.kt") public void testOverloadFunRegularAndExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/OverloadFunRegularAndExt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/OverloadFunRegularAndExt.kt"); } @TestMetadata("OverloadVarAndFunInClass.kt") public void testOverloadVarAndFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/OverloadVarAndFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/OverloadVarAndFunInClass.kt"); } @TestMetadata("SyntheticAndNotSynthetic.kt") public void testSyntheticAndNotSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/SyntheticAndNotSynthetic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/SyntheticAndNotSynthetic.kt"); } @TestMetadata("TypeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt"); } @TestMetadata("UnsubstitutedJavaGenetics.kt") public void testUnsubstitutedJavaGenetics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/overload/UnsubstitutedJavaGenetics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/overload/UnsubstitutedJavaGenetics.kt"); } } @@ -15841,40 +14013,38 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractFunImplemented.kt") public void testAbstractFunImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractFunImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractFunImplemented.kt"); } @TestMetadata("AbstractFunNotImplemented.kt") public void testAbstractFunNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractFunNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractFunNotImplemented.kt"); } @TestMetadata("AbstractValImplemented.kt") public void testAbstractValImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractValImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractValImplemented.kt"); } @TestMetadata("AbstractValNotImplemented.kt") public void testAbstractValNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractValNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractValNotImplemented.kt"); } @TestMetadata("AbstractVarImplemented.kt") public void testAbstractVarImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractVarImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractVarImplemented.kt"); } @TestMetadata("AbstractVarNotImplemented.kt") public void testAbstractVarNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AbstractVarNotImplemented.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AbstractVarNotImplemented.kt"); } public void testAllFilesPresentInOverride() throws Exception { @@ -15883,370 +14053,314 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("AllPrivateFromSuperTypes.kt") public void testAllPrivateFromSuperTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/AllPrivateFromSuperTypes.kt"); } @TestMetadata("ComplexValRedeclaration.kt") public void testComplexValRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ComplexValRedeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ComplexValRedeclaration.kt"); } @TestMetadata("ConflictingFunctionSignatureFromSuperclass.kt") public void testConflictingFunctionSignatureFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ConflictingFunctionSignatureFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ConflictingFunctionSignatureFromSuperclass.kt"); } @TestMetadata("ConflictingPropertySignatureFromSuperclass.kt") public void testConflictingPropertySignatureFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ConflictingPropertySignatureFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ConflictingPropertySignatureFromSuperclass.kt"); } @TestMetadata("DefaultParameterValueInOverride.kt") public void testDefaultParameterValueInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DefaultParameterValueInOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DefaultParameterValueInOverride.kt"); } @TestMetadata("DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt") public void testDefaultParameterValues_NoErrorsWhenInheritingFromOneTypeTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DefaultParameterValues-NoErrorsWhenInheritingFromOneTypeTwice.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/Delegation.kt"); } @TestMetadata("DelegationFun.kt") public void testDelegationFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DelegationFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DelegationFun.kt"); } @TestMetadata("DelegationVal.kt") public void testDelegationVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DelegationVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DelegationVal.kt"); } @TestMetadata("DelegationVar.kt") public void testDelegationVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DelegationVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DelegationVar.kt"); } @TestMetadata("DuplicateMethod.kt") public void testDuplicateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/DuplicateMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/DuplicateMethod.kt"); } @TestMetadata("EqualityOfIntersectionTypes.kt") public void testEqualityOfIntersectionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/EqualityOfIntersectionTypes.kt"); } @TestMetadata("ExtendFunctionClass.kt") public void testExtendFunctionClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ExtendFunctionClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ExtendFunctionClass.kt"); } @TestMetadata("FakeOverrideAbstractAndNonAbstractFun.kt") public void testFakeOverrideAbstractAndNonAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideAbstractAndNonAbstractFun.kt"); } @TestMetadata("FakeOverrideDifferentDeclarationSignatures.kt") public void testFakeOverrideDifferentDeclarationSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideDifferentDeclarationSignatures.kt"); } @TestMetadata("FakeOverrideModality1.kt") public void testFakeOverrideModality1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideModality1.kt"); } @TestMetadata("FakeOverrideModality2.kt") public void testFakeOverrideModality2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideModality2.kt"); } @TestMetadata("FakeOverrideModality3.kt") public void testFakeOverrideModality3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/FakeOverrideModality3.kt"); } @TestMetadata("Generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/Generics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/Generics.kt"); } @TestMetadata("InvisiblePotentialOverride.kt") public void testInvisiblePotentialOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/InvisiblePotentialOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/InvisiblePotentialOverride.kt"); } @TestMetadata("kt12358.kt") public void testKt12358() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12358.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt12358.kt"); } @TestMetadata("kt12467.kt") public void testKt12467() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12467.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt12467.kt"); } @TestMetadata("kt12482.kt") public void testKt12482() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt12482.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt12482.kt"); } @TestMetadata("kt1862.kt") public void testKt1862() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt1862.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt1862.kt"); } @TestMetadata("kt2052.kt") public void testKt2052() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt2052.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt2052.kt"); } @TestMetadata("kt2491.kt") public void testKt2491() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt2491.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt2491.kt"); } @TestMetadata("kt4763.kt") public void testKt4763() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt4763.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt4763.kt"); } @TestMetadata("kt4763property.kt") public void testKt4763property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt4763property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt4763property.kt"); } @TestMetadata("kt4785.kt") public void testKt4785() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt4785.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt4785.kt"); } @TestMetadata("kt6014.kt") public void testKt6014() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt6014.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt6014.kt"); } @TestMetadata("kt880.kt") public void testKt880() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt880.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt880.kt"); } @TestMetadata("kt8990.kt") public void testKt8990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/kt8990.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/kt8990.kt"); } @TestMetadata("MissingDelegate.kt") public void testMissingDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MissingDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MissingDelegate.kt"); } @TestMetadata("MultipleDefaultParametersInSupertypes.kt") public void testMultipleDefaultParametersInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypes.kt"); } @TestMetadata("MultipleDefaultParametersInSupertypesNoOverride.kt") public void testMultipleDefaultParametersInSupertypesNoOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultParametersInSupertypesNoOverride.kt"); } @TestMetadata("MultipleDefaultsAndNamesInSupertypes.kt") public void testMultipleDefaultsAndNamesInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsAndNamesInSupertypes.kt"); } @TestMetadata("MultipleDefaultsInSupertypesNoExplicitOverride.kt") public void testMultipleDefaultsInSupertypesNoExplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/MultipleDefaultsInSupertypesNoExplicitOverride.kt"); } @TestMetadata("NonGenerics.kt") public void testNonGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/NonGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/NonGenerics.kt"); } @TestMetadata("ObjectDelegationManyImpl.kt") public void testObjectDelegationManyImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ObjectDelegationManyImpl.kt"); } @TestMetadata("overrideMemberFromFinalClass.kt") public void testOverrideMemberFromFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/overrideMemberFromFinalClass.kt"); } @TestMetadata("OverrideWithErrors.kt") public void testOverrideWithErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/OverrideWithErrors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/OverrideWithErrors.kt"); } @TestMetadata("OverridingFinalMember.kt") public void testOverridingFinalMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/OverridingFinalMember.kt"); } @TestMetadata("ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt") public void testParameterDefaultValues_DefaultValueFromOnlyOneSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ParameterDefaultValues-DefaultValueFromOnlyOneSupertype.kt"); } @TestMetadata("ParentInheritsManyImplementations.kt") public void testParentInheritsManyImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ParentInheritsManyImplementations.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/PropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/PropertyInConstructor.kt"); } @TestMetadata("ProtectedAndPrivateFromSupertypes.kt") public void testProtectedAndPrivateFromSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ProtectedAndPrivateFromSupertypes.kt"); } @TestMetadata("SuspiciousCase1.kt") public void testSuspiciousCase1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/SuspiciousCase1.kt"); } @TestMetadata("ToAbstractMembersFromSuper-kt1996.kt") public void testToAbstractMembersFromSuper_kt1996() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/ToAbstractMembersFromSuper-kt1996.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClashesOnInheritance extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClashesOnInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/override/clashesOnInheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("covariantOverrides.kt") public void testCovariantOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/covariantOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/covariantOverrides.kt"); } @TestMetadata("flexibleReturnType.kt") public void testFlexibleReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnType.kt"); } @TestMetadata("flexibleReturnTypeIn.kt") public void testFlexibleReturnTypeIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeIn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeIn.kt"); } @TestMetadata("flexibleReturnTypeList.kt") public void testFlexibleReturnTypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/flexibleReturnTypeList.kt"); } @TestMetadata("genericWithUpperBound.kt") public void testGenericWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/genericWithUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/genericWithUpperBound.kt"); } @TestMetadata("kt13355.kt") public void testKt13355() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355.kt"); } @TestMetadata("kt13355viaJava.kt") public void testKt13355viaJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355viaJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt13355viaJava.kt"); } @TestMetadata("kt9550.kt") public void testKt9550() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt9550.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/kt9550.kt"); } @TestMetadata("returnTypeMismatch.kt") public void testReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/returnTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/returnTypeMismatch.kt"); } @TestMetadata("unrelatedInherited.kt") public void testUnrelatedInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/unrelatedInherited.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/unrelatedInherited.kt"); } @TestMetadata("valTypeMismatch.kt") public void testValTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/valTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/valTypeMismatch.kt"); } @TestMetadata("varTypeMismatch.kt") public void testVarTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/clashesOnInheritance/varTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/clashesOnInheritance/varTypeMismatch.kt"); } } @@ -16254,56 +14368,52 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterNames extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/override/parameterNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeOnOverrideDiagnostic.kt") public void testChangeOnOverrideDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/changeOnOverrideDiagnostic.kt"); } @TestMetadata("differentNamesInSupertypesDiagnostic.kt") public void testDifferentNamesInSupertypesDiagnostic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/differentNamesInSupertypesDiagnostic.kt"); } @TestMetadata("invokeInFunctionClass.kt") public void testInvokeInFunctionClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/invokeInFunctionClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/invokeInFunctionClass.kt"); } @TestMetadata("jjkHierarchy.kt") public void testJjkHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/jjkHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/jjkHierarchy.kt"); } @TestMetadata("kjkHierarchy.kt") public void testKjkHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kjkHierarchy.kt"); } @TestMetadata("kjkWithSeveralSupers.kt") public void testKjkWithSeveralSupers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kjkWithSeveralSupers.kt"); } @TestMetadata("kotlinInheritsBothJavaAndKotlin.kt") public void testKotlinInheritsBothJavaAndKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsBothJavaAndKotlin.kt"); } @TestMetadata("kotlinInheritsJava.kt") public void testKotlinInheritsJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/parameterNames/kotlinInheritsJava.kt"); } } @@ -16311,32 +14421,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/override/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classAndTwoInterfaceBounds.kt") public void testClassAndTwoInterfaceBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/classAndTwoInterfaceBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/classAndTwoInterfaceBounds.kt"); } @TestMetadata("differentSetsOfBounds.kt") public void testDifferentSetsOfBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/differentSetsOfBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/differentSetsOfBounds.kt"); } @TestMetadata("kt9850.kt") public void testKt9850() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/kt9850.kt"); } @TestMetadata("simpleVisitorTwoAccepts.kt") public void testSimpleVisitorTwoAccepts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/override/typeParameters/simpleVisitorTwoAccepts.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/override/typeParameters/simpleVisitorTwoAccepts.kt"); } } } @@ -16345,26 +14455,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParenthesizedTypes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParenthesizedTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/parenthesizedTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationsOnNullableParenthesizedTypes.kt") public void testAnnotationsOnNullableParenthesizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnNullableParenthesizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnNullableParenthesizedTypes.kt"); } @TestMetadata("annotationsOnParenthesizedTypes.kt") public void testAnnotationsOnParenthesizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnParenthesizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/parenthesizedTypes/annotationsOnParenthesizedTypes.kt"); } @TestMetadata("splitModifierList.kt") public void testSplitModifierList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/parenthesizedTypes/splitModifierList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/parenthesizedTypes/splitModifierList.kt"); } } @@ -16372,184 +14483,164 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegateByComplexInheritance.kt") public void testDelegateByComplexInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/delegateByComplexInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/delegateByComplexInheritance.kt"); } @TestMetadata("dereference.kt") public void testDereference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/dereference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/dereference.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/elvis.kt"); } @TestMetadata("explicitFlexibleNoPackage.kt") public void testExplicitFlexibleNoPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleNoPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleNoPackage.kt"); } @TestMetadata("explicitFlexibleWithPackage.kt") public void testExplicitFlexibleWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleWithPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/explicitFlexibleWithPackage.kt"); } @TestMetadata("getParentOfType.kt") public void testGetParentOfType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/getParentOfType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/getParentOfType.kt"); } @TestMetadata("inference.kt") public void testInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/inference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/inference.kt"); } @TestMetadata("intVsIntegerAmbiguity.kt") public void testIntVsIntegerAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/intVsIntegerAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/intVsIntegerAmbiguity.kt"); } @TestMetadata("javaEmptyList.kt") public void testJavaEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/javaEmptyList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/javaEmptyList.kt"); } @TestMetadata("methodTypeParameterDefaultBound.kt") public void testMethodTypeParameterDefaultBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodTypeParameterDefaultBound.kt"); } @TestMetadata("noAnnotationInClassPath.kt") public void testNoAnnotationInClassPath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/noAnnotationInClassPath.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/noAnnotationInClassPath.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullableTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullableTypeArgument.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/override.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/override.kt"); } @TestMetadata("rawOverrides.kt") public void testRawOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt"); } @TestMetadata("rawSamOverrides.kt") public void testRawSamOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/safeCall.kt"); } @TestMetadata("samAdapterInConstructor.kt") public void testSamAdapterInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/samAdapterInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/samAdapterInConstructor.kt"); } @TestMetadata("samConstructor.kt") public void testSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/samConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/samConstructor.kt"); } @TestMetadata("supertypeArgumentsExplicit.kt") public void testSupertypeArgumentsExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/supertypeArgumentsExplicit.kt"); } @TestMetadata("supertypeTypeArguments.kt") public void testSupertypeTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CommonSupertype extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommonSupertype() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/commonSupertype"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("collectionOrNull.kt") public void testCollectionOrNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/collectionOrNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/collectionOrNull.kt"); } @TestMetadata("inferenceWithBound.kt") public void testInferenceWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/inferenceWithBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/inferenceWithBound.kt"); } @TestMetadata("mixedElvis.kt") public void testMixedElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedElvis.kt"); } @TestMetadata("mixedIf.kt") public void testMixedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/mixedIf.kt"); } @TestMetadata("recursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/recursiveGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/recursiveGeneric.kt"); } @TestMetadata("stringOrNull.kt") public void testStringOrNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/stringOrNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/stringOrNull.kt"); } @TestMetadata("typeOfElvis.kt") public void testTypeOfElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/typeOfElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/typeOfElvis.kt"); } @TestMetadata("withNothing.kt") public void testWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt"); } } @@ -16557,56 +14648,52 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericVarianceViolation extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericVarianceViolation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("listSuperType.kt") public void testListSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.kt"); } @TestMetadata("rawTypes.kt") public void testRawTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/rawTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/rawTypes.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/simple.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/smartCast.kt"); } @TestMetadata("strangeVariance.kt") public void testStrangeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/strangeVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/strangeVariance.kt"); } @TestMetadata("userDefinedOut.kt") public void testUserDefinedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/userDefinedOut.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/userDefinedOut.kt"); } @TestMetadata("valueFromJava.kt") public void testValueFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/valueFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/valueFromJava.kt"); } @TestMetadata("wildcards.kt") public void testWildcards() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/wildcards.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/wildcards.kt"); } } @@ -16614,14 +14701,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intersection extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntersection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/intersection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/intersection/map.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/intersection/map.kt"); } } @@ -16629,110 +14719,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodCall extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMethodCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/methodCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("entrySet.kt") public void testEntrySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/entrySet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/entrySet.kt"); } @TestMetadata("genericsAndArrays.kt") public void testGenericsAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/genericsAndArrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/genericsAndArrays.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/int.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/int.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/intArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/intArray.kt"); } @TestMetadata("javaCollectionToKotlin.kt") public void testJavaCollectionToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaCollectionToKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaCollectionToKotlin.kt"); } @TestMetadata("javaToJava.kt") public void testJavaToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToJava.kt"); } @TestMetadata("javaToKotlin.kt") public void testJavaToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/javaToKotlin.kt"); } @TestMetadata("kotlinCollectionToJava.kt") public void testKotlinCollectionToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/kotlinCollectionToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/kotlinCollectionToJava.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/list.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/list.kt"); } @TestMetadata("multipleExactBounds.kt") public void testMultipleExactBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBounds.kt"); } @TestMetadata("multipleExactBoundsNullable.kt") public void testMultipleExactBoundsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.kt"); } @TestMetadata("objectArray.kt") public void testObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/objectArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/objectArray.kt"); } @TestMetadata("overloadingForSubclass.kt") public void testOverloadingForSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/overloadingForSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/overloadingForSubclass.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/sam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/sam.kt"); } @TestMetadata("singleton.kt") public void testSingleton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/string.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/string.kt"); } @TestMetadata("visitor.kt") public void testVisitor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/methodCall/visitor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/methodCall/visitor.kt"); } } @@ -16740,50 +14817,47 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullTypeParameter extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNullTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enhancementFromAnnotation.kt") public void testEnhancementFromAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromAnnotation.kt"); } @TestMetadata("enhancementFromKotlin.kt") public void testEnhancementFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/enhancementFromKotlin.kt"); } @TestMetadata("methodTypeParameter.kt") public void testMethodTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt"); } @TestMetadata("noInheritanceReturnType.kt") public void testNoInheritanceReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceReturnType.kt"); } @TestMetadata("noInheritanceValueParameter.kt") public void testNoInheritanceValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/noInheritanceValueParameter.kt"); } @TestMetadata("onTypeProjection.kt") public void testOnTypeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/onTypeProjection.kt"); } @TestMetadata("substitutionInSuperType.kt") public void testSubstitutionInSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/substitutionInSuperType.kt"); } } @@ -16791,194 +14865,167 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityWarnings extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arithmetic.kt") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/array.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/array.kt"); } @TestMetadata("assignToVar.kt") public void testAssignToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt"); } @TestMetadata("dataFlowInfo.kt") public void testDataFlowInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegatedProperties.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt"); } @TestMetadata("derefenceExtension.kt") public void testDerefenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceExtension.kt"); } @TestMetadata("derefenceMember.kt") public void testDerefenceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/derefenceMember.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/elvis.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/expectedType.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/for.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/for.kt"); } @TestMetadata("functionArguments.kt") public void testFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/functionArguments.kt"); } @TestMetadata("inferenceInConditionals.kt") public void testInferenceInConditionals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/inferenceInConditionals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/inferenceInConditionals.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt"); } @TestMetadata("kt6829.kt") public void testKt6829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/kt6829.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/kt6829.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/multiDeclaration.kt"); } @TestMetadata("noWarningOnDoubleElvis.kt") public void testNoWarningOnDoubleElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/noWarningOnDoubleElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/noWarningOnDoubleElvis.kt"); } @TestMetadata("notNullAfterSafeCall.kt") public void testNotNullAfterSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAfterSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAfterSafeCall.kt"); } @TestMetadata("notNullAssertion.kt") public void testNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertion.kt"); } @TestMetadata("notNullAssertionInCall.kt") public void testNotNullAssertionInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertionInCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullAssertionInCall.kt"); } @TestMetadata("notNullTypeMarkedWithNullableAnnotation.kt") public void testNotNullTypeMarkedWithNullableAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/notNullTypeMarkedWithNullableAnnotation.kt"); } @TestMetadata("passToJava.kt") public void testPassToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/primitiveArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/primitiveArray.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/safeCall.kt"); } @TestMetadata("senselessComparisonEquals.kt") public void testSenselessComparisonEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonEquals.kt"); } @TestMetadata("senselessComparisonIdentityEquals.kt") public void testSenselessComparisonIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonIdentityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/senselessComparisonIdentityEquals.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt"); } @TestMetadata("uselessElvisInCall.kt") public void testUselessElvisInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisInCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisInCall.kt"); } @TestMetadata("uselessElvisRightIsNull.kt") public void testUselessElvisRightIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisRightIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/uselessElvisRightIsNull.kt"); } } @@ -16986,110 +15033,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RawTypes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRawTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/rawTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt"); } @TestMetadata("errorType.kt") public void testErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/errorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/errorType.kt"); } @TestMetadata("genericInnerClass.kt") public void testGenericInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/genericInnerClass.kt"); } @TestMetadata("interClassesRecursion.kt") public void testInterClassesRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/interClassesRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/interClassesRecursion.kt"); } @TestMetadata("nonGenericRawMember.kt") public void testNonGenericRawMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.kt"); } @TestMetadata("nonTrivialErasure.kt") public void testNonTrivialErasure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonTrivialErasure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonTrivialErasure.kt"); } @TestMetadata("rawEnhancment.kt") public void testRawEnhancment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawEnhancment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawEnhancment.kt"); } @TestMetadata("rawSupertype.kt") public void testRawSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertype.kt"); } @TestMetadata("rawSupertypeOverride.kt") public void testRawSupertypeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertypeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawSupertypeOverride.kt"); } @TestMetadata("rawTypeInUpperBound.kt") public void testRawTypeInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt"); } @TestMetadata("rawWithInProjection.kt") public void testRawWithInProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawWithInProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawWithInProjection.kt"); } @TestMetadata("recursiveBound.kt") public void testRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt"); } @TestMetadata("samRaw.kt") public void testSamRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/samRaw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/samRaw.kt"); } @TestMetadata("saveRawCapabilitiesAfterSubtitution.kt") public void testSaveRawCapabilitiesAfterSubtitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/saveRawCapabilitiesAfterSubtitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/saveRawCapabilitiesAfterSubtitution.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/simple.kt"); } @TestMetadata("starProjectionToRaw.kt") public void testStarProjectionToRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt"); } @TestMetadata("typeEnhancement.kt") public void testTypeEnhancement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/typeEnhancement.kt"); } } @@ -17097,32 +15131,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeEnhancement extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeEnhancement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("overriddenExtensions.kt") public void testOverriddenExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/overriddenExtensions.kt"); } @TestMetadata("saveAnnotationAfterSubstitution.kt") public void testSaveAnnotationAfterSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/saveAnnotationAfterSubstitution.kt"); } @TestMetadata("supertypeDifferentParameterNullability.kt") public void testSupertypeDifferentParameterNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentParameterNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentParameterNullability.kt"); } @TestMetadata("supertypeDifferentReturnNullability.kt") public void testSupertypeDifferentReturnNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentReturnNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/platformTypes/typeEnhancement/supertypeDifferentReturnNullability.kt"); } } } @@ -17131,26 +15165,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateInFile extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrivateInFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/privateInFile"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt12429.kt") public void testKt12429() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/privateInFile/kt12429.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/privateInFile/kt12429.kt"); } @TestMetadata("topLevelAnnotationCall.kt") public void testTopLevelAnnotationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/privateInFile/topLevelAnnotationCall.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/privateInFile/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/privateInFile/visibility.kt"); } } @@ -17158,100 +15193,94 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionPropertyMustHaveAccessorsOrBeAbstract.kt") public void testExtensionPropertyMustHaveAccessorsOrBeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/extensionPropertyMustHaveAccessorsOrBeAbstract.kt"); } @TestMetadata("lateinitOnTopLevel.kt") public void testLateinitOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/lateinitOnTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/lateinitOnTopLevel.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InferenceFromGetters extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInferenceFromGetters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/properties/inferenceFromGetters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("blockBodyGetter.kt") public void testBlockBodyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/blockBodyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/blockBodyGetter.kt"); } @TestMetadata("cantBeInferred.kt") public void testCantBeInferred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt"); } @TestMetadata("explicitGetterType.kt") public void testExplicitGetterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/explicitGetterType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/explicitGetterType.kt"); } @TestMetadata("members.kt") public void testMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/members.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/members.kt"); } @TestMetadata("nullAsNothing.kt") public void testNullAsNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt"); } @TestMetadata("overrides.kt") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/overrides.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/overrides.kt"); } @TestMetadata("primaryConstructorParameter.kt") public void testPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/primaryConstructorParameter.kt"); } @TestMetadata("recursiveGetter.kt") public void testRecursiveGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/topLevel.kt"); } @TestMetadata("unsupportedInferenceFromGetters.kt") public void testUnsupportedInferenceFromGetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt"); } @TestMetadata("vars.kt") public void testVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/vars.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/properties/inferenceFromGetters/vars.kt"); } } } @@ -17260,62 +15289,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("calleeExpressionAsCallExpression.kt") public void testCalleeExpressionAsCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt"); } @TestMetadata("GenericClassVsPackage.kt") public void testGenericClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); } @TestMetadata("JavaQualifier.kt") public void testJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/JavaQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/JavaQualifier.kt"); } @TestMetadata("nullCalleeExpression.kt") public void testNullCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt"); } @TestMetadata("PackageVsClass.kt") public void testPackageVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); } @TestMetadata("PackageVsClass2.kt") public void testPackageVsClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); } @TestMetadata("PackageVsRootClass.kt") public void testPackageVsRootClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); } @TestMetadata("TypeWithError.kt") public void testTypeWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/TypeWithError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/TypeWithError.kt"); } @TestMetadata("visibleClassVsQualifiedClass.kt") public void testVisibleClassVsQualifiedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); } } @@ -17323,10 +15347,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reassignment extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterfor.kt") public void testAfterfor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/afterfor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/afterfor.kt"); } public void testAllFilesPresentInReassignment() throws Exception { @@ -17335,50 +15362,42 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("dowhile.kt") public void testDowhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/dowhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/dowhile.kt"); } @TestMetadata("else.kt") public void testElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/else.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/else.kt"); } @TestMetadata("foronly.kt") public void testForonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/foronly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/foronly.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/if.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/if.kt"); } @TestMetadata("ifelse.kt") public void testIfelse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/ifelse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/ifelse.kt"); } @TestMetadata("noifelse.kt") public void testNoifelse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/noifelse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/noifelse.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/when.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/when.kt"); } @TestMetadata("whiletrue.kt") public void testWhiletrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reassignment/whiletrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reassignment/whiletrue.kt"); } } @@ -17386,10 +15405,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Recovery extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("absentLeftHandSide.kt") public void testAbsentLeftHandSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt"); } public void testAllFilesPresentInRecovery() throws Exception { @@ -17398,26 +15420,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("emptyTypeArgs.kt") public void testEmptyTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/emptyTypeArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/emptyTypeArgs.kt"); } @TestMetadata("namelessInJava.kt") public void testNamelessInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/namelessInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/namelessInJava.kt"); } @TestMetadata("namelessMembers.kt") public void testNamelessMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/namelessMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/namelessMembers.kt"); } @TestMetadata("namelessToplevelDeclarations.kt") public void testNamelessToplevelDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/recovery/namelessToplevelDeclarations.kt"); } } @@ -17425,274 +15443,239 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Redeclarations extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassRedeclarationInDifferentFiles.kt") public void testClassRedeclarationInDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/ClassRedeclarationInDifferentFiles.kt"); } @TestMetadata("ConflictingExtensionProperties.kt") public void testConflictingExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/ConflictingExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/ConflictingExtensionProperties.kt"); } @TestMetadata("DuplicateParameterNamesInFunctionType.kt") public void testDuplicateParameterNamesInFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/DuplicateParameterNamesInFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/DuplicateParameterNamesInFunctionType.kt"); } @TestMetadata("EnumName.kt") public void testEnumName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/EnumName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/EnumName.kt"); } @TestMetadata("FunVsCtorInDifferentFiles.kt") public void testFunVsCtorInDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/FunVsCtorInDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/FunVsCtorInDifferentFiles.kt"); } @TestMetadata("interfaceTypeParameters.kt") public void testInterfaceTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/interfaceTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/interfaceTypeParameters.kt"); } @TestMetadata("kt2418.kt") public void testKt2418() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/kt2418.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/kt2418.kt"); } @TestMetadata("kt2438.kt") public void testKt2438() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/kt2438.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/kt2438.kt"); } @TestMetadata("kt470.kt") public void testKt470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/kt470.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/kt470.kt"); } @TestMetadata("MultiFilePackageRedeclaration.kt") public void testMultiFilePackageRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/MultiFilePackageRedeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/MultiFilePackageRedeclaration.kt"); } @TestMetadata("NoRedeclarationForClassesInDefaultObject.kt") public void testNoRedeclarationForClassesInDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForClassesInDefaultObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForClassesInDefaultObject.kt"); } @TestMetadata("NoRedeclarationForEnumEntriesAndDefaultObjectMembers.kt") public void testNoRedeclarationForEnumEntriesAndDefaultObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForEnumEntriesAndDefaultObjectMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/NoRedeclarationForEnumEntriesAndDefaultObjectMembers.kt"); } @TestMetadata("PropertyAndFunInClass.kt") public void testPropertyAndFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/PropertyAndFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/PropertyAndFunInClass.kt"); } @TestMetadata("PropertyAndInnerClass.kt") public void testPropertyAndInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/PropertyAndInnerClass.kt"); } @TestMetadata("RedeclarationInDefaultObject.kt") public void testRedeclarationInDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInDefaultObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInDefaultObject.kt"); } @TestMetadata("RedeclarationInMultiFile.kt") public void testRedeclarationInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationInMultiFile.kt"); } @TestMetadata("RedeclarationMainInFile.kt") public void testRedeclarationMainInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt"); } @TestMetadata("RedeclarationMainInMultiFile.kt") public void testRedeclarationMainInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInMultiFile.kt"); } @TestMetadata("Redeclarations.kt") public void testRedeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/Redeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/Redeclarations.kt"); } @TestMetadata("RedeclarationsInObjects.kt") public void testRedeclarationsInObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclarationsInObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclarationsInObjects.kt"); } @TestMetadata("RedeclaredTypeParameters.kt") public void testRedeclaredTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclaredTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclaredTypeParameters.kt"); } @TestMetadata("RedeclaringPrivateToFile.kt") public void testRedeclaringPrivateToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.kt"); } @TestMetadata("ScriptAndClassConflict.kt") public void testScriptAndClassConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/ScriptAndClassConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/ScriptAndClassConflict.kt"); } @TestMetadata("SingletonAndFunctionSameName.kt") public void testSingletonAndFunctionSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/SingletonAndFunctionSameName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/SingletonAndFunctionSameName.kt"); } @TestMetadata("TopLevelPropertyVsClassifier.kt") public void testTopLevelPropertyVsClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TopLevelPropertyVsClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TopLevelPropertyVsClassifier.kt"); } @TestMetadata("TypeAliasCtorVsFun.kt") public void testTypeAliasCtorVsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasCtorVsFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TypeAliasCtorVsFun.kt"); } @TestMetadata("TypeAliasVsClass.kt") public void testTypeAliasVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsClass.kt"); } @TestMetadata("TypeAliasVsProperty.kt") public void testTypeAliasVsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/TypeAliasVsProperty.kt"); } @TestMetadata("typeParameterWithTwoBounds.kt") public void testTypeParameterWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/typeParameterWithTwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/typeParameterWithTwoBounds.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ShadowedExtension extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShadowedExtension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionFunShadowedByInnerClassConstructor.kt") public void testExtensionFunShadowedByInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByInnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByInnerClassConstructor.kt"); } @TestMetadata("extensionFunShadowedByMemberFun.kt") public void testExtensionFunShadowedByMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberFun.kt"); } @TestMetadata("extensionFunShadowedByMemberPropertyWithInvoke.kt") public void testExtensionFunShadowedByMemberPropertyWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberPropertyWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedByMemberPropertyWithInvoke.kt"); } @TestMetadata("extensionFunShadowedBySynthesizedMemberFun.kt") public void testExtensionFunShadowedBySynthesizedMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedBySynthesizedMemberFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunShadowedBySynthesizedMemberFun.kt"); } @TestMetadata("extensionFunVsMemberExtensionFun.kt") public void testExtensionFunVsMemberExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunVsMemberExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionFunVsMemberExtensionFun.kt"); } @TestMetadata("extensionOnErrorType.kt") public void testExtensionOnErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnErrorType.kt"); } @TestMetadata("extensionOnNullableReceiver.kt") public void testExtensionOnNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnNullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionOnNullableReceiver.kt"); } @TestMetadata("extensionPropertyShadowedByMemberProperty.kt") public void testExtensionPropertyShadowedByMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionPropertyShadowedByMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionPropertyShadowedByMemberProperty.kt"); } @TestMetadata("extensionShadowedByDelegatedMember.kt") public void testExtensionShadowedByDelegatedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionShadowedByDelegatedMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionShadowedByDelegatedMember.kt"); } @TestMetadata("extensionVsNonPublicMember.kt") public void testExtensionVsNonPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionVsNonPublicMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/extensionVsNonPublicMember.kt"); } @TestMetadata("infixExtensionVsNonInfixMember.kt") public void testInfixExtensionVsNonInfixMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/infixExtensionVsNonInfixMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/infixExtensionVsNonInfixMember.kt"); } @TestMetadata("localExtensionShadowedByMember.kt") public void testLocalExtensionShadowedByMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/localExtensionShadowedByMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/localExtensionShadowedByMember.kt"); } @TestMetadata("memberExtensionShadowedByMember.kt") public void testMemberExtensionShadowedByMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/memberExtensionShadowedByMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/memberExtensionShadowedByMember.kt"); } @TestMetadata("operatorExtensionVsNonOperatorMember.kt") public void testOperatorExtensionVsNonOperatorMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/operatorExtensionVsNonOperatorMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/redeclarations/shadowedExtension/operatorExtensionVsNonOperatorMember.kt"); } } } @@ -17701,14 +15684,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noReflectionInClassPath.kt") public void testNoReflectionInClassPath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/reflection/noReflectionInClassPath.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/reflection/noReflectionInClassPath.kt"); } } @@ -17716,874 +15702,739 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguityOnLazyTypeComputation.kt") public void testAmbiguityOnLazyTypeComputation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/AmbiguityOnLazyTypeComputation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/AmbiguityOnLazyTypeComputation.kt"); } @TestMetadata("AssignmentsUnderOperators.kt") public void testAssignmentsUnderOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/AssignmentsUnderOperators.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/AssignmentsUnderOperators.kt"); } @TestMetadata("CoercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/CoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/CoercionToUnit.kt"); } @TestMetadata("correctResultSubstitutorForErrorCandidate.kt") public void testCorrectResultSubstitutorForErrorCandidate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt"); } @TestMetadata("delegationWithReceiver.kt") public void testDelegationWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/delegationWithReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/delegationWithReceiver.kt"); } @TestMetadata("DoubleDefine.kt") public void testDoubleDefine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/DoubleDefine.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/DoubleDefine.kt"); } @TestMetadata("ea40964.kt") public void testEa40964() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea40964.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea40964.kt"); } @TestMetadata("ea43298.kt") public void testEa43298() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea43298.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea43298.kt"); } @TestMetadata("ea53340.kt") public void testEa53340() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea53340.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea53340.kt"); } @TestMetadata("ea65509.kt") public void testEa65509() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea65509.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea65509.kt"); } @TestMetadata("ea66984.kt") public void testEa66984() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea66984.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea66984.kt"); } @TestMetadata("ea69735.kt") public void testEa69735() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea69735.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea69735.kt"); } @TestMetadata("ea72837.kt") public void testEa72837() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea72837.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea72837.kt"); } @TestMetadata("ea76264.kt") public void testEa76264() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ea76264.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ea76264.kt"); } @TestMetadata("ErrorsOnIbjectExpressionsAsParameters.kt") public void testErrorsOnIbjectExpressionsAsParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/ErrorsOnIbjectExpressionsAsParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/ErrorsOnIbjectExpressionsAsParameters.kt"); } @TestMetadata("intchar.kt") public void testIntchar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/intchar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/intchar.kt"); } @TestMetadata("itselfAsUpperBound.kt") public void testItselfAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBound.kt"); } @TestMetadata("itselfAsUpperBoundInClass.kt") public void testItselfAsUpperBoundInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClass.kt"); } @TestMetadata("itselfAsUpperBoundInClassNotNull.kt") public void testItselfAsUpperBoundInClassNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClassNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundInClassNotNull.kt"); } @TestMetadata("itselfAsUpperBoundLocal.kt") public void testItselfAsUpperBoundLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt"); } @TestMetadata("itselfAsUpperBoundMember.kt") public void testItselfAsUpperBoundMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundMember.kt"); } @TestMetadata("itselfAsUpperBoundNotNull.kt") public void testItselfAsUpperBoundNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundNotNull.kt"); } @TestMetadata("Jet11.kt") public void testJet11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet11.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet11.kt"); } @TestMetadata("Jet121.kt") public void testJet121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet121.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet121.kt"); } @TestMetadata("Jet124.kt") public void testJet124() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet124.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet124.kt"); } @TestMetadata("Jet169.kt") public void testJet169() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet169.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet169.kt"); } @TestMetadata("Jet17.kt") public void testJet17() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet17.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet17.kt"); } @TestMetadata("Jet183.kt") public void testJet183() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet183.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet183.kt"); } @TestMetadata("Jet183-1.kt") public void testJet183_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet183-1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet183-1.kt"); } @TestMetadata("Jet53.kt") public void testJet53() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet53.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet53.kt"); } @TestMetadata("Jet67.kt") public void testJet67() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet67.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet67.kt"); } @TestMetadata("Jet68.kt") public void testJet68() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet68.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet68.kt"); } @TestMetadata("Jet69.kt") public void testJet69() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet69.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet69.kt"); } @TestMetadata("Jet72.kt") public void testJet72() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet72.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet72.kt"); } @TestMetadata("Jet81.kt") public void testJet81() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/Jet81.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/Jet81.kt"); } @TestMetadata("kt10243.kt") public void testKt10243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10243.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10243.kt"); } @TestMetadata("kt10243a.kt") public void testKt10243a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10243a.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10243a.kt"); } @TestMetadata("kt10633.kt") public void testKt10633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10633.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10633.kt"); } @TestMetadata("kt10824.kt") public void testKt10824() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10824.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10824.kt"); } @TestMetadata("kt10843.kt") public void testKt10843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10843.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt10843.kt"); } @TestMetadata("kt127.kt") public void testKt127() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt127.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt127.kt"); } @TestMetadata("kt128.kt") public void testKt128() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt128.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt128.kt"); } @TestMetadata("kt13685.kt") public void testKt13685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt13685.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt13685.kt"); } @TestMetadata("kt13954.kt") public void testKt13954() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt13954.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt13954.kt"); } @TestMetadata("kt14740.kt") public void testKt14740() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt14740.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt14740.kt"); } @TestMetadata("kt1489_1728.kt") public void testKt1489_1728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt"); } @TestMetadata("kt1550.kt") public void testKt1550() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1550.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1550.kt"); } @TestMetadata("kt16086.kt") public void testKt16086() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt16086.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt16086.kt"); } @TestMetadata("kt16086_2.kt") public void testKt16086_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt16086_2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt16086_2.kt"); } @TestMetadata("kt1639-JFrame.kt") public void testKt1639_JFrame() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1639-JFrame.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1639-JFrame.kt"); } @TestMetadata("kt1647.kt") public void testKt1647() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1647.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1647.kt"); } @TestMetadata("kt1736.kt") public void testKt1736() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt1736.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt1736.kt"); } @TestMetadata("kt174.kt") public void testKt174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt174.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt174.kt"); } @TestMetadata("kt201.kt") public void testKt201() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt201.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt201.kt"); } @TestMetadata("kt235.kt") public void testKt235() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt235.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt235.kt"); } @TestMetadata("kt2376.kt") public void testKt2376() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt2376.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt2376.kt"); } @TestMetadata("kt251.kt") public void testKt251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt251.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt251.kt"); } @TestMetadata("kt258.kt") public void testKt258() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt258.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt258.kt"); } @TestMetadata("kt26.kt") public void testKt26() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt26.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt26.kt"); } @TestMetadata("kt26-1.kt") public void testKt26_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt26-1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt26-1.kt"); } @TestMetadata("kt2768.kt") public void testKt2768() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt2768.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt2768.kt"); } @TestMetadata("kt282.kt") public void testKt282() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt282.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt282.kt"); } @TestMetadata("kt287.kt") public void testKt287() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt287.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt287.kt"); } @TestMetadata("kt2956.kt") public void testKt2956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt2956.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt2956.kt"); } @TestMetadata("kt302.kt") public void testKt302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt302.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt302.kt"); } @TestMetadata("kt306.kt") public void testKt306() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt306.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt306.kt"); } @TestMetadata("kt307.kt") public void testKt307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt307.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt307.kt"); } @TestMetadata("kt312.kt") public void testKt312() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt312.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt312.kt"); } @TestMetadata("kt313.kt") public void testKt313() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt313.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt313.kt"); } @TestMetadata("kt316.kt") public void testKt316() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt316.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt316.kt"); } @TestMetadata("kt328.kt") public void testKt328() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt328.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt328.kt"); } @TestMetadata("kt334.kt") public void testKt334() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt334.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt334.kt"); } @TestMetadata("kt335.336.kt") public void testKt335_336() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt335.336.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt335.336.kt"); } @TestMetadata("kt337.kt") public void testKt337() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt337.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt337.kt"); } @TestMetadata("kt352.kt") public void testKt352() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt352.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt352.kt"); } @TestMetadata("kt353.kt") public void testKt353() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt353.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt353.kt"); } @TestMetadata("kt3535.kt") public void testKt3535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3535.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3535.kt"); } @TestMetadata("kt3647.kt") public void testKt3647() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3647.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3647.kt"); } @TestMetadata("kt3731.kt") public void testKt3731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3731.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3731.kt"); } @TestMetadata("kt3810.kt") public void testKt3810() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt3810.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt3810.kt"); } @TestMetadata("kt385.109.441.kt") public void testKt385_109_441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt385.109.441.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt385.109.441.kt"); } @TestMetadata("kt394.kt") public void testKt394() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt394.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt394.kt"); } @TestMetadata("kt398.kt") public void testKt398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt398.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt398.kt"); } @TestMetadata("kt399.kt") public void testKt399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt399.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt399.kt"); } @TestMetadata("kt402.kt") public void testKt402() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt402.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt402.kt"); } @TestMetadata("kt41.kt") public void testKt41() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt41.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt41.kt"); } @TestMetadata("kt411.kt") public void testKt411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt411.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt411.kt"); } @TestMetadata("kt439.kt") public void testKt439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt439.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt439.kt"); } @TestMetadata("kt442.kt") public void testKt442() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt442.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt442.kt"); } @TestMetadata("kt443.kt") public void testKt443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt443.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt443.kt"); } @TestMetadata("kt455.kt") public void testKt455() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt455.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt455.kt"); } @TestMetadata("kt456.kt") public void testKt456() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt456.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt456.kt"); } @TestMetadata("kt459.kt") public void testKt459() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt459.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt459.kt"); } @TestMetadata("kt469.kt") public void testKt469() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt469.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt469.kt"); } @TestMetadata("kt4693.kt") public void testKt4693() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt4693.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt4693.kt"); } @TestMetadata("kt4827.kt") public void testKt4827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt4827.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt4827.kt"); } @TestMetadata("kt498.kt") public void testKt498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt498.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt498.kt"); } @TestMetadata("kt524.kt") public void testKt524() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt524.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt524.kt"); } @TestMetadata("kt526UnresolvedReferenceInnerStatic.kt") public void testKt526UnresolvedReferenceInnerStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt526UnresolvedReferenceInnerStatic.kt"); } @TestMetadata("kt5326.kt") public void testKt5326() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt5326.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt5326.kt"); } @TestMetadata("kt5362.kt") public void testKt5362() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt5362.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt5362.kt"); } @TestMetadata("kt549.kt") public void testKt549() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt549.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt549.kt"); } @TestMetadata("kt557.kt") public void testKt557() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt557.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt557.kt"); } @TestMetadata("kt571.kt") public void testKt571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt571.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt571.kt"); } @TestMetadata("kt575.kt") public void testKt575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt575.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt575.kt"); } @TestMetadata("kt58.kt") public void testKt58() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt58.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt58.kt"); } @TestMetadata("kt580.kt") public void testKt580() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt580.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt580.kt"); } @TestMetadata("kt588.kt") public void testKt588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt588.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt588.kt"); } @TestMetadata("kt597.kt") public void testKt597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt597.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt597.kt"); } @TestMetadata("kt600.kt") public void testKt600() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt600.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt600.kt"); } @TestMetadata("kt604.kt") public void testKt604() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt604.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt604.kt"); } @TestMetadata("kt618.kt") public void testKt618() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt618.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt618.kt"); } @TestMetadata("kt629.kt") public void testKt629() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt629.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt629.kt"); } @TestMetadata("kt630.kt") public void testKt630() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt630.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt630.kt"); } @TestMetadata("kt6508.kt") public void testKt6508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt6508.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt6508.kt"); } @TestMetadata("kt688.kt") public void testKt688() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt688.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt688.kt"); } @TestMetadata("kt691.kt") public void testKt691() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt691.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt691.kt"); } @TestMetadata("kt701.kt") public void testKt701() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt701.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt701.kt"); } @TestMetadata("kt716.kt") public void testKt716() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt716.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt716.kt"); } @TestMetadata("kt743.kt") public void testKt743() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt743.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt743.kt"); } @TestMetadata("kt750.kt") public void testKt750() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt750.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt750.kt"); } @TestMetadata("kt762.kt") public void testKt762() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt762.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt762.kt"); } @TestMetadata("kt7804.kt") public void testKt7804() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7804.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7804.kt"); } @TestMetadata("kt847.kt") public void testKt847() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt847.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt847.kt"); } @TestMetadata("kt860.kt") public void testKt860() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt860.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt860.kt"); } @TestMetadata("kt9620.kt") public void testKt9620() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9620.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9620.kt"); } @TestMetadata("kt9633.kt") public void testKt9633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9633.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9633.kt"); } @TestMetadata("kt9682.kt") public void testKt9682() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9682.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9682.kt"); } @TestMetadata("kt9808.kt") public void testKt9808() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt9808.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt9808.kt"); } @TestMetadata("noThis.kt") public void testNoThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/noThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/noThis.kt"); } @TestMetadata("OrphanStarProjection.kt") public void testOrphanStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/OrphanStarProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/OrphanStarProjection.kt"); } @TestMetadata("OutProjections.kt") public void testOutProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/OutProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/OutProjections.kt"); } @TestMetadata("OverrideResolution.kt") public void testOverrideResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/OverrideResolution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/OverrideResolution.kt"); } @TestMetadata("propertyWithExtensionTypeInvoke.kt") public void testPropertyWithExtensionTypeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/propertyWithExtensionTypeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/propertyWithExtensionTypeInvoke.kt"); } @TestMetadata("resolveSubclassOfList.kt") public void testResolveSubclassOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/resolveSubclassOfList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/resolveSubclassOfList.kt"); } @TestMetadata("SpecififcityByReceiver.kt") public void testSpecififcityByReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt"); } @TestMetadata("TypeMismatchOnUnaryOperations.kt") public void testTypeMismatchOnUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt"); } @TestMetadata("TypeParameterAsASupertype.kt") public void testTypeParameterAsASupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/TypeParameterAsASupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/TypeParameterAsASupertype.kt"); } @TestMetadata("UnavaliableQualifiedThis.kt") public void testUnavaliableQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/UnavaliableQualifiedThis.kt"); } @TestMetadata("WrongTraceInCallResolver.kt") public void testWrongTraceInCallResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/WrongTraceInCallResolver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/WrongTraceInCallResolver.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/regressions/kt7585") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt7585 extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt7585() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/regressions/kt7585"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7585/base.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7585/base.kt"); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7585/java.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7585/java.kt"); } @TestMetadata("twoparents.kt") public void testTwoparents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt7585/twoparents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/regressions/kt7585/twoparents.kt"); } } } @@ -18592,298 +16443,259 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguityOnPropertiesWithTheSamePackageName.kt") public void testAmbiguityOnPropertiesWithTheSamePackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/ambiguityOnPropertiesWithTheSamePackageName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/ambiguityOnPropertiesWithTheSamePackageName.kt"); } @TestMetadata("ambiguityWithTwoCorrespondingFunctionTypes.kt") public void testAmbiguityWithTwoCorrespondingFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/ambiguityWithTwoCorrespondingFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/ambiguityWithTwoCorrespondingFunctionTypes.kt"); } @TestMetadata("anonymousObjectFromTopLevelMember.kt") public void testAnonymousObjectFromTopLevelMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/anonymousObjectFromTopLevelMember.kt"); } @TestMetadata("capturedTypesInLambdaParameter.kt") public void testCapturedTypesInLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/capturedTypesInLambdaParameter.kt"); } @TestMetadata("constructorVsCompanion.kt") public void testConstructorVsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/constructorVsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/constructorVsCompanion.kt"); } @TestMetadata("CycleInTypeArgs.kt") public void testCycleInTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/CycleInTypeArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/CycleInTypeArgs.kt"); } @TestMetadata("HiddenDeclarations.kt") public void testHiddenDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt"); } @TestMetadata("implicitReceiverProperty.kt") public void testImplicitReceiverProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/implicitReceiverProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/implicitReceiverProperty.kt"); } @TestMetadata("incompleteConstructorInvocation.kt") public void testIncompleteConstructorInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/incompleteConstructorInvocation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/incompleteConstructorInvocation.kt"); } @TestMetadata("inferenceInLinkedLambdas.kt") public void testInferenceInLinkedLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdas.kt"); } @TestMetadata("inferenceInLinkedLambdasDependentOnExpectedType.kt") public void testInferenceInLinkedLambdasDependentOnExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdasDependentOnExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/inferenceInLinkedLambdasDependentOnExpectedType.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/localObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/localObject.kt"); } @TestMetadata("objectLiteralAsArgument.kt") public void testObjectLiteralAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/objectLiteralAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/objectLiteralAsArgument.kt"); } @TestMetadata("parameterAsDefaultValueInLocalFunction.kt") public void testParameterAsDefaultValueInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/parameterAsDefaultValueInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/parameterAsDefaultValueInLocalFunction.kt"); } @TestMetadata("resolveAnnotatedLambdaArgument.kt") public void testResolveAnnotatedLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveAnnotatedLambdaArgument.kt"); } @TestMetadata("resolveTypeArgsForUnresolvedCall.kt") public void testResolveTypeArgsForUnresolvedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveTypeArgsForUnresolvedCall.kt"); } @TestMetadata("resolveWithFunctionLiteralWithId.kt") public void testResolveWithFunctionLiteralWithId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralWithId.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralWithId.kt"); } @TestMetadata("resolveWithFunctionLiterals.kt") public void testResolveWithFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiterals.kt"); } @TestMetadata("resolveWithFunctionLiteralsOverload.kt") public void testResolveWithFunctionLiteralsOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralsOverload.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithFunctionLiteralsOverload.kt"); } @TestMetadata("resolveWithGenerics.kt") public void testResolveWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithGenerics.kt"); } @TestMetadata("resolveWithRedeclarationError.kt") public void testResolveWithRedeclarationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.kt"); } @TestMetadata("resolveWithSpecifiedFunctionLiteralWithId.kt") public void testResolveWithSpecifiedFunctionLiteralWithId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt"); } @TestMetadata("resolveWithoutGenerics.kt") public void testResolveWithoutGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/resolveWithoutGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/resolveWithoutGenerics.kt"); } @TestMetadata("typeParameterInDefaultValueInLocalFunction.kt") public void testTypeParameterInDefaultValueInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/typeParameterInDefaultValueInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/typeParameterInDefaultValueInLocalFunction.kt"); } @TestMetadata("wrongNumberOfTypeArguments.kt") public void testWrongNumberOfTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt"); } @TestMetadata("wrongReceiver.kt") public void testWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DslMarker extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDslMarker() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/dslMarker"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedTypeArgument.kt") public void testAnnotatedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/annotatedTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/annotatedTypeArgument.kt"); } @TestMetadata("dslMarkerOnTypealias.kt") public void testDslMarkerOnTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerOnTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerOnTypealias.kt"); } @TestMetadata("dslMarkerWithTypealiasRecursion.kt") public void testDslMarkerWithTypealiasRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt"); } @TestMetadata("inheritedMarker.kt") public void testInheritedMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/inheritedMarker.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/inheritedMarker.kt"); } @TestMetadata("insideTopLevelExtension.kt") public void testInsideTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtension.kt"); } @TestMetadata("insideTopLevelExtensionAnnotatedType.kt") public void testInsideTopLevelExtensionAnnotatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtensionAnnotatedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/insideTopLevelExtensionAnnotatedType.kt"); } @TestMetadata("markersIntersection.kt") public void testMarkersIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt"); } @TestMetadata("nestedWithSameReceiver.kt") public void testNestedWithSameReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/nestedWithSameReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/nestedWithSameReceiver.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/properties.kt"); } @TestMetadata("simpleAnnotatedClasses.kt") public void testSimpleAnnotatedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedClasses.kt"); } @TestMetadata("simpleAnnotatedTypes.kt") public void testSimpleAnnotatedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/simpleAnnotatedTypes.kt"); } @TestMetadata("substitutedReceiverAnnotatedClasses.kt") public void testSubstitutedReceiverAnnotatedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedClasses.kt"); } @TestMetadata("substitutedReceiverAnnotatedType.kt") public void testSubstitutedReceiverAnnotatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt"); } @TestMetadata("threeImplicitReceivers.kt") public void testThreeImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt"); } @TestMetadata("threeImplicitReceivers2.kt") public void testThreeImplicitReceivers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt"); } @TestMetadata("twoImplicitReceivers.kt") public void testTwoImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/twoImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/twoImplicitReceivers.kt"); } @TestMetadata("twoLanguages.kt") public void testTwoLanguages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/twoLanguages.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/twoLanguages.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/unsupportedFeature.kt"); } @TestMetadata("useOfExtensions.kt") public void testUseOfExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/useOfExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/useOfExtensions.kt"); } @TestMetadata("usingWith.kt") public void testUsingWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWith.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWith.kt"); } @TestMetadata("usingWithThis.kt") public void testUsingWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWithThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/dslMarker/usingWithThis.kt"); } } @@ -18891,184 +16703,164 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionValueAsNonExtension.kt") public void testExtensionValueAsNonExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt"); } @TestMetadata("functionExpectedWhenSeveralInvokesExist.kt") public void testFunctionExpectedWhenSeveralInvokesExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt"); } @TestMetadata("implicitInvoke.kt") public void testImplicitInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/implicitInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/implicitInvoke.kt"); } @TestMetadata("invokeAndSmartCast.kt") public void testInvokeAndSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt"); } @TestMetadata("invokeAsExtension.kt") public void testInvokeAsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsExtension.kt"); } @TestMetadata("invokeAsMember.kt") public void testInvokeAsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMember.kt"); } @TestMetadata("invokeAsMemberExtension.kt") public void testInvokeAsMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtension.kt"); } @TestMetadata("invokeAsMemberExtensionToExplicitReceiver.kt") public void testInvokeAsMemberExtensionToExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeAsMemberExtensionToExplicitReceiver.kt"); } @TestMetadata("invokeNonExtensionLambdaInContext.kt") public void testInvokeNonExtensionLambdaInContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeNonExtensionLambdaInContext.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeNonExtensionLambdaInContext.kt"); } @TestMetadata("invokeOnVariableWithExtensionFunctionType.kt") public void testInvokeOnVariableWithExtensionFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt"); } @TestMetadata("KT-4372.kt") public void testKT_4372() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/KT-4372.kt"); } @TestMetadata("kt3772.kt") public void testKt3772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt3772.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt3772.kt"); } @TestMetadata("kt3833-invokeInsideNestedClass.kt") public void testKt3833_invokeInsideNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt3833-invokeInsideNestedClass.kt"); } @TestMetadata("kt4204-completeNestedCallsForInvoke.kt") public void testKt4204_completeNestedCallsForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt4204-completeNestedCallsForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4204-completeNestedCallsForInvoke.kt"); } @TestMetadata("kt4321InvokeOnEnum.kt") public void testKt4321InvokeOnEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt4321InvokeOnEnum.kt"); } @TestMetadata("kt9517.kt") public void testKt9517() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt9517.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt9517.kt"); } @TestMetadata("kt9805.kt") public void testKt9805() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/kt9805.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/kt9805.kt"); } @TestMetadata("reportFunctionExpectedWhenOneInvokeExist.kt") public void testReportFunctionExpectedWhenOneInvokeExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt"); } @TestMetadata("valNamedInvoke.kt") public void testValNamedInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/valNamedInvoke.kt"); } @TestMetadata("wrongInvokeExtension.kt") public void testWrongInvokeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/wrongInvokeExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/wrongInvokeExtension.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Errors extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErrors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/invoke/errors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguityForInvoke.kt") public void testAmbiguityForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/ambiguityForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/ambiguityForInvoke.kt"); } @TestMetadata("invisibleInvoke.kt") public void testInvisibleInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/invisibleInvoke.kt"); } @TestMetadata("receiverPresenceErrorForInvoke.kt") public void testReceiverPresenceErrorForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/receiverPresenceErrorForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/receiverPresenceErrorForInvoke.kt"); } @TestMetadata("typeInferenceErrorForInvoke.kt") public void testTypeInferenceErrorForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt"); } @TestMetadata("unresolvedInvoke.kt") public void testUnresolvedInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/unresolvedInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/unresolvedInvoke.kt"); } @TestMetadata("unsafeCallWithInvoke.kt") public void testUnsafeCallWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/unsafeCallWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/unsafeCallWithInvoke.kt"); } @TestMetadata("wrongReceiverForInvokeOnExpression.kt") public void testWrongReceiverForInvokeOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverForInvokeOnExpression.kt"); } @TestMetadata("wrongReceiverTypeForInvoke.kt") public void testWrongReceiverTypeForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt"); } } } @@ -19077,62 +16869,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedCalls extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNestedCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/nestedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("analyzeArgsInFreeExpressionPosition.kt") public void testAnalyzeArgsInFreeExpressionPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeArgsInFreeExpressionPosition.kt"); } @TestMetadata("analyzeUnmappedArguments.kt") public void testAnalyzeUnmappedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeUnmappedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/analyzeUnmappedArguments.kt"); } @TestMetadata("argumentsInParentheses.kt") public void testArgumentsInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/argumentsInParentheses.kt"); } @TestMetadata("completeTypeInferenceForNestedInNoneApplicable.kt") public void testCompleteTypeInferenceForNestedInNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt"); } @TestMetadata("completeUnmappedArguments.kt") public void testCompleteUnmappedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeUnmappedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/completeUnmappedArguments.kt"); } @TestMetadata("kt5971NestedSafeCall.kt") public void testKt5971NestedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt5971NestedSafeCall.kt"); } @TestMetadata("kt7597.kt") public void testKt7597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/kt7597.kt"); } @TestMetadata("manyInapplicableCandidatesWithLambdas.kt") public void testManyInapplicableCandidatesWithLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt"); } @TestMetadata("twoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt"); } } @@ -19140,26 +16927,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoCandidates extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoCandidates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/noCandidates"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt2787.kt") public void testKt2787() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/kt2787.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/noCandidates/kt2787.kt"); } @TestMetadata("resolvedToClassifier.kt") public void testResolvedToClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifier.kt"); } @TestMetadata("resolvedToClassifierWithReceiver.kt") public void testResolvedToClassifierWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/noCandidates/resolvedToClassifierWithReceiver.kt"); } } @@ -19167,86 +16955,77 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OverloadConflicts extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverloadConflicts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/overloadConflicts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allLambdas.kt") public void testAllLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt"); } @TestMetadata("extensionReceiverAndVarargs.kt") public void testExtensionReceiverAndVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/extensionReceiverAndVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/extensionReceiverAndVarargs.kt"); } @TestMetadata("genericWithProjection.kt") public void testGenericWithProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/genericWithProjection.kt"); } @TestMetadata("kt10472.kt") public void testKt10472() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10472.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10472.kt"); } @TestMetadata("kt10640.kt") public void testKt10640() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt"); } @TestMetadata("numberOfDefaults.kt") public void testNumberOfDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/numberOfDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/numberOfDefaults.kt"); } @TestMetadata("originalExamples.kt") public void testOriginalExamples() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt"); } @TestMetadata("varargWithMoreSpecificSignature.kt") public void testVarargWithMoreSpecificSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargWithMoreSpecificSignature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargWithMoreSpecificSignature.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargs.kt"); } @TestMetadata("varargsInDifferentPositions.kt") public void testVarargsInDifferentPositions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsInDifferentPositions.kt"); } @TestMetadata("varargsMixed.kt") public void testVarargsMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsMixed.kt"); } @TestMetadata("varargsWithRecursiveGenerics.kt") public void testVarargsWithRecursiveGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsWithRecursiveGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/varargsWithRecursiveGenerics.kt"); } @TestMetadata("withVariance.kt") public void testWithVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt"); } } @@ -19254,80 +17033,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Priority extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPriority() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/priority"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeExtensionVsOther.kt") public void testInvokeExtensionVsOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther.kt"); } @TestMetadata("invokeExtensionVsOther2.kt") public void testInvokeExtensionVsOther2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/invokeExtensionVsOther2.kt"); } @TestMetadata("kt10219.kt") public void testKt10219() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt10219.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt10219.kt"); } @TestMetadata("kt10510.kt") public void testKt10510() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt10510.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt10510.kt"); } @TestMetadata("kt9810.kt") public void testKt9810() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt9810.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt9810.kt"); } @TestMetadata("kt9965.kt") public void testKt9965() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/kt9965.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/kt9965.kt"); } @TestMetadata("localExtVsNonLocalExt.kt") public void testLocalExtVsNonLocalExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/localExtVsNonLocalExt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/localExtVsNonLocalExt.kt"); } @TestMetadata("memberVsLocalExt.kt") public void testMemberVsLocalExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/memberVsLocalExt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/memberVsLocalExt.kt"); } @TestMetadata("staticVsImplicitReceiverMember.kt") public void testStaticVsImplicitReceiverMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/staticVsImplicitReceiverMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/staticVsImplicitReceiverMember.kt"); } @TestMetadata("synthesizedMembersVsExtension.kt") public void testSynthesizedMembersVsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/synthesizedMembersVsExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/synthesizedMembersVsExtension.kt"); } @TestMetadata("syntheticPropertiesVsExtensions.kt") public void testSyntheticPropertiesVsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsExtensions.kt"); } @TestMetadata("syntheticPropertiesVsMembers.kt") public void testSyntheticPropertiesVsMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/priority/syntheticPropertiesVsMembers.kt"); } } @@ -19335,44 +17106,42 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialConstructions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialConstructions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/resolve/specialConstructions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constantsInIf.kt") public void testConstantsInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt"); } @TestMetadata("elvisAsCall.kt") public void testElvisAsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt"); } @TestMetadata("exclExclAsCall.kt") public void testExclExclAsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt"); } @TestMetadata("inferenceForElvis.kt") public void testInferenceForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/inferenceForElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/inferenceForElvis.kt"); } @TestMetadata("multipleSuperClasses.kt") public void testMultipleSuperClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt"); } @TestMetadata("reportTypeMismatchDeeplyOnBranches.kt") public void testReportTypeMismatchDeeplyOnBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt"); } } } @@ -19381,322 +17150,279 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Scopes extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScopes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguityBetweenRootAndPackage.kt") public void testAmbiguityBetweenRootAndPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/AmbiguityBetweenRootAndPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/AmbiguityBetweenRootAndPackage.kt"); } @TestMetadata("AmbiguousNonExtensions.kt") public void testAmbiguousNonExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/AmbiguousNonExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/AmbiguousNonExtensions.kt"); } @TestMetadata("genericVsNested.kt") public void testGenericVsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/genericVsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/genericVsNested.kt"); } @TestMetadata("implicitReceiverMemberVsParameter.kt") public void testImplicitReceiverMemberVsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/implicitReceiverMemberVsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/implicitReceiverMemberVsParameter.kt"); } @TestMetadata("initializerScopeOfExtensionProperty.kt") public void testInitializerScopeOfExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/initializerScopeOfExtensionProperty.kt"); } @TestMetadata("invisibleSetter.kt") public void testInvisibleSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/invisibleSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/invisibleSetter.kt"); } @TestMetadata("kt1078.kt") public void testKt1078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1078.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1078.kt"); } @TestMetadata("kt1080.kt") public void testKt1080() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1080.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1080.kt"); } @TestMetadata("kt1244.kt") public void testKt1244() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1244.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1244.kt"); } @TestMetadata("kt1248.kt") public void testKt1248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1248.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1248.kt"); } @TestMetadata("kt151.kt") public void testKt151() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt151.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt151.kt"); } @TestMetadata("kt1579.kt") public void testKt1579() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1579.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1579.kt"); } @TestMetadata("kt1579_map_entry.kt") public void testKt1579_map_entry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1579_map_entry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1579_map_entry.kt"); } @TestMetadata("kt1580.kt") public void testKt1580() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1580.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1580.kt"); } @TestMetadata("kt1642.kt") public void testKt1642() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1642.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1642.kt"); } @TestMetadata("kt1738.kt") public void testKt1738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1738.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1738.kt"); } @TestMetadata("kt1805.kt") public void testKt1805() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1805.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1805.kt"); } @TestMetadata("kt1806.kt") public void testKt1806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1806.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1806.kt"); } @TestMetadata("kt1822.kt") public void testKt1822() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1822.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1822.kt"); } @TestMetadata("kt1942.kt") public void testKt1942() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt1942.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt1942.kt"); } @TestMetadata("kt2262.kt") public void testKt2262() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt2262.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt2262.kt"); } @TestMetadata("kt250.617.10.kt") public void testKt250_617_10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt250.617.10.kt"); } @TestMetadata("kt323.kt") public void testKt323() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt323.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt323.kt"); } @TestMetadata("kt37.kt") public void testKt37() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt37.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt37.kt"); } @TestMetadata("kt587.kt") public void testKt587() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt587.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt587.kt"); } @TestMetadata("kt900.kt") public void testKt900() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt900.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt900.kt"); } @TestMetadata("kt900-1.kt") public void testKt900_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt900-1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt900-1.kt"); } @TestMetadata("kt900-2.kt") public void testKt900_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt900-2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt900-2.kt"); } @TestMetadata("kt939.kt") public void testKt939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt939.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt939.kt"); } @TestMetadata("kt9430.kt") public void testKt9430() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/kt9430.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/kt9430.kt"); } @TestMetadata("NoAmbiguityBetweenRootAndPackage.kt") public void testNoAmbiguityBetweenRootAndPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/NoAmbiguityBetweenRootAndPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/NoAmbiguityBetweenRootAndPackage.kt"); } @TestMetadata("sameClassNameResolve.kt") public void testSameClassNameResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/sameClassNameResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/sameClassNameResolve.kt"); } @TestMetadata("stopResolutionOnAmbiguity.kt") public void testStopResolutionOnAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/stopResolutionOnAmbiguity.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/visibility.kt"); } @TestMetadata("visibility2.kt") public void testVisibility2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/visibility2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/visibility2.kt"); } @TestMetadata("visibility3.kt") public void testVisibility3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/visibility3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/visibility3.kt"); } @TestMetadata("VisibilityInClassObject.kt") public void testVisibilityInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/VisibilityInClassObject.kt"); } @TestMetadata("VisibilityInheritModifier.kt") public void testVisibilityInheritModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/VisibilityInheritModifier.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/scopes/classHeader") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassHeader extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassHeader() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/classHeader"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationOnClass.kt") public void testAnnotationOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnClass.kt"); } @TestMetadata("annotationOnConstructors.kt") public void testAnnotationOnConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/annotationOnConstructors.kt"); } @TestMetadata("classGenericParameters.kt") public void testClassGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/classGenericParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/classGenericParameters.kt"); } @TestMetadata("classParents.kt") public void testClassParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/classParents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/classParents.kt"); } @TestMetadata("companionObjectParents.kt") public void testCompanionObjectParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectParents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectParents.kt"); } @TestMetadata("companionObjectSuperConstructorArguments.kt") public void testCompanionObjectSuperConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectSuperConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/companionObjectSuperConstructorArguments.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/constructors.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/delegation.kt"); } @TestMetadata("objectParents.kt") public void testObjectParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/objectParents.kt"); } @TestMetadata("objectSuperConstructorArguments.kt") public void testObjectSuperConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/objectSuperConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/objectSuperConstructorArguments.kt"); } @TestMetadata("simpleDelegation.kt") public void testSimpleDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/simpleDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/simpleDelegation.kt"); } @TestMetadata("superConstructorArguments.kt") public void testSuperConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArguments.kt"); } @TestMetadata("superConstructorArgumentsInSecondaryConstructor.kt") public void testSuperConstructorArgumentsInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArgumentsInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/classHeader/superConstructorArgumentsInSecondaryConstructor.kt"); } } @@ -19704,212 +17430,192 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/companionObject.kt"); } @TestMetadata("companionObjectAfterJava.kt") public void testCompanionObjectAfterJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectAfterJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectAfterJava.kt"); } @TestMetadata("companionObjectsOrder.kt") public void testCompanionObjectsOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectsOrder.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/companionObjectsOrder.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/innerClasses.kt"); } @TestMetadata("kt3856.kt") public void testKt3856() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/kt3856.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/kt3856.kt"); } @TestMetadata("methodsPriority.kt") public void testMethodsPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt"); } @TestMetadata("nestedClassesFromInterface.kt") public void testNestedClassesFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedClassesFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedClassesFromInterface.kt"); } @TestMetadata("nestedCompanionClass.kt") public void testNestedCompanionClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClass.kt"); } @TestMetadata("nestedCompanionClassVsNested.kt") public void testNestedCompanionClassVsNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNested.kt"); } @TestMetadata("nestedCompanionClassVsNestedJava.kt") public void testNestedCompanionClassVsNestedJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNestedJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedCompanionClassVsNestedJava.kt"); } @TestMetadata("nestedFromJava.kt") public void testNestedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJava.kt"); } @TestMetadata("nestedFromJavaAfterKotlin.kt") public void testNestedFromJavaAfterKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJavaAfterKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedFromJavaAfterKotlin.kt"); } @TestMetadata("nestedVsToplevelClass.kt") public void testNestedVsToplevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/nestedVsToplevelClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/nestedVsToplevelClass.kt"); } @TestMetadata("severalCompanions.kt") public void testSeveralCompanions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/severalCompanions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/severalCompanions.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/inheritance/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hidePrivateByPublic.kt") public void testHidePrivateByPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/hidePrivateByPublic.kt"); } @TestMetadata("jjkj.kt") public void testJjkj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/jjkj.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/jjkj.kt"); } @TestMetadata("kjk.kt") public void testKjk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/kjk.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/kjk.kt"); } @TestMetadata("localVsStatic.kt") public void testLocalVsStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt"); } @TestMetadata("nameClash0.kt") public void testNameClash0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash0.kt"); } @TestMetadata("nameClash1.kt") public void testNameClash1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash1.kt"); } @TestMetadata("nameClash2.kt") public void testNameClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/nameClash2.kt"); } @TestMetadata("oneInterfaceManyTimes.kt") public void testOneInterfaceManyTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/oneInterfaceManyTimes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/oneInterfaceManyTimes.kt"); } @TestMetadata("overloadStatic.kt") public void testOverloadStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/overloadStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/overloadStatic.kt"); } @TestMetadata("staticFunVsImport.kt") public void testStaticFunVsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticFunVsImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticFunVsImport.kt"); } @TestMetadata("staticPropertyVsImport.kt") public void testStaticPropertyVsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticPropertyVsImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticPropertyVsImport.kt"); } @TestMetadata("staticVsCompanion.kt") public void testStaticVsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsCompanion.kt"); } @TestMetadata("staticVsMember.kt") public void testStaticVsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsMember.kt"); } @TestMetadata("staticVsOuter.kt") public void testStaticVsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticVsOuter.kt"); } @TestMetadata("staticsFromjava.kt") public void testStaticsFromjava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjava.kt"); } @TestMetadata("staticsFromjavaAfterKotlin.kt") public void testStaticsFromjavaAfterKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjavaAfterKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/staticsFromjavaAfterKotlin.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompanionObject extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessToStaticMembersOfParentClass.kt") public void testAccessToStaticMembersOfParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClass.kt"); } @TestMetadata("accessToStaticMembersOfParentClassJKJ.kt") public void testAccessToStaticMembersOfParentClassJKJ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/accessToStaticMembersOfParentClassJKJ.kt"); } public void testAllFilesPresentInCompanionObject() throws Exception { @@ -19918,20 +17624,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("inheritFromContainingClass.kt") public void testInheritFromContainingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt"); } @TestMetadata("inheritFromJava.kt") public void testInheritFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJava.kt"); } @TestMetadata("inheritFromJavaAfterKotlin.kt") public void testInheritFromJavaAfterKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromJavaAfterKotlin.kt"); } } } @@ -19941,104 +17644,92 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedVisibility extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/scopes/protectedVisibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexCompanion.kt") public void testComplexCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/complexCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/complexCompanion.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructors.kt"); } @TestMetadata("constructorsInner.kt") public void testConstructorsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructorsInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/constructorsInner.kt"); } @TestMetadata("innerClassInJava.kt") public void testInnerClassInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerClassInJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerClassInJava.kt"); } @TestMetadata("innerProtectedClass.kt") public void testInnerProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/innerProtectedClass.kt"); } @TestMetadata("javaInheritedInKotlin.kt") public void testJavaInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/javaInheritedInKotlin.kt"); } @TestMetadata("kt7971.kt") public void testKt7971() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/kt7971.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/kt7971.kt"); } @TestMetadata("nonSuperCallConstructor.kt") public void testNonSuperCallConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt"); } @TestMetadata("nonSuperCallConstructorJavaDifferentPackage.kt") public void testNonSuperCallConstructorJavaDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaDifferentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaDifferentPackage.kt"); } @TestMetadata("nonSuperCallConstructorJavaSamePackage.kt") public void testNonSuperCallConstructorJavaSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaSamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructorJavaSamePackage.kt"); } @TestMetadata("protectedCallOnSubClass.kt") public void testProtectedCallOnSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/protectedCallOnSubClass.kt"); } @TestMetadata("smartcastOnExtensionReceiver.kt") public void testSmartcastOnExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/smartcastOnExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/smartcastOnExtensionReceiver.kt"); } @TestMetadata("syntheticPropertyExtensions.kt") public void testSyntheticPropertyExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticPropertyExtensions.kt"); } @TestMetadata("syntheticSAMExtensions.kt") public void testSyntheticSAMExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt"); } @TestMetadata("unstableSmartCast.kt") public void testUnstableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt"); } @TestMetadata("withSmartcast.kt") public void testWithSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/scopes/protectedVisibility/withSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/scopes/protectedVisibility/withSmartcast.kt"); } } } @@ -20047,14 +17738,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/script"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("varInScript.kt") public void testVarInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/script/varInScript.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/script/varInScript.kt"); } } @@ -20062,230 +17756,197 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DerivedTopLevel.kt") public void testDerivedTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/DerivedTopLevel.kt"); } @TestMetadata("DoubleInner.kt") public void testDoubleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/DoubleInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/DoubleInner.kt"); } @TestMetadata("ExhaustiveOnRoot.kt") public void testExhaustiveOnRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnRoot.kt"); } @TestMetadata("ExhaustiveOnTree.kt") public void testExhaustiveOnTree() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTree.kt"); } @TestMetadata("ExhaustiveOnTriangleStar.kt") public void testExhaustiveOnTriangleStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveOnTriangleStar.kt"); } @TestMetadata("ExhaustiveWhen.kt") public void testExhaustiveWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhen.kt"); } @TestMetadata("ExhaustiveWhenDoubleInner.kt") public void testExhaustiveWhenDoubleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenDoubleInner.kt"); } @TestMetadata("ExhaustiveWhenMultipleInner.kt") public void testExhaustiveWhenMultipleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenMultipleInner.kt"); } @TestMetadata("ExhaustiveWhenNegated.kt") public void testExhaustiveWhenNegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegated.kt"); } @TestMetadata("ExhaustiveWhenNegatedTwice.kt") public void testExhaustiveWhenNegatedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenNegatedTwice.kt"); } @TestMetadata("ExhaustiveWhenOnNestedSealed.kt") public void testExhaustiveWhenOnNestedSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNestedSealed.kt"); } @TestMetadata("ExhaustiveWhenOnNullable.kt") public void testExhaustiveWhenOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenOnNullable.kt"); } @TestMetadata("ExhaustiveWhenWithAdditionalMember.kt") public void testExhaustiveWhenWithAdditionalMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithAdditionalMember.kt"); } @TestMetadata("ExhaustiveWhenWithElse.kt") public void testExhaustiveWhenWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/ExhaustiveWhenWithElse.kt"); } @TestMetadata("Local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/Local.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/Local.kt"); } @TestMetadata("LocalSealed.kt") public void testLocalSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/LocalSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/LocalSealed.kt"); } @TestMetadata("NestedSealed.kt") public void testNestedSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NestedSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NestedSealed.kt"); } @TestMetadata("NeverConstructed.kt") public void testNeverConstructed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverConstructed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverConstructed.kt"); } @TestMetadata("NeverDerivedFromNested.kt") public void testNeverDerivedFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverDerivedFromNested.kt"); } @TestMetadata("NeverEnum.kt") public void testNeverEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverEnum.kt"); } @TestMetadata("NeverFinal.kt") public void testNeverFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverFinal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverFinal.kt"); } @TestMetadata("NeverInterface.kt") public void testNeverInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverInterface.kt"); } @TestMetadata("NeverObject.kt") public void testNeverObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverObject.kt"); } @TestMetadata("NeverOpen.kt") public void testNeverOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NeverOpen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NeverOpen.kt"); } @TestMetadata("NonExhaustiveWhen.kt") public void testNonExhaustiveWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhen.kt"); } @TestMetadata("NonExhaustiveWhenNegated.kt") public void testNonExhaustiveWhenNegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenNegated.kt"); } @TestMetadata("NonExhaustiveWhenWithAdditionalCase.kt") public void testNonExhaustiveWhenWithAdditionalCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAdditionalCase.kt"); } @TestMetadata("NonExhaustiveWhenWithAnyCase.kt") public void testNonExhaustiveWhenWithAnyCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonExhaustiveWhenWithAnyCase.kt"); } @TestMetadata("NonPrivateConstructor.kt") public void testNonPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NonPrivateConstructor.kt"); } @TestMetadata("NotFinal.kt") public void testNotFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/NotFinal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/NotFinal.kt"); } @TestMetadata("OperationWhen.kt") public void testOperationWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/OperationWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/OperationWhen.kt"); } @TestMetadata("RedundantAbstract.kt") public void testRedundantAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/RedundantAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/RedundantAbstract.kt"); } @TestMetadata("TreeWhen.kt") public void testTreeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/TreeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/TreeWhen.kt"); } @TestMetadata("TreeWhenFunctional.kt") public void testTreeWhenFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctional.kt"); } @TestMetadata("TreeWhenFunctionalNoIs.kt") public void testTreeWhenFunctionalNoIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/TreeWhenFunctionalNoIs.kt"); } @TestMetadata("WhenOnEmptySealed.kt") public void testWhenOnEmptySealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/WhenOnEmptySealed.kt"); } @TestMetadata("WithInterface.kt") public void testWithInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sealed/WithInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sealed/WithInterface.kt"); } } @@ -20293,300 +17954,260 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentsResolveInBodyAndDelegationCall.kt") public void testArgumentsResolveInBodyAndDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/argumentsResolveInBodyAndDelegationCall.kt"); } @TestMetadata("classInitializersWithoutPrimary.kt") public void testClassInitializersWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/classInitializersWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/classInitializersWithoutPrimary.kt"); } @TestMetadata("companionObjectScope.kt") public void testCompanionObjectScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/companionObjectScope.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/companionObjectScope.kt"); } @TestMetadata("constructorCallType.kt") public void testConstructorCallType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt"); } @TestMetadata("constructorInObject.kt") public void testConstructorInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInObject.kt"); } @TestMetadata("constructorInTrait.kt") public void testConstructorInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/constructorInTrait.kt"); } @TestMetadata("ctrsAnnotationResolve.kt") public void testCtrsAnnotationResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/ctrsAnnotationResolve.kt"); } @TestMetadata("cyclicDelegationCalls.kt") public void testCyclicDelegationCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/cyclicDelegationCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/cyclicDelegationCalls.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/dataClasses.kt"); } @TestMetadata("dataFlowInDelegationCall.kt") public void testDataFlowInDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/dataFlowInDelegationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/dataFlowInDelegationCall.kt"); } @TestMetadata("delegationByWithoutPrimary.kt") public void testDelegationByWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/delegationByWithoutPrimary.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/enums.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/enums.kt"); } @TestMetadata("errorsOnEmptyDelegationCall.kt") public void testErrorsOnEmptyDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/errorsOnEmptyDelegationCall.kt"); } @TestMetadata("expectedPrimaryConstructorCall.kt") public void testExpectedPrimaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/expectedPrimaryConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/expectedPrimaryConstructorCall.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/generics.kt"); } @TestMetadata("generics2.kt") public void testGenerics2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/generics2.kt"); } @TestMetadata("generics3.kt") public void testGenerics3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/generics3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/generics3.kt"); } @TestMetadata("headerSupertypeInitialization.kt") public void testHeaderSupertypeInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerSupertypeInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerSupertypeInitialization.kt"); } @TestMetadata("implicitSuperCallErrorsIfPrimary.kt") public void testImplicitSuperCallErrorsIfPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/implicitSuperCallErrorsIfPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/implicitSuperCallErrorsIfPrimary.kt"); } @TestMetadata("initializationFromOtherInstance.kt") public void testInitializationFromOtherInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/initializationFromOtherInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/initializationFromOtherInstance.kt"); } @TestMetadata("kt6992.kt") public void testKt6992() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6992.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/kt6992.kt"); } @TestMetadata("kt6993.kt") public void testKt6993() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/kt6993.kt"); } @TestMetadata("kt6994.kt") public void testKt6994() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/kt6994.kt"); } @TestMetadata("lambdaInDelegation.kt") public void testLambdaInDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/lambdaInDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/lambdaInDelegation.kt"); } @TestMetadata("nestedExtendsInner.kt") public void testNestedExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/nestedExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/nestedExtendsInner.kt"); } @TestMetadata("noDefaultIfEmptySecondary.kt") public void testNoDefaultIfEmptySecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/noDefaultIfEmptySecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/noDefaultIfEmptySecondary.kt"); } @TestMetadata("noPrimaryConstructor.kt") public void testNoPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/noPrimaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/noPrimaryConstructor.kt"); } @TestMetadata("noSupertypeInitWithSecondaryConstructors.kt") public void testNoSupertypeInitWithSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/noSupertypeInitWithSecondaryConstructors.kt"); } @TestMetadata("propertyInitializationWithPrimary.kt") public void testPropertyInitializationWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithPrimary.kt"); } @TestMetadata("propertyInitializationWithoutPrimary.kt") public void testPropertyInitializationWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/propertyInitializationWithoutPrimary.kt"); } @TestMetadata("redeclarations.kt") public void testRedeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarations.kt"); } @TestMetadata("redeclarationsOfConstructorsIgnored.kt") public void testRedeclarationsOfConstructorsIgnored() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarationsOfConstructorsIgnored.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/redeclarationsOfConstructorsIgnored.kt"); } @TestMetadata("reportResolutionErrorOnImplicitOnce.kt") public void testReportResolutionErrorOnImplicitOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/reportResolutionErrorOnImplicitOnce.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/reportResolutionErrorOnImplicitOnce.kt"); } @TestMetadata("resolvePropertyInitializerWithoutPrimary.kt") public void testResolvePropertyInitializerWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/resolvePropertyInitializerWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/resolvePropertyInitializerWithoutPrimary.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/return.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/return.kt"); } @TestMetadata("superAnyNonEmpty.kt") public void testSuperAnyNonEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/superAnyNonEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/superAnyNonEmpty.kt"); } @TestMetadata("superSecondaryNonExisting.kt") public void testSuperSecondaryNonExisting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/superSecondaryNonExisting.kt"); } @TestMetadata("thisNonExisting.kt") public void testThisNonExisting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/thisNonExisting.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/thisNonExisting.kt"); } @TestMetadata("unreachableCode.kt") public void testUnreachableCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/unreachableCode.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/unreachableCode.kt"); } @TestMetadata("useOfPropertiesWithPrimary.kt") public void testUseOfPropertiesWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithPrimary.kt"); } @TestMetadata("useOfPropertiesWithoutPrimary.kt") public void testUseOfPropertiesWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/useOfPropertiesWithoutPrimary.kt"); } @TestMetadata("valOrValAndModifiersInCtr.kt") public void testValOrValAndModifiersInCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/valOrValAndModifiersInCtr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/valOrValAndModifiersInCtr.kt"); } @TestMetadata("varargsInDelegationCallToPrimary.kt") public void testVarargsInDelegationCallToPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToPrimary.kt"); } @TestMetadata("varargsInDelegationCallToSecondary.kt") public void testVarargsInDelegationCallToSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/varargsInDelegationCallToSecondary.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HeaderCallChecker extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessBaseGenericFromInnerExtendingSameBase.kt") public void testAccessBaseGenericFromInnerExtendingSameBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase.kt"); } @TestMetadata("accessBaseGenericFromInnerExtendingSameBase2.kt") public void testAccessBaseGenericFromInnerExtendingSameBase2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseGenericFromInnerExtendingSameBase2.kt"); } @TestMetadata("accessBaseWithSameExtension.kt") public void testAccessBaseWithSameExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessBaseWithSameExtension.kt"); } @TestMetadata("accessGenericBaseWithSameExtension.kt") public void testAccessGenericBaseWithSameExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/accessGenericBaseWithSameExtension.kt"); } public void testAllFilesPresentInHeaderCallChecker() throws Exception { @@ -20595,92 +18216,77 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("innerInstanceCreation.kt") public void testInnerInstanceCreation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/innerInstanceCreation.kt"); } @TestMetadata("lambdaAsArgument.kt") public void testLambdaAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/lambdaAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/lambdaAsArgument.kt"); } @TestMetadata("memberFunAccess.kt") public void testMemberFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/memberFunAccess.kt"); } @TestMetadata("objectLiteralAsArgument.kt") public void testObjectLiteralAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsArgument.kt"); } @TestMetadata("objectLiteralAsDefaultValueParameter.kt") public void testObjectLiteralAsDefaultValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/objectLiteralAsDefaultValueParameter.kt"); } @TestMetadata("operatorCall.kt") public void testOperatorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/operatorCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/operatorCall.kt"); } @TestMetadata("passingInstance.kt") public void testPassingInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/passingInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/passingInstance.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccess.kt"); } @TestMetadata("propertyAccessUnitialized.kt") public void testPropertyAccessUnitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/propertyAccessUnitialized.kt"); } @TestMetadata("superFunAccess.kt") public void testSuperFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccess.kt"); } @TestMetadata("superFunAccessOverriden.kt") public void testSuperFunAccessOverriden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superFunAccessOverriden.kt"); } @TestMetadata("superPropertyAccess.kt") public void testSuperPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/superPropertyAccess.kt"); } @TestMetadata("thisAsExtensionReceiver.kt") public void testThisAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/thisAsExtensionReceiver.kt"); } @TestMetadata("usingOuterInstance.kt") public void testUsingOuterInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterInstance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterInstance.kt"); } @TestMetadata("usingOuterProperty.kt") public void testUsingOuterProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/secondaryConstructors/headerCallChecker/usingOuterProperty.kt"); } } } @@ -20689,20 +18295,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SenselessComparison extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSenselessComparison() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/senselessComparison"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noExplicitType.kt") public void testNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/senselessComparison/noExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/senselessComparison/noExplicitType.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/senselessComparison/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/senselessComparison/parenthesized.kt"); } } @@ -20710,80 +18318,72 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Shadowing extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShadowing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/shadowing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noNameShadowingForSimpleParameters.kt") public void testNoNameShadowingForSimpleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/noNameShadowingForSimpleParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/noNameShadowingForSimpleParameters.kt"); } @TestMetadata("ShadowLambdaParameter.kt") public void testShadowLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowLambdaParameter.kt"); } @TestMetadata("ShadowMultiDeclarationWithFunParameter.kt") public void testShadowMultiDeclarationWithFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowMultiDeclarationWithFunParameter.kt"); } @TestMetadata("ShadowParameterInFunctionBody.kt") public void testShadowParameterInFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInFunctionBody.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInFunctionBody.kt"); } @TestMetadata("ShadowParameterInNestedBlockInFor.kt") public void testShadowParameterInNestedBlockInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInNestedBlockInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowParameterInNestedBlockInFor.kt"); } @TestMetadata("ShadowPropertyInClosure.kt") public void testShadowPropertyInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInClosure.kt"); } @TestMetadata("ShadowPropertyInFor.kt") public void testShadowPropertyInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFor.kt"); } @TestMetadata("ShadowPropertyInFunction.kt") public void testShadowPropertyInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowPropertyInFunction.kt"); } @TestMetadata("ShadowVariableInFor.kt") public void testShadowVariableInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInFor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInFor.kt"); } @TestMetadata("ShadowVariableInNestedBlock.kt") public void testShadowVariableInNestedBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedBlock.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedBlock.kt"); } @TestMetadata("ShadowVariableInNestedClosure.kt") public void testShadowVariableInNestedClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosure.kt"); } @TestMetadata("ShadowVariableInNestedClosureParam.kt") public void testShadowVariableInNestedClosureParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosureParam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/shadowing/ShadowVariableInNestedClosureParam.kt"); } } @@ -20791,10 +18391,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterBinaryExpr.kt") public void testAfterBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/afterBinaryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/afterBinaryExpr.kt"); } public void testAllFilesPresentInSmartCasts() throws Exception { @@ -20803,670 +18406,564 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("alwaysNull.kt") public void testAlwaysNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt"); } @TestMetadata("alwaysNullWithJava.kt") public void testAlwaysNullWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt"); } @TestMetadata("classObjectMember.kt") public void testClassObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/classObjectMember.kt"); } @TestMetadata("combineWithNoSelectorInfo.kt") public void testCombineWithNoSelectorInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/combineWithNoSelectorInfo.kt"); } @TestMetadata("comparisonUnderAnd.kt") public void testComparisonUnderAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt"); } @TestMetadata("complexComparison.kt") public void testComplexComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt"); } @TestMetadata("complexConditionsWithExcl.kt") public void testComplexConditionsWithExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/complexConditionsWithExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/complexConditionsWithExcl.kt"); } @TestMetadata("dataFlowInfoForArguments.kt") public void testDataFlowInfoForArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/dataFlowInfoForArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/dataFlowInfoForArguments.kt"); } @TestMetadata("doubleLambdaArgument.kt") public void testDoubleLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/doubleLambdaArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/doubleLambdaArgument.kt"); } @TestMetadata("elvisExclExcl.kt") public void testElvisExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExclExcl.kt"); } @TestMetadata("elvisExclExclMerge.kt") public void testElvisExclExclMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclMerge.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclMerge.kt"); } @TestMetadata("elvisExclExclPlatform.kt") public void testElvisExclExclPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExclExclPlatform.kt"); } @TestMetadata("elvisExprNotNull.kt") public void testElvisExprNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt"); } @TestMetadata("elvisNothingRHS.kt") public void testElvisNothingRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisNothingRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisNothingRHS.kt"); } @TestMetadata("elvisRHS.kt") public void testElvisRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvisRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvisRHS.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/equals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/equals.kt"); } @TestMetadata("exclUnderAnd.kt") public void testExclUnderAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/exclUnderAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/exclUnderAnd.kt"); } @TestMetadata("explicitDefaultGetter.kt") public void testExplicitDefaultGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt"); } @TestMetadata("extensionSafeCall.kt") public void testExtensionSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/extensionSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/extensionSafeCall.kt"); } @TestMetadata("fakeSmartCastOnEquality.kt") public void testFakeSmartCastOnEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fakeSmartCastOnEquality.kt"); } @TestMetadata("falseReceiverSmartCast.kt") public void testFalseReceiverSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/falseReceiverSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/falseReceiverSmartCast.kt"); } @TestMetadata("falseUnnecessaryCall.kt") public void testFalseUnnecessaryCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/falseUnnecessaryCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/falseUnnecessaryCall.kt"); } @TestMetadata("fieldExclExcl.kt") public void testFieldExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fieldExclExcl.kt"); } @TestMetadata("fieldInGetter.kt") public void testFieldInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fieldInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fieldInGetter.kt"); } @TestMetadata("fieldPlus.kt") public void testFieldPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/fieldPlus.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/fieldPlus.kt"); } @TestMetadata("genericIntersection.kt") public void testGenericIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/genericIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/genericIntersection.kt"); } @TestMetadata("genericSet.kt") public void testGenericSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/genericSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/genericSet.kt"); } @TestMetadata("ifCascadeExprNotNull.kt") public void testIfCascadeExprNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifCascadeExprNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifCascadeExprNotNull.kt"); } @TestMetadata("ifExprInConditionNonNull.kt") public void testIfExprInConditionNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifExprInConditionNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifExprInConditionNonNull.kt"); } @TestMetadata("ifExprInWhenSubjectNonNull.kt") public void testIfExprInWhenSubjectNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifExprInWhenSubjectNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifExprInWhenSubjectNonNull.kt"); } @TestMetadata("ifExprNonNull.kt") public void testIfExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifExprNonNull.kt"); } @TestMetadata("ifWhenExprNonNull.kt") public void testIfWhenExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ifWhenExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ifWhenExprNonNull.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/implicitReceiver.kt"); } @TestMetadata("implicitToGrandSon.kt") public void testImplicitToGrandSon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/implicitToGrandSon.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/implicitToGrandSon.kt"); } @TestMetadata("incDecToNull.kt") public void testIncDecToNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/incDecToNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/incDecToNull.kt"); } @TestMetadata("kt10232.kt") public void testKt10232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt10232.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt10232.kt"); } @TestMetadata("kt10444.kt") public void testKt10444() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt10444.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt10444.kt"); } @TestMetadata("kt10483.kt") public void testKt10483() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt10483.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt10483.kt"); } @TestMetadata("kt1461.kt") public void testKt1461() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt1461.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt1461.kt"); } @TestMetadata("kt2422.kt") public void testKt2422() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt2422.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt2422.kt"); } @TestMetadata("kt2865.kt") public void testKt2865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt2865.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt2865.kt"); } @TestMetadata("kt3224.kt") public void testKt3224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3224.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3224.kt"); } @TestMetadata("kt3244.kt") public void testKt3244() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3244.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3244.kt"); } @TestMetadata("kt3572.kt") public void testKt3572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3572.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3572.kt"); } @TestMetadata("kt3711.kt") public void testKt3711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3711.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3711.kt"); } @TestMetadata("kt3899.kt") public void testKt3899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3899.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3899.kt"); } @TestMetadata("kt3993.kt") public void testKt3993() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt3993.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt3993.kt"); } @TestMetadata("kt5427.kt") public void testKt5427() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt5427.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt5427.kt"); } @TestMetadata("kt5455.kt") public void testKt5455() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt5455.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt5455.kt"); } @TestMetadata("kt6819.kt") public void testKt6819() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt6819.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt6819.kt"); } @TestMetadata("kt7561.kt") public void testKt7561() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/kt7561.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/kt7561.kt"); } @TestMetadata("lambdaAndArgument.kt") public void testLambdaAndArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgument.kt"); } @TestMetadata("lambdaAndArgumentFun.kt") public void testLambdaAndArgumentFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgumentFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaAndArgumentFun.kt"); } @TestMetadata("lambdaArgumentNoSubstitutedReturn.kt") public void testLambdaArgumentNoSubstitutedReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentNoSubstitutedReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentNoSubstitutedReturn.kt"); } @TestMetadata("lambdaArgumentWithBoundWithoutType.kt") public void testLambdaArgumentWithBoundWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt"); } @TestMetadata("lambdaArgumentWithExpectedGenericType.kt") public void testLambdaArgumentWithExpectedGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithExpectedGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithExpectedGenericType.kt"); } @TestMetadata("lambdaArgumentWithoutType.kt") public void testLambdaArgumentWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutType.kt"); } @TestMetadata("lambdaArgumentWithoutTypeIf.kt") public void testLambdaArgumentWithoutTypeIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIf.kt"); } @TestMetadata("lambdaArgumentWithoutTypeIfMerge.kt") public void testLambdaArgumentWithoutTypeIfMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIfMerge.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeIfMerge.kt"); } @TestMetadata("lambdaArgumentWithoutTypeWhen.kt") public void testLambdaArgumentWithoutTypeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithoutTypeWhen.kt"); } @TestMetadata("lambdaCall.kt") public void testLambdaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaCall.kt"); } @TestMetadata("lambdaCallAnnotated.kt") public void testLambdaCallAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaCallAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaCallAnnotated.kt"); } @TestMetadata("lambdaDeclaresAndModifies.kt") public void testLambdaDeclaresAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifies.kt"); } @TestMetadata("lambdaDeclaresAndModifiesInLoop.kt") public void testLambdaDeclaresAndModifiesInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInLoop.kt"); } @TestMetadata("lambdaDeclaresAndModifiesInSecondary.kt") public void testLambdaDeclaresAndModifiesInSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesInSecondary.kt"); } @TestMetadata("lambdaDeclaresAndModifiesWithDirectEq.kt") public void testLambdaDeclaresAndModifiesWithDirectEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaDeclaresAndModifiesWithDirectEq.kt"); } @TestMetadata("lambdaUsesOwnerModifies.kt") public void testLambdaUsesOwnerModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/lambdaUsesOwnerModifies.kt"); } @TestMetadata("level_1_0.kt") public void testLevel_1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/level_1_0.kt"); } @TestMetadata("localClassChanges.kt") public void testLocalClassChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localClassChanges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localClassChanges.kt"); } @TestMetadata("localFunBetween.kt") public void testLocalFunBetween() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localFunBetween.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localFunBetween.kt"); } @TestMetadata("localFunChanges.kt") public void testLocalFunChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt"); } @TestMetadata("localObjectChanges.kt") public void testLocalObjectChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/localObjectChanges.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/localObjectChanges.kt"); } @TestMetadata("multipleResolvedCalls.kt") public void testMultipleResolvedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/multipleResolvedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/multipleResolvedCalls.kt"); } @TestMetadata("noErrorCheckForPackageLevelVal.kt") public void testNoErrorCheckForPackageLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/noErrorCheckForPackageLevelVal.kt"); } @TestMetadata("noUnnecessarySmartCastForReceiver.kt") public void testNoUnnecessarySmartCastForReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/noUnnecessarySmartCastForReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/noUnnecessarySmartCastForReceiver.kt"); } @TestMetadata("notNullorNotNull.kt") public void testNotNullorNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/notNullorNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/notNullorNotNull.kt"); } @TestMetadata("openInSealed.kt") public void testOpenInSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/openInSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/openInSealed.kt"); } @TestMetadata("ownerDeclaresBothModifies.kt") public void testOwnerDeclaresBothModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/ownerDeclaresBothModifies.kt"); } @TestMetadata("propertyAsCondition.kt") public void testPropertyAsCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt"); } @TestMetadata("propertyToNotNull.kt") public void testPropertyToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt"); } @TestMetadata("safeAs.kt") public void testSafeAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safeAs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safeAs.kt"); } @TestMetadata("severalSmartCastsOnReified.kt") public void testSeveralSmartCastsOnReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/severalSmartCastsOnReified.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/severalSmartCastsOnReified.kt"); } @TestMetadata("shortIfExprNotNull.kt") public void testShortIfExprNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/shortIfExprNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/shortIfExprNotNull.kt"); } @TestMetadata("smartCastAndArgumentApproximation.kt") public void testSmartCastAndArgumentApproximation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastAndArgumentApproximation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastAndArgumentApproximation.kt"); } @TestMetadata("smartCastOnElvis.kt") public void testSmartCastOnElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastOnElvis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnElvis.kt"); } @TestMetadata("smartCastOnIf.kt") public void testSmartCastOnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); } @TestMetadata("smartCastOnWhen.kt") public void testSmartCastOnWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); } @TestMetadata("thisWithLabel.kt") public void testThisWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/thisWithLabel.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/thisWithLabel.kt"); } @TestMetadata("thisWithLabelAsReceiverPart.kt") public void testThisWithLabelAsReceiverPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/thisWithLabelAsReceiverPart.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/thisWithLabelAsReceiverPart.kt"); } @TestMetadata("threeImplicitReceivers.kt") public void testThreeImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/threeImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/threeImplicitReceivers.kt"); } @TestMetadata("twoImplicitReceivers.kt") public void testTwoImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/twoImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/twoImplicitReceivers.kt"); } @TestMetadata("typeDegradation.kt") public void testTypeDegradation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/typeDegradation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/typeDegradation.kt"); } @TestMetadata("typeInComparison.kt") public void testTypeInComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt"); } @TestMetadata("unstableToStable.kt") public void testUnstableToStable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/unstableToStable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/unstableToStable.kt"); } @TestMetadata("unstableToStableTypes.kt") public void testUnstableToStableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/unstableToStableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/unstableToStableTypes.kt"); } @TestMetadata("varChangedInInitializer.kt") public void testVarChangedInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varChangedInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varChangedInInitializer.kt"); } @TestMetadata("varChangedInLocalInitializer.kt") public void testVarChangedInLocalInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varChangedInLocalInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varChangedInLocalInitializer.kt"); } @TestMetadata("varInAccessor.kt") public void testVarInAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInAccessor.kt"); } @TestMetadata("varInInitNoPrimary.kt") public void testVarInInitNoPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInInitNoPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInInitNoPrimary.kt"); } @TestMetadata("varInInitializer.kt") public void testVarInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInInitializer.kt"); } @TestMetadata("varInSecondaryConstructor.kt") public void testVarInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInSecondaryConstructor.kt"); } @TestMetadata("varInsideLocalFun.kt") public void testVarInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varInsideLocalFun.kt"); } @TestMetadata("whenExprNonNull.kt") public void testWhenExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenExprNonNull.kt"); } @TestMetadata("whenIfExprNonNull.kt") public void testWhenIfExprNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenIfExprNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenIfExprNonNull.kt"); } @TestMetadata("whenSubjectImpossible.kt") public void testWhenSubjectImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossible.kt"); } @TestMetadata("whenSubjectImpossibleJava.kt") public void testWhenSubjectImpossibleJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossibleJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/whenSubjectImpossibleJava.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Castchecks extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCastchecks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/castchecks"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicOff.kt") public void testBasicOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOff.kt"); } @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/basicOn.kt"); } @TestMetadata("impossible.kt") public void testImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/impossible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/impossible.kt"); } @TestMetadata("insideCall.kt") public void testInsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/insideCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/insideCall.kt"); } @TestMetadata("smartCastOfNullableExpressionWithExpectedType.kt") @@ -21477,8 +18974,7 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt"); } } @@ -21486,26 +18982,27 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Elvis extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicOff.kt") public void testBasicOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOff.kt"); } @TestMetadata("basicOn.kt") public void testBasicOn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvis/basicOn.kt"); } @TestMetadata("impossible.kt") public void testImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt"); } } @@ -21513,74 +19010,67 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dependentOnPrevArg.kt") public void testDependentOnPrevArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/dependentOnPrevArg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/dependentOnPrevArg.kt"); } @TestMetadata("intersectionTypes.kt") public void testIntersectionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt"); } @TestMetadata("kt1275.kt") public void testKt1275() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt1275.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt1275.kt"); } @TestMetadata("kt1355.kt") public void testKt1355() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt1355.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt1355.kt"); } @TestMetadata("kt2746.kt") public void testKt2746() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt2746.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt2746.kt"); } @TestMetadata("kt2851.kt") public void testKt2851() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt2851.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt2851.kt"); } @TestMetadata("kt4009.kt") public void testKt4009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt4009.kt"); } @TestMetadata("kt4403.kt") public void testKt4403() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt4403.kt"); } @TestMetadata("kt4415.kt") public void testKt4415() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt4415.kt"); } @TestMetadata("kt6242.kt") public void testKt6242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/kt6242.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/kt6242.kt"); } @TestMetadata("smartCastOnReceiver.kt") public void testSmartCastOnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt"); } } @@ -21588,92 +19078,82 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntersectionScope extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntersectionScope() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/intersectionScope"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictTypeParameters.kt") public void testConflictTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictTypeParameters.kt"); } @TestMetadata("conflictingReturnType.kt") public void testConflictingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/conflictingReturnType.kt"); } @TestMetadata("flexibleTypes.kt") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt"); } @TestMetadata("moreSpecificSetter.kt") public void testMoreSpecificSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificSetter.kt"); } @TestMetadata("moreSpecificVisibility.kt") public void testMoreSpecificVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/moreSpecificVisibility.kt"); } @TestMetadata("mostSpecific.kt") public void testMostSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecific.kt"); } @TestMetadata("mostSpecificIrrelevant.kt") public void testMostSpecificIrrelevant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecificIrrelevant.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/mostSpecificIrrelevant.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/properties.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/properties.kt"); } @TestMetadata("propertiesConflict.kt") public void testPropertiesConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/propertiesConflict.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/propertiesConflict.kt"); } @TestMetadata("refineReturnType.kt") public void testRefineReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/refineReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/refineReturnType.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/simple.kt"); } @TestMetadata("unstableSmartCast.kt") public void testUnstableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt"); } @TestMetadata("validTypeParameters.kt") public void testValidTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParameters.kt"); } @TestMetadata("validTypeParametersNoSmartCast.kt") public void testValidTypeParametersNoSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParametersNoSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/intersectionScope/validTypeParametersNoSmartCast.kt"); } } @@ -21681,326 +19161,277 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Loops extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLoops() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/loops"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignElvisIfBreakInsideWhileTrue.kt") public void testAssignElvisIfBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/assignElvisIfBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/assignElvisIfBreakInsideWhileTrue.kt"); } @TestMetadata("assignWhenInsideWhileTrue.kt") public void testAssignWhenInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/assignWhenInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/assignWhenInsideWhileTrue.kt"); } @TestMetadata("callBreakBetweenInsideDoWhile.kt") public void testCallBreakBetweenInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakBetweenInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakBetweenInsideDoWhile.kt"); } @TestMetadata("callBreakFirstInsideDoWhile.kt") public void testCallBreakFirstInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakFirstInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakFirstInsideDoWhile.kt"); } @TestMetadata("callBreakInsideDoWhile.kt") public void testCallBreakInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakInsideDoWhile.kt"); } @TestMetadata("callBreakSecondInsideDoWhile.kt") public void testCallBreakSecondInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakSecondInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakSecondInsideDoWhile.kt"); } @TestMetadata("callBreakThirdInsideDoWhile.kt") public void testCallBreakThirdInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakThirdInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/callBreakThirdInsideDoWhile.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhile.kt"); } @TestMetadata("doWhileBreak.kt") public void testDoWhileBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileBreak.kt"); } @TestMetadata("doWhileContinue.kt") public void testDoWhileContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileContinue.kt"); } @TestMetadata("doWhileEarlyBreak.kt") public void testDoWhileEarlyBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyBreak.kt"); } @TestMetadata("doWhileEarlyContinue.kt") public void testDoWhileEarlyContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileEarlyContinue.kt"); } @TestMetadata("doWhileInCondition.kt") public void testDoWhileInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInCondition.kt"); } @TestMetadata("doWhileInConditionWithBreak.kt") public void testDoWhileInConditionWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInConditionWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileInConditionWithBreak.kt"); } @TestMetadata("doWhileLiteral.kt") public void testDoWhileLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileLiteral.kt"); } @TestMetadata("doWhileNotNullBreak.kt") public void testDoWhileNotNullBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNotNullBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNotNullBreak.kt"); } @TestMetadata("doWhileNull.kt") public void testDoWhileNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNull.kt"); } @TestMetadata("doWhileNullWithBreak.kt") public void testDoWhileNullWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNullWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/doWhileNullWithBreak.kt"); } @TestMetadata("elvisBreakInsideDoWhile.kt") public void testElvisBreakInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisBreakInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisBreakInsideDoWhile.kt"); } @TestMetadata("elvisIfBreakInsideWhileTrue.kt") public void testElvisIfBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisIfBreakInsideWhileTrue.kt"); } @TestMetadata("elvisInsideDoWhile.kt") public void testElvisInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisInsideDoWhile.kt"); } @TestMetadata("elvisLeftBreakInsideWhileTrue.kt") public void testElvisLeftBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/elvisLeftBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/elvisLeftBreakInsideWhileTrue.kt"); } @TestMetadata("ifBlockInsideDoWhile.kt") public void testIfBlockInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBlockInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBlockInsideDoWhile.kt"); } @TestMetadata("ifBreakAssignInsideDoWhile.kt") public void testIfBreakAssignInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideDoWhile.kt"); } @TestMetadata("ifBreakAssignInsideWhileTrue.kt") public void testIfBreakAssignInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakAssignInsideWhileTrue.kt"); } @TestMetadata("ifBreakExprInsideWhileTrue.kt") public void testIfBreakExprInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakExprInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifBreakExprInsideWhileTrue.kt"); } @TestMetadata("ifElseBlockInsideDoWhile.kt") public void testIfElseBlockInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifElseBlockInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifElseBlockInsideDoWhile.kt"); } @TestMetadata("ifInsideDoWhile.kt") public void testIfInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/ifInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/ifInsideDoWhile.kt"); } @TestMetadata("leftElvisBreakInsideWhileTrue.kt") public void testLeftElvisBreakInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/leftElvisBreakInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/leftElvisBreakInsideWhileTrue.kt"); } @TestMetadata("nestedDoWhile.kt") public void testNestedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhile.kt"); } @TestMetadata("nestedDoWhileWithLongContinue.kt") public void testNestedDoWhileWithLongContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhileWithLongContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedDoWhileWithLongContinue.kt"); } @TestMetadata("nestedLoops.kt") public void testNestedLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoops.kt"); } @TestMetadata("nestedLoopsShort.kt") public void testNestedLoopsShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsShort.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsShort.kt"); } @TestMetadata("nestedLoopsWithBreak.kt") public void testNestedLoopsWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithBreak.kt"); } @TestMetadata("nestedLoopsWithLongBreak.kt") public void testNestedLoopsWithLongBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongBreak.kt"); } @TestMetadata("nestedLoopsWithLongContinue.kt") public void testNestedLoopsWithLongContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/nestedLoopsWithLongContinue.kt"); } @TestMetadata("plusAssignWhenInsideDoWhile.kt") public void testPlusAssignWhenInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/plusAssignWhenInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/plusAssignWhenInsideDoWhile.kt"); } @TestMetadata("safeCallBreakInsideDoWhile.kt") public void testSafeCallBreakInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallBreakInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallBreakInsideDoWhile.kt"); } @TestMetadata("safeCallInsideDoWhile.kt") public void testSafeCallInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/safeCallInsideDoWhile.kt"); } @TestMetadata("useInsideDoWhile.kt") public void testUseInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/useInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/useInsideDoWhile.kt"); } @TestMetadata("whenInsideWhileTrue.kt") public void testWhenInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whenInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whenInsideWhileTrue.kt"); } @TestMetadata("whenReturnInsideWhileTrue.kt") public void testWhenReturnInsideWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whenReturnInsideWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whenReturnInsideWhileTrue.kt"); } @TestMetadata("whileInCondition.kt") public void testWhileInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileInCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileInCondition.kt"); } @TestMetadata("whileInConditionWithBreak.kt") public void testWhileInConditionWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileInConditionWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileInConditionWithBreak.kt"); } @TestMetadata("whileNull.kt") public void testWhileNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileNull.kt"); } @TestMetadata("whileNullWithBreak.kt") public void testWhileNullWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileNullWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileNullWithBreak.kt"); } @TestMetadata("whileSimple.kt") public void testWhileSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileSimple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileSimple.kt"); } @TestMetadata("whileTrivial.kt") public void testWhileTrivial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrivial.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrivial.kt"); } @TestMetadata("whileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrue.kt"); } @TestMetadata("whileTrueBreakReturn.kt") public void testWhileTrueBreakReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueBreakReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueBreakReturn.kt"); } @TestMetadata("whileTrueEarlyBreak.kt") public void testWhileTrueEarlyBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueEarlyBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueEarlyBreak.kt"); } @TestMetadata("whileTrueReturn.kt") public void testWhileTrueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/whileTrueReturn.kt"); } @TestMetadata("WhileTrueWithBreakInIfCondition.kt") public void testWhileTrueWithBreakInIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/loops/WhileTrueWithBreakInIfCondition.kt"); } } @@ -22008,56 +19439,52 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectLiterals extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjectLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/objectLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/assignment.kt"); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/base.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/base.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt"); } @TestMetadata("exclexcl.kt") public void testExclexcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt"); } @TestMetadata("exclexclArgument.kt") public void testExclexclArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclArgument.kt"); } @TestMetadata("exclexclTwoArgument.kt") public void testExclexclTwoArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclTwoArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexclTwoArgument.kt"); } @TestMetadata("kt7110.kt") public void testKt7110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/kt7110.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/kt7110.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/receiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/objectLiterals/receiver.kt"); } } @@ -22065,62 +19492,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublicVals extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublicVals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/publicVals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customGetter.kt") public void testCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/customGetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/customGetter.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt"); } @TestMetadata("kt4409.kt") public void testKt4409() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt4409.kt"); } @TestMetadata("kt5502.kt") public void testKt5502() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt5502.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/kt5502.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/open.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/open.kt"); } @TestMetadata("otherModule.kt") public void testOtherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/otherModule.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/otherModule.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/protected.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/simple.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/publicVals/var.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/publicVals/var.kt"); } } @@ -22128,182 +19550,157 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Safecalls extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSafecalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/safecalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anotherVal.kt") public void testAnotherVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/anotherVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/anotherVal.kt"); } @TestMetadata("argument.kt") public void testArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/argument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/argument.kt"); } @TestMetadata("chainAndUse.kt") public void testChainAndUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainAndUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainAndUse.kt"); } @TestMetadata("chainInChain.kt") public void testChainInChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainInChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainInChain.kt"); } @TestMetadata("chainMixedUnsafe.kt") public void testChainMixedUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainMixedUnsafe.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/chainMixedUnsafe.kt"); } @TestMetadata("doubleCall.kt") public void testDoubleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/doubleCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/doubleCall.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/extension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/extension.kt"); } @TestMetadata("extensionCall.kt") public void testExtensionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/extensionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/extensionCall.kt"); } @TestMetadata("falseArgument.kt") public void testFalseArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseArgument.kt"); } @TestMetadata("falseChain.kt") public void testFalseChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseChain.kt"); } @TestMetadata("falseExtension.kt") public void testFalseExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseExtension.kt"); } @TestMetadata("falseSecondArgument.kt") public void testFalseSecondArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseSecondArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/falseSecondArgument.kt"); } @TestMetadata("innerReceiver.kt") public void testInnerReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/innerReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/innerReceiver.kt"); } @TestMetadata("insideCall.kt") public void testInsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideCall.kt"); } @TestMetadata("insideIfExpr.kt") public void testInsideIfExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideIfExpr.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/insideIfExpr.kt"); } @TestMetadata("longChain.kt") public void testLongChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/longChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/longChain.kt"); } @TestMetadata("nullableReceiver.kt") public void testNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiver.kt"); } @TestMetadata("nullableReceiverInLongChain.kt") public void testNullableReceiverInLongChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverInLongChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverInLongChain.kt"); } @TestMetadata("nullableReceiverWithExclExcl.kt") public void testNullableReceiverWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithExclExcl.kt"); } @TestMetadata("nullableReceiverWithFlexible.kt") public void testNullableReceiverWithFlexible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithFlexible.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/nullableReceiverWithFlexible.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/property.kt"); } @TestMetadata("propertyChain.kt") public void testPropertyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/propertyChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/propertyChain.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiver.kt"); } @TestMetadata("receiverAndChain.kt") public void testReceiverAndChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChain.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChain.kt"); } @TestMetadata("receiverAndChainFalse.kt") public void testReceiverAndChainFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/receiverAndChainFalse.kt"); } @TestMetadata("safeAccessReceiverNotNull.kt") public void testSafeAccessReceiverNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/simple.kt"); } @TestMetadata("simpleNullableReceiver.kt") public void testSimpleNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/simpleNullableReceiver.kt"); } @TestMetadata("twoArgs.kt") public void testTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/safecalls/twoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/safecalls/twoArgs.kt"); } } @@ -22311,10 +19708,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorAndFunction.kt") public void testAccessorAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/accessorAndFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/accessorAndFunction.kt"); } public void testAllFilesPresentInVariables() throws Exception { @@ -22323,146 +19723,122 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/assignment.kt"); } @TestMetadata("assignmentConversion.kt") public void testAssignmentConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/assignmentConversion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/assignmentConversion.kt"); } @TestMetadata("doWhileWithMiddleBreak.kt") public void testDoWhileWithMiddleBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/doWhileWithMiddleBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/doWhileWithMiddleBreak.kt"); } @TestMetadata("ifElseBlockInsideDoWhile.kt") public void testIfElseBlockInsideDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhile.kt"); } @TestMetadata("ifElseBlockInsideDoWhileWithBreak.kt") public void testIfElseBlockInsideDoWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifElseBlockInsideDoWhileWithBreak.kt"); } @TestMetadata("ifNullAssignment.kt") public void testIfNullAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt"); } @TestMetadata("ifVarIs.kt") public void testIfVarIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIs.kt"); } @TestMetadata("ifVarIsAnd.kt") public void testIfVarIsAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsAnd.kt"); } @TestMetadata("ifVarIsChanged.kt") public void testIfVarIsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/ifVarIsChanged.kt"); } @TestMetadata("inPropertySam.kt") public void testInPropertySam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/inPropertySam.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/inPropertySam.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/infix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/infix.kt"); } @TestMetadata("initialization.kt") public void testInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/initialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/initialization.kt"); } @TestMetadata("kt7599.kt") public void testKt7599() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/kt7599.kt"); } @TestMetadata("lambdaBetweenArguments.kt") public void testLambdaBetweenArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/property.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/property.kt"); } @TestMetadata("propertyNotNeeded.kt") public void testPropertyNotNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertyNotNeeded.kt"); } @TestMetadata("propertySubtype.kt") public void testPropertySubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtype.kt"); } @TestMetadata("propertySubtypeInMember.kt") public void testPropertySubtypeInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMember.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMember.kt"); } @TestMetadata("propertySubtypeInMemberCheck.kt") public void testPropertySubtypeInMemberCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMemberCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/propertySubtypeInMemberCheck.kt"); } @TestMetadata("varAsUse.kt") public void testVarAsUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/varAsUse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/varAsUse.kt"); } @TestMetadata("varChangedInLoop.kt") public void testVarChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/varChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/varChangedInLoop.kt"); } @TestMetadata("varNotChangedInLoop.kt") public void testVarNotChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/varNotChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/varNotChangedInLoop.kt"); } @TestMetadata("whileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/whileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/whileTrue.kt"); } @TestMetadata("whileWithBreak.kt") public void testWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/variables/whileWithBreak.kt"); } } @@ -22470,320 +19846,272 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varnotnull extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarnotnull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/smartCasts/varnotnull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignNestedWhile.kt") public void testAssignNestedWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignNestedWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignNestedWhile.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt"); } @TestMetadata("boundInitializer.kt") public void testBoundInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializer.kt"); } @TestMetadata("boundInitializerWrong.kt") public void testBoundInitializerWrong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt"); } @TestMetadata("capturedInClosureModifiedBefore.kt") public void testCapturedInClosureModifiedBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureModifiedBefore.kt"); } @TestMetadata("capturedInClosureOff.kt") public void testCapturedInClosureOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInClosureOff.kt"); } @TestMetadata("doWhileWithBreak.kt") public void testDoWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithBreak.kt"); } @TestMetadata("doWhileWithMiddleBreak.kt") public void testDoWhileWithMiddleBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/doWhileWithMiddleBreak.kt"); } @TestMetadata("forEach.kt") public void testForEach() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt"); } @TestMetadata("forEachWithBreak.kt") public void testForEachWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt"); } @TestMetadata("forEachWithContinue.kt") public void testForEachWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt"); } @TestMetadata("ifVarNotNull.kt") public void testIfVarNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNull.kt"); } @TestMetadata("ifVarNotNullAnd.kt") public void testIfVarNotNullAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNullAnd.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNotNullAnd.kt"); } @TestMetadata("ifVarNullElse.kt") public void testIfVarNullElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullElse.kt"); } @TestMetadata("ifVarNullReturn.kt") public void testIfVarNullReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/ifVarNullReturn.kt"); } @TestMetadata("inference.kt") public void testInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/inference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/inference.kt"); } @TestMetadata("infiniteWhileWithBreak.kt") public void testInfiniteWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infiniteWhileWithBreak.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infix.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/infix.kt"); } @TestMetadata("initInTryReturnInCatch.kt") public void testInitInTryReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt"); } @TestMetadata("initialization.kt") public void testInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt"); } @TestMetadata("iterations.kt") public void testIterations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/iterations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/iterations.kt"); } @TestMetadata("nestedDoWhile.kt") public void testNestedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedDoWhile.kt"); } @TestMetadata("nestedLoops.kt") public void testNestedLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedLoops.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedLoops.kt"); } @TestMetadata("nestedWhile.kt") public void testNestedWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedWhile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/nestedWhile.kt"); } @TestMetadata("plusplusMinusminus.kt") public void testPlusplusMinusminus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt"); } @TestMetadata("postfixNotnullClassIncrement.kt") public void testPostfixNotnullClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt"); } @TestMetadata("postfixNullableClassIncrement.kt") public void testPostfixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableClassIncrement.kt"); } @TestMetadata("postfixNullableIncrement.kt") public void testPostfixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNullableIncrement.kt"); } @TestMetadata("prefixNotnullClassIncrement.kt") public void testPrefixNotnullClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt"); } @TestMetadata("prefixNullableClassIncrement.kt") public void testPrefixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableClassIncrement.kt"); } @TestMetadata("prefixNullableIncrement.kt") public void testPrefixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNullableIncrement.kt"); } @TestMetadata("setNotNullInTry.kt") public void testSetNotNullInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNotNullInTry.kt"); } @TestMetadata("setNullInTry.kt") public void testSetNullInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTry.kt"); } @TestMetadata("setNullInTryFinally.kt") public void testSetNullInTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryFinally.kt"); } @TestMetadata("setNullInTryUnsound.kt") public void testSetNullInTryUnsound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setNullInTryUnsound.kt"); } @TestMetadata("setSameInTry.kt") public void testSetSameInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setSameInTry.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/setSameInTry.kt"); } @TestMetadata("toFlexibleType.kt") public void testToFlexibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/toFlexibleType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/toFlexibleType.kt"); } @TestMetadata("unnecessary.kt") public void testUnnecessary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessary.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessary.kt"); } @TestMetadata("unnecessaryWithBranch.kt") public void testUnnecessaryWithBranch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithBranch.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithBranch.kt"); } @TestMetadata("unnecessaryWithMap.kt") public void testUnnecessaryWithMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt"); } @TestMetadata("varCapturedInClosure.kt") public void testVarCapturedInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInClosure.kt"); } @TestMetadata("varCapturedInInlineClosure.kt") public void testVarCapturedInInlineClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt"); } @TestMetadata("varCapturedInSafeClosure.kt") public void testVarCapturedInSafeClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInSafeClosure.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInSafeClosure.kt"); } @TestMetadata("varChangedInLoop.kt") public void testVarChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varChangedInLoop.kt"); } @TestMetadata("varCheck.kt") public void testVarCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCheck.kt"); } @TestMetadata("varIntNull.kt") public void testVarIntNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt"); } @TestMetadata("varNotChangedInLoop.kt") public void testVarNotChangedInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNotChangedInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNotChangedInLoop.kt"); } @TestMetadata("varNull.kt") public void testVarNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt"); } @TestMetadata("whileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrue.kt"); } @TestMetadata("whileTrueWithBracketSet.kt") public void testWhileTrueWithBracketSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBracketSet.kt"); } @TestMetadata("whileTrueWithBrackets.kt") public void testWhileTrueWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileTrueWithBrackets.kt"); } @TestMetadata("whileWithBreak.kt") public void testWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/whileWithBreak.kt"); } } } @@ -22792,130 +20120,119 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceCompatibility extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunctionAlways.kt") public void testInlineFunctionAlways() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/inlineFunctionAlways.kt"); } @TestMetadata("noCallableReferencesWithEmptyLHS.kt") public void testNoCallableReferencesWithEmptyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noCallableReferencesWithEmptyLHS.kt"); } @TestMetadata("noDataClassInheritance.kt") public void testNoDataClassInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noDataClassInheritance.kt"); } @TestMetadata("noInlineProperty.kt") public void testNoInlineProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noInlineProperty.kt"); } @TestMetadata("noLocalDelegatedProperty.kt") public void testNoLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt"); } @TestMetadata("noLocalDelegatedPropertyInScript.kt") public void testNoLocalDelegatedPropertyInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedPropertyInScript.kt"); } @TestMetadata("noMultiplatformProjects.kt") public void testNoMultiplatformProjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noMultiplatformProjects.kt"); } @TestMetadata("noTopLevelSealedInheritance.kt") public void testNoTopLevelSealedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noTopLevelSealedInheritance.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ApiVersion extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInApiVersion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/annotations.kt"); } @TestMetadata("classesAndConstructors.kt") public void testClassesAndConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/classesAndConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/classesAndConstructors.kt"); } @TestMetadata("overriddenMembers.kt") public void testOverriddenMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/overriddenMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/overriddenMembers.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/propertyAccessors.kt"); } @TestMetadata("simpleMembers.kt") public void testSimpleMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/simpleMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/simpleMembers.kt"); } @TestMetadata("sinceOldVersionIsOK.kt") public void testSinceOldVersionIsOK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/sinceOldVersionIsOK.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/sinceOldVersionIsOK.kt"); } @TestMetadata("typealiasesAsCompanionObjects.kt") public void testTypealiasesAsCompanionObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsCompanionObjects.kt"); } @TestMetadata("typealiasesAsConstructors.kt") public void testTypealiasesAsConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsConstructors.kt"); } @TestMetadata("typealiasesAsObjects.kt") public void testTypealiasesAsObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsObjects.kt"); } @TestMetadata("typealiasesAsTypes.kt") public void testTypealiasesAsTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesAsTypes.kt"); } @TestMetadata("typealiasesOnImport.kt") public void testTypealiasesOnImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/apiVersion/typealiasesOnImport.kt"); } } @@ -22923,32 +20240,32 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoBoundCallableReferences extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoBoundCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundCallableReference.kt") public void testBoundCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundCallableReference.kt"); } @TestMetadata("boundClassLiteral.kt") public void testBoundClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/boundClassLiteral.kt"); } @TestMetadata("qualifiedJavaClassLiteralInKClassExtension.kt") public void testQualifiedJavaClassLiteralInKClassExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassLiteralInKClassExtension.kt"); } @TestMetadata("qualifiedJavaClassReferenceInKClassExtension.kt") public void testQualifiedJavaClassReferenceInKClassExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/sourceCompatibility/noBoundCallableReferences/qualifiedJavaClassReferenceInKClassExtension.kt"); } } } @@ -22957,38 +20274,37 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Substitutions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubstitutions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/substitutions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt1558-short.kt") public void testKt1558_short() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/kt1558-short.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/kt1558-short.kt"); } @TestMetadata("kt4887.kt") public void testKt4887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/kt4887.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/kt4887.kt"); } @TestMetadata("starProjections.kt") public void testStarProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/starProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/starProjections.kt"); } @TestMetadata("upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt") public void testUpperBoundsSubstitutionForOverloadResolutionWithAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt"); } @TestMetadata("upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt") public void testUpperBoundsSubstitutionForOverloadResolutionWithErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt"); } } @@ -22996,110 +20312,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Subtyping extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubtyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/subtyping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extFunctionTypeAsSuperType.kt") public void testExtFunctionTypeAsSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/extFunctionTypeAsSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/extFunctionTypeAsSuperType.kt"); } @TestMetadata("findClosestCorrespondingSupertype.kt") public void testFindClosestCorrespondingSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/findClosestCorrespondingSupertype.kt"); } @TestMetadata("functionTypeAsSuperType.kt") public void testFunctionTypeAsSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/functionTypeAsSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/functionTypeAsSuperType.kt"); } @TestMetadata("invariantArgumentForTypeParameterWithMultipleBounds.kt") public void testInvariantArgumentForTypeParameterWithMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/invariantArgumentForTypeParameterWithMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/invariantArgumentForTypeParameterWithMultipleBounds.kt"); } @TestMetadata("javaAndKotlinSuperType.kt") public void testJavaAndKotlinSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/javaAndKotlinSuperType.kt"); } @TestMetadata("kt2069.kt") public void testKt2069() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt2069.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt2069.kt"); } @TestMetadata("kt2744.kt") public void testKt2744() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt2744.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt2744.kt"); } @TestMetadata("kt304.kt") public void testKt304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt304.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt304.kt"); } @TestMetadata("kt3159.kt") public void testKt3159() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt3159.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt3159.kt"); } @TestMetadata("kt-1457.kt") public void testKt_1457() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/kt-1457.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/kt-1457.kt"); } @TestMetadata("localAnonymousObjects.kt") public void testLocalAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/localAnonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/localAnonymousObjects.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/localClasses.kt"); } @TestMetadata("memberAnonymousObjects.kt") public void testMemberAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/memberAnonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/memberAnonymousObjects.kt"); } @TestMetadata("nestedIntoLocalClasses.kt") public void testNestedIntoLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt"); } @TestMetadata("nestedLocalClasses.kt") public void testNestedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt"); } @TestMetadata("topLevelAnonymousObjects.kt") public void testTopLevelAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/topLevelAnonymousObjects.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/topLevelAnonymousObjects.kt"); } @TestMetadata("unresolvedSupertype.kt") public void testUnresolvedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/subtyping/unresolvedSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/subtyping/unresolvedSupertype.kt"); } } @@ -23107,6 +20410,10 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuppress() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -23115,68 +20422,62 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AllWarnings extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAllWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/allWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("suppressWarningsOnAnonymousObjectInVariable.kt") public void testSuppressWarningsOnAnonymousObjectInVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnAnonymousObjectInVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnAnonymousObjectInVariable.kt"); } @TestMetadata("suppressWarningsOnClass.kt") public void testSuppressWarningsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClass.kt"); } @TestMetadata("suppressWarningsOnClassObject.kt") public void testSuppressWarningsOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnClassObject.kt"); } @TestMetadata("suppressWarningsOnExpression.kt") public void testSuppressWarningsOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnExpression.kt"); } @TestMetadata("suppressWarningsOnFile.kt") public void testSuppressWarningsOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFile.kt"); } @TestMetadata("suppressWarningsOnFunction.kt") public void testSuppressWarningsOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnFunction.kt"); } @TestMetadata("suppressWarningsOnObject.kt") public void testSuppressWarningsOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnObject.kt"); } @TestMetadata("suppressWarningsOnParameter.kt") public void testSuppressWarningsOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnParameter.kt"); } @TestMetadata("suppressWarningsOnProperty.kt") public void testSuppressWarningsOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnProperty.kt"); } @TestMetadata("suppressWarningsOnPropertyAccessor.kt") public void testSuppressWarningsOnPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/allWarnings/suppressWarningsOnPropertyAccessor.kt"); } } @@ -23184,62 +20485,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ManyWarnings extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInManyWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/manyWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/mixed.kt"); } @TestMetadata("onClass.kt") public void testOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClass.kt"); } @TestMetadata("onClassObject.kt") public void testOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onClassObject.kt"); } @TestMetadata("onExpression.kt") public void testOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onExpression.kt"); } @TestMetadata("onFunction.kt") public void testOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onFunction.kt"); } @TestMetadata("onObject.kt") public void testOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onObject.kt"); } @TestMetadata("onParameter.kt") public void testOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onParameter.kt"); } @TestMetadata("onProperty.kt") public void testOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onProperty.kt"); } @TestMetadata("onPropertyAccessor.kt") public void testOnPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/manyWarnings/onPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/manyWarnings/onPropertyAccessor.kt"); } } @@ -23247,74 +20543,67 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OneWarning extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOneWarning() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/suppress/oneWarning"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("onBlockStatement.kt") public void testOnBlockStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatement.kt"); } @TestMetadata("onBlockStatementSameLine.kt") public void testOnBlockStatementSameLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatementSameLine.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onBlockStatementSameLine.kt"); } @TestMetadata("onClass.kt") public void testOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onClass.kt"); } @TestMetadata("onClassObject.kt") public void testOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onClassObject.kt"); } @TestMetadata("onExpression.kt") public void testOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onExpression.kt"); } @TestMetadata("onFunction.kt") public void testOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onFunction.kt"); } @TestMetadata("onLocalVariable.kt") public void testOnLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onLocalVariable.kt"); } @TestMetadata("onObject.kt") public void testOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onObject.kt"); } @TestMetadata("onParameter.kt") public void testOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onParameter.kt"); } @TestMetadata("onProperty.kt") public void testOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onProperty.kt"); } @TestMetadata("onPropertyAccessor.kt") public void testOnPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/suppress/oneWarning/onPropertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/suppress/oneWarning/onPropertyAccessor.kt"); } } } @@ -23323,6 +20612,10 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticExtensions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -23331,10 +20624,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaProperties extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbbreviationName.kt") public void testAbbreviationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/AbbreviationName.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/AbbreviationName.kt"); } public void testAllFilesPresentInJavaProperties() throws Exception { @@ -23343,170 +20639,142 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("Bases.kt") public void testBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Bases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Bases.kt"); } @TestMetadata("CompiledClass.kt") public void testCompiledClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/CompiledClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/CompiledClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Deprecated.kt"); } @TestMetadata("FalseGetters.kt") public void testFalseGetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseGetters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseGetters.kt"); } @TestMetadata("FalseSetters.kt") public void testFalseSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseSetters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FalseSetters.kt"); } @TestMetadata("FromTwoBases.kt") public void testFromTwoBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FromTwoBases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/FromTwoBases.kt"); } @TestMetadata("GenericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GenericClass.kt"); } @TestMetadata("GetA.kt") public void testGetA() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetA.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/Getter.kt"); } @TestMetadata("GetterAndSetter.kt") public void testGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetterAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/GetterAndSetter.kt"); } @TestMetadata("ImplicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/ImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/ImplicitReceiver.kt"); } @TestMetadata("IsNaming.kt") public void testIsNaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/IsNaming.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/IsNaming.kt"); } @TestMetadata("JavaOverridesKotlin.kt") public void testJavaOverridesKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/JavaOverridesKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/JavaOverridesKotlin.kt"); } @TestMetadata("KotlinOverridesJava.kt") public void testKotlinOverridesJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava.kt"); } @TestMetadata("KotlinOverridesJava2.kt") public void testKotlinOverridesJava2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava2.kt"); } @TestMetadata("KotlinOverridesJava3.kt") public void testKotlinOverridesJava3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava3.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava3.kt"); } @TestMetadata("KotlinOverridesJava4.kt") public void testKotlinOverridesJava4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava4.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava4.kt"); } @TestMetadata("KotlinOverridesJava5.kt") public void testKotlinOverridesJava5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava5.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/KotlinOverridesJava5.kt"); } @TestMetadata("OnlyAscii.kt") public void testOnlyAscii() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyAscii.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyAscii.kt"); } @TestMetadata("OnlyPublic.kt") public void testOnlyPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OnlyPublic.kt"); } @TestMetadata("OverrideGetterOnly.kt") public void testOverrideGetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OverrideGetterOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/OverrideGetterOnly.kt"); } @TestMetadata("SetterHasHigherAccess.kt") public void testSetterHasHigherAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterHasHigherAccess.kt"); } @TestMetadata("SetterOnly.kt") public void testSetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SetterOnly.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCast.kt"); } @TestMetadata("SmartCastImplicitReceiver.kt") public void testSmartCastImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCastImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SmartCastImplicitReceiver.kt"); } @TestMetadata("SyntheticJavaPropertyReference.kt") public void testSyntheticJavaPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SyntheticJavaPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/SyntheticJavaPropertyReference.kt"); } @TestMetadata("TypeAnnotation.kt") public void testTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeAnnotation.kt"); } @TestMetadata("TypeParameterReceiver.kt") public void testTypeParameterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeParameterReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/javaProperties/TypeParameterReceiver.kt"); } } @@ -23514,110 +20782,97 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamAdapters extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Deprecated.kt"); } @TestMetadata("GenericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericClass.kt"); } @TestMetadata("GenericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethod.kt"); } @TestMetadata("GenericMethodInGenericClass.kt") public void testGenericMethodInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/GenericMethodInGenericClass.kt"); } @TestMetadata("InnerClassInGeneric.kt") public void testInnerClassInGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt"); } @TestMetadata("NoNamedArgsAllowed.kt") public void testNoNamedArgsAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt"); } @TestMetadata("overloadResolution.kt") public void testOverloadResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolution.kt"); } @TestMetadata("overloadResolutionStatic.kt") public void testOverloadResolutionStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStatic.kt"); } @TestMetadata("overloadResolutionStaticWithoutRefinedSams.kt") public void testOverloadResolutionStaticWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionStaticWithoutRefinedSams.kt"); } @TestMetadata("overloadResolutionWithoutRefinedSams.kt") public void testOverloadResolutionWithoutRefinedSams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/overloadResolutionWithoutRefinedSams.kt"); } @TestMetadata("PackageLocal.kt") public void testPackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PackageLocal.kt"); } @TestMetadata("ParameterTypeAnnotation.kt") public void testParameterTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt"); } @TestMetadata("PassNull.kt") public void testPassNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PassNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/PassNull.kt"); } @TestMetadata("Private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Private.kt"); } @TestMetadata("Protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Protected.kt"); } @TestMetadata("ReturnTypeAnnotation.kt") public void testReturnTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ReturnTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ReturnTypeAnnotation.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/Simple.kt"); } } } @@ -23626,94 +20881,89 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TargetedBuiltIns extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargetedBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("concurrentMapRemove.kt") public void testConcurrentMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/concurrentMapRemove.kt"); } @TestMetadata("forEachRemainingNullability.kt") public void testForEachRemainingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/forEachRemainingNullability.kt"); } @TestMetadata("getOrDefault.kt") public void testGetOrDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/getOrDefault.kt"); } @TestMetadata("mutableMapRemove.kt") public void testMutableMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/mutableMapRemove.kt"); } @TestMetadata("removeIf.kt") public void testRemoveIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/removeIf.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/removeIf.kt"); } @TestMetadata("stream.kt") public void testStream() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/stream.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BackwardCompatibility extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBackwardCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/basic.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/basic.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/delegation.kt"); } @TestMetadata("derivedInterfaces.kt") public void testDerivedInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfaces.kt"); } @TestMetadata("derivedInterfacesWithKotlinFun.kt") public void testDerivedInterfacesWithKotlinFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfacesWithKotlinFun.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/derivedInterfacesWithKotlinFun.kt"); } @TestMetadata("fillInStackTrace.kt") public void testFillInStackTrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/fillInStackTrace.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/fillInStackTrace.kt"); } @TestMetadata("finalize.kt") public void testFinalize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt"); } @TestMetadata("hashMapGetOrDefault.kt") public void testHashMapGetOrDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/hashMapGetOrDefault.kt"); } } } @@ -23722,184 +20972,164 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThisAndSuper extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThisAndSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambigousLabelOnThis.kt") public void testAmbigousLabelOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/ambigousLabelOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/ambigousLabelOnThis.kt"); } @TestMetadata("genericQualifiedSuperOverridden.kt") public void testGenericQualifiedSuperOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/genericQualifiedSuperOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/genericQualifiedSuperOverridden.kt"); } @TestMetadata("notAccessibleSuperInTrait.kt") public void testNotAccessibleSuperInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/notAccessibleSuperInTrait.kt"); } @TestMetadata("qualifiedSuperOverridden.kt") public void testQualifiedSuperOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/qualifiedSuperOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/qualifiedSuperOverridden.kt"); } @TestMetadata("QualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/QualifiedThis.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/QualifiedThis.kt"); } @TestMetadata("Super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/Super.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/Super.kt"); } @TestMetadata("superInExtensionFunction.kt") public void testSuperInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunction.kt"); } @TestMetadata("superInExtensionFunctionCall.kt") public void testSuperInExtensionFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superInExtensionFunctionCall.kt"); } @TestMetadata("superInToplevelFunction.kt") public void testSuperInToplevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superInToplevelFunction.kt"); } @TestMetadata("superIsNotAnExpression.kt") public void testSuperIsNotAnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/superIsNotAnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/superIsNotAnExpression.kt"); } @TestMetadata("thisInFunctionLiterals.kt") public void testThisInFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInFunctionLiterals.kt"); } @TestMetadata("thisInInnerClasses.kt") public void testThisInInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInInnerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInInnerClasses.kt"); } @TestMetadata("thisInPropertyInitializer.kt") public void testThisInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInPropertyInitializer.kt"); } @TestMetadata("thisInToplevelFunction.kt") public void testThisInToplevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/thisInToplevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/thisInToplevelFunction.kt"); } @TestMetadata("traitSuperCall.kt") public void testTraitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/traitSuperCall.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnqualifiedSuper extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnqualifiedSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousSuperWithGenerics.kt") public void testAmbiguousSuperWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt"); } @TestMetadata("unqualifiedSuper.kt") public void testUnqualifiedSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuper.kt"); } @TestMetadata("unqualifiedSuperWithAbstractMembers.kt") public void testUnqualifiedSuperWithAbstractMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithAbstractMembers.kt"); } @TestMetadata("unqualifiedSuperWithCallableProperty.kt") public void testUnqualifiedSuperWithCallableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt"); } @TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt") public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithDeeperHierarchies.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithDeeperHierarchies.kt"); } @TestMetadata("unqualifiedSuperWithGenerics.kt") public void testUnqualifiedSuperWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithGenerics.kt"); } @TestMetadata("unqualifiedSuperWithInnerClass.kt") public void testUnqualifiedSuperWithInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInnerClass.kt"); } @TestMetadata("unqualifiedSuperWithInterfaces.kt") public void testUnqualifiedSuperWithInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithInterfaces.kt"); } @TestMetadata("unqualifiedSuperWithLocalClass.kt") public void testUnqualifiedSuperWithLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithLocalClass.kt"); } @TestMetadata("unqualifiedSuperWithUnresolvedBase.kt") public void testUnqualifiedSuperWithUnresolvedBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithUnresolvedBase.kt"); } @TestMetadata("withMethodOfAnyOverridenInInterface.kt") public void testWithMethodOfAnyOverridenInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOfAnyOverridenInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOfAnyOverridenInInterface.kt"); } @TestMetadata("withMethodOverriddenInAnotherSupertype.kt") public void testWithMethodOverriddenInAnotherSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOverriddenInAnotherSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodOverriddenInAnotherSupertype.kt"); } @TestMetadata("withMethodsOfAny.kt") public void testWithMethodsOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodsOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/withMethodsOfAny.kt"); } } } @@ -23908,20 +21138,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TraitWithRequired extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTraitWithRequired() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/traitWithRequired"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("traitRequiresAny.kt") public void testTraitRequiresAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/traitWithRequired/traitRequiresAny.kt"); } @TestMetadata("traitSupertypeList.kt") public void testTraitSupertypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/traitWithRequired/traitSupertypeList.kt"); } } @@ -23929,62 +21161,57 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotHaveManyClassUpperBounds.kt") public void testCannotHaveManyClassUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/cannotHaveManyClassUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/cannotHaveManyClassUpperBounds.kt"); } @TestMetadata("deprecatedSyntax.kt") public void testDeprecatedSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/deprecatedSyntax.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/deprecatedSyntax.kt"); } @TestMetadata("extFunctionTypeAsUpperBound.kt") public void testExtFunctionTypeAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/extFunctionTypeAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/extFunctionTypeAsUpperBound.kt"); } @TestMetadata("functionTypeAsUpperBound.kt") public void testFunctionTypeAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/functionTypeAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/functionTypeAsUpperBound.kt"); } @TestMetadata("misplacedConstraints.kt") public void testMisplacedConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/misplacedConstraints.kt"); } @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParameters.kt"); } @TestMetadata("propertyTypeParametersWithUpperBounds.kt") public void testPropertyTypeParametersWithUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParametersWithUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/propertyTypeParametersWithUpperBounds.kt"); } @TestMetadata("repeatedBound.kt") public void testRepeatedBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/repeatedBound.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/repeatedBound.kt"); } @TestMetadata("upperBoundCannotBeArray.kt") public void testUpperBoundCannotBeArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typeParameters/upperBoundCannotBeArray.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typeParameters/upperBoundCannotBeArray.kt"); } } @@ -23992,10 +21219,13 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("aliasesOnly.kt") public void testAliasesOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/aliasesOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/aliasesOnly.kt"); } public void testAllFilesPresentInTypealias() throws Exception { @@ -24004,554 +21234,462 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/annotationsOnTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/annotationsOnTypeAliases.kt"); } @TestMetadata("boundViolationInTypeAliasConstructor.kt") public void testBoundViolationInTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt"); } @TestMetadata("boundsViolationInDeepTypeAliasExpansion.kt") public void testBoundsViolationInDeepTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt"); } @TestMetadata("boundsViolationInTypeAliasExpansion.kt") public void testBoundsViolationInTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt"); } @TestMetadata("boundsViolationInTypeAliasRHS.kt") public void testBoundsViolationInTypeAliasRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasRHS.kt"); } @TestMetadata("capturingTypeParametersFromOuterClass.kt") public void testCapturingTypeParametersFromOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/capturingTypeParametersFromOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/capturingTypeParametersFromOuterClass.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/classReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/classReference.kt"); } @TestMetadata("conflictingProjections.kt") public void testConflictingProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/conflictingProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/conflictingProjections.kt"); } @TestMetadata("constructorCallThroughPrivateAlias.kt") public void testConstructorCallThroughPrivateAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/constructorCallThroughPrivateAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/constructorCallThroughPrivateAlias.kt"); } @TestMetadata("cyclicInheritanceViaTypeAlias.kt") public void testCyclicInheritanceViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/cyclicInheritanceViaTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/cyclicInheritanceViaTypeAlias.kt"); } @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/enumEntryQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/enumEntryQualifier.kt"); } @TestMetadata("exposedExpandedType.kt") public void testExposedExpandedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/exposedExpandedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/exposedExpandedType.kt"); } @TestMetadata("functionTypeInTypeAlias.kt") public void testFunctionTypeInTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/functionTypeInTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/functionTypeInTypeAlias.kt"); } @TestMetadata("genericTypeAliasConstructor.kt") public void testGenericTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/genericTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/genericTypeAliasConstructor.kt"); } @TestMetadata("genericTypeAliasObject.kt") public void testGenericTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/genericTypeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/genericTypeAliasObject.kt"); } @TestMetadata("illegalTypeInTypeAliasExpansion.kt") public void testIllegalTypeInTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/illegalTypeInTypeAliasExpansion.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/illegalTypeInTypeAliasExpansion.kt"); } @TestMetadata("import.kt") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/import.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/import.kt"); } @TestMetadata("importFromTypeAliasObject.kt") public void testImportFromTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/importFromTypeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/importFromTypeAliasObject.kt"); } @TestMetadata("inGenerics.kt") public void testInGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inGenerics.kt"); } @TestMetadata("inSupertypesList.kt") public void testInSupertypesList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt"); } @TestMetadata("inheritedNestedTypeAlias.kt") public void testInheritedNestedTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inheritedNestedTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inheritedNestedTypeAlias.kt"); } @TestMetadata("inhreritedTypeAliasQualifiedByDerivedClass.kt") public void testInhreritedTypeAliasQualifiedByDerivedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inhreritedTypeAliasQualifiedByDerivedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/inhreritedTypeAliasQualifiedByDerivedClass.kt"); } @TestMetadata("innerClassTypeAliasConstructor.kt") public void testInnerClassTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt"); } @TestMetadata("innerClassTypeAliasConstructorInSupertypes.kt") public void testInnerClassTypeAliasConstructorInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } @TestMetadata("innerTypeAliasAsType.kt") public void testInnerTypeAliasAsType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType.kt"); } @TestMetadata("innerTypeAliasAsType2.kt") public void testInnerTypeAliasAsType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerTypeAliasAsType2.kt"); } @TestMetadata("innerTypeAliasConstructor.kt") public void testInnerTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt"); } @TestMetadata("isAsWithTypeAlias.kt") public void testIsAsWithTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/isAsWithTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/isAsWithTypeAlias.kt"); } @TestMetadata("javaStaticMembersViaTypeAlias.kt") public void testJavaStaticMembersViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/javaStaticMembersViaTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/javaStaticMembersViaTypeAlias.kt"); } @TestMetadata("kt14498.kt") public void testKt14498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14498.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14498.kt"); } @TestMetadata("kt14498a.kt") public void testKt14498a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14498a.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14498a.kt"); } @TestMetadata("kt14518.kt") public void testKt14518() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14518.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14518.kt"); } @TestMetadata("kt14641.kt") public void testKt14641() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt14641.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt14641.kt"); } @TestMetadata("kt15734.kt") public void testKt15734() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt15734.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt15734.kt"); } @TestMetadata("kt19601.kt") public void testKt19601() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/kt19601.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/kt19601.kt"); } @TestMetadata("localTypeAlias.kt") public void testLocalTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAlias.kt"); } @TestMetadata("localTypeAliasConstructor.kt") public void testLocalTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAliasConstructor.kt"); } @TestMetadata("localTypeAliasModifiers.kt") public void testLocalTypeAliasModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAliasModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAliasModifiers.kt"); } @TestMetadata("localTypeAliasRecursive.kt") public void testLocalTypeAliasRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/localTypeAliasRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/localTypeAliasRecursive.kt"); } @TestMetadata("methodReference.kt") public void testMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/methodReference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/methodReference.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/nested.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/nested.kt"); } @TestMetadata("nestedCapturingTypeParameters.kt") public void testNestedCapturingTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/nestedCapturingTypeParameters.kt"); } @TestMetadata("nestedSubstituted.kt") public void testNestedSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/nestedSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/nestedSubstituted.kt"); } @TestMetadata("noApproximationInTypeAliasArgumentSubstitution.kt") public void testNoApproximationInTypeAliasArgumentSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt"); } @TestMetadata("noRHS.kt") public void testNoRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/noRHS.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/noRHS.kt"); } @TestMetadata("parameterRestrictions.kt") public void testParameterRestrictions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/parameterRestrictions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/parameterRestrictions.kt"); } @TestMetadata("parameterSubstitution.kt") public void testParameterSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/parameterSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/parameterSubstitution.kt"); } @TestMetadata("privateInFile.kt") public void testPrivateInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/privateInFile.kt"); } @TestMetadata("projectionsInTypeAliasConstructor.kt") public void testProjectionsInTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/projectionsInTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/projectionsInTypeAliasConstructor.kt"); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/recursive.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/recursive.kt"); } @TestMetadata("returnTypeNothingShouldBeSpecifiedExplicitly.kt") public void testReturnTypeNothingShouldBeSpecifiedExplicitly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/returnTypeNothingShouldBeSpecifiedExplicitly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/returnTypeNothingShouldBeSpecifiedExplicitly.kt"); } @TestMetadata("simpleTypeAlias.kt") public void testSimpleTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/simpleTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/simpleTypeAlias.kt"); } @TestMetadata("starProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/starProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/starProjection.kt"); } @TestMetadata("starProjectionInTypeAliasArgument.kt") public void testStarProjectionInTypeAliasArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/starProjectionInTypeAliasArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/starProjectionInTypeAliasArgument.kt"); } @TestMetadata("substitutionVariance.kt") public void testSubstitutionVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/substitutionVariance.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/substitutionVariance.kt"); } @TestMetadata("throwJLException.kt") public void testThrowJLException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/throwJLException.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/throwJLException.kt"); } @TestMetadata("topLevelTypeAliasesOnly.kt") public void testTopLevelTypeAliasesOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/topLevelTypeAliasesOnly.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/topLevelTypeAliasesOnly.kt"); } @TestMetadata("typeAliasArgumentsInCompanionObject.kt") public void testTypeAliasArgumentsInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInCompanionObject.kt"); } @TestMetadata("typeAliasArgumentsInConstructor.kt") public void testTypeAliasArgumentsInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasArgumentsInConstructor.kt"); } @TestMetadata("typeAliasAsBareType.kt") public void testTypeAliasAsBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasAsBareType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasAsBareType.kt"); } @TestMetadata("typeAliasAsQualifier.kt") public void testTypeAliasAsQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasAsQualifier.kt"); } @TestMetadata("typeAliasAsSuperQualifier.kt") public void testTypeAliasAsSuperQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasAsSuperQualifier.kt"); } @TestMetadata("typeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructor.kt"); } @TestMetadata("typeAliasConstructorCrazyProjections.kt") public void testTypeAliasConstructorCrazyProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt"); } @TestMetadata("typeAliasConstructorForInterface.kt") public void testTypeAliasConstructorForInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForInterface.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForInterface.kt"); } @TestMetadata("typeAliasConstructorForProjection.kt") public void testTypeAliasConstructorForProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt"); } @TestMetadata("typeAliasConstructorForProjectionInSupertypes.kt") public void testTypeAliasConstructorForProjectionInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt"); } @TestMetadata("typeAliasConstructorInSuperCall.kt") public void testTypeAliasConstructorInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInSuperCall.kt"); } @TestMetadata("typeAliasConstructorInferenceInSupertypesList.kt") public void testTypeAliasConstructorInferenceInSupertypesList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInferenceInSupertypesList.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorInferenceInSupertypesList.kt"); } @TestMetadata("typeAliasConstructorReturnType.kt") public void testTypeAliasConstructorReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorReturnType.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInference.kt") public void testTypeAliasConstructorTypeArgumentsInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt") public void testTypeAliasConstructorTypeArgumentsInferenceWithNestedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt") public void testTypeAliasConstructorTypeArgumentsInferenceWithNestedCalls2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt"); } @TestMetadata("typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt") public void testTypeAliasConstructorTypeArgumentsInferenceWithPhantomTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt"); } @TestMetadata("typeAliasConstructorVsFunction.kt") public void testTypeAliasConstructorVsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorVsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorVsFunction.kt"); } @TestMetadata("typeAliasConstructorWrongClass.kt") public void testTypeAliasConstructorWrongClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongClass.kt"); } @TestMetadata("typeAliasConstructorWrongVisibility.kt") public void testTypeAliasConstructorWrongVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt"); } @TestMetadata("typeAliasExpansionRepeatedAnnotations.kt") public void testTypeAliasExpansionRepeatedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasExpansionRepeatedAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasExpansionRepeatedAnnotations.kt"); } @TestMetadata("typeAliasForProjectionInSuperInterfaces.kt") public void testTypeAliasForProjectionInSuperInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasForProjectionInSuperInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasForProjectionInSuperInterfaces.kt"); } @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasInAnonymousObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasInAnonymousObjectType.kt"); } @TestMetadata("typeAliasInvisibleObject.kt") public void testTypeAliasInvisibleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasInvisibleObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasInvisibleObject.kt"); } @TestMetadata("typeAliasNotNull.kt") public void testTypeAliasNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasNotNull.kt"); } @TestMetadata("typeAliasObject.kt") public void testTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasObject.kt"); } @TestMetadata("typeAliasObjectWithInvoke.kt") public void testTypeAliasObjectWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasObjectWithInvoke.kt"); } @TestMetadata("typeAliasShouldExpandToClass.kt") public void testTypeAliasShouldExpandToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typeAliasShouldExpandToClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typeAliasShouldExpandToClass.kt"); } @TestMetadata("typealiasRhsAnnotations.kt") public void testTypealiasRhsAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotations.kt"); } @TestMetadata("typealiasRhsAnnotationsInArguments.kt") public void testTypealiasRhsAnnotationsInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotationsInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsAnnotationsInArguments.kt"); } @TestMetadata("typealiasRhsRepeatedAnnotationInArguments.kt") public void testTypealiasRhsRepeatedAnnotationInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotationInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotationInArguments.kt"); } @TestMetadata("typealiasRhsRepeatedAnnotations.kt") public void testTypealiasRhsRepeatedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/typealiasRhsRepeatedAnnotations.kt"); } @TestMetadata("unsupportedTypeAlias.kt") public void testUnsupportedTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/unsupportedTypeAlias.kt"); } @TestMetadata("unusedTypeAliasParameter.kt") public void testUnusedTypeAliasParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/unusedTypeAliasParameter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/unusedTypeAliasParameter.kt"); } @TestMetadata("wrongNumberOfArgumentsInTypeAliasConstructor.kt") public void testWrongNumberOfArgumentsInTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt"); } } @@ -24559,20 +21697,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnderscoresInNumericLiterals extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnderscoresInNumericLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/underscoresInNumericLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("illegalUnderscores.kt") public void testIllegalUnderscores() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/illegalUnderscores.kt"); } @TestMetadata("noUnderscores.kt") public void testNoUnderscores() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/underscoresInNumericLiterals/noUnderscores.kt"); } } @@ -24580,14 +21720,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unit extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/unit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nullableUnit.kt") public void testNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/unit/nullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/unit/nullableUnit.kt"); } } @@ -24595,158 +21738,137 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousVararg.kt") public void testAmbiguousVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/AmbiguousVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/AmbiguousVararg.kt"); } @TestMetadata("assignNonConstSingleArrayElementAsVarargInAnnotation.kt") public void testAssignNonConstSingleArrayElementAsVarargInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotation.kt"); } @TestMetadata("assignNonConstSingleArrayElementAsVarargInAnnotationError.kt") public void testAssignNonConstSingleArrayElementAsVarargInAnnotationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assignNonConstSingleArrayElementAsVarargInAnnotationError.kt"); } @TestMetadata("assigningArraysToVarargsInAnnotations.kt") public void testAssigningArraysToVarargsInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt"); } @TestMetadata("assigningSingleElementsInNamedFormAnnDeprecation.kt") public void testAssigningSingleElementsInNamedFormAnnDeprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormAnnDeprecation.kt"); } @TestMetadata("assigningSingleElementsInNamedFormFunDeprecation.kt") public void testAssigningSingleElementsInNamedFormFunDeprecation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/assigningSingleElementsInNamedFormFunDeprecation.kt"); } @TestMetadata("kt1781.kt") public void testKt1781() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1781.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1781.kt"); } @TestMetadata("kt1835.kt") public void testKt1835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1835.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1835.kt"); } @TestMetadata("kt1838-param.kt") public void testKt1838_param() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1838-param.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1838-param.kt"); } @TestMetadata("kt1838-val.kt") public void testKt1838_val() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt1838-val.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt1838-val.kt"); } @TestMetadata("kt2163.kt") public void testKt2163() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt2163.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt2163.kt"); } @TestMetadata("kt422.kt") public void testKt422() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/kt422.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/kt422.kt"); } @TestMetadata("MoreSpecificVarargsOfEqualLength.kt") public void testMoreSpecificVarargsOfEqualLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/MoreSpecificVarargsOfEqualLength.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/MoreSpecificVarargsOfEqualLength.kt"); } @TestMetadata("MostSepcificVarargsWithJava.kt") public void testMostSepcificVarargsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/MostSepcificVarargsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/MostSepcificVarargsWithJava.kt"); } @TestMetadata("NilaryVsVararg.kt") public void testNilaryVsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/NilaryVsVararg.kt"); } @TestMetadata("noAssigningArraysToVarargsFeature.kt") public void testNoAssigningArraysToVarargsFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt"); } @TestMetadata("NullableTypeForVarargArgument.kt") public void testNullableTypeForVarargArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt"); } @TestMetadata("UnaryVsVararg.kt") public void testUnaryVsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/UnaryVsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/UnaryVsVararg.kt"); } @TestMetadata("varargInSetter.kt") public void testVarargInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargInSetter.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargInSetter.kt"); } @TestMetadata("varargIterator.kt") public void testVarargIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargIterator.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargIterator.kt"); } @TestMetadata("varargOfNothing.kt") public void testVarargOfNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargOfNothing.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargOfNothing.kt"); } @TestMetadata("varargsAndFunctionLiterals.kt") public void testVarargsAndFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndFunctionLiterals.kt"); } @TestMetadata("varargsAndOut1.kt") public void testVarargsAndOut1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndOut1.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndOut1.kt"); } @TestMetadata("varargsAndOut2.kt") public void testVarargsAndOut2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndOut2.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndOut2.kt"); } @TestMetadata("varargsAndPair.kt") public void testVarargsAndPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/varargs/varargsAndPair.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/varargs/varargsAndPair.kt"); } } @@ -24754,90 +21876,85 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variance extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/variance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/Class.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/Class.kt"); } @TestMetadata("ea1337846.kt") public void testEa1337846() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/ea1337846.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/ea1337846.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/Function.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/Function.kt"); } @TestMetadata("FunctionTypes.kt") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/FunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/FunctionTypes.kt"); } @TestMetadata("InPosition.kt") public void testInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/InPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/InPosition.kt"); } @TestMetadata("InvariantPosition.kt") public void testInvariantPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/InvariantPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/InvariantPosition.kt"); } @TestMetadata("NullableTypes.kt") public void testNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/NullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/NullableTypes.kt"); } @TestMetadata("OutPosition.kt") public void testOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/OutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/OutPosition.kt"); } @TestMetadata("PrimaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/PrimaryConstructor.kt"); } @TestMetadata("ValProperty.kt") public void testValProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/ValProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/ValProperty.kt"); } @TestMetadata("VarProperty.kt") public void testVarProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/VarProperty.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/VarProperty.kt"); } @TestMetadata("Visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/Visibility.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/Visibility.kt"); } @TestMetadata("compiler/testData/diagnostics/tests/variance/privateToThis") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateToThis extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/Abstract.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/Abstract.kt"); } public void testAllFilesPresentInPrivateToThis() throws Exception { @@ -24846,26 +21963,22 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestMetadata("FunctionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.kt"); } @TestMetadata("GetVal.kt") public void testGetVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/GetVal.kt"); } @TestMetadata("SetVar.kt") public void testSetVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.kt"); } @TestMetadata("ValReassigned.kt") public void testValReassigned() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/variance/privateToThis/ValReassigned.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/variance/privateToThis/ValReassigned.kt"); } } } @@ -24874,386 +21987,327 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedWhenStatement.kt") public void testAnnotatedWhenStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/AnnotatedWhenStatement.kt"); } @TestMetadata("BranchBypassVal.kt") public void testBranchBypassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchBypassVal.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchBypassVal.kt"); } @TestMetadata("BranchBypassVar.kt") public void testBranchBypassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchBypassVar.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchBypassVar.kt"); } @TestMetadata("BranchFalseBypass.kt") public void testBranchFalseBypass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchFalseBypass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchFalseBypass.kt"); } @TestMetadata("BranchFalseBypassElse.kt") public void testBranchFalseBypassElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/BranchFalseBypassElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/BranchFalseBypassElse.kt"); } @TestMetadata("CommaInWhenConditionWithoutArgument.kt") public void testCommaInWhenConditionWithoutArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/CommaInWhenConditionWithoutArgument.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/CommaInWhenConditionWithoutArgument.kt"); } @TestMetadata("DuplicatedLabels.kt") public void testDuplicatedLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/DuplicatedLabels.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/DuplicatedLabels.kt"); } @TestMetadata("ElseOnNullableEnum.kt") public void testElseOnNullableEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ElseOnNullableEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ElseOnNullableEnum.kt"); } @TestMetadata("ElseOnNullableEnumWithSmartCast.kt") public void testElseOnNullableEnumWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ElseOnNullableEnumWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ElseOnNullableEnumWithSmartCast.kt"); } @TestMetadata("EmptyConditionWithExpression.kt") public void testEmptyConditionWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpression.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpression.kt"); } @TestMetadata("EmptyConditionWithExpressionEnum.kt") public void testEmptyConditionWithExpressionEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpressionEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/EmptyConditionWithExpressionEnum.kt"); } @TestMetadata("ExhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBoolean.kt"); } @TestMetadata("ExhaustiveBooleanBrackets.kt") public void testExhaustiveBooleanBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanBrackets.kt"); } @TestMetadata("ExhaustiveBooleanComplex.kt") public void testExhaustiveBooleanComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanComplex.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanComplex.kt"); } @TestMetadata("ExhaustiveBooleanNullable.kt") public void testExhaustiveBooleanNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBooleanNullable.kt"); } @TestMetadata("ExhaustiveBreakContinue.kt") public void testExhaustiveBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveBreakContinue.kt"); } @TestMetadata("ExhaustiveEnumIs.kt") public void testExhaustiveEnumIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveEnumIs.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveEnumIs.kt"); } @TestMetadata("ExhaustiveEnumMixed.kt") public void testExhaustiveEnumMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveEnumMixed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveEnumMixed.kt"); } @TestMetadata("ExhaustiveInitialization.kt") public void testExhaustiveInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveInitialization.kt"); } @TestMetadata("ExhaustiveNoInitialization.kt") public void testExhaustiveNoInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveNoInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveNoInitialization.kt"); } @TestMetadata("ExhaustiveNullable.kt") public void testExhaustiveNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveNullable.kt"); } @TestMetadata("ExhaustivePlatformEnum.kt") public void testExhaustivePlatformEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnum.kt"); } @TestMetadata("ExhaustivePlatformEnumAnnotated.kt") public void testExhaustivePlatformEnumAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumAnnotated.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumAnnotated.kt"); } @TestMetadata("ExhaustivePlatformEnumElse.kt") public void testExhaustivePlatformEnumElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumElse.kt"); } @TestMetadata("ExhaustivePlatformEnumNull.kt") public void testExhaustivePlatformEnumNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumNull.kt"); } @TestMetadata("ExhaustivePlatformEnumStatement.kt") public void testExhaustivePlatformEnumStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustivePlatformEnumStatement.kt"); } @TestMetadata("ExhaustiveReturn.kt") public void testExhaustiveReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveReturn.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveReturn.kt"); } @TestMetadata("ExhaustiveReturnThrow.kt") public void testExhaustiveReturnThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveReturnThrow.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveReturnThrow.kt"); } @TestMetadata("ExhaustiveValOverConditionalInit.kt") public void testExhaustiveValOverConditionalInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveValOverConditionalInit.kt"); } @TestMetadata("ExhaustiveVarOverConditionalInit.kt") public void testExhaustiveVarOverConditionalInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveVarOverConditionalInit.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheck.kt") public void testExhaustiveWithNullabilityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheck.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheckBefore.kt") public void testExhaustiveWithNullabilityCheckBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBefore.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBefore.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheckBoolean.kt") public void testExhaustiveWithNullabilityCheckBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckBoolean.kt"); } @TestMetadata("ExhaustiveWithNullabilityCheckElse.kt") public void testExhaustiveWithNullabilityCheckElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ExhaustiveWithNullabilityCheckElse.kt"); } @TestMetadata("kt10439.kt") public void testKt10439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt10439.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt10439.kt"); } @TestMetadata("kt10809.kt") public void testKt10809() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt10809.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt10809.kt"); } @TestMetadata("kt10811.kt") public void testKt10811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt10811.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt10811.kt"); } @TestMetadata("kt4434.kt") public void testKt4434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt4434.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt4434.kt"); } @TestMetadata("kt9929.kt") public void testKt9929() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt9929.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt9929.kt"); } @TestMetadata("kt9972.kt") public void testKt9972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/kt9972.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/kt9972.kt"); } @TestMetadata("NoElseExpectedUnit.kt") public void testNoElseExpectedUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseExpectedUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseExpectedUnit.kt"); } @TestMetadata("NoElseNoExpectedType.kt") public void testNoElseNoExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseNoExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseNoExpectedType.kt"); } @TestMetadata("NoElseReturnedCoercionToUnit.kt") public void testNoElseReturnedCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedCoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedCoercionToUnit.kt"); } @TestMetadata("NoElseReturnedFromLambdaExpectedInt.kt") public void testNoElseReturnedFromLambdaExpectedInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedFromLambdaExpectedInt.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedFromLambdaExpectedInt.kt"); } @TestMetadata("NoElseReturnedNonUnit.kt") public void testNoElseReturnedNonUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedNonUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedNonUnit.kt"); } @TestMetadata("NoElseReturnedUnit.kt") public void testNoElseReturnedUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseReturnedUnit.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseReturnedUnit.kt"); } @TestMetadata("NoElseWhenStatement.kt") public void testNoElseWhenStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NoElseWhenStatement.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NoElseWhenStatement.kt"); } @TestMetadata("NonExhaustiveBooleanNullable.kt") public void testNonExhaustiveBooleanNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveBooleanNullable.kt"); } @TestMetadata("NonExhaustivePlatformEnum.kt") public void testNonExhaustivePlatformEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustivePlatformEnum.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustivePlatformEnum.kt"); } @TestMetadata("NonExhaustiveWarning.kt") public void testNonExhaustiveWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarning.kt"); } @TestMetadata("NonExhaustiveWarningElse.kt") public void testNonExhaustiveWarningElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningElse.kt"); } @TestMetadata("NonExhaustiveWarningFalse.kt") public void testNonExhaustiveWarningFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningFalse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningFalse.kt"); } @TestMetadata("NonExhaustiveWarningForSealedClass.kt") public void testNonExhaustiveWarningForSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningForSealedClass.kt"); } @TestMetadata("NonExhaustiveWarningNull.kt") public void testNonExhaustiveWarningNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWarningNull.kt"); } @TestMetadata("NonExhaustiveWithNullabilityCheck.kt") public void testNonExhaustiveWithNullabilityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/NonExhaustiveWithNullabilityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/NonExhaustiveWithNullabilityCheck.kt"); } @TestMetadata("PropertyNotInitialized.kt") public void testPropertyNotInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/PropertyNotInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/PropertyNotInitialized.kt"); } @TestMetadata("RedundantElse.kt") public void testRedundantElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/RedundantElse.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/RedundantElse.kt"); } @TestMetadata("ReservedExhaustiveWhen.kt") public void testReservedExhaustiveWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/ReservedExhaustiveWhen.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/ReservedExhaustiveWhen.kt"); } @TestMetadata("TopLevelSealed.kt") public void testTopLevelSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/TopLevelSealed.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/TopLevelSealed.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/When.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/When.kt"); } @TestMetadata("whenAndLambdaWithExpectedType.kt") public void testWhenAndLambdaWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt"); } @TestMetadata("WhenTypeDisjunctions.kt") public void testWhenTypeDisjunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/WhenTypeDisjunctions.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/WhenTypeDisjunctions.kt"); } @TestMetadata("whenWithNothingAndLambdas.kt") public void testWhenWithNothingAndLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt"); } } } @@ -25262,6 +22316,10 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Diagnostics extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -25270,6 +22328,10 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -25278,14 +22340,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt6176.kt") public void testKt6176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); } } @@ -25293,6 +22358,10 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -25301,68 +22370,62 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnObjects extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOnObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass1.kt") public void testInvokeOnClassObjectOfNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass2.kt") public void testInvokeOnClassObjectOfNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); } @TestMetadata("invokeOnEnum1.kt") public void testInvokeOnEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); } @TestMetadata("invokeOnEnum2.kt") public void testInvokeOnEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); } @TestMetadata("invokeOnImportedEnum1.kt") public void testInvokeOnImportedEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); } @TestMetadata("invokeOnImportedEnum2.kt") public void testInvokeOnImportedEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); } } } @@ -25371,230 +22434,197 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailRecursion extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailRecursion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); } @TestMetadata("defaultArgsOverridden.kt") public void testDefaultArgsOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); } @TestMetadata("extensionTailCall.kt") public void testExtensionTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); } @TestMetadata("functionWithNoTails.kt") public void testFunctionWithNoTails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); } @TestMetadata("functionWithNonTailRecursions.kt") public void testFunctionWithNonTailRecursions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); } @TestMetadata("functionWithoutAnnotation.kt") public void testFunctionWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); } @TestMetadata("insideElvis.kt") public void testInsideElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); } @TestMetadata("labeledThisReferences.kt") public void testLabeledThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); } @TestMetadata("loops.kt") public void testLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); } @TestMetadata("multilevelBlocks.kt") public void testMultilevelBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); } @TestMetadata("recursiveCallInLambda.kt") public void testRecursiveCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); } @TestMetadata("recursiveCallInLocalFunction.kt") public void testRecursiveCallInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); } @TestMetadata("recursiveInnerFunction.kt") public void testRecursiveInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); } @TestMetadata("returnIf.kt") public void testReturnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); } @TestMetadata("returnInCatch.kt") public void testReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); } @TestMetadata("returnInIfInFinally.kt") public void testReturnInIfInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); } @TestMetadata("simpleBlock.kt") public void testSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); } @TestMetadata("simpleReturnWithElse.kt") public void testSimpleReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); } @TestMetadata("tailRecursionInFinally.kt") public void testTailRecursionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); } @TestMetadata("thisReferences.kt") public void testThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); } @TestMetadata("unitBlocks.kt") public void testUnitBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); } @TestMetadata("whenWithCondition.kt") public void testWhenWithCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); } @TestMetadata("whenWithInRange.kt") public void testWhenWithInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); } @TestMetadata("whenWithoutCondition.kt") public void testWhenWithoutCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); } } } @@ -25603,14 +22633,17 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractDiagnosticsUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt4172.kt") public void testKt4172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacDiagnosticsTestGenerated.java index 556c9493ba4..3055c7a0456 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacDiagnosticsTestGenerated.java @@ -23,124 +23,114 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tests extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/Annotations.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/Annotations.kt"); } @TestMetadata("compiler/testData/javac/diagnostics/tests/imports") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AllUnderImportsAmbiguity.kt") public void testAllUnderImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); } @TestMetadata("AllUnderImportsLessPriority.kt") public void testAllUnderImportsLessPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); } @TestMetadata("ClassImportsConflicting.kt") public void testClassImportsConflicting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ClassImportsConflicting.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ClassImportsConflicting.kt"); } @TestMetadata("CurrentPackageAndAllUnderImport.kt") public void testCurrentPackageAndAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); } @TestMetadata("CurrentPackageAndExplicitImport.kt") public void testCurrentPackageAndExplicitImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); } @TestMetadata("CurrentPackageAndExplicitNestedImport.kt") public void testCurrentPackageAndExplicitNestedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitNestedImport.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitNestedImport.kt"); } @TestMetadata("CurrentPackageAndNestedAsteriskImport.kt") public void testCurrentPackageAndNestedAsteriskImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndNestedAsteriskImport.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndNestedAsteriskImport.kt"); } @TestMetadata("ImportGenericVsPackage.kt") public void testImportGenericVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportGenericVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportGenericVsPackage.kt"); } @TestMetadata("ImportProtectedClass.kt") public void testImportProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportProtectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportProtectedClass.kt"); } @TestMetadata("ImportTwoTimes.kt") public void testImportTwoTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimes.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimes.kt"); } @TestMetadata("ImportTwoTimesStar.kt") public void testImportTwoTimesStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimesStar.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimesStar.kt"); } @TestMetadata("NestedAndTopLevelClassClash.kt") public void testNestedAndTopLevelClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedAndTopLevelClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/NestedAndTopLevelClassClash.kt"); } @TestMetadata("NestedClassClash.kt") public void testNestedClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/NestedClassClash.kt"); } @TestMetadata("PackageExplicitAndStartImport.kt") public void testPackageExplicitAndStartImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackageExplicitAndStartImport.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/PackageExplicitAndStartImport.kt"); } @TestMetadata("PackagePrivateAndPublicNested.kt") public void testPackagePrivateAndPublicNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackagePrivateAndPublicNested.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/PackagePrivateAndPublicNested.kt"); } @TestMetadata("TopLevelClassVsPackage.kt") public void testTopLevelClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); } @TestMetadata("TopLevelClassVsPackage2.kt") public void testTopLevelClassVsPackage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage2.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage2.kt"); } } @@ -148,122 +138,107 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("IheritanceOfInner.kt") public void testIheritanceOfInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/IheritanceOfInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/IheritanceOfInner.kt"); } @TestMetadata("InheritanceAmbiguity.kt") public void testInheritanceAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity.kt"); } @TestMetadata("InheritanceAmbiguity2.kt") public void testInheritanceAmbiguity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity2.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity2.kt"); } @TestMetadata("InheritanceAmbiguity3.kt") public void testInheritanceAmbiguity3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity3.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity3.kt"); } @TestMetadata("InheritanceAmbiguity4.kt") public void testInheritanceAmbiguity4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity4.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity4.kt"); } @TestMetadata("InheritanceWithKotlin.kt") public void testInheritanceWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlin.kt"); } @TestMetadata("InheritanceWithKotlinClasses.kt") public void testInheritanceWithKotlinClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlinClasses.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlinClasses.kt"); } @TestMetadata("InheritedInner.kt") public void testInheritedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner.kt"); } @TestMetadata("InheritedInner2.kt") public void testInheritedInner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner2.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner2.kt"); } @TestMetadata("InheritedInnerAndSupertypeWithSameName.kt") public void testInheritedInnerAndSupertypeWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerAndSupertypeWithSameName.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerAndSupertypeWithSameName.kt"); } @TestMetadata("InheritedInnerUsageInInner.kt") public void testInheritedInnerUsageInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerUsageInInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerUsageInInner.kt"); } @TestMetadata("InheritedKotlinInner.kt") public void testInheritedKotlinInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedKotlinInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedKotlinInner.kt"); } @TestMetadata("InnerAndInheritedInner.kt") public void testInnerAndInheritedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InnerAndInheritedInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InnerAndInheritedInner.kt"); } @TestMetadata("ManyInheritedClasses.kt") public void testManyInheritedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/ManyInheritedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/ManyInheritedClasses.kt"); } @TestMetadata("NoAmbiguity.kt") public void testNoAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity.kt"); } @TestMetadata("NoAmbiguity2.kt") public void testNoAmbiguity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity2.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity2.kt"); } @TestMetadata("SameInnersInSupertypeAndSupertypesSupertype.kt") public void testSameInnersInSupertypeAndSupertypesSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SameInnersInSupertypeAndSupertypesSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/SameInnersInSupertypeAndSupertypesSupertype.kt"); } @TestMetadata("SuperTypeWithSameInner.kt") public void testSuperTypeWithSameInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SuperTypeWithSameInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/SuperTypeWithSameInner.kt"); } @TestMetadata("SupertypeInnerAndTypeParameterWithSameNames.kt") public void testSupertypeInnerAndTypeParameterWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SupertypeInnerAndTypeParameterWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/SupertypeInnerAndTypeParameterWithSameNames.kt"); } } @@ -271,50 +246,47 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inners extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInners() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inners"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ComplexCase.kt") public void testComplexCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ComplexCase.kt"); } @TestMetadata("ComplexCase2.kt") public void testComplexCase2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase2.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ComplexCase2.kt"); } @TestMetadata("CurrentPackageAndInner.kt") public void testCurrentPackageAndInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/CurrentPackageAndInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/CurrentPackageAndInner.kt"); } @TestMetadata("ImportThriceNestedClass.kt") public void testImportThriceNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ImportThriceNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ImportThriceNestedClass.kt"); } @TestMetadata("InnerInInner.kt") public void testInnerInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/InnerInInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/InnerInInner.kt"); } @TestMetadata("Nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/Nested.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/Nested.kt"); } @TestMetadata("ThriceNestedClass.kt") public void testThriceNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ThriceNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ThriceNestedClass.kt"); } } @@ -322,38 +294,37 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("GenericClassVsPackage.kt") public void testGenericClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); } @TestMetadata("PackageVsClass.kt") public void testPackageVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); } @TestMetadata("PackageVsClass2.kt") public void testPackageVsClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); } @TestMetadata("PackageVsRootClass.kt") public void testPackageVsRootClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); } @TestMetadata("visibleClassVsQualifiedClass.kt") public void testVisibleClassVsQualifiedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); } } @@ -361,50 +332,47 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Clash.kt") public void testClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/Clash.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/Clash.kt"); } @TestMetadata("ComplexCase.kt") public void testComplexCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/ComplexCase.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/ComplexCase.kt"); } @TestMetadata("InheritedInnerAndTypeParameterWithSameNames.kt") public void testInheritedInnerAndTypeParameterWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InheritedInnerAndTypeParameterWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/InheritedInnerAndTypeParameterWithSameNames.kt"); } @TestMetadata("InnerWithTypeParameter.kt") public void testInnerWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InnerWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/InnerWithTypeParameter.kt"); } @TestMetadata("NestedWithInner.kt") public void testNestedWithInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/NestedWithInner.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/NestedWithInner.kt"); } @TestMetadata("SeveralInnersWithTypeParameters.kt") public void testSeveralInnersWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/SeveralInnersWithTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/SeveralInnersWithTypeParameters.kt"); } @TestMetadata("TypeParametersInInnerAndOuterWithSameNames.kt") public void testTypeParametersInInnerAndOuterWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/TypeParametersInInnerAndOuterWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/TypeParametersInInnerAndOuterWithSameNames.kt"); } } } @@ -413,124 +381,114 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TestsWithoutJavac extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestsWithoutJavac() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/Annotations.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/Annotations.kt"); } @TestMetadata("compiler/testData/javac/diagnostics/tests/imports") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AllUnderImportsAmbiguity.kt") public void testAllUnderImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsAmbiguity.kt"); } @TestMetadata("AllUnderImportsLessPriority.kt") public void testAllUnderImportsLessPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/AllUnderImportsLessPriority.kt"); } @TestMetadata("ClassImportsConflicting.kt") public void testClassImportsConflicting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ClassImportsConflicting.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ClassImportsConflicting.kt"); } @TestMetadata("CurrentPackageAndAllUnderImport.kt") public void testCurrentPackageAndAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndAllUnderImport.kt"); } @TestMetadata("CurrentPackageAndExplicitImport.kt") public void testCurrentPackageAndExplicitImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitImport.kt"); } @TestMetadata("CurrentPackageAndExplicitNestedImport.kt") public void testCurrentPackageAndExplicitNestedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitNestedImport.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndExplicitNestedImport.kt"); } @TestMetadata("CurrentPackageAndNestedAsteriskImport.kt") public void testCurrentPackageAndNestedAsteriskImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndNestedAsteriskImport.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/CurrentPackageAndNestedAsteriskImport.kt"); } @TestMetadata("ImportGenericVsPackage.kt") public void testImportGenericVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportGenericVsPackage.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportGenericVsPackage.kt"); } @TestMetadata("ImportProtectedClass.kt") public void testImportProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportProtectedClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportProtectedClass.kt"); } @TestMetadata("ImportTwoTimes.kt") public void testImportTwoTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimes.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimes.kt"); } @TestMetadata("ImportTwoTimesStar.kt") public void testImportTwoTimesStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimesStar.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/ImportTwoTimesStar.kt"); } @TestMetadata("NestedAndTopLevelClassClash.kt") public void testNestedAndTopLevelClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedAndTopLevelClassClash.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/NestedAndTopLevelClassClash.kt"); } @TestMetadata("NestedClassClash.kt") public void testNestedClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/NestedClassClash.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/NestedClassClash.kt"); } @TestMetadata("PackageExplicitAndStartImport.kt") public void testPackageExplicitAndStartImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackageExplicitAndStartImport.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/PackageExplicitAndStartImport.kt"); } @TestMetadata("PackagePrivateAndPublicNested.kt") public void testPackagePrivateAndPublicNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/PackagePrivateAndPublicNested.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/PackagePrivateAndPublicNested.kt"); } @TestMetadata("TopLevelClassVsPackage.kt") public void testTopLevelClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage.kt"); } @TestMetadata("TopLevelClassVsPackage2.kt") public void testTopLevelClassVsPackage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage2.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/imports/TopLevelClassVsPackage2.kt"); } } @@ -538,122 +496,107 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("IheritanceOfInner.kt") public void testIheritanceOfInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/IheritanceOfInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/IheritanceOfInner.kt"); } @TestMetadata("InheritanceAmbiguity.kt") public void testInheritanceAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity.kt"); } @TestMetadata("InheritanceAmbiguity2.kt") public void testInheritanceAmbiguity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity2.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity2.kt"); } @TestMetadata("InheritanceAmbiguity3.kt") public void testInheritanceAmbiguity3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity3.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity3.kt"); } @TestMetadata("InheritanceAmbiguity4.kt") public void testInheritanceAmbiguity4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity4.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceAmbiguity4.kt"); } @TestMetadata("InheritanceWithKotlin.kt") public void testInheritanceWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlin.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlin.kt"); } @TestMetadata("InheritanceWithKotlinClasses.kt") public void testInheritanceWithKotlinClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlinClasses.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritanceWithKotlinClasses.kt"); } @TestMetadata("InheritedInner.kt") public void testInheritedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner.kt"); } @TestMetadata("InheritedInner2.kt") public void testInheritedInner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner2.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInner2.kt"); } @TestMetadata("InheritedInnerAndSupertypeWithSameName.kt") public void testInheritedInnerAndSupertypeWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerAndSupertypeWithSameName.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerAndSupertypeWithSameName.kt"); } @TestMetadata("InheritedInnerUsageInInner.kt") public void testInheritedInnerUsageInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerUsageInInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedInnerUsageInInner.kt"); } @TestMetadata("InheritedKotlinInner.kt") public void testInheritedKotlinInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InheritedKotlinInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InheritedKotlinInner.kt"); } @TestMetadata("InnerAndInheritedInner.kt") public void testInnerAndInheritedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/InnerAndInheritedInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/InnerAndInheritedInner.kt"); } @TestMetadata("ManyInheritedClasses.kt") public void testManyInheritedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/ManyInheritedClasses.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/ManyInheritedClasses.kt"); } @TestMetadata("NoAmbiguity.kt") public void testNoAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity.kt"); } @TestMetadata("NoAmbiguity2.kt") public void testNoAmbiguity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity2.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/NoAmbiguity2.kt"); } @TestMetadata("SameInnersInSupertypeAndSupertypesSupertype.kt") public void testSameInnersInSupertypeAndSupertypesSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SameInnersInSupertypeAndSupertypesSupertype.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/SameInnersInSupertypeAndSupertypesSupertype.kt"); } @TestMetadata("SuperTypeWithSameInner.kt") public void testSuperTypeWithSameInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SuperTypeWithSameInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/SuperTypeWithSameInner.kt"); } @TestMetadata("SupertypeInnerAndTypeParameterWithSameNames.kt") public void testSupertypeInnerAndTypeParameterWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inheritance/SupertypeInnerAndTypeParameterWithSameNames.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inheritance/SupertypeInnerAndTypeParameterWithSameNames.kt"); } } @@ -661,50 +604,47 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inners extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInners() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/inners"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ComplexCase.kt") public void testComplexCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ComplexCase.kt"); } @TestMetadata("ComplexCase2.kt") public void testComplexCase2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ComplexCase2.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ComplexCase2.kt"); } @TestMetadata("CurrentPackageAndInner.kt") public void testCurrentPackageAndInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/CurrentPackageAndInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/CurrentPackageAndInner.kt"); } @TestMetadata("ImportThriceNestedClass.kt") public void testImportThriceNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ImportThriceNestedClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ImportThriceNestedClass.kt"); } @TestMetadata("InnerInInner.kt") public void testInnerInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/InnerInInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/InnerInInner.kt"); } @TestMetadata("Nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/Nested.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/Nested.kt"); } @TestMetadata("ThriceNestedClass.kt") public void testThriceNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/inners/ThriceNestedClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/inners/ThriceNestedClass.kt"); } } @@ -712,38 +652,37 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/qualifiedExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("GenericClassVsPackage.kt") public void testGenericClassVsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/GenericClassVsPackage.kt"); } @TestMetadata("PackageVsClass.kt") public void testPackageVsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass.kt"); } @TestMetadata("PackageVsClass2.kt") public void testPackageVsClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsClass2.kt"); } @TestMetadata("PackageVsRootClass.kt") public void testPackageVsRootClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/PackageVsRootClass.kt"); } @TestMetadata("visibleClassVsQualifiedClass.kt") public void testVisibleClassVsQualifiedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/qualifiedExpression/visibleClassVsQualifiedClass.kt"); } } @@ -751,50 +690,47 @@ public class JavacDiagnosticsTestGenerated extends AbstractJavacDiagnosticsTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractJavacDiagnosticsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/diagnostics/tests/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Clash.kt") public void testClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/Clash.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/Clash.kt"); } @TestMetadata("ComplexCase.kt") public void testComplexCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/ComplexCase.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/ComplexCase.kt"); } @TestMetadata("InheritedInnerAndTypeParameterWithSameNames.kt") public void testInheritedInnerAndTypeParameterWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InheritedInnerAndTypeParameterWithSameNames.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/InheritedInnerAndTypeParameterWithSameNames.kt"); } @TestMetadata("InnerWithTypeParameter.kt") public void testInnerWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/InnerWithTypeParameter.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/InnerWithTypeParameter.kt"); } @TestMetadata("NestedWithInner.kt") public void testNestedWithInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/NestedWithInner.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/NestedWithInner.kt"); } @TestMetadata("SeveralInnersWithTypeParameters.kt") public void testSeveralInnersWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/SeveralInnersWithTypeParameters.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/SeveralInnersWithTypeParameters.kt"); } @TestMetadata("TypeParametersInInnerAndOuterWithSameNames.kt") public void testTypeParametersInInnerAndOuterWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/diagnostics/tests/typeParameters/TypeParametersInInnerAndOuterWithSameNames.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/diagnostics/tests/typeParameters/TypeParametersInInnerAndOuterWithSameNames.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacFieldResolutionTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacFieldResolutionTestGenerated.java index 707c4d00d46..6ae6911460f 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacFieldResolutionTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacFieldResolutionTestGenerated.java @@ -23,80 +23,72 @@ public class JavacFieldResolutionTestGenerated extends AbstractJavacFieldResolut @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tests extends AbstractJavacFieldResolutionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/fieldsResolution/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsteriskStaticImportsAmbiguity.kt") public void testAsteriskStaticImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/AsteriskStaticImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/AsteriskStaticImportsAmbiguity.kt"); } @TestMetadata("BinaryInitializers.kt") public void testBinaryInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/BinaryInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/BinaryInitializers.kt"); } @TestMetadata("ConstantByFqName.kt") public void testConstantByFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantByFqName.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ConstantByFqName.kt"); } @TestMetadata("ConstantValues.kt") public void testConstantValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantValues.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ConstantValues.kt"); } @TestMetadata("ConstantValuesFromKtFile.kt") public void testConstantValuesFromKtFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantValuesFromKtFile.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ConstantValuesFromKtFile.kt"); } @TestMetadata("FieldFromOuterClass.kt") public void testFieldFromOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/FieldFromOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/FieldFromOuterClass.kt"); } @TestMetadata("InheritedField.kt") public void testInheritedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/InheritedField.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/InheritedField.kt"); } @TestMetadata("MultipleOuters.kt") public void testMultipleOuters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/MultipleOuters.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/MultipleOuters.kt"); } @TestMetadata("ResolutionPriority.kt") public void testResolutionPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ResolutionPriority.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ResolutionPriority.kt"); } @TestMetadata("SameFieldInSupertypes.kt") public void testSameFieldInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/SameFieldInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/SameFieldInSupertypes.kt"); } @TestMetadata("StaticImport.kt") public void testStaticImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImport.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/StaticImport.kt"); } @TestMetadata("StaticImportsAmbiguity.kt") public void testStaticImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImportsAmbiguity.kt"); - doTest(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/StaticImportsAmbiguity.kt"); } } @@ -104,80 +96,72 @@ public class JavacFieldResolutionTestGenerated extends AbstractJavacFieldResolut @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TestsWithoutJavac extends AbstractJavacFieldResolutionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavacWrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestsWithoutJavac() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/javac/fieldsResolution/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AsteriskStaticImportsAmbiguity.kt") public void testAsteriskStaticImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/AsteriskStaticImportsAmbiguity.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/AsteriskStaticImportsAmbiguity.kt"); } @TestMetadata("BinaryInitializers.kt") public void testBinaryInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/BinaryInitializers.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/BinaryInitializers.kt"); } @TestMetadata("ConstantByFqName.kt") public void testConstantByFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantByFqName.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ConstantByFqName.kt"); } @TestMetadata("ConstantValues.kt") public void testConstantValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantValues.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ConstantValues.kt"); } @TestMetadata("ConstantValuesFromKtFile.kt") public void testConstantValuesFromKtFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ConstantValuesFromKtFile.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ConstantValuesFromKtFile.kt"); } @TestMetadata("FieldFromOuterClass.kt") public void testFieldFromOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/FieldFromOuterClass.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/FieldFromOuterClass.kt"); } @TestMetadata("InheritedField.kt") public void testInheritedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/InheritedField.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/InheritedField.kt"); } @TestMetadata("MultipleOuters.kt") public void testMultipleOuters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/MultipleOuters.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/MultipleOuters.kt"); } @TestMetadata("ResolutionPriority.kt") public void testResolutionPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/ResolutionPriority.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/ResolutionPriority.kt"); } @TestMetadata("SameFieldInSupertypes.kt") public void testSameFieldInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/SameFieldInSupertypes.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/SameFieldInSupertypes.kt"); } @TestMetadata("StaticImport.kt") public void testStaticImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImport.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/StaticImport.kt"); } @TestMetadata("StaticImportsAmbiguity.kt") public void testStaticImportsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/javac/fieldsResolution/tests/StaticImportsAmbiguity.kt"); - doTestWithoutJavacWrapper(fileName); + runTest("compiler/testData/javac/fieldsResolution/tests/StaticImportsAmbiguity.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java index 7d90dd3deaf..c15c3085f1b 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/JavacForeignAnnotationsTestGenerated.java @@ -21,108 +21,106 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTests() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("android_support.kt") public void testAndroid_support() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/android_support.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/android_support.kt"); } @TestMetadata("androidx.kt") public void testAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/androidx.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/androidx.kt"); } @TestMetadata("aosp.kt") public void testAosp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/aosp.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/aosp.kt"); } @TestMetadata("checkerFramework.kt") public void testCheckerFramework() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/checkerFramework.kt"); } @TestMetadata("eclipse.kt") public void testEclipse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/eclipse.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/eclipse.kt"); } @TestMetadata("findBugsSimple.kt") public void testFindBugsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/findBugsSimple.kt"); } @TestMetadata("irrelevantQualifierNicknames.kt") public void testIrrelevantQualifierNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/irrelevantQualifierNicknames.kt"); } @TestMetadata("lombokSimple.kt") public void testLombokSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/lombokSimple.kt"); } @TestMetadata("rxjava.kt") public void testRxjava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/rxjava.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonNullNever.kt") public void testNonNullNever() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nonNullNever.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityNicknames.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/strange.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIgnore() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/ignore"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/ignore/parametersAreNonnullByDefault.kt"); } } @@ -130,178 +128,159 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityWarnings extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/elvis.kt"); } @TestMetadata("localInference.kt") public void testLocalInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/localInference.kt"); } @TestMetadata("nullabilityGenerics.kt") public void testNullabilityGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityGenerics.kt"); } @TestMetadata("nullabilityNicknames.kt") public void testNullabilityNicknames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/nullabilityNicknames.kt"); } @TestMetadata("safeCalls.kt") public void testSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/safeCalls.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/simple.kt"); } @TestMetadata("strange.kt") public void testStrange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/strange.kt"); - doTest(fileName); + 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, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arithmetic.kt") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/arithmetic.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/array.kt"); } @TestMetadata("assignToVar.kt") public void testAssignToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/assignToVar.kt"); } @TestMetadata("conditions.kt") public void testConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/conditions.kt"); } @TestMetadata("dataFlowInfo.kt") public void testDataFlowInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/dataFlowInfo.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/defaultParameters.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegatedProperties.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/delegation.kt"); } @TestMetadata("derefenceExtension.kt") public void testDerefenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceExtension.kt"); } @TestMetadata("derefenceMember.kt") public void testDerefenceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/derefenceMember.kt"); } @TestMetadata("expectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/expectedType.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/for.kt"); } @TestMetadata("functionArguments.kt") public void testFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/functionArguments.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/invoke.kt"); } @TestMetadata("kt6829.kt") public void testKt6829() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/kt6829.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/multiDeclaration.kt"); } @TestMetadata("passToJava.kt") public void testPassToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/passToJava.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/primitiveArray.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/throw.kt"); } @TestMetadata("uselessElvisRightIsNull.kt") public void testUselessElvisRightIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/fromPlatformTypes/uselessElvisRightIsNull.kt"); } } @@ -309,56 +288,52 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("equalsOnNonNull.kt") public void testEqualsOnNonNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/equalsOnNonNull.kt"); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/nullabilityWarnings/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -367,62 +342,57 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fieldsAreNullable.kt") public void testFieldsAreNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/fieldsAreNullable.kt"); } @TestMetadata("forceFlexibility.kt") public void testForceFlexibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibility.kt"); } @TestMetadata("forceFlexibleOverOverrides.kt") public void testForceFlexibleOverOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/forceFlexibleOverOverrides.kt"); } @TestMetadata("nullabilityFromOverridden.kt") public void testNullabilityFromOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/nullabilityFromOverridden.kt"); } @TestMetadata("overridingDefaultQualifier.kt") public void testOverridingDefaultQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/overridingDefaultQualifier.kt"); } @TestMetadata("parametersAreNonnullByDefault.kt") public void testParametersAreNonnullByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefault.kt"); } @TestMetadata("parametersAreNonnullByDefaultPackage.kt") public void testParametersAreNonnullByDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/parametersAreNonnullByDefaultPackage.kt"); } @TestMetadata("springNullable.kt") public void testSpringNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullable.kt"); } @TestMetadata("springNullablePackage.kt") public void testSpringNullablePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305/typeQualifierDefault/springNullablePackage.kt"); } } } @@ -431,6 +401,10 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jsr305NullabilityWarnings extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsr305NullabilityWarnings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -439,62 +413,57 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customMigration.kt") public void testCustomMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/customMigration.kt"); } @TestMetadata("globalIgnore.kt") public void testGlobalIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalIgnore.kt"); } @TestMetadata("globalWarningMigrationIgnore.kt") public void testGlobalWarningMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/globalWarningMigrationIgnore.kt"); } @TestMetadata("migrationError.kt") public void testMigrationError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationError.kt"); } @TestMetadata("migrationIgnore.kt") public void testMigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationIgnore.kt"); } @TestMetadata("migrationWarning.kt") public void testMigrationWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/migrationWarning.kt"); } @TestMetadata("overrideConflicts.kt") public void testOverrideConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/overrideConflicts.kt"); } @TestMetadata("specialCollision.kt") public void testSpecialCollision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/specialCollision.kt"); } @TestMetadata("stateRefinement.kt") public void testStateRefinement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/jsr305NullabilityWarnings/migration/stateRefinement.kt"); } } } @@ -503,14 +472,17 @@ public class JavacForeignAnnotationsTestGenerated extends AbstractJavacForeignAn @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeQualifierDefault extends AbstractJavacForeignAnnotationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeQualifierDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/foreignAnnotations/tests/typeQualifierDefault"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultAndNicknameMigrationPolicy.kt") public void testDefaultAndNicknameMigrationPolicy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); - doTest(fileName); + runTest("compiler/testData/foreignAnnotations/tests/typeQualifierDefault/defaultAndNicknameMigrationPolicy.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java index a1f15b843c0..64315d76fd5 100644 --- a/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/cli/CliTestGenerated.java @@ -23,602 +23,507 @@ public class CliTestGenerated extends AbstractCliTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm extends AbstractCliTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJvmTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/jvm"), Pattern.compile("^(.+)\\.args$"), TargetBackend.ANY, false); } @TestMetadata("apiVersion.args") public void testApiVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/apiVersion.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/apiVersion.args"); } @TestMetadata("apiVersion1.0.args") public void testApiVersion1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/apiVersion1.0.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/apiVersion1.0.args"); } @TestMetadata("apiVersionAndSinceNewerKotlin.args") public void testApiVersionAndSinceNewerKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/apiVersionAndSinceNewerKotlin.args"); } @TestMetadata("apiVersionGreaterThanLanguage.args") public void testApiVersionGreaterThanLanguage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/apiVersionGreaterThanLanguage.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/apiVersionGreaterThanLanguage.args"); } @TestMetadata("apiVersionInvalid.args") public void testApiVersionInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/apiVersionInvalid.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/apiVersionInvalid.args"); } @TestMetadata("apiVersionLessThanLanguage.args") public void testApiVersionLessThanLanguage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/apiVersionLessThanLanguage.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/apiVersionLessThanLanguage.args"); } @TestMetadata("argumentPassedMultipleTimes.args") public void testArgumentPassedMultipleTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/argumentPassedMultipleTimes.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/argumentPassedMultipleTimes.args"); } @TestMetadata("classAndFileClassClash.args") public void testClassAndFileClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndFileClassClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/classAndFileClassClash.args"); } @TestMetadata("classAndOtherFileClassClash.args") public void testClassAndOtherFileClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndOtherFileClassClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/classAndOtherFileClassClash.args"); } @TestMetadata("classAndPartClash.args") public void testClassAndPartClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndPartClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/classAndPartClash.args"); } @TestMetadata("classAndTraitClash.args") public void testClassAndTraitClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classAndTraitClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/classAndTraitClash.args"); } @TestMetadata("classpath.args") public void testClasspath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/classpath.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/classpath.args"); } @TestMetadata("compatqualDefault.args") public void testCompatqualDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/compatqualDefault.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/compatqualDefault.args"); } @TestMetadata("compatqualDisable.args") public void testCompatqualDisable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/compatqualDisable.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/compatqualDisable.args"); } @TestMetadata("compatqualEnable.args") public void testCompatqualEnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/compatqualEnable.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/compatqualEnable.args"); } @TestMetadata("compatqualWrong.args") public void testCompatqualWrong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/compatqualWrong.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/compatqualWrong.args"); } @TestMetadata("conflictingOverloads.args") public void testConflictingOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/conflictingOverloads.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/conflictingOverloads.args"); } @TestMetadata("coroutinesEnable.args") public void testCoroutinesEnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/coroutinesEnable.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/coroutinesEnable.args"); } @TestMetadata("coroutinesError.args") public void testCoroutinesError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/coroutinesError.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/coroutinesError.args"); } @TestMetadata("coroutinesErrorAndEnable.args") public void testCoroutinesErrorAndEnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/coroutinesErrorAndEnable.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/coroutinesErrorAndEnable.args"); } @TestMetadata("coroutinesWarn.args") public void testCoroutinesWarn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/coroutinesWarn.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/coroutinesWarn.args"); } @TestMetadata("diagnosticsOrder.args") public void testDiagnosticsOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/diagnosticsOrder.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/diagnosticsOrder.args"); } @TestMetadata("duplicateSources.args") public void testDuplicateSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/duplicateSources.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/duplicateSources.args"); } @TestMetadata("duplicateSourcesInModule.args") public void testDuplicateSourcesInModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/duplicateSourcesInModule.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/duplicateSourcesInModule.args"); } @TestMetadata("emptySources.args") public void testEmptySources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/emptySources.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/emptySources.args"); } @TestMetadata("experimentalAndUseExperimentalWithSameAnnotation.args") public void testExperimentalAndUseExperimentalWithSameAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalAndUseExperimentalWithSameAnnotation.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalAndUseExperimentalWithSameAnnotation.args"); } @TestMetadata("experimentalDeprecated.args") public void testExperimentalDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalDeprecated.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalDeprecated.args"); } @TestMetadata("experimentalDeprecatedWarning.args") public void testExperimentalDeprecatedWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalDeprecatedWarning.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalDeprecatedWarning.args"); } @TestMetadata("experimentalIsNotAnnotation.args") public void testExperimentalIsNotAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalIsNotAnnotation.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalIsNotAnnotation.args"); } @TestMetadata("experimentalIsNotMarker.args") public void testExperimentalIsNotMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalIsNotMarker.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalIsNotMarker.args"); } @TestMetadata("experimentalNested.args") public void testExperimentalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalNested.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalNested.args"); } @TestMetadata("experimentalRuntimeScope.args") public void testExperimentalRuntimeScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalRuntimeScope.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalRuntimeScope.args"); } @TestMetadata("experimentalUnresolved.args") public void testExperimentalUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/experimentalUnresolved.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/experimentalUnresolved.args"); } @TestMetadata("extraArgumentPassedInObsoleteForm.args") public void testExtraArgumentPassedInObsoleteForm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/extraArgumentPassedInObsoleteForm.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/extraArgumentPassedInObsoleteForm.args"); } @TestMetadata("extraHelp.args") public void testExtraHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/extraHelp.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/extraHelp.args"); } @TestMetadata("fileClassAndMultifileClassClash.args") public void testFileClassAndMultifileClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassAndMultifileClassClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/fileClassAndMultifileClassClash.args"); } @TestMetadata("fileClassAndTImplClash.args") public void testFileClassAndTImplClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassAndTImplClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/fileClassAndTImplClash.args"); } @TestMetadata("fileClassClashMultipleFiles.args") public void testFileClassClashMultipleFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/fileClassClashMultipleFiles.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/fileClassClashMultipleFiles.args"); } @TestMetadata("help.args") public void testHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/help.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/help.args"); } @TestMetadata("inlineCycle.args") public void testInlineCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/inlineCycle.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/inlineCycle.args"); } @TestMetadata("javaSrcWrongPackage.args") public void testJavaSrcWrongPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/javaSrcWrongPackage.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/javaSrcWrongPackage.args"); } @TestMetadata("jdkPathDoesNotExist.args") public void testJdkPathDoesNotExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jdkPathDoesNotExist.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jdkPathDoesNotExist.args"); } @TestMetadata("jsr305AllIgnore.args") public void testJsr305AllIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305AllIgnore.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305AllIgnore.args"); } @TestMetadata("jsr305DefaultMigration.args") public void testJsr305DefaultMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305DefaultMigration.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305DefaultMigration.args"); } @TestMetadata("jsr305DeprecatedEnable.args") public void testJsr305DeprecatedEnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305DeprecatedEnable.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305DeprecatedEnable.args"); } @TestMetadata("jsr305DeprecatedIgnore.args") public void testJsr305DeprecatedIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305DeprecatedIgnore.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305DeprecatedIgnore.args"); } @TestMetadata("jsr305DeprecatedWarn.args") public void testJsr305DeprecatedWarn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305DeprecatedWarn.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305DeprecatedWarn.args"); } @TestMetadata("jsr305FqNameIgnore.args") public void testJsr305FqNameIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305FqNameIgnore.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305FqNameIgnore.args"); } @TestMetadata("jsr305FqNameStrict.args") public void testJsr305FqNameStrict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305FqNameStrict.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305FqNameStrict.args"); } @TestMetadata("jsr305Ignore.args") public void testJsr305Ignore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305Ignore.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305Ignore.args"); } @TestMetadata("jsr305MigrationDefault.args") public void testJsr305MigrationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305MigrationDefault.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305MigrationDefault.args"); } @TestMetadata("jsr305MigrationFqNameIgnore.args") public void testJsr305MigrationFqNameIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305MigrationFqNameIgnore.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305MigrationFqNameIgnore.args"); } @TestMetadata("jsr305MigrationIgnore.args") public void testJsr305MigrationIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305MigrationIgnore.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305MigrationIgnore.args"); } @TestMetadata("jsr305MigrationWarn.args") public void testJsr305MigrationWarn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305MigrationWarn.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305MigrationWarn.args"); } @TestMetadata("jsr305NoFlag.args") public void testJsr305NoFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305NoFlag.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305NoFlag.args"); } @TestMetadata("jsr305Strict.args") public void testJsr305Strict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305Strict.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305Strict.args"); } @TestMetadata("jsr305Warn.args") public void testJsr305Warn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jsr305Warn.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jsr305Warn.args"); } @TestMetadata("jvm8Target.args") public void testJvm8Target() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/jvm8Target.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/jvm8Target.args"); } @TestMetadata("kotlinHomeWithoutStdlib.args") public void testKotlinHomeWithoutStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/kotlinHomeWithoutStdlib.args"); } @TestMetadata("kotlinPackage.args") public void testKotlinPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/kotlinPackage.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/kotlinPackage.args"); } @TestMetadata("kt22304.args") public void testKt22304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/kt22304.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/kt22304.args"); } @TestMetadata("languageVersion.args") public void testLanguageVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/languageVersion.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/languageVersion.args"); } @TestMetadata("languageVersionInvalid.args") public void testLanguageVersionInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/languageVersionInvalid.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/languageVersionInvalid.args"); } @TestMetadata("legacySmartCastsAfterTry.args") public void testLegacySmartCastsAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/legacySmartCastsAfterTry.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/legacySmartCastsAfterTry.args"); } @TestMetadata("multipleTextRangesInDiagnosticsOrder.args") public void testMultipleTextRangesInDiagnosticsOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/multipleTextRangesInDiagnosticsOrder.args"); } @TestMetadata("noReflect.args") public void testNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/noReflect.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/noReflect.args"); } @TestMetadata("noStdlib.args") public void testNoStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/noStdlib.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/noStdlib.args"); } @TestMetadata("nonExistingClassPathAndAnnotationsPath.args") public void testNonExistingClassPathAndAnnotationsPath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/nonExistingClassPathAndAnnotationsPath.args"); } @TestMetadata("nonExistingSourcePath.args") public void testNonExistingSourcePath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonExistingSourcePath.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/nonExistingSourcePath.args"); } @TestMetadata("nonLocalDisabled.args") public void testNonLocalDisabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonLocalDisabled.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/nonLocalDisabled.args"); } @TestMetadata("nonexistentPathInModule.args") public void testNonexistentPathInModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonexistentPathInModule.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/nonexistentPathInModule.args"); } @TestMetadata("nonexistentScript.args") public void testNonexistentScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/nonexistentScript.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/nonexistentScript.args"); } @TestMetadata("pluginSimple.args") public void testPluginSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimple.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/pluginSimple.args"); } @TestMetadata("returnAsWhenKey.args") public void testReturnAsWhenKey() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/returnAsWhenKey.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/returnAsWhenKey.args"); } @TestMetadata("sanitized-name.clash.args") public void testSanitized_name_clash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/sanitized-name.clash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/sanitized-name.clash.args"); } @TestMetadata("signatureClash.args") public void testSignatureClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/signatureClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/signatureClash.args"); } @TestMetadata("simple.args") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/simple.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/simple.args"); } @TestMetadata("singleJavaFileRoots.args") public void testSingleJavaFileRoots() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/singleJavaFileRoots.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/singleJavaFileRoots.args"); } @TestMetadata("suppressAllWarningsJvm.args") public void testSuppressAllWarningsJvm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/suppressAllWarningsJvm.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/suppressAllWarningsJvm.args"); } @TestMetadata("syntheticAccessorForPropertiesSignatureClash.args") public void testSyntheticAccessorForPropertiesSignatureClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/syntheticAccessorForPropertiesSignatureClash.args"); } @TestMetadata("syntheticAccessorPropertyAndFunSignatureClash.args") public void testSyntheticAccessorPropertyAndFunSignatureClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/syntheticAccessorPropertyAndFunSignatureClash.args"); } @TestMetadata("syntheticAccessorSignatureClash.args") public void testSyntheticAccessorSignatureClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/syntheticAccessorSignatureClash.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/syntheticAccessorSignatureClash.args"); } @TestMetadata("unknownExtraFlags.args") public void testUnknownExtraFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/unknownExtraFlags.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/unknownExtraFlags.args"); } @TestMetadata("unsupportedTypeAlias.args") public void testUnsupportedTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/unsupportedTypeAlias.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/unsupportedTypeAlias.args"); } @TestMetadata("warningJdkWithNoJdk.args") public void testWarningJdkWithNoJdk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/warningJdkWithNoJdk.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/warningJdkWithNoJdk.args"); } @TestMetadata("warningsInDummy.args") public void testWarningsInDummy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/warningsInDummy.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/warningsInDummy.args"); } @TestMetadata("werror.args") public void testWerror() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werror.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/werror.args"); } @TestMetadata("werrorWithExplicitError.args") public void testWerrorWithExplicitError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werrorWithExplicitError.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/werrorWithExplicitError.args"); } @TestMetadata("werrorWithNoWarn.args") public void testWerrorWithNoWarn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werrorWithNoWarn.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/werrorWithNoWarn.args"); } @TestMetadata("werrorWithStrongWarning.args") public void testWerrorWithStrongWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werrorWithStrongWarning.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/werrorWithStrongWarning.args"); } @TestMetadata("wrongAbiVersion.args") public void testWrongAbiVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersion.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongAbiVersion.args"); } @TestMetadata("wrongAbiVersionNoErrors.args") public void testWrongAbiVersionNoErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersionNoErrors.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongAbiVersionNoErrors.args"); } @TestMetadata("wrongArgument.args") public void testWrongArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongArgument.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongArgument.args"); } @TestMetadata("wrongJdkPath.args") public void testWrongJdkPath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongJdkPath.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongJdkPath.args"); } @TestMetadata("wrongJvmTargetVersion.args") public void testWrongJvmTargetVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongJvmTargetVersion.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongJvmTargetVersion.args"); } @TestMetadata("wrongScriptWithDirectory.args") public void testWrongScriptWithDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongScriptWithDirectory.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongScriptWithDirectory.args"); } @TestMetadata("wrongScriptWithKtSource.args") public void testWrongScriptWithKtSource() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongScriptWithKtSource.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongScriptWithKtSource.args"); } @TestMetadata("wrongScriptWithNoSource.args") public void testWrongScriptWithNoSource() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongScriptWithNoSource.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongScriptWithNoSource.args"); } @TestMetadata("wrongXjsr305.args") public void testWrongXjsr305() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongXjsr305.args"); - doJvmTest(fileName); + runTest("compiler/testData/cli/jvm/wrongXjsr305.args"); } } @@ -626,200 +531,172 @@ public class CliTestGenerated extends AbstractCliTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Js extends AbstractCliTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJsTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/js"), Pattern.compile("^(.+)\\.args$"), TargetBackend.ANY, false); } @TestMetadata("createMetadata.args") public void testCreateMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/createMetadata.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/createMetadata.args"); } @TestMetadata("emptySources.args") public void testEmptySources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/emptySources.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/emptySources.args"); } @TestMetadata("inlineCycle.args") public void testInlineCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/inlineCycle.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/inlineCycle.args"); } @TestMetadata("jsExtraHelp.args") public void testJsExtraHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/jsExtraHelp.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/jsExtraHelp.args"); } @TestMetadata("jsHelp.args") public void testJsHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/jsHelp.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/jsHelp.args"); } @TestMetadata("kotlinHomeWithoutStdlib.args") public void testKotlinHomeWithoutStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/kotlinHomeWithoutStdlib.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/kotlinHomeWithoutStdlib.args"); } @TestMetadata("kotlinPackage.args") public void testKotlinPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/kotlinPackage.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/kotlinPackage.args"); } @TestMetadata("languageVersion.args") public void testLanguageVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/languageVersion.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/languageVersion.args"); } @TestMetadata("libraryDirNotFound.args") public void testLibraryDirNotFound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/libraryDirNotFound.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/libraryDirNotFound.args"); } @TestMetadata("modulesWithSameNames.args") public void testModulesWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/modulesWithSameNames.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/modulesWithSameNames.args"); } @TestMetadata("modulesWithSameNamesAndFunc.args") public void testModulesWithSameNamesAndFunc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/modulesWithSameNamesAndFunc.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/modulesWithSameNamesAndFunc.args"); } @TestMetadata("nonExistingKotlinHome.args") public void testNonExistingKotlinHome() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/nonExistingKotlinHome.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/nonExistingKotlinHome.args"); } @TestMetadata("nonExistingSourcePath.args") public void testNonExistingSourcePath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/nonExistingSourcePath.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/nonExistingSourcePath.args"); } @TestMetadata("notValidLibraryDir.args") public void testNotValidLibraryDir() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/notValidLibraryDir.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/notValidLibraryDir.args"); } @TestMetadata("outputIsDirectory.args") public void testOutputIsDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/outputIsDirectory.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/outputIsDirectory.args"); } @TestMetadata("outputPostfixFileNotFound.args") public void testOutputPostfixFileNotFound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/outputPostfixFileNotFound.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/outputPostfixFileNotFound.args"); } @TestMetadata("outputPrefixFileNotFound.args") public void testOutputPrefixFileNotFound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/outputPrefixFileNotFound.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/outputPrefixFileNotFound.args"); } @TestMetadata("simple2js.args") public void testSimple2js() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/simple2js.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/simple2js.args"); } @TestMetadata("sourceMap.args") public void testSourceMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMap.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMap.args"); } @TestMetadata("sourceMapCharEscape.args") public void testSourceMapCharEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapCharEscape.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapCharEscape.args"); } @TestMetadata("sourceMapDuplicateRelativePaths.args") public void testSourceMapDuplicateRelativePaths() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapDuplicateRelativePaths.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapDuplicateRelativePaths.args"); } @TestMetadata("sourceMapEmbedSources.args") public void testSourceMapEmbedSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapEmbedSources.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapEmbedSources.args"); } @TestMetadata("sourceMapPrefix.args") public void testSourceMapPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapPrefix.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapPrefix.args"); } @TestMetadata("sourceMapRelativeRoot.args") public void testSourceMapRelativeRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapRelativeRoot.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapRelativeRoot.args"); } @TestMetadata("sourceMapRootAuto.args") public void testSourceMapRootAuto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapRootAuto.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapRootAuto.args"); } @TestMetadata("sourceMapRootManual.args") public void testSourceMapRootManual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapRootManual.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapRootManual.args"); } @TestMetadata("sourceMapRootMissing.args") public void testSourceMapRootMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapRootMissing.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapRootMissing.args"); } @TestMetadata("sourceMapRootMultiple.args") public void testSourceMapRootMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/sourceMapRootMultiple.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/sourceMapRootMultiple.args"); } @TestMetadata("suppressAllWarningsJS.args") public void testSuppressAllWarningsJS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/suppressAllWarningsJS.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/suppressAllWarningsJS.args"); } @TestMetadata("withFolderAsLib.args") public void testWithFolderAsLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/withFolderAsLib.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/withFolderAsLib.args"); } @TestMetadata("withLib.args") public void testWithLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/withLib.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/withLib.args"); } @TestMetadata("wrongAbiVersion.args") public void testWrongAbiVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js/wrongAbiVersion.args"); - doJsTest(fileName); + runTest("compiler/testData/cli/js/wrongAbiVersion.args"); } } @@ -827,80 +704,72 @@ public class CliTestGenerated extends AbstractCliTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Js_dce extends AbstractCliTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJsDceTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs_dce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/js-dce"), Pattern.compile("^(.+)\\.args$"), TargetBackend.ANY, false); } @TestMetadata("dceHelp.args") public void testDceHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/dceHelp.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/dceHelp.args"); } @TestMetadata("emptySources.args") public void testEmptySources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/emptySources.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/emptySources.args"); } @TestMetadata("includeDeclarations.args") public void testIncludeDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/includeDeclarations.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/includeDeclarations.args"); } @TestMetadata("invalidFilename.args") public void testInvalidFilename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/invalidFilename.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/invalidFilename.args"); } @TestMetadata("jsExtraHelp.args") public void testJsExtraHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/jsExtraHelp.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/jsExtraHelp.args"); } @TestMetadata("nonExistingSourcePath.args") public void testNonExistingSourcePath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/nonExistingSourcePath.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/nonExistingSourcePath.args"); } @TestMetadata("notFile.args") public void testNotFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/notFile.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/notFile.args"); } @TestMetadata("outputIsDirectory.args") public void testOutputIsDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/outputIsDirectory.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/outputIsDirectory.args"); } @TestMetadata("parseError.args") public void testParseError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/parseError.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/parseError.args"); } @TestMetadata("printReachability.args") public void testPrintReachability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/printReachability.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/printReachability.args"); } @TestMetadata("simple.args") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/simple.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/simple.args"); } @TestMetadata("withSourceMap.args") public void testWithSourceMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/js-dce/withSourceMap.args"); - doJsDceTest(fileName); + runTest("compiler/testData/cli/js-dce/withSourceMap.args"); } } @@ -908,14 +777,17 @@ public class CliTestGenerated extends AbstractCliTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Metadata extends AbstractCliTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doMetadataTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMetadata() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/cli/metadata"), Pattern.compile("^(.+)\\.args$"), TargetBackend.ANY, false); } @TestMetadata("moduleName.args") public void testModuleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/metadata/moduleName.args"); - doMetadataTest(fileName); + runTest("compiler/testData/cli/metadata/moduleName.args"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java index d93b304016d..f387021f8b4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxAgainstJavaCodegenTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxAgainstJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,100 +33,94 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaAnnotationArrayValueDefault.kt") public void testJavaAnnotationArrayValueDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueDefault.kt"); } @TestMetadata("javaAnnotationArrayValueNoDefault.kt") public void testJavaAnnotationArrayValueNoDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationArrayValueNoDefault.kt"); } @TestMetadata("javaAnnotationCall.kt") public void testJavaAnnotationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt"); } @TestMetadata("javaAnnotationDefault.kt") public void testJavaAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationDefault.kt"); } @TestMetadata("javaNegativePropertyAsAnnotationParameter.kt") public void testJavaNegativePropertyAsAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaNegativePropertyAsAnnotationParameter.kt"); } @TestMetadata("javaPropertyAsAnnotationParameter.kt") public void testJavaPropertyAsAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyAsAnnotationParameter.kt"); } @TestMetadata("javaPropertyWithIntInitializer.kt") public void testJavaPropertyWithIntInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/javaPropertyWithIntInitializer.kt"); } @TestMetadata("retentionInJava.kt") public void testRetentionInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/retentionInJava.kt"); } @TestMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClassMapping extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKClassMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayClassParameter.kt") public void testArrayClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameter.kt"); } @TestMetadata("arrayClassParameterOnJavaClass.kt") public void testArrayClassParameterOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/arrayClassParameterOnJavaClass.kt"); } @TestMetadata("classParameter.kt") public void testClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameter.kt"); } @TestMetadata("classParameterOnJavaClass.kt") public void testClassParameterOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/classParameterOnJavaClass.kt"); } @TestMetadata("varargClassParameter.kt") public void testVarargClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameter.kt"); } @TestMetadata("varargClassParameterOnJavaClass.kt") public void testVarargClassParameterOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/annotations/kClassMapping/varargClassParameterOnJavaClass.kt"); } } } @@ -131,38 +129,37 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/constructor.kt"); } @TestMetadata("kt16412.kt") public void testKt16412() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/kt16412.kt"); } @TestMetadata("publicFinalField.kt") public void testPublicFinalField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicFinalField.kt"); } @TestMetadata("publicMutableField.kt") public void testPublicMutableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/publicMutableField.kt"); } @TestMetadata("staticMethod.kt") public void testStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/callableReference/staticMethod.kt"); } } @@ -170,20 +167,22 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("genericConstructor.kt") public void testGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/constructor/genericConstructor.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/constructor/secondaryConstructor.kt"); } } @@ -191,14 +190,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegationAndInheritanceFromJava.kt") public void testDelegationAndInheritanceFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/delegation/delegationAndInheritanceFromJava.kt"); } } @@ -206,44 +208,42 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleJavaEnum.kt") public void testSimpleJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnum.kt"); } @TestMetadata("simpleJavaEnumWithFunction.kt") public void testSimpleJavaEnumWithFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithFunction.kt"); } @TestMetadata("simpleJavaEnumWithStaticImport.kt") public void testSimpleJavaEnumWithStaticImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaEnumWithStaticImport.kt"); } @TestMetadata("simpleJavaInnerEnum.kt") public void testSimpleJavaInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/enum/simpleJavaInnerEnum.kt"); } @TestMetadata("staticField.kt") public void testStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/enum/staticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/enum/staticField.kt"); } @TestMetadata("staticMethod.kt") public void testStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/enum/staticMethod.kt"); } } @@ -251,38 +251,37 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/functions/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/functions/constructor.kt"); } @TestMetadata("max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/functions/max.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/functions/max.kt"); } @TestMetadata("referencesStaticInnerClassMethod.kt") public void testReferencesStaticInnerClassMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethod.kt"); } @TestMetadata("referencesStaticInnerClassMethodL2.kt") public void testReferencesStaticInnerClassMethodL2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/functions/referencesStaticInnerClassMethodL2.kt"); } @TestMetadata("unrelatedUpperBounds.kt") public void testUnrelatedUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/functions/unrelatedUpperBounds.kt"); } } @@ -290,62 +289,57 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ieee754 extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIeee754() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anyToReal.kt") public void testAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/anyToReal.kt"); } @TestMetadata("comparableTypeCast.kt") public void testComparableTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/comparableTypeCast.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/double.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/double.kt"); } @TestMetadata("explicitCompareCall.kt") public void testExplicitCompareCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitCompareCall.kt"); } @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall.kt"); } @TestMetadata("explicitEqualsCall_lv12.kt") public void testExplicitEqualsCall_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/explicitEqualsCall_lv12.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/float.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/generic.kt"); } @TestMetadata("nullableAnyToReal.kt") public void testNullableAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/ieee754/nullableAnyToReal.kt"); } } @@ -353,14 +347,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt19910.kt") public void testKt19910() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/inline/kt19910.kt"); } } @@ -368,26 +365,27 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClass extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/innerClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt3532.kt") public void testKt3532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3532.kt"); } @TestMetadata("kt3812.kt") public void testKt3812() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt3812.kt"); } @TestMetadata("kt4036.kt") public void testKt4036() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/innerClass/kt4036.kt"); } } @@ -395,14 +393,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Interfaces extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInterfaces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/interfaces"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inheritJavaInterface.kt") public void testInheritJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/interfaces/inheritJavaInterface.kt"); } } @@ -410,20 +411,22 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullAssertions extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNullAssertions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/delegation.kt"); } @TestMetadata("rightElvisOperand.kt") public void testRightElvisOperand() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/notNullAssertions/rightElvisOperand.kt"); } } @@ -431,32 +434,32 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("genericUnit.kt") public void testGenericUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/genericUnit.kt"); } @TestMetadata("kt14989.kt") public void testKt14989() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/kt14989.kt"); } @TestMetadata("specializedMapFull.kt") public void testSpecializedMapFull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapFull.kt"); } @TestMetadata("specializedMapPut.kt") public void testSpecializedMapPut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/platformTypes/specializedMapPut.kt"); } } @@ -464,26 +467,27 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fieldAccessFromExtensionInTraitImpl.kt") public void testFieldAccessFromExtensionInTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessFromExtensionInTraitImpl.kt"); } @TestMetadata("fieldAccessViaSubclass.kt") public void testFieldAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/property/fieldAccessViaSubclass.kt"); } @TestMetadata("referenceToJavaFieldViaBridge.kt") public void testReferenceToJavaFieldViaBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/property/referenceToJavaFieldViaBridge.kt"); } } @@ -491,20 +495,22 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RecursiveRawTypes extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecursiveRawTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt16528.kt") public void testKt16528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16528.kt"); } @TestMetadata("kt16639.kt") public void testKt16639() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/recursiveRawTypes/kt16639.kt"); } } @@ -512,6 +518,10 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -520,14 +530,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiterals extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaClassLiteral.kt") public void testJavaClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/reflection/classLiterals/javaClassLiteral.kt"); } } @@ -535,32 +548,32 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mapping extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jClass2kClass.kt") public void testJClass2kClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/jClass2kClass.kt"); } @TestMetadata("javaConstructor.kt") public void testJavaConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaConstructor.kt"); } @TestMetadata("javaFields.kt") public void testJavaFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaFields.kt"); } @TestMetadata("javaMethods.kt") public void testJavaMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/reflection/mapping/javaMethods.kt"); } } @@ -568,14 +581,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/reflection/properties/equalsHashCodeToString.kt"); } } } @@ -584,300 +600,266 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentFqNames.kt") public void testDifferentFqNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/differentFqNames.kt"); } @TestMetadata("kt11519.kt") public void testKt11519() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519.kt"); } @TestMetadata("kt11519Constructor.kt") public void testKt11519Constructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11519Constructor.kt"); } @TestMetadata("kt11696.kt") public void testKt11696() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt11696.kt"); } @TestMetadata("kt4753.kt") public void testKt4753() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753.kt"); } @TestMetadata("kt4753_2.kt") public void testKt4753_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/kt4753_2.kt"); } @TestMetadata("samConstructorGenericSignature.kt") public void testSamConstructorGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/samConstructorGenericSignature.kt"); } @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Adapters extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bridgesForOverridden.kt") public void testBridgesForOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverridden.kt"); } @TestMetadata("bridgesForOverriddenComplex.kt") public void testBridgesForOverriddenComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/bridgesForOverriddenComplex.kt"); } @TestMetadata("callAbstractAdapter.kt") public void testCallAbstractAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/callAbstractAdapter.kt"); } @TestMetadata("comparator.kt") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/comparator.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/constructor.kt"); } @TestMetadata("doubleLongParameters.kt") public void testDoubleLongParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/doubleLongParameters.kt"); } @TestMetadata("fileFilter.kt") public void testFileFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/fileFilter.kt"); } @TestMetadata("genericSignature.kt") public void testGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/genericSignature.kt"); } @TestMetadata("implementAdapter.kt") public void testImplementAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/implementAdapter.kt"); } @TestMetadata("inheritedInKotlin.kt") public void testInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedInKotlin.kt"); } @TestMetadata("inheritedOverriddenAdapter.kt") public void testInheritedOverriddenAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedOverriddenAdapter.kt"); } @TestMetadata("inheritedSimple.kt") public void testInheritedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localClass.kt"); } @TestMetadata("localObjectConstructor.kt") public void testLocalObjectConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructor.kt"); } @TestMetadata("localObjectConstructorWithFnValue.kt") public void testLocalObjectConstructorWithFnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/localObjectConstructorWithFnValue.kt"); } @TestMetadata("nonLiteralAndLiteralRunnable.kt") public void testNonLiteralAndLiteralRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralAndLiteralRunnable.kt"); } @TestMetadata("nonLiteralComparator.kt") public void testNonLiteralComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralComparator.kt"); } @TestMetadata("nonLiteralInConstructor.kt") public void testNonLiteralInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralInConstructor.kt"); } @TestMetadata("nonLiteralNull.kt") public void testNonLiteralNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralNull.kt"); } @TestMetadata("nonLiteralRunnable.kt") public void testNonLiteralRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/nonLiteralRunnable.kt"); } @TestMetadata("protectedFromBase.kt") public void testProtectedFromBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/protectedFromBase.kt"); } @TestMetadata("severalSamParameters.kt") public void testSeveralSamParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/severalSamParameters.kt"); } @TestMetadata("simplest.kt") public void testSimplest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/simplest.kt"); } @TestMetadata("superInSecondaryConstructor.kt") public void testSuperInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superInSecondaryConstructor.kt"); } @TestMetadata("superconstructor.kt") public void testSuperconstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructor.kt"); } @TestMetadata("superconstructorWithClosure.kt") public void testSuperconstructorWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/superconstructorWithClosure.kt"); } @TestMetadata("typeParameterOfClass.kt") public void testTypeParameterOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfClass.kt"); } @TestMetadata("typeParameterOfMethod.kt") public void testTypeParameterOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfMethod.kt"); } @TestMetadata("typeParameterOfOuterClass.kt") public void testTypeParameterOfOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/typeParameterOfOuterClass.kt"); } @TestMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Operators extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperators() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("augmentedAssignmentPure.kt") public void testAugmentedAssignmentPure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentPure.kt"); } @TestMetadata("augmentedAssignmentViaSimpleBinary.kt") public void testAugmentedAssignmentViaSimpleBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/augmentedAssignmentViaSimpleBinary.kt"); } @TestMetadata("binary.kt") public void testBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/binary.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/compareTo.kt"); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/contains.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/get.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/invoke.kt"); } @TestMetadata("multiGetSet.kt") public void testMultiGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiGetSet.kt"); } @TestMetadata("multiInvoke.kt") public void testMultiInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/multiInvoke.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/sam/adapters/operators/set.kt"); } } } @@ -887,14 +869,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltins extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("charBuffer.kt") public void testCharBuffer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/specialBuiltins/charBuffer.kt"); } } @@ -902,14 +887,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticFun extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/staticFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classWithNestedEnum.kt") public void testClassWithNestedEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/staticFun/classWithNestedEnum.kt"); } } @@ -917,68 +905,62 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticExtensions extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fromTwoBases.kt") public void testFromTwoBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/fromTwoBases.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/getter.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/implicitReceiver.kt"); } @TestMetadata("overrideOnlyGetter.kt") public void testOverrideOnlyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/overrideOnlyGetter.kt"); } @TestMetadata("plusPlus.kt") public void testPlusPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/plusPlus.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protected.kt"); } @TestMetadata("protectedSetter.kt") public void testProtectedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/protectedSetter.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setter.kt"); } @TestMetadata("setterNonVoid1.kt") public void testSetterNonVoid1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid1.kt"); } @TestMetadata("setterNonVoid2.kt") public void testSetterNonVoid2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/syntheticExtensions/setterNonVoid2.kt"); } } @@ -986,14 +968,17 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaStaticMembersViaTypeAlias.kt") public void testJavaStaticMembersViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/typealias/javaStaticMembersViaTypeAlias.kt"); } } @@ -1001,6 +986,10 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1009,32 +998,32 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/package"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt2781.kt") public void testKt2781() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/kt2781.kt"); } @TestMetadata("packageClass.kt") public void testPackageClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageClass.kt"); } @TestMetadata("packageFun.kt") public void testPackageFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageFun.kt"); } @TestMetadata("packageProperty.kt") public void testPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/package/packageProperty.kt"); } } @@ -1042,38 +1031,37 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedAndPackage extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedAndPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("overrideProtectedFunInPackage.kt") public void testOverrideProtectedFunInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/overrideProtectedFunInPackage.kt"); } @TestMetadata("protectedFunInPackage.kt") public void testProtectedFunInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedFunInPackage.kt"); } @TestMetadata("protectedPropertyInPackage.kt") public void testProtectedPropertyInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedPropertyInPackage.kt"); } @TestMetadata("protectedStaticClass.kt") public void testProtectedStaticClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedStaticClass.kt"); } @TestMetadata("protectedSuperMethod.kt") public void testProtectedSuperMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedAndPackage/protectedSuperMethod.kt"); } } @@ -1081,80 +1069,72 @@ public class BlackBoxAgainstJavaCodegenTestGenerated extends AbstractBlackBoxAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedStatic extends AbstractBlackBoxAgainstJavaCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("funCallInConstructor.kt") public void testFunCallInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funCallInConstructor.kt"); } @TestMetadata("funClassObject.kt") public void testFunClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funClassObject.kt"); } @TestMetadata("funGenericClass.kt") public void testFunGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funGenericClass.kt"); } @TestMetadata("funNestedStaticClass.kt") public void testFunNestedStaticClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass.kt"); } @TestMetadata("funNestedStaticClass2.kt") public void testFunNestedStaticClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticClass2.kt"); } @TestMetadata("funNestedStaticGenericClass.kt") public void testFunNestedStaticGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNestedStaticGenericClass.kt"); } @TestMetadata("funNotDirectSuperClass.kt") public void testFunNotDirectSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funNotDirectSuperClass.kt"); } @TestMetadata("funObject.kt") public void testFunObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/funObject.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass.kt"); } @TestMetadata("simpleClass2.kt") public void testSimpleClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleClass2.kt"); } @TestMetadata("simpleFun.kt") public void testSimpleFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleFun.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxAgainstJava/visibility/protectedStatic/simpleProperty.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 2e8d4c7b365..ae4132db5bc 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -29,183 +33,154 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotatedEnumEntry.kt") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); } @TestMetadata("annotatedObjectLiteral.kt") public void testAnnotatedObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); } @TestMetadata("annotationWithKotlinProperty.kt") public void testAnnotationWithKotlinProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); } @TestMetadata("annotationWithKotlinPropertyFromInterfaceCompanion.kt") public void testAnnotationWithKotlinPropertyFromInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); } @TestMetadata("annotationsOnDefault.kt") public void testAnnotationsOnDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); } @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); } @TestMetadata("constValInAnnotation.kt") public void testConstValInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/constValInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/constValInAnnotation.kt"); } @TestMetadata("defaultParameterValues.kt") public void testDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); } @TestMetadata("delegatedPropertySetter.kt") public void testDelegatedPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); } @TestMetadata("kotlinPropertyFromClassObjectAsParameter.kt") public void testKotlinPropertyFromClassObjectAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); } @TestMetadata("kotlinTopLevelPropertyAsParameter.kt") public void testKotlinTopLevelPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); } @TestMetadata("kt10136.kt") public void testKt10136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kt10136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kt10136.kt"); } @TestMetadata("nestedClassPropertyAsParameter.kt") public void testNestedClassPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); } @TestMetadata("nestedClassesInAnnotations.kt") public void testNestedClassesInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); } @TestMetadata("parameterAnnotationInDefaultImpls.kt") public void testParameterAnnotationInDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); } @TestMetadata("parameterWithPrimitiveType.kt") public void testParameterWithPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); } @TestMetadata("propertyWithPropertyInInitializerAsParameter.kt") public void testPropertyWithPropertyInInitializerAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); } @TestMetadata("resolveWithLowPriorityAnnotation.kt") public void testResolveWithLowPriorityAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); } @TestMetadata("wrongAnnotationArgumentInCtor.kt") public void testWrongAnnotationArgumentInCtor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); } @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotatedLambda extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotatedLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("funExpression.kt") public void testFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); } @TestMetadata("samFunExpression.kt") public void testSamFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); } @TestMetadata("samLambda.kt") public void testSamLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); } } } @@ -214,86 +189,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("argumentOrderInObjectSuperCall.kt") public void testArgumentOrderInObjectSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); } @TestMetadata("argumentOrderInSuperCall.kt") public void testArgumentOrderInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); } @TestMetadata("arguments.kt") public void testArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/arguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/arguments.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaults.kt") public void testDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/defaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/defaults.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); } @TestMetadata("kt9277.kt") public void testKt9277() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); } } @@ -301,462 +267,401 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arrays extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayConstructorsSimple.kt") public void testArrayConstructorsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); } @TestMetadata("arrayGetAssignMultiIndex.kt") public void testArrayGetAssignMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); } @TestMetadata("arrayGetMultiIndex.kt") public void testArrayGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); } @TestMetadata("arrayInstanceOf.kt") public void testArrayInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); } @TestMetadata("arrayPlusAssign.kt") public void testArrayPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); } @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/cloneArray.kt"); } @TestMetadata("clonePrimitiveArrays.kt") public void testClonePrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); } @TestMetadata("collectionAssignGetMultiIndex.kt") public void testCollectionAssignGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); } @TestMetadata("collectionGetMultiIndex.kt") public void testCollectionGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); } @TestMetadata("forEachBooleanArray.kt") public void testForEachBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); } @TestMetadata("forEachByteArray.kt") public void testForEachByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); } @TestMetadata("forEachCharArray.kt") public void testForEachCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); } @TestMetadata("forEachDoubleArray.kt") public void testForEachDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); } @TestMetadata("forEachFloatArray.kt") public void testForEachFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); } @TestMetadata("forEachIntArray.kt") public void testForEachIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); } @TestMetadata("forEachLongArray.kt") public void testForEachLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); } @TestMetadata("forEachShortArray.kt") public void testForEachShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); } @TestMetadata("genericArrayInObjectLiteralConstructor.kt") public void testGenericArrayInObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/hashMap.kt"); } @TestMetadata("inProjectionAsParameter.kt") public void testInProjectionAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); } @TestMetadata("inProjectionOfArray.kt") public void testInProjectionOfArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); } @TestMetadata("inProjectionOfList.kt") public void testInProjectionOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); } @TestMetadata("indices.kt") public void testIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indices.kt"); } @TestMetadata("indicesChar.kt") public void testIndicesChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indicesChar.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iterator.kt"); } @TestMetadata("iteratorBooleanArray.kt") public void testIteratorBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); } @TestMetadata("iteratorByteArray.kt") public void testIteratorByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); } @TestMetadata("iteratorByteArrayNextByte.kt") public void testIteratorByteArrayNextByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); } @TestMetadata("iteratorCharArray.kt") public void testIteratorCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); } @TestMetadata("iteratorDoubleArray.kt") public void testIteratorDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); } @TestMetadata("iteratorFloatArray.kt") public void testIteratorFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); } @TestMetadata("iteratorIntArray.kt") public void testIteratorIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); } @TestMetadata("iteratorLongArray.kt") public void testIteratorLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); } @TestMetadata("iteratorLongArrayNextLong.kt") public void testIteratorLongArrayNextLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); } @TestMetadata("iteratorShortArray.kt") public void testIteratorShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); } @TestMetadata("kt1291.kt") public void testKt1291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt1291.kt"); } @TestMetadata("kt17134.kt") public void testKt17134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt17134.kt"); } @TestMetadata("kt238.kt") public void testKt238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt238.kt"); } @TestMetadata("kt2997.kt") public void testKt2997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt2997.kt"); } @TestMetadata("kt33.kt") public void testKt33() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt33.kt"); } @TestMetadata("kt3771.kt") public void testKt3771() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt3771.kt"); } @TestMetadata("kt4118.kt") public void testKt4118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4118.kt"); } @TestMetadata("kt4348.kt") public void testKt4348() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4348.kt"); } @TestMetadata("kt4357.kt") public void testKt4357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4357.kt"); } @TestMetadata("kt503.kt") public void testKt503() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt503.kt"); } @TestMetadata("kt594.kt") public void testKt594() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt594.kt"); } @TestMetadata("kt602.kt") public void testKt602() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt602.kt"); } @TestMetadata("kt7009.kt") public void testKt7009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7009.kt"); } @TestMetadata("kt7288.kt") public void testKt7288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7288.kt"); } @TestMetadata("kt7338.kt") public void testKt7338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7338.kt"); } @TestMetadata("kt779.kt") public void testKt779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt779.kt"); } @TestMetadata("kt945.kt") public void testKt945() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt945.kt"); } @TestMetadata("kt950.kt") public void testKt950() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt950.kt"); } @TestMetadata("longAsIndex.kt") public void testLongAsIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/longAsIndex.kt"); } @TestMetadata("multiArrayConstructors.kt") public void testMultiArrayConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); } @TestMetadata("nonLocalReturnArrayConstructor.kt") public void testNonLocalReturnArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); } @TestMetadata("nonNullArray.kt") public void testNonNullArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonNullArray.kt"); } @TestMetadata("primitiveArrays.kt") public void testPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/stdlib.kt"); } @TestMetadata("varargsWithJava.kt") public void testVarargsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/varargsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/varargsWithJava.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt15560.kt") public void testKt15560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); } @TestMetadata("kt15568.kt") public void testKt15568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); } @TestMetadata("kt15575.kt") public void testKt15575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -764,32 +669,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -799,128 +704,112 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryOp extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBinaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bitwiseOp.kt") public void testBitwiseOp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); } @TestMetadata("bitwiseOpAny.kt") public void testBitwiseOpAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); } @TestMetadata("bitwiseOpNullable.kt") public void testBitwiseOpNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/call.kt"); } @TestMetadata("callAny.kt") public void testCallAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callAny.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callNullable.kt"); } @TestMetadata("compareBoxedChars.kt") public void testCompareBoxedChars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); } @TestMetadata("compareWithBoxedDouble.kt") public void testCompareWithBoxedDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); } @TestMetadata("compareWithBoxedLong.kt") public void testCompareWithBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); } @TestMetadata("divisionByZero.kt") public void testDivisionByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); } @TestMetadata("intrinsicAny.kt") public void testIntrinsicAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); } @TestMetadata("kt11163.kt") public void testKt11163() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163.kt"); } @TestMetadata("kt11163_properIeee754comparisons.kt") public void testKt11163_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); } @TestMetadata("kt23030_properIeee754comparisons.kt") public void testKt23030_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); } @TestMetadata("kt6747_identityEquals.kt") public void testKt6747_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); } @TestMetadata("overflowChar.kt") public void testOverflowChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); } @TestMetadata("overflowInt.kt") public void testOverflowInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); } @TestMetadata("overflowLong.kt") public void testOverflowLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); } } @@ -928,194 +817,167 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxingOptimization extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBoxingOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedIntegersCmp.kt") public void testBoxedIntegersCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); } @TestMetadata("boxedPrimitivesAreEqual.kt") public void testBoxedPrimitivesAreEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); } @TestMetadata("boxedRealsCmp.kt") public void testBoxedRealsCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/casts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/casts.kt"); } @TestMetadata("checkcastAndInstanceOf.kt") public void testCheckcastAndInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); } @TestMetadata("explicitEqualsOnDouble.kt") public void testExplicitEqualsOnDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); } @TestMetadata("fold.kt") public void testFold() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/fold.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/fold.kt"); } @TestMetadata("foldRange.kt") public void testFoldRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); } @TestMetadata("intCompareTo.kt") public void testIntCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); } @TestMetadata("kClassEquals.kt") public void testKClassEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kClassEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kClassEquals.kt"); } @TestMetadata("kt15871.kt") public void testKt15871() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); } @TestMetadata("kt17748.kt") public void testKt17748() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt17748.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt17748.kt"); } @TestMetadata("kt19767.kt") public void testKt19767() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); } @TestMetadata("kt19767_2.kt") public void testKt19767_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); } @TestMetadata("kt19767_3.kt") public void testKt19767_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_3.kt"); } @TestMetadata("kt19767_chain.kt") public void testKt19767_chain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); } @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); } @TestMetadata("kt5588.kt") public void testKt5588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); } @TestMetadata("kt5844.kt") public void testKt5844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); } @TestMetadata("kt6047.kt") public void testKt6047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); } @TestMetadata("kt6842.kt") public void testKt6842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); } @TestMetadata("maxMinBy.kt") public void testMaxMinBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); } @TestMetadata("nullCheck.kt") public void testNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); } @TestMetadata("progressions.kt") public void testProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); } @TestMetadata("safeCallWithElvis.kt") public void testSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simple.kt"); } @TestMetadata("simpleUninitializedMerge.kt") public void testSimpleUninitializedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); } @TestMetadata("taintedValues.kt") public void testTaintedValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); } @TestMetadata("taintedValuesBox.kt") public void testTaintedValuesBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); } @TestMetadata("unsafeRemoving.kt") public void testUnsafeRemoving() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/variables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); } } @@ -1123,300 +985,260 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bridges extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bridgeInInterface.kt") public void testBridgeInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/bridgeInInterface.kt"); } @TestMetadata("bridgeInInterfaceWithProperties.kt") public void testBridgeInInterfaceWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); } @TestMetadata("complexMultiInheritance.kt") public void testComplexMultiInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); } @TestMetadata("complexTraitImpl.kt") public void testComplexTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegation.kt"); } @TestMetadata("delegationComplex.kt") public void testDelegationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplex.kt"); } @TestMetadata("delegationComplexWithList.kt") public void testDelegationComplexWithList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); } @TestMetadata("delegationProperty.kt") public void testDelegationProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationProperty.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/diamond.kt"); } @TestMetadata("fakeCovariantOverride.kt") public void testFakeCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverride.kt") public void testFakeGenericCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverrideWithDelegation.kt") public void testFakeGenericCovariantOverrideWithDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); } @TestMetadata("fakeOverrideOfTraitImpl.kt") public void testFakeOverrideOfTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); } @TestMetadata("fakeOverrideWithSynthesizedImplementation.kt") public void testFakeOverrideWithSynthesizedImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/genericProperty.kt"); } @TestMetadata("kt12416.kt") public void testKt12416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt12416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt12416.kt"); } @TestMetadata("kt1939.kt") public void testKt1939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1939.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1939.kt"); } @TestMetadata("kt1959.kt") public void testKt1959() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1959.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1959.kt"); } @TestMetadata("kt2498.kt") public void testKt2498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2498.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2498.kt"); } @TestMetadata("kt2702.kt") public void testKt2702() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2702.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2702.kt"); } @TestMetadata("kt2833.kt") public void testKt2833() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2833.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2833.kt"); } @TestMetadata("kt2920.kt") public void testKt2920() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2920.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2920.kt"); } @TestMetadata("kt318.kt") public void testKt318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt318.kt"); } @TestMetadata("longChainOneBridge.kt") public void testLongChainOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); } @TestMetadata("manyTypeArgumentsSubstitutedSuccessively.kt") public void testManyTypeArgumentsSubstitutedSuccessively() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); } @TestMetadata("methodFromTrait.kt") public void testMethodFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); } @TestMetadata("noBridgeOnMutableCollectionInheritance.kt") public void testNoBridgeOnMutableCollectionInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); } @TestMetadata("objectClone.kt") public void testObjectClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/objectClone.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/objectClone.kt"); } @TestMetadata("overrideAbstractProperty.kt") public void testOverrideAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); } @TestMetadata("overrideReturnType.kt") public void testOverrideReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); } @TestMetadata("propertyAccessorsWithoutBody.kt") public void testPropertyAccessorsWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); } @TestMetadata("propertyDiamond.kt") public void testPropertyDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); } @TestMetadata("propertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertySetter.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simple.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleEnum.kt"); } @TestMetadata("simpleGenericMethod.kt") public void testSimpleGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleObject.kt"); } @TestMetadata("simpleReturnType.kt") public void testSimpleReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); } @TestMetadata("simpleTraitImpl.kt") public void testSimpleTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); } @TestMetadata("simpleUpperBound.kt") public void testSimpleUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); } @TestMetadata("strListContains.kt") public void testStrListContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/strListContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/strListContains.kt"); } @TestMetadata("traitImplInheritsTraitImpl.kt") public void testTraitImplInheritsTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges.kt") public void testTwoParentsWithDifferentMethodsTwoBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges2.kt") public void testTwoParentsWithDifferentMethodsTwoBridges2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); } @TestMetadata("twoParentsWithTheSameMethodOneBridge.kt") public void testTwoParentsWithTheSameMethodOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); } @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SubstitutionInSuperClass extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); } public void testAllFilesPresentInSubstitutionInSuperClass() throws Exception { @@ -1425,62 +1247,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("boundedTypeArguments.kt") public void testBoundedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); } @TestMetadata("differentErasureInSuperClass.kt") public void testDifferentErasureInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); } @TestMetadata("differentErasureInSuperClassComplex.kt") public void testDifferentErasureInSuperClassComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); } @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); } } } @@ -1489,10 +1301,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuiltinStubMethods extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); } public void testAllFilesPresentInBuiltinStubMethods() throws Exception { @@ -1501,150 +1316,130 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("Collection.kt") public void testCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); } @TestMetadata("customReadOnlyIterator.kt") public void testCustomReadOnlyIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); } @TestMetadata("delegationToArrayList.kt") public void testDelegationToArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); } @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); } @TestMetadata("inheritedImplementations.kt") public void testInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); } @TestMetadata("Iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); } @TestMetadata("IteratorWithRemove.kt") public void testIteratorWithRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); } @TestMetadata("List.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/List.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/List.kt"); } @TestMetadata("ListIterator.kt") public void testListIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); } @TestMetadata("ListWithAllImplementations.kt") public void testListWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); } @TestMetadata("ListWithAllInheritedImplementations.kt") public void testListWithAllInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); } @TestMetadata("manyTypeParametersWithUpperBounds.kt") public void testManyTypeParametersWithUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt"); } @TestMetadata("Map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); } @TestMetadata("MapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); } @TestMetadata("MapEntryWithSetValue.kt") public void testMapEntryWithSetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); } @TestMetadata("MapWithAllImplementations.kt") public void testMapWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); } @TestMetadata("nonTrivialSubstitution.kt") public void testNonTrivialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); } @TestMetadata("nonTrivialUpperBound.kt") public void testNonTrivialUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); } @TestMetadata("substitutedIterable.kt") public void testSubstitutedIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); } @TestMetadata("SubstitutedList.kt") public void testSubstitutedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); } @TestMetadata("substitutedListWithExtraSuperInterface.kt") public void testSubstitutedListWithExtraSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); } @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtendJavaCollections extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt"); } @TestMetadata("abstractMap.kt") public void testAbstractMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractMap.kt"); } @TestMetadata("abstractSet.kt") public void testAbstractSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); } public void testAllFilesPresentInExtendJavaCollections() throws Exception { @@ -1653,26 +1448,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); } @TestMetadata("hashSet.kt") public void testHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); } @TestMetadata("mapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); } } } @@ -1681,6 +1472,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -1689,142 +1484,129 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/array.kt"); } @TestMetadata("companionObjectReceiver.kt") public void testCompanionObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); } @TestMetadata("emptyLHS.kt") public void testEmptyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); } @TestMetadata("enumEntryMember.kt") public void testEnumEntryMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); } @TestMetadata("genericValOnLHS.kt") public void testGenericValOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); } @TestMetadata("kCallableNameIntrinsic.kt") public void testKCallableNameIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); } @TestMetadata("kt12738.kt") public void testKt12738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); } @TestMetadata("kt15446.kt") public void testKt15446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); } @TestMetadata("localUnitFunction.kt") public void testLocalUnitFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/localUnitFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/localUnitFunction.kt"); } @TestMetadata("multiCase.kt") public void testMultiCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); } @TestMetadata("nullReceiver.kt") public void testNullReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); } @TestMetadata("objectReceiver.kt") public void testObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); } @TestMetadata("primitiveReceiver.kt") public void testPrimitiveReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); } @TestMetadata("simpleFunction.kt") public void testSimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); } @TestMetadata("smartCastForExtensionReceiver.kt") public void testSmartCastForExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); } @TestMetadata("syntheticExtensionOnLHS.kt") public void testSyntheticExtensionOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/syntheticExtensionOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/syntheticExtensionOnLHS.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("nullableReceiverInEquals.kt") public void testNullableReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); } @TestMetadata("receiverInEquals.kt") public void testReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); } @TestMetadata("reflectionReference.kt") public void testReflectionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); } } @@ -1832,26 +1614,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); } @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); } } } @@ -1860,10 +1643,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -1872,406 +1658,344 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("booleanNotIntrinsic.kt") public void testBooleanNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); } @TestMetadata("classMemberFromClass.kt") public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); } @TestMetadata("classMemberFromExtension.kt") public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); } @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); } @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("constructorFromTopLevelNoArgs.kt") public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); } @TestMetadata("constructorFromTopLevelOneStringArg.kt") public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); } @TestMetadata("enumValueOfMethod.kt") public void testEnumValueOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); } @TestMetadata("equalsIntrinsic.kt") public void testEqualsIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); } @TestMetadata("extensionFromClass.kt") public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); } @TestMetadata("extensionFromExtension.kt") public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); } @TestMetadata("extensionFromTopLevelStringNoArgs.kt") public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); } @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); } @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); } @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("genericCallableReferenceArguments.kt") public void testGenericCallableReferenceArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); } @TestMetadata("genericCallableReferencesWithNullableTypes.kt") public void testGenericCallableReferencesWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); } @TestMetadata("genericCallableReferencesWithOverload.kt") public void testGenericCallableReferencesWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); } @TestMetadata("genericWithDependentType.kt") public void testGenericWithDependentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } @TestMetadata("getArityViaFunctionImpl.kt") public void testGetArityViaFunctionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); } @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); } @TestMetadata("innerConstructorFromClass.kt") public void testInnerConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); } @TestMetadata("innerConstructorFromExtension.kt") public void testInnerConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); } @TestMetadata("innerConstructorFromTopLevelNoArgs.kt") public void testInnerConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("innerConstructorFromTopLevelOneStringArg.kt") public void testInnerConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("javaCollectionsStaticMethod.kt") public void testJavaCollectionsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); } @TestMetadata("nestedConstructorFromClass.kt") public void testNestedConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); } @TestMetadata("nestedConstructorFromTopLevelNoArgs.kt") public void testNestedConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("nestedConstructorFromTopLevelOneStringArg.kt") public void testNestedConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("newArray.kt") public void testNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/newArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/newArray.kt"); } @TestMetadata("overloadedFun.kt") public void testOverloadedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); } @TestMetadata("overloadedFunVsVal.kt") public void testOverloadedFunVsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); } @TestMetadata("privateClassMember.kt") public void testPrivateClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); } @TestMetadata("sortListOfStrings.kt") public void testSortListOfStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); } @TestMetadata("specialCalls.kt") public void testSpecialCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelStringOneStringArg.kt") public void testTopLevelFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); } @TestMetadata("topLevelFromTopLevelUnitNoArgs.kt") public void testTopLevelFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt") public void testTopLevelFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("traitImplMethodWithClassReceiver.kt") public void testTraitImplMethodWithClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); } @TestMetadata("traitMember.kt") public void testTraitMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureOuter.kt") public void testCaptureOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); } @TestMetadata("classMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); } @TestMetadata("closureWithSideEffect.kt") public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); } @TestMetadata("constructorWithInitializer.kt") public void testConstructorWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); } @TestMetadata("enumExtendsTrait.kt") public void testEnumExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); } @TestMetadata("equalsHashCode.kt") public void testEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); } @TestMetadata("extensionToLocalClass.kt") public void testExtensionToLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); } @TestMetadata("extensionToPrimitive.kt") public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); } @TestMetadata("extensionWithClosure.kt") public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); } @TestMetadata("localFunctionName.kt") public void testLocalFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); } @TestMetadata("localLocal.kt") public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); } @TestMetadata("simpleClosure.kt") public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); } @TestMetadata("simpleWithArg.kt") public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); } @TestMetadata("unitWithSideEffect.kt") public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); } } } @@ -2280,10 +2004,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -2292,158 +2019,132 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegated.kt"); } @TestMetadata("delegatedMutable.kt") public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); } @TestMetadata("enumNameOrdinal.kt") public void testEnumNameOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); } @TestMetadata("extensionToArray.kt") public void testExtensionToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); } @TestMetadata("invokePropertyReference.kt") public void testInvokePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); } @TestMetadata("javaBeanConvention.kt") public void testJavaBeanConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); } @TestMetadata("kClassInstanceIsInitializedFirst.kt") public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); } @TestMetadata("kt12044.kt") public void testKt12044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); } @TestMetadata("kt12982_protectedPropertyReference.kt") public void testKt12982_protectedPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); } @TestMetadata("kt14330.kt") public void testKt14330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); } @TestMetadata("kt14330_2.kt") public void testKt14330_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); } @TestMetadata("kt15447.kt") public void testKt15447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); } @TestMetadata("kt6870_privatePropertyReference.kt") public void testKt6870_privatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); } @TestMetadata("listOfStringsMapLength.kt") public void testListOfStringsMapLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); } @TestMetadata("localClassVar.kt") public void testLocalClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); } @TestMetadata("overriddenInSubclass.kt") public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); } @TestMetadata("privateSetOuterClass.kt") public void testPrivateSetOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); } @TestMetadata("privateSetterInsideClass.kt") public void testPrivateSetterInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); } @TestMetadata("privateSetterOutsideClass.kt") public void testPrivateSetterOutsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); } @TestMetadata("simpleMember.kt") public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); } @TestMetadata("simpleMutableExtension.kt") public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); } @TestMetadata("simpleMutableMember.kt") public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); } @TestMetadata("simpleMutableTopLevel.kt") public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); } @TestMetadata("simpleTopLevel.kt") public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); } } @@ -2451,38 +2152,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Serializability extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSerializability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundWithNotSerializableReceiver.kt") public void testBoundWithNotSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); } @TestMetadata("boundWithSerializableReceiver.kt") public void testBoundWithSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); } @TestMetadata("noReflect.kt") public void testNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); } @TestMetadata("reflectedIsNotSerialized.kt") public void testReflectedIsNotSerialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); } @TestMetadata("withReflect.kt") public void testWithReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); } } } @@ -2491,226 +2191,199 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("as.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/as.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/as.kt"); } @TestMetadata("asForConstants.kt") public void testAsForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asForConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asForConstants.kt"); } @TestMetadata("asSafe.kt") public void testAsSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafe.kt"); } @TestMetadata("asSafeFail.kt") public void testAsSafeFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeFail.kt"); } @TestMetadata("asSafeForConstants.kt") public void testAsSafeForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); } @TestMetadata("asUnit.kt") public void testAsUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asUnit.kt"); } @TestMetadata("asWithGeneric.kt") public void testAsWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asWithGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asWithGeneric.kt"); } @TestMetadata("castGenericNull.kt") public void testCastGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/castGenericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/castGenericNull.kt"); } @TestMetadata("intersectionTypeMultipleBounds.kt") public void testIntersectionTypeMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); } @TestMetadata("intersectionTypeMultipleBoundsImplicitReceiver.kt") public void testIntersectionTypeMultipleBoundsImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); } @TestMetadata("intersectionTypeSmartcast.kt") public void testIntersectionTypeSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); } @TestMetadata("intersectionTypeWithMultipleBoundsAsReceiver.kt") public void testIntersectionTypeWithMultipleBoundsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); } @TestMetadata("intersectionTypeWithoutGenericsAsReceiver.kt") public void testIntersectionTypeWithoutGenericsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/is.kt"); } @TestMetadata("isNullablePrimitive.kt") public void testIsNullablePrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); } @TestMetadata("kt22714.kt") public void testKt22714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/kt22714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/kt22714.kt"); } @TestMetadata("lambdaToUnitCast.kt") public void testLambdaToUnitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/notIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/notIs.kt"); } @TestMetadata("unitAsAny.kt") public void testUnitAsAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsAny.kt"); } @TestMetadata("unitAsInt.kt") public void testUnitAsInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsInt.kt"); } @TestMetadata("unitAsSafeAny.kt") public void testUnitAsSafeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); } @TestMetadata("unitNullableCast.kt") public void testUnitNullableCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitNullableCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitNullableCast.kt"); } @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asFunKBig.kt") public void testAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); } @TestMetadata("asFunKSmall.kt") public void testAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); } @TestMetadata("isFunKBig.kt") public void testIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); } @TestMetadata("isFunKSmall.kt") public void testIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); } @TestMetadata("javaTypeIsFunK.kt") public void testJavaTypeIsFunK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); } @TestMetadata("reifiedAsFunKBig.kt") public void testReifiedAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); } @TestMetadata("reifiedAsFunKSmall.kt") public void testReifiedAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); } @TestMetadata("reifiedIsFunKBig.kt") public void testReifiedIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); } @TestMetadata("reifiedIsFunKSmall.kt") public void testReifiedIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); } @TestMetadata("reifiedSafeAsFunKBig.kt") public void testReifiedSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); } @TestMetadata("reifiedSafeAsFunKSmall.kt") public void testReifiedSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); } @TestMetadata("safeAsFunKBig.kt") public void testSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); } @TestMetadata("safeAsFunKSmall.kt") public void testSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); } } @@ -2718,50 +2391,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiteralExpressionAsGenericArgument extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("binaryExpressionCast.kt") public void testBinaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); } @TestMetadata("javaBox.kt") public void testJavaBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); } @TestMetadata("labeledExpressionCast.kt") public void testLabeledExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); } @TestMetadata("parenthesizedExpressionCast.kt") public void testParenthesizedExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); } @TestMetadata("superConstructor.kt") public void testSuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); } @TestMetadata("unaryExpressionCast.kt") public void testUnaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); } } @@ -2769,56 +2439,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MutableCollections extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMutableCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asWithMutable.kt") public void testAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); } @TestMetadata("isWithMutable.kt") public void testIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); } @TestMetadata("mutabilityMarkerInterfaces.kt") public void testMutabilityMarkerInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); } @TestMetadata("reifiedAsWithMutable.kt") public void testReifiedAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); } @TestMetadata("reifiedIsWithMutable.kt") public void testReifiedIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); } @TestMetadata("reifiedSafeAsWithMutable.kt") public void testReifiedSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); } @TestMetadata("safeAsWithMutable.kt") public void testSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); } @TestMetadata("weirdMutableCasts.kt") public void testWeirdMutableCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); } } } @@ -2827,20 +2493,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckcastOptimization extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCheckcastOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt19128.kt") public void testKt19128() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); } @TestMetadata("kt19246.kt") public void testKt19246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); } } @@ -2848,52 +2516,54 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiteral extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClassLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); } @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaIntrinsicWithSideEffect.kt") public void testJavaIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); } @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); } } @@ -2901,56 +2571,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/java.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/java.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); } @TestMetadata("javaObjectTypeReified.kt") public void testJavaObjectTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); } @TestMetadata("javaPrimitiveTypeReified.kt") public void testJavaPrimitiveTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); } @TestMetadata("javaReified.kt") public void testJavaReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); } @TestMetadata("kt11943.kt") public void testKt11943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); } @TestMetadata("objectSuperConstructorCall.kt") public void testObjectSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); } } } @@ -2959,754 +2625,639 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxPrimitiveTypeInClinitOfClassObject.kt") public void testBoxPrimitiveTypeInClinitOfClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); } @TestMetadata("classCompanionInitializationWithJava.kt") public void testClassCompanionInitializationWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt"); } @TestMetadata("classNamedAsOldPackageFacade.kt") public void testClassNamedAsOldPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObject.kt"); } @TestMetadata("classObjectAsExtensionReceiver.kt") public void testClassObjectAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); } @TestMetadata("classObjectAsStaticInitializer.kt") public void testClassObjectAsStaticInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); } @TestMetadata("classObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectField.kt"); } @TestMetadata("classObjectInTrait.kt") public void testClassObjectInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); } @TestMetadata("classObjectNotOfEnum.kt") public void testClassObjectNotOfEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); } @TestMetadata("classObjectToString.kt") public void testClassObjectToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectToString.kt"); } @TestMetadata("classObjectWithPrivateGenericMember.kt") public void testClassObjectWithPrivateGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); } @TestMetadata("classObjectsWithParentClasses.kt") public void testClassObjectsWithParentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); } @TestMetadata("comanionObjectFieldVsClassField.kt") public void testComanionObjectFieldVsClassField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); } @TestMetadata("defaultObjectSameNamesAsInOuter.kt") public void testDefaultObjectSameNamesAsInOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); } @TestMetadata("delegateConstructorCallWithKeywords.kt") public void testDelegateConstructorCallWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); } @TestMetadata("delegation2.kt") public void testDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation2.kt"); } @TestMetadata("delegation3.kt") public void testDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation3.kt"); } @TestMetadata("delegation4.kt") public void testDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation4.kt"); } @TestMetadata("delegationGenericArg.kt") public void testDelegationGenericArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); } @TestMetadata("delegationGenericArgUpperBound.kt") public void testDelegationGenericArgUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); } @TestMetadata("delegationGenericLongArg.kt") public void testDelegationGenericLongArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); } @TestMetadata("delegationJava.kt") public void testDelegationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationJava.kt"); } @TestMetadata("delegationMethodsWithArgs.kt") public void testDelegationMethodsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); } @TestMetadata("exceptionConstructor.kt") public void testExceptionConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); } @TestMetadata("extensionOnNamedClassObject.kt") public void testExtensionOnNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/funDelegation.kt"); } @TestMetadata("implementComparableInSubclass.kt") public void testImplementComparableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); } @TestMetadata("inheritSetAndHashSet.kt") public void testInheritSetAndHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritance.kt"); } @TestMetadata("inheritedInnerClass.kt") public void testInheritedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); } @TestMetadata("inheritedMethod.kt") public void testInheritedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedMethod.kt"); } @TestMetadata("initializerBlock.kt") public void testInitializerBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlock.kt"); } @TestMetadata("initializerBlockDImpl.kt") public void testInitializerBlockDImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/innerClass.kt"); } @TestMetadata("interfaceCompanionInitializationWithJava.kt") public void testInterfaceCompanionInitializationWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/interfaceCompanionInitializationWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/interfaceCompanionInitializationWithJava.kt"); } @TestMetadata("kt1018.kt") public void testKt1018() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1018.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1018.kt"); } @TestMetadata("kt1120.kt") public void testKt1120() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1120.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1120.kt"); } @TestMetadata("kt1134.kt") public void testKt1134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1134.kt"); } @TestMetadata("kt1157.kt") public void testKt1157() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1157.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1157.kt"); } @TestMetadata("kt1247.kt") public void testKt1247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1247.kt"); } @TestMetadata("kt1345.kt") public void testKt1345() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1345.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1345.kt"); } @TestMetadata("kt1439.kt") public void testKt1439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1439.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1439.kt"); } @TestMetadata("kt1535.kt") public void testKt1535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1535.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1535.kt"); } @TestMetadata("kt1538.kt") public void testKt1538() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1538.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1538.kt"); } @TestMetadata("kt1578.kt") public void testKt1578() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1578.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1578.kt"); } @TestMetadata("kt1611.kt") public void testKt1611() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1611.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1611.kt"); } @TestMetadata("kt1721.kt") public void testKt1721() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1721.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1721.kt"); } @TestMetadata("kt1726.kt") public void testKt1726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1726.kt"); } @TestMetadata("kt1759.kt") public void testKt1759() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1759.kt"); } @TestMetadata("kt1891.kt") public void testKt1891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1891.kt"); } @TestMetadata("kt1918.kt") public void testKt1918() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1918.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1918.kt"); } @TestMetadata("kt1976.kt") public void testKt1976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1976.kt"); } @TestMetadata("kt1980.kt") public void testKt1980() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1980.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1980.kt"); } @TestMetadata("kt2224.kt") public void testKt2224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2224.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2224.kt"); } @TestMetadata("kt2288.kt") public void testKt2288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2288.kt"); } @TestMetadata("kt2384.kt") public void testKt2384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2384.kt"); } @TestMetadata("kt2390.kt") public void testKt2390() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2390.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2390.kt"); } @TestMetadata("kt2391.kt") public void testKt2391() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2391.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2391.kt"); } @TestMetadata("kt2395.kt") public void testKt2395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2395.kt"); } @TestMetadata("kt2417.kt") public void testKt2417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2417.kt"); } @TestMetadata("kt2477.kt") public void testKt2477() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2477.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2477.kt"); } @TestMetadata("kt2480.kt") public void testKt2480() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2480.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2480.kt"); } @TestMetadata("kt2482.kt") public void testKt2482() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2482.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2482.kt"); } @TestMetadata("kt2485.kt") public void testKt2485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2485.kt"); } @TestMetadata("kt249.kt") public void testKt249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt249.kt"); } @TestMetadata("kt2532.kt") public void testKt2532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2532.kt"); } @TestMetadata("kt2566.kt") public void testKt2566() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566.kt"); } @TestMetadata("kt2566_2.kt") public void testKt2566_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566_2.kt"); } @TestMetadata("kt2607.kt") public void testKt2607() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2607.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2607.kt"); } @TestMetadata("kt2626.kt") public void testKt2626() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2626.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2626.kt"); } @TestMetadata("kt2711.kt") public void testKt2711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2711.kt"); } @TestMetadata("kt2784.kt") public void testKt2784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2784.kt"); } @TestMetadata("kt285.kt") public void testKt285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt285.kt"); } @TestMetadata("kt3001.kt") public void testKt3001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3001.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3001.kt"); } @TestMetadata("kt3114.kt") public void testKt3114() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3114.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3114.kt"); } @TestMetadata("kt3414.kt") public void testKt3414() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3414.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3414.kt"); } @TestMetadata("kt343.kt") public void testKt343() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt343.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt343.kt"); } @TestMetadata("kt3546.kt") public void testKt3546() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3546.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3546.kt"); } @TestMetadata("kt454.kt") public void testKt454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt454.kt"); } @TestMetadata("kt471.kt") public void testKt471() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt471.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt471.kt"); } @TestMetadata("kt48.kt") public void testKt48() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt48.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt48.kt"); } @TestMetadata("kt496.kt") public void testKt496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt496.kt"); } @TestMetadata("kt500.kt") public void testKt500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt500.kt"); } @TestMetadata("kt501.kt") public void testKt501() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt501.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt501.kt"); } @TestMetadata("kt504.kt") public void testKt504() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt504.kt"); } @TestMetadata("kt508.kt") public void testKt508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt508.kt"); } @TestMetadata("kt5347.kt") public void testKt5347() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt5347.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt5347.kt"); } @TestMetadata("kt6136.kt") public void testKt6136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6136.kt"); } @TestMetadata("kt633.kt") public void testKt633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt633.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt633.kt"); } @TestMetadata("kt6816.kt") public void testKt6816() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6816.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6816.kt"); } @TestMetadata("kt707.kt") public void testKt707() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt707.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt707.kt"); } @TestMetadata("kt723.kt") public void testKt723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt723.kt"); } @TestMetadata("kt725.kt") public void testKt725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt725.kt"); } @TestMetadata("kt8011.kt") public void testKt8011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011.kt"); } @TestMetadata("kt8011a.kt") public void testKt8011a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011a.kt"); } @TestMetadata("kt903.kt") public void testKt903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt903.kt"); } @TestMetadata("kt940.kt") public void testKt940() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt940.kt"); } @TestMetadata("kt9642.kt") public void testKt9642() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt9642.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt9642.kt"); } @TestMetadata("namedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/namedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/namedClassObject.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/outerThis.kt"); } @TestMetadata("overloadBinaryOperator.kt") public void testOverloadBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); } @TestMetadata("overloadPlusAssign.kt") public void testOverloadPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); } @TestMetadata("overloadPlusAssignReturn.kt") public void testOverloadPlusAssignReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); } @TestMetadata("overloadPlusToPlusAssign.kt") public void testOverloadPlusToPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); } @TestMetadata("overloadUnaryOperator.kt") public void testOverloadUnaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); } @TestMetadata("privateOuterFunctions.kt") public void testPrivateOuterFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); } @TestMetadata("privateOuterProperty.kt") public void testPrivateOuterProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); } @TestMetadata("privateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateToThis.kt"); } @TestMetadata("propertyDelegation.kt") public void testPropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyDelegation.kt"); } @TestMetadata("propertyInInitializer.kt") public void testPropertyInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); } @TestMetadata("quotedClassName.kt") public void testQuotedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/quotedClassName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/quotedClassName.kt"); } @TestMetadata("rightHandOverride.kt") public void testRightHandOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/rightHandOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/rightHandOverride.kt"); } @TestMetadata("sealedInSameFile.kt") public void testSealedInSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); } @TestMetadata("selfcreate.kt") public void testSelfcreate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/selfcreate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/selfcreate.kt"); } @TestMetadata("simpleBox.kt") public void testSimpleBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/simpleBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/simpleBox.kt"); } @TestMetadata("superConstructorCallWithComplexArg.kt") public void testSuperConstructorCallWithComplexArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); } @TestMetadata("typedDelegation.kt") public void testTypedDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/typedDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/typedDelegation.kt"); } @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("instantiateInDerived.kt") public void testInstantiateInDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); } @TestMetadata("instantiateInDerivedLabeled.kt") public void testInstantiateInDerivedLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); } @TestMetadata("instantiateInSameClass.kt") public void testInstantiateInSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); } @TestMetadata("kt6708.kt") public void testKt6708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/kt6708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/kt6708.kt"); } @TestMetadata("properOuter.kt") public void testProperOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properOuter.kt"); } @TestMetadata("properSuperLinking.kt") public void testProperSuperLinking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); } } } @@ -3715,424 +3266,364 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closures extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureExtensionReceiver.kt") public void testCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); } @TestMetadata("capturedLocalGenericFun.kt") public void testCapturedLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); } @TestMetadata("closureInsideConstrucor.kt") public void testClosureInsideConstrucor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); } @TestMetadata("closureOnTopLevel1.kt") public void testClosureOnTopLevel1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); } @TestMetadata("closureOnTopLevel2.kt") public void testClosureOnTopLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); } @TestMetadata("doubleEnclosedLocalVariable.kt") public void testDoubleEnclosedLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); } @TestMetadata("enclosingLocalVariable.kt") public void testEnclosingLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); } @TestMetadata("enclosingThis.kt") public void testEnclosingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingThis.kt"); } @TestMetadata("extensionClosure.kt") public void testExtensionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/extensionClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/extensionClosure.kt"); } @TestMetadata("kt10044.kt") public void testKt10044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt10044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt10044.kt"); } @TestMetadata("kt11634.kt") public void testKt11634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634.kt"); } @TestMetadata("kt11634_2.kt") public void testKt11634_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_2.kt"); } @TestMetadata("kt11634_3.kt") public void testKt11634_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_3.kt"); } @TestMetadata("kt11634_4.kt") public void testKt11634_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_4.kt"); } @TestMetadata("kt2151.kt") public void testKt2151() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt2151.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3152.kt"); } @TestMetadata("kt3523.kt") public void testKt3523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3523.kt"); } @TestMetadata("kt3738.kt") public void testKt3738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3738.kt"); } @TestMetadata("kt3905.kt") public void testKt3905() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3905.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3905.kt"); } @TestMetadata("kt4106.kt") public void testKt4106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4106.kt"); } @TestMetadata("kt4137.kt") public void testKt4137() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4137.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4137.kt"); } @TestMetadata("kt5589.kt") public void testKt5589() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt5589.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt5589.kt"); } @TestMetadata("localClassFunClosure.kt") public void testLocalClassFunClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); } @TestMetadata("localClassLambdaClosure.kt") public void testLocalClassLambdaClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); } @TestMetadata("localFunctionInFunction.kt") public void testLocalFunctionInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); } @TestMetadata("localFunctionInInitializer.kt") public void testLocalFunctionInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); } @TestMetadata("localGenericFun.kt") public void testLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localGenericFun.kt"); } @TestMetadata("localReturn.kt") public void testLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturn.kt"); } @TestMetadata("localReturnWithAutolabel.kt") public void testLocalReturnWithAutolabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); } @TestMetadata("noRefToOuter.kt") public void testNoRefToOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/noRefToOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/noRefToOuter.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/recursiveClosure.kt"); } @TestMetadata("refsAreSerializable.kt") public void testRefsAreSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); } @TestMetadata("simplestClosure.kt") public void testSimplestClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosure.kt"); } @TestMetadata("simplestClosureAndBoxing.kt") public void testSimplestClosureAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); } @TestMetadata("subclosuresWithinInitializers.kt") public void testSubclosuresWithinInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/underscoreParameters.kt"); } @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureInSuperConstructorCall extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorParameterAndLocalCapturedInLambdaInLocalClass.kt") public void testConstructorParameterAndLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass.kt") public void testConstructorParameterCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass2.kt") public void testConstructorParameterCapturedInLambdaInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); } @TestMetadata("kt13454.kt") public void testKt13454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); } @TestMetadata("kt14148.kt") public void testKt14148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); } @TestMetadata("kt4174a.kt") public void testKt4174a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass.kt") public void testLocalCapturedInAnonymousObjectInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass2.kt") public void testLocalCapturedInAnonymousObjectInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); } @TestMetadata("localCapturedInLambdaInInnerClassInLocalClass.kt") public void testLocalCapturedInLambdaInInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); } @TestMetadata("localCapturedInLambdaInLocalClass.kt") public void testLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); } @TestMetadata("localFunctionCapturedInLambda.kt") public void testLocalFunctionCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); } @TestMetadata("outerAndLocalCapturedInLocalClass.kt") public void testOuterAndLocalCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedAsImplicitThisInBoundReference.kt") public void testOuterCapturedAsImplicitThisInBoundReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); } @TestMetadata("outerCapturedInFunctionLiteral.kt") public void testOuterCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); } @TestMetadata("outerCapturedInInlineLambda.kt") public void testOuterCapturedInInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); } @TestMetadata("outerCapturedInInlineLambda2.kt") public void testOuterCapturedInInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); } @TestMetadata("outerCapturedInLambda.kt") public void testOuterCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); } @TestMetadata("outerCapturedInLambda2.kt") public void testOuterCapturedInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); } @TestMetadata("outerCapturedInLambdaInSecondaryConstructor.kt") public void testOuterCapturedInLambdaInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); } @TestMetadata("outerCapturedInLambdaInSubExpression.kt") public void testOuterCapturedInLambdaInSubExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); } @TestMetadata("outerCapturedInLocalClass.kt") public void testOuterCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedInNestedLambda.kt") public void testOuterCapturedInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); } @TestMetadata("outerCapturedInNestedObject.kt") public void testOuterCapturedInNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); } @TestMetadata("outerCapturedInObject.kt") public void testOuterCapturedInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); } @TestMetadata("outerCapturedInObject2.kt") public void testOuterCapturedInObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); } @TestMetadata("outerEnumEntryCapturedInLambdaInInnerClass.kt") public void testOuterEnumEntryCapturedInLambdaInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); } @TestMetadata("properValueCapturedByClosure1.kt") public void testProperValueCapturedByClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); } @TestMetadata("properValueCapturedByClosure2.kt") public void testProperValueCapturedByClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); } @TestMetadata("referenceToCapturedVariablesInMultipleLambdas.kt") public void testReferenceToCapturedVariablesInMultipleLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); } } @@ -4140,56 +3631,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureOuterProperty extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureFunctionInProperty.kt") public void testCaptureFunctionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); } @TestMetadata("inFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); } @TestMetadata("inProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); } @TestMetadata("inPropertyDeepObjectChain.kt") public void testInPropertyDeepObjectChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); } @TestMetadata("inPropertyFromSuperClass.kt") public void testInPropertyFromSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); } @TestMetadata("inPropertyFromSuperSuperClass.kt") public void testInPropertyFromSuperSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); } @TestMetadata("kt4176.kt") public void testKt4176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); } @TestMetadata("kt4656.kt") public void testKt4656() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); } } @@ -4197,68 +3684,62 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedVarsOptimization extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedInCrossinline.kt") public void testCapturedInCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); } @TestMetadata("capturedInInlineOnlyAssign.kt") public void testCapturedInInlineOnlyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); } @TestMetadata("capturedInInlineOnlyCAO.kt") public void testCapturedInInlineOnlyCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); } @TestMetadata("capturedInInlineOnlyIncrDecr.kt") public void testCapturedInInlineOnlyIncrDecr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); } @TestMetadata("capturedInInlineOnlyIndexedCAO.kt") public void testCapturedInInlineOnlyIndexedCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); } @TestMetadata("capturedVarsOfSize2.kt") public void testCapturedVarsOfSize2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); } @TestMetadata("kt17200.kt") public void testKt17200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); } @TestMetadata("kt17588.kt") public void testKt17588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); } @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); } @TestMetadata("withCoroutines.kt") public void testWithCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); } } @@ -4266,44 +3747,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClosureInsideClosure extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosureInsideClosure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("localFunInsideLocalFun.kt") public void testLocalFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); } @TestMetadata("localFunInsideLocalFunDifferentSignatures.kt") public void testLocalFunInsideLocalFunDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); } @TestMetadata("propertyAndFunctionNameClash.kt") public void testPropertyAndFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); } @TestMetadata("threeLevels.kt") public void testThreeLevels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); } @TestMetadata("threeLevelsDifferentSignatures.kt") public void testThreeLevelsDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); } @TestMetadata("varAsFunInsideLocalFun.kt") public void testVarAsFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); } } } @@ -4312,32 +3791,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionLiterals extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCollectionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("collectionLiteralsInArgumentPosition.kt") public void testCollectionLiteralsInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); } @TestMetadata("collectionLiteralsWithConstants.kt") public void testCollectionLiteralsWithConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); } @TestMetadata("collectionLiteralsWithVarargs.kt") public void testCollectionLiteralsWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); } @TestMetadata("defaultAnnotationParameterValues.kt") public void testDefaultAnnotationParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); } } @@ -4345,116 +3824,102 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charSequence.kt") public void testCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/charSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/charSequence.kt"); } @TestMetadata("implementCollectionThroughKotlin.kt") public void testImplementCollectionThroughKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/implementCollectionThroughKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/implementCollectionThroughKotlin.kt"); } @TestMetadata("inSetWithSmartCast.kt") public void testInSetWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); } @TestMetadata("irrelevantImplCharSequenceKotlin.kt") public void testIrrelevantImplCharSequenceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); } @TestMetadata("irrelevantImplMutableList.kt") public void testIrrelevantImplMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableList.kt"); } @TestMetadata("irrelevantImplMutableListKotlin.kt") public void testIrrelevantImplMutableListKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); } @TestMetadata("irrelevantImplMutableListSubstitution.kt") public void testIrrelevantImplMutableListSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListSubstitution.kt"); } @TestMetadata("irrelevantRemoveAtOverrideInJava.kt") public void testIrrelevantRemoveAtOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantRemoveAtOverrideInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantRemoveAtOverrideInJava.kt"); } @TestMetadata("irrelevantSizeOverrideInJava.kt") public void testIrrelevantSizeOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantSizeOverrideInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantSizeOverrideInJava.kt"); } @TestMetadata("mutableList.kt") public void testMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/mutableList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/mutableList.kt"); } @TestMetadata("noStubsInJavaSuperClass.kt") public void testNoStubsInJavaSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); } @TestMetadata("platformValueContains.kt") public void testPlatformValueContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/platformValueContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/platformValueContains.kt"); } @TestMetadata("readOnlyList.kt") public void testReadOnlyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/readOnlyList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/readOnlyList.kt"); } @TestMetadata("readOnlyMap.kt") public void testReadOnlyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/readOnlyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/readOnlyMap.kt"); } @TestMetadata("removeAtInt.kt") public void testRemoveAtInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/removeAtInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/removeAtInt.kt"); } @TestMetadata("strList.kt") public void testStrList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/strList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/strList.kt"); } @TestMetadata("toArrayInJavaClass.kt") public void testToArrayInJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); } } @@ -4462,20 +3927,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Compatibility extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dataClassEqualsHashCodeToString.kt") public void testDataClassEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); } @TestMetadata("privateCompanionObject.kt") public void testPrivateCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); } } @@ -4483,44 +3950,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constants extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstants() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constantsInWhen.kt") public void testConstantsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/constantsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/constantsInWhen.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/float.kt"); } @TestMetadata("kt9532.kt") public void testKt9532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } @TestMetadata("kt9532_lv10.kt") public void testKt9532_lv10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/long.kt"); } @TestMetadata("privateConst.kt") public void testPrivateConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/privateConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/privateConst.kt"); } } @@ -4528,104 +3993,92 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstructorCall extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakInConstructorArguments.kt") public void testBreakInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt"); } @TestMetadata("continueInConstructorArguments.kt") public void testContinueInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt"); } @TestMetadata("earlyReturnInConstructorArguments.kt") public void testEarlyReturnInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt"); } @TestMetadata("inlineFunInConstructorCallEvaluationOrder.kt") public void testInlineFunInConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt"); } @TestMetadata("inlineFunInConstructorCallWithDisabledNormalization.kt") public void testInlineFunInConstructorCallWithDisabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithDisabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithDisabledNormalization.kt"); } @TestMetadata("inlineFunInConstructorCallWithEnabledNormalization.kt") public void testInlineFunInConstructorCallWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithEnabledNormalization.kt"); } @TestMetadata("inlineFunInConstructorCallWithStrictNormalization.kt") public void testInlineFunInConstructorCallWithStrictNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithStrictNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithStrictNormalization.kt"); } @TestMetadata("inlineFunInInnerClassConstructorCall.kt") public void testInlineFunInInnerClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInInnerClassConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInInnerClassConstructorCall.kt"); } @TestMetadata("inlineFunInLocalClassConstructorCall.kt") public void testInlineFunInLocalClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } @TestMetadata("loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt") public void testLoopInInlineFunInSuperConstructorCallWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt"); } @TestMetadata("loopInInlineFunWithEnabledNormalization.kt") public void testLoopInInlineFunWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/loopInInlineFunWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFunWithEnabledNormalization.kt"); } @TestMetadata("nestedConstructorCallWithJumpOutInConstructorArguments.kt") public void testNestedConstructorCallWithJumpOutInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt"); } @TestMetadata("nonLocalReturnInConstructorArguments.kt") public void testNonLocalReturnInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt"); } @TestMetadata("possiblyPoppedUnitializedValueInArguments.kt") public void testPossiblyPoppedUnitializedValueInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt"); } @TestMetadata("regularConstructorCallEvaluationOrder.kt") public void testRegularConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt"); } @TestMetadata("tryCatchInConstructorCallEvaluationOrder.kt") public void testTryCatchInConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/tryCatchInConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/tryCatchInConstructorCallEvaluationOrder.kt"); } } @@ -4633,550 +4086,469 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bottles.kt") public void testBottles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/bottles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/bottles.kt"); } @TestMetadata("breakInFinally.kt") public void testBreakInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); } @TestMetadata("compareBoxedIntegerToZero.kt") public void testCompareBoxedIntegerToZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); } @TestMetadata("conditionOfEmptyIf.kt") public void testConditionOfEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); } @TestMetadata("continueInFor.kt") public void testContinueInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); } @TestMetadata("continueInForCondition.kt") public void testContinueInForCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); } @TestMetadata("continueInWhile.kt") public void testContinueInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); } @TestMetadata("continueToLabelInFor.kt") public void testContinueToLabelInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhile.kt"); } @TestMetadata("doWhileFib.kt") public void testDoWhileFib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); } @TestMetadata("doWhileWithContinue.kt") public void testDoWhileWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); } @TestMetadata("emptyDoWhile.kt") public void testEmptyDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); } @TestMetadata("emptyFor.kt") public void testEmptyFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); } @TestMetadata("emptyWhile.kt") public void testEmptyWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); } @TestMetadata("factorialTest.kt") public void testFactorialTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); } @TestMetadata("finallyOnEmptyReturn.kt") public void testFinallyOnEmptyReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); } @TestMetadata("forArrayList.kt") public void testForArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); } @TestMetadata("forArrayListMultiDecl.kt") public void testForArrayListMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); } @TestMetadata("forInCharSequence.kt") public void testForInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); } @TestMetadata("forInCharSequenceMut.kt") public void testForInCharSequenceMut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); } @TestMetadata("forInSmartCastToArray.kt") public void testForInSmartCastToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); } @TestMetadata("forLoopMemberExtensionAll.kt") public void testForLoopMemberExtensionAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); } @TestMetadata("forLoopMemberExtensionHasNext.kt") public void testForLoopMemberExtensionHasNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); } @TestMetadata("forLoopMemberExtensionNext.kt") public void testForLoopMemberExtensionNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); } @TestMetadata("forUserType.kt") public void testForUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forUserType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forUserType.kt"); } @TestMetadata("inRangeConditionsInWhen.kt") public void testInRangeConditionsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); } @TestMetadata("kt12908.kt") public void testKt12908() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908.kt"); } @TestMetadata("kt12908_2.kt") public void testKt12908_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); } @TestMetadata("kt1441.kt") public void testKt1441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1441.kt"); } @TestMetadata("kt14839.kt") public void testKt14839() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt14839.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt14839.kt"); } @TestMetadata("kt15726.kt") public void testKt15726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt15726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt15726.kt"); } @TestMetadata("kt1688.kt") public void testKt1688() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1688.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1688.kt"); } @TestMetadata("kt17110.kt") public void testKt17110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17110.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17110.kt"); } @TestMetadata("kt1742.kt") public void testKt1742() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1742.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1742.kt"); } @TestMetadata("kt17590.kt") public void testKt17590() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590.kt"); } @TestMetadata("kt17590_long.kt") public void testKt17590_long() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); } @TestMetadata("kt1899.kt") public void testKt1899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1899.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1899.kt"); } @TestMetadata("kt2147.kt") public void testKt2147() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2147.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2147.kt"); } @TestMetadata("kt2259.kt") public void testKt2259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2259.kt"); } @TestMetadata("kt2291.kt") public void testKt2291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2291.kt"); } @TestMetadata("kt237.kt") public void testKt237() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt237.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt237.kt"); } @TestMetadata("kt2416.kt") public void testKt2416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2416.kt"); } @TestMetadata("kt2423.kt") public void testKt2423() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2423.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2423.kt"); } @TestMetadata("kt2577.kt") public void testKt2577() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2577.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2577.kt"); } @TestMetadata("kt2597.kt") public void testKt2597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2597.kt"); } @TestMetadata("kt299.kt") public void testKt299() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt299.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt299.kt"); } @TestMetadata("kt3087.kt") public void testKt3087() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3087.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3087.kt"); } @TestMetadata("kt3203_1.kt") public void testKt3203_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); } @TestMetadata("kt3203_2.kt") public void testKt3203_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); } @TestMetadata("kt3273.kt") public void testKt3273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3273.kt"); } @TestMetadata("kt3280.kt") public void testKt3280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3280.kt"); } @TestMetadata("kt3574.kt") public void testKt3574() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3574.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3574.kt"); } @TestMetadata("kt416.kt") public void testKt416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt416.kt"); } @TestMetadata("kt513.kt") public void testKt513() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt513.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt513.kt"); } @TestMetadata("kt628.kt") public void testKt628() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt628.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt628.kt"); } @TestMetadata("kt769.kt") public void testKt769() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt769.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt769.kt"); } @TestMetadata("kt772.kt") public void testKt772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt772.kt"); } @TestMetadata("kt773.kt") public void testKt773() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt773.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt773.kt"); } @TestMetadata("kt8148.kt") public void testKt8148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148.kt"); } @TestMetadata("kt8148_break.kt") public void testKt8148_break() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); } @TestMetadata("kt8148_continue.kt") public void testKt8148_continue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); } @TestMetadata("kt870.kt") public void testKt870() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt870.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt870.kt"); } @TestMetadata("kt9022Return.kt") public void testKt9022Return() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); } @TestMetadata("kt9022Throw.kt") public void testKt9022Throw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); } @TestMetadata("kt910.kt") public void testKt910() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt910.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt910.kt"); } @TestMetadata("kt958.kt") public void testKt958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt958.kt"); } @TestMetadata("longRange.kt") public void testLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/longRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/longRange.kt"); } @TestMetadata("parameterWithNameForFunctionType.kt") public void testParameterWithNameForFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); } @TestMetadata("quicksort.kt") public void testQuicksort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/quicksort.kt"); } @TestMetadata("tryCatchFinallyChain.kt") public void testTryCatchFinallyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); } @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BreakContinueInExpressions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakFromOuter.kt") public void testBreakFromOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); } @TestMetadata("breakInDoWhile.kt") public void testBreakInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); } @TestMetadata("breakInExpr.kt") public void testBreakInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); } @TestMetadata("continueInDoWhile.kt") public void testContinueInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); } @TestMetadata("inlineWithStack.kt") public void testInlineWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); } @TestMetadata("innerLoopWithStack.kt") public void testInnerLoopWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); } @TestMetadata("kt14581.kt") public void testKt14581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); } @TestMetadata("kt16713.kt") public void testKt16713() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); } @TestMetadata("kt16713_2.kt") public void testKt16713_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); } @TestMetadata("kt17384.kt") public void testKt17384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); } @TestMetadata("kt9022And.kt") public void testKt9022And() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); } @TestMetadata("kt9022Or.kt") public void testKt9022Or() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); } @TestMetadata("pathologicalDoWhile.kt") public void testPathologicalDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); } @TestMetadata("popSizes.kt") public void testPopSizes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); } @TestMetadata("tryFinally1.kt") public void testTryFinally1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); } @TestMetadata("tryFinally2.kt") public void testTryFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); } @TestMetadata("whileTrueBreak.kt") public void testWhileTrueBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); } } @@ -5184,62 +4556,57 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArray extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInArraySpecializedToUntil.kt") public void testForInArraySpecializedToUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); } @TestMetadata("forInArrayWithArrayPropertyUpdatedInLoopBody.kt") public void testForInArrayWithArrayPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody12.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody13.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); } @TestMetadata("forInDelegatedPropertyUpdatedInLoopBody.kt") public void testForInDelegatedPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInFieldUpdatedInLoopBody.kt") public void testForInFieldUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); } @TestMetadata("forIntArray.kt") public void testForIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); } @TestMetadata("forNullableIntArray.kt") public void testForNullableIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); } @TestMetadata("forPrimitiveIntArray.kt") public void testForPrimitiveIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); } } @@ -5247,98 +4614,87 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayWithIndex extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInArrayWithIndexContinuesAsUnmodified.kt") public void testForInArrayWithIndexContinuesAsUnmodified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); } @TestMetadata("forInArrrayWithIndexNoElementVar.kt") public void testForInArrrayWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); } @TestMetadata("forInArrrayWithIndexNoIndexVar.kt") public void testForInArrrayWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); } @TestMetadata("forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInArrrayWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); } @TestMetadata("forInByteArrayWithIndexWithSmartCast.kt") public void testForInByteArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInByteArrrayWithIndex.kt") public void testForInByteArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); } @TestMetadata("forInEmptyArrrayWithIndex.kt") public void testForInEmptyArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndex.kt") public void testForInGenericArrayOfIntsWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndexWithSmartCast.kt") public void testForInGenericArrayOfIntsWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); } @TestMetadata("forInGenericArrayWithIndex.kt") public void testForInGenericArrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); } @TestMetadata("forInIntArrayWithIndexWithSmartCast.kt") public void testForInIntArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInIntArrrayWithIndex.kt") public void testForInIntArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); } @TestMetadata("forInObjectArrrayWithIndex.kt") public void testForInObjectArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); } @TestMetadata("forInShortArrayWithIndexWithSmartCast.kt") public void testForInShortArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInShortArrrayWithIndex.kt") public void testForInShortArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); } } @@ -5346,50 +4702,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInCharSequenceWithIndex extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInCharSeqWithIndexStops.kt") public void testForInCharSeqWithIndexStops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); } @TestMetadata("forInCharSequenceWithIndex.kt") public void testForInCharSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); } @TestMetadata("forInEmptyStringWithIndex.kt") public void testForInEmptyStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); } @TestMetadata("forInStringWithIndex.kt") public void testForInStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); } @TestMetadata("forInStringWithIndexNoElementVar.kt") public void testForInStringWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); } @TestMetadata("forInStringWithIndexNoIndexVar.kt") public void testForInStringWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); } @TestMetadata("forInStringWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInStringWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5397,44 +4750,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIterableWithIndex extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInEmptyListWithIndex.kt") public void testForInEmptyListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); } @TestMetadata("forInListWithIndex.kt") public void testForInListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); } @TestMetadata("forInListWithIndexNoElementVar.kt") public void testForInListWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); } @TestMetadata("forInListWithIndexNoIndexVar.kt") public void testForInListWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); } @TestMetadata("forInListWithIndexThrowsCME.kt") public void testForInListWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); } @TestMetadata("forInListWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInListWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5442,44 +4793,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInSequenceWithIndex extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInEmptySequenceWithIndex.kt") public void testForInEmptySequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndex.kt") public void testForInSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndexNoElementVar.kt") public void testForInSequenceWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); } @TestMetadata("forInSequenceWithIndexNoIndexVar.kt") public void testForInSequenceWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); } @TestMetadata("forInSequenceWithIndexThrowsCME.kt") public void testForInSequenceWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); } @TestMetadata("forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInSequenceWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5487,38 +4836,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnsNothing extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReturnsNothing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); } @TestMetadata("inlineMethod.kt") public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); } } @@ -5526,188 +4874,162 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchInExpressions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); } @TestMetadata("complexChain.kt") public void testComplexChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); } @TestMetadata("deadTryCatch.kt") public void testDeadTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); } @TestMetadata("expectException.kt") public void testExpectException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); } @TestMetadata("inlineTryCatch.kt") public void testInlineTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); } @TestMetadata("inlineTryExpr.kt") public void testInlineTryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); } @TestMetadata("inlineTryFinally.kt") public void testInlineTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); } @TestMetadata("kt17572.kt") public void testKt17572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); } @TestMetadata("kt17572_2.kt") public void testKt17572_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); } @TestMetadata("kt17572_2_ext.kt") public void testKt17572_2_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); } @TestMetadata("kt17572_ext.kt") public void testKt17572_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); } @TestMetadata("kt17572_nested.kt") public void testKt17572_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); } @TestMetadata("kt17573.kt") public void testKt17573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); } @TestMetadata("kt17573_nested.kt") public void testKt17573_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); } @TestMetadata("kt8608.kt") public void testKt8608() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); } @TestMetadata("kt9644try.kt") public void testKt9644try() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); } @TestMetadata("multipleCatchBlocks.kt") public void testMultipleCatchBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); } @TestMetadata("splitTry.kt") public void testSplitTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); } @TestMetadata("splitTryCorner1.kt") public void testSplitTryCorner1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); } @TestMetadata("splitTryCorner2.kt") public void testSplitTryCorner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); } @TestMetadata("tryAfterTry.kt") public void testTryAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); } @TestMetadata("tryAndBreak.kt") public void testTryAndBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); } @TestMetadata("tryAndContinue.kt") public void testTryAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); } @TestMetadata("tryCatchAfterWhileTrue.kt") public void testTryCatchAfterWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); } @TestMetadata("tryInsideCatch.kt") public void testTryInsideCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); } @TestMetadata("tryInsideTry.kt") public void testTryInsideTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); } @TestMetadata("unmatchedInlineMarkers.kt") public void testUnmatchedInlineMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); } } } @@ -5716,16 +5038,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); } @TestMetadata("accessorForSuspend.kt") public void testAccessorForSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); } public void testAllFilesPresentInCoroutines() throws Exception { @@ -5734,550 +5058,464 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("asyncIterator.kt") public void testAsyncIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); } @TestMetadata("asyncIteratorNullMerge.kt") public void testAsyncIteratorNullMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); } @TestMetadata("asyncIteratorToList.kt") public void testAsyncIteratorToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); } @TestMetadata("await.kt") public void testAwait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/await.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/await.kt"); } @TestMetadata("beginWithException.kt") public void testBeginWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithException.kt"); } @TestMetadata("beginWithExceptionNoHandleException.kt") public void testBeginWithExceptionNoHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); } @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); } @TestMetadata("controllerAccessFromInnerLambda.kt") public void testControllerAccessFromInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); } @TestMetadata("coroutineContextInInlinedLambda.kt") public void testCoroutineContextInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); } @TestMetadata("coroutineToString.kt") public void testCoroutineToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineToString.kt"); } @TestMetadata("createCoroutineSafe.kt") public void testCreateCoroutineSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); } @TestMetadata("createCoroutinesOnManualInstances.kt") public void testCreateCoroutinesOnManualInstances() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); } @TestMetadata("crossInlineWithCapturedOuterReceiver.kt") public void testCrossInlineWithCapturedOuterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); } @TestMetadata("defaultParametersInSuspend.kt") public void testDefaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); } @TestMetadata("emptyClosure.kt") public void testEmptyClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); } @TestMetadata("falseUnitCoercion.kt") public void testFalseUnitCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); } @TestMetadata("generate.kt") public void testGenerate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/generate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/generate.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleException.kt"); } @TestMetadata("handleResultCallEmptyBody.kt") public void testHandleResultCallEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); } @TestMetadata("handleResultNonUnitExpression.kt") public void testHandleResultNonUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); } @TestMetadata("handleResultSuspended.kt") public void testHandleResultSuspended() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); } @TestMetadata("illegalState.kt") public void testIllegalState() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/illegalState.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/illegalState.kt"); } @TestMetadata("indirectInlineUsedAsNonInline.kt") public void testIndirectInlineUsedAsNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); } @TestMetadata("inlineFunInGenericClass.kt") public void testInlineFunInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); } @TestMetadata("inlineGenericFunCalledFromSubclass.kt") public void testInlineGenericFunCalledFromSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); } @TestMetadata("inlinedTryCatchFinally.kt") public void testInlinedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); } @TestMetadata("innerSuspensionCalls.kt") public void testInnerSuspensionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); } @TestMetadata("instanceOfContinuation.kt") public void testInstanceOfContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); } @TestMetadata("iterateOverArray.kt") public void testIterateOverArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); } @TestMetadata("kt12958.kt") public void testKt12958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt12958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt12958.kt"); } @TestMetadata("kt15016.kt") public void testKt15016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15016.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15016.kt"); } @TestMetadata("kt15017.kt") public void testKt15017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15017.kt"); } @TestMetadata("kt15930.kt") public void testKt15930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15930.kt"); } @TestMetadata("kt21605.kt") public void testKt21605() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt21605.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } @TestMetadata("lastExpressionIsLoop.kt") public void testLastExpressionIsLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); } @TestMetadata("lastStatementInc.kt") public void testLastStatementInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); } @TestMetadata("lastStementAssignment.kt") public void testLastStementAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); } @TestMetadata("lastUnitExpression.kt") public void testLastUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); } @TestMetadata("localCallableRef.kt") public void testLocalCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); } @TestMetadata("localDelegate.kt") public void testLocalDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localDelegate.kt"); } @TestMetadata("longRangeInSuspendCall.kt") public void testLongRangeInSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); } @TestMetadata("longRangeInSuspendFun.kt") public void testLongRangeInSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); } @TestMetadata("mergeNullAndString.kt") public void testMergeNullAndString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); } @TestMetadata("multipleInvokeCalls.kt") public void testMultipleInvokeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda1.kt") public void testMultipleInvokeCallsInsideInlineLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda2.kt") public void testMultipleInvokeCallsInsideInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda3.kt") public void testMultipleInvokeCallsInsideInlineLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); } @TestMetadata("nestedTryCatch.kt") public void testNestedTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); } @TestMetadata("noSuspensionPoints.kt") public void testNoSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); } @TestMetadata("nonLocalReturnFromInlineLambda.kt") public void testNonLocalReturnFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); } @TestMetadata("nonLocalReturnFromInlineLambdaDeep.kt") public void testNonLocalReturnFromInlineLambdaDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); } @TestMetadata("overrideDefaultArgument.kt") public void testOverrideDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); } @TestMetadata("recursiveSuspend.kt") public void testRecursiveSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); } @TestMetadata("returnByLabel.kt") public void testReturnByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simple.kt"); } @TestMetadata("simpleException.kt") public void testSimpleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleException.kt"); } @TestMetadata("simpleWithHandleResult.kt") public void testSimpleWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); } @TestMetadata("statementLikeLastExpression.kt") public void testStatementLikeLastExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); } @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); } @TestMetadata("suspendDefaultImpl.kt") public void testSuspendDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); } @TestMetadata("suspendDelegation.kt") public void testSuspendDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); } @TestMetadata("suspendFromInlineLambda.kt") public void testSuspendFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); } @TestMetadata("suspendFunImportedFromObject.kt") public void testSuspendFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstruction.kt") public void testSuspendInTheMiddleOfObjectConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt") public void testSuspendInTheMiddleOfObjectConstructionEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionWithJumpOut.kt") public void testSuspendInTheMiddleOfObjectConstructionWithJumpOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); } @TestMetadata("suspensionInsideSafeCall.kt") public void testSuspensionInsideSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); } @TestMetadata("suspensionInsideSafeCallWithElvis.kt") public void testSuspensionInsideSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); } @TestMetadata("tryCatchFinallyWithHandleResult.kt") public void testTryCatchFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); } @TestMetadata("tryCatchWithHandleResult.kt") public void testTryCatchWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); } @TestMetadata("tryFinallyInsideInlineLambda.kt") public void testTryFinallyInsideInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); } @TestMetadata("tryFinallyWithHandleResult.kt") public void testTryFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); } @TestMetadata("varValueConflictsWithTable.kt") public void testVarValueConflictsWithTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); } @TestMetadata("varValueConflictsWithTableSameSort.kt") public void testVarValueConflictsWithTableSameSort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInControlFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakFinally.kt") public void testBreakFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); } @TestMetadata("breakStatement.kt") public void testBreakStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); } @TestMetadata("doWhileStatement.kt") public void testDoWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } @TestMetadata("forContinue.kt") public void testForContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); } @TestMetadata("forStatement.kt") public void testForStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); } @TestMetadata("forWithStep.kt") public void testForWithStep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); } @TestMetadata("ifStatement.kt") public void testIfStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); } @TestMetadata("labeledWhile.kt") public void testLabeledWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); } @TestMetadata("returnFromFinally.kt") public void testReturnFromFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); } @TestMetadata("switchLikeWhen.kt") public void testSwitchLikeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); } @TestMetadata("throwFromCatch.kt") public void testThrowFromCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); } @TestMetadata("throwInTryWithHandleResult.kt") public void testThrowInTryWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); } @TestMetadata("whileStatement.kt") public void testWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); } } @@ -6285,148 +5523,134 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FeatureIntersection extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFeatureIntersection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakWithNonEmptyStack.kt") public void testBreakWithNonEmptyStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); } @TestMetadata("destructuringInLambdas.kt") public void testDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); } @TestMetadata("safeCallOnTwoReceivers.kt") public void testSafeCallOnTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); } @TestMetadata("safeCallOnTwoReceiversLong.kt") public void testSafeCallOnTwoReceiversLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); } @TestMetadata("suspendDestructuringInLambdas.kt") public void testSuspendDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); } @TestMetadata("suspendOperatorPlus.kt") public void testSuspendOperatorPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); } @TestMetadata("suspendOperatorPlusAssign.kt") public void testSuspendOperatorPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); } @TestMetadata("suspendOperatorPlusCallFromLambda.kt") public void testSuspendOperatorPlusCallFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tailrec extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailrec() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("controlFlowIf.kt") public void testControlFlowIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); } @TestMetadata("controlFlowWhen.kt") public void testControlFlowWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); } @TestMetadata("extention.kt") public void testExtention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); } } } @@ -6435,68 +5659,62 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntLikeVarSpilling extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("complicatedMerge.kt") public void testComplicatedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); } @TestMetadata("i2bResult.kt") public void testI2bResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); } @TestMetadata("loadFromBooleanArray.kt") public void testLoadFromBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); } @TestMetadata("loadFromByteArray.kt") public void testLoadFromByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); } @TestMetadata("noVariableInTable.kt") public void testNoVariableInTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); } @TestMetadata("sameIconst1ManyVars.kt") public void testSameIconst1ManyVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); } @TestMetadata("usedInArrayStore.kt") public void testUsedInArrayStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); } @TestMetadata("usedInMethodCall.kt") public void testUsedInMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); } @TestMetadata("usedInPutfield.kt") public void testUsedInPutfield() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt"); } @TestMetadata("usedInVarStore.kt") public void testUsedInVarStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); } } @@ -6504,56 +5722,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntrinsicSemantics extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); } @TestMetadata("coroutineContextReceiver.kt") public void testCoroutineContextReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); } @TestMetadata("coroutineContextReceiverNotIntrinsic.kt") public void testCoroutineContextReceiverNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); } @TestMetadata("intercepted.kt") public void testIntercepted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturn.kt") public void testStartCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturnInterception.kt") public void testStartCoroutineUninterceptedOrReturnInterception() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); } @TestMetadata("suspendCoroutineUninterceptedOrReturn.kt") public void testSuspendCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); } } @@ -6561,6 +5775,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -6571,8 +5789,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public static class Anonymous extends AbstractBlackBoxCodegenTest { @TestMetadata("simple.kt") public void ignoreSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInAnonymous() throws Exception { @@ -6584,68 +5805,62 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Named extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNamed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedParameters.kt") public void testCapturedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); } @TestMetadata("insideLambda.kt") public void testInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); } @TestMetadata("nestedLocals.kt") public void testNestedLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); } @TestMetadata("simpleSuspensionPoint.kt") public void testSimpleSuspensionPoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); } @TestMetadata("stateMachine.kt") public void testStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); } } } @@ -6654,61 +5869,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModule extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("inlineFunctionWithOptionalParam.kt") public void testInlineFunctionWithOptionalParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); } @TestMetadata("inlineMultiModule.kt") public void testInlineMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); } @TestMetadata("inlineMultiModuleOverride.kt") public void testInlineMultiModuleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); } @TestMetadata("inlineMultiModuleWithController.kt") public void testInlineMultiModuleWithController() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); } @TestMetadata("inlineMultiModuleWithInnerInlining.kt") public void testInlineMultiModuleWithInnerInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); } @TestMetadata("inlineTailCall.kt") public void testInlineTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); } } @@ -6716,14 +5917,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantLocalsElimination extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ktor_receivedMessage.kt") public void testKtor_receivedMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); } } @@ -6731,32 +5935,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackUnwinding extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStackUnwinding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("exception.kt") public void testException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); } } @@ -6764,104 +5968,92 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionAsCoroutine extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); } @TestMetadata("inlineTwoReceivers.kt") public void testInlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); } @TestMetadata("noinlineTwoReceivers.kt") public void testNoinlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); } @TestMetadata("openFunWithJava.kt") public void testOpenFunWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/openFunWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/openFunWithJava.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); } @TestMetadata("privateFunctions.kt") public void testPrivateFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); } @TestMetadata("privateInFile.kt") public void testPrivateInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); } @TestMetadata("returnNoSuspend.kt") public void testReturnNoSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); } @TestMetadata("superCallAbstractClass.kt") public void testSuperCallAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); } @TestMetadata("superCallInterface.kt") public void testSuperCallInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); } @TestMetadata("withVariables.kt") public void testWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); } } @@ -6869,32 +6061,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionTypeCall extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); } @TestMetadata("manyParameters.kt") public void testManyParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); } @TestMetadata("suspendModifier.kt") public void testSuspendModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); } } @@ -6902,50 +6094,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCallOptimizations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailCallOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("crossinline.kt") public void testCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); } @TestMetadata("inlineWithStateMachine.kt") public void testInlineWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); } @TestMetadata("inlineWithoutStateMachine.kt") public void testInlineWithoutStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); } @TestMetadata("unreachable.kt") public void testUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); } @TestMetadata("whenUnit.kt") public void testWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); } } @@ -6953,32 +6142,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailOperations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("suspendWithIf.kt") public void testSuspendWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); } @TestMetadata("suspendWithTryCatch.kt") public void testSuspendWithTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); } @TestMetadata("suspendWithWhen.kt") public void testSuspendWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); } @TestMetadata("tailInlining.kt") public void testTailInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); } } @@ -6986,38 +6175,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnitTypeReturn extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnitTypeReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coroutineNonLocalReturn.kt") public void testCoroutineNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); } @TestMetadata("coroutineReturn.kt") public void testCoroutineReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); } @TestMetadata("suspendNonLocalReturn.kt") public void testSuspendNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); } @TestMetadata("suspendReturn.kt") public void testSuspendReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); } @TestMetadata("unitSafeCall.kt") public void testUnitSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); } } @@ -7025,20 +6213,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarSpilling extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt19475.kt") public void testKt19475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); } @TestMetadata("nullSpilling.kt") public void testNullSpilling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); } } } @@ -7047,154 +6237,139 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); } @TestMetadata("doubleParam.kt") public void testDoubleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); } @TestMetadata("floatParam.kt") public void testFloatParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/floatParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/genericParam.kt"); } @TestMetadata("kt5002.kt") public void testKt5002() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/kt5002.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/kt5002.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); } @TestMetadata("multiDeclarationFor.kt") public void testMultiDeclarationFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); } @TestMetadata("nonTrivialFinalMemberInSuperClass.kt") public void testNonTrivialFinalMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); } @TestMetadata("nonTrivialMemberInSuperClass.kt") public void testNonTrivialMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); } @TestMetadata("privateValParams.kt") public void testPrivateValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); } @TestMetadata("twoValParams.kt") public void testTwoValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); } @TestMetadata("twoVarParams.kt") public void testTwoVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Copy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCopy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorWithDefaultParam.kt") public void testConstructorWithDefaultParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); } @TestMetadata("copyInObjectNestedDataClass.kt") public void testCopyInObjectNestedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); } @TestMetadata("kt12708.kt") public void testKt12708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); } @TestMetadata("kt3033.kt") public void testKt3033() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); } @TestMetadata("valInConstructorParams.kt") public void testValInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); } @TestMetadata("varInConstructorParams.kt") public void testVarInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); } @TestMetadata("withGenericParameter.kt") public void testWithGenericParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); } @TestMetadata("withSecondaryConstructor.kt") public void testWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); } } @@ -7202,50 +6377,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("genericarray.kt") public void testGenericarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); } @TestMetadata("intarray.kt") public void testIntarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/null.kt"); } @TestMetadata("nullother.kt") public void testNullother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); } @TestMetadata("sameinstance.kt") public void testSameinstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); } } @@ -7253,86 +6425,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashCode extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); } } @@ -7340,50 +6503,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToString extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); } } } @@ -7392,32 +6552,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCodeElimination extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDeadCodeElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyVariableRange.kt") public void testEmptyVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); } @TestMetadata("intersectingVariableRange.kt") public void testIntersectingVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); } @TestMetadata("intersectingVariableRangeInFinally.kt") public void testIntersectingVariableRangeInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); } @TestMetadata("kt14357.kt") public void testKt14357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); } } @@ -7425,181 +6585,134 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("implementedByFake.kt") public void testImplementedByFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); } @TestMetadata("implementedByFake2.kt") public void testImplementedByFake2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); } @TestMetadata("implementedByFake3.kt") public void testImplementedByFake3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); } @TestMetadata("inheritedFromInterfaceViaAbstractSuperclass.kt") public void testInheritedFromInterfaceViaAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); } @TestMetadata("kt6382.kt") public void testKt6382() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/protected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/protected.kt"); } @TestMetadata("simpleFromOtherFile.kt") public void testSimpleFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); } @TestMetadata("superCallCheck.kt") public void testSuperCallCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); } @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); } @TestMetadata("annotationWithEmptyArray.kt") public void testAnnotationWithEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); } @TestMetadata("checkIfConstructorIsSynthetic.kt") public void testCheckIfConstructorIsSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); } @TestMetadata("defArgs1.kt") public void testDefArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); } @TestMetadata("defArgs1InnerClass.kt") public void testDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); } @TestMetadata("defArgs2.kt") public void testDefArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); } @TestMetadata("doubleDefArgs1InnerClass.kt") public void testDoubleDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); } @TestMetadata("enumWithOneDefArg.kt") public void testEnumWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); } @TestMetadata("enumWithTwoDefArgs.kt") public void testEnumWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); } @TestMetadata("enumWithTwoDoubleDefArgs.kt") public void testEnumWithTwoDoubleDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); } @TestMetadata("kt2852.kt") public void testKt2852() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); } @TestMetadata("kt3060.kt") public void testKt3060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); } @TestMetadata("manyArgs.kt") public void testManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); } } @@ -7607,26 +6720,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Convention extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("incWithDefaultInGetter.kt") public void testIncWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); } @TestMetadata("kt9140.kt") public void testKt9140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); } @TestMetadata("plusAssignWithDefaultInGetter.kt") public void testPlusAssignWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); } } @@ -7634,10 +6748,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -7646,116 +6763,97 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); } @TestMetadata("covariantOverrideGeneric.kt") public void testCovariantOverrideGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); } @TestMetadata("extensionFunctionManyArgs.kt") public void testExtensionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); } @TestMetadata("extentionFunction.kt") public void testExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); } @TestMetadata("extentionFunctionDouble.kt") public void testExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); } @TestMetadata("extentionFunctionDoubleTwoArgs.kt") public void testExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("extentionFunctionInClassObject.kt") public void testExtentionFunctionInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); } @TestMetadata("extentionFunctionInObject.kt") public void testExtentionFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); } @TestMetadata("extentionFunctionWithOneDefArg.kt") public void testExtentionFunctionWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); } @TestMetadata("funInTrait.kt") public void testFunInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); } @TestMetadata("innerExtentionFunction.kt") public void testInnerExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); } @TestMetadata("innerExtentionFunctionDouble.kt") public void testInnerExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); } @TestMetadata("innerExtentionFunctionDoubleTwoArgs.kt") public void testInnerExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("innerExtentionFunctionManyArgs.kt") public void testInnerExtentionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); } @TestMetadata("kt5232.kt") public void testKt5232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); } @TestMetadata("memberFunctionManyArgs.kt") public void testMemberFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); } @TestMetadata("mixingNamedAndPositioned.kt") public void testMixingNamedAndPositioned() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); } @TestMetadata("topLevelManyArgs.kt") public void testTopLevelManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); } } @@ -7763,32 +6861,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("memberExtensionFunction.kt") public void testMemberExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); } } @@ -7796,26 +6894,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt2789.kt") public void testKt2789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); } @TestMetadata("kt9428.kt") public void testKt9428() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); } @TestMetadata("kt9924.kt") public void testKt9924() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); } } } @@ -7824,10 +6923,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); } public void testAllFilesPresentInDelegatedProperty() throws Exception { @@ -7836,345 +6938,284 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); } @TestMetadata("castGetReturnType.kt") public void testCastGetReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); } @TestMetadata("castSetParameter.kt") public void testCastSetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); } @TestMetadata("delegateAsInnerClass.kt") public void testDelegateAsInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); } @TestMetadata("delegateByOtherProperty.kt") public void testDelegateByOtherProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); } @TestMetadata("delegateByTopLevelFun.kt") public void testDelegateByTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); } @TestMetadata("delegateByTopLevelProperty.kt") public void testDelegateByTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); } @TestMetadata("delegateForExtProperty.kt") public void testDelegateForExtProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); } @TestMetadata("delegateForExtPropertyInClass.kt") public void testDelegateForExtPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); } @TestMetadata("delegateWithPrivateSet.kt") public void testDelegateWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); } @TestMetadata("extensionDelegatesWithSameNames.kt") public void testExtensionDelegatesWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); } @TestMetadata("extensionPropertyAndExtensionGetValue.kt") public void testExtensionPropertyAndExtensionGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); } @TestMetadata("genericDelegate.kt") public void testGenericDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); } @TestMetadata("genericDelegateUncheckedCast1.kt") public void testGenericDelegateUncheckedCast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); } @TestMetadata("genericDelegateUncheckedCast2.kt") public void testGenericDelegateUncheckedCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); } @TestMetadata("genericSetValueViaSyntheticAccessor.kt") public void testGenericSetValueViaSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); } @TestMetadata("getAsExtensionFun.kt") public void testGetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); } @TestMetadata("getAsExtensionFunInClass.kt") public void testGetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); } @TestMetadata("getDelegateWithoutReflection.kt") public void testGetDelegateWithoutReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); } @TestMetadata("inClassVal.kt") public void testInClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); } @TestMetadata("inClassVar.kt") public void testInClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); } @TestMetadata("inferredPropertyType.kt") public void testInferredPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); } @TestMetadata("kt4138.kt") public void testKt4138() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); } @TestMetadata("kt6722.kt") public void testKt6722() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); } @TestMetadata("kt9712.kt") public void testKt9712() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); } @TestMetadata("privateSetterKPropertyIsNotMutable.kt") public void testPrivateSetterKPropertyIsNotMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); } @TestMetadata("propertyMetadataShouldBeCached.kt") public void testPropertyMetadataShouldBeCached() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); } @TestMetadata("protectedVarWithPrivateSet.kt") public void testProtectedVarWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); } @TestMetadata("setAsExtensionFun.kt") public void testSetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); } @TestMetadata("setAsExtensionFunInClass.kt") public void testSetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); } @TestMetadata("stackOverflowOnCallFromGetValue.kt") public void testStackOverflowOnCallFromGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); } @TestMetadata("twoPropByOneDelegete.kt") public void testTwoPropByOneDelegete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); } @TestMetadata("useKPropertyLater.kt") public void testUseKPropertyLater() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); } @TestMetadata("useReflectionOnKProperty.kt") public void testUseReflectionOnKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); } @TestMetadata("valInInnerClass.kt") public void testValInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); } @TestMetadata("varInInnerClass.kt") public void testVarInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedLocalVal.kt") public void testCapturedLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); } @TestMetadata("capturedLocalValNoInline.kt") public void testCapturedLocalValNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); } @TestMetadata("capturedLocalVar.kt") public void testCapturedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); } @TestMetadata("capturedLocalVarNoInline.kt") public void testCapturedLocalVarNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); } @TestMetadata("inlineGetValue.kt") public void testInlineGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); } @TestMetadata("inlineOperators.kt") public void testInlineOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); } @TestMetadata("kt12891.kt") public void testKt12891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); } @TestMetadata("kt13557.kt") public void testKt13557() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); } @TestMetadata("kt19690.kt") public void testKt19690() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); } @TestMetadata("localValNoExplicitType.kt") public void testLocalValNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); } @TestMetadata("localVarNoExplicitType.kt") public void testLocalVarNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); } } @@ -8182,110 +7223,97 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentReceivers.kt") public void testDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); } @TestMetadata("evaluationOrder.kt") public void testEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); } @TestMetadata("evaluationOrderVar.kt") public void testEvaluationOrderVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); } @TestMetadata("extensionDelegated.kt") public void testExtensionDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); } @TestMetadata("hostCheck.kt") public void testHostCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); } @TestMetadata("inlineProvideDelegate.kt") public void testInlineProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); } @TestMetadata("kt15437.kt") public void testKt15437() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); } @TestMetadata("kt16441.kt") public void testKt16441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); } @TestMetadata("kt18902.kt") public void testKt18902() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); } @TestMetadata("localCaptured.kt") public void testLocalCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); } @TestMetadata("localDifferentReceivers.kt") public void testLocalDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); } @TestMetadata("propertyMetadata.kt") public void testPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); } } } @@ -8294,49 +7322,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationToVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/kt8154.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } @TestMetadata("withDefaultParameters.kt") public void testWithDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); } } @@ -8344,56 +7360,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringDeclInLambdaParam extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("extensionComponents.kt") public void testExtensionComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); } @TestMetadata("otherParameters.kt") public void testOtherParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); } @TestMetadata("stdlibUsages.kt") public void testStdlibUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); } @TestMetadata("underscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); } @TestMetadata("withIndexed.kt") public void testWithIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); } } @@ -8401,6 +7413,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Diagnostics extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8409,6 +7425,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8417,14 +7437,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt6176.kt") public void testKt6176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); } } @@ -8432,6 +7455,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8440,68 +7467,62 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnObjects extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOnObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass1.kt") public void testInvokeOnClassObjectOfNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass2.kt") public void testInvokeOnClassObjectOfNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); } @TestMetadata("invokeOnEnum1.kt") public void testInvokeOnEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); } @TestMetadata("invokeOnEnum2.kt") public void testInvokeOnEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); } @TestMetadata("invokeOnImportedEnum1.kt") public void testInvokeOnImportedEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); } @TestMetadata("invokeOnImportedEnum2.kt") public void testInvokeOnImportedEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); } } } @@ -8510,230 +7531,197 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailRecursion extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailRecursion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); } @TestMetadata("defaultArgsOverridden.kt") public void testDefaultArgsOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); } @TestMetadata("extensionTailCall.kt") public void testExtensionTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); } @TestMetadata("functionWithNoTails.kt") public void testFunctionWithNoTails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); } @TestMetadata("functionWithNonTailRecursions.kt") public void testFunctionWithNonTailRecursions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); } @TestMetadata("functionWithoutAnnotation.kt") public void testFunctionWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); } @TestMetadata("insideElvis.kt") public void testInsideElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); } @TestMetadata("labeledThisReferences.kt") public void testLabeledThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); } @TestMetadata("loops.kt") public void testLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); } @TestMetadata("multilevelBlocks.kt") public void testMultilevelBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); } @TestMetadata("recursiveCallInLambda.kt") public void testRecursiveCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); } @TestMetadata("recursiveCallInLocalFunction.kt") public void testRecursiveCallInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); } @TestMetadata("recursiveInnerFunction.kt") public void testRecursiveInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); } @TestMetadata("returnIf.kt") public void testReturnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); } @TestMetadata("returnInCatch.kt") public void testReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); } @TestMetadata("returnInIfInFinally.kt") public void testReturnInIfInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); } @TestMetadata("simpleBlock.kt") public void testSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); } @TestMetadata("simpleReturnWithElse.kt") public void testSimpleReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); } @TestMetadata("tailRecursionInFinally.kt") public void testTailRecursionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); } @TestMetadata("thisReferences.kt") public void testThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); } @TestMetadata("unitBlocks.kt") public void testUnitBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); } @TestMetadata("whenWithCondition.kt") public void testWhenWithCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); } @TestMetadata("whenWithInRange.kt") public void testWhenWithInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); } @TestMetadata("whenWithoutCondition.kt") public void testWhenWithoutCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); } } } @@ -8742,14 +7730,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt4172.kt") public void testKt4172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); } } } @@ -8758,32 +7749,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Elvis extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/genericNull.kt"); } @TestMetadata("kt6694ExactAnnotationForElvis.kt") public void testKt6694ExactAnnotationForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); } @TestMetadata("nullNullOk.kt") public void testNullNullOk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/nullNullOk.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/nullNullOk.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/primitive.kt"); } } @@ -8791,16 +7782,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); } @TestMetadata("abstractNestedClass.kt") public void testAbstractNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -8809,346 +7802,294 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("asReturnExpression.kt") public void testAsReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/asReturnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/asReturnExpression.kt"); } @TestMetadata("classForEnumEntry.kt") public void testClassForEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); } @TestMetadata("companionObjectInEnum.kt") public void testCompanionObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass.kt") public void testDeepInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass2.kt") public void testDeepInnerClassInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyConstructor.kt"); } @TestMetadata("emptyEnumValuesValueOf.kt") public void testEmptyEnumValuesValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); } @TestMetadata("enumCompanionInit.kt") public void testEnumCompanionInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor1.kt") public void testEnumEntryReferenceFromInnerClassConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor2.kt") public void testEnumEntryReferenceFromInnerClassConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor3.kt") public void testEnumEntryReferenceFromInnerClassConstructor3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); } @TestMetadata("enumInheritedFromTrait.kt") public void testEnumInheritedFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); } @TestMetadata("enumShort.kt") public void testEnumShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumShort.kt"); } @TestMetadata("enumWithLambdaParameter.kt") public void testEnumWithLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); } @TestMetadata("inPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inPackage.kt"); } @TestMetadata("inclassobj.kt") public void testInclassobj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inclassobj.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inclassobj.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inner.kt"); } @TestMetadata("innerClassInEnumEntryClass.kt") public void testInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass.kt") public void testInnerClassMethodInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass2.kt") public void testInnerClassMethodInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); } @TestMetadata("innerWithExistingClassObject.kt") public void testInnerWithExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); } @TestMetadata("kt1119.kt") public void testKt1119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt1119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt1119.kt"); } @TestMetadata("kt18731.kt") public void testKt18731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt18731.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt18731.kt"); } @TestMetadata("kt20651.kt") public void testKt20651() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651.kt"); } @TestMetadata("kt20651_inlineLambda.kt") public void testKt20651_inlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); } @TestMetadata("kt20651a.kt") public void testKt20651a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651a.kt"); } @TestMetadata("kt20651b.kt") public void testKt20651b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651b.kt"); } @TestMetadata("kt2350.kt") public void testKt2350() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt2350.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt2350.kt"); } @TestMetadata("kt7257.kt") public void testKt7257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257.kt"); } @TestMetadata("kt7257_anonObjectInit.kt") public void testKt7257_anonObjectInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); } @TestMetadata("kt7257_anonObjectMethod.kt") public void testKt7257_anonObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); } @TestMetadata("kt7257_boundReference1.kt") public void testKt7257_boundReference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); } @TestMetadata("kt7257_boundReference2.kt") public void testKt7257_boundReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); } @TestMetadata("kt7257_boundReferenceWithImplicitReceiver.kt") public void testKt7257_boundReferenceWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); } @TestMetadata("kt7257_explicitReceiver.kt") public void testKt7257_explicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); } @TestMetadata("kt7257_fullyQualifiedReceiver.kt") public void testKt7257_fullyQualifiedReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); } @TestMetadata("kt7257_namedLocalFun.kt") public void testKt7257_namedLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); } @TestMetadata("kt7257_notInline.kt") public void testKt7257_notInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); } @TestMetadata("kt9711.kt") public void testKt9711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711.kt"); } @TestMetadata("kt9711_2.kt") public void testKt9711_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711_2.kt"); } @TestMetadata("manyDefaultParameters.kt") public void testManyDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); } @TestMetadata("modifierFlags.kt") public void testModifierFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/modifierFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); } @TestMetadata("objectInEnum.kt") public void testObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/objectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/objectInEnum.kt"); } @TestMetadata("ordinal.kt") public void testOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/ordinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/ordinal.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/simple.kt"); } @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/toString.kt"); } @TestMetadata("valueof.kt") public void testValueof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/valueof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/valueof.kt"); } @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultCtor extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultCtor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorWithDefaultArguments.kt") public void testConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); } @TestMetadata("constructorWithVararg.kt") public void testConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); } @TestMetadata("entryClassConstructorWithDefaultArguments.kt") public void testEntryClassConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); } @TestMetadata("entryClassConstructorWithVarargs.kt") public void testEntryClassConstructorWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); } @TestMetadata("secondaryConstructorWithDefaultArguments.kt") public void testSecondaryConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); } @TestMetadata("secondaryConstructorWithVararg.kt") public void testSecondaryConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); } } } @@ -9157,98 +8098,87 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Evaluate extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEvaluate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/char.kt"); } @TestMetadata("divide.kt") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/divide.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/divide.kt"); } @TestMetadata("intrinsics.kt") public void testIntrinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/intrinsics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/intrinsics.kt"); } @TestMetadata("kt9443.kt") public void testKt9443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/kt9443.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/kt9443.kt"); } @TestMetadata("maxValue.kt") public void testMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValue.kt"); } @TestMetadata("maxValueByte.kt") public void testMaxValueByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); } @TestMetadata("maxValueInt.kt") public void testMaxValueInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/mod.kt"); } @TestMetadata("multiply.kt") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/multiply.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/multiply.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/parenthesized.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/plus.kt"); } @TestMetadata("simpleCallBinary.kt") public void testSimpleCallBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); } } @@ -9256,20 +8186,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExclExcl extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExclExcl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/genericNull.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/primitive.kt"); } } @@ -9277,146 +8209,127 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunctions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("executionOrder.kt") public void testExecutionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); } @TestMetadata("kt1061.kt") public void testKt1061() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); } @TestMetadata("kt1249.kt") public void testKt1249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); } @TestMetadata("kt1290.kt") public void testKt1290() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); } @TestMetadata("kt13312.kt") public void testKt13312() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); } @TestMetadata("kt1776.kt") public void testKt1776() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); } @TestMetadata("kt1953.kt") public void testKt1953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); } @TestMetadata("kt1953_class.kt") public void testKt1953_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); } @TestMetadata("kt3285.kt") public void testKt3285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); } @TestMetadata("kt3298.kt") public void testKt3298() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); } @TestMetadata("kt3646.kt") public void testKt3646() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); } @TestMetadata("kt3969.kt") public void testKt3969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); } @TestMetadata("kt4228.kt") public void testKt4228() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); } @TestMetadata("kt475.kt") public void testKt475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); } @TestMetadata("kt5467.kt") public void testKt5467() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); } @TestMetadata("kt606.kt") public void testKt606() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); } @TestMetadata("kt865.kt") public void testKt865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); } @TestMetadata("shared.kt") public void testShared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/shared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/shared.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/simple.kt"); } @TestMetadata("thisMethodInObjectLiteral.kt") public void testThisMethodInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); } @TestMetadata("virtual.kt") public void testVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); } @TestMetadata("whenFail.kt") public void testWhenFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); } } @@ -9424,10 +8337,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionProperties extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); } public void testAllFilesPresentInExtensionProperties() throws Exception { @@ -9436,86 +8352,72 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("genericValForPrimitiveType.kt") public void testGenericValForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); } @TestMetadata("genericValMultipleUpperBounds.kt") public void testGenericValMultipleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); } @TestMetadata("genericVarForPrimitiveType.kt") public void testGenericVarForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClass.kt"); } @TestMetadata("inClassLongTypeInReceiver.kt") public void testInClassLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); } @TestMetadata("inClassWithGetter.kt") public void testInClassWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); } @TestMetadata("inClassWithPrivateGetter.kt") public void testInClassWithPrivateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); } @TestMetadata("inClassWithPrivateSetter.kt") public void testInClassWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); } @TestMetadata("inClassWithSetter.kt") public void testInClassWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); } @TestMetadata("kt9897.kt") public void testKt9897() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); } @TestMetadata("kt9897_topLevel.kt") public void testKt9897_topLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); } @TestMetadata("nonAbstractInInterface.kt") public void testNonAbstractInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); } @TestMetadata("topLevelLongTypeInReceiver.kt") public void testTopLevelLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); } } @@ -9523,26 +8425,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class External extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("jvmStaticExternal.kt") public void testJvmStaticExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); } @TestMetadata("jvmStaticExternalPrivate.kt") public void testJvmStaticExternalPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); } @TestMetadata("withDefaultArg.kt") public void testWithDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/withDefaultArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/withDefaultArg.kt"); } } @@ -9550,32 +8453,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverride extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFakeOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("diamondFunction.kt") public void testDiamondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/function.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); } } @@ -9583,26 +8486,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FieldRename extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFieldRename() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorAndClassObject.kt") public void testConstructorAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); } @TestMetadata("delegates.kt") public void testDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/delegates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/delegates.kt"); } @TestMetadata("genericPropertyWithItself.kt") public void testGenericPropertyWithItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); } } @@ -9610,74 +8514,67 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Finally extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("finallyAndFinally.kt") public void testFinallyAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); } @TestMetadata("kt3549.kt") public void testKt3549() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3549.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3549.kt"); } @TestMetadata("kt3706.kt") public void testKt3706() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3706.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3706.kt"); } @TestMetadata("kt3867.kt") public void testKt3867() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3867.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3867.kt"); } @TestMetadata("kt3874.kt") public void testKt3874() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3874.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3874.kt"); } @TestMetadata("kt3894.kt") public void testKt3894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3894.kt"); } @TestMetadata("kt4134.kt") public void testKt4134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt4134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt4134.kt"); } @TestMetadata("loopAndFinally.kt") public void testLoopAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/loopAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/loopAndFinally.kt"); } @TestMetadata("notChainCatch.kt") public void testNotChainCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/notChainCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/notChainCatch.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); } @TestMetadata("tryLoopTry.kt") public void testTryLoopTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryLoopTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryLoopTry.kt"); } } @@ -9685,64 +8582,64 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FullJdk extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFullJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charBuffer.kt") public void testCharBuffer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/charBuffer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/charBuffer.kt"); } @TestMetadata("ifInWhile.kt") public void testIfInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/ifInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/ifInWhile.kt"); } @TestMetadata("intCountDownLatchExtension.kt") public void testIntCountDownLatchExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/intCountDownLatchExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/intCountDownLatchExtension.kt"); } @TestMetadata("kt434.kt") public void testKt434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/kt434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/kt434.kt"); } @TestMetadata("platformTypeAssertionStackTrace.kt") public void testPlatformTypeAssertionStackTrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/platformTypeAssertionStackTrace.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/platformTypeAssertionStackTrace.kt"); } @TestMetadata("compiler/testData/codegen/box/fullJdk/native") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNative() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("nativePropertyAccessors.kt") public void testNativePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); } @TestMetadata("simpleNative.kt") public void testSimpleNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); } } @@ -9750,20 +8647,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt15112.kt") public void testKt15112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); } @TestMetadata("kt1770.kt") public void testKt1770() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); } } } @@ -9772,298 +8671,259 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coerceVoidToArray.kt") public void testCoerceVoidToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); } @TestMetadata("coerceVoidToObject.kt") public void testCoerceVoidToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); } @TestMetadata("defaultargs.kt") public void testDefaultargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs.kt"); } @TestMetadata("defaultargs1.kt") public void testDefaultargs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs1.kt"); } @TestMetadata("defaultargs2.kt") public void testDefaultargs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs2.kt"); } @TestMetadata("defaultargs3.kt") public void testDefaultargs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs3.kt"); } @TestMetadata("defaultargs4.kt") public void testDefaultargs4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs4.kt"); } @TestMetadata("defaultargs5.kt") public void testDefaultargs5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs5.kt"); } @TestMetadata("defaultargs6.kt") public void testDefaultargs6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs6.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs6.kt"); } @TestMetadata("defaultargs7.kt") public void testDefaultargs7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs7.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs7.kt"); } @TestMetadata("ea33909.kt") public void testEa33909() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/ea33909.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/ea33909.kt"); } @TestMetadata("fakeDescriptorWithSeveralOverridenOne.kt") public void testFakeDescriptorWithSeveralOverridenOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); } @TestMetadata("functionNtoString.kt") public void testFunctionNtoString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoString.kt"); } @TestMetadata("functionNtoStringGeneric.kt") public void testFunctionNtoStringGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); } @TestMetadata("functionNtoStringNoReflect.kt") public void testFunctionNtoStringNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); } @TestMetadata("kt1038.kt") public void testKt1038() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1038.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1038.kt"); } @TestMetadata("kt1199.kt") public void testKt1199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1199.kt"); } @TestMetadata("kt1413.kt") public void testKt1413() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1413.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1413.kt"); } @TestMetadata("kt1649_1.kt") public void testKt1649_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_1.kt"); } @TestMetadata("kt1649_2.kt") public void testKt1649_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_2.kt"); } @TestMetadata("kt1739.kt") public void testKt1739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1739.kt"); } @TestMetadata("kt2270.kt") public void testKt2270() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2270.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2270.kt"); } @TestMetadata("kt2271.kt") public void testKt2271() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2271.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2271.kt"); } @TestMetadata("kt2280.kt") public void testKt2280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2280.kt"); } @TestMetadata("kt2481.kt") public void testKt2481() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2481.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2481.kt"); } @TestMetadata("kt2716.kt") public void testKt2716() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2716.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2716.kt"); } @TestMetadata("kt2739.kt") public void testKt2739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2739.kt"); } @TestMetadata("kt2929.kt") public void testKt2929() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2929.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2929.kt"); } @TestMetadata("kt3214.kt") public void testKt3214() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3214.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3214.kt"); } @TestMetadata("kt3313.kt") public void testKt3313() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3313.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3313.kt"); } @TestMetadata("kt3573.kt") public void testKt3573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3573.kt"); } @TestMetadata("kt3724.kt") public void testKt3724() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3724.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3724.kt"); } @TestMetadata("kt395.kt") public void testKt395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt395.kt"); } @TestMetadata("kt785.kt") public void testKt785() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt785.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt785.kt"); } @TestMetadata("kt873.kt") public void testKt873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt873.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunction.kt"); } @TestMetadata("localReturnInsideFunctionExpression.kt") public void testLocalReturnInsideFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); } @TestMetadata("prefixRecursiveCall.kt") public void testPrefixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); } @TestMetadata("recursiveCompareTo.kt") public void testRecursiveCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); } @TestMetadata("recursiveIncrementCall.kt") public void testRecursiveIncrementCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); } @TestMetadata("functionExpressionWithThisReference.kt") public void testFunctionExpressionWithThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); } @TestMetadata("functionLiteralExpression.kt") public void testFunctionLiteralExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); } } @@ -10071,98 +8931,87 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("castFunctionToExtension.kt") public void testCastFunctionToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); } @TestMetadata("extensionInvokeOnExpr.kt") public void testExtensionInvokeOnExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); } @TestMetadata("implicitInvokeInCompanionObjectWithFunctionalArgument.kt") public void testImplicitInvokeInCompanionObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeWithFunctionLiteralArgument.kt") public void testImplicitInvokeWithFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invoke.kt"); } @TestMetadata("invokeOnExprByConvention.kt") public void testInvokeOnExprByConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); } @TestMetadata("invokeOnSyntheticProperty.kt") public void testInvokeOnSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); } @TestMetadata("kt3189.kt") public void testKt3189() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); } @TestMetadata("kt3190.kt") public void testKt3190() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); } @TestMetadata("kt3297.kt") public void testKt3297() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); } @TestMetadata("kt3450getAndInvoke.kt") public void testKt3450getAndInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); } @TestMetadata("kt3631invokeOnString.kt") public void testKt3631invokeOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); } @TestMetadata("kt3772.kt") public void testKt3772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); } @TestMetadata("kt3821invokeOnThis.kt") public void testKt3821invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); } @TestMetadata("kt3822invokeOnThis.kt") public void testKt3822invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); } } @@ -10170,146 +9019,127 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callInlineLocalInLambda.kt") public void testCallInlineLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); } @TestMetadata("definedWithinLambda.kt") public void testDefinedWithinLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); } @TestMetadata("definedWithinLambdaInnerUsage1.kt") public void testDefinedWithinLambdaInnerUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); } @TestMetadata("definedWithinLambdaInnerUsage2.kt") public void testDefinedWithinLambdaInnerUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); } @TestMetadata("kt2895.kt") public void testKt2895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); } @TestMetadata("kt3308.kt") public void testKt3308() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); } @TestMetadata("kt3978.kt") public void testKt3978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); } @TestMetadata("kt4119.kt") public void testKt4119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); } @TestMetadata("kt4119_2.kt") public void testKt4119_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); } @TestMetadata("kt4514.kt") public void testKt4514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); } @TestMetadata("kt4777.kt") public void testKt4777() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); } @TestMetadata("kt4783.kt") public void testKt4783() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); } @TestMetadata("kt4784.kt") public void testKt4784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); } @TestMetadata("kt4989.kt") public void testKt4989() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); } @TestMetadata("localExtensionOnNullableParameter.kt") public void testLocalExtensionOnNullableParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); } @TestMetadata("localFunctionInConstructor.kt") public void testLocalFunctionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); } @TestMetadata("localFunctionVsLocalVariable.kt") public void testLocalFunctionVsLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); } @TestMetadata("overloadedLocalFunWithoutClosure.kt") public void testOverloadedLocalFunWithoutClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); } @TestMetadata("overloadedLocalFunction.kt") public void testOverloadedLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); } @TestMetadata("overloadedLocalFunction1.kt") public void testOverloadedLocalFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); } @TestMetadata("overloadedLocalFunction2.kt") public void testOverloadedLocalFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); } @TestMetadata("overloadedLocalFunction3.kt") public void testOverloadedLocalFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); } @TestMetadata("parameterAsDefaultValue.kt") public void testParameterAsDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); } } } @@ -10318,44 +9148,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashPMap extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInHashPMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/empty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/empty.kt"); } @TestMetadata("manyNumbers.kt") public void testManyNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); } @TestMetadata("rewriteWithDifferent.kt") public void testRewriteWithDifferent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); } @TestMetadata("rewriteWithEqual.kt") public void testRewriteWithEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); } @TestMetadata("simplePlusGet.kt") public void testSimplePlusGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); } @TestMetadata("simplePlusMinus.kt") public void testSimplePlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); } } @@ -10363,338 +9191,287 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ieee754 extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIeee754() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anyToReal.kt") public void testAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/anyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); } @TestMetadata("asComparableToDouble_properIeeeComparisons.kt") public void testAsComparableToDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); } @TestMetadata("comparableToTWithT_properIeeeComparisons.kt") public void testComparableToTWithT_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); } @TestMetadata("comparableTypeCast.kt") public void testComparableTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/dataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/dataClass.kt"); } @TestMetadata("differentTypesComparison.kt") public void testDifferentTypesComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); } @TestMetadata("equalsDouble_properIeeeComparisons.kt") public void testEqualsDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsFloat.kt") public void testEqualsFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); } @TestMetadata("equalsFloat_properIeeeComparisons.kt") public void testEqualsFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); } @TestMetadata("equalsNaN.kt") public void testEqualsNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); } @TestMetadata("equalsNaN_properIeeeComparisons.kt") public void testEqualsNaN_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableDouble.kt") public void testEqualsNullableDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); } @TestMetadata("equalsNullableDouble_properIeeeComparisons.kt") public void testEqualsNullableDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableFloat.kt") public void testEqualsNullableFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); } @TestMetadata("equalsNullableFloat_properIeeeComparisons.kt") public void testEqualsNullableFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); } @TestMetadata("explicitCompareCall.kt") public void testExplicitCompareCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); } @TestMetadata("greaterDouble_properIeeeComparisons.kt") public void testGreaterDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); } @TestMetadata("greaterFloat.kt") public void testGreaterFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); } @TestMetadata("greaterFloat_properIeeeComparisons.kt") public void testGreaterFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/inline.kt"); } @TestMetadata("lessDouble.kt") public void testLessDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt"); } @TestMetadata("lessDouble_properIeeeComparisons.kt") public void testLessDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); } @TestMetadata("lessFloat.kt") public void testLessFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat.kt"); } @TestMetadata("lessFloat_properIeeeComparisons.kt") public void testLessFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); } @TestMetadata("nullableAnyToReal.kt") public void testNullableAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); } @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); } @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } @TestMetadata("nullableDoubleNotEquals10.kt") public void testNullableDoubleNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); } @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } @TestMetadata("nullableFloatEquals10.kt") public void testNullableFloatEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); } @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } @TestMetadata("nullableFloatNotEquals10.kt") public void testNullableFloatNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); } @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/safeCall.kt"); } @TestMetadata("smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt") public void testSmartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes.kt") public void testSmartCastToDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion.kt") public void testSmartCastToDifferentTypesWithNumericPromotion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt") public void testSmartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes_properIeeeComparisons.kt") public void testSmartCastToDifferentTypes_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDoubleAndComparableToDouble.kt") public void testSmartCastToDoubleAndComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when.kt"); } @TestMetadata("when10.kt") public void testWhen10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10.kt"); } @TestMetadata("when10_properIeeeComparisons.kt") public void testWhen10_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); } @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); } @TestMetadata("whenNoSubject_properIeeeComparisons.kt") public void testWhenNoSubject_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); } @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } @TestMetadata("whenNullableSmartCast10.kt") public void testWhenNullableSmartCast10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); } @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } } @@ -10702,140 +9479,122 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Increment extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIncrement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayElement.kt") public void testArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/arrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/arrayElement.kt"); } @TestMetadata("assignPlusOnSmartCast.kt") public void testAssignPlusOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); } @TestMetadata("augmentedAssignmentWithComplexRhs.kt") public void testAugmentedAssignmentWithComplexRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); } @TestMetadata("classNaryGetSet.kt") public void testClassNaryGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); } @TestMetadata("classWithGetSet.kt") public void testClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classWithGetSet.kt"); } @TestMetadata("extOnLong.kt") public void testExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/extOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/extOnLong.kt"); } @TestMetadata("genericClassWithGetSet.kt") public void testGenericClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); } @TestMetadata("memberExtOnLong.kt") public void testMemberExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); } @TestMetadata("mutableListElement.kt") public void testMutableListElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/mutableListElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/mutableListElement.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/nullable.kt"); } @TestMetadata("postfixIncrementDoubleSmartCast.kt") public void testPostfixIncrementDoubleSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); } @TestMetadata("postfixIncrementOnClass.kt") public void testPostfixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); } @TestMetadata("postfixIncrementOnClassSmartCast.kt") public void testPostfixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); } @TestMetadata("postfixIncrementOnShortSmartCast.kt") public void testPostfixIncrementOnShortSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); } @TestMetadata("postfixIncrementOnSmartCast.kt") public void testPostfixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); } @TestMetadata("postfixNullableClassIncrement.kt") public void testPostfixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); } @TestMetadata("postfixNullableIncrement.kt") public void testPostfixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); } @TestMetadata("prefixIncrementOnClass.kt") public void testPrefixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); } @TestMetadata("prefixIncrementOnClassSmartCast.kt") public void testPrefixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); } @TestMetadata("prefixIncrementOnSmartCast.kt") public void testPrefixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); } @TestMetadata("prefixNullableClassIncrement.kt") public void testPrefixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); } @TestMetadata("prefixNullableIncrement.kt") public void testPrefixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); } } @@ -10843,176 +9602,152 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); } @TestMetadata("boxUnboxOfInlineClassForCapturedVars.kt") public void testBoxUnboxOfInlineClassForCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); } @TestMetadata("callComputablePropertyInsideInlineClass.kt") public void testCallComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); } @TestMetadata("checkBoxUnboxOfArgumentsOnInlinedFunctions.kt") public void testCheckBoxUnboxOfArgumentsOnInlinedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); } @TestMetadata("checkBoxingAfterAssertionOperator.kt") public void testCheckBoxingAfterAssertionOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); } @TestMetadata("checkBoxingForNonLocalAndLabeledReturns.kt") public void testCheckBoxingForNonLocalAndLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); } @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); } @TestMetadata("checkBoxingOnFunctionCalls.kt") public void testCheckBoxingOnFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); } @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") public void testCheckBoxingOnLocalVariableAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); } @TestMetadata("checkCallingMembersInsideInlineClass.kt") public void testCheckCallingMembersInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); } @TestMetadata("checkCastToInlineClass.kt") public void testCheckCastToInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); } @TestMetadata("checkForInstanceOfInlineClass.kt") public void testCheckForInstanceOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); } @TestMetadata("checkLambdaWithInlineClassesInFunctionalType.kt") public void testCheckLambdaWithInlineClassesInFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); } @TestMetadata("checkUnboxingResultFromTypeVariable.kt") public void testCheckUnboxingResultFromTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); } @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); } @TestMetadata("createInlineClassInArgumentPosition.kt") public void testCreateInlineClassInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); } @TestMetadata("emptyConstructorForInlineClass.kt") public void testEmptyConstructorForInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); } @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") public void testInlineClassAsLastExpressionInInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); } @TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt") public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); } @TestMetadata("passInlineClassAsVararg.kt") public void testPassInlineClassAsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); } @TestMetadata("passInlineClassWithSpreadOperatorToVarargs.kt") public void testPassInlineClassWithSpreadOperatorToVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); } @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyInsideInlineClass.kt") public void testReferToUnderlyingPropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyOfInlineClass.kt") public void testReferToUnderlyingPropertyOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); } @TestMetadata("UIntArraySortExample.kt") public void testUIntArraySortExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); } @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); } @TestMetadata("useInlineFunctionInsideInlineClass.kt") public void testUseInlineFunctionInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); } @TestMetadata("useThisInsideInlineClass.kt") public void testUseThisInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); } } @@ -11020,280 +9755,244 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerNested extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInnerNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("createNestedClass.kt") public void testCreateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); } @TestMetadata("createdNestedInOuterMember.kt") public void testCreatedNestedInOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionFun.kt"); } @TestMetadata("extensionToNested.kt") public void testExtensionToNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); } @TestMetadata("importNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); } @TestMetadata("innerGenericClassFromJava.kt") public void testInnerGenericClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt"); } @TestMetadata("innerJavaClass.kt") public void testInnerJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerJavaClass.kt"); } @TestMetadata("innerLabeledThis.kt") public void testInnerLabeledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); } @TestMetadata("innerSimple.kt") public void testInnerSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerSimple.kt"); } @TestMetadata("kt3132.kt") public void testKt3132() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3132.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3132.kt"); } @TestMetadata("kt3927.kt") public void testKt3927() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3927.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3927.kt"); } @TestMetadata("kt5363.kt") public void testKt5363() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt5363.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt5363.kt"); } @TestMetadata("kt6804.kt") public void testKt6804() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt6804.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt6804.kt"); } @TestMetadata("nestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); } @TestMetadata("nestedClassObject.kt") public void testNestedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); } @TestMetadata("nestedEnumConstant.kt") public void testNestedEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); } @TestMetadata("nestedGeneric.kt") public void testNestedGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); } @TestMetadata("nestedInPackage.kt") public void testNestedInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); } @TestMetadata("nestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); } @TestMetadata("nestedSimple.kt") public void testNestedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); } @TestMetadata("passingOuterRef.kt") public void testPassingOuterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); } @TestMetadata("protectedNestedClass.kt") public void testProtectedNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); } @TestMetadata("protectedNestedClassFromJava.kt") public void testProtectedNestedClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt"); } @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructorCall extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("deepInnerHierarchy.kt") public void testDeepInnerHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); } @TestMetadata("deepLocalHierarchy.kt") public void testDeepLocalHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); } @TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt") public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); } @TestMetadata("innerExtendsInnerWithProperOuterCapture.kt") public void testInnerExtendsInnerWithProperOuterCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); } @TestMetadata("innerExtendsOuter.kt") public void testInnerExtendsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt"); } @TestMetadata("kt11833_1.kt") public void testKt11833_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); } @TestMetadata("kt11833_2.kt") public void testKt11833_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); } @TestMetadata("localClassOuterDiffersFromInnerOuter.kt") public void testLocalClassOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); } @TestMetadata("localExtendsInner.kt") public void testLocalExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); } @TestMetadata("localExtendsLocalWithClosure.kt") public void testLocalExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); } @TestMetadata("localWithClosureExtendsLocalWithClosure.kt") public void testLocalWithClosureExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); } @TestMetadata("objectExtendsClassDefaultArgument.kt") public void testObjectExtendsClassDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); } @TestMetadata("objectExtendsClassVararg.kt") public void testObjectExtendsClassVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); } @TestMetadata("objectExtendsInnerDefaultArgument.kt") public void testObjectExtendsInnerDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); } @TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt") public void testObjectExtendsInnerOfLocalVarargAndDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); } @TestMetadata("objectExtendsInnerOfLocalWithCapture.kt") public void testObjectExtendsInnerOfLocalWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); } @TestMetadata("objectExtendsLocalCaptureInSuperCall.kt") public void testObjectExtendsLocalCaptureInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); } @TestMetadata("objectExtendsLocalWithClosure.kt") public void testObjectExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); } @TestMetadata("objectOuterDiffersFromInnerOuter.kt") public void testObjectOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); } } } @@ -11302,6 +10001,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Instructions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInstructions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -11310,20 +10013,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Swap extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSwap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("swapRefToSharedVarInt.kt") public void testSwapRefToSharedVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); } @TestMetadata("swapRefToSharedVarLong.kt") public void testSwapRefToSharedVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); } } } @@ -11332,140 +10037,122 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intrinsics extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charToInt.kt") public void testCharToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/charToInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/charToInt.kt"); } @TestMetadata("defaultObjectMapping.kt") public void testDefaultObjectMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); } @TestMetadata("ea35953.kt") public void testEa35953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/ea35953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/ea35953.kt"); } @TestMetadata("incWithLabel.kt") public void testIncWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); } @TestMetadata("kt10131.kt") public void testKt10131() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131.kt"); } @TestMetadata("kt10131a.kt") public void testKt10131a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); } @TestMetadata("kt12125.kt") public void testKt12125() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125.kt"); } @TestMetadata("kt12125_2.kt") public void testKt12125_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); } @TestMetadata("kt12125_inc.kt") public void testKt12125_inc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); } @TestMetadata("kt12125_inc_2.kt") public void testKt12125_inc_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); } @TestMetadata("kt5937.kt") public void testKt5937() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt5937.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt5937.kt"); } @TestMetadata("kt8666.kt") public void testKt8666() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt8666.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt8666.kt"); } @TestMetadata("longRangeWithExplicitDot.kt") public void testLongRangeWithExplicitDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); } @TestMetadata("prefixIncDec.kt") public void testPrefixIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); } @TestMetadata("rangeFromCollection.kt") public void testRangeFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); } @TestMetadata("stringFromCollection.kt") public void testStringFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwable.kt"); } @TestMetadata("throwableCallableReference.kt") public void testThrowableCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); } @TestMetadata("throwableParamOrder.kt") public void testThrowableParamOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); } @TestMetadata("tostring.kt") public void testTostring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/tostring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/tostring.kt"); } } @@ -11473,46 +10160,49 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaInterop extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJavaInterop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); } @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("allWildcardsOnClass.kt") public void testAllWildcardsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); } @TestMetadata("covariantOverrideWithDeclarationSiteProjection.kt") public void testCovariantOverrideWithDeclarationSiteProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); } @TestMetadata("invariantArgumentsNoWildcard.kt") public void testInvariantArgumentsNoWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); } } @@ -11520,136 +10210,124 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullAssertions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNotNullAssertions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); } @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); } @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); } @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnhancedNullability extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnhancedNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("inFunctionWithExpressionBody.kt") public void testInFunctionWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); } @TestMetadata("inFunctionWithExpressionBodyWithJavaGeneric.kt") public void testInFunctionWithExpressionBodyWithJavaGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); } @TestMetadata("inLocalFunctionWithExpressionBody.kt") public void testInLocalFunctionWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); } @TestMetadata("inLocalVariableInitializer.kt") public void testInLocalVariableInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); } @TestMetadata("inMemberPropertyInitializer.kt") public void testInMemberPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); } @TestMetadata("inPropertyGetterWithExpressionBody.kt") public void testInPropertyGetterWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); } @TestMetadata("inTopLevelPropertyInitializer.kt") public void testInTopLevelPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); } } } @@ -11658,44 +10336,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectMethods extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjectMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("cloneCallsConstructor.kt") public void testCloneCallsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); } @TestMetadata("cloneCallsSuper.kt") public void testCloneCallsSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); } @TestMetadata("cloneCallsSuperAndModifies.kt") public void testCloneCallsSuperAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); } @TestMetadata("cloneHashSet.kt") public void testCloneHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt"); } @TestMetadata("cloneHierarchy.kt") public void testCloneHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHierarchy.kt"); } @TestMetadata("cloneableClassWithoutClone.kt") public void testCloneableClassWithoutClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); } } } @@ -11704,32 +10380,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jdk extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/hashMap.kt"); } @TestMetadata("iteratingOverHashMap.kt") public void testIteratingOverHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } @TestMetadata("kt1397.kt") public void testKt1397() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/kt1397.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } } @@ -11737,92 +10413,82 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmField extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureClassFields.kt") public void testCaptureClassFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); } @TestMetadata("capturePackageFields.kt") public void testCapturePackageFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); } @TestMetadata("checkNoAccessors.kt") public void testCheckNoAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); } @TestMetadata("classFieldReference.kt") public void testClassFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); } @TestMetadata("classFieldReflection.kt") public void testClassFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); } @TestMetadata("constructorProperty.kt") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); } @TestMetadata("publicField.kt") public void testPublicField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/publicField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/publicField.kt"); } @TestMetadata("simpleMemberProperty.kt") public void testSimpleMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/superCall.kt"); } @TestMetadata("superCall2.kt") public void testSuperCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/superCall2.kt"); } @TestMetadata("topLevelFieldReference.kt") public void testTopLevelFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); } @TestMetadata("topLevelFieldReflection.kt") public void testTopLevelFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/visibility.kt"); } @TestMetadata("writeFieldReference.kt") public void testWriteFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); } } @@ -11830,100 +10496,94 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmName extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/callableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/callableReference.kt"); } @TestMetadata("clashingErasure.kt") public void testClashingErasure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/classMembers.kt"); } @TestMetadata("fakeJvmNameInJava.kt") public void testFakeJvmNameInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/functionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/functionName.kt"); } @TestMetadata("multifileClass.kt") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClass.kt"); } @TestMetadata("multifileClassWithLocalClass.kt") public void testMultifileClassWithLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); } @TestMetadata("multifileClassWithLocalGeneric.kt") public void testMultifileClassWithLocalGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); } @TestMetadata("propertyAccessorsUseSite.kt") public void testPropertyAccessorsUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); } @TestMetadata("propertyName.kt") public void testPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/propertyName.kt"); } @TestMetadata("renamedFileClass.kt") public void testRenamedFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); } @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FileFacades extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFileFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentFiles.kt") public void testDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); } @TestMetadata("javaAnnotationOnFileFacade.kt") public void testJavaAnnotationOnFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); } } } @@ -11932,98 +10592,87 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOverloads extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); } @TestMetadata("defaultsNotAtEnd.kt") public void testDefaultsNotAtEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); } @TestMetadata("doubleParameters.kt") public void testDoubleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/generics.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); } @TestMetadata("multipleDefaultParameters.kt") public void testMultipleDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); } @TestMetadata("noRedundantVarargs.kt") public void testNoRedundantVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/noRedundantVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/noRedundantVarargs.kt"); } @TestMetadata("nonDefaultParameter.kt") public void testNonDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/simple.kt"); } @TestMetadata("simpleJavaCall.kt") public void testSimpleJavaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); } } @@ -12031,32 +10680,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("metadataField.kt") public void testMetadataField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/metadataField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/metadataField.kt"); } @TestMetadata("rootPackage.kt") public void testRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/rootPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/rootPackage.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/simple.kt"); } @TestMetadata("withJvmName.kt") public void testWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/withJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/withJvmName.kt"); } } @@ -12064,164 +10713,142 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/annotations.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/closure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/closure.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); } @TestMetadata("convention.kt") public void testConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/convention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/convention.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/default.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/default.kt"); } @TestMetadata("enumCompanion.kt") public void testEnumCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); } @TestMetadata("explicitObject.kt") public void testExplicitObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); } @TestMetadata("funAccess.kt") public void testFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); } @TestMetadata("importStaticMemberFromObject.kt") public void testImportStaticMemberFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/inline.kt"); } @TestMetadata("inlinePropertyAccessors.kt") public void testInlinePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); } @TestMetadata("kt21246.kt") public void testKt21246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt21246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt21246.kt"); } @TestMetadata("kt21246a.kt") public void testKt21246a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt21246a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt21246a.kt"); } @TestMetadata("kt9897_static.kt") public void testKt9897_static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/object.kt"); } @TestMetadata("postfixInc.kt") public void testPostfixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); } @TestMetadata("prefixInc.kt") public void testPrefixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); } @TestMetadata("privateMethod.kt") public void testPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); } @TestMetadata("propertyAccessorsCompanion.kt") public void testPropertyAccessorsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); } @TestMetadata("propertyAccessorsObject.kt") public void testPropertyAccessorsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); } @TestMetadata("propertyAsDefault.kt") public void testPropertyAsDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); } @TestMetadata("propertyGetterDelegatesToAnother.kt") public void testPropertyGetterDelegatesToAnother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyGetterDelegatesToAnother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyGetterDelegatesToAnother.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/simple.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); } } @@ -12229,56 +10856,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("controlLabelClashesWithFuncitonName.kt") public void testControlLabelClashesWithFuncitonName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); } @TestMetadata("infixCallLabelling.kt") public void testInfixCallLabelling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); } @TestMetadata("labeledDeclarations.kt") public void testLabeledDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessor.kt"); } @TestMetadata("propertyAccessorFunctionLiteral.kt") public void testPropertyAccessorFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); } @TestMetadata("propertyAccessorInnerExtensionFun.kt") public void testPropertyAccessorInnerExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); } @TestMetadata("propertyAccessorObject.kt") public void testPropertyAccessorObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); } @TestMetadata("propertyInClassAccessor.kt") public void testPropertyInClassAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); } } @@ -12286,124 +10909,114 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LazyCodegen extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLazyCodegen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("exceptionInFieldInitializer.kt") public void testExceptionInFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); } @TestMetadata("increment.kt") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/increment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/increment.kt"); } @TestMetadata("safeAssign.kt") public void testSafeAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); } @TestMetadata("safeAssignComplex.kt") public void testSafeAssignComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); } @TestMetadata("safeCallAndArray.kt") public void testSafeCallAndArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/toString.kt"); } @TestMetadata("tryCatchExpression.kt") public void testTryCatchExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/when.kt"); } @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("negateConstantCompare.kt") public void testNegateConstantCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); } @TestMetadata("negateFalse.kt") public void testNegateFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); } @TestMetadata("negateFalseVar.kt") public void testNegateFalseVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); } @TestMetadata("negateFalseVarChain.kt") public void testNegateFalseVarChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); } @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); } @TestMetadata("negateObjectComp2.kt") public void testNegateObjectComp2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); } @TestMetadata("negateTrue.kt") public void testNegateTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); } @TestMetadata("negateTrueVar.kt") public void testNegateTrueVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); } @TestMetadata("noOptimization.kt") public void testNoOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); } } } @@ -12412,233 +11025,172 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalClasses extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectInInitializer.kt") public void testAnonymousObjectInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); } @TestMetadata("anonymousObjectInParameterInitializer.kt") public void testAnonymousObjectInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); } @TestMetadata("closureOfInnerLocalClass.kt") public void testClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); } @TestMetadata("closureOfLambdaInLocalClass.kt") public void testClosureOfLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); } @TestMetadata("closureWithSelfInstantiation.kt") public void testClosureWithSelfInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); } @TestMetadata("inExtensionFunction.kt") public void testInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); } @TestMetadata("inExtensionProperty.kt") public void testInExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); } @TestMetadata("inLocalExtensionFunction.kt") public void testInLocalExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); } @TestMetadata("inLocalExtensionProperty.kt") public void testInLocalExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); } @TestMetadata("innerClassInLocalClass.kt") public void testInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); } @TestMetadata("innerOfLocalCaptureExtensionReceiver.kt") public void testInnerOfLocalCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); } @TestMetadata("kt2700.kt") public void testKt2700() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2700.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2700.kt"); } @TestMetadata("kt2873.kt") public void testKt2873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2873.kt"); } @TestMetadata("kt3210.kt") public void testKt3210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3210.kt"); } @TestMetadata("kt3389.kt") public void testKt3389() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3389.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3389.kt"); } @TestMetadata("kt3584.kt") public void testKt3584() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3584.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3584.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt4174.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClass.kt"); } @TestMetadata("localClassCaptureExtensionReceiver.kt") public void testLocalClassCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); } @TestMetadata("localClassInInitializer.kt") public void testLocalClassInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); } @TestMetadata("localClassInParameterInitializer.kt") public void testLocalClassInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); } @TestMetadata("localDataClass.kt") public void testLocalDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt"); } @TestMetadata("localExtendsInnerAndReferencesOuterMember.kt") public void testLocalExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); } @TestMetadata("noclosure.kt") public void testNoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/noclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/noclosure.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/object.kt"); } @TestMetadata("ownClosureOfInnerLocalClass.kt") public void testOwnClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass1.kt") public void testRecaptureVarCapturedInLocalClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass2.kt") public void testRecaptureVarCapturedInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass3.kt") public void testRecaptureVarCapturedInLocalClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); } @TestMetadata("subclassingExtensionReceiverClass.kt") public void testSubclassingExtensionReceiverClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); } @TestMetadata("withclosure.kt") public void testWithclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/withclosure.kt"); } } @@ -12646,56 +11198,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mangling extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMangling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/field.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/fun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/fun.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internal.kt"); } @TestMetadata("internalOverride.kt") public void testInternalOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverride.kt"); } @TestMetadata("internalOverrideSuperCall.kt") public void testInternalOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); } @TestMetadata("noOverrideWithJava.kt") public void testNoOverrideWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); } @TestMetadata("publicOverride.kt") public void testPublicOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverride.kt"); } @TestMetadata("publicOverrideSuperCall.kt") public void testPublicOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); } } @@ -12703,162 +11251,151 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ComplexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); } @TestMetadata("component.kt") public void testComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/component.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/component.kt"); } @TestMetadata("kt9828_hashMap.kt") public void testKt9828_hashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); } @TestMetadata("returnInElvis.kt") public void testReturnInElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); } @TestMetadata("SimpleVals.kt") public void testSimpleVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); } @TestMetadata("SimpleValsExtensions.kt") public void testSimpleValsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); } @TestMetadata("SimpleVarsExtensions.kt") public void testSimpleVarsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); } @TestMetadata("ValCapturedInFunctionLiteral.kt") public void testValCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); } @TestMetadata("ValCapturedInLocalFunction.kt") public void testValCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); } @TestMetadata("ValCapturedInObjectLiteral.kt") public void testValCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); } @TestMetadata("VarCapturedInFunctionLiteral.kt") public void testVarCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); } @TestMetadata("VarCapturedInLocalFunction.kt") public void testVarCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); } @TestMetadata("VarCapturedInObjectLiteral.kt") public void testVarCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForIterator extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LongIterator extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLongIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -12867,120 +11404,116 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForRange extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); } @TestMetadata("UnderscoreNamesDontCallComponent.kt") public void testUnderscoreNamesDontCallComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -12988,32 +11521,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13022,70 +11555,69 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeToWithDot extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -13093,32 +11625,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13127,32 +11659,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -13160,32 +11692,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13195,166 +11727,149 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callMultifileClassMemberFromOtherPackage.kt") public void testCallMultifileClassMemberFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/callMultifileClassMemberFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/callMultifileClassMemberFromOtherPackage.kt"); } @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/callsToMultifileClassFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/callsToMultifileClassFromOtherPackage.kt"); } @TestMetadata("constPropertyReferenceFromMultifileClass.kt") public void testConstPropertyReferenceFromMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/constPropertyReferenceFromMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/constPropertyReferenceFromMultifileClass.kt"); } @TestMetadata("inlineMultifileClassMemberFromOtherPackage.kt") public void testInlineMultifileClassMemberFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt"); } @TestMetadata("kt16077.kt") public void testKt16077() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/kt16077.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/kt16077.kt"); } @TestMetadata("multifileClassPartsInitialization.kt") public void testMultifileClassPartsInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassPartsInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassPartsInitialization.kt"); } @TestMetadata("multifileClassWith2Files.kt") public void testMultifileClassWith2Files() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWith2Files.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWith2Files.kt"); } @TestMetadata("multifileClassWithCrossCall.kt") public void testMultifileClassWithCrossCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWithCrossCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWithCrossCall.kt"); } @TestMetadata("multifileClassWithPrivate.kt") public void testMultifileClassWithPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWithPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWithPrivate.kt"); } @TestMetadata("privateConstVal.kt") public void testPrivateConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/privateConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/privateConstVal.kt"); } @TestMetadata("samePartNameDifferentFacades.kt") public void testSamePartNameDifferentFacades() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt"); } @TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimized extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableRefToFun.kt") public void testCallableRefToFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToFun.kt"); } @TestMetadata("callableRefToInternalValInline.kt") public void testCallableRefToInternalValInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToInternalValInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToInternalValInline.kt"); } @TestMetadata("callableRefToPrivateVal.kt") public void testCallableRefToPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateVal.kt"); } @TestMetadata("callableRefToVal.kt") public void testCallableRefToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToVal.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt"); } @TestMetadata("deferredStaticInitialization.kt") public void testDeferredStaticInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/deferredStaticInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/deferredStaticInitialization.kt"); } @TestMetadata("delegatedVal.kt") public void testDelegatedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/delegatedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/delegatedVal.kt"); } @TestMetadata("initializePrivateVal.kt") public void testInitializePrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/initializePrivateVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/initializePrivateVal.kt"); } @TestMetadata("initializePublicVal.kt") public void testInitializePublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/initializePublicVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/initializePublicVal.kt"); } @TestMetadata("overlappingFuns.kt") public void testOverlappingFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt"); } @TestMetadata("overlappingVals.kt") public void testOverlappingVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/overlappingVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingVals.kt"); } @TestMetadata("valAccessFromInlineFunCalledFromJava.kt") public void testValAccessFromInlineFunCalledFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlineFunCalledFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlineFunCalledFromJava.kt"); } @TestMetadata("valAccessFromInlinedToDifferentPackage.kt") public void testValAccessFromInlinedToDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlinedToDifferentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlinedToDifferentPackage.kt"); } @TestMetadata("valWithAccessor.kt") public void testValWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valWithAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valWithAccessor.kt"); } } } @@ -13363,6 +11878,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -13371,62 +11890,57 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); } @TestMetadata("inheritedFromCommonClass.kt") public void testInheritedFromCommonClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); } @TestMetadata("inheritedFromExpectedClass.kt") public void testInheritedFromExpectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); } @TestMetadata("inheritedFromExpectedMethod.kt") public void testInheritedFromExpectedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); } @TestMetadata("inheritedInExpectedDeclarations.kt") public void testInheritedInExpectedDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); } @TestMetadata("inlineFunctionWithDefaultLambda.kt") public void testInlineFunctionWithDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); } @TestMetadata("kt23239.kt") public void testKt23239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); } } } @@ -13435,44 +11949,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt6895.kt") public void testKt6895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt6895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt6895.kt"); } @TestMetadata("kt9644let.kt") public void testKt9644let() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); } @TestMetadata("localReturnInsideProperty.kt") public void testLocalReturnInsideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); } @TestMetadata("returnInsideTwoLambdas.kt") public void testReturnInsideTwoLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/use.kt"); } @TestMetadata("useWithException.kt") public void testUseWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); } } @@ -13480,32 +11992,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullCheckOptimization extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNullCheckOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("isNullable.kt") public void testIsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); } @TestMetadata("kt22410.kt") public void testKt22410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); } @TestMetadata("kt7774.kt") public void testKt7774() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); } @TestMetadata("trivialInstanceOf.kt") public void testTrivialInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); } } @@ -13513,14 +12025,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectIntrinsics extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjectIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); } } @@ -13528,410 +12043,347 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); } @TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt") public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); } @TestMetadata("classCallsProtectedInheritedByCompanion.kt") public void testClassCallsProtectedInheritedByCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); } @TestMetadata("classCompanion.kt") public void testClassCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCompanion.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToObjectFromCall.kt") public void testCompoundAssignmentToObjectFromCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); } @TestMetadata("compoundAssignmentToPropertyImportedFromObject.kt") public void testCompoundAssignmentToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToPropertyWithQualifier.kt") public void testCompoundAssignmentToPropertyWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); } @TestMetadata("flist.kt") public void testFlist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/flist.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/flist.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/initializationOrder.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); } @TestMetadata("interfaceCompanionObjectReference.kt") public void testInterfaceCompanionObjectReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); } @TestMetadata("kt1047.kt") public void testKt1047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1047.kt"); } @TestMetadata("kt11117.kt") public void testKt11117() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt11117.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt11117.kt"); } @TestMetadata("kt1136.kt") public void testKt1136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1136.kt"); } @TestMetadata("kt1186.kt") public void testKt1186() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1186.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1186.kt"); } @TestMetadata("kt1600.kt") public void testKt1600() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1600.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1600.kt"); } @TestMetadata("kt1737.kt") public void testKt1737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1737.kt"); } @TestMetadata("kt18982.kt") public void testKt18982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt18982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt18982.kt"); } @TestMetadata("kt2398.kt") public void testKt2398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2398.kt"); } @TestMetadata("kt2663.kt") public void testKt2663() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663.kt"); } @TestMetadata("kt2663_2.kt") public void testKt2663_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663_2.kt"); } @TestMetadata("kt2675.kt") public void testKt2675() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2675.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2675.kt"); } @TestMetadata("kt2719.kt") public void testKt2719() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2719.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2719.kt"); } @TestMetadata("kt2822.kt") public void testKt2822() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2822.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2822.kt"); } @TestMetadata("kt3238.kt") public void testKt3238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3238.kt"); } @TestMetadata("kt3684.kt") public void testKt3684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3684.kt"); } @TestMetadata("kt4086.kt") public void testKt4086() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt4086.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt4086.kt"); } @TestMetadata("kt535.kt") public void testKt535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt535.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt535.kt"); } @TestMetadata("kt560.kt") public void testKt560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt560.kt"); } @TestMetadata("kt694.kt") public void testKt694() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt694.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt694.kt"); } @TestMetadata("localFunctionInObjectInitializer_kt4516.kt") public void testLocalFunctionInObjectInitializer_kt4516() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); } @TestMetadata("methodOnObject.kt") public void testMethodOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/methodOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/methodOnObject.kt"); } @TestMetadata("nestedDerivedClassCallsProtectedFromCompanion.kt") public void testNestedDerivedClassCallsProtectedFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); } @TestMetadata("nestedObjectWithSuperclass.kt") public void testNestedObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/object.kt"); } @TestMetadata("objectExtendsInnerAndReferencesOuterMember.kt") public void testObjectExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("objectInLocalAnonymousObject.kt") public void testObjectInLocalAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); } @TestMetadata("objectInitialization_kt5523.kt") public void testObjectInitialization_kt5523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteral.kt"); } @TestMetadata("objectLiteralInClosure.kt") public void testObjectLiteralInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); } @TestMetadata("objectVsClassInitialization_kt5291.kt") public void testObjectVsClassInitialization_kt5291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); } @TestMetadata("objectWithSuperclass.kt") public void testObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); } @TestMetadata("objectWithSuperclassAndTrait.kt") public void testObjectWithSuperclassAndTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); } @TestMetadata("privateExtensionFromInitializer_kt4543.kt") public void testPrivateExtensionFromInitializer_kt4543() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); } @TestMetadata("privateFunctionFromClosureInInitializer_kt5582.kt") public void testPrivateFunctionFromClosureInInitializer_kt5582() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); } @TestMetadata("receiverInConstructor.kt") public void testReceiverInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); } @TestMetadata("safeAccess.kt") public void testSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/safeAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/safeAccess.kt"); } @TestMetadata("selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/simpleObject.kt"); } @TestMetadata("thisInConstructor.kt") public void testThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/thisInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt"); } @TestMetadata("useAnonymousObjectAsIterator.kt") public void testUseAnonymousObjectAsIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); } @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMember.kt"); } @TestMetadata("useImportedMemberFromCompanion.kt") public void testUseImportedMemberFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); } } @@ -13939,184 +12391,164 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorConventions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOperatorConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotatedAssignment.kt") public void testAnnotatedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); } @TestMetadata("augmentedAssignmentWithArrayLHS.kt") public void testAugmentedAssignmentWithArrayLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); } @TestMetadata("incDecOnObject.kt") public void testIncDecOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); } @TestMetadata("infixFunctionOverBuiltinMember.kt") public void testInfixFunctionOverBuiltinMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); } @TestMetadata("kt14201.kt") public void testKt14201() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); } @TestMetadata("kt14201_2.kt") public void testKt14201_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); } @TestMetadata("kt20387.kt") public void testKt20387() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); } @TestMetadata("kt4152.kt") public void testKt4152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); } @TestMetadata("kt4987.kt") public void testKt4987() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); } @TestMetadata("nestedMaps.kt") public void testNestedMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); } @TestMetadata("operatorSetLambda.kt") public void testOperatorSetLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); } @TestMetadata("overloadedSet.kt") public void testOverloadedSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); } @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); } @TestMetadata("remOverModOperation.kt") public void testRemOverModOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); } @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompareTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCompareTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); } @TestMetadata("comparable.kt") public void testComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); } @TestMetadata("doubleInt.kt") public void testDoubleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); } @TestMetadata("doubleLong.kt") public void testDoubleLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); } @TestMetadata("extensionArray.kt") public void testExtensionArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); } @TestMetadata("extensionObject.kt") public void testExtensionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); } @TestMetadata("intDouble.kt") public void testIntDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); } @TestMetadata("intLong.kt") public void testIntLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); } @TestMetadata("longDouble.kt") public void testLongDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); } @TestMetadata("longInt.kt") public void testLongInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } } @@ -14125,14 +12557,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); } } @@ -14140,80 +12575,72 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxPrimitiveTypeInClinit.kt") public void testBoxPrimitiveTypeInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); } @TestMetadata("checkCast.kt") public void testCheckCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/checkCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/checkCast.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/incrementProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/incrementProperty.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/initializationOrder.kt"); } @TestMetadata("invokespecial.kt") public void testInvokespecial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/invokespecial.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/invokespecial.kt"); } @TestMetadata("mainInFiles.kt") public void testMainInFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/mainInFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/mainInFiles.kt"); } @TestMetadata("nullablePrimitiveNoFieldInitializer.kt") public void testNullablePrimitiveNoFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); } @TestMetadata("packageLocalClassNotImportedWithDefaultImport.kt") public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); } @TestMetadata("packageQualifiedMethod.kt") public void testPackageQualifiedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); } @TestMetadata("privateMembersInImportList.kt") public void testPrivateMembersInImportList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); } @TestMetadata("privateTopLevelPropAndVarInInner.kt") public void testPrivateTopLevelPropAndVarInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); } @TestMetadata("referenceWithTheSameNameAsPackage.kt") public void testReferenceWithTheSameNameAsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); } } @@ -14221,6 +12648,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -14229,146 +12660,127 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Primitives extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitives() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); } @TestMetadata("dec.kt") public void testDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); } @TestMetadata("div.kt") public void testDiv() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); } @TestMetadata("equalsNull_lv11.kt") public void testEqualsNull_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt"); } @TestMetadata("equalsNull_lv12.kt") public void testEqualsNull_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt"); } @TestMetadata("equalsNull_withExplicitFlag.kt") public void testEqualsNull_withExplicitFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); } @TestMetadata("inc.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); } @TestMetadata("not.kt") public void testNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); } @TestMetadata("times.kt") public void testTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); } @TestMetadata("toShort.kt") public void testToShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); } } } @@ -14377,480 +12789,416 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveTypes extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparisonWithNaN.kt") public void testComparisonWithNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); } @TestMetadata("comparisonWithNullCallsFun.kt") public void testComparisonWithNullCallsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); } @TestMetadata("conversions.kt") public void testConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); } @TestMetadata("ea35963.kt") public void testEa35963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); } @TestMetadata("incrementByteCharShort.kt") public void testIncrementByteCharShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); } @TestMetadata("intLiteralIsNotNull.kt") public void testIntLiteralIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); } @TestMetadata("kt1054.kt") public void testKt1054() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); } @TestMetadata("kt1055.kt") public void testKt1055() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); } @TestMetadata("kt1093.kt") public void testKt1093() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); } @TestMetadata("kt13023.kt") public void testKt13023() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); } @TestMetadata("kt14868.kt") public void testKt14868() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); } @TestMetadata("kt1508.kt") public void testKt1508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); } @TestMetadata("kt1634.kt") public void testKt1634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); } @TestMetadata("kt16732.kt") public void testKt16732() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); } @TestMetadata("kt2251.kt") public void testKt2251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); } @TestMetadata("kt2269.kt") public void testKt2269() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); } @TestMetadata("kt2275.kt") public void testKt2275() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); } @TestMetadata("kt239.kt") public void testKt239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); } @TestMetadata("kt242.kt") public void testKt242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); } @TestMetadata("kt243.kt") public void testKt243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); } @TestMetadata("kt248.kt") public void testKt248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); } @TestMetadata("kt2768.kt") public void testKt2768() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); } @TestMetadata("kt2794.kt") public void testKt2794() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); } @TestMetadata("kt3078.kt") public void testKt3078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); } @TestMetadata("kt3517.kt") public void testKt3517() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); } @TestMetadata("kt3576.kt") public void testKt3576() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); } @TestMetadata("kt3613.kt") public void testKt3613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); } @TestMetadata("kt4097.kt") public void testKt4097() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); } @TestMetadata("kt4098.kt") public void testKt4098() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); } @TestMetadata("kt4210.kt") public void testKt4210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); } @TestMetadata("kt4251.kt") public void testKt4251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); } @TestMetadata("kt446.kt") public void testKt446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); } @TestMetadata("kt518.kt") public void testKt518() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); } @TestMetadata("kt6590_identityEquals.kt") public void testKt6590_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); } @TestMetadata("kt665.kt") public void testKt665() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); } @TestMetadata("kt684.kt") public void testKt684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); } @TestMetadata("kt711.kt") public void testKt711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); } @TestMetadata("kt737.kt") public void testKt737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); } @TestMetadata("kt752.kt") public void testKt752() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); } @TestMetadata("kt753.kt") public void testKt753() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); } @TestMetadata("kt756.kt") public void testKt756() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); } @TestMetadata("kt757.kt") public void testKt757() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); } @TestMetadata("kt828.kt") public void testKt828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); } @TestMetadata("kt877.kt") public void testKt877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); } @TestMetadata("kt882.kt") public void testKt882() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); } @TestMetadata("kt887.kt") public void testKt887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); } @TestMetadata("kt935.kt") public void testKt935() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); } @TestMetadata("nullAsNullableIntIsNull.kt") public void testNullAsNullableIntIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); } @TestMetadata("nullableCharBoolean.kt") public void testNullableCharBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); } @TestMetadata("number.kt") public void testNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/number.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/number.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } @TestMetadata("substituteIntForGeneric.kt") public void testSubstituteIntForGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); } @TestMetadata("unboxComparable.kt") public void testUnboxComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EqualityWithObject extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEqualityWithObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedEqPrimitiveEvaluationOrder.kt") public void testBoxedEqPrimitiveEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); } @TestMetadata("boxedLongEqualsLong.kt") public void testBoxedLongEqualsLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); } @TestMetadata("objectWithAsymmetricEqualsEqPrimitive.kt") public void testObjectWithAsymmetricEqualsEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); } @TestMetadata("whenNullableBoxed.kt") public void testWhenNullableBoxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedEqPrimitiveBoolean.kt") public void testBoxedEqPrimitiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); } @TestMetadata("boxedEqPrimitiveByte.kt") public void testBoxedEqPrimitiveByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); } @TestMetadata("boxedEqPrimitiveChar.kt") public void testBoxedEqPrimitiveChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); } @TestMetadata("boxedEqPrimitiveInt.kt") public void testBoxedEqPrimitiveInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); } @TestMetadata("boxedEqPrimitiveLong.kt") public void testBoxedEqPrimitiveLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); } @TestMetadata("boxedEqPrimitiveShort.kt") public void testBoxedEqPrimitiveShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); } @TestMetadata("primitiveEqBoxedBoolean.kt") public void testPrimitiveEqBoxedBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); } @TestMetadata("primitiveEqBoxedByte.kt") public void testPrimitiveEqBoxedByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); } @TestMetadata("primitiveEqBoxedChar.kt") public void testPrimitiveEqBoxedChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); } @TestMetadata("primitiveEqBoxedInt.kt") public void testPrimitiveEqBoxedInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); } @TestMetadata("primitiveEqBoxedLong.kt") public void testPrimitiveEqBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); } @TestMetadata("primitiveEqBoxedShort.kt") public void testPrimitiveEqBoxedShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); } @TestMetadata("primitiveEqObjectBoolean.kt") public void testPrimitiveEqObjectBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); } @TestMetadata("primitiveEqObjectByte.kt") public void testPrimitiveEqObjectByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); } @TestMetadata("primitiveEqObjectChar.kt") public void testPrimitiveEqObjectChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); } @TestMetadata("primitiveEqObjectInt.kt") public void testPrimitiveEqObjectInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); } @TestMetadata("primitiveEqObjectLong.kt") public void testPrimitiveEqObjectLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); } @TestMetadata("primitiveEqObjectShort.kt") public void testPrimitiveEqObjectShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); } } } @@ -14860,20 +13208,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayConvention.kt") public void testArrayConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/arrayConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/arrayConvention.kt"); } @TestMetadata("kt9855.kt") public void testKt9855() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/kt9855.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/kt9855.kt"); } } @@ -14881,86 +13231,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateConstructors extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivateConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/base.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/base.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/captured.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/companion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/companion.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inline.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inner.kt"); } @TestMetadata("kt4860.kt") public void testKt4860() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); } @TestMetadata("secondary.kt") public void testSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/secondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/secondary.kt"); } @TestMetadata("synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); } @TestMetadata("withDefault.kt") public void testWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); } @TestMetadata("withLinkedClasses.kt") public void testWithLinkedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); } @TestMetadata("withLinkedObjects.kt") public void testWithLinkedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); } } @@ -14968,16 +13309,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); } @TestMetadata("accessToPrivateSetter.kt") public void testAccessToPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } public void testAllFilesPresentInProperties() throws Exception { @@ -14986,429 +13329,354 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("augmentedAssignmentsAndIncrements.kt") public void testAugmentedAssignmentsAndIncrements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); } @TestMetadata("classArtificialFieldInsideNested.kt") public void testClassArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); } @TestMetadata("classFieldInsideLambda.kt") public void testClassFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); } @TestMetadata("classFieldInsideLocalInSetter.kt") public void testClassFieldInsideLocalInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); } @TestMetadata("classFieldInsideNested.kt") public void testClassFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); } @TestMetadata("classObjectProperties.kt") public void testClassObjectProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classObjectProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classObjectProperties.kt"); } @TestMetadata("classPrivateArtificialFieldInsideNested.kt") public void testClassPrivateArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); } @TestMetadata("collectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/collectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/collectionSize.kt"); } @TestMetadata("commonPropertiesKJK.kt") public void testCommonPropertiesKJK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); } @TestMetadata("companionFieldInsideLambda.kt") public void testCompanionFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); } @TestMetadata("companionObjectAccessor.kt") public void testCompanionObjectAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); } @TestMetadata("companionObjectPropertiesFromJava.kt") public void testCompanionObjectPropertiesFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); } @TestMetadata("companionPrivateField.kt") public void testCompanionPrivateField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateField.kt"); } @TestMetadata("companionPrivateFieldInsideLambda.kt") public void testCompanionPrivateFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/field.kt"); } @TestMetadata("fieldInClass.kt") public void testFieldInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInClass.kt"); } @TestMetadata("fieldInsideField.kt") public void testFieldInsideField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideField.kt"); } @TestMetadata("fieldInsideLambda.kt") public void testFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); } @TestMetadata("fieldInsideNested.kt") public void testFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); } @TestMetadata("fieldSimple.kt") public void testFieldSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldSimple.kt"); } @TestMetadata("generalAccess.kt") public void testGeneralAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/generalAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/generalAccess.kt"); } @TestMetadata("javaPropertyBoxedGetter.kt") public void testJavaPropertyBoxedGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); } @TestMetadata("javaPropertyBoxedSetter.kt") public void testJavaPropertyBoxedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); } @TestMetadata("kt10715.kt") public void testKt10715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10715.kt"); } @TestMetadata("kt10729.kt") public void testKt10729() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10729.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10729.kt"); } @TestMetadata("kt1159.kt") public void testKt1159() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1159.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1159.kt"); } @TestMetadata("kt1165.kt") public void testKt1165() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1165.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1165.kt"); } @TestMetadata("kt1168.kt") public void testKt1168() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1168.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1168.kt"); } @TestMetadata("kt1170.kt") public void testKt1170() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1170.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1170.kt"); } @TestMetadata("kt12200.kt") public void testKt12200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt12200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt12200.kt"); } @TestMetadata("kt1398.kt") public void testKt1398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1398.kt"); } @TestMetadata("kt1417.kt") public void testKt1417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1417.kt"); } @TestMetadata("kt1482_2279.kt") public void testKt1482_2279() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1482_2279.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1482_2279.kt"); } @TestMetadata("kt1714.kt") public void testKt1714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714.kt"); } @TestMetadata("kt1714_minimal.kt") public void testKt1714_minimal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); } @TestMetadata("kt1892.kt") public void testKt1892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1892.kt"); } @TestMetadata("kt2331.kt") public void testKt2331() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2331.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2331.kt"); } @TestMetadata("kt257.kt") public void testKt257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt257.kt"); } @TestMetadata("kt2655.kt") public void testKt2655() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2655.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2655.kt"); } @TestMetadata("kt2786.kt") public void testKt2786() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2786.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2786.kt"); } @TestMetadata("kt2892.kt") public void testKt2892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2892.kt"); } @TestMetadata("kt3118.kt") public void testKt3118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3118.kt"); } @TestMetadata("kt3524.kt") public void testKt3524() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3524.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3524.kt"); } @TestMetadata("kt3551.kt") public void testKt3551() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3551.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3551.kt"); } @TestMetadata("kt3556.kt") public void testKt3556() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3556.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3556.kt"); } @TestMetadata("kt3930.kt") public void testKt3930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3930.kt"); } @TestMetadata("kt4140.kt") public void testKt4140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4140.kt"); } @TestMetadata("kt4252.kt") public void testKt4252() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252.kt"); } @TestMetadata("kt4252_2.kt") public void testKt4252_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252_2.kt"); } @TestMetadata("kt4340.kt") public void testKt4340() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4340.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4340.kt"); } @TestMetadata("kt4373.kt") public void testKt4373() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4373.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4373.kt"); } @TestMetadata("kt4383.kt") public void testKt4383() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4383.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4383.kt"); } @TestMetadata("kt613.kt") public void testKt613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt613.kt"); } @TestMetadata("kt8928.kt") public void testKt8928() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt8928.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt8928.kt"); } @TestMetadata("kt9603.kt") public void testKt9603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt9603.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt9603.kt"); } @TestMetadata("primitiveOverrideDefaultAccessor.kt") public void testPrimitiveOverrideDefaultAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); } @TestMetadata("primitiveOverrideDelegateAccessor.kt") public void testPrimitiveOverrideDelegateAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); } @TestMetadata("privatePropertyInConstructor.kt") public void testPrivatePropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); } @TestMetadata("privatePropertyWithoutBackingField.kt") public void testPrivatePropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); } @TestMetadata("protectedJavaFieldInInline.kt") public void testProtectedJavaFieldInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); } @TestMetadata("protectedJavaProperty.kt") public void testProtectedJavaProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); } @TestMetadata("protectedJavaPropertyInCompanion.kt") public void testProtectedJavaPropertyInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); } @TestMetadata("substituteJavaSuperField.kt") public void testSubstituteJavaSuperField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); } @TestMetadata("twoAnnotatedExtensionPropertiesWithoutBackingFields.kt") public void testTwoAnnotatedExtensionPropertiesWithoutBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); } @TestMetadata("typeInferredFromGetter.kt") public void testTypeInferredFromGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Const extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constFlags.kt") public void testConstFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/constFlags.kt"); } @TestMetadata("constValInAnnotationDefault.kt") public void testConstValInAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); } } @@ -15416,16 +13684,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessor.kt") public void testAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); } @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); } public void testAllFilesPresentInLateinit() throws Exception { @@ -15434,100 +13704,89 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("exceptionField.kt") public void testExceptionField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); } @TestMetadata("exceptionGetter.kt") public void testExceptionGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/override.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/override.kt"); } @TestMetadata("overrideException.kt") public void testOverrideException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); } @TestMetadata("privateSetterFromLambda.kt") public void testPrivateSetterFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); } @TestMetadata("privateSetterViaSubclass.kt") public void testPrivateSetterViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); } @TestMetadata("simpleVar.kt") public void testSimpleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/visibility.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInitializedAndDeinitialize extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyLhs.kt") public void testEmptyLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); } @TestMetadata("innerSubclass.kt") public void testInnerSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); } @TestMetadata("sideEffects.kt") public void testSideEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); } @TestMetadata("simpleIsInitialized.kt") public void testSimpleIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); } } @@ -15535,44 +13794,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedLocalLateinit.kt") public void testCapturedLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); } @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); } @TestMetadata("uninitializedCapturedMemberAccess.kt") public void testUninitializedCapturedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); } @TestMetadata("uninitializedCapturedRead.kt") public void testUninitializedCapturedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); } } @@ -15580,16 +13837,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevel extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); } @TestMetadata("accessorForTopLevelLateinit.kt") public void testAccessorForTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); } public void testAllFilesPresentInTopLevel() throws Exception { @@ -15598,20 +13857,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("topLevelLateinit.kt") public void testTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); } } } @@ -15621,26 +13877,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublishedApi extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPublishedApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("noMangling.kt") public void testNoMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/noMangling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/noMangling.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/simple.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/topLevel.kt"); } } @@ -15648,342 +13905,301 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ranges extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRanges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forByteProgressionWithIntIncrement.kt") public void testForByteProgressionWithIntIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); } @TestMetadata("forInRangeLiteralWithMixedTypeBounds.kt") public void testForInRangeLiteralWithMixedTypeBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); } @TestMetadata("forInRangeWithImplicitReceiver.kt") public void testForInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); } @TestMetadata("forInStringVarUpdatedInLoopBody.kt") public void testForInStringVarUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); } @TestMetadata("forIntRange.kt") public void testForIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forIntRange.kt"); } @TestMetadata("forNullableIntInRangeWithImplicitReceiver.kt") public void testForNullableIntInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); } @TestMetadata("multiAssignmentIterationOverIntRange.kt") public void testMultiAssignmentIterationOverIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); } @TestMetadata("safeCallRangeTo.kt") public void testSafeCallRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contains extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInContains() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparisonWithRangeBoundEliminated.kt") public void testComparisonWithRangeBoundEliminated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); } @TestMetadata("evaluationOrderForCollection.kt") public void testEvaluationOrderForCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); } @TestMetadata("evaluationOrderForComparableRange.kt") public void testEvaluationOrderForComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); } @TestMetadata("evaluationOrderForDownTo.kt") public void testEvaluationOrderForDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); } @TestMetadata("evaluationOrderForRangeLiteral.kt") public void testEvaluationOrderForRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); } @TestMetadata("genericCharInRangeLiteral.kt") public void testGenericCharInRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); } @TestMetadata("inArray.kt") public void testInArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inArray.kt"); } @TestMetadata("inCharSequence.kt") public void testInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); } @TestMetadata("inComparableRange.kt") public void testInComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); } @TestMetadata("inCustomObjectRange.kt") public void testInCustomObjectRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); } @TestMetadata("inDoubleRangeLiteralVsComparableRangeLiteral.kt") public void testInDoubleRangeLiteralVsComparableRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); } @TestMetadata("inExtensionRange.kt") public void testInExtensionRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); } @TestMetadata("inFloatingPointRangeWithNaNBound.kt") public void testInFloatingPointRangeWithNaNBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); } @TestMetadata("inIntRange.kt") public void testInIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); } @TestMetadata("inIterable.kt") public void testInIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); } @TestMetadata("inNonMatchingRange.kt") public void testInNonMatchingRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); } @TestMetadata("inOptimizableDoubleRange.kt") public void testInOptimizableDoubleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); } @TestMetadata("inOptimizableFloatRange.kt") public void testInOptimizableFloatRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); } @TestMetadata("inOptimizableIntRange.kt") public void testInOptimizableIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); } @TestMetadata("inOptimizableLongRange.kt") public void testInOptimizableLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); } @TestMetadata("inPrimitiveProgression.kt") public void testInPrimitiveProgression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); } @TestMetadata("inPrimitiveRange.kt") public void testInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); } @TestMetadata("inRangeLiteralComposition.kt") public void testInRangeLiteralComposition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); } @TestMetadata("inRangeWithCustomContains.kt") public void testInRangeWithCustomContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); } @TestMetadata("inRangeWithImplicitReceiver.kt") public void testInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); } @TestMetadata("inRangeWithNonmatchingArguments.kt") public void testInRangeWithNonmatchingArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); } @TestMetadata("inRangeWithSmartCast.kt") public void testInRangeWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); } @TestMetadata("inUntil.kt") public void testInUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); } @TestMetadata("kt20106.kt") public void testKt20106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); } @TestMetadata("nullableInPrimitiveRange.kt") public void testNullableInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); } @TestMetadata("rangeContainsString.kt") public void testRangeContainsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayIndices.kt") public void testArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); } @TestMetadata("charDownTo.kt") public void testCharDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); } @TestMetadata("charRangeLiteral.kt") public void testCharRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); } @TestMetadata("charSequenceIndices.kt") public void testCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); } @TestMetadata("charUntil.kt") public void testCharUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); } @TestMetadata("collectionIndices.kt") public void testCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); } @TestMetadata("doubleRangeLiteral.kt") public void testDoubleRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); } @TestMetadata("floatRangeLiteral.kt") public void testFloatRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); } @TestMetadata("intDownTo.kt") public void testIntDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); } @TestMetadata("intRangeLiteral.kt") public void testIntRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); } @TestMetadata("intUntil.kt") public void testIntUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); } @TestMetadata("longDownTo.kt") public void testLongDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); } @TestMetadata("longRangeLiteral.kt") public void testLongRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); } @TestMetadata("longUntil.kt") public void testLongUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); } } } @@ -15992,176 +14208,152 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); } } @@ -16169,38 +14361,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInDownTo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInDownTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forIntInDownTo.kt") public void testForIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); } @TestMetadata("forIntInDownToWithNonConstBounds.kt") public void testForIntInDownToWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); } @TestMetadata("forIntInNonOptimizedDownTo.kt") public void testForIntInNonOptimizedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); } @TestMetadata("forLongInDownTo.kt") public void testForLongInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); } @TestMetadata("forNullableIntInDownTo.kt") public void testForNullableIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); } } @@ -16208,104 +14399,92 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIndices extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInCharSequenceIndices.kt") public void testForInCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); } @TestMetadata("forInCollectionImplicitReceiverIndices.kt") public void testForInCollectionImplicitReceiverIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); } @TestMetadata("forInCollectionIndices.kt") public void testForInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); } @TestMetadata("forInNonOptimizedIndices.kt") public void testForInNonOptimizedIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); } @TestMetadata("forInObjectArrayIndices.kt") public void testForInObjectArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); } @TestMetadata("forInPrimitiveArrayIndices.kt") public void testForInPrimitiveArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); } @TestMetadata("forNullableIntInArrayIndices.kt") public void testForNullableIntInArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); } @TestMetadata("forNullableIntInCollectionIndices.kt") public void testForNullableIntInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); } @TestMetadata("indexOfLast.kt") public void testIndexOfLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); } @TestMetadata("kt12983_forInGenericArrayIndices.kt") public void testKt12983_forInGenericArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); } @TestMetadata("kt12983_forInGenericCollectionIndices.kt") public void testKt12983_forInGenericCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); } @TestMetadata("kt12983_forInSpecificArrayIndices.kt") public void testKt12983_forInSpecificArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); } @TestMetadata("kt12983_forInSpecificCollectionIndices.kt") public void testKt12983_forInSpecificCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); } @TestMetadata("kt13241_Array.kt") public void testKt13241_Array() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); } @TestMetadata("kt13241_CharSequence.kt") public void testKt13241_CharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); } @TestMetadata("kt13241_Collection.kt") public void testKt13241_Collection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); } } @@ -16313,118 +14492,109 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInReversed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInReversed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInReversedArrayIndices.kt") public void testForInReversedArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); } @TestMetadata("forInReversedCharSequenceIndices.kt") public void testForInReversedCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); } @TestMetadata("forInReversedCollectionIndices.kt") public void testForInReversedCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); } @TestMetadata("forInReversedDownTo.kt") public void testForInReversedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); } @TestMetadata("forInReversedEmptyRange.kt") public void testForInReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); } @TestMetadata("forInReversedEmptyRangeLiteral.kt") public void testForInReversedEmptyRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); } @TestMetadata("forInReversedEmptyRangeLiteralWithNonConstBounds.kt") public void testForInReversedEmptyRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("forInReversedRange.kt") public void testForInReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); } @TestMetadata("forInReversedRangeLiteral.kt") public void testForInReversedRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); } @TestMetadata("forInReversedRangeLiteralWithNonConstBounds.kt") public void testForInReversedRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("ForInReversedReversedRange.kt") public void testForInReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); } @TestMetadata("forInReversedReversedReversedRange.kt") public void testForInReversedReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); } @TestMetadata("forInReversedUntil.kt") public void testForInReversedUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); } @TestMetadata("forInReversedUntilWithNonConstBounds.kt") public void testForInReversedUntilWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluationOrder extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEvaluationOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInReversedDownToEvaluationOrder.kt") public void testForInReversedDownToEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); } @TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt") public void testForInReversedRangeLiteralEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); } @TestMetadata("forInReversedUntilEvaluationOrder.kt") public void testForInReversedUntilEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); } } } @@ -16433,62 +14603,57 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInUntil extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInUntil() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInUntilChar.kt") public void testForInUntilChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); } @TestMetadata("forInUntilChar0.kt") public void testForInUntilChar0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); } @TestMetadata("forInUntilInt.kt") public void testForInUntilInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); } @TestMetadata("forInUntilLesserInt.kt") public void testForInUntilLesserInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); } @TestMetadata("forInUntilLong.kt") public void testForInUntilLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); } @TestMetadata("forInUntilMaxint.kt") public void testForInUntilMaxint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); } @TestMetadata("forInUntilMinint.kt") public void testForInUntilMinint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); } @TestMetadata("forInUntilMinlong.kt") public void testForInUntilMinlong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); } @TestMetadata("forIntInIntUntilSmartcastInt.kt") public void testForIntInIntUntilSmartcastInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); } } @@ -16496,86 +14661,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForWithPossibleOverflow extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInDownToCharMinValue.kt") public void testForInDownToCharMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); } @TestMetadata("forInDownToCharMinValueReversed.kt") public void testForInDownToCharMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); } @TestMetadata("forInDownToIntMinValue.kt") public void testForInDownToIntMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); } @TestMetadata("forInDownToIntMinValueReversed.kt") public void testForInDownToIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); } @TestMetadata("forInDownToLongMinValue.kt") public void testForInDownToLongMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); } @TestMetadata("forInDownToLongMinValueReversed.kt") public void testForInDownToLongMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); } @TestMetadata("forInRangeToCharMaxValue.kt") public void testForInRangeToCharMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); } @TestMetadata("forInRangeToCharMaxValueReversed.kt") public void testForInRangeToCharMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); } @TestMetadata("forInRangeToIntMaxValue.kt") public void testForInRangeToIntMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); } @TestMetadata("forInRangeToIntMaxValueReversed.kt") public void testForInRangeToIntMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); } @TestMetadata("forInRangeToLongMaxValue.kt") public void testForInRangeToLongMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); } @TestMetadata("forInRangeToLongMaxValueReversed.kt") public void testForInRangeToLongMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); } @TestMetadata("forInUntilIntMinValueReversed.kt") public void testForInUntilIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); } } @@ -16583,176 +14739,152 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Literal extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); } } @@ -16760,26 +14892,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableLoopParameter extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNullableLoopParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("progressionExpression.kt") public void testProgressionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); } @TestMetadata("rangeExpression.kt") public void testRangeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); } @TestMetadata("rangeLiteral.kt") public void testRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } } @@ -16788,6 +14921,10 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -16796,86 +14933,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationRetentionAnnotation.kt") public void testAnnotationRetentionAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); } @TestMetadata("annotationsOnJavaMembers.kt") public void testAnnotationsOnJavaMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); } @TestMetadata("findAnnotation.kt") public void testFindAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); } @TestMetadata("privateAnnotation.kt") public void testPrivateAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); } @TestMetadata("propertyWithoutBackingField.kt") public void testPropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); } @TestMetadata("retentions.kt") public void testRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); } @TestMetadata("simpleClassAnnotation.kt") public void testSimpleClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); } @TestMetadata("simpleConstructorAnnotation.kt") public void testSimpleConstructorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); } @TestMetadata("simpleFunAnnotation.kt") public void testSimpleFunAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); } @TestMetadata("simpleParamAnnotation.kt") public void testSimpleParamAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); } @TestMetadata("simpleValAnnotation.kt") public void testSimpleValAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } } @@ -16883,232 +15011,204 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callInstanceJavaMethod.kt") public void testCallInstanceJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); } @TestMetadata("callPrivateJavaMethod.kt") public void testCallPrivateJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); } @TestMetadata("callStaticJavaMethod.kt") public void testCallStaticJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); } @TestMetadata("cannotCallEnumConstructor.kt") public void testCannotCallEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); } @TestMetadata("disallowNullValueForNotNullField.kt") public void testDisallowNullValueForNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); } @TestMetadata("exceptionHappened.kt") public void testExceptionHappened() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); } @TestMetadata("fakeOverrideSubstituted.kt") public void testFakeOverrideSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); } @TestMetadata("incorrectNumberOfArguments.kt") public void testIncorrectNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); } @TestMetadata("jvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); } @TestMetadata("jvmStaticInObjectIncorrectReceiver.kt") public void testJvmStaticInObjectIncorrectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); } @TestMetadata("memberOfGenericClass.kt") public void testMemberOfGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); } @TestMetadata("privateProperty.kt") public void testPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); } @TestMetadata("propertyGetterAndGetFunctionDifferentReturnType.kt") public void testPropertyGetterAndGetFunctionDifferentReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); } @TestMetadata("returnUnit.kt") public void testReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunction.kt") public void testSimpleMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); } @TestMetadata("simpleTopLevelFunctions.kt") public void testSimpleTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObjectPropertyAccessors.kt") public void testCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); } @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); } @TestMetadata("javaInstanceField.kt") public void testJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); } @TestMetadata("javaInstanceMethod.kt") public void testJavaInstanceMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); } @TestMetadata("jvmStaticCompanionObjectPropertyAccessors.kt") public void testJvmStaticCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); } @TestMetadata("jvmStaticObjectFunction.kt") public void testJvmStaticObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); } @TestMetadata("jvmStaticObjectPropertyAccessors.kt") public void testJvmStaticObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); } @TestMetadata("objectPropertyAccessors.kt") public void testObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); } } } @@ -17117,128 +15217,112 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallBy extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCallBy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundExtensionFunction.kt") public void testBoundExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); } @TestMetadata("boundExtensionPropertyAcessor.kt") public void testBoundExtensionPropertyAcessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); } @TestMetadata("boundJvmStaticInObject.kt") public void testBoundJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); } @TestMetadata("defaultAndNonDefaultIntertwined.kt") public void testDefaultAndNonDefaultIntertwined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); } @TestMetadata("jvmStaticInCompanionObject.kt") public void testJvmStaticInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); } @TestMetadata("manyArgumentsNoneDefaultConstructor.kt") public void testManyArgumentsNoneDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); } @TestMetadata("manyArgumentsNoneDefaultFunction.kt") public void testManyArgumentsNoneDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); } @TestMetadata("manyArgumentsOnlyOneDefault.kt") public void testManyArgumentsOnlyOneDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); } @TestMetadata("manyMaskArguments.kt") public void testManyMaskArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); } @TestMetadata("nonDefaultParameterOmitted.kt") public void testNonDefaultParameterOmitted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); } @TestMetadata("nullValue.kt") public void testNullValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); } @TestMetadata("ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt") public void testOrdinaryMethodIsInvokedWhenNoDefaultValuesAreUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); } @TestMetadata("primitiveDefaultValues.kt") public void testPrimitiveDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunciton.kt") public void testSimpleMemberFunciton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); } @TestMetadata("simpleTopLevelFunction.kt") public void testSimpleTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); } } @@ -17246,50 +15330,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiterals extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClassLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationClassLiteral.kt") public void testAnnotationClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); } @TestMetadata("builtinClassLiterals.kt") public void testBuiltinClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); } @TestMetadata("genericArrays.kt") public void testGenericArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } @TestMetadata("reifiedTypeClassLiteral.kt") public void testReifiedTypeClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); } @TestMetadata("simpleClassLiteral.kt") public void testSimpleClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); } } @@ -17297,86 +15378,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classSimpleName.kt") public void testClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); } @TestMetadata("createInstance.kt") public void testCreateInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); } @TestMetadata("declaredMembers.kt") public void testDeclaredMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); } @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); } @TestMetadata("localClassSimpleName.kt") public void testLocalClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); } @TestMetadata("nestedClassesJava.kt") public void testNestedClassesJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); } @TestMetadata("objectInstance.kt") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); } @TestMetadata("qualifiedName.kt") public void testQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); } @TestMetadata("starProjectedType.kt") public void testStarProjectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); } } @@ -17384,38 +15456,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); } @TestMetadata("classesWithoutConstructors.kt") public void testClassesWithoutConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); } @TestMetadata("constructorName.kt") public void testConstructorName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); } @TestMetadata("simpleGetConstructors.kt") public void testSimpleGetConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); } } @@ -17423,80 +15494,72 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateAnnotation extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCreateAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationType.kt") public void testAnnotationType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); } @TestMetadata("arrayOfKClasses.kt") public void testArrayOfKClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); } @TestMetadata("callByJava.kt") public void testCallByJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); } @TestMetadata("callByKotlin.kt") public void testCallByKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); } @TestMetadata("callJava.kt") public void testCallJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); } @TestMetadata("callKotlin.kt") public void testCallKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); } @TestMetadata("createJdkAnnotationInstance.kt") public void testCreateJdkAnnotationInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); } @TestMetadata("enumKClassAnnotation.kt") public void testEnumKClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); } @TestMetadata("floatingPointParameters.kt") public void testFloatingPointParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); } @TestMetadata("parameterNamedEquals.kt") public void testParameterNamedEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); } @TestMetadata("primitivesAndArrays.kt") public void testPrimitivesAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); } } @@ -17504,152 +15567,132 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enclosing extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnclosing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectInInlinedLambda.kt") public void testAnonymousObjectInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); } @TestMetadata("classInLambda.kt") public void testClassInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); } @TestMetadata("functionExpressionInProperty.kt") public void testFunctionExpressionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); } @TestMetadata("kt11969.kt") public void testKt11969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); } @TestMetadata("kt6368.kt") public void testKt6368() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); } @TestMetadata("kt6691_lambdaInSamConstructor.kt") public void testKt6691_lambdaInSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); } @TestMetadata("lambdaInClassObject.kt") public void testLambdaInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); } @TestMetadata("lambdaInConstructor.kt") public void testLambdaInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); } @TestMetadata("lambdaInFunction.kt") public void testLambdaInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); } @TestMetadata("lambdaInLocalClassConstructor.kt") public void testLambdaInLocalClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); } @TestMetadata("lambdaInLocalClassSuperCall.kt") public void testLambdaInLocalClassSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); } @TestMetadata("lambdaInLocalFunction.kt") public void testLambdaInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); } @TestMetadata("lambdaInMemberFunction.kt") public void testLambdaInMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); } @TestMetadata("lambdaInMemberFunctionInLocalClass.kt") public void testLambdaInMemberFunctionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); } @TestMetadata("lambdaInMemberFunctionInNestedClass.kt") public void testLambdaInMemberFunctionInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); } @TestMetadata("lambdaInObjectDeclaration.kt") public void testLambdaInObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); } @TestMetadata("lambdaInObjectExpression.kt") public void testLambdaInObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); } @TestMetadata("lambdaInObjectLiteralSuperCall.kt") public void testLambdaInObjectLiteralSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); } @TestMetadata("lambdaInPackage.kt") public void testLambdaInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); } @TestMetadata("lambdaInPropertyGetter.kt") public void testLambdaInPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); } @TestMetadata("lambdaInPropertySetter.kt") public void testLambdaInPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); } @TestMetadata("localClassInTopLevelFunction.kt") public void testLocalClassInTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); } @TestMetadata("objectInLambda.kt") public void testObjectInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); } } @@ -17657,74 +15700,67 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("declaredVsInheritedFunctions.kt") public void testDeclaredVsInheritedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); } @TestMetadata("functionFromStdlib.kt") public void testFunctionFromStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); } @TestMetadata("functionReferenceErasedToKFunction.kt") public void testFunctionReferenceErasedToKFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); } @TestMetadata("genericOverriddenFunction.kt") public void testGenericOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); } @TestMetadata("instanceOfFunction.kt") public void testInstanceOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); } @TestMetadata("javaClassGetFunctions.kt") public void testJavaClassGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); } @TestMetadata("javaMethodsSmokeTest.kt") public void testJavaMethodsSmokeTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaMethodsSmokeTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/javaMethodsSmokeTest.kt"); } @TestMetadata("platformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/platformName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/platformName.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); } @TestMetadata("simpleGetFunctions.kt") public void testSimpleGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); } @TestMetadata("simpleNames.kt") public void testSimpleNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); } } @@ -17732,92 +15768,82 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericSignature extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenericSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); } @TestMetadata("defaultImplsGenericSignature.kt") public void testDefaultImplsGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); } @TestMetadata("functionLiteralGenericSignature.kt") public void testFunctionLiteralGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); } @TestMetadata("genericBackingFieldSignature.kt") public void testGenericBackingFieldSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); } @TestMetadata("genericMethodSignature.kt") public void testGenericMethodSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); } @TestMetadata("kt11121.kt") public void testKt11121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); } @TestMetadata("kt5112.kt") public void testKt5112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); } @TestMetadata("kt6106.kt") public void testKt6106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); } @TestMetadata("signatureOfDeepGenericInner.kt") public void testSignatureOfDeepGenericInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); } @TestMetadata("signatureOfDeepInner.kt") public void testSignatureOfDeepInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); } @TestMetadata("signatureOfDeepInnerLastGeneric.kt") public void testSignatureOfDeepInnerLastGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); } @TestMetadata("signatureOfGenericInnerGenericOuter.kt") public void testSignatureOfGenericInnerGenericOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); } @TestMetadata("signatureOfGenericInnerSimpleOuter.kt") public void testSignatureOfGenericInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); } @TestMetadata("signatureOfSimpleInnerSimpleOuter.kt") public void testSignatureOfSimpleInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); } } @@ -17825,14 +15851,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInstance extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIsInstance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("isInstanceCastAndSafeCast.kt") public void testIsInstanceCastAndSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); } } @@ -17840,62 +15869,57 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClassInAnnotation extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInKClassInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); } @TestMetadata("arrayInJava.kt") public void testArrayInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); } @TestMetadata("basicInJava.kt") public void testBasicInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); } @TestMetadata("forceWrapping.kt") public void testForceWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); } @TestMetadata("wrappingForCallableReferences.kt") public void testWrappingForCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); } } @@ -17903,14 +15927,17 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClasses extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLambdaClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("parameterNamesAndNullability.kt") public void testParameterNamesAndNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); } } @@ -17918,100 +15945,94 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mapping extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/functions.kt"); } @TestMetadata("inlineReifiedFun.kt") public void testInlineReifiedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); } @TestMetadata("mappedClassIsEqualToClassLiteral.kt") public void testMappedClassIsEqualToClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); } @TestMetadata("propertyAccessorsWithJvmName.kt") public void testPropertyAccessorsWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); } @TestMetadata("syntheticFields.kt") public void testSyntheticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); } @TestMetadata("topLevelFunctionOtherFile.kt") public void testTopLevelFunctionOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverrides extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFakeOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaFieldGetterSetter.kt") public void testJavaFieldGetterSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); } } @@ -18019,20 +16040,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObjectFunction.kt") public void testCompanionObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); } } @@ -18040,104 +16063,92 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationConstructorParameters.kt") public void testAnnotationConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); } @TestMetadata("genericArrayElementType.kt") public void testGenericArrayElementType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); } @TestMetadata("innerGenericTypeArgument.kt") public void testInnerGenericTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); } @TestMetadata("memberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); } @TestMetadata("overrideAnyWithPrimitive.kt") public void testOverrideAnyWithPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); } @TestMetadata("parameterizedTypeArgument.kt") public void testParameterizedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); } @TestMetadata("parameterizedTypes.kt") public void testParameterizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); } @TestMetadata("rawTypeArgument.kt") public void testRawTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/rawTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/rawTypeArgument.kt"); } @TestMetadata("supertypes.kt") public void testSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); } @TestMetadata("topLevelFunctions.kt") public void testTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); } } } @@ -18146,110 +16157,97 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReferencesEqualToCallablesFromAPI.kt") public void testCallableReferencesEqualToCallablesFromAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); } @TestMetadata("classToString.kt") public void testClassToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); } @TestMetadata("extensionPropertyReceiverToString.kt") public void testExtensionPropertyReceiverToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); } @TestMetadata("functionEqualsHashCode.kt") public void testFunctionEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); } @TestMetadata("functionFromStdlibMultiFileFacade.kt") public void testFunctionFromStdlibMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); } @TestMetadata("functionFromStdlibSingleFileFacade.kt") public void testFunctionFromStdlibSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); } @TestMetadata("functionToString.kt") public void testFunctionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); } @TestMetadata("memberExtensionToString.kt") public void testMemberExtensionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); } @TestMetadata("parametersEqualsHashCode.kt") public void testParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); } @TestMetadata("parametersToString.kt") public void testParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); } @TestMetadata("propertyEqualsHashCode.kt") public void testPropertyEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); } @TestMetadata("propertyToString.kt") public void testPropertyToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); } @TestMetadata("typeEqualsHashCode.kt") public void testTypeEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); } @TestMetadata("typeParametersEqualsHashCode.kt") public void testTypeParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); } @TestMetadata("typeParametersToString.kt") public void testTypeParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); } @TestMetadata("typeToString.kt") public void testTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); } @TestMetadata("typeToStringInnerGeneric.kt") public void testTypeToStringInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); } } @@ -18257,62 +16255,57 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableModality.kt") public void testCallableModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); } @TestMetadata("callableVisibility.kt") public void testCallableVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); } @TestMetadata("classModality.kt") public void testClassModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); } @TestMetadata("classVisibility.kt") public void testClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); } @TestMetadata("javaVisibility.kt") public void testJavaVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); } } @@ -18320,26 +16313,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callFunctionsInMultifileClass.kt") public void testCallFunctionsInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); } @TestMetadata("callPropertiesInMultifileClass.kt") public void testCallPropertiesInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); } @TestMetadata("javaFieldForVarAndConstVal.kt") public void testJavaFieldForVarAndConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); } } @@ -18347,76 +16341,74 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoReflectAtRuntime extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); } @TestMetadata("primitiveJavaClass.kt") public void testPrimitiveJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); } @TestMetadata("propertyGetSetName.kt") public void testPropertyGetSetName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); } @TestMetadata("propertyInstanceof.kt") public void testPropertyInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); } @TestMetadata("reifiedTypeJavaClass.kt") public void testReifiedTypeJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); } @TestMetadata("simpleClassLiterals.kt") public void testSimpleClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); } } } @@ -18425,74 +16417,67 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundInnerClassConstructor.kt") public void testBoundInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); } @TestMetadata("boundObjectMemberReferences.kt") public void testBoundObjectMemberReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); } @TestMetadata("boundReferences.kt") public void testBoundReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); } @TestMetadata("findParameterByName.kt") public void testFindParameterByName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); } @TestMetadata("functionParameterNameAndIndex.kt") public void testFunctionParameterNameAndIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); } @TestMetadata("instanceExtensionReceiverAndValueParameters.kt") public void testInstanceExtensionReceiverAndValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); } @TestMetadata("isMarkedNullable.kt") public void testIsMarkedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); } @TestMetadata("isOptional.kt") public void testIsOptional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); } @TestMetadata("javaAnnotationConstructor.kt") public void testJavaAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); } @TestMetadata("kinds.kt") public void testKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } } @@ -18500,192 +16485,170 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("allVsDeclared.kt") public void testAllVsDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); } @TestMetadata("callPrivatePropertyFromGetProperties.kt") public void testCallPrivatePropertyFromGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); } @TestMetadata("declaredVsInheritedProperties.kt") public void testDeclaredVsInheritedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); } @TestMetadata("genericClassLiteralPropertyReceiverIsStar.kt") public void testGenericClassLiteralPropertyReceiverIsStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); } @TestMetadata("genericOverriddenProperty.kt") public void testGenericOverriddenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); } @TestMetadata("getExtensionPropertiesMutableVsReadonly.kt") public void testGetExtensionPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); } @TestMetadata("getPropertiesMutableVsReadonly.kt") public void testGetPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); } @TestMetadata("invokeKProperty.kt") public void testInvokeKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); } @TestMetadata("javaPropertyInheritedInKotlin.kt") public void testJavaPropertyInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); } @TestMetadata("javaStaticField.kt") public void testJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); } @TestMetadata("kotlinPropertyInheritedInJava.kt") public void testKotlinPropertyInheritedInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); } @TestMetadata("memberAndMemberExtensionWithSameName.kt") public void testMemberAndMemberExtensionWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); } @TestMetadata("mutatePrivateJavaInstanceField.kt") public void testMutatePrivateJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); } @TestMetadata("mutatePrivateJavaStaticField.kt") public void testMutatePrivateJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); } @TestMetadata("noConflictOnKotlinGetterAndJavaField.kt") public void testNoConflictOnKotlinGetterAndJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); } @TestMetadata("overrideKotlinPropertyByJavaMethod.kt") public void testOverrideKotlinPropertyByJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); } @TestMetadata("privateClassVal.kt") public void testPrivateClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); } @TestMetadata("privateClassVar.kt") public void testPrivateClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); } @TestMetadata("privateFakeOverrideFromSuperclass.kt") public void testPrivateFakeOverrideFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); } @TestMetadata("privateJvmStaticVarInObject.kt") public void testPrivateJvmStaticVarInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); } @TestMetadata("privatePropertyCallIsAccessibleOnAccessors.kt") public void testPrivatePropertyCallIsAccessibleOnAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); } @TestMetadata("privateToThisAccessors.kt") public void testPrivateToThisAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); } @TestMetadata("propertyOfNestedClassAndArrayType.kt") public void testPropertyOfNestedClassAndArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); } @TestMetadata("publicClassValAccessible.kt") public void testPublicClassValAccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); } @TestMetadata("referenceToJavaFieldOfKotlinSubclass.kt") public void testReferenceToJavaFieldOfKotlinSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); } @TestMetadata("simpleGetProperties.kt") public void testSimpleGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); } public void testAllFilesPresentInAccessors() throws Exception { @@ -18694,26 +16657,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); } @TestMetadata("memberExtensions.kt") public void testMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); } @TestMetadata("topLevelPropertyAccessors.kt") public void testTopLevelPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); } } @@ -18721,98 +16680,87 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GetDelegate extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGetDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("booleanPropertyNameStartsWithIs.kt") public void testBooleanPropertyNameStartsWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); } @TestMetadata("boundExtensionProperty.kt") public void testBoundExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); } @TestMetadata("boundMemberProperty.kt") public void testBoundMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); } @TestMetadata("getExtensionDelegate.kt") public void testGetExtensionDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); } @TestMetadata("kPropertyForDelegatedProperty.kt") public void testKPropertyForDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); } @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); } @TestMetadata("nameClashClassAndCompanion.kt") public void testNameClashClassAndCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); } @TestMetadata("nameClashExtensionProperties.kt") public void testNameClashExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); } @TestMetadata("noSetAccessibleTrue.kt") public void testNoSetAccessibleTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); } @TestMetadata("notDelegatedProperty.kt") public void testNotDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); } @TestMetadata("overrideDelegatedByDelegated.kt") public void testOverrideDelegatedByDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); } } @@ -18820,38 +16768,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalDelegated extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalDelegated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/defaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/defaultImpls.kt"); } @TestMetadata("inlineFun.kt") public void testInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/inlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/inlineFun.kt"); } @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/localDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/localDelegatedProperty.kt"); } @TestMetadata("multiFileClass.kt") public void testMultiFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/multiFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/multiFileClass.kt"); } @TestMetadata("variableOfGenericType.kt") public void testVariableOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/variableOfGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/variableOfGenericType.kt"); } } } @@ -18862,8 +16809,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public static class SpecialBuiltIns extends AbstractBlackBoxCodegenTest { @TestMetadata("getMembersOfStandardJavaClasses.kt") public void ignoreGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInSpecialBuiltIns() throws Exception { @@ -18875,38 +16825,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Supertypes extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSupertypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("builtInClassSupertypes.kt") public void testBuiltInClassSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); } @TestMetadata("genericSubstitution.kt") public void testGenericSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); } @TestMetadata("isSubclassOfIsSuperclassOf.kt") public void testIsSubclassOfIsSuperclassOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); } @TestMetadata("simpleSupertypes.kt") public void testSimpleSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); } } @@ -18914,26 +16863,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("declarationSiteVariance.kt") public void testDeclarationSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); } @TestMetadata("typeParametersAndNames.kt") public void testTypeParametersAndNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); } @TestMetadata("upperBounds.kt") public void testUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); } } @@ -18941,118 +16891,109 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classifierIsClass.kt") public void testClassifierIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); } @TestMetadata("classifierIsTypeParameter.kt") public void testClassifierIsTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); } @TestMetadata("classifiersOfBuiltInTypes.kt") public void testClassifiersOfBuiltInTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); } @TestMetadata("innerGenericArguments.kt") public void testInnerGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); } @TestMetadata("jvmErasureOfClass.kt") public void testJvmErasureOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); } @TestMetadata("jvmErasureOfTypeParameter.kt") public void testJvmErasureOfTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); } @TestMetadata("platformTypeClassifier.kt") public void testPlatformTypeClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeClassifier.kt"); } @TestMetadata("platformTypeNotEqualToKotlinType.kt") public void testPlatformTypeNotEqualToKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); } @TestMetadata("platformTypeToString.kt") public void testPlatformTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeToString.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); } @TestMetadata("useSiteVariance.kt") public void testUseSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/withNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/withNullability.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateType extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCreateType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("equality.kt") public void testEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); } @TestMetadata("simpleCreateType.kt") public void testSimpleCreateType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); } @TestMetadata("wrongNumberOfArguments.kt") public void testWrongNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); } } @@ -19060,32 +17001,32 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Subtyping extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSubtyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("platformType.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); } @TestMetadata("simpleGenericTypes.kt") public void testSimpleGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); } @TestMetadata("simpleSubtypeSupertype.kt") public void testSimpleSubtypeSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); } @TestMetadata("typeProjection.kt") public void testTypeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); } } } @@ -19095,530 +17036,447 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("approximateIntersectionType.kt") public void testApproximateIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); } @TestMetadata("arrayLengthNPE.kt") public void testArrayLengthNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/collections.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/collections.kt"); } @TestMetadata("commonSupertypeContravariant.kt") public void testCommonSupertypeContravariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); } @TestMetadata("commonSupertypeContravariant2.kt") public void testCommonSupertypeContravariant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); } @TestMetadata("dontCaptureTypesWithTypeVariables.kt") public void testDontCaptureTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); } @TestMetadata("doubleMerge.kt") public void testDoubleMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/doubleMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/doubleMerge.kt"); } @TestMetadata("floatMerge.kt") public void testFloatMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/floatMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/floatMerge.kt"); } @TestMetadata("functionLiteralAsLastExpressionInBlock.kt") public void testFunctionLiteralAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/generic.kt"); } @TestMetadata("getGenericInterfaces.kt") public void testGetGenericInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); } @TestMetadata("hashCodeNPE.kt") public void testHashCodeNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); } @TestMetadata("internalTopLevelOtherPackage.kt") public void testInternalTopLevelOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); } @TestMetadata("intersectionAsLastLambda.kt") public void testIntersectionAsLastLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); } @TestMetadata("intersectionOfEqualTypes.kt") public void testIntersectionOfEqualTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); } @TestMetadata("kt10143.kt") public void testKt10143() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10143.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10143.kt"); } @TestMetadata("kt10934.kt") public void testKt10934() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10934.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10934.kt"); } @TestMetadata("Kt1149.kt") public void testKt1149() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1149.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1149.kt"); } @TestMetadata("kt1172.kt") public void testKt1172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1172.kt"); } @TestMetadata("kt1202.kt") public void testKt1202() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1202.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1202.kt"); } @TestMetadata("kt13381.kt") public void testKt13381() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt13381.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt13381.kt"); } @TestMetadata("kt1406.kt") public void testKt1406() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1406.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1406.kt"); } @TestMetadata("kt14447.kt") public void testKt14447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt14447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt14447.kt"); } @TestMetadata("kt1515.kt") public void testKt1515() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1515.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1515.kt"); } @TestMetadata("kt15196.kt") public void testKt15196() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt15196.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt15196.kt"); } @TestMetadata("kt1528.kt") public void testKt1528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1528.kt"); } @TestMetadata("kt1568.kt") public void testKt1568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1568.kt"); } @TestMetadata("Kt1619Test.kt") public void testKt1619Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); } @TestMetadata("kt1779.kt") public void testKt1779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1779.kt"); } @TestMetadata("kt1800.kt") public void testKt1800() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1800.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1800.kt"); } @TestMetadata("kt1845.kt") public void testKt1845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1845.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1845.kt"); } @TestMetadata("kt18779.kt") public void testKt18779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt18779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt18779.kt"); } @TestMetadata("kt1932.kt") public void testKt1932() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1932.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1932.kt"); } @TestMetadata("kt2017.kt") public void testKt2017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2017.kt"); } @TestMetadata("kt2060.kt") public void testKt2060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2060.kt"); } @TestMetadata("kt2210.kt") public void testKt2210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2210.kt"); } @TestMetadata("kt2246.kt") public void testKt2246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2246.kt"); } @TestMetadata("kt2318.kt") public void testKt2318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2318.kt"); } @TestMetadata("Kt2495Test.kt") public void testKt2495Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); } @TestMetadata("kt2509.kt") public void testKt2509() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2509.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2509.kt"); } @TestMetadata("kt2593.kt") public void testKt2593() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2593.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2593.kt"); } @TestMetadata("kt274.kt") public void testKt274() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt274.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt274.kt"); } @TestMetadata("kt3046.kt") public void testKt3046() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3046.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3046.kt"); } @TestMetadata("kt3107.kt") public void testKt3107() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3107.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3107.kt"); } @TestMetadata("kt3421.kt") public void testKt3421() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3421.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3421.kt"); } @TestMetadata("kt344.kt") public void testKt344() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt344.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt344.kt"); } @TestMetadata("kt3442.kt") public void testKt3442() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3442.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3442.kt"); } @TestMetadata("kt3587.kt") public void testKt3587() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3587.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3587.kt"); } @TestMetadata("kt3850.kt") public void testKt3850() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3850.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3850.kt"); } @TestMetadata("kt3903.kt") public void testKt3903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3903.kt"); } @TestMetadata("kt4142.kt") public void testKt4142() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4142.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4142.kt"); } @TestMetadata("kt4259.kt") public void testKt4259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4259.kt"); } @TestMetadata("kt4262.kt") public void testKt4262() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4262.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4262.kt"); } @TestMetadata("kt4281.kt") public void testKt4281() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4281.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4281.kt"); } @TestMetadata("kt5056.kt") public void testKt5056() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5056.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5056.kt"); } @TestMetadata("kt528.kt") public void testKt528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt528.kt"); } @TestMetadata("kt529.kt") public void testKt529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt529.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt529.kt"); } @TestMetadata("kt533.kt") public void testKt533() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt533.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt533.kt"); } @TestMetadata("kt5395.kt") public void testKt5395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5395.kt"); } @TestMetadata("kt5445.kt") public void testKt5445() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5445.kt"); } @TestMetadata("kt5445_2.kt") public void testKt5445_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5445_2.kt"); } @TestMetadata("kt5786_privateWithDefault.kt") public void testKt5786_privateWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); } @TestMetadata("kt5953.kt") public void testKt5953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5953.kt"); } @TestMetadata("kt6153.kt") public void testKt6153() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6153.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6153.kt"); } @TestMetadata("kt6434.kt") public void testKt6434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434.kt"); } @TestMetadata("kt6434_2.kt") public void testKt6434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434_2.kt"); } @TestMetadata("kt6485.kt") public void testKt6485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6485.kt"); } @TestMetadata("kt715.kt") public void testKt715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt715.kt"); } @TestMetadata("kt7401.kt") public void testKt7401() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt7401.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt7401.kt"); } @TestMetadata("kt789.kt") public void testKt789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt789.kt"); } @TestMetadata("kt864.kt") public void testKt864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt864.kt"); } @TestMetadata("kt998.kt") public void testKt998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt998.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt998.kt"); } @TestMetadata("lambdaAsLastExpressionInLambda.kt") public void testLambdaAsLastExpressionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); } @TestMetadata("lambdaPostponeConstruction.kt") public void testLambdaPostponeConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); } @TestMetadata("lambdaWrongReturnType.kt") public void testLambdaWrongReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); } @TestMetadata("nestedIntersection.kt") public void testNestedIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); } @TestMetadata("noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt") public void testNoAssertionsWhenNullableTypeParameterReplacedWithIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); } @TestMetadata("noCapturingForTypesWithTypeVariables.kt") public void testNoCapturingForTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); } @TestMetadata("noResolutionRecursion.kt") public void testNoResolutionRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); } @TestMetadata("nullabilityForCommonCapturedSupertypes.kt") public void testNullabilityForCommonCapturedSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); } @TestMetadata("nullableAfterExclExcl.kt") public void testNullableAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); } @TestMetadata("objectCaptureOuterConstructorProperty.kt") public void testObjectCaptureOuterConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); } @TestMetadata("objectInsideDelegation.kt") public void testObjectInsideDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); } @TestMetadata("referenceToSelfInLocal.kt") public void testReferenceToSelfInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); } @TestMetadata("resolvedCallForGetOperator.kt") public void testResolvedCallForGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); } @TestMetadata("supertypeDepth.kt") public void testSupertypeDepth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); } @TestMetadata("typeCastException.kt") public void testTypeCastException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/typeCastException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/typeCastException.kt"); } } @@ -19626,232 +17484,204 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObject.kt"); } @TestMetadata("anonymousObjectNoPropagate.kt") public void testAnonymousObjectNoPropagate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); } @TestMetadata("anonymousObjectReifiedSupertype.kt") public void testAnonymousObjectReifiedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); } @TestMetadata("approximateCapturedTypes.kt") public void testApproximateCapturedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); } @TestMetadata("asOnPlatformType.kt") public void testAsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/checkcast.kt"); } @TestMetadata("copyToArray.kt") public void testCopyToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/copyToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/copyToArray.kt"); } @TestMetadata("DIExample.kt") public void testDIExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/DIExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/DIExample.kt"); } @TestMetadata("defaultJavaClass.kt") public void testDefaultJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); } @TestMetadata("expectedTypeFromCast.kt") public void testExpectedTypeFromCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); } @TestMetadata("filterIsInstance.kt") public void testFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/filterIsInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/filterIsInstance.kt"); } @TestMetadata("innerAnonymousObject.kt") public void testInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); } @TestMetadata("instanceof.kt") public void testInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/instanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } @TestMetadata("isOnPlatformType.kt") public void testIsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/javaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nestedReified.kt"); } @TestMetadata("nestedReifiedSignature.kt") public void testNestedReifiedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); } @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/newArrayInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); } @TestMetadata("nonInlineableLambdaInReifiedFunction.kt") public void testNonInlineableLambdaInReifiedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); } @TestMetadata("recursiveInnerAnonymousObject.kt") public void testRecursiveInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); } @TestMetadata("recursiveNewArray.kt") public void testRecursiveNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); } @TestMetadata("recursiveNonInlineableLambda.kt") public void testRecursiveNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); } @TestMetadata("reifiedChain.kt") public void testReifiedChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedChain.kt"); } @TestMetadata("reifiedInlineFunOfObject.kt") public void testReifiedInlineFunOfObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); } @TestMetadata("reifiedInlineFunOfObjectWithinReified.kt") public void testReifiedInlineFunOfObjectWithinReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); } @TestMetadata("reifiedInlineIntoNonInlineableLambda.kt") public void testReifiedInlineIntoNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); } @TestMetadata("safecast.kt") public void testSafecast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/safecast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/safecast.kt"); } @TestMetadata("sameIndexRecursive.kt") public void testSameIndexRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); } @TestMetadata("spreads.kt") public void testSpreads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/spreads.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/spreads.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/varargs.kt"); } @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArraysReification extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArraysReification() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("instanceOf.kt") public void testInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); } @TestMetadata("instanceOfArrays.kt") public void testInstanceOfArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); } @TestMetadata("jClass.kt") public void testJClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); } @TestMetadata("jaggedArray.kt") public void testJaggedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); } @TestMetadata("jaggedArrayOfNulls.kt") public void testJaggedArrayOfNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); } @TestMetadata("jaggedDeep.kt") public void testJaggedDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); } } } @@ -19860,86 +17690,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/genericNull.kt"); } @TestMetadata("kt1572.kt") public void testKt1572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt1572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt1572.kt"); } @TestMetadata("kt232.kt") public void testKt232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt232.kt"); } @TestMetadata("kt245.kt") public void testKt245() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt245.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt245.kt"); } @TestMetadata("kt247.kt") public void testKt247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt247.kt"); } @TestMetadata("kt3430.kt") public void testKt3430() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt3430.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt3430.kt"); } @TestMetadata("kt4733.kt") public void testKt4733() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt4733.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt4733.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitive.kt"); } @TestMetadata("primitiveEqSafeCall.kt") public void testPrimitiveEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); } @TestMetadata("primitiveNotEqSafeCall.kt") public void testPrimitiveNotEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); } @TestMetadata("safeCallEqPrimitive.kt") public void testSafeCallEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); } @TestMetadata("safeCallNotEqPrimitive.kt") public void testSafeCallNotEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); } @TestMetadata("safeCallOnLong.kt") public void testSafeCallOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); } } @@ -19947,136 +17768,124 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091.kt"); } @TestMetadata("kt17091_2.kt") public void testKt17091_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_2.kt"); } @TestMetadata("kt17091_3.kt") public void testKt17091_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_3.kt"); } @TestMetadata("kt17091_4.kt") public void testKt17091_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_4.kt"); } @TestMetadata("kt22906.kt") public void testKt22906() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt22906.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt22906.kt"); } @TestMetadata("kt22906_2.kt") public void testKt22906_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt22906_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt22906_2.kt"); } @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparator.kt") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/comparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/comparator.kt"); } @TestMetadata("filenameFilter.kt") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); } @TestMetadata("kt19251.kt") public void testKt19251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/kt19251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/kt19251.kt"); } @TestMetadata("kt19251_child.kt") public void testKt19251_child() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/kt19251_child.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/kt19251_child.kt"); } @TestMetadata("nonLiteralComparator.kt") public void testNonLiteralComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); } @TestMetadata("nonLiteralFilenameFilter.kt") public void testNonLiteralFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); } @TestMetadata("nonLiteralRunnable.kt") public void testNonLiteralRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt"); } @TestMetadata("nonTrivialRunnable.kt") public void testNonTrivialRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt"); } @TestMetadata("runnable.kt") public void testRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnable.kt"); } @TestMetadata("runnableAccessingClosure1.kt") public void testRunnableAccessingClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt"); } @TestMetadata("runnableAccessingClosure2.kt") public void testRunnableAccessingClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt"); } @TestMetadata("samWrappersDifferentFiles.kt") public void testSamWrappersDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); } @TestMetadata("sameWrapperClass.kt") public void testSameWrapperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); } @TestMetadata("syntheticVsReal.kt") public void testSyntheticVsReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt"); } } } @@ -20085,20 +17894,22 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/objects.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/simple.kt"); } } @@ -20106,16 +17917,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); } @TestMetadata("accessToNestedObject.kt") public void testAccessToNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); } public void testAllFilesPresentInSecondaryConstructors() throws Exception { @@ -20124,176 +17937,147 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("basicNoPrimaryManySinks.kt") public void testBasicNoPrimaryManySinks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); } @TestMetadata("basicNoPrimaryOneSink.kt") public void testBasicNoPrimaryOneSink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); } @TestMetadata("basicPrimary.kt") public void testBasicPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); } @TestMetadata("callFromLocalSubClass.kt") public void testCallFromLocalSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); } @TestMetadata("callFromPrimaryWithNamedArgs.kt") public void testCallFromPrimaryWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); } @TestMetadata("callFromPrimaryWithOptionalArgs.kt") public void testCallFromPrimaryWithOptionalArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); } @TestMetadata("callFromSubClass.kt") public void testCallFromSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); } @TestMetadata("clashingDefaultConstructors.kt") public void testClashingDefaultConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); } @TestMetadata("defaultParametersNotDuplicated.kt") public void testDefaultParametersNotDuplicated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); } @TestMetadata("delegateWithComplexExpression.kt") public void testDelegateWithComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); } @TestMetadata("delegatedThisWithLambda.kt") public void testDelegatedThisWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); } @TestMetadata("delegationWithPrimary.kt") public void testDelegationWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); } @TestMetadata("innerClassesInheritance.kt") public void testInnerClassesInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); } @TestMetadata("superCallPrimary.kt") public void testSuperCallPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); } @TestMetadata("superCallSecondary.kt") public void testSuperCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); } @TestMetadata("withGenerics.kt") public void testWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withGenerics.kt"); } @TestMetadata("withNonLocalReturn.kt") public void testWithNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); } @TestMetadata("withPrimary.kt") public void testWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withPrimary.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); } @TestMetadata("withReturnUnit.kt") public void testWithReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withVarargs.kt"); } @TestMetadata("withoutPrimary.kt") public void testWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withoutPrimary.kt"); } } @@ -20301,86 +18085,77 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultAndNamedCombination.kt") public void testDefaultAndNamedCombination() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt"); } @TestMetadata("defaultBoxTypes.kt") public void testDefaultBoxTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt"); } @TestMetadata("defaultEnumType.kt") public void testDefaultEnumType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt"); } @TestMetadata("defaultLongLiteral.kt") public void testDefaultLongLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt"); } @TestMetadata("defaultMultipleParams.kt") public void testDefaultMultipleParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt"); } @TestMetadata("defaultNull.kt") public void testDefaultNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt"); } @TestMetadata("defaultNullableBoxTypes.kt") public void testDefaultNullableBoxTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt"); } @TestMetadata("defaultOverrides.kt") public void testDefaultOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt"); } @TestMetadata("defaultPrimitiveTypes.kt") public void testDefaultPrimitiveTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt"); } @TestMetadata("defaultValueInConstructor.kt") public void testDefaultValueInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt"); } @TestMetadata("defaultWithJavaBase.kt") public void testDefaultWithJavaBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt"); } @TestMetadata("defaultWithKotlinBase.kt") public void testDefaultWithKotlinBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt"); } @TestMetadata("reorderedParameterNames.kt") public void testReorderedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt"); } } @@ -20388,26 +18163,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("chainCalls.kt") public void testChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/chainCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/chainCalls.kt"); } @TestMetadata("infixCalls.kt") public void testInfixCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/infixCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/infixCalls.kt"); } @TestMetadata("simpleCallWithParams.kt") public void testSimpleCallWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/simpleCallWithParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/simpleCallWithParams.kt"); } } @@ -20415,98 +18191,87 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("falseSmartCast.kt") public void testFalseSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); } @TestMetadata("genericIntersection.kt") public void testGenericIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); } @TestMetadata("genericSet.kt") public void testGenericSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericSet.kt"); } @TestMetadata("implicitExtensionReceiver.kt") public void testImplicitExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); } @TestMetadata("implicitMemberReceiver.kt") public void testImplicitMemberReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); } @TestMetadata("implicitReceiverInWhen.kt") public void testImplicitReceiverInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); } @TestMetadata("implicitToGrandSon.kt") public void testImplicitToGrandSon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt17725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt17725.kt"); } @TestMetadata("kt19058.kt") public void testKt19058() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19058.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19058.kt"); } @TestMetadata("kt19100.kt") public void testKt19100() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19100.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19100.kt"); } @TestMetadata("lambdaArgumentWithoutType.kt") public void testLambdaArgumentWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); } @TestMetadata("nullSmartCast.kt") public void testNullSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); } @TestMetadata("smartCastInsideIf.kt") public void testSmartCastInsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); } @TestMetadata("whenSmartCast.kt") public void testWhenSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); } } @@ -20514,152 +18279,132 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltins extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bridgeNotEmptyMap.kt") public void testBridgeNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); } @TestMetadata("bridges.kt") public void testBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); } @TestMetadata("commonBridgesTarget.kt") public void testCommonBridgesTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); } @TestMetadata("emptyMap.kt") public void testEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); } @TestMetadata("emptyStringMap.kt") public void testEmptyStringMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); } @TestMetadata("entrySetSOE.kt") public void testEntrySetSOE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); } @TestMetadata("enumAsOrdinaled.kt") public void testEnumAsOrdinaled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); } @TestMetadata("exceptionCause.kt") public void testExceptionCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); } @TestMetadata("explicitSuperCall.kt") public void testExplicitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); } @TestMetadata("irrelevantRemoveAtOverride.kt") public void testIrrelevantRemoveAtOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); } @TestMetadata("maps.kt") public void testMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/maps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/maps.kt"); } @TestMetadata("noSpecialBridgeInSuperClass.kt") public void testNoSpecialBridgeInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); } @TestMetadata("notEmptyListAny.kt") public void testNotEmptyListAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); } @TestMetadata("notEmptyMap.kt") public void testNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); } @TestMetadata("redundantStubForSize.kt") public void testRedundantStubForSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); } @TestMetadata("removeAtTwoSpecialBridges.kt") public void testRemoveAtTwoSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); } @TestMetadata("removeSetInt.kt") public void testRemoveSetInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); } @TestMetadata("throwableCause.kt") public void testThrowableCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); } @TestMetadata("throwableImpl.kt") public void testThrowableImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); } @TestMetadata("throwableImplWithSecondaryConstructor.kt") public void testThrowableImplWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); } @TestMetadata("valuesInsideEnum.kt") public void testValuesInsideEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); } } @@ -20667,104 +18412,92 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousInitializerIObject.kt") public void testAnonymousInitializerIObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); } @TestMetadata("anonymousInitializerInClassObject.kt") public void testAnonymousInitializerInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); } @TestMetadata("fields.kt") public void testFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/fields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/fields.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/functions.kt"); } @TestMetadata("hidePrivateByPublic.kt") public void testHidePrivateByPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); } @TestMetadata("incInClassObject.kt") public void testIncInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInClassObject.kt"); } @TestMetadata("incInObject.kt") public void testIncInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInObject.kt"); } @TestMetadata("inheritedPropertyInClassObject.kt") public void testInheritedPropertyInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); } @TestMetadata("inheritedPropertyInObject.kt") public void testInheritedPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); } @TestMetadata("inlineCallsStaticMethod.kt") public void testInlineCallsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); } @TestMetadata("kt8089.kt") public void testKt8089() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/kt8089.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/kt8089.kt"); } @TestMetadata("protectedSamConstructor.kt") public void testProtectedSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); } @TestMetadata("protectedStatic.kt") public void testProtectedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStatic.kt"); } @TestMetadata("protectedStatic2.kt") public void testProtectedStatic2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStatic2.kt"); } @TestMetadata("protectedStaticAndInline.kt") public void testProtectedStaticAndInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); } } @@ -20772,38 +18505,37 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StoreStackBeforeInline extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); } @TestMetadata("primitiveMerge.kt") public void testPrimitiveMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); } @TestMetadata("unreachableMarker.kt") public void testUnreachableMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); } @TestMetadata("withLambda.kt") public void testWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); } } @@ -20811,116 +18543,102 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Strings extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStrings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); } @TestMetadata("ea35743.kt") public void testEa35743() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/ea35743.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/ea35743.kt"); } @TestMetadata("forInString.kt") public void testForInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/forInString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/forInString.kt"); } @TestMetadata("interpolation.kt") public void testInterpolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/interpolation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/interpolation.kt"); } @TestMetadata("kt2592.kt") public void testKt2592() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt2592.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt2592.kt"); } @TestMetadata("kt3571.kt") public void testKt3571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3571.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3571.kt"); } @TestMetadata("kt3652.kt") public void testKt3652() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3652.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3652.kt"); } @TestMetadata("kt5389_stringBuilderGet.kt") public void testKt5389_stringBuilderGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); } @TestMetadata("kt5956.kt") public void testKt5956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5956.kt"); } @TestMetadata("kt881.kt") public void testKt881() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt881.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt881.kt"); } @TestMetadata("kt889.kt") public void testKt889() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt889.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt889.kt"); } @TestMetadata("kt894.kt") public void testKt894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt894.kt"); } @TestMetadata("multilineStringsWithTemplates.kt") public void testMultilineStringsWithTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); } @TestMetadata("nestedConcat.kt") public void testNestedConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/nestedConcat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/nestedConcat.kt"); } @TestMetadata("rawStrings.kt") public void testRawStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStrings.kt"); } @TestMetadata("rawStringsWithManyQuotes.kt") public void testRawStringsWithManyQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); } @TestMetadata("stringBuilderAppend.kt") public void testStringBuilderAppend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); } @TestMetadata("stringPlusOnlyWorksOnString.kt") public void testStringPlusOnlyWorksOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); } } @@ -20928,220 +18646,194 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("basicmethodSuperClass.kt") public void testBasicmethodSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); } @TestMetadata("basicmethodSuperTrait.kt") public void testBasicmethodSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); } @TestMetadata("basicproperty.kt") public void testBasicproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicproperty.kt"); } @TestMetadata("enclosedFun.kt") public void testEnclosedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedFun.kt"); } @TestMetadata("enclosedVar.kt") public void testEnclosedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedVar.kt"); } @TestMetadata("innerClassLabeledSuper.kt") public void testInnerClassLabeledSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); } @TestMetadata("innerClassLabeledSuper2.kt") public void testInnerClassLabeledSuper2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); } @TestMetadata("innerClassLabeledSuperProperty.kt") public void testInnerClassLabeledSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); } @TestMetadata("innerClassLabeledSuperProperty2.kt") public void testInnerClassLabeledSuperProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); } @TestMetadata("innerClassQualifiedFunctionCall.kt") public void testInnerClassQualifiedFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); } @TestMetadata("innerClassQualifiedPropertyAccess.kt") public void testInnerClassQualifiedPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); } @TestMetadata("kt14243.kt") public void testKt14243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243.kt"); } @TestMetadata("kt14243_2.kt") public void testKt14243_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_2.kt"); } @TestMetadata("kt14243_class.kt") public void testKt14243_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_class.kt"); } @TestMetadata("kt14243_prop.kt") public void testKt14243_prop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_prop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_prop.kt"); } @TestMetadata("kt3492ClassFun.kt") public void testKt3492ClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); } @TestMetadata("kt3492ClassProperty.kt") public void testKt3492ClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); } @TestMetadata("kt3492TraitFun.kt") public void testKt3492TraitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); } @TestMetadata("kt3492TraitProperty.kt") public void testKt3492TraitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); } @TestMetadata("kt4173.kt") public void testKt4173() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173.kt"); } @TestMetadata("kt4173_2.kt") public void testKt4173_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_2.kt"); } @TestMetadata("kt4173_3.kt") public void testKt4173_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_3.kt"); } @TestMetadata("kt4982.kt") public void testKt4982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4982.kt"); } @TestMetadata("multipleSuperTraits.kt") public void testMultipleSuperTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); } @TestMetadata("traitproperty.kt") public void testTraitproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/traitproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/traitproperty.kt"); } @TestMetadata("unqualifiedSuper.kt") public void testUnqualifiedSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); } @TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt") public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); } @TestMetadata("unqualifiedSuperWithMethodsOfAny.kt") public void testUnqualifiedSuperWithMethodsOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); } @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructor extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt17464_arrayOf.kt") public void testKt17464_arrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); } @TestMetadata("kt17464_linkedMapOf.kt") public void testKt17464_linkedMapOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); } @TestMetadata("kt18356.kt") public void testKt18356() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); } @TestMetadata("kt18356_2.kt") public void testKt18356_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); } @TestMetadata("objectExtendsLocalInner.kt") public void testObjectExtendsLocalInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); } } } @@ -21150,74 +18842,67 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Synchronized extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSynchronized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("changeMonitor.kt") public void testChangeMonitor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); } @TestMetadata("exceptionInMonitorExpression.kt") public void testExceptionInMonitorExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/finally.kt"); } @TestMetadata("longValue.kt") public void testLongValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/longValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/longValue.kt"); } @TestMetadata("nestedDifferentObjects.kt") public void testNestedDifferentObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); } @TestMetadata("nestedSameObject.kt") public void testNestedSameObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); } @TestMetadata("objectValue.kt") public void testObjectValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/objectValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/objectValue.kt"); } @TestMetadata("sync.kt") public void testSync() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/sync.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/sync.kt"); } @TestMetadata("value.kt") public void testValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/value.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/value.kt"); } @TestMetadata("wait.kt") public void testWait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/wait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/wait.kt"); } } @@ -21225,34 +18910,33 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorForGenericConstructor.kt") public void testAccessorForGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); } @TestMetadata("accessorForGenericMethod.kt") public void testAccessorForGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); } @TestMetadata("accessorForGenericMethodWithDefaults.kt") public void testAccessorForGenericMethodWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); } @TestMetadata("accessorForProtected.kt") public void testAccessorForProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); } @TestMetadata("accessorForProtectedInvokeVirtual.kt") public void testAccessorForProtectedInvokeVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); } public void testAllFilesPresentInSyntheticAccessors() throws Exception { @@ -21261,62 +18945,52 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("jvmNameForAccessors.kt") public void testJvmNameForAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); } @TestMetadata("kt10047.kt") public void testKt10047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); } @TestMetadata("kt21258_indirect.kt") public void testKt21258_indirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); } @TestMetadata("kt21258_simple.kt") public void testKt21258_simple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); } @TestMetadata("kt9717.kt") public void testKt9717() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); } @TestMetadata("kt9717DifferentPackages.kt") public void testKt9717DifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); } @TestMetadata("kt9958.kt") public void testKt9958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); } @TestMetadata("kt9958Interface.kt") public void testKt9958Interface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); } @TestMetadata("protectedFromLambda.kt") public void testProtectedFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); } @TestMetadata("syntheticAccessorNames.kt") public void testSyntheticAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); } } @@ -21324,50 +18998,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToArray extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInToArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt3177-toTypedArray.kt") public void testKt3177_toTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); } @TestMetadata("returnToTypedArray.kt") public void testReturnToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); } @TestMetadata("toArray.kt") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArray.kt"); } @TestMetadata("toArrayAlreadyPresent.kt") public void testToArrayAlreadyPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayAlreadyPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayAlreadyPresent.kt"); } @TestMetadata("toArrayShouldBePublic.kt") public void testToArrayShouldBePublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayShouldBePublic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayShouldBePublic.kt"); } @TestMetadata("toArrayShouldBePublicWithJava.kt") public void testToArrayShouldBePublicWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayShouldBePublicWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayShouldBePublicWithJava.kt"); } @TestMetadata("toTypedArray.kt") public void testToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toTypedArray.kt"); } } @@ -21375,44 +19046,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelPrivate extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTopLevelPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade.kt") public void testNoPrivateNoAccessorsInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade2.kt") public void testNoPrivateNoAccessorsInMultiFileFacade2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); } @TestMetadata("privateInInlineNested.kt") public void testPrivateInInlineNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); } @TestMetadata("privateVisibility.kt") public void testPrivateVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); } @TestMetadata("syntheticAccessorInMultiFile.kt") public void testSyntheticAccessorInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); } } @@ -21420,10 +19089,13 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Traits extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); } public void testAllFilesPresentInTraits() throws Exception { @@ -21432,176 +19104,147 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestMetadata("diamondPropertyAccessors.kt") public void testDiamondPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/genericMethod.kt"); } @TestMetadata("indirectlyInheritPropertyGetter.kt") public void testIndirectlyInheritPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); } @TestMetadata("inheritJavaInterface.kt") public void testInheritJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); } @TestMetadata("inheritedFun.kt") public void testInheritedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedFun.kt"); } @TestMetadata("inheritedVar.kt") public void testInheritedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedVar.kt"); } @TestMetadata("interfaceDefaultImpls.kt") public void testInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirect.kt") public void testInterfaceWithNonAbstractFunIndirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirectGeneric.kt") public void testInterfaceWithNonAbstractFunIndirectGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); } @TestMetadata("kt1936.kt") public void testKt1936() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936.kt"); } @TestMetadata("kt1936_1.kt") public void testKt1936_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936_1.kt"); } @TestMetadata("kt2260.kt") public void testKt2260() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2260.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2260.kt"); } @TestMetadata("kt2399.kt") public void testKt2399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2399.kt"); } @TestMetadata("kt2541.kt") public void testKt2541() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2541.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2541.kt"); } @TestMetadata("kt3315.kt") public void testKt3315() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3315.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3315.kt"); } @TestMetadata("kt3500.kt") public void testKt3500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3500.kt"); } @TestMetadata("kt3579.kt") public void testKt3579() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579.kt"); } @TestMetadata("kt3579_2.kt") public void testKt3579_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579_2.kt"); } @TestMetadata("kt5393.kt") public void testKt5393() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393.kt"); } @TestMetadata("kt5393_property.kt") public void testKt5393_property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393_property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393_property.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/multiple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/multiple.kt"); } @TestMetadata("noPrivateDelegation.kt") public void testNoPrivateDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); } @TestMetadata("traitImplDelegationWithCovariantOverride.kt") public void testTraitImplDelegationWithCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); } @TestMetadata("traitImplDiamond.kt") public void testTraitImplDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); } @TestMetadata("traitImplGenericDelegation.kt") public void testTraitImplGenericDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); } @TestMetadata("traitWithPrivateExtension.kt") public void testTraitWithPrivateExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); } @TestMetadata("traitWithPrivateMember.kt") public void testTraitWithPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); } @TestMetadata("traitWithPrivateMemberAccessFromLambda.kt") public void testTraitWithPrivateMemberAccessFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); } } @@ -21609,50 +19252,47 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeInfo extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asInLoop.kt") public void testAsInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); } @TestMetadata("ifOrWhenSpecialCall.kt") public void testIfOrWhenSpecialCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); } @TestMetadata("implicitSmartCastThis.kt") public void testImplicitSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/inheritance.kt"); } @TestMetadata("kt2811.kt") public void testKt2811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/kt2811.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/kt2811.kt"); } @TestMetadata("primitiveTypeInfo.kt") public void testPrimitiveTypeInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); } @TestMetadata("smartCastThis.kt") public void testSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); } } @@ -21660,68 +19300,62 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMapping extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enhancedPrimitives.kt") public void testEnhancedPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); } @TestMetadata("genericTypeWithNothing.kt") public void testGenericTypeWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); } @TestMetadata("kt2831.kt") public void testKt2831() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt2831.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt2831.kt"); } @TestMetadata("kt309.kt") public void testKt309() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt309.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt309.kt"); } @TestMetadata("kt3286.kt") public void testKt3286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3286.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3286.kt"); } @TestMetadata("kt3863.kt") public void testKt3863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3863.kt"); } @TestMetadata("kt3976.kt") public void testKt3976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3976.kt"); } @TestMetadata("nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nothing.kt"); } @TestMetadata("nullableNothing.kt") public void testNullableNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); } @TestMetadata("typeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); } } @@ -21729,116 +19363,102 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); } @TestMetadata("genericTypeAliasConstructor.kt") public void testGenericTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); } @TestMetadata("genericTypeAliasConstructor2.kt") public void testGenericTypeAliasConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); } @TestMetadata("innerClassTypeAliasConstructor.kt") public void testInnerClassTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); } @TestMetadata("innerClassTypeAliasConstructorInSupertypes.kt") public void testInnerClassTypeAliasConstructorInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/kt15109.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/kt15109.kt"); } @TestMetadata("objectLiteralConstructor.kt") public void testObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/simple.kt"); } @TestMetadata("typeAliasAsBareType.kt") public void testTypeAliasAsBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); } @TestMetadata("typeAliasCompanion.kt") public void testTypeAliasCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); } @TestMetadata("typeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); } @TestMetadata("typeAliasConstructorAccessor.kt") public void testTypeAliasConstructorAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); } @TestMetadata("typeAliasConstructorForArray.kt") public void testTypeAliasConstructorForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); } @TestMetadata("typeAliasConstructorInSuperCall.kt") public void testTypeAliasConstructorInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); } @TestMetadata("typeAliasObject.kt") public void testTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); } @TestMetadata("typeAliasObjectCallable.kt") public void testTypeAliasObjectCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); } @TestMetadata("typeAliasSecondaryConstructor.kt") public void testTypeAliasSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); } } @@ -21846,44 +19466,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryOp extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/call.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callNullable.kt"); } @TestMetadata("callWithCommonType.kt") public void testCallWithCommonType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); } @TestMetadata("longOverflow.kt") public void testLongOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); } } @@ -21891,74 +19509,67 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unit extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("closureReturnsNullableUnit.kt") public void testClosureReturnsNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/ifElse.kt"); } @TestMetadata("kt3634.kt") public void testKt3634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt3634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt3634.kt"); } @TestMetadata("kt4212.kt") public void testKt4212() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4212.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4212.kt"); } @TestMetadata("kt4265.kt") public void testKt4265() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4265.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4265.kt"); } @TestMetadata("nullableUnit.kt") public void testNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnit.kt"); } @TestMetadata("nullableUnitInWhen1.kt") public void testNullableUnitInWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); } @TestMetadata("nullableUnitInWhen2.kt") public void testNullableUnitInWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); } @TestMetadata("nullableUnitInWhen3.kt") public void testNullableUnitInWhen3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); } @TestMetadata("unitClassObject.kt") public void testUnitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/unitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/unitClassObject.kt"); } @TestMetadata("UnitValue.kt") public void testUnitValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/UnitValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/UnitValue.kt"); } } @@ -21966,68 +19577,62 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("assigningArrayToVarargInAnnotation.kt") public void testAssigningArrayToVarargInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); } @TestMetadata("doNotCopyImmediatelyCreatedArrays.kt") public void testDoNotCopyImmediatelyCreatedArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); } @TestMetadata("kt1978.kt") public void testKt1978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt1978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt1978.kt"); } @TestMetadata("kt581.kt") public void testKt581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt581.kt"); } @TestMetadata("kt6192.kt") public void testKt6192() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt6192.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt6192.kt"); } @TestMetadata("kt796_797.kt") public void testKt796_797() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt796_797.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } @TestMetadata("spreadCopiesArray.kt") public void testSpreadCopiesArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); } @TestMetadata("varargInFunParam.kt") public void testVarargInFunParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInJava.kt"); } @TestMetadata("varargsAndFunctionLiterals.kt") public void testVarargsAndFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); } } @@ -22035,322 +19640,279 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callProperty.kt") public void testCallProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/callProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/callProperty.kt"); } @TestMetadata("emptyWhen.kt") public void testEmptyWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/emptyWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/emptyWhen.kt"); } @TestMetadata("exceptionOnNoMatch.kt") public void testExceptionOnNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); } @TestMetadata("exhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); } @TestMetadata("exhaustiveBreakContinue.kt") public void testExhaustiveBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); } @TestMetadata("exhaustiveWhenInitialization.kt") public void testExhaustiveWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); } @TestMetadata("exhaustiveWhenReturn.kt") public void testExhaustiveWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); } @TestMetadata("implicitExhaustiveAndReturn.kt") public void testImplicitExhaustiveAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); } @TestMetadata("integralWhenWithNoInlinedConstants.kt") public void testIntegralWhenWithNoInlinedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/is.kt"); } @TestMetadata("kt2457.kt") public void testKt2457() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2457.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2457.kt"); } @TestMetadata("kt2466.kt") public void testKt2466() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2466.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2466.kt"); } @TestMetadata("kt5307.kt") public void testKt5307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5307.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5307.kt"); } @TestMetadata("kt5448.kt") public void testKt5448() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5448.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5448.kt"); } @TestMetadata("longInRange.kt") public void testLongInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/longInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/longInRange.kt"); } @TestMetadata("matchNotNullAgainstNullable.kt") public void testMatchNotNullAgainstNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); } @TestMetadata("multipleEntries.kt") public void testMultipleEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/multipleEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/multipleEntries.kt"); } @TestMetadata("noElseExhaustive.kt") public void testNoElseExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustive.kt"); } @TestMetadata("noElseExhaustiveStatement.kt") public void testNoElseExhaustiveStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); } @TestMetadata("noElseExhaustiveUnitExpected.kt") public void testNoElseExhaustiveUnitExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); } @TestMetadata("noElseInStatement.kt") public void testNoElseInStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseInStatement.kt"); } @TestMetadata("noElseNoMatch.kt") public void testNoElseNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseNoMatch.kt"); } @TestMetadata("nullableWhen.kt") public void testNullableWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/nullableWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/nullableWhen.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/range.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/range.kt"); } @TestMetadata("sealedWhenInitialization.kt") public void testSealedWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); } @TestMetadata("switchOptimizationDense.kt") public void testSwitchOptimizationDense() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); } @TestMetadata("switchOptimizationMultipleConditions.kt") public void testSwitchOptimizationMultipleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); } @TestMetadata("switchOptimizationSingleStatementCase.kt") public void testSwitchOptimizationSingleStatementCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); } @TestMetadata("switchOptimizationSparse.kt") public void testSwitchOptimizationSparse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); } @TestMetadata("switchOptimizationStatement.kt") public void testSwitchOptimizationStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); } @TestMetadata("switchOptimizationTypes.kt") public void testSwitchOptimizationTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); } @TestMetadata("switchOptimizationUnordered.kt") public void testSwitchOptimizationUnordered() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); } @TestMetadata("switchOptimizationWithGap.kt") public void testSwitchOptimizationWithGap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); } @TestMetadata("typeDisjunction.kt") public void testTypeDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/typeDisjunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/typeDisjunction.kt"); } @TestMetadata("whenArgumentIsEvaluatedOnlyOnce.kt") public void testWhenArgumentIsEvaluatedOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); } @TestMetadata("whenSafeCallSubjectEvaluatedOnce.kt") public void testWhenSafeCallSubjectEvaluatedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); } @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumOptimization extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnumOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bigEnum.kt") public void testBigEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); } @TestMetadata("enumInsideClassObject.kt") public void testEnumInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); } @TestMetadata("functionLiteralInTopLevel.kt") public void testFunctionLiteralInTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); } @TestMetadata("kt14597.kt") public void testKt14597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); } @TestMetadata("kt14597_full.kt") public void testKt14597_full() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); } @TestMetadata("kt14802.kt") public void testKt14802() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); } @TestMetadata("kt15806.kt") public void testKt15806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); } @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); } @TestMetadata("nonConstantEnum.kt") public void testNonConstantEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); } @TestMetadata("nullableEnum.kt") public void testNullableEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); } @TestMetadata("subjectAny.kt") public void testSubjectAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); } @TestMetadata("withoutElse.kt") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); } } @@ -22358,44 +19920,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringOptimization extends AbstractBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStringOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); } @TestMetadata("duplicatingItemsSameHashCode.kt") public void testDuplicatingItemsSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); } @TestMetadata("sameHashCode.kt") public void testSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); } @TestMetadata("statement.kt") public void testStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java index 962427eaec8..7c9396b5833 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxInlineCodegenTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,298 +33,259 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumWhen extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnumWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } @@ -328,44 +293,42 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturing extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } @@ -373,80 +336,72 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturingInClass extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } @@ -454,44 +409,42 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } @@ -499,38 +452,37 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TwoCapturedReceivers extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); } } } @@ -539,80 +491,72 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } } @@ -620,44 +564,42 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayConvention extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } @@ -665,20 +607,22 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Builders extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuilders() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } @@ -686,14 +630,17 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BytecodePreprocessing extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } @@ -701,178 +648,159 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } @TestMetadata("filter.kt") public void testFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); } } } @@ -881,44 +809,42 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Capture extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapture() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } @@ -926,50 +852,47 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Complex extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } @@ -977,50 +900,47 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ComplexStack extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplexStack() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } @TestMetadata("simple3.kt") public void testSimple3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } @TestMetadata("simple4.kt") public void testSimple4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } } @@ -1028,62 +948,57 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } @@ -1091,16 +1006,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValues extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } public void testAllFilesPresentInDefaultValues() throws Exception { @@ -1109,390 +1026,336 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaInlining extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } @TestMetadata("instanceCapuredInClass.kt") public void testInstanceCapuredInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); } @TestMetadata("instanceCapuredInInterface.kt") public void testInstanceCapuredInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); } @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); } } } @@ -1501,16 +1364,18 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaskElimination extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } public void testAllFilesPresentInMaskElimination() throws Exception { @@ -1519,32 +1384,27 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); } } } @@ -1553,32 +1413,32 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } @@ -1586,50 +1446,47 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnclosingInfo extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnclosingInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } @@ -1637,86 +1494,77 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt10569.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt18254.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } @TestMetadata("values.kt") public void testValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/values.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } @@ -1724,14 +1572,17 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } @@ -1739,20 +1590,22 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } @@ -1760,14 +1613,17 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } @@ -1775,20 +1631,22 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClassClash extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaClassClash() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } @@ -1796,38 +1654,37 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaTransformation extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaTransformation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } @@ -1835,26 +1692,27 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunInLambda extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalFunInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } @@ -1862,20 +1720,22 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } @@ -1883,50 +1743,47 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoInline extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } @@ -1934,106 +1791,99 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } @@ -2041,106 +1891,99 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } @@ -2148,56 +1991,52 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChained() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } @@ -2205,80 +2044,72 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } @@ -2286,104 +2117,92 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExceptionTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } @@ -2391,14 +2210,17 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); } } } @@ -2408,14 +2230,17 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } @@ -2423,22 +2248,23 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } public void testAllFilesPresentInPrivate() throws Exception { @@ -2447,56 +2273,47 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } @@ -2504,74 +2321,67 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/property.kt"); } @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } @@ -2579,136 +2389,124 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11677.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } @TestMetadata("packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckCast extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } } @@ -2716,56 +2514,52 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } @@ -2773,26 +2567,27 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsCheck extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); } } } @@ -2801,62 +2596,57 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } @@ -2864,122 +2654,107 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimple() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } @@ -2987,106 +2762,99 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assertion.kt") public void testAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } @TestMetadata("smap.kt") public void testSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Anonymous extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymous() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } @@ -3094,62 +2862,57 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } @@ -3157,32 +2920,32 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineOnly extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } } @@ -3190,32 +2953,32 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Newsmap extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewsmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } @@ -3223,20 +2986,22 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); } } } @@ -3245,56 +3010,52 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Special extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecial() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } @TestMetadata("iinc.kt") public void testIinc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } } @@ -3302,92 +3063,82 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackOnReturn extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStackOnReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } @@ -3395,118 +3146,109 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suspend extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultParameter extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } } @@ -3514,56 +3256,52 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Receiver extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } @@ -3571,74 +3309,67 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StateMachine extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStateMachine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } } } @@ -3647,94 +3378,89 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constField.kt") public void testConstField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithinInlineLambda extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithinInlineLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); } } } @@ -3743,14 +3469,17 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } @@ -3758,32 +3487,32 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } @@ -3791,26 +3520,27 @@ public class BlackBoxInlineCodegenTestGenerated extends AbstractBlackBoxInlineCo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractBlackBoxInlineCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index 34713e695a0..81f8f970a50 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -21,202 +21,179 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableNameIntrinsic.kt") public void testCallableNameIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/callableNameIntrinsic.kt"); } @TestMetadata("coroutineContextIntrinsic.kt") public void testCoroutineContextIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/coroutineContextIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/coroutineContextIntrinsic.kt"); } @TestMetadata("coroutineFields.kt") public void testCoroutineFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/coroutineFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/coroutineFields.kt"); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/defaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/defaultImpls.kt"); } @TestMetadata("emptyMultifileFacade.kt") public void testEmptyMultifileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/emptyMultifileFacade.kt"); } @TestMetadata("immutableCollection.kt") public void testImmutableCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/immutableCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/immutableCollection.kt"); } @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineOnly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineOnly.kt"); } @TestMetadata("InlineOnlyMultifile.kt") public void testInlineOnlyMultifile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/InlineOnlyMultifile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/InlineOnlyMultifile.kt"); } @TestMetadata("inlineOnlyProperty.kt") public void testInlineOnlyProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineOnlyProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineOnlyProperty.kt"); } @TestMetadata("InlineOnlyPropertyMultifile.kt") public void testInlineOnlyPropertyMultifile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/InlineOnlyPropertyMultifile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/InlineOnlyPropertyMultifile.kt"); } @TestMetadata("invisibleCompanionObject.kt") public void testInvisibleCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject.kt"); } @TestMetadata("invisibleCompanionObject_lv11.kt") public void testInvisibleCompanionObject_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv11.kt"); } @TestMetadata("invisibleCompanionObject_lv12.kt") public void testInvisibleCompanionObject_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/invisibleCompanionObject_lv12.kt"); } @TestMetadata("jvmOverloadsAndParametersAnnotations.kt") public void testJvmOverloadsAndParametersAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/jvmOverloadsAndParametersAnnotations.kt"); } @TestMetadata("noCollectionStubMethodsInInterface.kt") public void testNoCollectionStubMethodsInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/noCollectionStubMethodsInInterface.kt"); } @TestMetadata("noDelegationsToPrivateInterfaceMembers.kt") public void testNoDelegationsToPrivateInterfaceMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/noDelegationsToPrivateInterfaceMembers.kt"); } @TestMetadata("noReceiverInCallableReferenceClasses.kt") public void testNoReceiverInCallableReferenceClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/noReceiverInCallableReferenceClasses.kt"); } @TestMetadata("noRemoveAtInReadOnly.kt") public void testNoRemoveAtInReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/noRemoveAtInReadOnly.kt"); } @TestMetadata("noToArrayInJava.kt") public void testNoToArrayInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/noToArrayInJava.kt"); } @TestMetadata("oomInReturnUnit.kt") public void testOomInReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/oomInReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/oomInReturnUnit.kt"); } @TestMetadata("privateSuspendFun.kt") public void testPrivateSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/privateSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/privateSuspendFun.kt"); } @TestMetadata("releaseCoroutines.kt") public void testReleaseCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/releaseCoroutines.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/releaseCoroutines.kt"); } @TestMetadata("samAdapterAndInlinedOne.kt") public void testSamAdapterAndInlinedOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/samAdapterAndInlinedOne.kt"); } @TestMetadata("suspendReifiedFun.kt") public void testSuspendReifiedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/suspendReifiedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/suspendReifiedFun.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeListing/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultTargets.kt") public void testDefaultTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/defaultTargets.kt"); } @TestMetadata("deprecatedJvmOverloads.kt") public void testDeprecatedJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/deprecatedJvmOverloads.kt"); } @TestMetadata("JvmSynthetic.kt") public void testJvmSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/JvmSynthetic.kt"); } @TestMetadata("kt9320.kt") public void testKt9320() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/kt9320.kt"); } @TestMetadata("literals.kt") public void testLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/literals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/literals.kt"); } @TestMetadata("onProperties.kt") public void testOnProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/onProperties.kt"); } @TestMetadata("onReceiver.kt") public void testOnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/annotations/onReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/annotations/onReceiver.kt"); } } @@ -224,26 +201,27 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionStubs extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollectionStubs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/collectionStubs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noStubsInJavaSuperClass.kt") public void testNoStubsInJavaSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt"); } @TestMetadata("stubsFromSuperclass.kt") public void testStubsFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt"); } @TestMetadata("stubsFromSuperclassNoBridges.kt") public void testStubsFromSuperclassNoBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclassNoBridges.kt"); } } @@ -251,38 +229,37 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("companionObjectInsideInlineClass.kt") public void testCompanionObjectInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/companionObjectInsideInlineClass.kt"); } @TestMetadata("computablePropertiesInsideInlineClass.kt") public void testComputablePropertiesInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/computablePropertiesInsideInlineClass.kt"); } @TestMetadata("noBridgesForErasedInlineClass.kt") public void testNoBridgesForErasedInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/noBridgesForErasedInlineClass.kt"); } @TestMetadata("shapeOfInlineClassWithPrimitive.kt") public void testShapeOfInlineClassWithPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrimitive.kt"); } @TestMetadata("shapeOfInlineClassWithPrivateConstructor.kt") public void testShapeOfInlineClassWithPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/inlineClasses/shapeOfInlineClassWithPrivateConstructor.kt"); } } @@ -290,58 +267,59 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBridges extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecialBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/contains.kt"); } @TestMetadata("noSpecialBridgeIfPresentInSuperClass.kt") public void testNoSpecialBridgeIfPresentInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/noSpecialBridgeIfPresentInSuperClass.kt"); } @TestMetadata("redundantStubForSize.kt") public void testRedundantStubForSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt"); } @TestMetadata("removeAtTwoSpecialBridges.kt") public void testRemoveAtTwoSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/removeAtTwoSpecialBridges.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/signatures") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signatures extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges/signatures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/genericClass.kt"); } @TestMetadata("nonGenericClass.kt") public void testNonGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/nonGenericClass.kt"); } @TestMetadata("partiallySpecializedClass.kt") public void testPartiallySpecializedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/specialBridges/signatures/partiallySpecializedClass.kt"); } } } @@ -350,38 +328,37 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tailcall extends AbstractBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTailcall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/tailcall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("tailCallIntrinsics.kt") public void testTailCallIntrinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt"); } @TestMetadata("tailSuspendUnitFun.kt") public void testTailSuspendUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tailSuspendUnitFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/tailcall/tailSuspendUnitFun.kt"); } @TestMetadata("tryCatchTailCall.kt") public void testTryCatchTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/tryCatchTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/tailcall/tryCatchTailCall.kt"); } @TestMetadata("unreachable.kt") public void testUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/unreachable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/tailcall/unreachable.kt"); } @TestMetadata("whenUnit.kt") public void testWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeListing/tailcall/whenUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeListing/tailcall/whenUnit.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java index a9318e2a83f..ec0c4be9e24 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeTextTestGenerated.java @@ -21,22 +21,23 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorForOverridenVal.kt") public void testAccessorForOverridenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/accessorForOverridenVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/accessorForOverridenVal.kt"); } @TestMetadata("accessorForProtected.kt") public void testAccessorForProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/accessorForProtected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/accessorForProtected.kt"); } @TestMetadata("accessorNaming.kt") public void testAccessorNaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/accessorNaming.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/accessorNaming.kt"); } public void testAllFilesPresentInBytecodeText() throws Exception { @@ -45,412 +46,349 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestMetadata("annotationDefaultValue.kt") public void testAnnotationDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/annotationDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/annotationDefaultValue.kt"); } @TestMetadata("annotationJavaRetentionPolicyRuntime.kt") public void testAnnotationJavaRetentionPolicyRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/annotationJavaRetentionPolicyRuntime.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/annotationJavaRetentionPolicyRuntime.kt"); } @TestMetadata("annotationRetentionPolicyClass.kt") public void testAnnotationRetentionPolicyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/annotationRetentionPolicyClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/annotationRetentionPolicyClass.kt"); } @TestMetadata("annotationRetentionPolicyRuntime.kt") public void testAnnotationRetentionPolicyRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/annotationRetentionPolicyRuntime.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/annotationRetentionPolicyRuntime.kt"); } @TestMetadata("annotationRetentionPolicySource.kt") public void testAnnotationRetentionPolicySource() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/annotationRetentionPolicySource.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/annotationRetentionPolicySource.kt"); } @TestMetadata("boxedNotNumberTypeOnUnboxing.kt") public void testBoxedNotNumberTypeOnUnboxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxedNotNumberTypeOnUnboxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxedNotNumberTypeOnUnboxing.kt"); } @TestMetadata("bridgeForFakeOverride.kt") public void testBridgeForFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/bridgeForFakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/bridgeForFakeOverride.kt"); } @TestMetadata("charConstant.kt") public void testCharConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/charConstant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/charConstant.kt"); } @TestMetadata("componentEvaluatesOnlyOnce.kt") public void testComponentEvaluatesOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/componentEvaluatesOnlyOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/componentEvaluatesOnlyOnce.kt"); } @TestMetadata("constClosureOptimization.kt") public void testConstClosureOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constClosureOptimization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constClosureOptimization.kt"); } @TestMetadata("constCoroutine.kt") public void testConstCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constCoroutine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constCoroutine.kt"); } @TestMetadata("defaultMethodBody.kt") public void testDefaultMethodBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/defaultMethodBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/defaultMethodBody.kt"); } @TestMetadata("doNotStoreNullForTmpInDestructuring.kt") public void testDoNotStoreNullForTmpInDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/doNotStoreNullForTmpInDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/doNotStoreNullForTmpInDestructuring.kt"); } @TestMetadata("doNotStoreNullsForCapturedVars.kt") public void testDoNotStoreNullsForCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/doNotStoreNullsForCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/doNotStoreNullsForCapturedVars.kt"); } @TestMetadata("falseSmartCast.kt") public void testFalseSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/falseSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/falseSmartCast.kt"); } @TestMetadata("inlineFromOtherModule.kt") public void testInlineFromOtherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineFromOtherModule.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineFromOtherModule.kt"); } @TestMetadata("inlineJavaConstantFromSubclass.kt") public void testInlineJavaConstantFromSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineJavaConstantFromSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineJavaConstantFromSubclass.kt"); } @TestMetadata("inlineJavaStaticFields.kt") public void testInlineJavaStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineJavaStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineJavaStaticFields.kt"); } @TestMetadata("inlineProtectedJavaConstantFromOtherPackage.kt") public void testInlineProtectedJavaConstantFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineProtectedJavaConstantFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineProtectedJavaConstantFromOtherPackage.kt"); } @TestMetadata("intConstantNotNull.kt") public void testIntConstantNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intConstantNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intConstantNotNull.kt"); } @TestMetadata("intConstantNullable.kt") public void testIntConstantNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intConstantNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intConstantNullable.kt"); } @TestMetadata("intConstantNullableSafeCall.kt") public void testIntConstantNullableSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intConstantNullableSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intConstantNullableSafeCall.kt"); } @TestMetadata("intConstantSafeCall.kt") public void testIntConstantSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intConstantSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intConstantSafeCall.kt"); } @TestMetadata("intRangeNoBoxing.kt") public void testIntRangeNoBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intRangeNoBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intRangeNoBoxing.kt"); } @TestMetadata("interfaceDefaultImpl.kt") public void testInterfaceDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/interfaceDefaultImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/interfaceDefaultImpl.kt"); } @TestMetadata("isArrayOf.kt") public void testIsArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/isArrayOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/isArrayOf.kt"); } @TestMetadata("javaExtensionPropertyIntrinsic.kt") public void testJavaExtensionPropertyIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/javaExtensionPropertyIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/javaExtensionPropertyIntrinsic.kt"); } @TestMetadata("javaStatics.kt") public void testJavaStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/javaStatics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/javaStatics.kt"); } @TestMetadata("jvmField.kt") public void testJvmField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/jvmField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/jvmField.kt"); } @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt10259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt10259.kt"); } @TestMetadata("kt10259_2.kt") public void testKt10259_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt10259_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt10259_2.kt"); } @TestMetadata("kt10259_3.kt") public void testKt10259_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt10259_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt10259_3.kt"); } @TestMetadata("kt2202.kt") public void testKt2202() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt2202.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt2202.kt"); } @TestMetadata("kt2887.kt") public void testKt2887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt2887.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt2887.kt"); } @TestMetadata("kt3845.kt") public void testKt3845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt3845.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt3845.kt"); } @TestMetadata("kt5016.kt") public void testKt5016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt5016.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt5016.kt"); } @TestMetadata("kt5016int.kt") public void testKt5016int() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt5016int.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt5016int.kt"); } @TestMetadata("kt5016intOrNull.kt") public void testKt5016intOrNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt5016intOrNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt5016intOrNull.kt"); } @TestMetadata("kt7188.kt") public void testKt7188() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt7188.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt7188.kt"); } @TestMetadata("kt7769.kt") public void testKt7769() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt7769.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt7769.kt"); } @TestMetadata("kt9603.kt") public void testKt9603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/kt9603.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/kt9603.kt"); } @TestMetadata("maxStackAfterOptimizations.kt") public void testMaxStackAfterOptimizations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/maxStackAfterOptimizations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/maxStackAfterOptimizations.kt"); } @TestMetadata("noFlagAnnotations.kt") public void testNoFlagAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/noFlagAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/noFlagAnnotations.kt"); } @TestMetadata("noInlineJavaProtectedConstants.kt") public void testNoInlineJavaProtectedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/noInlineJavaProtectedConstants.kt"); } @TestMetadata("noNumberCheckCast.kt") public void testNoNumberCheckCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/noNumberCheckCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/noNumberCheckCast.kt"); } @TestMetadata("noSuperCheckInDefaultConstuctor.kt") public void testNoSuperCheckInDefaultConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/noSuperCheckInDefaultConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/noSuperCheckInDefaultConstuctor.kt"); } @TestMetadata("noWrapperForMethodReturningPrimitive.kt") public void testNoWrapperForMethodReturningPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/noWrapperForMethodReturningPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/noWrapperForMethodReturningPrimitive.kt"); } @TestMetadata("nopsInDoWhile.kt") public void testNopsInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nopsInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nopsInDoWhile.kt"); } @TestMetadata("partMembersCall.kt") public void testPartMembersCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/partMembersCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/partMembersCall.kt"); } @TestMetadata("partMembersInline.kt") public void testPartMembersInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/partMembersInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/partMembersInline.kt"); } @TestMetadata("preEvaluateInlineJavaStaticFields.kt") public void testPreEvaluateInlineJavaStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/preEvaluateInlineJavaStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/preEvaluateInlineJavaStaticFields.kt"); } @TestMetadata("prefixIntVarIncrement.kt") public void testPrefixIntVarIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/prefixIntVarIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/prefixIntVarIncrement.kt"); } @TestMetadata("privateDefaultArgs.kt") public void testPrivateDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/privateDefaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/privateDefaultArgs.kt"); } @TestMetadata("redundantGotoRemoving.kt") public void testRedundantGotoRemoving() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/redundantGotoRemoving.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/redundantGotoRemoving.kt"); } @TestMetadata("redundantInitializer.kt") public void testRedundantInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/redundantInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/redundantInitializer.kt"); } @TestMetadata("redundantInitializerNumber.kt") public void testRedundantInitializerNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/redundantInitializerNumber.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/redundantInitializerNumber.kt"); } @TestMetadata("reifiedAsCheck.kt") public void testReifiedAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/reifiedAsCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/reifiedAsCheck.kt"); } @TestMetadata("reifiedAsCheckWithNullable.kt") public void testReifiedAsCheckWithNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/reifiedAsCheckWithNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/reifiedAsCheckWithNullable.kt"); } @TestMetadata("reifiedIsCheck.kt") public void testReifiedIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/reifiedIsCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/reifiedIsCheck.kt"); } @TestMetadata("reifiedIsCheckWithNullable.kt") public void testReifiedIsCheckWithNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/reifiedIsCheckWithNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/reifiedIsCheckWithNullable.kt"); } @TestMetadata("safeAsWithMutable.kt") public void testSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/safeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/safeAsWithMutable.kt"); } @TestMetadata("superFlagInMultiFileFacade.kt") public void testSuperFlagInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/superFlagInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/superFlagInMultiFileFacade.kt"); } @TestMetadata("topLevelFunWithDefaultArgs.kt") public void testTopLevelFunWithDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/topLevelFunWithDefaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/topLevelFunWithDefaultArgs.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeText/argumentOrder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentReorder.kt") public void testArgumentReorder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/argumentOrder/argumentReorder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/argumentOrder/argumentReorder.kt"); } @TestMetadata("argumentReorderWithDefault.kt") public void testArgumentReorderWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/argumentOrder/argumentReorderWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/argumentOrder/argumentReorderWithDefault.kt"); } @TestMetadata("sameOrder.kt") public void testSameOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/argumentOrder/sameOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/argumentOrder/sameOrder.kt"); } @TestMetadata("sameOrderWithDefault.kt") public void testSameOrderWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/argumentOrder/sameOrderWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/argumentOrder/sameOrderWithDefault.kt"); } } @@ -458,140 +396,122 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxingOptimization extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxingOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boxingAndEquals.kt") public void testBoxingAndEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/boxingAndEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/boxingAndEquals.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/casts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/casts.kt"); } @TestMetadata("checkcastAndInstanceOf.kt") public void testCheckcastAndInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/checkcastAndInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/checkcastAndInstanceOf.kt"); } @TestMetadata("fold.kt") public void testFold() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/fold.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/fold.kt"); } @TestMetadata("intCompareTo.kt") public void testIntCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/intCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/intCompareTo.kt"); } @TestMetadata("kClassInAnnotation.kt") public void testKClassInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/kClassInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/kClassInAnnotation.kt"); } @TestMetadata("kClassInAnnotationEscaping.kt") public void testKClassInAnnotationEscaping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/kClassInAnnotationEscaping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/kClassInAnnotationEscaping.kt"); } @TestMetadata("kt15862.kt") public void testKt15862() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/kt15862.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/kt15862.kt"); } @TestMetadata("kt15862_2.kt") public void testKt15862_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/kt15862_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/kt15862_2.kt"); } @TestMetadata("kt6842.kt") public void testKt6842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/kt6842.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/kt6842.kt"); } @TestMetadata("kt7224.kt") public void testKt7224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/kt7224.kt"); } @TestMetadata("maxMinBy.kt") public void testMaxMinBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/maxMinBy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/maxMinBy.kt"); } @TestMetadata("nullCheck.kt") public void testNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/nullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/nullCheck.kt"); } @TestMetadata("progressions.kt") public void testProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/progressions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/progressions.kt"); } @TestMetadata("safeCallToPrimitiveEquality.kt") public void testSafeCallToPrimitiveEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/safeCallToPrimitiveEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/safeCallToPrimitiveEquality.kt"); } @TestMetadata("safeCallWithElvis.kt") public void testSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/safeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/safeCallWithElvis.kt"); } @TestMetadata("severalInlines.kt") public void testSeveralInlines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/severalInlines.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/severalInlines.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/simple.kt"); } @TestMetadata("simpleUninitializedMerge.kt") public void testSimpleUninitializedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/simpleUninitializedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/simpleUninitializedMerge.kt"); } @TestMetadata("unsafeRemoving.kt") public void testUnsafeRemoving() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/unsafeRemoving.kt"); } @TestMetadata("variableClash.kt") public void testVariableClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/variableClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/variableClash.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/boxingOptimization/variables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/boxingOptimization/variables.kt"); } } @@ -599,42 +519,45 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuiltinFunctions extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuiltinFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/builtinFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("charSequence.kt") public void testCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/charSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/charSequence.kt"); } @TestMetadata("contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/contains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/contains.kt"); } @TestMetadata("removeAt.kt") public void testRemoveAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/removeAt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/removeAt.kt"); } @TestMetadata("size.kt") public void testSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/size.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/size.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericParameterBridge extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/abstractList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/abstractList.kt"); } public void testAllFilesPresentInGenericParameterBridge() throws Exception { @@ -643,38 +566,32 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestMetadata("IntMC.kt") public void testIntMC() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/IntMC.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/IntMC.kt"); } @TestMetadata("mutableCollection.kt") public void testMutableCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/mutableCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/mutableCollection.kt"); } @TestMetadata("mutableSetInterfaces.kt") public void testMutableSetInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/mutableSetInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/mutableSetInterfaces.kt"); } @TestMetadata("notNullAnyMC.kt") public void testNotNullAnyMC() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/notNullAnyMC.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/notNullAnyMC.kt"); } @TestMetadata("notNullParamMC.kt") public void testNotNullParamMC() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/notNullParamMC.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/notNullParamMC.kt"); } @TestMetadata("nullableAnyMC.kt") public void testNullableAnyMC() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/nullableAnyMC.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/builtinFunctions/genericParameterBridge/nullableAnyMC.kt"); } } } @@ -683,20 +600,22 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/callableReference/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/callableReference/inline.kt"); } @TestMetadata("nameIntrinsicWithImplicitThis.kt") public void testNameIntrinsicWithImplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/callableReference/nameIntrinsicWithImplicitThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/callableReference/nameIntrinsicWithImplicitThis.kt"); } } @@ -704,56 +623,52 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedVarsOptimization extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedInChainOfInlineFuns.kt") public void testCapturedInChainOfInlineFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInChainOfInlineFuns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInChainOfInlineFuns.kt"); } @TestMetadata("capturedInInlineOnly.kt") public void testCapturedInInlineOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInInlineOnly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInInlineOnly.kt"); } @TestMetadata("capturedInLocalObject.kt") public void testCapturedInLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInLocalObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInLocalObject.kt"); } @TestMetadata("capturedInNoInlineOnly.kt") public void testCapturedInNoInlineOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInNoInlineOnly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInNoInlineOnly.kt"); } @TestMetadata("capturedInNoInlneInsideChainOfInlineFuns.kt") public void testCapturedInNoInlneInsideChainOfInlineFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInNoInlneInsideChainOfInlineFuns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedInNoInlneInsideChainOfInlineFuns.kt"); } @TestMetadata("capturedVarsOfSize2.kt") public void testCapturedVarsOfSize2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedVarsOfSize2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/capturedVarsOfSize2.kt"); } @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); } @TestMetadata("withStackNormalization.kt") public void testWithStackNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/withStackNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/capturedVarsOptimization/withStackNormalization.kt"); } } @@ -761,32 +676,32 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Checkcast extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckcast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/checkcast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt14811.kt") public void testKt14811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/checkcast/kt14811.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/checkcast/kt14811.kt"); } @TestMetadata("kt14963.kt") public void testKt14963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/checkcast/kt14963.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/checkcast/kt14963.kt"); } @TestMetadata("kt15411.kt") public void testKt15411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/checkcast/kt15411.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/checkcast/kt15411.kt"); } @TestMetadata("kt22714.kt") public void testKt22714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/checkcast/kt22714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/checkcast/kt22714.kt"); } } @@ -794,62 +709,57 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CoercionToUnitOptimization extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoercionToUnitOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inRangeCheckWithConst.kt") public void testInRangeCheckWithConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/inRangeCheckWithConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/inRangeCheckWithConst.kt"); } @TestMetadata("kt14360.kt") public void testKt14360() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/kt14360.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/kt14360.kt"); } @TestMetadata("largeMethodWithCoercionToUnit.kt") public void testLargeMethodWithCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/largeMethodWithCoercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/largeMethodWithCoercionToUnit.kt"); } @TestMetadata("nopInlineFuns.kt") public void testNopInlineFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/nopInlineFuns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/nopInlineFuns.kt"); } @TestMetadata("returnsUnit.kt") public void testReturnsUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/returnsUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/returnsUnit.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/safeCall.kt"); } @TestMetadata("safeCallWithReturnValue.kt") public void testSafeCallWithReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/safeCallWithReturnValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/safeCallWithReturnValue.kt"); } @TestMetadata("safeLet.kt") public void testSafeLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/safeLet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/safeLet.kt"); } @TestMetadata("tryInlined.kt") public void testTryInlined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/tryInlined.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization/tryInlined.kt"); } } @@ -857,38 +767,37 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Companion extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompanion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/companion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt14258_1.kt") public void testKt14258_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_1.kt"); } @TestMetadata("kt14258_2.kt") public void testKt14258_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/companion/kt14258_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_2.kt"); } @TestMetadata("kt14258_3.kt") public void testKt14258_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/companion/kt14258_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_3.kt"); } @TestMetadata("kt14258_4.kt") public void testKt14258_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/companion/kt14258_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_4.kt"); } @TestMetadata("kt14258_5.kt") public void testKt14258_5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/companion/kt14258_5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/companion/kt14258_5.kt"); } } @@ -896,74 +805,67 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Conditions extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConditions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/conditions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conjuction.kt") public void testConjuction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/conjuction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/conjuction.kt"); } @TestMetadata("disjunction.kt") public void testDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/disjunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/disjunction.kt"); } @TestMetadata("negatedConjuction.kt") public void testNegatedConjuction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/negatedConjuction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/negatedConjuction.kt"); } @TestMetadata("negatedDisjunction.kt") public void testNegatedDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/negatedDisjunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/negatedDisjunction.kt"); } @TestMetadata("negatedNullCompare.kt") public void testNegatedNullCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/negatedNullCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/negatedNullCompare.kt"); } @TestMetadata("negatedZeroCompare.kt") public void testNegatedZeroCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/negatedZeroCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/negatedZeroCompare.kt"); } @TestMetadata("noBoxingForBoxedEqPrimitive.kt") public void testNoBoxingForBoxedEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/noBoxingForBoxedEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/noBoxingForBoxedEqPrimitive.kt"); } @TestMetadata("noBoxingForPrimitiveEqBoxed.kt") public void testNoBoxingForPrimitiveEqBoxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqBoxed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqBoxed.kt"); } @TestMetadata("noBoxingForPrimitiveEqObject.kt") public void testNoBoxingForPrimitiveEqObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/noBoxingForPrimitiveEqObject.kt"); } @TestMetadata("nullCompare.kt") public void testNullCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/nullCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/nullCompare.kt"); } @TestMetadata("zeroCompare.kt") public void testZeroCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/conditions/zeroCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/conditions/zeroCompare.kt"); } } @@ -971,10 +873,13 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstProperty extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorsForPrivateConstants.kt") public void testAccessorsForPrivateConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constProperty/accessorsForPrivateConstants.kt"); } public void testAllFilesPresentInConstProperty() throws Exception { @@ -983,20 +888,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestMetadata("noAccessorsForPrivateConstants.kt") public void testNoAccessorsForPrivateConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constProperty/noAccessorsForPrivateConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constProperty/noAccessorsForPrivateConstants.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constProperty/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constProperty/noInline.kt"); } @TestMetadata("noInlineInCmp.kt") public void testNoInlineInCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt"); } } @@ -1004,38 +906,37 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstantConditions extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstantConditions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constantConditions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cmpIntWith0.kt") public void testCmpIntWith0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constantConditions/cmpIntWith0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constantConditions/cmpIntWith0.kt"); } @TestMetadata("constantFlag.kt") public void testConstantFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constantConditions/constantFlag.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constantConditions/constantFlag.kt"); } @TestMetadata("constantInt.kt") public void testConstantInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constantConditions/constantInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constantConditions/constantInt.kt"); } @TestMetadata("inlineIfFalse.kt") public void testInlineIfFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constantConditions/inlineIfFalse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constantConditions/inlineIfFalse.kt"); } @TestMetadata("kt3098.kt") public void testKt3098() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constantConditions/kt3098.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constantConditions/kt3098.kt"); } } @@ -1043,68 +944,62 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constants extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstants() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/constants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/byte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/byte.kt"); } @TestMetadata("kt9532.kt") public void testKt9532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/kt9532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/kt9532.kt"); } @TestMetadata("noInlineNonConst.kt") public void testNoInlineNonConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/noInlineNonConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonConst.kt"); } @TestMetadata("noInlineNonStaticJavaField.kt") public void testNoInlineNonStaticJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField.kt"); } @TestMetadata("noInlineNonStaticJavaField_lv10.kt") public void testNoInlineNonStaticJavaField_lv10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv10.kt"); } @TestMetadata("noInlineNonStaticJavaField_lv11.kt") public void testNoInlineNonStaticJavaField_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/noInlineNonStaticJavaField_lv11.kt"); } @TestMetadata("nullableByteAndShort.kt") public void testNullableByteAndShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/nullableByteAndShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/nullableByteAndShort.kt"); } @TestMetadata("partialString.kt") public void testPartialString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/partialString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/partialString.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/short.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/short.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/constants/string.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/constants/string.kt"); } } @@ -1112,14 +1007,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17110.kt") public void testKt17110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/controlStructures/kt17110.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/controlStructures/kt17110.kt"); } } @@ -1127,100 +1025,94 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doNotReassignContinuation.kt") public void testDoNotReassignContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt"); } @TestMetadata("returnUnitInLambda.kt") public void testReturnUnitInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/returnUnitInLambda.kt"); } @TestMetadata("varValueConflictsWithTable.kt") public void testVarValueConflictsWithTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTable.kt"); } @TestMetadata("varValueConflictsWithTableSameSort.kt") public void testVarValueConflictsWithTableSameSort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/varValueConflictsWithTableSameSort.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntLikeVarSpilling extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complicatedMerge.kt") public void testComplicatedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt"); } @TestMetadata("i2bResult.kt") public void testI2bResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt"); } @TestMetadata("loadFromBooleanArray.kt") public void testLoadFromBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); } @TestMetadata("loadFromByteArray.kt") public void testLoadFromByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); } @TestMetadata("noVariableInTable.kt") public void testNoVariableInTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt"); } @TestMetadata("sameIconst1ManyVars.kt") public void testSameIconst1ManyVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); } @TestMetadata("usedInArrayStore.kt") public void testUsedInArrayStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); } @TestMetadata("usedInMethodCall.kt") public void testUsedInMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); } @TestMetadata("usedInPutfield.kt") public void testUsedInPutfield() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt"); } @TestMetadata("usedInVarStore.kt") public void testUsedInVarStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt"); } } } @@ -1229,14 +1121,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt12330.kt") public void testKt12330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/dataClasses/kt12330.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/dataClasses/kt12330.kt"); } } @@ -1244,56 +1139,52 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCodeElimination extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeadCodeElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayConstructor.kt") public void testArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/arrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/arrayConstructor.kt"); } @TestMetadata("boxing.kt") public void testBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/boxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/boxing.kt"); } @TestMetadata("emptyVariableRange.kt") public void testEmptyVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/emptyVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/emptyVariableRange.kt"); } @TestMetadata("kt14357.kt") public void testKt14357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/kt14357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/kt14357.kt"); } @TestMetadata("lastReturn.kt") public void testLastReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/lastReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/lastReturn.kt"); } @TestMetadata("literal.kt") public void testLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/literal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/literal.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructor.kt"); } @TestMetadata("simpleConstructorNotRedundant.kt") public void testSimpleConstructorNotRedundant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructorNotRedundant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/deadCodeElimination/simpleConstructorNotRedundant.kt"); } } @@ -1301,26 +1192,27 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt11962.kt") public void testKt11962() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/defaultArguments/kt11962.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/defaultArguments/kt11962.kt"); } @TestMetadata("maskAndArgumentElimination.kt") public void testMaskAndArgumentElimination() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/defaultArguments/maskAndArgumentElimination.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/defaultArguments/maskAndArgumentElimination.kt"); } @TestMetadata("methodHandlerElimination.kt") public void testMethodHandlerElimination() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/defaultArguments/methodHandlerElimination.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/defaultArguments/methodHandlerElimination.kt"); } } @@ -1328,26 +1220,27 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DirectInvoke extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDirectInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/directInvoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/directInvoke/callableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/directInvoke/callableReference.kt"); } @TestMetadata("inplaceClosure.kt") public void testInplaceClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/directInvoke/inplaceClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/directInvoke/inplaceClosure.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/directInvoke/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/directInvoke/localFun.kt"); } } @@ -1355,14 +1248,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt18731.kt") public void testKt18731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/enum/kt18731.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/enum/kt18731.kt"); } } @@ -1370,142 +1266,129 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForLoop extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForLoop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInCharSequence.kt") public void testForInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequence.kt"); } @TestMetadata("forInRangeSpecializedToUntil.kt") public void testForInRangeSpecializedToUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeSpecializedToUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeSpecializedToUntil.kt"); } @TestMetadata("forInRangeToCharConst.kt") public void testForInRangeToCharConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToCharConst.kt"); } @TestMetadata("forInRangeToConst.kt") public void testForInRangeToConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToConst.kt"); } @TestMetadata("forInRangeToLongConst.kt") public void testForInRangeToLongConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToLongConst.kt"); } @TestMetadata("forInRangeToQualifiedConst.kt") public void testForInRangeToQualifiedConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToQualifiedConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeToQualifiedConst.kt"); } @TestMetadata("forInRangeWithImplicitReceiver.kt") public void testForInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInRangeWithImplicitReceiver.kt"); } @TestMetadata("forInStringSpecialized.kt") public void testForInStringSpecialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInStringSpecialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInStringSpecialized.kt"); } @TestMetadata("forInUntil.kt") public void testForInUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInUntil.kt"); } @TestMetadata("forIntInDownTo.kt") public void testForIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forIntInDownTo.kt"); } @TestMetadata("intrinsicArrayConstructorsUseCounterLoop.kt") public void testIntrinsicArrayConstructorsUseCounterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/intrinsicArrayConstructorsUseCounterLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/intrinsicArrayConstructorsUseCounterLoop.kt"); } @TestMetadata("loopVarInterval.kt") public void testLoopVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/loopVarInterval.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/loopVarInterval.kt"); } @TestMetadata("primitiveLiteralRange1.kt") public void testPrimitiveLiteralRange1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange1.kt"); } @TestMetadata("primitiveLiteralRange2.kt") public void testPrimitiveLiteralRange2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveLiteralRange2.kt"); } @TestMetadata("primitiveProgression.kt") public void testPrimitiveProgression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/primitiveProgression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveProgression.kt"); } @TestMetadata("primitiveRange.kt") public void testPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/primitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/primitiveRange.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayWithIndex extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInArrrayWithIndexNoElementVar.kt") public void testForInArrrayWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); } @TestMetadata("forInArrrayWithIndexNoIndexVar.kt") public void testForInArrrayWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); } @TestMetadata("forInEmptyArrrayWithIndex.kt") public void testForInEmptyArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); } @TestMetadata("forInIntArrrayWithIndex.kt") public void testForInIntArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); } @TestMetadata("forInObjectArrrayWithIndex.kt") public void testForInObjectArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); } } @@ -1513,44 +1396,42 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInCharSequenceWithIndex extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInCharSequenceWithIndex.kt") public void testForInCharSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); } @TestMetadata("forInEmptyStringWithIndex.kt") public void testForInEmptyStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); } @TestMetadata("forInStringWithIndex.kt") public void testForInStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndex.kt"); } @TestMetadata("forInStringWithIndexNoElementVar.kt") public void testForInStringWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); } @TestMetadata("forInStringWithIndexNoIndexVar.kt") public void testForInStringWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); } @TestMetadata("forInStringWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInStringWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -1558,44 +1439,42 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIndices extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIndices"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInCharSequenceIndices.kt") public void testForInCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCharSequenceIndices.kt"); } @TestMetadata("forInCollectionImplicitReceiverIndices.kt") public void testForInCollectionImplicitReceiverIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCollectionImplicitReceiverIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCollectionImplicitReceiverIndices.kt"); } @TestMetadata("forInCollectionIndices.kt") public void testForInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInCollectionIndices.kt"); } @TestMetadata("forInNonOptimizedIndices.kt") public void testForInNonOptimizedIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInNonOptimizedIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInNonOptimizedIndices.kt"); } @TestMetadata("forInObjectArrayIndices.kt") public void testForInObjectArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInObjectArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInObjectArrayIndices.kt"); } @TestMetadata("forInPrimitiveArrayIndices.kt") public void testForInPrimitiveArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInPrimitiveArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIndices/forInPrimitiveArrayIndices.kt"); } } @@ -1603,38 +1482,37 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIterableWithIndex extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInEmptyListWithIndex.kt") public void testForInEmptyListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInEmptyListWithIndex.kt"); } @TestMetadata("forInListWithIndex.kt") public void testForInListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndex.kt"); } @TestMetadata("forInListWithIndexNoElementVar.kt") public void testForInListWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); } @TestMetadata("forInListWithIndexNoIndexVar.kt") public void testForInListWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); } @TestMetadata("forInListWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInListWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -1642,68 +1520,62 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInReversed extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInReversed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInReversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInReversedArrayIndices.kt") public void testForInReversedArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedArrayIndices.kt"); } @TestMetadata("forInReversedCharSequenceIndices.kt") public void testForInReversedCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedCharSequenceIndices.kt"); } @TestMetadata("forInReversedCollectionIndices.kt") public void testForInReversedCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedCollectionIndices.kt"); } @TestMetadata("forInReversedDownTo.kt") public void testForInReversedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedDownTo.kt"); } @TestMetadata("forInReversedEmptyRangeLiteral.kt") public void testForInReversedEmptyRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedEmptyRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedEmptyRangeLiteral.kt"); } @TestMetadata("forInReversedRange.kt") public void testForInReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedRange.kt"); } @TestMetadata("forInReversedRangeLiteral.kt") public void testForInReversedRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedRangeLiteral.kt"); } @TestMetadata("ForInReversedReversedRange.kt") public void testForInReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/ForInReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/ForInReversedReversedRange.kt"); } @TestMetadata("forInReversedReversedReversedRange.kt") public void testForInReversedReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedReversedReversedRange.kt"); } @TestMetadata("forInReversedUntil.kt") public void testForInReversedUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInReversed/forInReversedUntil.kt"); } } @@ -1711,44 +1583,42 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInSequenceWithIndex extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("forInEmptySequenceWithIndex.kt") public void testForInEmptySequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndex.kt") public void testForInSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndexNoElementVar.kt") public void testForInSequenceWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); } @TestMetadata("forInSequenceWithIndexNoIndexVar.kt") public void testForInSequenceWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); } @TestMetadata("forInSequenceWithIndexThrowsCME.kt") public void testForInSequenceWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); } @TestMetadata("forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInSequenceWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/forLoop/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); } } } @@ -1757,14 +1627,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashCode extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/hashCode/hashCode.kt"); } } @@ -1772,104 +1645,92 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ieee754 extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIeee754() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals.kt"); } @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleEquals10.kt"); } @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals.kt"); } @TestMetadata("nullableDoubleNotEquals10.kt") public void testNullableDoubleNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableDoubleNotEquals10.kt"); } @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals.kt"); } @TestMetadata("nullableFloatEquals10.kt") public void testNullableFloatEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatEquals10.kt"); } @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals.kt"); } @TestMetadata("nullableFloatNotEquals10.kt") public void testNullableFloatNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/nullableFloatNotEquals10.kt"); } @TestMetadata("smartCastsForDouble.kt") public void testSmartCastsForDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble.kt"); } @TestMetadata("smartCastsForDouble10.kt") public void testSmartCastsForDouble10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForDouble10.kt"); } @TestMetadata("smartCastsForFloat.kt") public void testSmartCastsForFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat.kt"); } @TestMetadata("smartCastsForFloat10.kt") public void testSmartCastsForFloat10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/smartCastsForFloat10.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/when.kt"); } @TestMetadata("when10.kt") public void testWhen10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/when10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/when10.kt"); } @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast.kt"); } @TestMetadata("whenNullableSmartCast10.kt") public void testWhenNullableSmartCast10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ieee754/whenNullableSmartCast10.kt"); } } @@ -1877,118 +1738,109 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deleteClassOnTransfromation.kt") public void testDeleteClassOnTransfromation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/deleteClassOnTransfromation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/deleteClassOnTransfromation.kt"); } @TestMetadata("finallyMarkers.kt") public void testFinallyMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/finallyMarkers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/finallyMarkers.kt"); } @TestMetadata("inlineReturnsNothing1.kt") public void testInlineReturnsNothing1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/inlineReturnsNothing1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/inlineReturnsNothing1.kt"); } @TestMetadata("inlineReturnsNothing2.kt") public void testInlineReturnsNothing2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/inlineReturnsNothing2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/inlineReturnsNothing2.kt"); } @TestMetadata("inlineReturnsNothing3.kt") public void testInlineReturnsNothing3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/inlineReturnsNothing3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/inlineReturnsNothing3.kt"); } @TestMetadata("linenumberForOneParametersArgumentCall.kt") public void testLinenumberForOneParametersArgumentCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/linenumberForOneParametersArgumentCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/linenumberForOneParametersArgumentCall.kt"); } @TestMetadata("noSynAccessor.kt") public void testNoSynAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/noSynAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/noSynAccessor.kt"); } @TestMetadata("noSynAccessorToDirectFieldAccess.kt") public void testNoSynAccessorToDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/noSynAccessorToDirectFieldAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/noSynAccessorToDirectFieldAccess.kt"); } @TestMetadata("noSynAccessorToSuper.kt") public void testNoSynAccessorToSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/noSynAccessorToSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/noSynAccessorToSuper.kt"); } @TestMetadata("notSplitedExceptionTable.kt") public void testNotSplitedExceptionTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/notSplitedExceptionTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/notSplitedExceptionTable.kt"); } @TestMetadata("reifiedSafeAsWithMutable.kt") public void testReifiedSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/reifiedSafeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/reifiedSafeAsWithMutable.kt"); } @TestMetadata("remappedLocalVar.kt") public void testRemappedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/remappedLocalVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/remappedLocalVar.kt"); } @TestMetadata("removedFinallyMarkers.kt") public void testRemovedFinallyMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/removedFinallyMarkers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/removedFinallyMarkers.kt"); } @TestMetadata("specialEnumFunction.kt") public void testSpecialEnumFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/specialEnumFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/specialEnumFunction.kt"); } @TestMetadata("splitedExceptionTable.kt") public void testSplitedExceptionTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/splitedExceptionTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/splitedExceptionTable.kt"); } @TestMetadata("whenMappingOnCallSite.kt") public void testWhenMappingOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/whenMappingOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/whenMappingOnCallSite.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeText/inline/property") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inline/property/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inline/property/simple.kt"); } } } @@ -1997,176 +1849,152 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asCastForInlineClass.kt") public void testAsCastForInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/asCastForInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/asCastForInlineClass.kt"); } @TestMetadata("assertionsForParametersOfInlineClassTypes.kt") public void testAssertionsForParametersOfInlineClassTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/assertionsForParametersOfInlineClassTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/assertionsForParametersOfInlineClassTypes.kt"); } @TestMetadata("boxInlineClassesOnPassingToVarargs.kt") public void testBoxInlineClassesOnPassingToVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxInlineClassesOnPassingToVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxInlineClassesOnPassingToVarargs.kt"); } @TestMetadata("boxResultAfterConstructorCall.kt") public void testBoxResultAfterConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxResultAfterConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxResultAfterConstructorCall.kt"); } @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxResultInlineClassOfConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxResultInlineClassOfConstructorCall.kt"); } @TestMetadata("boxThisOfInlineClass.kt") public void testBoxThisOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxThisOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxThisOfInlineClass.kt"); } @TestMetadata("boxUnboxInlineClassFromMethodReturnType.kt") public void testBoxUnboxInlineClassFromMethodReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInlineClassFromMethodReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInlineClassFromMethodReturnType.kt"); } @TestMetadata("boxUnboxInsideLambdaAsLastExpression.kt") public void testBoxUnboxInsideLambdaAsLastExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInsideLambdaAsLastExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxInsideLambdaAsLastExpression.kt"); } @TestMetadata("boxUnboxOfInlineClassesWithFunctionalTypes.kt") public void testBoxUnboxOfInlineClassesWithFunctionalTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxOfInlineClassesWithFunctionalTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxOfInlineClassesWithFunctionalTypes.kt"); } @TestMetadata("boxUnboxOnInlinedParameters.kt") public void testBoxUnboxOnInlinedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxOnInlinedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxUnboxOnInlinedParameters.kt"); } @TestMetadata("boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt") public void testBoxingForNonLocalAndLabeledReturnsOfInlineClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/boxingForNonLocalAndLabeledReturnsOfInlineClasses.kt"); } @TestMetadata("callMemberMethodsInsideInlineClass.kt") public void testCallMemberMethodsInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/callMemberMethodsInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/callMemberMethodsInsideInlineClass.kt"); } @TestMetadata("checkOuterInlineFunctionCall.kt") public void testCheckOuterInlineFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/checkOuterInlineFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/checkOuterInlineFunctionCall.kt"); } @TestMetadata("generationOfAccessorToUnderlyingValue.kt") public void testGenerationOfAccessorToUnderlyingValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/generationOfAccessorToUnderlyingValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/generationOfAccessorToUnderlyingValue.kt"); } @TestMetadata("inlineClassBoxingOnAssignment.kt") public void testInlineClassBoxingOnAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingOnAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingOnAssignment.kt"); } @TestMetadata("inlineClassBoxingOnFunctionCall.kt") public void testInlineClassBoxingOnFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingOnFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingOnFunctionCall.kt"); } @TestMetadata("inlineClassBoxingUnboxingInsideInlinedLambda.kt") public void testInlineClassBoxingUnboxingInsideInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingUnboxingInsideInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassBoxingUnboxingInsideInlinedLambda.kt"); } @TestMetadata("inlineClassesUnboxingAfterAssertionOperator.kt") public void testInlineClassesUnboxingAfterAssertionOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassesUnboxingAfterAssertionOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/inlineClassesUnboxingAfterAssertionOperator.kt"); } @TestMetadata("isCheckForInlineClass.kt") public void testIsCheckForInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/isCheckForInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/isCheckForInlineClass.kt"); } @TestMetadata("noAssertionsForInlineClassesBasedOnNullableTypes.kt") public void testNoAssertionsForInlineClassesBasedOnNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/noAssertionsForInlineClassesBasedOnNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/noAssertionsForInlineClassesBasedOnNullableTypes.kt"); } @TestMetadata("passInlineClassesWithSpreadOperatorToVarargs.kt") public void testPassInlineClassesWithSpreadOperatorToVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/passInlineClassesWithSpreadOperatorToVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/passInlineClassesWithSpreadOperatorToVarargs.kt"); } @TestMetadata("skipCallToUnderlyingValueOfInlineClass.kt") public void testSkipCallToUnderlyingValueOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/skipCallToUnderlyingValueOfInlineClass.kt"); } @TestMetadata("uIntArrayIteratorWithoutBoxing.kt") public void testUIntArrayIteratorWithoutBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/uIntArrayIteratorWithoutBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/uIntArrayIteratorWithoutBoxing.kt"); } @TestMetadata("uIntArraySwapBoxing.kt") public void testUIntArraySwapBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/uIntArraySwapBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/uIntArraySwapBoxing.kt"); } @TestMetadata("unboxInlineClassAfterElvis.kt") public void testUnboxInlineClassAfterElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassAfterElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassAfterElvis.kt"); } @TestMetadata("unboxInlineClassAfterSafeCall.kt") public void testUnboxInlineClassAfterSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassAfterSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassAfterSafeCall.kt"); } @TestMetadata("unboxInlineClassFromParameterizedType.kt") public void testUnboxInlineClassFromParameterizedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassFromParameterizedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassFromParameterizedType.kt"); } @TestMetadata("unboxInlineClassesAfterSmartCasts.kt") public void testUnboxInlineClassesAfterSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassesAfterSmartCasts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/inlineClasses/unboxInlineClassesAfterSmartCasts.kt"); } } @@ -2174,32 +2002,32 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Interfaces extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInterfaces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/interfaces"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("firstInheritedMethodIsAbstract.kt") public void testFirstInheritedMethodIsAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/interfaces/firstInheritedMethodIsAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/interfaces/firstInheritedMethodIsAbstract.kt"); } @TestMetadata("noAnyMethodsOnInterfaceInheritance.kt") public void testNoAnyMethodsOnInterfaceInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/interfaces/noAnyMethodsOnInterfaceInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/interfaces/noAnyMethodsOnInterfaceInheritance.kt"); } @TestMetadata("noPrivateMemberInJavaInterface.kt") public void testNoPrivateMemberInJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/interfaces/noPrivateMemberInJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/interfaces/noPrivateMemberInJavaInterface.kt"); } @TestMetadata("traitImplGeneratedOnce.kt") public void testTraitImplGeneratedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/interfaces/traitImplGeneratedOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/interfaces/traitImplGeneratedOnce.kt"); } } @@ -2207,20 +2035,22 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intrinsics extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsics/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsics/javaObjectType.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsics/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsics/javaPrimitiveType.kt"); } } @@ -2228,44 +2058,42 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntrinsicsCompare extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntrinsicsCompare() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/intrinsicsCompare"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("byteSmartCast.kt") public void testByteSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsicsCompare/byteSmartCast.kt"); } @TestMetadata("charSmartCast.kt") public void testCharSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare/charSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsicsCompare/charSmartCast.kt"); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsicsCompare/differentTypes.kt"); } @TestMetadata("intSmartCast.kt") public void testIntSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare/intSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsicsCompare/intSmartCast.kt"); } @TestMetadata("longSmartCast.kt") public void testLongSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare/longSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsicsCompare/longSmartCast.kt"); } @TestMetadata("shortSmartCast.kt") public void testShortSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/intrinsicsCompare/shortSmartCast.kt"); } } @@ -2273,26 +2101,27 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JackAndJill extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJackAndJill() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/jackAndJill"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineDefaultBodyInClass.kt") public void testInlineDefaultBodyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/jackAndJill/inlineDefaultBodyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/jackAndJill/inlineDefaultBodyInClass.kt"); } @TestMetadata("inlinedConstuctor.kt") public void testInlinedConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/jackAndJill/inlinedConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/jackAndJill/inlinedConstuctor.kt"); } @TestMetadata("inlinedConstuctorWithSuperCallParams.kt") public void testInlinedConstuctorWithSuperCallParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/jackAndJill/inlinedConstuctorWithSuperCallParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/jackAndJill/inlinedConstuctorWithSuperCallParams.kt"); } } @@ -2300,50 +2129,47 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LazyCodegen extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLazyCodegen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineConstInsideComparison.kt") public void testInlineConstInsideComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/inlineConstInsideComparison.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/inlineConstInsideComparison.kt"); } @TestMetadata("negateConst.kt") public void testNegateConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConst.kt"); } @TestMetadata("negateConstantCompare.kt") public void testNegateConstantCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt"); } @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/negateObjectComp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateObjectComp.kt"); } @TestMetadata("negateObjectCompChaing.kt") public void testNegateObjectCompChaing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/negateObjectCompChaing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateObjectCompChaing.kt"); } @TestMetadata("negateVar.kt") public void testNegateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/negateVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateVar.kt"); } @TestMetadata("negateVarChain.kt") public void testNegateVarChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lazyCodegen/negateVarChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lazyCodegen/negateVarChain.kt"); } } @@ -2351,32 +2177,32 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LineNumbers extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLineNumbers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/lineNumbers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lineNumbers/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lineNumbers/ifElse.kt"); } @TestMetadata("singleThen.kt") public void testSingleThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lineNumbers/singleThen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lineNumbers/singleThen.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lineNumbers/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lineNumbers/tryCatch.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/lineNumbers/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/lineNumbers/when.kt"); } } @@ -2384,14 +2210,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("optimizedMultifileClassFacadeMethods.kt") public void testOptimizedMultifileClassFacadeMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/multifileClasses/optimizedMultifileClassFacadeMethods.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/multifileClasses/optimizedMultifileClassFacadeMethods.kt"); } } @@ -2399,124 +2228,114 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullCheckOptimization extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullCheckOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("alreadyCheckedForIs.kt") public void testAlreadyCheckedForIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/alreadyCheckedForIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/alreadyCheckedForIs.kt"); } @TestMetadata("alreadyCheckedForNull.kt") public void testAlreadyCheckedForNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/alreadyCheckedForNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/alreadyCheckedForNull.kt"); } @TestMetadata("expressionValueIsNotNull.kt") public void testExpressionValueIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNull.kt"); } @TestMetadata("expressionValueIsNotNullAfterExclExcl.kt") public void testExpressionValueIsNotNullAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNullAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNullAfterExclExcl.kt"); } @TestMetadata("expressionValueIsNotNullTwice.kt") public void testExpressionValueIsNotNullTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNullTwice.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/expressionValueIsNotNullTwice.kt"); } @TestMetadata("ifNullEqualsNull.kt") public void testIfNullEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifNullEqualsNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifNullEqualsNull.kt"); } @TestMetadata("ifNullEqualsNullInline.kt") public void testIfNullEqualsNullInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifNullEqualsNullInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifNullEqualsNullInline.kt"); } @TestMetadata("ifUnitEqualsNull.kt") public void testIfUnitEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifUnitEqualsNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifUnitEqualsNull.kt"); } @TestMetadata("ifUnitEqualsNullInline.kt") public void testIfUnitEqualsNullInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifUnitEqualsNullInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/ifUnitEqualsNullInline.kt"); } @TestMetadata("kt12839.kt") public void testKt12839() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/kt12839.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/kt12839.kt"); } @TestMetadata("notNullAsNotNullable.kt") public void testNotNullAsNotNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/notNullAsNotNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/notNullAsNotNullable.kt"); } @TestMetadata("redundantSafeCall.kt") public void testRedundantSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/redundantSafeCall.kt"); } @TestMetadata("reifiedIs.kt") public void testReifiedIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/reifiedIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/reifiedIs.kt"); } @TestMetadata("reifiedNullIs.kt") public void testReifiedNullIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/reifiedNullIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/reifiedNullIs.kt"); } @TestMetadata("trivialInstanceOf.kt") public void testTrivialInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/trivialInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/trivialInstanceOf.kt"); } @TestMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalLateinit extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkedAlways.kt") public void testCheckedAlways() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedAlways.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedAlways.kt"); } @TestMetadata("checkedOnce.kt") public void testCheckedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/checkedOnce.kt"); } @TestMetadata("initialized.kt") public void testInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/initialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/nullCheckOptimization/localLateinit/initialized.kt"); } } } @@ -2525,68 +2344,62 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ranges extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRanges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ifNotInRange.kt") public void testIfNotInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/ifNotInRange.kt"); } @TestMetadata("inArrayIndices.kt") public void testInArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inArrayIndices.kt"); } @TestMetadata("inCharSequenceIndices.kt") public void testInCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inCharSequenceIndices.kt"); } @TestMetadata("inCollectionIndices.kt") public void testInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inCollectionIndices.kt"); } @TestMetadata("inComparableRangeLiteral.kt") public void testInComparableRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inComparableRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inComparableRangeLiteral.kt"); } @TestMetadata("inNonMatchingRangeIntrinsified.kt") public void testInNonMatchingRangeIntrinsified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inNonMatchingRangeIntrinsified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inNonMatchingRangeIntrinsified.kt"); } @TestMetadata("inNonMatchingRangeNotIntrinsified.kt") public void testInNonMatchingRangeNotIntrinsified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inNonMatchingRangeNotIntrinsified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inNonMatchingRangeNotIntrinsified.kt"); } @TestMetadata("inOptimizableRange.kt") public void testInOptimizableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inOptimizableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inOptimizableRange.kt"); } @TestMetadata("inUntil.kt") public void testInUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/inUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/inUntil.kt"); } @TestMetadata("noDupXForLiteralRangeContains.kt") public void testNoDupXForLiteralRangeContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/ranges/noDupXForLiteralRangeContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/ranges/noDupXForLiteralRangeContains.kt"); } } @@ -2594,20 +2407,22 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("samWrapperForNullInitialization.kt") public void testSamWrapperForNullInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullInitialization.kt"); } @TestMetadata("samWrapperForNullableInitialization.kt") public void testSamWrapperForNullableInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullableInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/sam/samWrapperForNullableInitialization.kt"); } } @@ -2615,56 +2430,52 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statements extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatements() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/statements"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ifSingleBranch.kt") public void testIfSingleBranch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/ifSingleBranch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/ifSingleBranch.kt"); } @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/ifThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/ifThenElse.kt"); } @TestMetadata("ifThenElseEmpty.kt") public void testIfThenElseEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/ifThenElseEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/ifThenElseEmpty.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/labeled.kt"); } @TestMetadata("statementsComposition.kt") public void testStatementsComposition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/statementsComposition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/statementsComposition.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/tryCatchFinally.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/when.kt"); } @TestMetadata("whenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/statements/whenSubject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/statements/whenSubject.kt"); } } @@ -2672,20 +2483,22 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticFields extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/staticFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/staticFields/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/staticFields/classObject.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/staticFields/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/staticFields/object.kt"); } } @@ -2693,38 +2506,37 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StoreStackBeforeInline extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/differentTypes.kt"); } @TestMetadata("primitiveMerge.kt") public void testPrimitiveMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/primitiveMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/primitiveMerge.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/simple.kt"); } @TestMetadata("unreachableMarker.kt") public void testUnreachableMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/unreachableMarker.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/unreachableMarker.kt"); } @TestMetadata("withLambda.kt") public void testWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/withLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/storeStackBeforeInline/withLambda.kt"); } } @@ -2732,62 +2544,57 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringOperations extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/stringOperations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("concat.kt") public void testConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/concat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/concat.kt"); } @TestMetadata("interpolation.kt") public void testInterpolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/interpolation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/interpolation.kt"); } @TestMetadata("kt15235.kt") public void testKt15235() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/kt15235.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/kt15235.kt"); } @TestMetadata("kt19037.kt") public void testKt19037() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/kt19037.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/kt19037.kt"); } @TestMetadata("nestedConcat.kt") public void testNestedConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/nestedConcat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/nestedConcat.kt"); } @TestMetadata("nonNullableStringPlus.kt") public void testNonNullableStringPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/nonNullableStringPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/nonNullableStringPlus.kt"); } @TestMetadata("nullableStringPlus.kt") public void testNullableStringPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/nullableStringPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/nullableStringPlus.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/plusAssign.kt"); } @TestMetadata("primitiveToString.kt") public void testPrimitiveToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/stringOperations/primitiveToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/stringOperations/primitiveToString.kt"); } } @@ -2795,14 +2602,17 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doNotCopyImmediatelyCreatedArrays.kt") public void testDoNotCopyImmediatelyCreatedArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/varargs/doNotCopyImmediatelyCreatedArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/varargs/doNotCopyImmediatelyCreatedArrays.kt"); } } @@ -2810,86 +2620,77 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exhaustiveWhenInitialization.kt") public void testExhaustiveWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenInitialization.kt"); } @TestMetadata("exhaustiveWhenReturn.kt") public void testExhaustiveWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenReturn.kt"); } @TestMetadata("exhaustiveWhenUnit.kt") public void testExhaustiveWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenUnit.kt"); } @TestMetadata("exhaustiveWhenUnitStatement.kt") public void testExhaustiveWhenUnitStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenUnitStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/exhaustiveWhenUnitStatement.kt"); } @TestMetadata("inlineConstValsInsideWhen.kt") public void testInlineConstValsInsideWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/inlineConstValsInsideWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/inlineConstValsInsideWhen.kt"); } @TestMetadata("integralWhenWithNoInlinedConstants.kt") public void testIntegralWhenWithNoInlinedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/integralWhenWithNoInlinedConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/integralWhenWithNoInlinedConstants.kt"); } @TestMetadata("kt18818.kt") public void testKt18818() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/kt18818.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/kt18818.kt"); } @TestMetadata("noBoxingInDefaultWhenWithSpecialCases.kt") public void testNoBoxingInDefaultWhenWithSpecialCases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/noBoxingInDefaultWhenWithSpecialCases.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/noBoxingInDefaultWhenWithSpecialCases.kt"); } @TestMetadata("qualifiedConstValsInsideWhen.kt") public void testQualifiedConstValsInsideWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/qualifiedConstValsInsideWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/qualifiedConstValsInsideWhen.kt"); } @TestMetadata("sealedWhenInitialization.kt") public void testSealedWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/sealedWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/sealedWhenInitialization.kt"); } @TestMetadata("simpleConstValsInsideWhen.kt") public void testSimpleConstValsInsideWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/simpleConstValsInsideWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/simpleConstValsInsideWhen.kt"); } @TestMetadata("whenNull.kt") public void testWhenNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/whenNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/whenNull.kt"); } @TestMetadata("whenZero.kt") public void testWhenZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/when/whenZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/when/whenZero.kt"); } } @@ -2897,86 +2698,77 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenEnumOptimization extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhenEnumOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenEnumOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bigEnum.kt") public void testBigEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/bigEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/bigEnum.kt"); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/duplicatingItems.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/expression.kt"); } @TestMetadata("functionLiteralInTopLevel.kt") public void testFunctionLiteralInTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/functionLiteralInTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/functionLiteralInTopLevel.kt"); } @TestMetadata("importedEnumEntry.kt") public void testImportedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/importedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/importedEnumEntry.kt"); } @TestMetadata("kt14597_full.kt") public void testKt14597_full() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14597_full.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14597_full.kt"); } @TestMetadata("kt14802.kt") public void testKt14802() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14802.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt14802.kt"); } @TestMetadata("kt15806.kt") public void testKt15806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/kt15806.kt"); } @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/manyWhensWithinClass.kt"); } @TestMetadata("nonConstantEnum.kt") public void testNonConstantEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/nonConstantEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/nonConstantEnum.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/nullability.kt"); } @TestMetadata("subjectAny.kt") public void testSubjectAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/subjectAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/subjectAny.kt"); } @TestMetadata("withoutElse.kt") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenEnumOptimization/withoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenEnumOptimization/withoutElse.kt"); } } @@ -2984,62 +2776,57 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenStringOptimization extends AbstractBytecodeTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhenStringOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeText/whenStringOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("denseHashCode.kt") public void testDenseHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/denseHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/denseHashCode.kt"); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItems.kt"); } @TestMetadata("duplicatingItemsSameHashCode.kt") public void testDuplicatingItemsSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/duplicatingItemsSameHashCode.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/expression.kt"); } @TestMetadata("inlineStringConstInsideWhen.kt") public void testInlineStringConstInsideWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/inlineStringConstInsideWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/inlineStringConstInsideWhen.kt"); } @TestMetadata("nonInlinedConst.kt") public void testNonInlinedConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/nullability.kt"); } @TestMetadata("sameHashCode.kt") public void testSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/sameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/sameHashCode.kt"); } @TestMetadata("statement.kt") public void testStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/whenStringOptimization/statement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/bytecodeText/whenStringOptimization/statement.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CheckLocalVariablesTableTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CheckLocalVariablesTableTestGenerated.java index 73770884aaf..1ad1d44b173 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CheckLocalVariablesTableTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CheckLocalVariablesTableTestGenerated.java @@ -21,103 +21,91 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CheckLocalVariablesTableTestGenerated extends AbstractCheckLocalVariablesTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckLocalVariablesTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/checkLocalVariablesTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchClause.kt") public void testCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/catchClause.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/catchClause.kt"); } @TestMetadata("copyFunction.kt") public void testCopyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/copyFunction.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/copyFunction.kt"); } @TestMetadata("destructuringInLambdas.kt") public void testDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/destructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/destructuringInLambdas.kt"); } @TestMetadata("destructuringInlineLambda.kt") public void testDestructuringInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/destructuringInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/destructuringInlineLambda.kt"); } @TestMetadata("inlineLambdaWithItParam.kt") public void testInlineLambdaWithItParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineLambdaWithItParam.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/inlineLambdaWithItParam.kt"); } @TestMetadata("inlineLambdaWithParam.kt") public void testInlineLambdaWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineLambdaWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/inlineLambdaWithParam.kt"); } @TestMetadata("inlineProperty.kt") public void testInlineProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineProperty.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/inlineProperty.kt"); } @TestMetadata("inlineSimple.kt") public void testInlineSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineSimple.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/inlineSimple.kt"); } @TestMetadata("inlineSimpleChain.kt") public void testInlineSimpleChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/inlineSimpleChain.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/inlineSimpleChain.kt"); } @TestMetadata("itInLambda.kt") public void testItInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/itInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/itInLambda.kt"); } @TestMetadata("itInReturnedLambda.kt") public void testItInReturnedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/itInReturnedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/itInReturnedLambda.kt"); } @TestMetadata("jvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/jvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/jvmOverloads.kt"); } @TestMetadata("kt11117.kt") public void testKt11117() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/kt11117.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/kt11117.kt"); } @TestMetadata("lambdaAsVar.kt") public void testLambdaAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/lambdaAsVar.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/lambdaAsVar.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/localFun.kt"); } @TestMetadata("underscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/checkLocalVariablesTable/underscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/checkLocalVariablesTable/underscoreNames.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java index 5d0f226978f..c72bee3d5f4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstInlineKotlinTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,298 +33,259 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSite.kt"); } @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnCallSiteSuperParams.kt"); } @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSite.kt"); } @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/anonymousObjectOnDeclarationSiteSuperParams.kt"); } @TestMetadata("capturedLambdaInInline.kt") public void testCapturedLambdaInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline.kt"); } @TestMetadata("capturedLambdaInInline2.kt") public void testCapturedLambdaInInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline2.kt"); } @TestMetadata("capturedLambdaInInline3.kt") public void testCapturedLambdaInInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInline3.kt"); } @TestMetadata("capturedLambdaInInlineObject.kt") public void testCapturedLambdaInInlineObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/capturedLambdaInInlineObject.kt"); } @TestMetadata("changingReturnType.kt") public void testChangingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/changingReturnType.kt"); } @TestMetadata("constructorVisibility.kt") public void testConstructorVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibility.kt"); } @TestMetadata("constructorVisibilityInConstLambda.kt") public void testConstructorVisibilityInConstLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInConstLambda.kt"); } @TestMetadata("constructorVisibilityInLambda.kt") public void testConstructorVisibilityInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/constructorVisibilityInLambda.kt"); } @TestMetadata("defineClass.kt") public void testDefineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/defineClass.kt"); } @TestMetadata("kt13133.kt") public void testKt13133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13133.kt"); } @TestMetadata("kt13182.kt") public void testKt13182() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13182.kt"); } @TestMetadata("kt13374.kt") public void testKt13374() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt13374.kt"); } @TestMetadata("kt14011.kt") public void testKt14011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011.kt"); } @TestMetadata("kt14011_2.kt") public void testKt14011_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_2.kt"); } @TestMetadata("kt14011_3.kt") public void testKt14011_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt14011_3.kt"); } @TestMetadata("kt16193.kt") public void testKt16193() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt16193.kt"); } @TestMetadata("kt17972.kt") public void testKt17972() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972.kt"); } @TestMetadata("kt17972_2.kt") public void testKt17972_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_2.kt"); } @TestMetadata("kt17972_3.kt") public void testKt17972_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_3.kt"); } @TestMetadata("kt17972_4.kt") public void testKt17972_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_4.kt"); } @TestMetadata("kt17972_5.kt") public void testKt17972_5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_5.kt"); } @TestMetadata("kt17972_super.kt") public void testKt17972_super() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super.kt"); } @TestMetadata("kt17972_super2.kt") public void testKt17972_super2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super2.kt"); } @TestMetadata("kt17972_super3.kt") public void testKt17972_super3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt17972_super3.kt"); } @TestMetadata("kt19399.kt") public void testKt19399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19399.kt"); } @TestMetadata("kt19434.kt") public void testKt19434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434.kt"); } @TestMetadata("kt19434_2.kt") public void testKt19434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19434_2.kt"); } @TestMetadata("kt19723.kt") public void testKt19723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt19723.kt"); } @TestMetadata("kt6552.kt") public void testKt6552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt6552.kt"); } @TestMetadata("kt8133.kt") public void testKt8133() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt8133.kt"); } @TestMetadata("kt9064.kt") public void testKt9064() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064.kt"); } @TestMetadata("kt9064v2.kt") public void testKt9064v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9064v2.kt"); } @TestMetadata("kt9591.kt") public void testKt9591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9591.kt"); } @TestMetadata("kt9877.kt") public void testKt9877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877.kt"); } @TestMetadata("kt9877_2.kt") public void testKt9877_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/kt9877_2.kt"); } @TestMetadata("objectInLambdaCapturesAnotherObject.kt") public void testObjectInLambdaCapturesAnotherObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/objectInLambdaCapturesAnotherObject.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall.kt"); } @TestMetadata("safeCall_2.kt") public void testSafeCall_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/safeCall_2.kt"); } @TestMetadata("sam.kt") public void testSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumWhen extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnumWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/enumWhen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/callSite.kt"); } @TestMetadata("declSite.kt") public void testDeclSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSite.kt"); } @TestMetadata("declSiteSeveralMappings.kt") public void testDeclSiteSeveralMappings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappings.kt"); } @TestMetadata("declSiteSeveralMappingsDifOrder.kt") public void testDeclSiteSeveralMappingsDifOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/enumWhen/declSiteSeveralMappingsDifOrder.kt"); } } @@ -328,44 +293,42 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturing extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/inlineChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChainSimple.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/lambdaChain_3.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturing/noInlineLambda.kt"); } } @@ -373,80 +336,72 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProperRecapturingInClass extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperRecapturingInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlineChain.kt"); } @TestMetadata("inlinelambdaChain.kt") public void testInlinelambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/inlinelambdaChain.kt"); } @TestMetadata("lambdaChain.kt") public void testLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain.kt"); } @TestMetadata("lambdaChainSimple.kt") public void testLambdaChainSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple.kt"); } @TestMetadata("lambdaChainSimple_2.kt") public void testLambdaChainSimple_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChainSimple_2.kt"); } @TestMetadata("lambdaChain_2.kt") public void testLambdaChain_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_2.kt"); } @TestMetadata("lambdaChain_3.kt") public void testLambdaChain_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/lambdaChain_3.kt"); } @TestMetadata("noCapturedThisOnCallSite.kt") public void testNoCapturedThisOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noCapturedThisOnCallSite.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/noInlineLambda.kt"); } @TestMetadata("twoInlineLambda.kt") public void testTwoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambda.kt"); } @TestMetadata("twoInlineLambdaComplex.kt") public void testTwoInlineLambdaComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex.kt"); } @TestMetadata("twoInlineLambdaComplex_2.kt") public void testTwoInlineLambdaComplex_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/properRecapturingInClass/twoInlineLambdaComplex_2.kt"); } } @@ -454,44 +409,42 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt17091.kt"); } @TestMetadata("kt21671.kt") public void testKt21671() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671.kt"); } @TestMetadata("kt21671_2.kt") public void testKt21671_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_2.kt"); } @TestMetadata("kt21671_3.kt") public void testKt21671_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt21671_3.kt"); } @TestMetadata("kt22304.kt") public void testKt22304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/kt22304.kt"); } @TestMetadata("samOnCallSite.kt") public void testSamOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/sam/samOnCallSite.kt"); } } @@ -499,38 +452,37 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TwoCapturedReceivers extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTwoCapturedReceivers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt8668.kt") public void testKt8668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668.kt"); } @TestMetadata("kt8668_2.kt") public void testKt8668_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_2.kt"); } @TestMetadata("kt8668_3.kt") public void testKt8668_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/kt8668_3.kt"); } @TestMetadata("twoDifferentDispatchReceivers.kt") public void testTwoDifferentDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoDifferentDispatchReceivers.kt"); } @TestMetadata("twoExtensionReceivers.kt") public void testTwoExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/anonymousObject/twoCapturedReceivers/twoExtensionReceivers.kt"); } } } @@ -539,80 +491,72 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReference2.kt") public void testBoundFunctionReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/boundFunctionReference2.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaultParametersAndLastVararg.kt") public void testDefaultParametersAndLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/defaultParametersAndLastVararg.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/extensionInClass.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/simpleInClass.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/argumentOrder/varargAndDefaultParameters.kt"); } } @@ -620,44 +564,42 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayConvention extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/arrayConvention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleAccess.kt") public void testSimpleAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccess.kt"); } @TestMetadata("simpleAccessInClass.kt") public void testSimpleAccessInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessInClass.kt"); } @TestMetadata("simpleAccessWithDefault.kt") public void testSimpleAccessWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefault.kt"); } @TestMetadata("simpleAccessWithDefaultInClass.kt") public void testSimpleAccessWithDefaultInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithDefaultInClass.kt"); } @TestMetadata("simpleAccessWithLambda.kt") public void testSimpleAccessWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambda.kt"); } @TestMetadata("simpleAccessWithLambdaInClass.kt") public void testSimpleAccessWithLambdaInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/arrayConvention/simpleAccessWithLambdaInClass.kt"); } } @@ -665,20 +607,22 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Builders extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBuilders() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/builders"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/builders.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/builders.kt"); } @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/builders/buildersAndLambdaCapturing.kt"); } } @@ -686,14 +630,17 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BytecodePreprocessing extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodePreprocessing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/bytecodePreprocessing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apiVersionAtLeast1.kt") public void testApiVersionAtLeast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/bytecodePreprocessing/apiVersionAtLeast1.kt"); } } @@ -701,178 +648,159 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } @TestMetadata("filter.kt") public void testFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); } } } @@ -881,44 +809,42 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Capture extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapture() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/capture"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinable.kt"); } @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureInlinableAndOther.kt"); } @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/captureThisAndReceiver.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/generics.kt"); } @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInClass.kt"); } @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/capture/simpleCapturingInPackage.kt"); } } @@ -926,50 +852,47 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Complex extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/closureChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/closureChain.kt"); } @TestMetadata("forEachLine.kt") public void testForEachLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/forEachLine.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/lambdaInLambda.kt"); } @TestMetadata("swapAndWith.kt") public void testSwapAndWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith.kt"); } @TestMetadata("swapAndWith2.kt") public void testSwapAndWith2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/swapAndWith2.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/use.kt"); } @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complex/with.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complex/with.kt"); } } @@ -977,50 +900,47 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ComplexStack extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComplexStack() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/complexStack"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asCheck.kt") public void testAsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck.kt"); } @TestMetadata("asCheck2.kt") public void testAsCheck2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/asCheck2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple2.kt"); } @TestMetadata("simple3.kt") public void testSimple3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple3.kt"); } @TestMetadata("simple4.kt") public void testSimple4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simple4.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/complexStack/simpleExtension.kt"); } } @@ -1028,62 +948,57 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializer.kt"); } @TestMetadata("complexInitializerWithStackTransformation.kt") public void testComplexInitializerWithStackTransformation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/complexInitializerWithStackTransformation.kt"); } @TestMetadata("definiteLongValInitialization.kt") public void testDefiniteLongValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteLongValInitialization.kt"); } @TestMetadata("definiteNestedValInitialization.kt") public void testDefiniteNestedValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteNestedValInitialization.kt"); } @TestMetadata("definiteValInitialization.kt") public void testDefiniteValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/definiteValInitialization.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturn.kt"); } @TestMetadata("nonLocalReturnWithCycle.kt") public void testNonLocalReturnWithCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/nonLocalReturnWithCycle.kt"); } @TestMetadata("propertyInitialization.kt") public void testPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/propertyInitialization.kt"); } @TestMetadata("valInitializationAndUsageInNestedLambda.kt") public void testValInitializationAndUsageInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/contracts/valInitializationAndUsageInNestedLambda.kt"); } } @@ -1091,16 +1006,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValues extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } public void testAllFilesPresentInDefaultValues() throws Exception { @@ -1109,390 +1026,336 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaInlining extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } @TestMetadata("instanceCapuredInClass.kt") public void testInstanceCapuredInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); } @TestMetadata("instanceCapuredInInterface.kt") public void testInstanceCapuredInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); } @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); } } } @@ -1501,16 +1364,18 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaskElimination extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } public void testAllFilesPresentInMaskElimination() throws Exception { @@ -1519,32 +1384,27 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); } } } @@ -1553,32 +1413,32 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/kt16864.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/local.kt"); } @TestMetadata("localInAnonymousObject.kt") public void testLocalInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInAnonymousObject.kt"); } @TestMetadata("localInLambda.kt") public void testLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/delegatedProperty/localInLambda.kt"); } } @@ -1586,50 +1446,47 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnclosingInfo extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnclosingInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enclosingInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInLambda.kt") public void testAnonymousInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/anonymousInLambda.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain.kt"); } @TestMetadata("inlineChain2.kt") public void testInlineChain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/inlineChain2.kt"); } @TestMetadata("objectInInlineFun.kt") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/objectInInlineFun.kt"); } @TestMetadata("transformedConstructor.kt") public void testTransformedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructor.kt"); } @TestMetadata("transformedConstructorWithAdditionalObject.kt") public void testTransformedConstructorWithAdditionalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithAdditionalObject.kt"); } @TestMetadata("transformedConstructorWithNestedInline.kt") public void testTransformedConstructorWithNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enclosingInfo/transformedConstructorWithNestedInline.kt"); } } @@ -1637,86 +1494,77 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt10569.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt18254.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } @TestMetadata("values.kt") public void testValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/values.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } @@ -1724,14 +1572,17 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/functionExpression/extension.kt"); } } @@ -1739,20 +1590,22 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/innerClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/innerLambda.kt"); } @TestMetadata("kt10259.kt") public void testKt10259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/innerClasses/kt10259.kt"); } } @@ -1760,14 +1613,17 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/jvmPackageName/simple.kt"); } } @@ -1775,20 +1631,22 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClassClash extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaClassClash() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaClassClash"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaClassClash.kt") public void testLambdaClassClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/lambdaClassClash.kt"); } @TestMetadata("noInlineLambdaX2.kt") public void testNoInlineLambdaX2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaClassClash/noInlineLambdaX2.kt"); } } @@ -1796,38 +1654,37 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaTransformation extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaTransformation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/lambdaTransformation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaCloning.kt"); } @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambda2.kt"); } @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/lambdaInLambdaNoInline.kt"); } @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/regeneratedLambdaName.kt"); } @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/lambdaTransformation/sameCaptured.kt"); } } @@ -1835,26 +1692,27 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunInLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalFunInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/localFunInLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaInLambdaCapturesAnotherFun.kt") public void testLambdaInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/lambdaInLambdaCapturesAnotherFun.kt"); } @TestMetadata("localFunInLambda.kt") public void testLocalFunInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambda.kt"); } @TestMetadata("localFunInLambdaCapturesAnotherFun.kt") public void testLocalFunInLambdaCapturesAnotherFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/localFunInLambda/localFunInLambdaCapturesAnotherFun.kt"); } } @@ -1862,20 +1720,22 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFromOptimizedMultifileClass.kt") public void testInlineFromOptimizedMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOptimizedMultifileClass.kt"); } @TestMetadata("inlineFromOtherPackage.kt") public void testInlineFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/multifileClasses/inlineFromOtherPackage.kt"); } } @@ -1883,50 +1743,47 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoInline extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } @@ -1934,106 +1791,99 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } @@ -2041,106 +1891,99 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } @@ -2148,56 +1991,52 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChained() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } @@ -2205,80 +2044,72 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } @@ -2286,104 +2117,92 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExceptionTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } @@ -2391,14 +2210,17 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); } } } @@ -2408,14 +2230,17 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/optimizations/kt20844.kt"); } } @@ -2423,22 +2248,23 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorForConst.kt") public void testAccessorForConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorForConst.kt"); } @TestMetadata("accessorStability.kt") public void testAccessorStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStability.kt"); } @TestMetadata("accessorStabilityInClass.kt") public void testAccessorStabilityInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/accessorStabilityInClass.kt"); } public void testAllFilesPresentInPrivate() throws Exception { @@ -2447,56 +2273,47 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestMetadata("effectivePrivate.kt") public void testEffectivePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/effectivePrivate.kt"); } @TestMetadata("kt6453.kt") public void testKt6453() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt6453.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt6453.kt"); } @TestMetadata("kt8094.kt") public void testKt8094() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8094.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8094.kt"); } @TestMetadata("kt8095.kt") public void testKt8095() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/kt8095.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/kt8095.kt"); } @TestMetadata("nestedInPrivateClass.kt") public void testNestedInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/nestedInPrivateClass.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClass.kt"); } @TestMetadata("privateClassExtensionLambda.kt") public void testPrivateClassExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateClassExtensionLambda.kt"); } @TestMetadata("privateInInlineInMultiFileFacade.kt") public void testPrivateInInlineInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInInlineInMultiFileFacade.kt"); } @TestMetadata("privateInline.kt") public void testPrivateInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/private/privateInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/private/privateInline.kt"); } } @@ -2504,74 +2321,67 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/property.kt"); } @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } @@ -2579,136 +2389,124 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedLambda.kt") public void testCapturedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda.kt"); } @TestMetadata("capturedLambda2.kt") public void testCapturedLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/capturedLambda2.kt"); } @TestMetadata("kt11081.kt") public void testKt11081() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11081.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11081.kt"); } @TestMetadata("kt11677.kt") public void testKt11677() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt11677.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt11677.kt"); } @TestMetadata("kt15997.kt") public void testKt15997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997.kt"); } @TestMetadata("kt15997_2.kt") public void testKt15997_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt15997_2.kt"); } @TestMetadata("kt6988.kt") public void testKt6988() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988.kt"); } @TestMetadata("kt6988_2.kt") public void testKt6988_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6988_2.kt"); } @TestMetadata("kt6990.kt") public void testKt6990() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt6990.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt6990.kt"); } @TestMetadata("kt7017.kt") public void testKt7017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt7017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt7017.kt"); } @TestMetadata("kt8047.kt") public void testKt8047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt8047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt8047.kt"); } @TestMetadata("kt9637.kt") public void testKt9637() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637.kt"); } @TestMetadata("kt9637_2.kt") public void testKt9637_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/kt9637_2.kt"); } @TestMetadata("packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/packages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/packages.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/reified/checkCast") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckCast extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/checkCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/chain.kt"); } @TestMetadata("kt8043.kt") public void testKt8043() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/kt8043.kt"); } @TestMetadata("maxStack.kt") public void testMaxStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/maxStack.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simple.kt"); } @TestMetadata("simpleSafe.kt") public void testSimpleSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/checkCast/simpleSafe.kt"); } } @@ -2716,56 +2514,52 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/chain.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2.kt"); } @TestMetadata("nested2Static.kt") public void testNested2Static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nested2Static.kt"); } @TestMetadata("nestedStatic.kt") public void testNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/nestedStatic.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/simple.kt"); } @TestMetadata("transitiveChain.kt") public void testTransitiveChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChain.kt"); } @TestMetadata("transitiveChainStatic.kt") public void testTransitiveChainStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/defaultLambda/transitiveChainStatic.kt"); } } @@ -2773,26 +2567,27 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsCheck extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/reified/isCheck"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chain.kt") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/chain.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/reified/isCheck/simple.kt"); } } } @@ -2801,62 +2596,57 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inProjectionSubstitution.kt") public void testInProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/inProjectionSubstitution.kt"); } @TestMetadata("outProjectionSubstitution.kt") public void testOutProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/outProjectionSubstitution.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/recursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/recursion.kt"); } @TestMetadata("sameFormalParameterName.kt") public void testSameFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameFormalParameterName.kt"); } @TestMetadata("sameReifiedFormalParameterName.kt") public void testSameReifiedFormalParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/sameReifiedFormalParameterName.kt"); } @TestMetadata("starProjectionSubstitution.kt") public void testStarProjectionSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/starProjectionSubstitution.kt"); } @TestMetadata("typeParameterInLambda.kt") public void testTypeParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParameterInLambda.kt"); } @TestMetadata("typeParametersSubstitution.kt") public void testTypeParametersSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution.kt"); } @TestMetadata("typeParametersSubstitution2.kt") public void testTypeParametersSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/signature/typeParametersSubstitution2.kt"); } } @@ -2864,122 +2654,107 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimple() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/simple"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/classObject.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuring.kt"); } @TestMetadata("destructuringIndexClash.kt") public void testDestructuringIndexClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/destructuringIndexClash.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extension.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/extensionLambda.kt"); } @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/funImportedFromObject.kt"); } @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/params.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/params.kt"); } @TestMetadata("propImportedFromObject.kt") public void testPropImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/propImportedFromObject.kt"); } @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/rootConstructor.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/safeCall.kt"); } @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalClosures.kt"); } @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/severalUsage.kt"); } @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleDouble.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleEnum.kt"); } @TestMetadata("simpleGenerics.kt") public void testSimpleGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleGenerics.kt"); } @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleInt.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleLambda.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/simpleObject.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/simple/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/simple/vararg.kt"); } } @@ -2987,106 +2762,99 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assertion.kt") public void testAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/assertion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/assertion.kt"); } @TestMetadata("classFromDefaultPackage.kt") public void testClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/classFromDefaultPackage.kt"); } @TestMetadata("defaultFunction.kt") public void testDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultFunction.kt"); } @TestMetadata("oneFile.kt") public void testOneFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/oneFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/oneFile.kt"); } @TestMetadata("smap.kt") public void testSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/smap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/smap.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/smap/anonymous") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Anonymous extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymous() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/anonymous"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt19175.kt") public void testKt19175() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/kt19175.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambda.kt"); } @TestMetadata("lambdaOnCallSite.kt") public void testLambdaOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnCallSite.kt"); } @TestMetadata("lambdaOnInlineCallSite.kt") public void testLambdaOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/lambdaOnInlineCallSite.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/object.kt"); } @TestMetadata("objectOnCallSite.kt") public void testObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnCallSite.kt"); } @TestMetadata("objectOnInlineCallSite.kt") public void testObjectOnInlineCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite.kt"); } @TestMetadata("objectOnInlineCallSite2.kt") public void testObjectOnInlineCallSite2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSite2.kt"); } @TestMetadata("objectOnInlineCallSiteWithCapture.kt") public void testObjectOnInlineCallSiteWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/objectOnInlineCallSiteWithCapture.kt"); } @TestMetadata("severalMappingsForDefaultFile.kt") public void testSeveralMappingsForDefaultFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/anonymous/severalMappingsForDefaultFile.kt"); } } @@ -3094,62 +2862,57 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/defaultLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultLambdaInAnonymous.kt") public void testDefaultLambdaInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/defaultLambdaInAnonymous.kt"); } @TestMetadata("inlinInDefault.kt") public void testInlinInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault.kt"); } @TestMetadata("inlinInDefault2.kt") public void testInlinInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlinInDefault2.kt"); } @TestMetadata("inlineAnonymousInDefault.kt") public void testInlineAnonymousInDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault.kt"); } @TestMetadata("inlineAnonymousInDefault2.kt") public void testInlineAnonymousInDefault2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/inlineAnonymousInDefault2.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/kt21827.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/nested.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple.kt"); } @TestMetadata("simple2.kt") public void testSimple2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/defaultLambda/simple2.kt"); } } @@ -3157,32 +2920,32 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineOnly extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/inlineOnly"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noSmap.kt") public void testNoSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmap.kt"); } @TestMetadata("noSmapWithProperty.kt") public void testNoSmapWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/noSmapWithProperty.kt"); } @TestMetadata("reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reified.kt"); } @TestMetadata("reifiedProperty.kt") public void testReifiedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/inlineOnly/reifiedProperty.kt"); } } @@ -3190,32 +2953,32 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Newsmap extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewsmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/newsmap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentMapping.kt") public void testDifferentMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/differentMapping.kt"); } @TestMetadata("mappingInInlineFunLambda.kt") public void testMappingInInlineFunLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInInlineFunLambda.kt"); } @TestMetadata("mappingInSubInlineLambda.kt") public void testMappingInSubInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambda.kt"); } @TestMetadata("mappingInSubInlineLambdaSameFileInline.kt") public void testMappingInSubInlineLambdaSameFileInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/newsmap/mappingInSubInlineLambdaSameFileInline.kt"); } } @@ -3223,20 +2986,22 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/smap/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineComponent.kt") public void testInlineComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineComponent.kt"); } @TestMetadata("inlineIterator.kt") public void testInlineIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/smap/resolve/inlineIterator.kt"); } } } @@ -3245,56 +3010,52 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Special extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecial() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/special"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("identityCheck.kt") public void testIdentityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/identityCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/identityCheck.kt"); } @TestMetadata("ifBranches.kt") public void testIfBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/ifBranches.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/ifBranches.kt"); } @TestMetadata("iinc.kt") public void testIinc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/iinc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/iinc.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/inlineChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/inlineChain.kt"); } @TestMetadata("loopInStoreLoadChains.kt") public void testLoopInStoreLoadChains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains.kt"); } @TestMetadata("loopInStoreLoadChains2.kt") public void testLoopInStoreLoadChains2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/loopInStoreLoadChains2.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/plusAssign.kt"); } @TestMetadata("stackHeightBug.kt") public void testStackHeightBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/special/stackHeightBug.kt"); } } @@ -3302,92 +3063,82 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackOnReturn extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStackOnReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/stackOnReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/elvis.kt"); } @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/ifThenElse.kt"); } @TestMetadata("kt11499.kt") public void testKt11499() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt11499.kt"); } @TestMetadata("kt17591.kt") public void testKt17591() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591.kt"); } @TestMetadata("kt17591a.kt") public void testKt17591a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591a.kt"); } @TestMetadata("kt17591b.kt") public void testKt17591b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/kt17591b.kt"); } @TestMetadata("mixedTypesOnStack1.kt") public void testMixedTypesOnStack1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack1.kt"); } @TestMetadata("mixedTypesOnStack2.kt") public void testMixedTypesOnStack2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack2.kt"); } @TestMetadata("mixedTypesOnStack3.kt") public void testMixedTypesOnStack3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/mixedTypesOnStack3.kt"); } @TestMetadata("nonLocalReturn1.kt") public void testNonLocalReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn1.kt"); } @TestMetadata("nonLocalReturn2.kt") public void testNonLocalReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn2.kt"); } @TestMetadata("nonLocalReturn3.kt") public void testNonLocalReturn3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/nonLocalReturn3.kt"); } @TestMetadata("returnLong.kt") public void testReturnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/returnLong.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/stackOnReturn/tryFinally.kt"); } } @@ -3395,118 +3146,109 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suspend extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/capturedVariables.kt"); } @TestMetadata("crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt") public void testCrossinlineSuspendLambdaInsideCrossinlineSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/crossinlineSuspendLambdaInsideCrossinlineSuspendLambda.kt"); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendContinuation.kt") public void testInlineSuspendContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendContinuation.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/inlineSuspendOfSuspend.kt"); } @TestMetadata("multipleLocals.kt") public void testMultipleLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleLocals.kt"); } @TestMetadata("multipleSuspensionPoints.kt") public void testMultipleSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/multipleSuspensionPoints.kt"); } @TestMetadata("returnValue.kt") public void testReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/returnValue.kt"); } @TestMetadata("tryCatchStackTransform.kt") public void testTryCatchStackTransform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/tryCatchStackTransform.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultParameter extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/defaultParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultValueCrossinline.kt") public void testDefaultValueCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueCrossinline.kt"); } @TestMetadata("defaultValueInline.kt") public void testDefaultValueInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/defaultParameter/defaultValueInline.kt"); } } @@ -3514,56 +3256,52 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Receiver extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/receiver"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineOrdinaryOfCrossinlineSuspend.kt") public void testInlineOrdinaryOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfCrossinlineSuspend.kt"); } @TestMetadata("inlineOrdinaryOfNoinlineSuspend.kt") public void testInlineOrdinaryOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineOrdinaryOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfCrossinlineOrdinary.kt") public void testInlineSuspendOfCrossinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfCrossinlineSuspend.kt") public void testInlineSuspendOfCrossinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfCrossinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfNoinlineOrdinary.kt") public void testInlineSuspendOfNoinlineOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineOrdinary.kt"); } @TestMetadata("inlineSuspendOfNoinlineSuspend.kt") public void testInlineSuspendOfNoinlineSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfNoinlineSuspend.kt"); } @TestMetadata("inlineSuspendOfOrdinary.kt") public void testInlineSuspendOfOrdinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfOrdinary.kt"); } @TestMetadata("inlineSuspendOfSuspend.kt") public void testInlineSuspendOfSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/receiver/inlineSuspendOfSuspend.kt"); } } @@ -3571,74 +3309,67 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StateMachine extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStateMachine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/suspend/stateMachine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambda.kt"); } @TestMetadata("innerLambdaInsideLambda.kt") public void testInnerLambdaInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaInsideLambda.kt"); } @TestMetadata("innerLambdaWithoutCrossinline.kt") public void testInnerLambdaWithoutCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerLambdaWithoutCrossinline.kt"); } @TestMetadata("innerMadness.kt") public void testInnerMadness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadness.kt"); } @TestMetadata("innerMadnessCallSite.kt") public void testInnerMadnessCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerMadnessCallSite.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObject.kt"); } @TestMetadata("innerObjectInsideInnerObject.kt") public void testInnerObjectInsideInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectInsideInnerObject.kt"); } @TestMetadata("innerObjectSeveralFunctions.kt") public void testInnerObjectSeveralFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectSeveralFunctions.kt"); } @TestMetadata("innerObjectWithoutCapturingCrossinline.kt") public void testInnerObjectWithoutCapturingCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/innerObjectWithoutCapturingCrossinline.kt"); } @TestMetadata("normalInline.kt") public void testNormalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/normalInline.kt"); } @TestMetadata("numberOfSuspentions.kt") public void testNumberOfSuspentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/suspend/stateMachine/numberOfSuspentions.kt"); } } } @@ -3647,94 +3378,89 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constField.kt") public void testConstField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/constField.kt"); } @TestMetadata("packagePrivateMembers.kt") public void testPackagePrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/packagePrivateMembers.kt"); } @TestMetadata("propertyModifiers.kt") public void testPropertyModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/propertyModifiers.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembers.kt"); } @TestMetadata("protectedMembersFromSuper.kt") public void testProtectedMembersFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/protectedMembersFromSuper.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superCall.kt"); } @TestMetadata("superProperty.kt") public void testSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/superProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithinInlineLambda extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithinInlineLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("directFieldAccess.kt") public void testDirectFieldAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccess.kt"); } @TestMetadata("directFieldAccessInCrossInline.kt") public void testDirectFieldAccessInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/directFieldAccessInCrossInline.kt"); } @TestMetadata("privateCall.kt") public void testPrivateCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateCall.kt"); } @TestMetadata("privateInCrossInline.kt") public void testPrivateInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/privateInCrossInline.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superCall.kt"); } @TestMetadata("superInCrossInline.kt") public void testSuperInCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/syntheticAccessors/withinInlineLambda/superInCrossInline.kt"); } } } @@ -3743,14 +3469,17 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/trait/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/trait/trait.kt"); } } @@ -3758,32 +3487,32 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt5863.kt") public void testKt5863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/kt5863.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch.kt"); } @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatch2.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/tryCatchFinally/tryCatchFinally.kt"); } } @@ -3791,26 +3520,27 @@ public class CompileKotlinAgainstInlineKotlinTestGenerated extends AbstractCompi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractCompileKotlinAgainstInlineKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/varargs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kt17653.kt") public void testKt17653() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/kt17653.kt"); } @TestMetadata("varargAndDefaultParameters.kt") public void testVarargAndDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters.kt"); } @TestMetadata("varargAndDefaultParameters2.kt") public void testVarargAndDefaultParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/varargs/varargAndDefaultParameters2.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java index ea838cd5d0f..f756caeb1fa 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java @@ -21,271 +21,231 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotlinAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompileKotlinAgainstKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileKotlinAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationInInterface.kt") public void testAnnotationInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/annotationInInterface.kt"); } @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/annotationsOnTypeAliases.kt"); } @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/callsToMultifileClassFromOtherPackage.kt"); } @TestMetadata("classInObject.kt") public void testClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/classInObject.kt"); } @TestMetadata("companionObjectInEnum.kt") public void testCompanionObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectInEnum.kt"); } @TestMetadata("companionObjectMember.kt") public void testCompanionObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/companionObjectMember.kt"); } @TestMetadata("constPropertyReferenceFromMultifileClass.kt") public void testConstPropertyReferenceFromMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/constPropertyReferenceFromMultifileClass.kt"); } @TestMetadata("constructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/constructorVararg.kt"); } @TestMetadata("copySamOnInline.kt") public void testCopySamOnInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline.kt"); } @TestMetadata("copySamOnInline2.kt") public void testCopySamOnInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/copySamOnInline2.kt"); } @TestMetadata("coroutinesBinary.kt") public void testCoroutinesBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt"); } @TestMetadata("defaultConstructor.kt") public void testDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultConstructor.kt"); } @TestMetadata("defaultLambdaRegeneration.kt") public void testDefaultLambdaRegeneration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration.kt"); } @TestMetadata("defaultLambdaRegeneration2.kt") public void testDefaultLambdaRegeneration2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/defaultLambdaRegeneration2.kt"); } @TestMetadata("doublyNestedClass.kt") public void testDoublyNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/doublyNestedClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/enum.kt"); } @TestMetadata("inlinedConstants.kt") public void testInlinedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/inlinedConstants.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/innerClassConstructor.kt"); } @TestMetadata("internalSetterOverridden.kt") public void testInternalSetterOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/internalSetterOverridden.kt"); } @TestMetadata("jvmField.kt") public void testJvmField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmField.kt"); } @TestMetadata("jvmFieldInConstructor.kt") public void testJvmFieldInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmFieldInConstructor.kt"); } @TestMetadata("jvmNames.kt") public void testJvmNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmNames.kt"); } @TestMetadata("jvmPackageName.kt") public void testJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageName.kt"); } @TestMetadata("jvmPackageNameInRootPackage.kt") public void testJvmPackageNameInRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameInRootPackage.kt"); } @TestMetadata("jvmPackageNameWithJvmName.kt") public void testJvmPackageNameWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmPackageNameWithJvmName.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/jvmStaticInObject.kt"); } @TestMetadata("kotlinPropertyAsAnnotationParameter.kt") public void testKotlinPropertyAsAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/kotlinPropertyAsAnnotationParameter.kt"); } @TestMetadata("kt14012.kt") public void testKt14012() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012.kt"); } @TestMetadata("kt14012_multi.kt") public void testKt14012_multi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/kt14012_multi.kt"); } @TestMetadata("multifileClassInlineFunctionAccessingProperty.kt") public void testMultifileClassInlineFunctionAccessingProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassInlineFunctionAccessingProperty.kt"); } @TestMetadata("multifileClassWithTypealias.kt") public void testMultifileClassWithTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/multifileClassWithTypealias.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedClass.kt"); } @TestMetadata("nestedEnum.kt") public void testNestedEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedEnum.kt"); } @TestMetadata("nestedObject.kt") public void testNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/nestedObject.kt"); } @TestMetadata("platformTypes.kt") public void testPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/platformTypes.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/propertyReference.kt"); } @TestMetadata("recursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/recursiveGeneric.kt"); } @TestMetadata("sealedClass.kt") public void testSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/sealedClass.kt"); } @TestMetadata("secondaryConstructors.kt") public void testSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/secondaryConstructors.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/simple.kt"); } @TestMetadata("simpleValAnonymousObject.kt") public void testSimpleValAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/simpleValAnonymousObject.kt"); } @TestMetadata("starImportEnum.kt") public void testStarImportEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); } @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); } @TestMetadata("typeAliasesKt13181.kt") public void testTypeAliasesKt13181() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstKotlin/typeAliasesKt13181.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/DumpDeclarationsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/DumpDeclarationsTestGenerated.java index ba7ded4ff7d..a8b6afcde7e 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/DumpDeclarationsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/DumpDeclarationsTestGenerated.java @@ -21,32 +21,32 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DumpDeclarationsTestGenerated extends AbstractDumpDeclarationsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDumpDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/dumpDeclarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/annotation.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/classMembers.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/classes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/classes.kt"); } @TestMetadata("interfaces.kt") public void testInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/interfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/interfaces.kt"); } @TestMetadata("intermediateAbstractSuspendFunction.kt") @@ -57,31 +57,26 @@ public class DumpDeclarationsTestGenerated extends AbstractDumpDeclarationsTest @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/localClasses.kt"); } @TestMetadata("multifileFacadeMembers.kt") public void testMultifileFacadeMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/multifileFacadeMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/multifileFacadeMembers.kt"); } @TestMetadata("suspendLambda.kt") public void testSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/suspendLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/suspendLambda.kt"); } @TestMetadata("suspendOverride.kt") public void testSuspendOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/suspendOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/suspendOverride.kt"); } @TestMetadata("topLevelMembers.kt") public void testTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/dumpDeclarations/topLevelMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/dumpDeclarations/topLevelMembers.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/Kapt3BuilderModeBytecodeShapeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/Kapt3BuilderModeBytecodeShapeTestGenerated.java index 14897b17bcf..0342dc18126 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/Kapt3BuilderModeBytecodeShapeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/Kapt3BuilderModeBytecodeShapeTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class Kapt3BuilderModeBytecodeShapeTestGenerated extends AbstractKapt3BuilderModeBytecodeShapeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInKapt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/kapt"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/dataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/dataClass.kt"); } @TestMetadata("errorTypes.kt") public void testErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/errorTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/errorTypes.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/innerClasses.kt"); } @TestMetadata("interfaceImpls.kt") public void testInterfaceImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/interfaceImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/interfaceImpls.kt"); } @TestMetadata("jvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/jvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/jvmOverloads.kt"); } @TestMetadata("lambdas.kt") public void testLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/lambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/lambdas.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/kapt/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/kapt/simple.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 452a81c907c..d47dc789aea 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -31,19 +35,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class Annotations extends AbstractLightAnalysisModeTest { @TestMetadata("wrongAnnotationArgumentInCtor.kt") public void ignoreWrongAnnotationArgumentInCtor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInAnnotations() throws Exception { @@ -52,160 +48,139 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("annotatedEnumEntry.kt") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); } @TestMetadata("annotatedObjectLiteral.kt") public void testAnnotatedObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); } @TestMetadata("annotationWithKotlinProperty.kt") public void testAnnotationWithKotlinProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); } @TestMetadata("annotationWithKotlinPropertyFromInterfaceCompanion.kt") public void testAnnotationWithKotlinPropertyFromInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); } @TestMetadata("annotationsOnDefault.kt") public void testAnnotationsOnDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); } @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); } @TestMetadata("constValInAnnotation.kt") public void testConstValInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/constValInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/constValInAnnotation.kt"); } @TestMetadata("defaultParameterValues.kt") public void testDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); } @TestMetadata("delegatedPropertySetter.kt") public void testDelegatedPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); } @TestMetadata("kotlinPropertyFromClassObjectAsParameter.kt") public void testKotlinPropertyFromClassObjectAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); } @TestMetadata("kotlinTopLevelPropertyAsParameter.kt") public void testKotlinTopLevelPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); } @TestMetadata("kt10136.kt") public void testKt10136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kt10136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/kt10136.kt"); } @TestMetadata("nestedClassPropertyAsParameter.kt") public void testNestedClassPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); } @TestMetadata("nestedClassesInAnnotations.kt") public void testNestedClassesInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); } @TestMetadata("parameterAnnotationInDefaultImpls.kt") public void testParameterAnnotationInDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); } @TestMetadata("parameterWithPrimitiveType.kt") public void testParameterWithPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); } @TestMetadata("propertyWithPropertyInInitializerAsParameter.kt") public void testPropertyWithPropertyInInitializerAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); } @TestMetadata("resolveWithLowPriorityAnnotation.kt") public void testResolveWithLowPriorityAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); } @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotatedLambda extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotatedLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("funExpression.kt") public void testFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); } @TestMetadata("samFunExpression.kt") public void testSamFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); } @TestMetadata("samLambda.kt") public void testSamLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); } } } @@ -214,86 +189,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("argumentOrderInObjectSuperCall.kt") public void testArgumentOrderInObjectSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); } @TestMetadata("argumentOrderInSuperCall.kt") public void testArgumentOrderInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); } @TestMetadata("arguments.kt") public void testArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/arguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/arguments.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaults.kt") public void testDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/defaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/defaults.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); } @TestMetadata("kt9277.kt") public void testKt9277() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); } } @@ -301,462 +267,401 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arrays extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayConstructorsSimple.kt") public void testArrayConstructorsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); } @TestMetadata("arrayGetAssignMultiIndex.kt") public void testArrayGetAssignMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); } @TestMetadata("arrayGetMultiIndex.kt") public void testArrayGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); } @TestMetadata("arrayInstanceOf.kt") public void testArrayInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); } @TestMetadata("arrayPlusAssign.kt") public void testArrayPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); } @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/cloneArray.kt"); } @TestMetadata("clonePrimitiveArrays.kt") public void testClonePrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); } @TestMetadata("collectionAssignGetMultiIndex.kt") public void testCollectionAssignGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); } @TestMetadata("collectionGetMultiIndex.kt") public void testCollectionGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); } @TestMetadata("forEachBooleanArray.kt") public void testForEachBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); } @TestMetadata("forEachByteArray.kt") public void testForEachByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); } @TestMetadata("forEachCharArray.kt") public void testForEachCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); } @TestMetadata("forEachDoubleArray.kt") public void testForEachDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); } @TestMetadata("forEachFloatArray.kt") public void testForEachFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); } @TestMetadata("forEachIntArray.kt") public void testForEachIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); } @TestMetadata("forEachLongArray.kt") public void testForEachLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); } @TestMetadata("forEachShortArray.kt") public void testForEachShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); } @TestMetadata("genericArrayInObjectLiteralConstructor.kt") public void testGenericArrayInObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/hashMap.kt"); } @TestMetadata("inProjectionAsParameter.kt") public void testInProjectionAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); } @TestMetadata("inProjectionOfArray.kt") public void testInProjectionOfArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); } @TestMetadata("inProjectionOfList.kt") public void testInProjectionOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); } @TestMetadata("indices.kt") public void testIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indices.kt"); } @TestMetadata("indicesChar.kt") public void testIndicesChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indicesChar.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iterator.kt"); } @TestMetadata("iteratorBooleanArray.kt") public void testIteratorBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); } @TestMetadata("iteratorByteArray.kt") public void testIteratorByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); } @TestMetadata("iteratorByteArrayNextByte.kt") public void testIteratorByteArrayNextByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); } @TestMetadata("iteratorCharArray.kt") public void testIteratorCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); } @TestMetadata("iteratorDoubleArray.kt") public void testIteratorDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); } @TestMetadata("iteratorFloatArray.kt") public void testIteratorFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); } @TestMetadata("iteratorIntArray.kt") public void testIteratorIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); } @TestMetadata("iteratorLongArray.kt") public void testIteratorLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); } @TestMetadata("iteratorLongArrayNextLong.kt") public void testIteratorLongArrayNextLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); } @TestMetadata("iteratorShortArray.kt") public void testIteratorShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); } @TestMetadata("kt1291.kt") public void testKt1291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt1291.kt"); } @TestMetadata("kt17134.kt") public void testKt17134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt17134.kt"); } @TestMetadata("kt238.kt") public void testKt238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt238.kt"); } @TestMetadata("kt2997.kt") public void testKt2997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt2997.kt"); } @TestMetadata("kt33.kt") public void testKt33() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt33.kt"); } @TestMetadata("kt3771.kt") public void testKt3771() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt3771.kt"); } @TestMetadata("kt4118.kt") public void testKt4118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4118.kt"); } @TestMetadata("kt4348.kt") public void testKt4348() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4348.kt"); } @TestMetadata("kt4357.kt") public void testKt4357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4357.kt"); } @TestMetadata("kt503.kt") public void testKt503() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt503.kt"); } @TestMetadata("kt594.kt") public void testKt594() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt594.kt"); } @TestMetadata("kt602.kt") public void testKt602() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt602.kt"); } @TestMetadata("kt7009.kt") public void testKt7009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7009.kt"); } @TestMetadata("kt7288.kt") public void testKt7288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7288.kt"); } @TestMetadata("kt7338.kt") public void testKt7338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7338.kt"); } @TestMetadata("kt779.kt") public void testKt779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt779.kt"); } @TestMetadata("kt945.kt") public void testKt945() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt945.kt"); } @TestMetadata("kt950.kt") public void testKt950() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt950.kt"); } @TestMetadata("longAsIndex.kt") public void testLongAsIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/longAsIndex.kt"); } @TestMetadata("multiArrayConstructors.kt") public void testMultiArrayConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); } @TestMetadata("nonLocalReturnArrayConstructor.kt") public void testNonLocalReturnArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); } @TestMetadata("nonNullArray.kt") public void testNonNullArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonNullArray.kt"); } @TestMetadata("primitiveArrays.kt") public void testPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/stdlib.kt"); } @TestMetadata("varargsWithJava.kt") public void testVarargsWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/varargsWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/varargsWithJava.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt15560.kt") public void testKt15560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); } @TestMetadata("kt15568.kt") public void testKt15568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); } @TestMetadata("kt15575.kt") public void testKt15575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -764,32 +669,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -799,128 +704,112 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryOp extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBinaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bitwiseOp.kt") public void testBitwiseOp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); } @TestMetadata("bitwiseOpAny.kt") public void testBitwiseOpAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); } @TestMetadata("bitwiseOpNullable.kt") public void testBitwiseOpNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/call.kt"); } @TestMetadata("callAny.kt") public void testCallAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callAny.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callNullable.kt"); } @TestMetadata("compareBoxedChars.kt") public void testCompareBoxedChars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); } @TestMetadata("compareWithBoxedDouble.kt") public void testCompareWithBoxedDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); } @TestMetadata("compareWithBoxedLong.kt") public void testCompareWithBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); } @TestMetadata("divisionByZero.kt") public void testDivisionByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); } @TestMetadata("intrinsicAny.kt") public void testIntrinsicAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); } @TestMetadata("kt11163.kt") public void testKt11163() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163.kt"); } @TestMetadata("kt11163_properIeee754comparisons.kt") public void testKt11163_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); } @TestMetadata("kt23030_properIeee754comparisons.kt") public void testKt23030_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); } @TestMetadata("kt6747_identityEquals.kt") public void testKt6747_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); } @TestMetadata("overflowChar.kt") public void testOverflowChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); } @TestMetadata("overflowInt.kt") public void testOverflowInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); } @TestMetadata("overflowLong.kt") public void testOverflowLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); } } @@ -928,194 +817,167 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxingOptimization extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBoxingOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedIntegersCmp.kt") public void testBoxedIntegersCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); } @TestMetadata("boxedPrimitivesAreEqual.kt") public void testBoxedPrimitivesAreEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); } @TestMetadata("boxedRealsCmp.kt") public void testBoxedRealsCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/casts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/casts.kt"); } @TestMetadata("checkcastAndInstanceOf.kt") public void testCheckcastAndInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); } @TestMetadata("explicitEqualsOnDouble.kt") public void testExplicitEqualsOnDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); } @TestMetadata("fold.kt") public void testFold() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/fold.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/fold.kt"); } @TestMetadata("foldRange.kt") public void testFoldRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); } @TestMetadata("intCompareTo.kt") public void testIntCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); } @TestMetadata("kClassEquals.kt") public void testKClassEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kClassEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kClassEquals.kt"); } @TestMetadata("kt15871.kt") public void testKt15871() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); } @TestMetadata("kt17748.kt") public void testKt17748() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt17748.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt17748.kt"); } @TestMetadata("kt19767.kt") public void testKt19767() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); } @TestMetadata("kt19767_2.kt") public void testKt19767_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); } @TestMetadata("kt19767_3.kt") public void testKt19767_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_3.kt"); } @TestMetadata("kt19767_chain.kt") public void testKt19767_chain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); } @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); } @TestMetadata("kt5588.kt") public void testKt5588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); } @TestMetadata("kt5844.kt") public void testKt5844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); } @TestMetadata("kt6047.kt") public void testKt6047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); } @TestMetadata("kt6842.kt") public void testKt6842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); } @TestMetadata("maxMinBy.kt") public void testMaxMinBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); } @TestMetadata("nullCheck.kt") public void testNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); } @TestMetadata("progressions.kt") public void testProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); } @TestMetadata("safeCallWithElvis.kt") public void testSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simple.kt"); } @TestMetadata("simpleUninitializedMerge.kt") public void testSimpleUninitializedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); } @TestMetadata("taintedValues.kt") public void testTaintedValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); } @TestMetadata("taintedValuesBox.kt") public void testTaintedValuesBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); } @TestMetadata("unsafeRemoving.kt") public void testUnsafeRemoving() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/variables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); } } @@ -1123,300 +985,260 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bridges extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bridgeInInterface.kt") public void testBridgeInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/bridgeInInterface.kt"); } @TestMetadata("bridgeInInterfaceWithProperties.kt") public void testBridgeInInterfaceWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/bridgeInInterfaceWithProperties.kt"); } @TestMetadata("complexMultiInheritance.kt") public void testComplexMultiInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); } @TestMetadata("complexTraitImpl.kt") public void testComplexTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegation.kt"); } @TestMetadata("delegationComplex.kt") public void testDelegationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplex.kt"); } @TestMetadata("delegationComplexWithList.kt") public void testDelegationComplexWithList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); } @TestMetadata("delegationProperty.kt") public void testDelegationProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationProperty.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/diamond.kt"); } @TestMetadata("fakeCovariantOverride.kt") public void testFakeCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverride.kt") public void testFakeGenericCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverrideWithDelegation.kt") public void testFakeGenericCovariantOverrideWithDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); } @TestMetadata("fakeOverrideOfTraitImpl.kt") public void testFakeOverrideOfTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); } @TestMetadata("fakeOverrideWithSynthesizedImplementation.kt") public void testFakeOverrideWithSynthesizedImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/genericProperty.kt"); } @TestMetadata("kt12416.kt") public void testKt12416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt12416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt12416.kt"); } @TestMetadata("kt1939.kt") public void testKt1939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1939.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1939.kt"); } @TestMetadata("kt1959.kt") public void testKt1959() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1959.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1959.kt"); } @TestMetadata("kt2498.kt") public void testKt2498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2498.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2498.kt"); } @TestMetadata("kt2702.kt") public void testKt2702() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2702.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2702.kt"); } @TestMetadata("kt2833.kt") public void testKt2833() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2833.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2833.kt"); } @TestMetadata("kt2920.kt") public void testKt2920() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2920.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2920.kt"); } @TestMetadata("kt318.kt") public void testKt318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt318.kt"); } @TestMetadata("longChainOneBridge.kt") public void testLongChainOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); } @TestMetadata("manyTypeArgumentsSubstitutedSuccessively.kt") public void testManyTypeArgumentsSubstitutedSuccessively() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); } @TestMetadata("methodFromTrait.kt") public void testMethodFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); } @TestMetadata("noBridgeOnMutableCollectionInheritance.kt") public void testNoBridgeOnMutableCollectionInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); } @TestMetadata("objectClone.kt") public void testObjectClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/objectClone.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/objectClone.kt"); } @TestMetadata("overrideAbstractProperty.kt") public void testOverrideAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); } @TestMetadata("overrideReturnType.kt") public void testOverrideReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); } @TestMetadata("propertyAccessorsWithoutBody.kt") public void testPropertyAccessorsWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); } @TestMetadata("propertyDiamond.kt") public void testPropertyDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); } @TestMetadata("propertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertySetter.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simple.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleEnum.kt"); } @TestMetadata("simpleGenericMethod.kt") public void testSimpleGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleObject.kt"); } @TestMetadata("simpleReturnType.kt") public void testSimpleReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); } @TestMetadata("simpleTraitImpl.kt") public void testSimpleTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); } @TestMetadata("simpleUpperBound.kt") public void testSimpleUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); } @TestMetadata("strListContains.kt") public void testStrListContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/strListContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/strListContains.kt"); } @TestMetadata("traitImplInheritsTraitImpl.kt") public void testTraitImplInheritsTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges.kt") public void testTwoParentsWithDifferentMethodsTwoBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges2.kt") public void testTwoParentsWithDifferentMethodsTwoBridges2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); } @TestMetadata("twoParentsWithTheSameMethodOneBridge.kt") public void testTwoParentsWithTheSameMethodOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); } @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SubstitutionInSuperClass extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); } public void testAllFilesPresentInSubstitutionInSuperClass() throws Exception { @@ -1425,62 +1247,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("boundedTypeArguments.kt") public void testBoundedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); } @TestMetadata("differentErasureInSuperClass.kt") public void testDifferentErasureInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); } @TestMetadata("differentErasureInSuperClassComplex.kt") public void testDifferentErasureInSuperClassComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); } @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); } } } @@ -1489,10 +1301,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuiltinStubMethods extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); } public void testAllFilesPresentInBuiltinStubMethods() throws Exception { @@ -1501,150 +1316,130 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("Collection.kt") public void testCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); } @TestMetadata("customReadOnlyIterator.kt") public void testCustomReadOnlyIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); } @TestMetadata("delegationToArrayList.kt") public void testDelegationToArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/delegationToArrayList.kt"); } @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); } @TestMetadata("inheritedImplementations.kt") public void testInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); } @TestMetadata("Iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); } @TestMetadata("IteratorWithRemove.kt") public void testIteratorWithRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); } @TestMetadata("List.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/List.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/List.kt"); } @TestMetadata("ListIterator.kt") public void testListIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); } @TestMetadata("ListWithAllImplementations.kt") public void testListWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); } @TestMetadata("ListWithAllInheritedImplementations.kt") public void testListWithAllInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); } @TestMetadata("manyTypeParametersWithUpperBounds.kt") public void testManyTypeParametersWithUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt"); } @TestMetadata("Map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); } @TestMetadata("MapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); } @TestMetadata("MapEntryWithSetValue.kt") public void testMapEntryWithSetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); } @TestMetadata("MapWithAllImplementations.kt") public void testMapWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); } @TestMetadata("nonTrivialSubstitution.kt") public void testNonTrivialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); } @TestMetadata("nonTrivialUpperBound.kt") public void testNonTrivialUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); } @TestMetadata("substitutedIterable.kt") public void testSubstitutedIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); } @TestMetadata("SubstitutedList.kt") public void testSubstitutedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); } @TestMetadata("substitutedListWithExtraSuperInterface.kt") public void testSubstitutedListWithExtraSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); } @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtendJavaCollections extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractList.kt") public void testAbstractList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt"); } @TestMetadata("abstractMap.kt") public void testAbstractMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractMap.kt"); } @TestMetadata("abstractSet.kt") public void testAbstractSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); } public void testAllFilesPresentInExtendJavaCollections() throws Exception { @@ -1653,26 +1448,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); } @TestMetadata("hashSet.kt") public void testHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); } @TestMetadata("mapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/mapEntry.kt"); } } } @@ -1681,6 +1472,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -1689,142 +1484,129 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/array.kt"); } @TestMetadata("companionObjectReceiver.kt") public void testCompanionObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); } @TestMetadata("emptyLHS.kt") public void testEmptyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); } @TestMetadata("enumEntryMember.kt") public void testEnumEntryMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); } @TestMetadata("genericValOnLHS.kt") public void testGenericValOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); } @TestMetadata("kCallableNameIntrinsic.kt") public void testKCallableNameIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); } @TestMetadata("kt12738.kt") public void testKt12738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); } @TestMetadata("kt15446.kt") public void testKt15446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); } @TestMetadata("localUnitFunction.kt") public void testLocalUnitFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/localUnitFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/localUnitFunction.kt"); } @TestMetadata("multiCase.kt") public void testMultiCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); } @TestMetadata("nullReceiver.kt") public void testNullReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); } @TestMetadata("objectReceiver.kt") public void testObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); } @TestMetadata("primitiveReceiver.kt") public void testPrimitiveReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); } @TestMetadata("simpleFunction.kt") public void testSimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); } @TestMetadata("smartCastForExtensionReceiver.kt") public void testSmartCastForExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); } @TestMetadata("syntheticExtensionOnLHS.kt") public void testSyntheticExtensionOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/syntheticExtensionOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/syntheticExtensionOnLHS.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("nullableReceiverInEquals.kt") public void testNullableReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); } @TestMetadata("receiverInEquals.kt") public void testReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); } @TestMetadata("reflectionReference.kt") public void testReflectionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); } } @@ -1832,26 +1614,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); } @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); } } } @@ -1860,10 +1643,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -1872,406 +1658,344 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("booleanNotIntrinsic.kt") public void testBooleanNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); } @TestMetadata("classMemberFromClass.kt") public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); } @TestMetadata("classMemberFromExtension.kt") public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); } @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); } @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("constructorFromTopLevelNoArgs.kt") public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); } @TestMetadata("constructorFromTopLevelOneStringArg.kt") public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); } @TestMetadata("enumValueOfMethod.kt") public void testEnumValueOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); } @TestMetadata("equalsIntrinsic.kt") public void testEqualsIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); } @TestMetadata("extensionFromClass.kt") public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); } @TestMetadata("extensionFromExtension.kt") public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); } @TestMetadata("extensionFromTopLevelStringNoArgs.kt") public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); } @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); } @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); } @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("genericCallableReferenceArguments.kt") public void testGenericCallableReferenceArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); } @TestMetadata("genericCallableReferencesWithNullableTypes.kt") public void testGenericCallableReferencesWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); } @TestMetadata("genericCallableReferencesWithOverload.kt") public void testGenericCallableReferencesWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); } @TestMetadata("genericWithDependentType.kt") public void testGenericWithDependentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } @TestMetadata("getArityViaFunctionImpl.kt") public void testGetArityViaFunctionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); } @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); } @TestMetadata("innerConstructorFromClass.kt") public void testInnerConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); } @TestMetadata("innerConstructorFromExtension.kt") public void testInnerConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); } @TestMetadata("innerConstructorFromTopLevelNoArgs.kt") public void testInnerConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("innerConstructorFromTopLevelOneStringArg.kt") public void testInnerConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("javaCollectionsStaticMethod.kt") public void testJavaCollectionsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); } @TestMetadata("nestedConstructorFromClass.kt") public void testNestedConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); } @TestMetadata("nestedConstructorFromTopLevelNoArgs.kt") public void testNestedConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("nestedConstructorFromTopLevelOneStringArg.kt") public void testNestedConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("newArray.kt") public void testNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/newArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/newArray.kt"); } @TestMetadata("overloadedFun.kt") public void testOverloadedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); } @TestMetadata("overloadedFunVsVal.kt") public void testOverloadedFunVsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); } @TestMetadata("privateClassMember.kt") public void testPrivateClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); } @TestMetadata("sortListOfStrings.kt") public void testSortListOfStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); } @TestMetadata("specialCalls.kt") public void testSpecialCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelStringOneStringArg.kt") public void testTopLevelFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); } @TestMetadata("topLevelFromTopLevelUnitNoArgs.kt") public void testTopLevelFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt") public void testTopLevelFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("traitImplMethodWithClassReceiver.kt") public void testTraitImplMethodWithClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); } @TestMetadata("traitMember.kt") public void testTraitMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureOuter.kt") public void testCaptureOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); } @TestMetadata("classMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); } @TestMetadata("closureWithSideEffect.kt") public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); } @TestMetadata("constructorWithInitializer.kt") public void testConstructorWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); } @TestMetadata("enumExtendsTrait.kt") public void testEnumExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); } @TestMetadata("equalsHashCode.kt") public void testEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); } @TestMetadata("extensionToLocalClass.kt") public void testExtensionToLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); } @TestMetadata("extensionToPrimitive.kt") public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); } @TestMetadata("extensionWithClosure.kt") public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); } @TestMetadata("localFunctionName.kt") public void testLocalFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); } @TestMetadata("localLocal.kt") public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); } @TestMetadata("simpleClosure.kt") public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); } @TestMetadata("simpleWithArg.kt") public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); } @TestMetadata("unitWithSideEffect.kt") public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); } } } @@ -2280,10 +2004,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -2292,158 +2019,132 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegated.kt"); } @TestMetadata("delegatedMutable.kt") public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); } @TestMetadata("enumNameOrdinal.kt") public void testEnumNameOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); } @TestMetadata("extensionToArray.kt") public void testExtensionToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); } @TestMetadata("invokePropertyReference.kt") public void testInvokePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); } @TestMetadata("javaBeanConvention.kt") public void testJavaBeanConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); } @TestMetadata("kClassInstanceIsInitializedFirst.kt") public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); } @TestMetadata("kt12044.kt") public void testKt12044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); } @TestMetadata("kt12982_protectedPropertyReference.kt") public void testKt12982_protectedPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); } @TestMetadata("kt14330.kt") public void testKt14330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); } @TestMetadata("kt14330_2.kt") public void testKt14330_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); } @TestMetadata("kt15447.kt") public void testKt15447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); } @TestMetadata("kt6870_privatePropertyReference.kt") public void testKt6870_privatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); } @TestMetadata("listOfStringsMapLength.kt") public void testListOfStringsMapLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); } @TestMetadata("localClassVar.kt") public void testLocalClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); } @TestMetadata("overriddenInSubclass.kt") public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); } @TestMetadata("privateSetOuterClass.kt") public void testPrivateSetOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); } @TestMetadata("privateSetterInsideClass.kt") public void testPrivateSetterInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); } @TestMetadata("privateSetterOutsideClass.kt") public void testPrivateSetterOutsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); } @TestMetadata("simpleMember.kt") public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); } @TestMetadata("simpleMutableExtension.kt") public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); } @TestMetadata("simpleMutableMember.kt") public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); } @TestMetadata("simpleMutableTopLevel.kt") public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); } @TestMetadata("simpleTopLevel.kt") public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); } } @@ -2451,38 +2152,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Serializability extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSerializability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundWithNotSerializableReceiver.kt") public void testBoundWithNotSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); } @TestMetadata("boundWithSerializableReceiver.kt") public void testBoundWithSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); } @TestMetadata("noReflect.kt") public void testNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); } @TestMetadata("reflectedIsNotSerialized.kt") public void testReflectedIsNotSerialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); } @TestMetadata("withReflect.kt") public void testWithReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); } } } @@ -2491,226 +2191,199 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("as.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/as.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/as.kt"); } @TestMetadata("asForConstants.kt") public void testAsForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asForConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asForConstants.kt"); } @TestMetadata("asSafe.kt") public void testAsSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafe.kt"); } @TestMetadata("asSafeFail.kt") public void testAsSafeFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeFail.kt"); } @TestMetadata("asSafeForConstants.kt") public void testAsSafeForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); } @TestMetadata("asUnit.kt") public void testAsUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asUnit.kt"); } @TestMetadata("asWithGeneric.kt") public void testAsWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asWithGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asWithGeneric.kt"); } @TestMetadata("castGenericNull.kt") public void testCastGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/castGenericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/castGenericNull.kt"); } @TestMetadata("intersectionTypeMultipleBounds.kt") public void testIntersectionTypeMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); } @TestMetadata("intersectionTypeMultipleBoundsImplicitReceiver.kt") public void testIntersectionTypeMultipleBoundsImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); } @TestMetadata("intersectionTypeSmartcast.kt") public void testIntersectionTypeSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); } @TestMetadata("intersectionTypeWithMultipleBoundsAsReceiver.kt") public void testIntersectionTypeWithMultipleBoundsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); } @TestMetadata("intersectionTypeWithoutGenericsAsReceiver.kt") public void testIntersectionTypeWithoutGenericsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/is.kt"); } @TestMetadata("isNullablePrimitive.kt") public void testIsNullablePrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); } @TestMetadata("kt22714.kt") public void testKt22714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/kt22714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/kt22714.kt"); } @TestMetadata("lambdaToUnitCast.kt") public void testLambdaToUnitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/notIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/notIs.kt"); } @TestMetadata("unitAsAny.kt") public void testUnitAsAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsAny.kt"); } @TestMetadata("unitAsInt.kt") public void testUnitAsInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsInt.kt"); } @TestMetadata("unitAsSafeAny.kt") public void testUnitAsSafeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); } @TestMetadata("unitNullableCast.kt") public void testUnitNullableCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitNullableCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitNullableCast.kt"); } @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asFunKBig.kt") public void testAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); } @TestMetadata("asFunKSmall.kt") public void testAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); } @TestMetadata("isFunKBig.kt") public void testIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); } @TestMetadata("isFunKSmall.kt") public void testIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); } @TestMetadata("javaTypeIsFunK.kt") public void testJavaTypeIsFunK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); } @TestMetadata("reifiedAsFunKBig.kt") public void testReifiedAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); } @TestMetadata("reifiedAsFunKSmall.kt") public void testReifiedAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); } @TestMetadata("reifiedIsFunKBig.kt") public void testReifiedIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); } @TestMetadata("reifiedIsFunKSmall.kt") public void testReifiedIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); } @TestMetadata("reifiedSafeAsFunKBig.kt") public void testReifiedSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); } @TestMetadata("reifiedSafeAsFunKSmall.kt") public void testReifiedSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); } @TestMetadata("safeAsFunKBig.kt") public void testSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); } @TestMetadata("safeAsFunKSmall.kt") public void testSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); } } @@ -2718,50 +2391,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiteralExpressionAsGenericArgument extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("binaryExpressionCast.kt") public void testBinaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); } @TestMetadata("javaBox.kt") public void testJavaBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); } @TestMetadata("labeledExpressionCast.kt") public void testLabeledExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); } @TestMetadata("parenthesizedExpressionCast.kt") public void testParenthesizedExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); } @TestMetadata("superConstructor.kt") public void testSuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); } @TestMetadata("unaryExpressionCast.kt") public void testUnaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); } } @@ -2769,56 +2439,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MutableCollections extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMutableCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asWithMutable.kt") public void testAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); } @TestMetadata("isWithMutable.kt") public void testIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); } @TestMetadata("mutabilityMarkerInterfaces.kt") public void testMutabilityMarkerInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); } @TestMetadata("reifiedAsWithMutable.kt") public void testReifiedAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); } @TestMetadata("reifiedIsWithMutable.kt") public void testReifiedIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); } @TestMetadata("reifiedSafeAsWithMutable.kt") public void testReifiedSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); } @TestMetadata("safeAsWithMutable.kt") public void testSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); } @TestMetadata("weirdMutableCasts.kt") public void testWeirdMutableCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); } } } @@ -2827,20 +2493,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckcastOptimization extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCheckcastOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt19128.kt") public void testKt19128() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); } @TestMetadata("kt19246.kt") public void testKt19246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); } } @@ -2848,52 +2516,54 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiteral extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClassLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); } @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaIntrinsicWithSideEffect.kt") public void testJavaIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); } @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); } } @@ -2901,56 +2571,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/java.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/java.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); } @TestMetadata("javaObjectTypeReified.kt") public void testJavaObjectTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); } @TestMetadata("javaPrimitiveTypeReified.kt") public void testJavaPrimitiveTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); } @TestMetadata("javaReified.kt") public void testJavaReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); } @TestMetadata("kt11943.kt") public void testKt11943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); } @TestMetadata("objectSuperConstructorCall.kt") public void testObjectSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); } } } @@ -2959,754 +2625,639 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxPrimitiveTypeInClinitOfClassObject.kt") public void testBoxPrimitiveTypeInClinitOfClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); } @TestMetadata("classCompanionInitializationWithJava.kt") public void testClassCompanionInitializationWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classCompanionInitializationWithJava.kt"); } @TestMetadata("classNamedAsOldPackageFacade.kt") public void testClassNamedAsOldPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObject.kt"); } @TestMetadata("classObjectAsExtensionReceiver.kt") public void testClassObjectAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); } @TestMetadata("classObjectAsStaticInitializer.kt") public void testClassObjectAsStaticInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); } @TestMetadata("classObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectField.kt"); } @TestMetadata("classObjectInTrait.kt") public void testClassObjectInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); } @TestMetadata("classObjectNotOfEnum.kt") public void testClassObjectNotOfEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); } @TestMetadata("classObjectToString.kt") public void testClassObjectToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectToString.kt"); } @TestMetadata("classObjectWithPrivateGenericMember.kt") public void testClassObjectWithPrivateGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); } @TestMetadata("classObjectsWithParentClasses.kt") public void testClassObjectsWithParentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); } @TestMetadata("comanionObjectFieldVsClassField.kt") public void testComanionObjectFieldVsClassField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); } @TestMetadata("defaultObjectSameNamesAsInOuter.kt") public void testDefaultObjectSameNamesAsInOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); } @TestMetadata("delegateConstructorCallWithKeywords.kt") public void testDelegateConstructorCallWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); } @TestMetadata("delegation2.kt") public void testDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation2.kt"); } @TestMetadata("delegation3.kt") public void testDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation3.kt"); } @TestMetadata("delegation4.kt") public void testDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation4.kt"); } @TestMetadata("delegationGenericArg.kt") public void testDelegationGenericArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); } @TestMetadata("delegationGenericArgUpperBound.kt") public void testDelegationGenericArgUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); } @TestMetadata("delegationGenericLongArg.kt") public void testDelegationGenericLongArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); } @TestMetadata("delegationJava.kt") public void testDelegationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationJava.kt"); } @TestMetadata("delegationMethodsWithArgs.kt") public void testDelegationMethodsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); } @TestMetadata("exceptionConstructor.kt") public void testExceptionConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); } @TestMetadata("extensionOnNamedClassObject.kt") public void testExtensionOnNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/funDelegation.kt"); } @TestMetadata("implementComparableInSubclass.kt") public void testImplementComparableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); } @TestMetadata("inheritSetAndHashSet.kt") public void testInheritSetAndHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritance.kt"); } @TestMetadata("inheritedInnerClass.kt") public void testInheritedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); } @TestMetadata("inheritedMethod.kt") public void testInheritedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedMethod.kt"); } @TestMetadata("initializerBlock.kt") public void testInitializerBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlock.kt"); } @TestMetadata("initializerBlockDImpl.kt") public void testInitializerBlockDImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/innerClass.kt"); } @TestMetadata("interfaceCompanionInitializationWithJava.kt") public void testInterfaceCompanionInitializationWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/interfaceCompanionInitializationWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/interfaceCompanionInitializationWithJava.kt"); } @TestMetadata("kt1018.kt") public void testKt1018() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1018.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1018.kt"); } @TestMetadata("kt1120.kt") public void testKt1120() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1120.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1120.kt"); } @TestMetadata("kt1134.kt") public void testKt1134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1134.kt"); } @TestMetadata("kt1157.kt") public void testKt1157() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1157.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1157.kt"); } @TestMetadata("kt1247.kt") public void testKt1247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1247.kt"); } @TestMetadata("kt1345.kt") public void testKt1345() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1345.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1345.kt"); } @TestMetadata("kt1439.kt") public void testKt1439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1439.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1439.kt"); } @TestMetadata("kt1535.kt") public void testKt1535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1535.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1535.kt"); } @TestMetadata("kt1538.kt") public void testKt1538() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1538.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1538.kt"); } @TestMetadata("kt1578.kt") public void testKt1578() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1578.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1578.kt"); } @TestMetadata("kt1611.kt") public void testKt1611() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1611.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1611.kt"); } @TestMetadata("kt1721.kt") public void testKt1721() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1721.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1721.kt"); } @TestMetadata("kt1726.kt") public void testKt1726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1726.kt"); } @TestMetadata("kt1759.kt") public void testKt1759() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1759.kt"); } @TestMetadata("kt1891.kt") public void testKt1891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1891.kt"); } @TestMetadata("kt1918.kt") public void testKt1918() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1918.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1918.kt"); } @TestMetadata("kt1976.kt") public void testKt1976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1976.kt"); } @TestMetadata("kt1980.kt") public void testKt1980() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1980.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1980.kt"); } @TestMetadata("kt2224.kt") public void testKt2224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2224.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2224.kt"); } @TestMetadata("kt2288.kt") public void testKt2288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2288.kt"); } @TestMetadata("kt2384.kt") public void testKt2384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2384.kt"); } @TestMetadata("kt2390.kt") public void testKt2390() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2390.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2390.kt"); } @TestMetadata("kt2391.kt") public void testKt2391() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2391.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2391.kt"); } @TestMetadata("kt2395.kt") public void testKt2395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2395.kt"); } @TestMetadata("kt2417.kt") public void testKt2417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2417.kt"); } @TestMetadata("kt2477.kt") public void testKt2477() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2477.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2477.kt"); } @TestMetadata("kt2480.kt") public void testKt2480() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2480.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2480.kt"); } @TestMetadata("kt2482.kt") public void testKt2482() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2482.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2482.kt"); } @TestMetadata("kt2485.kt") public void testKt2485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2485.kt"); } @TestMetadata("kt249.kt") public void testKt249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt249.kt"); } @TestMetadata("kt2532.kt") public void testKt2532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2532.kt"); } @TestMetadata("kt2566.kt") public void testKt2566() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566.kt"); } @TestMetadata("kt2566_2.kt") public void testKt2566_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566_2.kt"); } @TestMetadata("kt2607.kt") public void testKt2607() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2607.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2607.kt"); } @TestMetadata("kt2626.kt") public void testKt2626() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2626.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2626.kt"); } @TestMetadata("kt2711.kt") public void testKt2711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2711.kt"); } @TestMetadata("kt2784.kt") public void testKt2784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2784.kt"); } @TestMetadata("kt285.kt") public void testKt285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt285.kt"); } @TestMetadata("kt3001.kt") public void testKt3001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3001.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3001.kt"); } @TestMetadata("kt3114.kt") public void testKt3114() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3114.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3114.kt"); } @TestMetadata("kt3414.kt") public void testKt3414() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3414.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3414.kt"); } @TestMetadata("kt343.kt") public void testKt343() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt343.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt343.kt"); } @TestMetadata("kt3546.kt") public void testKt3546() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3546.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3546.kt"); } @TestMetadata("kt454.kt") public void testKt454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt454.kt"); } @TestMetadata("kt471.kt") public void testKt471() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt471.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt471.kt"); } @TestMetadata("kt48.kt") public void testKt48() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt48.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt48.kt"); } @TestMetadata("kt496.kt") public void testKt496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt496.kt"); } @TestMetadata("kt500.kt") public void testKt500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt500.kt"); } @TestMetadata("kt501.kt") public void testKt501() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt501.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt501.kt"); } @TestMetadata("kt504.kt") public void testKt504() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt504.kt"); } @TestMetadata("kt508.kt") public void testKt508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt508.kt"); } @TestMetadata("kt5347.kt") public void testKt5347() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt5347.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt5347.kt"); } @TestMetadata("kt6136.kt") public void testKt6136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6136.kt"); } @TestMetadata("kt633.kt") public void testKt633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt633.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt633.kt"); } @TestMetadata("kt6816.kt") public void testKt6816() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6816.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6816.kt"); } @TestMetadata("kt707.kt") public void testKt707() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt707.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt707.kt"); } @TestMetadata("kt723.kt") public void testKt723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt723.kt"); } @TestMetadata("kt725.kt") public void testKt725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt725.kt"); } @TestMetadata("kt8011.kt") public void testKt8011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011.kt"); } @TestMetadata("kt8011a.kt") public void testKt8011a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011a.kt"); } @TestMetadata("kt903.kt") public void testKt903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt903.kt"); } @TestMetadata("kt940.kt") public void testKt940() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt940.kt"); } @TestMetadata("kt9642.kt") public void testKt9642() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt9642.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt9642.kt"); } @TestMetadata("namedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/namedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/namedClassObject.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/outerThis.kt"); } @TestMetadata("overloadBinaryOperator.kt") public void testOverloadBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); } @TestMetadata("overloadPlusAssign.kt") public void testOverloadPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); } @TestMetadata("overloadPlusAssignReturn.kt") public void testOverloadPlusAssignReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); } @TestMetadata("overloadPlusToPlusAssign.kt") public void testOverloadPlusToPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); } @TestMetadata("overloadUnaryOperator.kt") public void testOverloadUnaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); } @TestMetadata("privateOuterFunctions.kt") public void testPrivateOuterFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); } @TestMetadata("privateOuterProperty.kt") public void testPrivateOuterProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); } @TestMetadata("privateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateToThis.kt"); } @TestMetadata("propertyDelegation.kt") public void testPropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyDelegation.kt"); } @TestMetadata("propertyInInitializer.kt") public void testPropertyInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); } @TestMetadata("quotedClassName.kt") public void testQuotedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/quotedClassName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/quotedClassName.kt"); } @TestMetadata("rightHandOverride.kt") public void testRightHandOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/rightHandOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/rightHandOverride.kt"); } @TestMetadata("sealedInSameFile.kt") public void testSealedInSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); } @TestMetadata("selfcreate.kt") public void testSelfcreate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/selfcreate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/selfcreate.kt"); } @TestMetadata("simpleBox.kt") public void testSimpleBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/simpleBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/simpleBox.kt"); } @TestMetadata("superConstructorCallWithComplexArg.kt") public void testSuperConstructorCallWithComplexArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); } @TestMetadata("typedDelegation.kt") public void testTypedDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/typedDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/typedDelegation.kt"); } @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("instantiateInDerived.kt") public void testInstantiateInDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); } @TestMetadata("instantiateInDerivedLabeled.kt") public void testInstantiateInDerivedLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); } @TestMetadata("instantiateInSameClass.kt") public void testInstantiateInSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); } @TestMetadata("kt6708.kt") public void testKt6708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/kt6708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/kt6708.kt"); } @TestMetadata("properOuter.kt") public void testProperOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properOuter.kt"); } @TestMetadata("properSuperLinking.kt") public void testProperSuperLinking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); } } } @@ -3715,424 +3266,364 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closures extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureExtensionReceiver.kt") public void testCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); } @TestMetadata("capturedLocalGenericFun.kt") public void testCapturedLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); } @TestMetadata("closureInsideConstrucor.kt") public void testClosureInsideConstrucor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); } @TestMetadata("closureOnTopLevel1.kt") public void testClosureOnTopLevel1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); } @TestMetadata("closureOnTopLevel2.kt") public void testClosureOnTopLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); } @TestMetadata("doubleEnclosedLocalVariable.kt") public void testDoubleEnclosedLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); } @TestMetadata("enclosingLocalVariable.kt") public void testEnclosingLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); } @TestMetadata("enclosingThis.kt") public void testEnclosingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingThis.kt"); } @TestMetadata("extensionClosure.kt") public void testExtensionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/extensionClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/extensionClosure.kt"); } @TestMetadata("kt10044.kt") public void testKt10044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt10044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt10044.kt"); } @TestMetadata("kt11634.kt") public void testKt11634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634.kt"); } @TestMetadata("kt11634_2.kt") public void testKt11634_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_2.kt"); } @TestMetadata("kt11634_3.kt") public void testKt11634_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_3.kt"); } @TestMetadata("kt11634_4.kt") public void testKt11634_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_4.kt"); } @TestMetadata("kt2151.kt") public void testKt2151() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt2151.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3152.kt"); } @TestMetadata("kt3523.kt") public void testKt3523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3523.kt"); } @TestMetadata("kt3738.kt") public void testKt3738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3738.kt"); } @TestMetadata("kt3905.kt") public void testKt3905() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3905.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3905.kt"); } @TestMetadata("kt4106.kt") public void testKt4106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4106.kt"); } @TestMetadata("kt4137.kt") public void testKt4137() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4137.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4137.kt"); } @TestMetadata("kt5589.kt") public void testKt5589() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt5589.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt5589.kt"); } @TestMetadata("localClassFunClosure.kt") public void testLocalClassFunClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); } @TestMetadata("localClassLambdaClosure.kt") public void testLocalClassLambdaClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); } @TestMetadata("localFunctionInFunction.kt") public void testLocalFunctionInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); } @TestMetadata("localFunctionInInitializer.kt") public void testLocalFunctionInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); } @TestMetadata("localGenericFun.kt") public void testLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localGenericFun.kt"); } @TestMetadata("localReturn.kt") public void testLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturn.kt"); } @TestMetadata("localReturnWithAutolabel.kt") public void testLocalReturnWithAutolabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); } @TestMetadata("noRefToOuter.kt") public void testNoRefToOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/noRefToOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/noRefToOuter.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/recursiveClosure.kt"); } @TestMetadata("refsAreSerializable.kt") public void testRefsAreSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); } @TestMetadata("simplestClosure.kt") public void testSimplestClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosure.kt"); } @TestMetadata("simplestClosureAndBoxing.kt") public void testSimplestClosureAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); } @TestMetadata("subclosuresWithinInitializers.kt") public void testSubclosuresWithinInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/underscoreParameters.kt"); } @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureInSuperConstructorCall extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorParameterAndLocalCapturedInLambdaInLocalClass.kt") public void testConstructorParameterAndLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass.kt") public void testConstructorParameterCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass2.kt") public void testConstructorParameterCapturedInLambdaInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); } @TestMetadata("kt13454.kt") public void testKt13454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); } @TestMetadata("kt14148.kt") public void testKt14148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); } @TestMetadata("kt4174a.kt") public void testKt4174a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass.kt") public void testLocalCapturedInAnonymousObjectInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass2.kt") public void testLocalCapturedInAnonymousObjectInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); } @TestMetadata("localCapturedInLambdaInInnerClassInLocalClass.kt") public void testLocalCapturedInLambdaInInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); } @TestMetadata("localCapturedInLambdaInLocalClass.kt") public void testLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); } @TestMetadata("localFunctionCapturedInLambda.kt") public void testLocalFunctionCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); } @TestMetadata("outerAndLocalCapturedInLocalClass.kt") public void testOuterAndLocalCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedAsImplicitThisInBoundReference.kt") public void testOuterCapturedAsImplicitThisInBoundReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); } @TestMetadata("outerCapturedInFunctionLiteral.kt") public void testOuterCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); } @TestMetadata("outerCapturedInInlineLambda.kt") public void testOuterCapturedInInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); } @TestMetadata("outerCapturedInInlineLambda2.kt") public void testOuterCapturedInInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); } @TestMetadata("outerCapturedInLambda.kt") public void testOuterCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); } @TestMetadata("outerCapturedInLambda2.kt") public void testOuterCapturedInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); } @TestMetadata("outerCapturedInLambdaInSecondaryConstructor.kt") public void testOuterCapturedInLambdaInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); } @TestMetadata("outerCapturedInLambdaInSubExpression.kt") public void testOuterCapturedInLambdaInSubExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); } @TestMetadata("outerCapturedInLocalClass.kt") public void testOuterCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedInNestedLambda.kt") public void testOuterCapturedInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); } @TestMetadata("outerCapturedInNestedObject.kt") public void testOuterCapturedInNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); } @TestMetadata("outerCapturedInObject.kt") public void testOuterCapturedInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); } @TestMetadata("outerCapturedInObject2.kt") public void testOuterCapturedInObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); } @TestMetadata("outerEnumEntryCapturedInLambdaInInnerClass.kt") public void testOuterEnumEntryCapturedInLambdaInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); } @TestMetadata("properValueCapturedByClosure1.kt") public void testProperValueCapturedByClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); } @TestMetadata("properValueCapturedByClosure2.kt") public void testProperValueCapturedByClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); } @TestMetadata("referenceToCapturedVariablesInMultipleLambdas.kt") public void testReferenceToCapturedVariablesInMultipleLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); } } @@ -4140,56 +3631,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureOuterProperty extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureFunctionInProperty.kt") public void testCaptureFunctionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); } @TestMetadata("inFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); } @TestMetadata("inProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); } @TestMetadata("inPropertyDeepObjectChain.kt") public void testInPropertyDeepObjectChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); } @TestMetadata("inPropertyFromSuperClass.kt") public void testInPropertyFromSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); } @TestMetadata("inPropertyFromSuperSuperClass.kt") public void testInPropertyFromSuperSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); } @TestMetadata("kt4176.kt") public void testKt4176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); } @TestMetadata("kt4656.kt") public void testKt4656() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); } } @@ -4197,68 +3684,62 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedVarsOptimization extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedInCrossinline.kt") public void testCapturedInCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); } @TestMetadata("capturedInInlineOnlyAssign.kt") public void testCapturedInInlineOnlyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); } @TestMetadata("capturedInInlineOnlyCAO.kt") public void testCapturedInInlineOnlyCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); } @TestMetadata("capturedInInlineOnlyIncrDecr.kt") public void testCapturedInInlineOnlyIncrDecr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); } @TestMetadata("capturedInInlineOnlyIndexedCAO.kt") public void testCapturedInInlineOnlyIndexedCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); } @TestMetadata("capturedVarsOfSize2.kt") public void testCapturedVarsOfSize2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); } @TestMetadata("kt17200.kt") public void testKt17200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); } @TestMetadata("kt17588.kt") public void testKt17588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); } @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); } @TestMetadata("withCoroutines.kt") public void testWithCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); } } @@ -4266,44 +3747,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClosureInsideClosure extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosureInsideClosure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("localFunInsideLocalFun.kt") public void testLocalFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); } @TestMetadata("localFunInsideLocalFunDifferentSignatures.kt") public void testLocalFunInsideLocalFunDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); } @TestMetadata("propertyAndFunctionNameClash.kt") public void testPropertyAndFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); } @TestMetadata("threeLevels.kt") public void testThreeLevels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); } @TestMetadata("threeLevelsDifferentSignatures.kt") public void testThreeLevelsDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); } @TestMetadata("varAsFunInsideLocalFun.kt") public void testVarAsFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); } } } @@ -4312,32 +3791,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionLiterals extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCollectionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("collectionLiteralsInArgumentPosition.kt") public void testCollectionLiteralsInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); } @TestMetadata("collectionLiteralsWithConstants.kt") public void testCollectionLiteralsWithConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); } @TestMetadata("collectionLiteralsWithVarargs.kt") public void testCollectionLiteralsWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); } @TestMetadata("defaultAnnotationParameterValues.kt") public void testDefaultAnnotationParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); } } @@ -4345,116 +3824,102 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charSequence.kt") public void testCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/charSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/charSequence.kt"); } @TestMetadata("implementCollectionThroughKotlin.kt") public void testImplementCollectionThroughKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/implementCollectionThroughKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/implementCollectionThroughKotlin.kt"); } @TestMetadata("inSetWithSmartCast.kt") public void testInSetWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); } @TestMetadata("irrelevantImplCharSequenceKotlin.kt") public void testIrrelevantImplCharSequenceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); } @TestMetadata("irrelevantImplMutableList.kt") public void testIrrelevantImplMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableList.kt"); } @TestMetadata("irrelevantImplMutableListKotlin.kt") public void testIrrelevantImplMutableListKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); } @TestMetadata("irrelevantImplMutableListSubstitution.kt") public void testIrrelevantImplMutableListSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListSubstitution.kt"); } @TestMetadata("irrelevantRemoveAtOverrideInJava.kt") public void testIrrelevantRemoveAtOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantRemoveAtOverrideInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantRemoveAtOverrideInJava.kt"); } @TestMetadata("irrelevantSizeOverrideInJava.kt") public void testIrrelevantSizeOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantSizeOverrideInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/irrelevantSizeOverrideInJava.kt"); } @TestMetadata("mutableList.kt") public void testMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/mutableList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/mutableList.kt"); } @TestMetadata("noStubsInJavaSuperClass.kt") public void testNoStubsInJavaSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); } @TestMetadata("platformValueContains.kt") public void testPlatformValueContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/platformValueContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/platformValueContains.kt"); } @TestMetadata("readOnlyList.kt") public void testReadOnlyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/readOnlyList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/readOnlyList.kt"); } @TestMetadata("readOnlyMap.kt") public void testReadOnlyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/readOnlyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/readOnlyMap.kt"); } @TestMetadata("removeAtInt.kt") public void testRemoveAtInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/removeAtInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/removeAtInt.kt"); } @TestMetadata("strList.kt") public void testStrList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/strList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/strList.kt"); } @TestMetadata("toArrayInJavaClass.kt") public void testToArrayInJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); } } @@ -4462,20 +3927,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Compatibility extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dataClassEqualsHashCodeToString.kt") public void testDataClassEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); } @TestMetadata("privateCompanionObject.kt") public void testPrivateCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); } } @@ -4483,44 +3950,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constants extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstants() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constantsInWhen.kt") public void testConstantsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/constantsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/constantsInWhen.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/float.kt"); } @TestMetadata("kt9532.kt") public void testKt9532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } @TestMetadata("kt9532_lv10.kt") public void testKt9532_lv10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/long.kt"); } @TestMetadata("privateConst.kt") public void testPrivateConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/privateConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/privateConst.kt"); } } @@ -4528,104 +3993,92 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstructorCall extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakInConstructorArguments.kt") public void testBreakInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/breakInConstructorArguments.kt"); } @TestMetadata("continueInConstructorArguments.kt") public void testContinueInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/continueInConstructorArguments.kt"); } @TestMetadata("earlyReturnInConstructorArguments.kt") public void testEarlyReturnInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/earlyReturnInConstructorArguments.kt"); } @TestMetadata("inlineFunInConstructorCallEvaluationOrder.kt") public void testInlineFunInConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallEvaluationOrder.kt"); } @TestMetadata("inlineFunInConstructorCallWithDisabledNormalization.kt") public void testInlineFunInConstructorCallWithDisabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithDisabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithDisabledNormalization.kt"); } @TestMetadata("inlineFunInConstructorCallWithEnabledNormalization.kt") public void testInlineFunInConstructorCallWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithEnabledNormalization.kt"); } @TestMetadata("inlineFunInConstructorCallWithStrictNormalization.kt") public void testInlineFunInConstructorCallWithStrictNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithStrictNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInConstructorCallWithStrictNormalization.kt"); } @TestMetadata("inlineFunInInnerClassConstructorCall.kt") public void testInlineFunInInnerClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInInnerClassConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInInnerClassConstructorCall.kt"); } @TestMetadata("inlineFunInLocalClassConstructorCall.kt") public void testInlineFunInLocalClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } @TestMetadata("loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt") public void testLoopInInlineFunInSuperConstructorCallWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFunInSuperConstructorCallWithEnabledNormalization.kt"); } @TestMetadata("loopInInlineFunWithEnabledNormalization.kt") public void testLoopInInlineFunWithEnabledNormalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/loopInInlineFunWithEnabledNormalization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFunWithEnabledNormalization.kt"); } @TestMetadata("nestedConstructorCallWithJumpOutInConstructorArguments.kt") public void testNestedConstructorCallWithJumpOutInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/nestedConstructorCallWithJumpOutInConstructorArguments.kt"); } @TestMetadata("nonLocalReturnInConstructorArguments.kt") public void testNonLocalReturnInConstructorArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/nonLocalReturnInConstructorArguments.kt"); } @TestMetadata("possiblyPoppedUnitializedValueInArguments.kt") public void testPossiblyPoppedUnitializedValueInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/possiblyPoppedUnitializedValueInArguments.kt"); } @TestMetadata("regularConstructorCallEvaluationOrder.kt") public void testRegularConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/regularConstructorCallEvaluationOrder.kt"); } @TestMetadata("tryCatchInConstructorCallEvaluationOrder.kt") public void testTryCatchInConstructorCallEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constructorCall/tryCatchInConstructorCallEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constructorCall/tryCatchInConstructorCallEvaluationOrder.kt"); } } @@ -4633,550 +4086,469 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bottles.kt") public void testBottles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/bottles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/bottles.kt"); } @TestMetadata("breakInFinally.kt") public void testBreakInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); } @TestMetadata("compareBoxedIntegerToZero.kt") public void testCompareBoxedIntegerToZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); } @TestMetadata("conditionOfEmptyIf.kt") public void testConditionOfEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); } @TestMetadata("continueInFor.kt") public void testContinueInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); } @TestMetadata("continueInForCondition.kt") public void testContinueInForCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); } @TestMetadata("continueInWhile.kt") public void testContinueInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); } @TestMetadata("continueToLabelInFor.kt") public void testContinueToLabelInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhile.kt"); } @TestMetadata("doWhileFib.kt") public void testDoWhileFib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); } @TestMetadata("doWhileWithContinue.kt") public void testDoWhileWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); } @TestMetadata("emptyDoWhile.kt") public void testEmptyDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); } @TestMetadata("emptyFor.kt") public void testEmptyFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); } @TestMetadata("emptyWhile.kt") public void testEmptyWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); } @TestMetadata("factorialTest.kt") public void testFactorialTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); } @TestMetadata("finallyOnEmptyReturn.kt") public void testFinallyOnEmptyReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); } @TestMetadata("forArrayList.kt") public void testForArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); } @TestMetadata("forArrayListMultiDecl.kt") public void testForArrayListMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); } @TestMetadata("forInCharSequence.kt") public void testForInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); } @TestMetadata("forInCharSequenceMut.kt") public void testForInCharSequenceMut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); } @TestMetadata("forInSmartCastToArray.kt") public void testForInSmartCastToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); } @TestMetadata("forLoopMemberExtensionAll.kt") public void testForLoopMemberExtensionAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); } @TestMetadata("forLoopMemberExtensionHasNext.kt") public void testForLoopMemberExtensionHasNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); } @TestMetadata("forLoopMemberExtensionNext.kt") public void testForLoopMemberExtensionNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); } @TestMetadata("forUserType.kt") public void testForUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forUserType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forUserType.kt"); } @TestMetadata("inRangeConditionsInWhen.kt") public void testInRangeConditionsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); } @TestMetadata("kt12908.kt") public void testKt12908() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908.kt"); } @TestMetadata("kt12908_2.kt") public void testKt12908_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); } @TestMetadata("kt1441.kt") public void testKt1441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1441.kt"); } @TestMetadata("kt14839.kt") public void testKt14839() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt14839.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt14839.kt"); } @TestMetadata("kt15726.kt") public void testKt15726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt15726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt15726.kt"); } @TestMetadata("kt1688.kt") public void testKt1688() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1688.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1688.kt"); } @TestMetadata("kt17110.kt") public void testKt17110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17110.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17110.kt"); } @TestMetadata("kt1742.kt") public void testKt1742() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1742.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1742.kt"); } @TestMetadata("kt17590.kt") public void testKt17590() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590.kt"); } @TestMetadata("kt17590_long.kt") public void testKt17590_long() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); } @TestMetadata("kt1899.kt") public void testKt1899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1899.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1899.kt"); } @TestMetadata("kt2147.kt") public void testKt2147() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2147.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2147.kt"); } @TestMetadata("kt2259.kt") public void testKt2259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2259.kt"); } @TestMetadata("kt2291.kt") public void testKt2291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2291.kt"); } @TestMetadata("kt237.kt") public void testKt237() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt237.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt237.kt"); } @TestMetadata("kt2416.kt") public void testKt2416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2416.kt"); } @TestMetadata("kt2423.kt") public void testKt2423() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2423.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2423.kt"); } @TestMetadata("kt2577.kt") public void testKt2577() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2577.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2577.kt"); } @TestMetadata("kt2597.kt") public void testKt2597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2597.kt"); } @TestMetadata("kt299.kt") public void testKt299() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt299.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt299.kt"); } @TestMetadata("kt3087.kt") public void testKt3087() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3087.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3087.kt"); } @TestMetadata("kt3203_1.kt") public void testKt3203_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); } @TestMetadata("kt3203_2.kt") public void testKt3203_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); } @TestMetadata("kt3273.kt") public void testKt3273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3273.kt"); } @TestMetadata("kt3280.kt") public void testKt3280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3280.kt"); } @TestMetadata("kt3574.kt") public void testKt3574() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3574.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3574.kt"); } @TestMetadata("kt416.kt") public void testKt416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt416.kt"); } @TestMetadata("kt513.kt") public void testKt513() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt513.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt513.kt"); } @TestMetadata("kt628.kt") public void testKt628() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt628.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt628.kt"); } @TestMetadata("kt769.kt") public void testKt769() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt769.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt769.kt"); } @TestMetadata("kt772.kt") public void testKt772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt772.kt"); } @TestMetadata("kt773.kt") public void testKt773() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt773.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt773.kt"); } @TestMetadata("kt8148.kt") public void testKt8148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148.kt"); } @TestMetadata("kt8148_break.kt") public void testKt8148_break() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); } @TestMetadata("kt8148_continue.kt") public void testKt8148_continue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); } @TestMetadata("kt870.kt") public void testKt870() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt870.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt870.kt"); } @TestMetadata("kt9022Return.kt") public void testKt9022Return() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); } @TestMetadata("kt9022Throw.kt") public void testKt9022Throw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); } @TestMetadata("kt910.kt") public void testKt910() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt910.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt910.kt"); } @TestMetadata("kt958.kt") public void testKt958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt958.kt"); } @TestMetadata("longRange.kt") public void testLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/longRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/longRange.kt"); } @TestMetadata("parameterWithNameForFunctionType.kt") public void testParameterWithNameForFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); } @TestMetadata("quicksort.kt") public void testQuicksort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/quicksort.kt"); } @TestMetadata("tryCatchFinallyChain.kt") public void testTryCatchFinallyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); } @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BreakContinueInExpressions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakFromOuter.kt") public void testBreakFromOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); } @TestMetadata("breakInDoWhile.kt") public void testBreakInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); } @TestMetadata("breakInExpr.kt") public void testBreakInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); } @TestMetadata("continueInDoWhile.kt") public void testContinueInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); } @TestMetadata("inlineWithStack.kt") public void testInlineWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); } @TestMetadata("innerLoopWithStack.kt") public void testInnerLoopWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); } @TestMetadata("kt14581.kt") public void testKt14581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); } @TestMetadata("kt16713.kt") public void testKt16713() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); } @TestMetadata("kt16713_2.kt") public void testKt16713_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); } @TestMetadata("kt17384.kt") public void testKt17384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); } @TestMetadata("kt9022And.kt") public void testKt9022And() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); } @TestMetadata("kt9022Or.kt") public void testKt9022Or() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); } @TestMetadata("pathologicalDoWhile.kt") public void testPathologicalDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); } @TestMetadata("popSizes.kt") public void testPopSizes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); } @TestMetadata("tryFinally1.kt") public void testTryFinally1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); } @TestMetadata("tryFinally2.kt") public void testTryFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); } @TestMetadata("whileTrueBreak.kt") public void testWhileTrueBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); } } @@ -5184,62 +4556,57 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArray extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInArraySpecializedToUntil.kt") public void testForInArraySpecializedToUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); } @TestMetadata("forInArrayWithArrayPropertyUpdatedInLoopBody.kt") public void testForInArrayWithArrayPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody12.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody13.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); } @TestMetadata("forInDelegatedPropertyUpdatedInLoopBody.kt") public void testForInDelegatedPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInFieldUpdatedInLoopBody.kt") public void testForInFieldUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); } @TestMetadata("forIntArray.kt") public void testForIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); } @TestMetadata("forNullableIntArray.kt") public void testForNullableIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); } @TestMetadata("forPrimitiveIntArray.kt") public void testForPrimitiveIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); } } @@ -5247,98 +4614,87 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayWithIndex extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInArrayWithIndexContinuesAsUnmodified.kt") public void testForInArrayWithIndexContinuesAsUnmodified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); } @TestMetadata("forInArrrayWithIndexNoElementVar.kt") public void testForInArrrayWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); } @TestMetadata("forInArrrayWithIndexNoIndexVar.kt") public void testForInArrrayWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); } @TestMetadata("forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInArrrayWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); } @TestMetadata("forInByteArrayWithIndexWithSmartCast.kt") public void testForInByteArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInByteArrrayWithIndex.kt") public void testForInByteArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); } @TestMetadata("forInEmptyArrrayWithIndex.kt") public void testForInEmptyArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndex.kt") public void testForInGenericArrayOfIntsWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndexWithSmartCast.kt") public void testForInGenericArrayOfIntsWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); } @TestMetadata("forInGenericArrayWithIndex.kt") public void testForInGenericArrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); } @TestMetadata("forInIntArrayWithIndexWithSmartCast.kt") public void testForInIntArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInIntArrrayWithIndex.kt") public void testForInIntArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); } @TestMetadata("forInObjectArrrayWithIndex.kt") public void testForInObjectArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); } @TestMetadata("forInShortArrayWithIndexWithSmartCast.kt") public void testForInShortArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInShortArrrayWithIndex.kt") public void testForInShortArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); } } @@ -5346,50 +4702,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInCharSequenceWithIndex extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInCharSeqWithIndexStops.kt") public void testForInCharSeqWithIndexStops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); } @TestMetadata("forInCharSequenceWithIndex.kt") public void testForInCharSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); } @TestMetadata("forInEmptyStringWithIndex.kt") public void testForInEmptyStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); } @TestMetadata("forInStringWithIndex.kt") public void testForInStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); } @TestMetadata("forInStringWithIndexNoElementVar.kt") public void testForInStringWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); } @TestMetadata("forInStringWithIndexNoIndexVar.kt") public void testForInStringWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); } @TestMetadata("forInStringWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInStringWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5397,44 +4750,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIterableWithIndex extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInEmptyListWithIndex.kt") public void testForInEmptyListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); } @TestMetadata("forInListWithIndex.kt") public void testForInListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); } @TestMetadata("forInListWithIndexNoElementVar.kt") public void testForInListWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); } @TestMetadata("forInListWithIndexNoIndexVar.kt") public void testForInListWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); } @TestMetadata("forInListWithIndexThrowsCME.kt") public void testForInListWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); } @TestMetadata("forInListWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInListWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5442,44 +4793,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInSequenceWithIndex extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInEmptySequenceWithIndex.kt") public void testForInEmptySequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndex.kt") public void testForInSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndexNoElementVar.kt") public void testForInSequenceWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); } @TestMetadata("forInSequenceWithIndexNoIndexVar.kt") public void testForInSequenceWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); } @TestMetadata("forInSequenceWithIndexThrowsCME.kt") public void testForInSequenceWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); } @TestMetadata("forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInSequenceWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -5487,38 +4836,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnsNothing extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReturnsNothing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); } @TestMetadata("inlineMethod.kt") public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); } } @@ -5526,188 +4874,162 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchInExpressions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); } @TestMetadata("complexChain.kt") public void testComplexChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); } @TestMetadata("deadTryCatch.kt") public void testDeadTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); } @TestMetadata("expectException.kt") public void testExpectException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); } @TestMetadata("inlineTryCatch.kt") public void testInlineTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); } @TestMetadata("inlineTryExpr.kt") public void testInlineTryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); } @TestMetadata("inlineTryFinally.kt") public void testInlineTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); } @TestMetadata("kt17572.kt") public void testKt17572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); } @TestMetadata("kt17572_2.kt") public void testKt17572_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); } @TestMetadata("kt17572_2_ext.kt") public void testKt17572_2_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); } @TestMetadata("kt17572_ext.kt") public void testKt17572_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); } @TestMetadata("kt17572_nested.kt") public void testKt17572_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); } @TestMetadata("kt17573.kt") public void testKt17573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); } @TestMetadata("kt17573_nested.kt") public void testKt17573_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); } @TestMetadata("kt8608.kt") public void testKt8608() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); } @TestMetadata("kt9644try.kt") public void testKt9644try() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); } @TestMetadata("multipleCatchBlocks.kt") public void testMultipleCatchBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); } @TestMetadata("splitTry.kt") public void testSplitTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); } @TestMetadata("splitTryCorner1.kt") public void testSplitTryCorner1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); } @TestMetadata("splitTryCorner2.kt") public void testSplitTryCorner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); } @TestMetadata("tryAfterTry.kt") public void testTryAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); } @TestMetadata("tryAndBreak.kt") public void testTryAndBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); } @TestMetadata("tryAndContinue.kt") public void testTryAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); } @TestMetadata("tryCatchAfterWhileTrue.kt") public void testTryCatchAfterWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); } @TestMetadata("tryInsideCatch.kt") public void testTryInsideCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); } @TestMetadata("tryInsideTry.kt") public void testTryInsideTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); } @TestMetadata("unmatchedInlineMarkers.kt") public void testUnmatchedInlineMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); } } } @@ -5716,16 +5038,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); } @TestMetadata("accessorForSuspend.kt") public void testAccessorForSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); } public void testAllFilesPresentInCoroutines() throws Exception { @@ -5734,550 +5058,464 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("asyncIterator.kt") public void testAsyncIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); } @TestMetadata("asyncIteratorNullMerge.kt") public void testAsyncIteratorNullMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); } @TestMetadata("asyncIteratorToList.kt") public void testAsyncIteratorToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); } @TestMetadata("await.kt") public void testAwait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/await.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/await.kt"); } @TestMetadata("beginWithException.kt") public void testBeginWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithException.kt"); } @TestMetadata("beginWithExceptionNoHandleException.kt") public void testBeginWithExceptionNoHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); } @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); } @TestMetadata("controllerAccessFromInnerLambda.kt") public void testControllerAccessFromInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); } @TestMetadata("coroutineContextInInlinedLambda.kt") public void testCoroutineContextInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); } @TestMetadata("coroutineToString.kt") public void testCoroutineToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineToString.kt"); } @TestMetadata("createCoroutineSafe.kt") public void testCreateCoroutineSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); } @TestMetadata("createCoroutinesOnManualInstances.kt") public void testCreateCoroutinesOnManualInstances() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); } @TestMetadata("crossInlineWithCapturedOuterReceiver.kt") public void testCrossInlineWithCapturedOuterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); } @TestMetadata("defaultParametersInSuspend.kt") public void testDefaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); } @TestMetadata("emptyClosure.kt") public void testEmptyClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); } @TestMetadata("falseUnitCoercion.kt") public void testFalseUnitCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); } @TestMetadata("generate.kt") public void testGenerate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/generate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/generate.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleException.kt"); } @TestMetadata("handleResultCallEmptyBody.kt") public void testHandleResultCallEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); } @TestMetadata("handleResultNonUnitExpression.kt") public void testHandleResultNonUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); } @TestMetadata("handleResultSuspended.kt") public void testHandleResultSuspended() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); } @TestMetadata("illegalState.kt") public void testIllegalState() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/illegalState.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/illegalState.kt"); } @TestMetadata("indirectInlineUsedAsNonInline.kt") public void testIndirectInlineUsedAsNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); } @TestMetadata("inlineFunInGenericClass.kt") public void testInlineFunInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); } @TestMetadata("inlineGenericFunCalledFromSubclass.kt") public void testInlineGenericFunCalledFromSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); } @TestMetadata("inlinedTryCatchFinally.kt") public void testInlinedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); } @TestMetadata("innerSuspensionCalls.kt") public void testInnerSuspensionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); } @TestMetadata("instanceOfContinuation.kt") public void testInstanceOfContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); } @TestMetadata("iterateOverArray.kt") public void testIterateOverArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); } @TestMetadata("kt12958.kt") public void testKt12958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt12958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt12958.kt"); } @TestMetadata("kt15016.kt") public void testKt15016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15016.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15016.kt"); } @TestMetadata("kt15017.kt") public void testKt15017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15017.kt"); } @TestMetadata("kt15930.kt") public void testKt15930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15930.kt"); } @TestMetadata("kt21605.kt") public void testKt21605() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt21605.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } @TestMetadata("lastExpressionIsLoop.kt") public void testLastExpressionIsLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); } @TestMetadata("lastStatementInc.kt") public void testLastStatementInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); } @TestMetadata("lastStementAssignment.kt") public void testLastStementAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); } @TestMetadata("lastUnitExpression.kt") public void testLastUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); } @TestMetadata("localCallableRef.kt") public void testLocalCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); } @TestMetadata("localDelegate.kt") public void testLocalDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localDelegate.kt"); } @TestMetadata("longRangeInSuspendCall.kt") public void testLongRangeInSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); } @TestMetadata("longRangeInSuspendFun.kt") public void testLongRangeInSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); } @TestMetadata("mergeNullAndString.kt") public void testMergeNullAndString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); } @TestMetadata("multipleInvokeCalls.kt") public void testMultipleInvokeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda1.kt") public void testMultipleInvokeCallsInsideInlineLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda2.kt") public void testMultipleInvokeCallsInsideInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda3.kt") public void testMultipleInvokeCallsInsideInlineLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); } @TestMetadata("nestedTryCatch.kt") public void testNestedTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); } @TestMetadata("noSuspensionPoints.kt") public void testNoSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); } @TestMetadata("nonLocalReturnFromInlineLambda.kt") public void testNonLocalReturnFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); } @TestMetadata("nonLocalReturnFromInlineLambdaDeep.kt") public void testNonLocalReturnFromInlineLambdaDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); } @TestMetadata("overrideDefaultArgument.kt") public void testOverrideDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); } @TestMetadata("recursiveSuspend.kt") public void testRecursiveSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); } @TestMetadata("returnByLabel.kt") public void testReturnByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simple.kt"); } @TestMetadata("simpleException.kt") public void testSimpleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleException.kt"); } @TestMetadata("simpleWithHandleResult.kt") public void testSimpleWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); } @TestMetadata("statementLikeLastExpression.kt") public void testStatementLikeLastExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); } @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); } @TestMetadata("suspendDefaultImpl.kt") public void testSuspendDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); } @TestMetadata("suspendDelegation.kt") public void testSuspendDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); } @TestMetadata("suspendFromInlineLambda.kt") public void testSuspendFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); } @TestMetadata("suspendFunImportedFromObject.kt") public void testSuspendFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstruction.kt") public void testSuspendInTheMiddleOfObjectConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt") public void testSuspendInTheMiddleOfObjectConstructionEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionWithJumpOut.kt") public void testSuspendInTheMiddleOfObjectConstructionWithJumpOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); } @TestMetadata("suspensionInsideSafeCall.kt") public void testSuspensionInsideSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); } @TestMetadata("suspensionInsideSafeCallWithElvis.kt") public void testSuspensionInsideSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); } @TestMetadata("tryCatchFinallyWithHandleResult.kt") public void testTryCatchFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); } @TestMetadata("tryCatchWithHandleResult.kt") public void testTryCatchWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); } @TestMetadata("tryFinallyInsideInlineLambda.kt") public void testTryFinallyInsideInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); } @TestMetadata("tryFinallyWithHandleResult.kt") public void testTryFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); } @TestMetadata("varValueConflictsWithTable.kt") public void testVarValueConflictsWithTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); } @TestMetadata("varValueConflictsWithTableSameSort.kt") public void testVarValueConflictsWithTableSameSort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInControlFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakFinally.kt") public void testBreakFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); } @TestMetadata("breakStatement.kt") public void testBreakStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); } @TestMetadata("doWhileStatement.kt") public void testDoWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } @TestMetadata("forContinue.kt") public void testForContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); } @TestMetadata("forStatement.kt") public void testForStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); } @TestMetadata("forWithStep.kt") public void testForWithStep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); } @TestMetadata("ifStatement.kt") public void testIfStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); } @TestMetadata("labeledWhile.kt") public void testLabeledWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); } @TestMetadata("returnFromFinally.kt") public void testReturnFromFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); } @TestMetadata("switchLikeWhen.kt") public void testSwitchLikeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); } @TestMetadata("throwFromCatch.kt") public void testThrowFromCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); } @TestMetadata("throwInTryWithHandleResult.kt") public void testThrowInTryWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); } @TestMetadata("whileStatement.kt") public void testWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); } } @@ -6285,148 +5523,134 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FeatureIntersection extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFeatureIntersection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("breakWithNonEmptyStack.kt") public void testBreakWithNonEmptyStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); } @TestMetadata("destructuringInLambdas.kt") public void testDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); } @TestMetadata("safeCallOnTwoReceivers.kt") public void testSafeCallOnTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); } @TestMetadata("safeCallOnTwoReceiversLong.kt") public void testSafeCallOnTwoReceiversLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); } @TestMetadata("suspendDestructuringInLambdas.kt") public void testSuspendDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); } @TestMetadata("suspendOperatorPlus.kt") public void testSuspendOperatorPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); } @TestMetadata("suspendOperatorPlusAssign.kt") public void testSuspendOperatorPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); } @TestMetadata("suspendOperatorPlusCallFromLambda.kt") public void testSuspendOperatorPlusCallFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tailrec extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailrec() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("controlFlowIf.kt") public void testControlFlowIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); } @TestMetadata("controlFlowWhen.kt") public void testControlFlowWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); } @TestMetadata("extention.kt") public void testExtention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); } } } @@ -6435,68 +5659,62 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntLikeVarSpilling extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("complicatedMerge.kt") public void testComplicatedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); } @TestMetadata("i2bResult.kt") public void testI2bResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); } @TestMetadata("loadFromBooleanArray.kt") public void testLoadFromBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); } @TestMetadata("loadFromByteArray.kt") public void testLoadFromByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); } @TestMetadata("noVariableInTable.kt") public void testNoVariableInTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); } @TestMetadata("sameIconst1ManyVars.kt") public void testSameIconst1ManyVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); } @TestMetadata("usedInArrayStore.kt") public void testUsedInArrayStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt"); } @TestMetadata("usedInMethodCall.kt") public void testUsedInMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); } @TestMetadata("usedInPutfield.kt") public void testUsedInPutfield() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt"); } @TestMetadata("usedInVarStore.kt") public void testUsedInVarStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); } } @@ -6504,56 +5722,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntrinsicSemantics extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); } @TestMetadata("coroutineContextReceiver.kt") public void testCoroutineContextReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); } @TestMetadata("coroutineContextReceiverNotIntrinsic.kt") public void testCoroutineContextReceiverNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); } @TestMetadata("intercepted.kt") public void testIntercepted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturn.kt") public void testStartCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturnInterception.kt") public void testStartCoroutineUninterceptedOrReturnInterception() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); } @TestMetadata("suspendCoroutineUninterceptedOrReturn.kt") public void testSuspendCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); } } @@ -6561,6 +5775,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -6571,8 +5789,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class Anonymous extends AbstractLightAnalysisModeTest { @TestMetadata("simple.kt") public void ignoreSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInAnonymous() throws Exception { @@ -6584,68 +5805,62 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Named extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNamed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedParameters.kt") public void testCapturedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); } @TestMetadata("insideLambda.kt") public void testInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); } @TestMetadata("nestedLocals.kt") public void testNestedLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); } @TestMetadata("simpleSuspensionPoint.kt") public void testSimpleSuspensionPoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); } @TestMetadata("stateMachine.kt") public void testStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); } } } @@ -6656,19 +5871,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class MultiModule extends AbstractLightAnalysisModeTest { @TestMetadata("inlineMultiModuleOverride.kt") public void ignoreInlineMultiModuleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInMultiModule() throws Exception { @@ -6677,38 +5884,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("inlineFunctionWithOptionalParam.kt") public void testInlineFunctionWithOptionalParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); } @TestMetadata("inlineMultiModule.kt") public void testInlineMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); } @TestMetadata("inlineMultiModuleWithController.kt") public void testInlineMultiModuleWithController() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); } @TestMetadata("inlineMultiModuleWithInnerInlining.kt") public void testInlineMultiModuleWithInnerInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); } @TestMetadata("inlineTailCall.kt") public void testInlineTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); } } @@ -6716,14 +5917,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantLocalsElimination extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ktor_receivedMessage.kt") public void testKtor_receivedMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); } } @@ -6731,32 +5935,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackUnwinding extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStackUnwinding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("exception.kt") public void testException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); } } @@ -6764,104 +5968,92 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionAsCoroutine extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); } @TestMetadata("inlineTwoReceivers.kt") public void testInlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); } @TestMetadata("noinlineTwoReceivers.kt") public void testNoinlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); } @TestMetadata("openFunWithJava.kt") public void testOpenFunWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/openFunWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/openFunWithJava.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); } @TestMetadata("privateFunctions.kt") public void testPrivateFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); } @TestMetadata("privateInFile.kt") public void testPrivateInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); } @TestMetadata("returnNoSuspend.kt") public void testReturnNoSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); } @TestMetadata("superCallAbstractClass.kt") public void testSuperCallAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); } @TestMetadata("superCallInterface.kt") public void testSuperCallInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); } @TestMetadata("withVariables.kt") public void testWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); } } @@ -6869,32 +6061,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionTypeCall extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); } @TestMetadata("manyParameters.kt") public void testManyParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); } @TestMetadata("suspendModifier.kt") public void testSuspendModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); } } @@ -6902,50 +6094,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCallOptimizations extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailCallOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("crossinline.kt") public void testCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); } @TestMetadata("inlineWithStateMachine.kt") public void testInlineWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); } @TestMetadata("inlineWithoutStateMachine.kt") public void testInlineWithoutStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); } @TestMetadata("unreachable.kt") public void testUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); } @TestMetadata("whenUnit.kt") public void testWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); } } @@ -6953,32 +6142,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailOperations extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("suspendWithIf.kt") public void testSuspendWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); } @TestMetadata("suspendWithTryCatch.kt") public void testSuspendWithTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); } @TestMetadata("suspendWithWhen.kt") public void testSuspendWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); } @TestMetadata("tailInlining.kt") public void testTailInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); } } @@ -6986,38 +6175,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnitTypeReturn extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnitTypeReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coroutineNonLocalReturn.kt") public void testCoroutineNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); } @TestMetadata("coroutineReturn.kt") public void testCoroutineReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); } @TestMetadata("suspendNonLocalReturn.kt") public void testSuspendNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); } @TestMetadata("suspendReturn.kt") public void testSuspendReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); } @TestMetadata("unitSafeCall.kt") public void testUnitSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); } } @@ -7025,20 +6213,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarSpilling extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt19475.kt") public void testKt19475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); } @TestMetadata("nullSpilling.kt") public void testNullSpilling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); } } } @@ -7047,154 +6237,139 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); } @TestMetadata("doubleParam.kt") public void testDoubleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); } @TestMetadata("floatParam.kt") public void testFloatParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/floatParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/genericParam.kt"); } @TestMetadata("kt5002.kt") public void testKt5002() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/kt5002.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/kt5002.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); } @TestMetadata("multiDeclarationFor.kt") public void testMultiDeclarationFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); } @TestMetadata("nonTrivialFinalMemberInSuperClass.kt") public void testNonTrivialFinalMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); } @TestMetadata("nonTrivialMemberInSuperClass.kt") public void testNonTrivialMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); } @TestMetadata("privateValParams.kt") public void testPrivateValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); } @TestMetadata("twoValParams.kt") public void testTwoValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); } @TestMetadata("twoVarParams.kt") public void testTwoVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Copy extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCopy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorWithDefaultParam.kt") public void testConstructorWithDefaultParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); } @TestMetadata("copyInObjectNestedDataClass.kt") public void testCopyInObjectNestedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); } @TestMetadata("kt12708.kt") public void testKt12708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); } @TestMetadata("kt3033.kt") public void testKt3033() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); } @TestMetadata("valInConstructorParams.kt") public void testValInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); } @TestMetadata("varInConstructorParams.kt") public void testVarInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); } @TestMetadata("withGenericParameter.kt") public void testWithGenericParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); } @TestMetadata("withSecondaryConstructor.kt") public void testWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); } } @@ -7202,50 +6377,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("genericarray.kt") public void testGenericarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); } @TestMetadata("intarray.kt") public void testIntarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/null.kt"); } @TestMetadata("nullother.kt") public void testNullother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); } @TestMetadata("sameinstance.kt") public void testSameinstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); } } @@ -7253,86 +6425,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashCode extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); } } @@ -7340,50 +6503,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToString extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); } } } @@ -7392,32 +6552,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCodeElimination extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDeadCodeElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyVariableRange.kt") public void testEmptyVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); } @TestMetadata("intersectingVariableRange.kt") public void testIntersectingVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); } @TestMetadata("intersectingVariableRangeInFinally.kt") public void testIntersectingVariableRangeInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); } @TestMetadata("kt14357.kt") public void testKt14357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); } } @@ -7427,53 +6587,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class DefaultArguments extends AbstractLightAnalysisModeTest { @TestMetadata("implementedByFake.kt") public void ignoreImplementedByFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); } @TestMetadata("implementedByFake2.kt") public void ignoreImplementedByFake2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); } @TestMetadata("implementedByFake3.kt") public void ignoreImplementedByFake3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDefaultArguments() throws Exception { @@ -7482,124 +6610,109 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("inheritedFromInterfaceViaAbstractSuperclass.kt") public void testInheritedFromInterfaceViaAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); } @TestMetadata("kt6382.kt") public void testKt6382() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/protected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/protected.kt"); } @TestMetadata("simpleFromOtherFile.kt") public void testSimpleFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); } @TestMetadata("superCallCheck.kt") public void testSuperCallCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); } @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); } @TestMetadata("annotationWithEmptyArray.kt") public void testAnnotationWithEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); } @TestMetadata("checkIfConstructorIsSynthetic.kt") public void testCheckIfConstructorIsSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); } @TestMetadata("defArgs1.kt") public void testDefArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); } @TestMetadata("defArgs1InnerClass.kt") public void testDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); } @TestMetadata("defArgs2.kt") public void testDefArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); } @TestMetadata("doubleDefArgs1InnerClass.kt") public void testDoubleDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); } @TestMetadata("enumWithOneDefArg.kt") public void testEnumWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); } @TestMetadata("enumWithTwoDefArgs.kt") public void testEnumWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); } @TestMetadata("enumWithTwoDoubleDefArgs.kt") public void testEnumWithTwoDoubleDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); } @TestMetadata("kt2852.kt") public void testKt2852() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); } @TestMetadata("kt3060.kt") public void testKt3060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); } @TestMetadata("manyArgs.kt") public void testManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); } } @@ -7607,26 +6720,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Convention extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("incWithDefaultInGetter.kt") public void testIncWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); } @TestMetadata("kt9140.kt") public void testKt9140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); } @TestMetadata("plusAssignWithDefaultInGetter.kt") public void testPlusAssignWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); } } @@ -7634,10 +6748,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -7646,116 +6763,97 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); } @TestMetadata("covariantOverrideGeneric.kt") public void testCovariantOverrideGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); } @TestMetadata("extensionFunctionManyArgs.kt") public void testExtensionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); } @TestMetadata("extentionFunction.kt") public void testExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); } @TestMetadata("extentionFunctionDouble.kt") public void testExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); } @TestMetadata("extentionFunctionDoubleTwoArgs.kt") public void testExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("extentionFunctionInClassObject.kt") public void testExtentionFunctionInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); } @TestMetadata("extentionFunctionInObject.kt") public void testExtentionFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); } @TestMetadata("extentionFunctionWithOneDefArg.kt") public void testExtentionFunctionWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); } @TestMetadata("funInTrait.kt") public void testFunInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); } @TestMetadata("innerExtentionFunction.kt") public void testInnerExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); } @TestMetadata("innerExtentionFunctionDouble.kt") public void testInnerExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); } @TestMetadata("innerExtentionFunctionDoubleTwoArgs.kt") public void testInnerExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("innerExtentionFunctionManyArgs.kt") public void testInnerExtentionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); } @TestMetadata("kt5232.kt") public void testKt5232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); } @TestMetadata("memberFunctionManyArgs.kt") public void testMemberFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); } @TestMetadata("mixingNamedAndPositioned.kt") public void testMixingNamedAndPositioned() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); } @TestMetadata("topLevelManyArgs.kt") public void testTopLevelManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); } } @@ -7763,32 +6861,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("memberExtensionFunction.kt") public void testMemberExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); } } @@ -7796,26 +6894,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt2789.kt") public void testKt2789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); } @TestMetadata("kt9428.kt") public void testKt9428() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); } @TestMetadata("kt9924.kt") public void testKt9924() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); } } } @@ -7826,25 +6925,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class DelegatedProperty extends AbstractLightAnalysisModeTest { @TestMetadata("genericDelegateUncheckedCast2.kt") public void ignoreGenericDelegateUncheckedCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); } public void testAllFilesPresentInDelegatedProperty() throws Exception { @@ -7853,328 +6943,279 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); } @TestMetadata("castGetReturnType.kt") public void testCastGetReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); } @TestMetadata("castSetParameter.kt") public void testCastSetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); } @TestMetadata("delegateAsInnerClass.kt") public void testDelegateAsInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); } @TestMetadata("delegateByOtherProperty.kt") public void testDelegateByOtherProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); } @TestMetadata("delegateByTopLevelFun.kt") public void testDelegateByTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); } @TestMetadata("delegateByTopLevelProperty.kt") public void testDelegateByTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); } @TestMetadata("delegateForExtProperty.kt") public void testDelegateForExtProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); } @TestMetadata("delegateForExtPropertyInClass.kt") public void testDelegateForExtPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); } @TestMetadata("delegateWithPrivateSet.kt") public void testDelegateWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); } @TestMetadata("extensionDelegatesWithSameNames.kt") public void testExtensionDelegatesWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); } @TestMetadata("extensionPropertyAndExtensionGetValue.kt") public void testExtensionPropertyAndExtensionGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); } @TestMetadata("genericDelegate.kt") public void testGenericDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); } @TestMetadata("genericDelegateUncheckedCast1.kt") public void testGenericDelegateUncheckedCast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); } @TestMetadata("genericSetValueViaSyntheticAccessor.kt") public void testGenericSetValueViaSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); } @TestMetadata("getAsExtensionFun.kt") public void testGetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); } @TestMetadata("getAsExtensionFunInClass.kt") public void testGetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); } @TestMetadata("getDelegateWithoutReflection.kt") public void testGetDelegateWithoutReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); } @TestMetadata("inClassVal.kt") public void testInClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); } @TestMetadata("inClassVar.kt") public void testInClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); } @TestMetadata("inferredPropertyType.kt") public void testInferredPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); } @TestMetadata("kt4138.kt") public void testKt4138() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); } @TestMetadata("kt6722.kt") public void testKt6722() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); } @TestMetadata("kt9712.kt") public void testKt9712() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); } @TestMetadata("privateSetterKPropertyIsNotMutable.kt") public void testPrivateSetterKPropertyIsNotMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); } @TestMetadata("propertyMetadataShouldBeCached.kt") public void testPropertyMetadataShouldBeCached() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); } @TestMetadata("protectedVarWithPrivateSet.kt") public void testProtectedVarWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); } @TestMetadata("setAsExtensionFun.kt") public void testSetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); } @TestMetadata("setAsExtensionFunInClass.kt") public void testSetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); } @TestMetadata("stackOverflowOnCallFromGetValue.kt") public void testStackOverflowOnCallFromGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); } @TestMetadata("twoPropByOneDelegete.kt") public void testTwoPropByOneDelegete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); } @TestMetadata("useKPropertyLater.kt") public void testUseKPropertyLater() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); } @TestMetadata("useReflectionOnKProperty.kt") public void testUseReflectionOnKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); } @TestMetadata("valInInnerClass.kt") public void testValInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); } @TestMetadata("varInInnerClass.kt") public void testVarInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedLocalVal.kt") public void testCapturedLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); } @TestMetadata("capturedLocalValNoInline.kt") public void testCapturedLocalValNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); } @TestMetadata("capturedLocalVar.kt") public void testCapturedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); } @TestMetadata("capturedLocalVarNoInline.kt") public void testCapturedLocalVarNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); } @TestMetadata("inlineGetValue.kt") public void testInlineGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); } @TestMetadata("inlineOperators.kt") public void testInlineOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); } @TestMetadata("kt12891.kt") public void testKt12891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); } @TestMetadata("kt13557.kt") public void testKt13557() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); } @TestMetadata("kt19690.kt") public void testKt19690() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); } @TestMetadata("localValNoExplicitType.kt") public void testLocalValNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); } @TestMetadata("localVarNoExplicitType.kt") public void testLocalVarNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); } } @@ -8182,110 +7223,97 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentReceivers.kt") public void testDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); } @TestMetadata("evaluationOrder.kt") public void testEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); } @TestMetadata("evaluationOrderVar.kt") public void testEvaluationOrderVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); } @TestMetadata("extensionDelegated.kt") public void testExtensionDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); } @TestMetadata("hostCheck.kt") public void testHostCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); } @TestMetadata("inlineProvideDelegate.kt") public void testInlineProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); } @TestMetadata("kt15437.kt") public void testKt15437() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); } @TestMetadata("kt16441.kt") public void testKt16441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); } @TestMetadata("kt18902.kt") public void testKt18902() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); } @TestMetadata("localCaptured.kt") public void testLocalCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); } @TestMetadata("localDifferentReceivers.kt") public void testLocalDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); } @TestMetadata("propertyMetadata.kt") public void testPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); } } } @@ -8296,19 +7324,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class Delegation extends AbstractLightAnalysisModeTest { @TestMetadata("withDefaultParameters.kt") public void ignoreWithDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInDelegation() throws Exception { @@ -8317,26 +7337,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationToVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/kt8154.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } } @@ -8344,56 +7360,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringDeclInLambdaParam extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("extensionComponents.kt") public void testExtensionComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); } @TestMetadata("otherParameters.kt") public void testOtherParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); } @TestMetadata("stdlibUsages.kt") public void testStdlibUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); } @TestMetadata("underscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); } @TestMetadata("withIndexed.kt") public void testWithIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); } } @@ -8401,6 +7413,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Diagnostics extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8409,6 +7425,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8417,14 +7437,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt6176.kt") public void testKt6176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); } } @@ -8432,6 +7455,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -8440,68 +7467,62 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnObjects extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOnObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass1.kt") public void testInvokeOnClassObjectOfNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass2.kt") public void testInvokeOnClassObjectOfNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); } @TestMetadata("invokeOnEnum1.kt") public void testInvokeOnEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); } @TestMetadata("invokeOnEnum2.kt") public void testInvokeOnEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); } @TestMetadata("invokeOnImportedEnum1.kt") public void testInvokeOnImportedEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); } @TestMetadata("invokeOnImportedEnum2.kt") public void testInvokeOnImportedEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); } } } @@ -8510,230 +7531,197 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailRecursion extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTailRecursion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/tailRecursion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); } @TestMetadata("defaultArgsOverridden.kt") public void testDefaultArgsOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); } @TestMetadata("extensionTailCall.kt") public void testExtensionTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); } @TestMetadata("functionWithNoTails.kt") public void testFunctionWithNoTails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); } @TestMetadata("functionWithNonTailRecursions.kt") public void testFunctionWithNonTailRecursions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); } @TestMetadata("functionWithoutAnnotation.kt") public void testFunctionWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); } @TestMetadata("insideElvis.kt") public void testInsideElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); } @TestMetadata("labeledThisReferences.kt") public void testLabeledThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); } @TestMetadata("loops.kt") public void testLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); } @TestMetadata("multilevelBlocks.kt") public void testMultilevelBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); } @TestMetadata("realIteratorFoldl.kt") public void testRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void testRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); } @TestMetadata("recursiveCallInLambda.kt") public void testRecursiveCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); } @TestMetadata("recursiveCallInLocalFunction.kt") public void testRecursiveCallInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); } @TestMetadata("recursiveInnerFunction.kt") public void testRecursiveInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); } @TestMetadata("returnIf.kt") public void testReturnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); } @TestMetadata("returnInCatch.kt") public void testReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); } @TestMetadata("returnInIfInFinally.kt") public void testReturnInIfInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); } @TestMetadata("returnInParentheses.kt") public void testReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); } @TestMetadata("simpleBlock.kt") public void testSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); } @TestMetadata("simpleReturnWithElse.kt") public void testSimpleReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); } @TestMetadata("sum.kt") public void testSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void testTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void testTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); } @TestMetadata("tailRecursionInFinally.kt") public void testTailRecursionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); } @TestMetadata("thisReferences.kt") public void testThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); } @TestMetadata("unitBlocks.kt") public void testUnitBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); } @TestMetadata("whenWithCondition.kt") public void testWhenWithCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); } @TestMetadata("whenWithInRange.kt") public void testWhenWithInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); } @TestMetadata("whenWithIs.kt") public void testWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); } @TestMetadata("whenWithoutCondition.kt") public void testWhenWithoutCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); } } } @@ -8742,14 +7730,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt4172.kt") public void testKt4172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); } } } @@ -8758,32 +7749,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Elvis extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/genericNull.kt"); } @TestMetadata("kt6694ExactAnnotationForElvis.kt") public void testKt6694ExactAnnotationForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); } @TestMetadata("nullNullOk.kt") public void testNullNullOk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/nullNullOk.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/nullNullOk.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/primitive.kt"); } } @@ -8791,16 +7782,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); } @TestMetadata("abstractNestedClass.kt") public void testAbstractNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -8809,346 +7802,294 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("asReturnExpression.kt") public void testAsReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/asReturnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/asReturnExpression.kt"); } @TestMetadata("classForEnumEntry.kt") public void testClassForEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); } @TestMetadata("companionObjectInEnum.kt") public void testCompanionObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass.kt") public void testDeepInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass2.kt") public void testDeepInnerClassInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyConstructor.kt"); } @TestMetadata("emptyEnumValuesValueOf.kt") public void testEmptyEnumValuesValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); } @TestMetadata("enumCompanionInit.kt") public void testEnumCompanionInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor1.kt") public void testEnumEntryReferenceFromInnerClassConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor2.kt") public void testEnumEntryReferenceFromInnerClassConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor3.kt") public void testEnumEntryReferenceFromInnerClassConstructor3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); } @TestMetadata("enumInheritedFromTrait.kt") public void testEnumInheritedFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); } @TestMetadata("enumShort.kt") public void testEnumShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumShort.kt"); } @TestMetadata("enumWithLambdaParameter.kt") public void testEnumWithLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); } @TestMetadata("inPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inPackage.kt"); } @TestMetadata("inclassobj.kt") public void testInclassobj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inclassobj.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inclassobj.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inner.kt"); } @TestMetadata("innerClassInEnumEntryClass.kt") public void testInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass.kt") public void testInnerClassMethodInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass2.kt") public void testInnerClassMethodInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); } @TestMetadata("innerWithExistingClassObject.kt") public void testInnerWithExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); } @TestMetadata("kt1119.kt") public void testKt1119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt1119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt1119.kt"); } @TestMetadata("kt18731.kt") public void testKt18731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt18731.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt18731.kt"); } @TestMetadata("kt20651.kt") public void testKt20651() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651.kt"); } @TestMetadata("kt20651_inlineLambda.kt") public void testKt20651_inlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); } @TestMetadata("kt20651a.kt") public void testKt20651a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651a.kt"); } @TestMetadata("kt20651b.kt") public void testKt20651b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651b.kt"); } @TestMetadata("kt2350.kt") public void testKt2350() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt2350.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt2350.kt"); } @TestMetadata("kt7257.kt") public void testKt7257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257.kt"); } @TestMetadata("kt7257_anonObjectInit.kt") public void testKt7257_anonObjectInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); } @TestMetadata("kt7257_anonObjectMethod.kt") public void testKt7257_anonObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); } @TestMetadata("kt7257_boundReference1.kt") public void testKt7257_boundReference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); } @TestMetadata("kt7257_boundReference2.kt") public void testKt7257_boundReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); } @TestMetadata("kt7257_boundReferenceWithImplicitReceiver.kt") public void testKt7257_boundReferenceWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); } @TestMetadata("kt7257_explicitReceiver.kt") public void testKt7257_explicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); } @TestMetadata("kt7257_fullyQualifiedReceiver.kt") public void testKt7257_fullyQualifiedReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); } @TestMetadata("kt7257_namedLocalFun.kt") public void testKt7257_namedLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); } @TestMetadata("kt7257_notInline.kt") public void testKt7257_notInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); } @TestMetadata("kt9711.kt") public void testKt9711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711.kt"); } @TestMetadata("kt9711_2.kt") public void testKt9711_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711_2.kt"); } @TestMetadata("manyDefaultParameters.kt") public void testManyDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); } @TestMetadata("modifierFlags.kt") public void testModifierFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/modifierFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); } @TestMetadata("objectInEnum.kt") public void testObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/objectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/objectInEnum.kt"); } @TestMetadata("ordinal.kt") public void testOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/ordinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/ordinal.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/simple.kt"); } @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/toString.kt"); } @TestMetadata("valueof.kt") public void testValueof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/valueof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/valueof.kt"); } @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultCtor extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultCtor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorWithDefaultArguments.kt") public void testConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); } @TestMetadata("constructorWithVararg.kt") public void testConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); } @TestMetadata("entryClassConstructorWithDefaultArguments.kt") public void testEntryClassConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); } @TestMetadata("entryClassConstructorWithVarargs.kt") public void testEntryClassConstructorWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); } @TestMetadata("secondaryConstructorWithDefaultArguments.kt") public void testSecondaryConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); } @TestMetadata("secondaryConstructorWithVararg.kt") public void testSecondaryConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); } } } @@ -9157,98 +8098,87 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Evaluate extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEvaluate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/char.kt"); } @TestMetadata("divide.kt") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/divide.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/divide.kt"); } @TestMetadata("intrinsics.kt") public void testIntrinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/intrinsics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/intrinsics.kt"); } @TestMetadata("kt9443.kt") public void testKt9443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/kt9443.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/kt9443.kt"); } @TestMetadata("maxValue.kt") public void testMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValue.kt"); } @TestMetadata("maxValueByte.kt") public void testMaxValueByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); } @TestMetadata("maxValueInt.kt") public void testMaxValueInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/mod.kt"); } @TestMetadata("multiply.kt") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/multiply.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/multiply.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/parenthesized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/parenthesized.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/plus.kt"); } @TestMetadata("simpleCallBinary.kt") public void testSimpleCallBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); } } @@ -9256,20 +8186,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExclExcl extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExclExcl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/genericNull.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/primitive.kt"); } } @@ -9277,146 +8209,127 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunctions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("executionOrder.kt") public void testExecutionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); } @TestMetadata("kt1061.kt") public void testKt1061() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); } @TestMetadata("kt1249.kt") public void testKt1249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); } @TestMetadata("kt1290.kt") public void testKt1290() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); } @TestMetadata("kt13312.kt") public void testKt13312() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); } @TestMetadata("kt1776.kt") public void testKt1776() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); } @TestMetadata("kt1953.kt") public void testKt1953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); } @TestMetadata("kt1953_class.kt") public void testKt1953_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); } @TestMetadata("kt3285.kt") public void testKt3285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); } @TestMetadata("kt3298.kt") public void testKt3298() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); } @TestMetadata("kt3646.kt") public void testKt3646() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); } @TestMetadata("kt3969.kt") public void testKt3969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); } @TestMetadata("kt4228.kt") public void testKt4228() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); } @TestMetadata("kt475.kt") public void testKt475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); } @TestMetadata("kt5467.kt") public void testKt5467() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); } @TestMetadata("kt606.kt") public void testKt606() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); } @TestMetadata("kt865.kt") public void testKt865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); } @TestMetadata("shared.kt") public void testShared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/shared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/shared.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/simple.kt"); } @TestMetadata("thisMethodInObjectLiteral.kt") public void testThisMethodInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); } @TestMetadata("virtual.kt") public void testVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); } @TestMetadata("whenFail.kt") public void testWhenFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); } } @@ -9424,10 +8337,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionProperties extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); } public void testAllFilesPresentInExtensionProperties() throws Exception { @@ -9436,86 +8352,72 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("genericValForPrimitiveType.kt") public void testGenericValForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); } @TestMetadata("genericValMultipleUpperBounds.kt") public void testGenericValMultipleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); } @TestMetadata("genericVarForPrimitiveType.kt") public void testGenericVarForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClass.kt"); } @TestMetadata("inClassLongTypeInReceiver.kt") public void testInClassLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); } @TestMetadata("inClassWithGetter.kt") public void testInClassWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); } @TestMetadata("inClassWithPrivateGetter.kt") public void testInClassWithPrivateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); } @TestMetadata("inClassWithPrivateSetter.kt") public void testInClassWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); } @TestMetadata("inClassWithSetter.kt") public void testInClassWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); } @TestMetadata("kt9897.kt") public void testKt9897() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); } @TestMetadata("kt9897_topLevel.kt") public void testKt9897_topLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); } @TestMetadata("nonAbstractInInterface.kt") public void testNonAbstractInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); } @TestMetadata("topLevelLongTypeInReceiver.kt") public void testTopLevelLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); } } @@ -9523,26 +8425,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class External extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("jvmStaticExternal.kt") public void testJvmStaticExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); } @TestMetadata("jvmStaticExternalPrivate.kt") public void testJvmStaticExternalPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); } @TestMetadata("withDefaultArg.kt") public void testWithDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/withDefaultArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/external/withDefaultArg.kt"); } } @@ -9550,32 +8453,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverride extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFakeOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("diamondFunction.kt") public void testDiamondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/function.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); } } @@ -9583,26 +8486,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FieldRename extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFieldRename() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructorAndClassObject.kt") public void testConstructorAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); } @TestMetadata("delegates.kt") public void testDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/delegates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/delegates.kt"); } @TestMetadata("genericPropertyWithItself.kt") public void testGenericPropertyWithItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); } } @@ -9610,74 +8514,67 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Finally extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("finallyAndFinally.kt") public void testFinallyAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); } @TestMetadata("kt3549.kt") public void testKt3549() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3549.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3549.kt"); } @TestMetadata("kt3706.kt") public void testKt3706() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3706.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3706.kt"); } @TestMetadata("kt3867.kt") public void testKt3867() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3867.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3867.kt"); } @TestMetadata("kt3874.kt") public void testKt3874() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3874.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3874.kt"); } @TestMetadata("kt3894.kt") public void testKt3894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3894.kt"); } @TestMetadata("kt4134.kt") public void testKt4134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt4134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt4134.kt"); } @TestMetadata("loopAndFinally.kt") public void testLoopAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/loopAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/loopAndFinally.kt"); } @TestMetadata("notChainCatch.kt") public void testNotChainCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/notChainCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/notChainCatch.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); } @TestMetadata("tryLoopTry.kt") public void testTryLoopTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryLoopTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryLoopTry.kt"); } } @@ -9685,64 +8582,64 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FullJdk extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFullJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charBuffer.kt") public void testCharBuffer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/charBuffer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/charBuffer.kt"); } @TestMetadata("ifInWhile.kt") public void testIfInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/ifInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/ifInWhile.kt"); } @TestMetadata("intCountDownLatchExtension.kt") public void testIntCountDownLatchExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/intCountDownLatchExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/intCountDownLatchExtension.kt"); } @TestMetadata("kt434.kt") public void testKt434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/kt434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/kt434.kt"); } @TestMetadata("platformTypeAssertionStackTrace.kt") public void testPlatformTypeAssertionStackTrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/platformTypeAssertionStackTrace.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/platformTypeAssertionStackTrace.kt"); } @TestMetadata("compiler/testData/codegen/box/fullJdk/native") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNative() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("nativePropertyAccessors.kt") public void testNativePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); } @TestMetadata("simpleNative.kt") public void testSimpleNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); } } @@ -9750,20 +8647,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt15112.kt") public void testKt15112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); } @TestMetadata("kt1770.kt") public void testKt1770() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); } } } @@ -9772,298 +8671,259 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("coerceVoidToArray.kt") public void testCoerceVoidToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); } @TestMetadata("coerceVoidToObject.kt") public void testCoerceVoidToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); } @TestMetadata("defaultargs.kt") public void testDefaultargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs.kt"); } @TestMetadata("defaultargs1.kt") public void testDefaultargs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs1.kt"); } @TestMetadata("defaultargs2.kt") public void testDefaultargs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs2.kt"); } @TestMetadata("defaultargs3.kt") public void testDefaultargs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs3.kt"); } @TestMetadata("defaultargs4.kt") public void testDefaultargs4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs4.kt"); } @TestMetadata("defaultargs5.kt") public void testDefaultargs5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs5.kt"); } @TestMetadata("defaultargs6.kt") public void testDefaultargs6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs6.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs6.kt"); } @TestMetadata("defaultargs7.kt") public void testDefaultargs7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs7.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs7.kt"); } @TestMetadata("ea33909.kt") public void testEa33909() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/ea33909.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/ea33909.kt"); } @TestMetadata("fakeDescriptorWithSeveralOverridenOne.kt") public void testFakeDescriptorWithSeveralOverridenOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); } @TestMetadata("functionNtoString.kt") public void testFunctionNtoString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoString.kt"); } @TestMetadata("functionNtoStringGeneric.kt") public void testFunctionNtoStringGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); } @TestMetadata("functionNtoStringNoReflect.kt") public void testFunctionNtoStringNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); } @TestMetadata("kt1038.kt") public void testKt1038() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1038.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1038.kt"); } @TestMetadata("kt1199.kt") public void testKt1199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1199.kt"); } @TestMetadata("kt1413.kt") public void testKt1413() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1413.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1413.kt"); } @TestMetadata("kt1649_1.kt") public void testKt1649_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_1.kt"); } @TestMetadata("kt1649_2.kt") public void testKt1649_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_2.kt"); } @TestMetadata("kt1739.kt") public void testKt1739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1739.kt"); } @TestMetadata("kt2270.kt") public void testKt2270() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2270.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2270.kt"); } @TestMetadata("kt2271.kt") public void testKt2271() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2271.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2271.kt"); } @TestMetadata("kt2280.kt") public void testKt2280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2280.kt"); } @TestMetadata("kt2481.kt") public void testKt2481() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2481.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2481.kt"); } @TestMetadata("kt2716.kt") public void testKt2716() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2716.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2716.kt"); } @TestMetadata("kt2739.kt") public void testKt2739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2739.kt"); } @TestMetadata("kt2929.kt") public void testKt2929() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2929.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2929.kt"); } @TestMetadata("kt3214.kt") public void testKt3214() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3214.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3214.kt"); } @TestMetadata("kt3313.kt") public void testKt3313() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3313.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3313.kt"); } @TestMetadata("kt3573.kt") public void testKt3573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3573.kt"); } @TestMetadata("kt3724.kt") public void testKt3724() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3724.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3724.kt"); } @TestMetadata("kt395.kt") public void testKt395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt395.kt"); } @TestMetadata("kt785.kt") public void testKt785() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt785.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt785.kt"); } @TestMetadata("kt873.kt") public void testKt873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt873.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunction.kt"); } @TestMetadata("localReturnInsideFunctionExpression.kt") public void testLocalReturnInsideFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); } @TestMetadata("prefixRecursiveCall.kt") public void testPrefixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); } @TestMetadata("recursiveCompareTo.kt") public void testRecursiveCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); } @TestMetadata("recursiveIncrementCall.kt") public void testRecursiveIncrementCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); } @TestMetadata("functionExpressionWithThisReference.kt") public void testFunctionExpressionWithThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); } @TestMetadata("functionLiteralExpression.kt") public void testFunctionLiteralExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); } } @@ -10071,98 +8931,87 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("castFunctionToExtension.kt") public void testCastFunctionToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); } @TestMetadata("extensionInvokeOnExpr.kt") public void testExtensionInvokeOnExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); } @TestMetadata("implicitInvokeInCompanionObjectWithFunctionalArgument.kt") public void testImplicitInvokeInCompanionObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeWithFunctionLiteralArgument.kt") public void testImplicitInvokeWithFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invoke.kt"); } @TestMetadata("invokeOnExprByConvention.kt") public void testInvokeOnExprByConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); } @TestMetadata("invokeOnSyntheticProperty.kt") public void testInvokeOnSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); } @TestMetadata("kt3189.kt") public void testKt3189() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); } @TestMetadata("kt3190.kt") public void testKt3190() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); } @TestMetadata("kt3297.kt") public void testKt3297() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); } @TestMetadata("kt3450getAndInvoke.kt") public void testKt3450getAndInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); } @TestMetadata("kt3631invokeOnString.kt") public void testKt3631invokeOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); } @TestMetadata("kt3772.kt") public void testKt3772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); } @TestMetadata("kt3821invokeOnThis.kt") public void testKt3821invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); } @TestMetadata("kt3822invokeOnThis.kt") public void testKt3822invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); } } @@ -10170,146 +9019,127 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callInlineLocalInLambda.kt") public void testCallInlineLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); } @TestMetadata("definedWithinLambda.kt") public void testDefinedWithinLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); } @TestMetadata("definedWithinLambdaInnerUsage1.kt") public void testDefinedWithinLambdaInnerUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); } @TestMetadata("definedWithinLambdaInnerUsage2.kt") public void testDefinedWithinLambdaInnerUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); } @TestMetadata("kt2895.kt") public void testKt2895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); } @TestMetadata("kt3308.kt") public void testKt3308() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); } @TestMetadata("kt3978.kt") public void testKt3978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); } @TestMetadata("kt4119.kt") public void testKt4119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); } @TestMetadata("kt4119_2.kt") public void testKt4119_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); } @TestMetadata("kt4514.kt") public void testKt4514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); } @TestMetadata("kt4777.kt") public void testKt4777() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); } @TestMetadata("kt4783.kt") public void testKt4783() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); } @TestMetadata("kt4784.kt") public void testKt4784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); } @TestMetadata("kt4989.kt") public void testKt4989() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); } @TestMetadata("localExtensionOnNullableParameter.kt") public void testLocalExtensionOnNullableParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); } @TestMetadata("localFunctionInConstructor.kt") public void testLocalFunctionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); } @TestMetadata("localFunctionVsLocalVariable.kt") public void testLocalFunctionVsLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); } @TestMetadata("overloadedLocalFunWithoutClosure.kt") public void testOverloadedLocalFunWithoutClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); } @TestMetadata("overloadedLocalFunction.kt") public void testOverloadedLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); } @TestMetadata("overloadedLocalFunction1.kt") public void testOverloadedLocalFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); } @TestMetadata("overloadedLocalFunction2.kt") public void testOverloadedLocalFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); } @TestMetadata("overloadedLocalFunction3.kt") public void testOverloadedLocalFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); } @TestMetadata("parameterAsDefaultValue.kt") public void testParameterAsDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); } } } @@ -10318,44 +9148,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashPMap extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInHashPMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/empty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/empty.kt"); } @TestMetadata("manyNumbers.kt") public void testManyNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); } @TestMetadata("rewriteWithDifferent.kt") public void testRewriteWithDifferent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); } @TestMetadata("rewriteWithEqual.kt") public void testRewriteWithEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); } @TestMetadata("simplePlusGet.kt") public void testSimplePlusGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); } @TestMetadata("simplePlusMinus.kt") public void testSimplePlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); } } @@ -10363,338 +9191,287 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ieee754 extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIeee754() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anyToReal.kt") public void testAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/anyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); } @TestMetadata("asComparableToDouble_properIeeeComparisons.kt") public void testAsComparableToDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); } @TestMetadata("comparableToTWithT_properIeeeComparisons.kt") public void testComparableToTWithT_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); } @TestMetadata("comparableTypeCast.kt") public void testComparableTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/dataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/dataClass.kt"); } @TestMetadata("differentTypesComparison.kt") public void testDifferentTypesComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); } @TestMetadata("equalsDouble_properIeeeComparisons.kt") public void testEqualsDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsFloat.kt") public void testEqualsFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); } @TestMetadata("equalsFloat_properIeeeComparisons.kt") public void testEqualsFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); } @TestMetadata("equalsNaN.kt") public void testEqualsNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); } @TestMetadata("equalsNaN_properIeeeComparisons.kt") public void testEqualsNaN_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableDouble.kt") public void testEqualsNullableDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); } @TestMetadata("equalsNullableDouble_properIeeeComparisons.kt") public void testEqualsNullableDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableFloat.kt") public void testEqualsNullableFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); } @TestMetadata("equalsNullableFloat_properIeeeComparisons.kt") public void testEqualsNullableFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); } @TestMetadata("explicitCompareCall.kt") public void testExplicitCompareCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); } @TestMetadata("greaterDouble_properIeeeComparisons.kt") public void testGreaterDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); } @TestMetadata("greaterFloat.kt") public void testGreaterFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); } @TestMetadata("greaterFloat_properIeeeComparisons.kt") public void testGreaterFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/inline.kt"); } @TestMetadata("lessDouble.kt") public void testLessDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt"); } @TestMetadata("lessDouble_properIeeeComparisons.kt") public void testLessDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); } @TestMetadata("lessFloat.kt") public void testLessFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat.kt"); } @TestMetadata("lessFloat_properIeeeComparisons.kt") public void testLessFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); } @TestMetadata("nullableAnyToReal.kt") public void testNullableAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); } @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); } @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } @TestMetadata("nullableDoubleNotEquals10.kt") public void testNullableDoubleNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); } @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } @TestMetadata("nullableFloatEquals10.kt") public void testNullableFloatEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); } @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } @TestMetadata("nullableFloatNotEquals10.kt") public void testNullableFloatNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); } @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/safeCall.kt"); } @TestMetadata("smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt") public void testSmartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes.kt") public void testSmartCastToDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion.kt") public void testSmartCastToDifferentTypesWithNumericPromotion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt") public void testSmartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes_properIeeeComparisons.kt") public void testSmartCastToDifferentTypes_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDoubleAndComparableToDouble.kt") public void testSmartCastToDoubleAndComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when.kt"); } @TestMetadata("when10.kt") public void testWhen10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10.kt"); } @TestMetadata("when10_properIeeeComparisons.kt") public void testWhen10_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); } @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); } @TestMetadata("whenNoSubject_properIeeeComparisons.kt") public void testWhenNoSubject_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); } @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } @TestMetadata("whenNullableSmartCast10.kt") public void testWhenNullableSmartCast10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); } @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } } @@ -10702,140 +9479,122 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Increment extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIncrement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayElement.kt") public void testArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/arrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/arrayElement.kt"); } @TestMetadata("assignPlusOnSmartCast.kt") public void testAssignPlusOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); } @TestMetadata("augmentedAssignmentWithComplexRhs.kt") public void testAugmentedAssignmentWithComplexRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); } @TestMetadata("classNaryGetSet.kt") public void testClassNaryGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); } @TestMetadata("classWithGetSet.kt") public void testClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classWithGetSet.kt"); } @TestMetadata("extOnLong.kt") public void testExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/extOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/extOnLong.kt"); } @TestMetadata("genericClassWithGetSet.kt") public void testGenericClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); } @TestMetadata("memberExtOnLong.kt") public void testMemberExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); } @TestMetadata("mutableListElement.kt") public void testMutableListElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/mutableListElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/mutableListElement.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/nullable.kt"); } @TestMetadata("postfixIncrementDoubleSmartCast.kt") public void testPostfixIncrementDoubleSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); } @TestMetadata("postfixIncrementOnClass.kt") public void testPostfixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); } @TestMetadata("postfixIncrementOnClassSmartCast.kt") public void testPostfixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); } @TestMetadata("postfixIncrementOnShortSmartCast.kt") public void testPostfixIncrementOnShortSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); } @TestMetadata("postfixIncrementOnSmartCast.kt") public void testPostfixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); } @TestMetadata("postfixNullableClassIncrement.kt") public void testPostfixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); } @TestMetadata("postfixNullableIncrement.kt") public void testPostfixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); } @TestMetadata("prefixIncrementOnClass.kt") public void testPrefixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); } @TestMetadata("prefixIncrementOnClassSmartCast.kt") public void testPrefixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); } @TestMetadata("prefixIncrementOnSmartCast.kt") public void testPrefixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); } @TestMetadata("prefixNullableClassIncrement.kt") public void testPrefixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); } @TestMetadata("prefixNullableIncrement.kt") public void testPrefixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); } } @@ -10843,176 +9602,152 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); } @TestMetadata("boxUnboxOfInlineClassForCapturedVars.kt") public void testBoxUnboxOfInlineClassForCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); } @TestMetadata("callComputablePropertyInsideInlineClass.kt") public void testCallComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); } @TestMetadata("checkBoxUnboxOfArgumentsOnInlinedFunctions.kt") public void testCheckBoxUnboxOfArgumentsOnInlinedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); } @TestMetadata("checkBoxingAfterAssertionOperator.kt") public void testCheckBoxingAfterAssertionOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); } @TestMetadata("checkBoxingForNonLocalAndLabeledReturns.kt") public void testCheckBoxingForNonLocalAndLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); } @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); } @TestMetadata("checkBoxingOnFunctionCalls.kt") public void testCheckBoxingOnFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); } @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") public void testCheckBoxingOnLocalVariableAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); } @TestMetadata("checkCallingMembersInsideInlineClass.kt") public void testCheckCallingMembersInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); } @TestMetadata("checkCastToInlineClass.kt") public void testCheckCastToInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); } @TestMetadata("checkForInstanceOfInlineClass.kt") public void testCheckForInstanceOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); } @TestMetadata("checkLambdaWithInlineClassesInFunctionalType.kt") public void testCheckLambdaWithInlineClassesInFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); } @TestMetadata("checkUnboxingResultFromTypeVariable.kt") public void testCheckUnboxingResultFromTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); } @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); } @TestMetadata("createInlineClassInArgumentPosition.kt") public void testCreateInlineClassInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); } @TestMetadata("emptyConstructorForInlineClass.kt") public void testEmptyConstructorForInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); } @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") public void testInlineClassAsLastExpressionInInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); } @TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt") public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); } @TestMetadata("passInlineClassAsVararg.kt") public void testPassInlineClassAsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); } @TestMetadata("passInlineClassWithSpreadOperatorToVarargs.kt") public void testPassInlineClassWithSpreadOperatorToVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); } @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyInsideInlineClass.kt") public void testReferToUnderlyingPropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyOfInlineClass.kt") public void testReferToUnderlyingPropertyOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); } @TestMetadata("UIntArraySortExample.kt") public void testUIntArraySortExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); } @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); } @TestMetadata("useInlineFunctionInsideInlineClass.kt") public void testUseInlineFunctionInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); } @TestMetadata("useThisInsideInlineClass.kt") public void testUseThisInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); } } @@ -11020,280 +9755,244 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerNested extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInnerNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("createNestedClass.kt") public void testCreateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); } @TestMetadata("createdNestedInOuterMember.kt") public void testCreatedNestedInOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionFun.kt"); } @TestMetadata("extensionToNested.kt") public void testExtensionToNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); } @TestMetadata("importNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); } @TestMetadata("innerGenericClassFromJava.kt") public void testInnerGenericClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGenericClassFromJava.kt"); } @TestMetadata("innerJavaClass.kt") public void testInnerJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerJavaClass.kt"); } @TestMetadata("innerLabeledThis.kt") public void testInnerLabeledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); } @TestMetadata("innerSimple.kt") public void testInnerSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerSimple.kt"); } @TestMetadata("kt3132.kt") public void testKt3132() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3132.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3132.kt"); } @TestMetadata("kt3927.kt") public void testKt3927() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3927.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3927.kt"); } @TestMetadata("kt5363.kt") public void testKt5363() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt5363.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt5363.kt"); } @TestMetadata("kt6804.kt") public void testKt6804() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt6804.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt6804.kt"); } @TestMetadata("nestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); } @TestMetadata("nestedClassObject.kt") public void testNestedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); } @TestMetadata("nestedEnumConstant.kt") public void testNestedEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); } @TestMetadata("nestedGeneric.kt") public void testNestedGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); } @TestMetadata("nestedInPackage.kt") public void testNestedInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); } @TestMetadata("nestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); } @TestMetadata("nestedSimple.kt") public void testNestedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); } @TestMetadata("passingOuterRef.kt") public void testPassingOuterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); } @TestMetadata("protectedNestedClass.kt") public void testProtectedNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); } @TestMetadata("protectedNestedClassFromJava.kt") public void testProtectedNestedClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClassFromJava.kt"); } @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructorCall extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("deepInnerHierarchy.kt") public void testDeepInnerHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); } @TestMetadata("deepLocalHierarchy.kt") public void testDeepLocalHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); } @TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt") public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); } @TestMetadata("innerExtendsInnerWithProperOuterCapture.kt") public void testInnerExtendsInnerWithProperOuterCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); } @TestMetadata("innerExtendsOuter.kt") public void testInnerExtendsOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsOuter.kt"); } @TestMetadata("kt11833_1.kt") public void testKt11833_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); } @TestMetadata("kt11833_2.kt") public void testKt11833_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); } @TestMetadata("localClassOuterDiffersFromInnerOuter.kt") public void testLocalClassOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); } @TestMetadata("localExtendsInner.kt") public void testLocalExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); } @TestMetadata("localExtendsLocalWithClosure.kt") public void testLocalExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); } @TestMetadata("localWithClosureExtendsLocalWithClosure.kt") public void testLocalWithClosureExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); } @TestMetadata("objectExtendsClassDefaultArgument.kt") public void testObjectExtendsClassDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); } @TestMetadata("objectExtendsClassVararg.kt") public void testObjectExtendsClassVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); } @TestMetadata("objectExtendsInnerDefaultArgument.kt") public void testObjectExtendsInnerDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); } @TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt") public void testObjectExtendsInnerOfLocalVarargAndDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); } @TestMetadata("objectExtendsInnerOfLocalWithCapture.kt") public void testObjectExtendsInnerOfLocalWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); } @TestMetadata("objectExtendsLocalCaptureInSuperCall.kt") public void testObjectExtendsLocalCaptureInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); } @TestMetadata("objectExtendsLocalWithClosure.kt") public void testObjectExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); } @TestMetadata("objectOuterDiffersFromInnerOuter.kt") public void testObjectOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); } } } @@ -11302,6 +10001,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Instructions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInstructions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -11310,20 +10013,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Swap extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSwap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("swapRefToSharedVarInt.kt") public void testSwapRefToSharedVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); } @TestMetadata("swapRefToSharedVarLong.kt") public void testSwapRefToSharedVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); } } } @@ -11332,140 +10037,122 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intrinsics extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("charToInt.kt") public void testCharToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/charToInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/charToInt.kt"); } @TestMetadata("defaultObjectMapping.kt") public void testDefaultObjectMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); } @TestMetadata("ea35953.kt") public void testEa35953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/ea35953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/ea35953.kt"); } @TestMetadata("incWithLabel.kt") public void testIncWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); } @TestMetadata("kt10131.kt") public void testKt10131() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131.kt"); } @TestMetadata("kt10131a.kt") public void testKt10131a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); } @TestMetadata("kt12125.kt") public void testKt12125() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125.kt"); } @TestMetadata("kt12125_2.kt") public void testKt12125_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); } @TestMetadata("kt12125_inc.kt") public void testKt12125_inc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); } @TestMetadata("kt12125_inc_2.kt") public void testKt12125_inc_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); } @TestMetadata("kt5937.kt") public void testKt5937() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt5937.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt5937.kt"); } @TestMetadata("kt8666.kt") public void testKt8666() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt8666.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt8666.kt"); } @TestMetadata("longRangeWithExplicitDot.kt") public void testLongRangeWithExplicitDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); } @TestMetadata("prefixIncDec.kt") public void testPrefixIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); } @TestMetadata("rangeFromCollection.kt") public void testRangeFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); } @TestMetadata("stringFromCollection.kt") public void testStringFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwable.kt"); } @TestMetadata("throwableCallableReference.kt") public void testThrowableCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); } @TestMetadata("throwableParamOrder.kt") public void testThrowableParamOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); } @TestMetadata("tostring.kt") public void testTostring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/tostring.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/tostring.kt"); } } @@ -11473,46 +10160,49 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaInterop extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJavaInterop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericSamProjectedOut.kt") public void testGenericSamProjectedOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/genericSamProjectedOut.kt"); } @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("allWildcardsOnClass.kt") public void testAllWildcardsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); } @TestMetadata("covariantOverrideWithDeclarationSiteProjection.kt") public void testCovariantOverrideWithDeclarationSiteProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); } @TestMetadata("invariantArgumentsNoWildcard.kt") public void testInvariantArgumentsNoWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); } } @@ -11520,136 +10210,124 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullAssertions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNotNullAssertions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt") public void testDestructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/destructuringAssignmentWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt") public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv11.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt") public void testIncWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiverInPrivateOperator_lv12.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv11.kt") public void testIncWithNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv11.kt"); } @TestMetadata("incWithNullabilityAssertionOnExtensionReceiver_lv12.kt") public void testIncWithNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/incWithNullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); } @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv11.kt") public void testNullabilityAssertionOnExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv11.kt"); } @TestMetadata("nullabilityAssertionOnExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt") public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv11.kt"); } @TestMetadata("nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnInlineFunExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnInlineFunExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnMemberExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnMemberExtensionReceiver_lv12.kt"); } @TestMetadata("nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt") public void testNullabilityAssertionOnPrivateMemberExtensionReceiver_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/nullabilityAssertionOnPrivateMemberExtensionReceiver_lv12.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnhancedNullability extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnhancedNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("inFunctionWithExpressionBody.kt") public void testInFunctionWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBody.kt"); } @TestMetadata("inFunctionWithExpressionBodyWithJavaGeneric.kt") public void testInFunctionWithExpressionBodyWithJavaGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inFunctionWithExpressionBodyWithJavaGeneric.kt"); } @TestMetadata("inLocalFunctionWithExpressionBody.kt") public void testInLocalFunctionWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalFunctionWithExpressionBody.kt"); } @TestMetadata("inLocalVariableInitializer.kt") public void testInLocalVariableInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inLocalVariableInitializer.kt"); } @TestMetadata("inMemberPropertyInitializer.kt") public void testInMemberPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inMemberPropertyInitializer.kt"); } @TestMetadata("inPropertyGetterWithExpressionBody.kt") public void testInPropertyGetterWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inPropertyGetterWithExpressionBody.kt"); } @TestMetadata("inTopLevelPropertyInitializer.kt") public void testInTopLevelPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability/inTopLevelPropertyInitializer.kt"); } } } @@ -11658,44 +10336,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectMethods extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjectMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("cloneCallsConstructor.kt") public void testCloneCallsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); } @TestMetadata("cloneCallsSuper.kt") public void testCloneCallsSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); } @TestMetadata("cloneCallsSuperAndModifies.kt") public void testCloneCallsSuperAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); } @TestMetadata("cloneHashSet.kt") public void testCloneHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHashSet.kt"); } @TestMetadata("cloneHierarchy.kt") public void testCloneHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneHierarchy.kt"); } @TestMetadata("cloneableClassWithoutClone.kt") public void testCloneableClassWithoutClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); } } } @@ -11704,32 +10380,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jdk extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/hashMap.kt"); } @TestMetadata("iteratingOverHashMap.kt") public void testIteratingOverHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } @TestMetadata("kt1397.kt") public void testKt1397() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/kt1397.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } } @@ -11737,92 +10413,82 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmField extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("captureClassFields.kt") public void testCaptureClassFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); } @TestMetadata("capturePackageFields.kt") public void testCapturePackageFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); } @TestMetadata("checkNoAccessors.kt") public void testCheckNoAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); } @TestMetadata("classFieldReference.kt") public void testClassFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); } @TestMetadata("classFieldReflection.kt") public void testClassFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); } @TestMetadata("constructorProperty.kt") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); } @TestMetadata("publicField.kt") public void testPublicField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/publicField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/publicField.kt"); } @TestMetadata("simpleMemberProperty.kt") public void testSimpleMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/superCall.kt"); } @TestMetadata("superCall2.kt") public void testSuperCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/superCall2.kt"); } @TestMetadata("topLevelFieldReference.kt") public void testTopLevelFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); } @TestMetadata("topLevelFieldReflection.kt") public void testTopLevelFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/visibility.kt"); } @TestMetadata("writeFieldReference.kt") public void testWriteFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); } } @@ -11830,100 +10496,94 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmName extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/callableReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/callableReference.kt"); } @TestMetadata("clashingErasure.kt") public void testClashingErasure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/classMembers.kt"); } @TestMetadata("fakeJvmNameInJava.kt") public void testFakeJvmNameInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/functionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/functionName.kt"); } @TestMetadata("multifileClass.kt") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClass.kt"); } @TestMetadata("multifileClassWithLocalClass.kt") public void testMultifileClassWithLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); } @TestMetadata("multifileClassWithLocalGeneric.kt") public void testMultifileClassWithLocalGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); } @TestMetadata("propertyAccessorsUseSite.kt") public void testPropertyAccessorsUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); } @TestMetadata("propertyName.kt") public void testPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/propertyName.kt"); } @TestMetadata("renamedFileClass.kt") public void testRenamedFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); } @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FileFacades extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFileFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentFiles.kt") public void testDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); } @TestMetadata("javaAnnotationOnFileFacade.kt") public void testJavaAnnotationOnFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); } } } @@ -11932,98 +10592,87 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOverloads extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); } @TestMetadata("defaultsNotAtEnd.kt") public void testDefaultsNotAtEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); } @TestMetadata("doubleParameters.kt") public void testDoubleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/generics.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); } @TestMetadata("multipleDefaultParameters.kt") public void testMultipleDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); } @TestMetadata("noRedundantVarargs.kt") public void testNoRedundantVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/noRedundantVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/noRedundantVarargs.kt"); } @TestMetadata("nonDefaultParameter.kt") public void testNonDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/simple.kt"); } @TestMetadata("simpleJavaCall.kt") public void testSimpleJavaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); } } @@ -12031,32 +10680,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("metadataField.kt") public void testMetadataField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/metadataField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/metadataField.kt"); } @TestMetadata("rootPackage.kt") public void testRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/rootPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/rootPackage.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/simple.kt"); } @TestMetadata("withJvmName.kt") public void testWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmPackageName/withJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmPackageName/withJvmName.kt"); } } @@ -12064,164 +10713,142 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/annotations.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/closure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/closure.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); } @TestMetadata("convention.kt") public void testConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/convention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/convention.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/default.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/default.kt"); } @TestMetadata("enumCompanion.kt") public void testEnumCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); } @TestMetadata("explicitObject.kt") public void testExplicitObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); } @TestMetadata("funAccess.kt") public void testFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); } @TestMetadata("importStaticMemberFromObject.kt") public void testImportStaticMemberFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/inline.kt"); } @TestMetadata("inlinePropertyAccessors.kt") public void testInlinePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); } @TestMetadata("kt21246.kt") public void testKt21246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt21246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt21246.kt"); } @TestMetadata("kt21246a.kt") public void testKt21246a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt21246a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt21246a.kt"); } @TestMetadata("kt9897_static.kt") public void testKt9897_static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/object.kt"); } @TestMetadata("postfixInc.kt") public void testPostfixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); } @TestMetadata("prefixInc.kt") public void testPrefixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); } @TestMetadata("privateMethod.kt") public void testPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); } @TestMetadata("propertyAccessorsCompanion.kt") public void testPropertyAccessorsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); } @TestMetadata("propertyAccessorsObject.kt") public void testPropertyAccessorsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); } @TestMetadata("propertyAsDefault.kt") public void testPropertyAsDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); } @TestMetadata("propertyGetterDelegatesToAnother.kt") public void testPropertyGetterDelegatesToAnother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyGetterDelegatesToAnother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/propertyGetterDelegatesToAnother.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/simple.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); } } @@ -12229,56 +10856,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("controlLabelClashesWithFuncitonName.kt") public void testControlLabelClashesWithFuncitonName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); } @TestMetadata("infixCallLabelling.kt") public void testInfixCallLabelling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); } @TestMetadata("labeledDeclarations.kt") public void testLabeledDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessor.kt"); } @TestMetadata("propertyAccessorFunctionLiteral.kt") public void testPropertyAccessorFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); } @TestMetadata("propertyAccessorInnerExtensionFun.kt") public void testPropertyAccessorInnerExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); } @TestMetadata("propertyAccessorObject.kt") public void testPropertyAccessorObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); } @TestMetadata("propertyInClassAccessor.kt") public void testPropertyInClassAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); } } @@ -12286,124 +10909,114 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LazyCodegen extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLazyCodegen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("exceptionInFieldInitializer.kt") public void testExceptionInFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); } @TestMetadata("increment.kt") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/increment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/increment.kt"); } @TestMetadata("safeAssign.kt") public void testSafeAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); } @TestMetadata("safeAssignComplex.kt") public void testSafeAssignComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); } @TestMetadata("safeCallAndArray.kt") public void testSafeCallAndArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/toString.kt"); } @TestMetadata("tryCatchExpression.kt") public void testTryCatchExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/when.kt"); } @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("negateConstantCompare.kt") public void testNegateConstantCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); } @TestMetadata("negateFalse.kt") public void testNegateFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); } @TestMetadata("negateFalseVar.kt") public void testNegateFalseVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); } @TestMetadata("negateFalseVarChain.kt") public void testNegateFalseVarChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); } @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); } @TestMetadata("negateObjectComp2.kt") public void testNegateObjectComp2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); } @TestMetadata("negateTrue.kt") public void testNegateTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); } @TestMetadata("negateTrueVar.kt") public void testNegateTrueVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); } @TestMetadata("noOptimization.kt") public void testNoOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); } } } @@ -12414,53 +11027,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class LocalClasses extends AbstractLightAnalysisModeTest { @TestMetadata("closureOfInnerLocalClass.kt") public void ignoreClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); } @TestMetadata("closureWithSelfInstantiation.kt") public void ignoreClosureWithSelfInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); } @TestMetadata("subclassingExtensionReceiverClass.kt") public void ignoreSubclassingExtensionReceiverClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInLocalClasses() throws Exception { @@ -12469,176 +11050,147 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("anonymousObjectInInitializer.kt") public void testAnonymousObjectInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); } @TestMetadata("anonymousObjectInParameterInitializer.kt") public void testAnonymousObjectInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); } @TestMetadata("closureOfLambdaInLocalClass.kt") public void testClosureOfLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); } @TestMetadata("inExtensionFunction.kt") public void testInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); } @TestMetadata("inExtensionProperty.kt") public void testInExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); } @TestMetadata("inLocalExtensionFunction.kt") public void testInLocalExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); } @TestMetadata("inLocalExtensionProperty.kt") public void testInLocalExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); } @TestMetadata("innerClassInLocalClass.kt") public void testInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); } @TestMetadata("innerOfLocalCaptureExtensionReceiver.kt") public void testInnerOfLocalCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); } @TestMetadata("kt2700.kt") public void testKt2700() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2700.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2700.kt"); } @TestMetadata("kt2873.kt") public void testKt2873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2873.kt"); } @TestMetadata("kt3210.kt") public void testKt3210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3210.kt"); } @TestMetadata("kt3389.kt") public void testKt3389() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3389.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3389.kt"); } @TestMetadata("kt3584.kt") public void testKt3584() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3584.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3584.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt4174.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClass.kt"); } @TestMetadata("localClassCaptureExtensionReceiver.kt") public void testLocalClassCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); } @TestMetadata("localClassInInitializer.kt") public void testLocalClassInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); } @TestMetadata("localClassInParameterInitializer.kt") public void testLocalClassInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); } @TestMetadata("localDataClass.kt") public void testLocalDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt"); } @TestMetadata("localExtendsInnerAndReferencesOuterMember.kt") public void testLocalExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); } @TestMetadata("noclosure.kt") public void testNoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/noclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/noclosure.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/object.kt"); } @TestMetadata("ownClosureOfInnerLocalClass.kt") public void testOwnClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass1.kt") public void testRecaptureVarCapturedInLocalClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass2.kt") public void testRecaptureVarCapturedInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass3.kt") public void testRecaptureVarCapturedInLocalClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); } @TestMetadata("withclosure.kt") public void testWithclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/withclosure.kt"); } } @@ -12646,56 +11198,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mangling extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMangling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/field.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/fun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/fun.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internal.kt"); } @TestMetadata("internalOverride.kt") public void testInternalOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverride.kt"); } @TestMetadata("internalOverrideSuperCall.kt") public void testInternalOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); } @TestMetadata("noOverrideWithJava.kt") public void testNoOverrideWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); } @TestMetadata("publicOverride.kt") public void testPublicOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverride.kt"); } @TestMetadata("publicOverrideSuperCall.kt") public void testPublicOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); } } @@ -12703,162 +11251,151 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("ComplexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); } @TestMetadata("component.kt") public void testComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/component.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/component.kt"); } @TestMetadata("kt9828_hashMap.kt") public void testKt9828_hashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); } @TestMetadata("returnInElvis.kt") public void testReturnInElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); } @TestMetadata("SimpleVals.kt") public void testSimpleVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); } @TestMetadata("SimpleValsExtensions.kt") public void testSimpleValsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); } @TestMetadata("SimpleVarsExtensions.kt") public void testSimpleVarsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); } @TestMetadata("ValCapturedInFunctionLiteral.kt") public void testValCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); } @TestMetadata("ValCapturedInLocalFunction.kt") public void testValCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); } @TestMetadata("ValCapturedInObjectLiteral.kt") public void testValCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); } @TestMetadata("VarCapturedInFunctionLiteral.kt") public void testVarCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); } @TestMetadata("VarCapturedInLocalFunction.kt") public void testVarCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); } @TestMetadata("VarCapturedInObjectLiteral.kt") public void testVarCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForIterator extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LongIterator extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLongIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -12867,120 +11404,116 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForRange extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); } @TestMetadata("UnderscoreNamesDontCallComponent.kt") public void testUnderscoreNamesDontCallComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeTo extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -12988,32 +11521,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13022,70 +11555,69 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeToWithDot extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -13093,32 +11625,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13127,32 +11659,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -13160,32 +11692,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -13195,166 +11727,149 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callMultifileClassMemberFromOtherPackage.kt") public void testCallMultifileClassMemberFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/callMultifileClassMemberFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/callMultifileClassMemberFromOtherPackage.kt"); } @TestMetadata("callsToMultifileClassFromOtherPackage.kt") public void testCallsToMultifileClassFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/callsToMultifileClassFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/callsToMultifileClassFromOtherPackage.kt"); } @TestMetadata("constPropertyReferenceFromMultifileClass.kt") public void testConstPropertyReferenceFromMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/constPropertyReferenceFromMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/constPropertyReferenceFromMultifileClass.kt"); } @TestMetadata("inlineMultifileClassMemberFromOtherPackage.kt") public void testInlineMultifileClassMemberFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/inlineMultifileClassMemberFromOtherPackage.kt"); } @TestMetadata("kt16077.kt") public void testKt16077() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/kt16077.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/kt16077.kt"); } @TestMetadata("multifileClassPartsInitialization.kt") public void testMultifileClassPartsInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassPartsInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassPartsInitialization.kt"); } @TestMetadata("multifileClassWith2Files.kt") public void testMultifileClassWith2Files() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWith2Files.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWith2Files.kt"); } @TestMetadata("multifileClassWithCrossCall.kt") public void testMultifileClassWithCrossCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWithCrossCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWithCrossCall.kt"); } @TestMetadata("multifileClassWithPrivate.kt") public void testMultifileClassWithPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/multifileClassWithPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/multifileClassWithPrivate.kt"); } @TestMetadata("privateConstVal.kt") public void testPrivateConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/privateConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/privateConstVal.kt"); } @TestMetadata("samePartNameDifferentFacades.kt") public void testSamePartNameDifferentFacades() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/samePartNameDifferentFacades.kt"); } @TestMetadata("compiler/testData/codegen/box/multifileClasses/optimized") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimized extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableRefToFun.kt") public void testCallableRefToFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToFun.kt"); } @TestMetadata("callableRefToInternalValInline.kt") public void testCallableRefToInternalValInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToInternalValInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToInternalValInline.kt"); } @TestMetadata("callableRefToPrivateVal.kt") public void testCallableRefToPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToPrivateVal.kt"); } @TestMetadata("callableRefToVal.kt") public void testCallableRefToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/callableRefToVal.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/calls.kt"); } @TestMetadata("deferredStaticInitialization.kt") public void testDeferredStaticInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/deferredStaticInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/deferredStaticInitialization.kt"); } @TestMetadata("delegatedVal.kt") public void testDelegatedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/delegatedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/delegatedVal.kt"); } @TestMetadata("initializePrivateVal.kt") public void testInitializePrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/initializePrivateVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/initializePrivateVal.kt"); } @TestMetadata("initializePublicVal.kt") public void testInitializePublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/initializePublicVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/initializePublicVal.kt"); } @TestMetadata("overlappingFuns.kt") public void testOverlappingFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingFuns.kt"); } @TestMetadata("overlappingVals.kt") public void testOverlappingVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/overlappingVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/overlappingVals.kt"); } @TestMetadata("valAccessFromInlineFunCalledFromJava.kt") public void testValAccessFromInlineFunCalledFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlineFunCalledFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlineFunCalledFromJava.kt"); } @TestMetadata("valAccessFromInlinedToDifferentPackage.kt") public void testValAccessFromInlinedToDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlinedToDifferentPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valAccessFromInlinedToDifferentPackage.kt"); } @TestMetadata("valWithAccessor.kt") public void testValWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multifileClasses/optimized/valWithAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multifileClasses/optimized/valWithAccessor.kt"); } } } @@ -13363,6 +11878,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -13371,62 +11890,57 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/annotations.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); } @TestMetadata("inheritedFromCommonClass.kt") public void testInheritedFromCommonClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); } @TestMetadata("inheritedFromExpectedClass.kt") public void testInheritedFromExpectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); } @TestMetadata("inheritedFromExpectedMethod.kt") public void testInheritedFromExpectedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); } @TestMetadata("inheritedInExpectedDeclarations.kt") public void testInheritedInExpectedDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); } @TestMetadata("inlineFunctionWithDefaultLambda.kt") public void testInlineFunctionWithDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); } @TestMetadata("kt23239.kt") public void testKt23239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); } } } @@ -13435,44 +11949,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt6895.kt") public void testKt6895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt6895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt6895.kt"); } @TestMetadata("kt9644let.kt") public void testKt9644let() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); } @TestMetadata("localReturnInsideProperty.kt") public void testLocalReturnInsideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); } @TestMetadata("returnInsideTwoLambdas.kt") public void testReturnInsideTwoLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/use.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/use.kt"); } @TestMetadata("useWithException.kt") public void testUseWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); } } @@ -13480,32 +11992,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullCheckOptimization extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNullCheckOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("isNullable.kt") public void testIsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); } @TestMetadata("kt22410.kt") public void testKt22410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); } @TestMetadata("kt7774.kt") public void testKt7774() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); } @TestMetadata("trivialInstanceOf.kt") public void testTrivialInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); } } @@ -13513,14 +12025,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectIntrinsics extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjectIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); } } @@ -13528,410 +12043,347 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); } @TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt") public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); } @TestMetadata("classCallsProtectedInheritedByCompanion.kt") public void testClassCallsProtectedInheritedByCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); } @TestMetadata("classCompanion.kt") public void testClassCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCompanion.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToObjectFromCall.kt") public void testCompoundAssignmentToObjectFromCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); } @TestMetadata("compoundAssignmentToPropertyImportedFromObject.kt") public void testCompoundAssignmentToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToPropertyWithQualifier.kt") public void testCompoundAssignmentToPropertyWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); } @TestMetadata("flist.kt") public void testFlist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/flist.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/flist.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/initializationOrder.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); } @TestMetadata("interfaceCompanionObjectReference.kt") public void testInterfaceCompanionObjectReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); } @TestMetadata("kt1047.kt") public void testKt1047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1047.kt"); } @TestMetadata("kt11117.kt") public void testKt11117() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt11117.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt11117.kt"); } @TestMetadata("kt1136.kt") public void testKt1136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1136.kt"); } @TestMetadata("kt1186.kt") public void testKt1186() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1186.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1186.kt"); } @TestMetadata("kt1600.kt") public void testKt1600() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1600.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1600.kt"); } @TestMetadata("kt1737.kt") public void testKt1737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1737.kt"); } @TestMetadata("kt18982.kt") public void testKt18982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt18982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt18982.kt"); } @TestMetadata("kt2398.kt") public void testKt2398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2398.kt"); } @TestMetadata("kt2663.kt") public void testKt2663() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663.kt"); } @TestMetadata("kt2663_2.kt") public void testKt2663_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663_2.kt"); } @TestMetadata("kt2675.kt") public void testKt2675() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2675.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2675.kt"); } @TestMetadata("kt2719.kt") public void testKt2719() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2719.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2719.kt"); } @TestMetadata("kt2822.kt") public void testKt2822() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2822.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2822.kt"); } @TestMetadata("kt3238.kt") public void testKt3238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3238.kt"); } @TestMetadata("kt3684.kt") public void testKt3684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3684.kt"); } @TestMetadata("kt4086.kt") public void testKt4086() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt4086.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt4086.kt"); } @TestMetadata("kt535.kt") public void testKt535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt535.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt535.kt"); } @TestMetadata("kt560.kt") public void testKt560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt560.kt"); } @TestMetadata("kt694.kt") public void testKt694() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt694.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt694.kt"); } @TestMetadata("localFunctionInObjectInitializer_kt4516.kt") public void testLocalFunctionInObjectInitializer_kt4516() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); } @TestMetadata("methodOnObject.kt") public void testMethodOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/methodOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/methodOnObject.kt"); } @TestMetadata("nestedDerivedClassCallsProtectedFromCompanion.kt") public void testNestedDerivedClassCallsProtectedFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); } @TestMetadata("nestedObjectWithSuperclass.kt") public void testNestedObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/object.kt"); } @TestMetadata("objectExtendsInnerAndReferencesOuterMember.kt") public void testObjectExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("objectInLocalAnonymousObject.kt") public void testObjectInLocalAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); } @TestMetadata("objectInitialization_kt5523.kt") public void testObjectInitialization_kt5523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteral.kt"); } @TestMetadata("objectLiteralInClosure.kt") public void testObjectLiteralInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); } @TestMetadata("objectVsClassInitialization_kt5291.kt") public void testObjectVsClassInitialization_kt5291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); } @TestMetadata("objectWithSuperclass.kt") public void testObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); } @TestMetadata("objectWithSuperclassAndTrait.kt") public void testObjectWithSuperclassAndTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); } @TestMetadata("privateExtensionFromInitializer_kt4543.kt") public void testPrivateExtensionFromInitializer_kt4543() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); } @TestMetadata("privateFunctionFromClosureInInitializer_kt5582.kt") public void testPrivateFunctionFromClosureInInitializer_kt5582() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); } @TestMetadata("receiverInConstructor.kt") public void testReceiverInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); } @TestMetadata("safeAccess.kt") public void testSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/safeAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/safeAccess.kt"); } @TestMetadata("selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/simpleObject.kt"); } @TestMetadata("thisInConstructor.kt") public void testThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/thisInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt"); } @TestMetadata("useAnonymousObjectAsIterator.kt") public void testUseAnonymousObjectAsIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); } @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMember.kt"); } @TestMetadata("useImportedMemberFromCompanion.kt") public void testUseImportedMemberFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); } } @@ -13939,184 +12391,164 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorConventions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOperatorConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotatedAssignment.kt") public void testAnnotatedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); } @TestMetadata("augmentedAssignmentWithArrayLHS.kt") public void testAugmentedAssignmentWithArrayLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); } @TestMetadata("incDecOnObject.kt") public void testIncDecOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); } @TestMetadata("infixFunctionOverBuiltinMember.kt") public void testInfixFunctionOverBuiltinMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); } @TestMetadata("kt14201.kt") public void testKt14201() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); } @TestMetadata("kt14201_2.kt") public void testKt14201_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); } @TestMetadata("kt20387.kt") public void testKt20387() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); } @TestMetadata("kt4152.kt") public void testKt4152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); } @TestMetadata("kt4987.kt") public void testKt4987() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); } @TestMetadata("nestedMaps.kt") public void testNestedMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); } @TestMetadata("operatorSetLambda.kt") public void testOperatorSetLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); } @TestMetadata("overloadedSet.kt") public void testOverloadedSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } @TestMetadata("percentAsModOnBigIntegerWithoutRem.kt") public void testPercentAsModOnBigIntegerWithoutRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/percentAsModOnBigIntegerWithoutRem.kt"); } @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); } @TestMetadata("remOverModOperation.kt") public void testRemOverModOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); } @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompareTo extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCompareTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); } @TestMetadata("comparable.kt") public void testComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); } @TestMetadata("doubleInt.kt") public void testDoubleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); } @TestMetadata("doubleLong.kt") public void testDoubleLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); } @TestMetadata("extensionArray.kt") public void testExtensionArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); } @TestMetadata("extensionObject.kt") public void testExtensionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); } @TestMetadata("intDouble.kt") public void testIntDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); } @TestMetadata("intLong.kt") public void testIntLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); } @TestMetadata("longDouble.kt") public void testLongDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); } @TestMetadata("longInt.kt") public void testLongInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } } @@ -14125,14 +12557,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); } } @@ -14140,80 +12575,72 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxPrimitiveTypeInClinit.kt") public void testBoxPrimitiveTypeInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); } @TestMetadata("checkCast.kt") public void testCheckCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/checkCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/checkCast.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/incrementProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/incrementProperty.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/initializationOrder.kt"); } @TestMetadata("invokespecial.kt") public void testInvokespecial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/invokespecial.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/invokespecial.kt"); } @TestMetadata("mainInFiles.kt") public void testMainInFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/mainInFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/mainInFiles.kt"); } @TestMetadata("nullablePrimitiveNoFieldInitializer.kt") public void testNullablePrimitiveNoFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); } @TestMetadata("packageLocalClassNotImportedWithDefaultImport.kt") public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); } @TestMetadata("packageQualifiedMethod.kt") public void testPackageQualifiedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); } @TestMetadata("privateMembersInImportList.kt") public void testPrivateMembersInImportList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); } @TestMetadata("privateTopLevelPropAndVarInInner.kt") public void testPrivateTopLevelPropAndVarInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); } @TestMetadata("referenceWithTheSameNameAsPackage.kt") public void testReferenceWithTheSameNameAsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); } } @@ -14221,6 +12648,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -14229,146 +12660,127 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Primitives extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitives() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); } @TestMetadata("dec.kt") public void testDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); } @TestMetadata("div.kt") public void testDiv() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); } @TestMetadata("equalsNull_lv11.kt") public void testEqualsNull_lv11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv11.kt"); } @TestMetadata("equalsNull_lv12.kt") public void testEqualsNull_lv12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_lv12.kt"); } @TestMetadata("equalsNull_withExplicitFlag.kt") public void testEqualsNull_withExplicitFlag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equalsNull_withExplicitFlag.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); } @TestMetadata("inc.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); } @TestMetadata("not.kt") public void testNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); } @TestMetadata("times.kt") public void testTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); } @TestMetadata("toShort.kt") public void testToShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); } } } @@ -14377,480 +12789,416 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveTypes extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparisonWithNaN.kt") public void testComparisonWithNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); } @TestMetadata("comparisonWithNullCallsFun.kt") public void testComparisonWithNullCallsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); } @TestMetadata("conversions.kt") public void testConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); } @TestMetadata("ea35963.kt") public void testEa35963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); } @TestMetadata("incrementByteCharShort.kt") public void testIncrementByteCharShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); } @TestMetadata("intLiteralIsNotNull.kt") public void testIntLiteralIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); } @TestMetadata("kt1054.kt") public void testKt1054() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); } @TestMetadata("kt1055.kt") public void testKt1055() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); } @TestMetadata("kt1093.kt") public void testKt1093() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); } @TestMetadata("kt13023.kt") public void testKt13023() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); } @TestMetadata("kt14868.kt") public void testKt14868() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); } @TestMetadata("kt1508.kt") public void testKt1508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); } @TestMetadata("kt1634.kt") public void testKt1634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); } @TestMetadata("kt16732.kt") public void testKt16732() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); } @TestMetadata("kt2251.kt") public void testKt2251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); } @TestMetadata("kt2269.kt") public void testKt2269() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); } @TestMetadata("kt2275.kt") public void testKt2275() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); } @TestMetadata("kt239.kt") public void testKt239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); } @TestMetadata("kt242.kt") public void testKt242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); } @TestMetadata("kt243.kt") public void testKt243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); } @TestMetadata("kt248.kt") public void testKt248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); } @TestMetadata("kt2768.kt") public void testKt2768() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); } @TestMetadata("kt2794.kt") public void testKt2794() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); } @TestMetadata("kt3078.kt") public void testKt3078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); } @TestMetadata("kt3517.kt") public void testKt3517() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); } @TestMetadata("kt3576.kt") public void testKt3576() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); } @TestMetadata("kt3613.kt") public void testKt3613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); } @TestMetadata("kt4097.kt") public void testKt4097() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); } @TestMetadata("kt4098.kt") public void testKt4098() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); } @TestMetadata("kt4210.kt") public void testKt4210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); } @TestMetadata("kt4251.kt") public void testKt4251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); } @TestMetadata("kt446.kt") public void testKt446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); } @TestMetadata("kt518.kt") public void testKt518() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); } @TestMetadata("kt6590_identityEquals.kt") public void testKt6590_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); } @TestMetadata("kt665.kt") public void testKt665() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); } @TestMetadata("kt684.kt") public void testKt684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); } @TestMetadata("kt711.kt") public void testKt711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); } @TestMetadata("kt737.kt") public void testKt737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); } @TestMetadata("kt752.kt") public void testKt752() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); } @TestMetadata("kt753.kt") public void testKt753() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); } @TestMetadata("kt756.kt") public void testKt756() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); } @TestMetadata("kt757.kt") public void testKt757() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); } @TestMetadata("kt828.kt") public void testKt828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); } @TestMetadata("kt877.kt") public void testKt877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); } @TestMetadata("kt882.kt") public void testKt882() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); } @TestMetadata("kt887.kt") public void testKt887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); } @TestMetadata("kt935.kt") public void testKt935() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); } @TestMetadata("nullAsNullableIntIsNull.kt") public void testNullAsNullableIntIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); } @TestMetadata("nullableCharBoolean.kt") public void testNullableCharBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); } @TestMetadata("number.kt") public void testNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/number.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/number.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } @TestMetadata("substituteIntForGeneric.kt") public void testSubstituteIntForGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); } @TestMetadata("unboxComparable.kt") public void testUnboxComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EqualityWithObject extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEqualityWithObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedEqPrimitiveEvaluationOrder.kt") public void testBoxedEqPrimitiveEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); } @TestMetadata("boxedLongEqualsLong.kt") public void testBoxedLongEqualsLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); } @TestMetadata("objectWithAsymmetricEqualsEqPrimitive.kt") public void testObjectWithAsymmetricEqualsEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); } @TestMetadata("whenNullableBoxed.kt") public void testWhenNullableBoxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boxedEqPrimitiveBoolean.kt") public void testBoxedEqPrimitiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); } @TestMetadata("boxedEqPrimitiveByte.kt") public void testBoxedEqPrimitiveByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); } @TestMetadata("boxedEqPrimitiveChar.kt") public void testBoxedEqPrimitiveChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); } @TestMetadata("boxedEqPrimitiveInt.kt") public void testBoxedEqPrimitiveInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); } @TestMetadata("boxedEqPrimitiveLong.kt") public void testBoxedEqPrimitiveLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); } @TestMetadata("boxedEqPrimitiveShort.kt") public void testBoxedEqPrimitiveShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); } @TestMetadata("primitiveEqBoxedBoolean.kt") public void testPrimitiveEqBoxedBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); } @TestMetadata("primitiveEqBoxedByte.kt") public void testPrimitiveEqBoxedByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); } @TestMetadata("primitiveEqBoxedChar.kt") public void testPrimitiveEqBoxedChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); } @TestMetadata("primitiveEqBoxedInt.kt") public void testPrimitiveEqBoxedInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); } @TestMetadata("primitiveEqBoxedLong.kt") public void testPrimitiveEqBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); } @TestMetadata("primitiveEqBoxedShort.kt") public void testPrimitiveEqBoxedShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); } @TestMetadata("primitiveEqObjectBoolean.kt") public void testPrimitiveEqObjectBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); } @TestMetadata("primitiveEqObjectByte.kt") public void testPrimitiveEqObjectByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); } @TestMetadata("primitiveEqObjectChar.kt") public void testPrimitiveEqObjectChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); } @TestMetadata("primitiveEqObjectInt.kt") public void testPrimitiveEqObjectInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); } @TestMetadata("primitiveEqObjectLong.kt") public void testPrimitiveEqObjectLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); } @TestMetadata("primitiveEqObjectShort.kt") public void testPrimitiveEqObjectShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); } } } @@ -14860,20 +13208,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayConvention.kt") public void testArrayConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/arrayConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/arrayConvention.kt"); } @TestMetadata("kt9855.kt") public void testKt9855() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/kt9855.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/kt9855.kt"); } } @@ -14881,86 +13231,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateConstructors extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrivateConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/base.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/base.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/captured.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/companion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/companion.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inline.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inner.kt"); } @TestMetadata("kt4860.kt") public void testKt4860() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); } @TestMetadata("secondary.kt") public void testSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/secondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/secondary.kt"); } @TestMetadata("synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); } @TestMetadata("withDefault.kt") public void testWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); } @TestMetadata("withLinkedClasses.kt") public void testWithLinkedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); } @TestMetadata("withLinkedObjects.kt") public void testWithLinkedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); } } @@ -14970,31 +13311,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class Properties extends AbstractLightAnalysisModeTest { @TestMetadata("augmentedAssignmentsAndIncrements.kt") public void ignoreAugmentedAssignmentsAndIncrements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); } @TestMetadata("accessToPrivateSetter.kt") public void testAccessToPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } public void testAllFilesPresentInProperties() throws Exception { @@ -15003,412 +13334,349 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("classArtificialFieldInsideNested.kt") public void testClassArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); } @TestMetadata("classFieldInsideLambda.kt") public void testClassFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); } @TestMetadata("classFieldInsideLocalInSetter.kt") public void testClassFieldInsideLocalInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); } @TestMetadata("classFieldInsideNested.kt") public void testClassFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); } @TestMetadata("classObjectProperties.kt") public void testClassObjectProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classObjectProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classObjectProperties.kt"); } @TestMetadata("classPrivateArtificialFieldInsideNested.kt") public void testClassPrivateArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); } @TestMetadata("collectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/collectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/collectionSize.kt"); } @TestMetadata("commonPropertiesKJK.kt") public void testCommonPropertiesKJK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); } @TestMetadata("companionFieldInsideLambda.kt") public void testCompanionFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); } @TestMetadata("companionObjectAccessor.kt") public void testCompanionObjectAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); } @TestMetadata("companionObjectPropertiesFromJava.kt") public void testCompanionObjectPropertiesFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); } @TestMetadata("companionPrivateField.kt") public void testCompanionPrivateField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateField.kt"); } @TestMetadata("companionPrivateFieldInsideLambda.kt") public void testCompanionPrivateFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/field.kt"); } @TestMetadata("fieldInClass.kt") public void testFieldInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInClass.kt"); } @TestMetadata("fieldInsideField.kt") public void testFieldInsideField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideField.kt"); } @TestMetadata("fieldInsideLambda.kt") public void testFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); } @TestMetadata("fieldInsideNested.kt") public void testFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); } @TestMetadata("fieldSimple.kt") public void testFieldSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldSimple.kt"); } @TestMetadata("generalAccess.kt") public void testGeneralAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/generalAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/generalAccess.kt"); } @TestMetadata("javaPropertyBoxedGetter.kt") public void testJavaPropertyBoxedGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); } @TestMetadata("javaPropertyBoxedSetter.kt") public void testJavaPropertyBoxedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); } @TestMetadata("kt10715.kt") public void testKt10715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10715.kt"); } @TestMetadata("kt10729.kt") public void testKt10729() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10729.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10729.kt"); } @TestMetadata("kt1159.kt") public void testKt1159() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1159.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1159.kt"); } @TestMetadata("kt1165.kt") public void testKt1165() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1165.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1165.kt"); } @TestMetadata("kt1168.kt") public void testKt1168() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1168.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1168.kt"); } @TestMetadata("kt1170.kt") public void testKt1170() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1170.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1170.kt"); } @TestMetadata("kt12200.kt") public void testKt12200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt12200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt12200.kt"); } @TestMetadata("kt1398.kt") public void testKt1398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1398.kt"); } @TestMetadata("kt1417.kt") public void testKt1417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1417.kt"); } @TestMetadata("kt1482_2279.kt") public void testKt1482_2279() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1482_2279.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1482_2279.kt"); } @TestMetadata("kt1714.kt") public void testKt1714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714.kt"); } @TestMetadata("kt1714_minimal.kt") public void testKt1714_minimal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); } @TestMetadata("kt1892.kt") public void testKt1892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1892.kt"); } @TestMetadata("kt2331.kt") public void testKt2331() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2331.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2331.kt"); } @TestMetadata("kt257.kt") public void testKt257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt257.kt"); } @TestMetadata("kt2655.kt") public void testKt2655() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2655.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2655.kt"); } @TestMetadata("kt2786.kt") public void testKt2786() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2786.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2786.kt"); } @TestMetadata("kt2892.kt") public void testKt2892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2892.kt"); } @TestMetadata("kt3118.kt") public void testKt3118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3118.kt"); } @TestMetadata("kt3524.kt") public void testKt3524() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3524.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3524.kt"); } @TestMetadata("kt3551.kt") public void testKt3551() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3551.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3551.kt"); } @TestMetadata("kt3556.kt") public void testKt3556() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3556.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3556.kt"); } @TestMetadata("kt3930.kt") public void testKt3930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3930.kt"); } @TestMetadata("kt4140.kt") public void testKt4140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4140.kt"); } @TestMetadata("kt4252.kt") public void testKt4252() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252.kt"); } @TestMetadata("kt4252_2.kt") public void testKt4252_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252_2.kt"); } @TestMetadata("kt4340.kt") public void testKt4340() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4340.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4340.kt"); } @TestMetadata("kt4373.kt") public void testKt4373() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4373.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4373.kt"); } @TestMetadata("kt4383.kt") public void testKt4383() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4383.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4383.kt"); } @TestMetadata("kt613.kt") public void testKt613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt613.kt"); } @TestMetadata("kt8928.kt") public void testKt8928() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt8928.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt8928.kt"); } @TestMetadata("kt9603.kt") public void testKt9603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt9603.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt9603.kt"); } @TestMetadata("primitiveOverrideDefaultAccessor.kt") public void testPrimitiveOverrideDefaultAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); } @TestMetadata("primitiveOverrideDelegateAccessor.kt") public void testPrimitiveOverrideDelegateAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); } @TestMetadata("privatePropertyInConstructor.kt") public void testPrivatePropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); } @TestMetadata("privatePropertyWithoutBackingField.kt") public void testPrivatePropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); } @TestMetadata("protectedJavaFieldInInline.kt") public void testProtectedJavaFieldInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); } @TestMetadata("protectedJavaProperty.kt") public void testProtectedJavaProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); } @TestMetadata("protectedJavaPropertyInCompanion.kt") public void testProtectedJavaPropertyInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); } @TestMetadata("substituteJavaSuperField.kt") public void testSubstituteJavaSuperField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); } @TestMetadata("twoAnnotatedExtensionPropertiesWithoutBackingFields.kt") public void testTwoAnnotatedExtensionPropertiesWithoutBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); } @TestMetadata("typeInferredFromGetter.kt") public void testTypeInferredFromGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Const extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constFlags.kt") public void testConstFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constFlags.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/constFlags.kt"); } @TestMetadata("constValInAnnotationDefault.kt") public void testConstValInAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); } } @@ -15416,16 +13684,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessor.kt") public void testAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); } @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); } public void testAllFilesPresentInLateinit() throws Exception { @@ -15434,100 +13704,89 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("exceptionField.kt") public void testExceptionField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); } @TestMetadata("exceptionGetter.kt") public void testExceptionGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/override.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/override.kt"); } @TestMetadata("overrideException.kt") public void testOverrideException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); } @TestMetadata("privateSetterFromLambda.kt") public void testPrivateSetterFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); } @TestMetadata("privateSetterViaSubclass.kt") public void testPrivateSetterViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); } @TestMetadata("simpleVar.kt") public void testSimpleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/visibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/visibility.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInitializedAndDeinitialize extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyLhs.kt") public void testEmptyLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); } @TestMetadata("innerSubclass.kt") public void testInnerSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); } @TestMetadata("sideEffects.kt") public void testSideEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); } @TestMetadata("simpleIsInitialized.kt") public void testSimpleIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/simpleIsInitialized.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); } } @@ -15535,44 +13794,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("capturedLocalLateinit.kt") public void testCapturedLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); } @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); } @TestMetadata("uninitializedCapturedMemberAccess.kt") public void testUninitializedCapturedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); } @TestMetadata("uninitializedCapturedRead.kt") public void testUninitializedCapturedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); } } @@ -15580,16 +13837,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevel extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); } @TestMetadata("accessorForTopLevelLateinit.kt") public void testAccessorForTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); } public void testAllFilesPresentInTopLevel() throws Exception { @@ -15598,20 +13857,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("topLevelLateinit.kt") public void testTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); } } } @@ -15621,26 +13877,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublishedApi extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPublishedApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("noMangling.kt") public void testNoMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/noMangling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/noMangling.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/simple.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/topLevel.kt"); } } @@ -15648,342 +13905,301 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ranges extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRanges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forByteProgressionWithIntIncrement.kt") public void testForByteProgressionWithIntIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); } @TestMetadata("forInRangeLiteralWithMixedTypeBounds.kt") public void testForInRangeLiteralWithMixedTypeBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); } @TestMetadata("forInRangeWithImplicitReceiver.kt") public void testForInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); } @TestMetadata("forInStringVarUpdatedInLoopBody.kt") public void testForInStringVarUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); } @TestMetadata("forIntRange.kt") public void testForIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forIntRange.kt"); } @TestMetadata("forNullableIntInRangeWithImplicitReceiver.kt") public void testForNullableIntInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); } @TestMetadata("multiAssignmentIterationOverIntRange.kt") public void testMultiAssignmentIterationOverIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); } @TestMetadata("safeCallRangeTo.kt") public void testSafeCallRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contains extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInContains() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparisonWithRangeBoundEliminated.kt") public void testComparisonWithRangeBoundEliminated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); } @TestMetadata("evaluationOrderForCollection.kt") public void testEvaluationOrderForCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); } @TestMetadata("evaluationOrderForComparableRange.kt") public void testEvaluationOrderForComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); } @TestMetadata("evaluationOrderForDownTo.kt") public void testEvaluationOrderForDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); } @TestMetadata("evaluationOrderForRangeLiteral.kt") public void testEvaluationOrderForRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); } @TestMetadata("genericCharInRangeLiteral.kt") public void testGenericCharInRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); } @TestMetadata("inArray.kt") public void testInArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inArray.kt"); } @TestMetadata("inCharSequence.kt") public void testInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); } @TestMetadata("inComparableRange.kt") public void testInComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); } @TestMetadata("inCustomObjectRange.kt") public void testInCustomObjectRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); } @TestMetadata("inDoubleRangeLiteralVsComparableRangeLiteral.kt") public void testInDoubleRangeLiteralVsComparableRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); } @TestMetadata("inExtensionRange.kt") public void testInExtensionRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); } @TestMetadata("inFloatingPointRangeWithNaNBound.kt") public void testInFloatingPointRangeWithNaNBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); } @TestMetadata("inIntRange.kt") public void testInIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); } @TestMetadata("inIterable.kt") public void testInIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); } @TestMetadata("inNonMatchingRange.kt") public void testInNonMatchingRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); } @TestMetadata("inOptimizableDoubleRange.kt") public void testInOptimizableDoubleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); } @TestMetadata("inOptimizableFloatRange.kt") public void testInOptimizableFloatRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); } @TestMetadata("inOptimizableIntRange.kt") public void testInOptimizableIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); } @TestMetadata("inOptimizableLongRange.kt") public void testInOptimizableLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); } @TestMetadata("inPrimitiveProgression.kt") public void testInPrimitiveProgression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); } @TestMetadata("inPrimitiveRange.kt") public void testInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); } @TestMetadata("inRangeLiteralComposition.kt") public void testInRangeLiteralComposition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); } @TestMetadata("inRangeWithCustomContains.kt") public void testInRangeWithCustomContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); } @TestMetadata("inRangeWithImplicitReceiver.kt") public void testInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); } @TestMetadata("inRangeWithNonmatchingArguments.kt") public void testInRangeWithNonmatchingArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); } @TestMetadata("inRangeWithSmartCast.kt") public void testInRangeWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); } @TestMetadata("inUntil.kt") public void testInUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); } @TestMetadata("kt20106.kt") public void testKt20106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); } @TestMetadata("nullableInPrimitiveRange.kt") public void testNullableInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); } @TestMetadata("rangeContainsString.kt") public void testRangeContainsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("arrayIndices.kt") public void testArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); } @TestMetadata("charDownTo.kt") public void testCharDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); } @TestMetadata("charRangeLiteral.kt") public void testCharRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); } @TestMetadata("charSequenceIndices.kt") public void testCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); } @TestMetadata("charUntil.kt") public void testCharUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); } @TestMetadata("collectionIndices.kt") public void testCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); } @TestMetadata("doubleRangeLiteral.kt") public void testDoubleRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); } @TestMetadata("floatRangeLiteral.kt") public void testFloatRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); } @TestMetadata("intDownTo.kt") public void testIntDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); } @TestMetadata("intRangeLiteral.kt") public void testIntRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); } @TestMetadata("intUntil.kt") public void testIntUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); } @TestMetadata("longDownTo.kt") public void testLongDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); } @TestMetadata("longRangeLiteral.kt") public void testLongRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); } @TestMetadata("longUntil.kt") public void testLongUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); } } } @@ -15992,176 +14208,152 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); } } @@ -16169,38 +14361,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInDownTo extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInDownTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forIntInDownTo.kt") public void testForIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); } @TestMetadata("forIntInDownToWithNonConstBounds.kt") public void testForIntInDownToWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); } @TestMetadata("forIntInNonOptimizedDownTo.kt") public void testForIntInNonOptimizedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); } @TestMetadata("forLongInDownTo.kt") public void testForLongInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); } @TestMetadata("forNullableIntInDownTo.kt") public void testForNullableIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); } } @@ -16208,104 +14399,92 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIndices extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInCharSequenceIndices.kt") public void testForInCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); } @TestMetadata("forInCollectionImplicitReceiverIndices.kt") public void testForInCollectionImplicitReceiverIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); } @TestMetadata("forInCollectionIndices.kt") public void testForInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); } @TestMetadata("forInNonOptimizedIndices.kt") public void testForInNonOptimizedIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); } @TestMetadata("forInObjectArrayIndices.kt") public void testForInObjectArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); } @TestMetadata("forInPrimitiveArrayIndices.kt") public void testForInPrimitiveArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); } @TestMetadata("forNullableIntInArrayIndices.kt") public void testForNullableIntInArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); } @TestMetadata("forNullableIntInCollectionIndices.kt") public void testForNullableIntInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); } @TestMetadata("indexOfLast.kt") public void testIndexOfLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); } @TestMetadata("kt12983_forInGenericArrayIndices.kt") public void testKt12983_forInGenericArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); } @TestMetadata("kt12983_forInGenericCollectionIndices.kt") public void testKt12983_forInGenericCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); } @TestMetadata("kt12983_forInSpecificArrayIndices.kt") public void testKt12983_forInSpecificArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); } @TestMetadata("kt12983_forInSpecificCollectionIndices.kt") public void testKt12983_forInSpecificCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); } @TestMetadata("kt13241_Array.kt") public void testKt13241_Array() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); } @TestMetadata("kt13241_CharSequence.kt") public void testKt13241_CharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); } @TestMetadata("kt13241_Collection.kt") public void testKt13241_Collection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); } } @@ -16313,118 +14492,109 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInReversed extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInReversed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInReversedArrayIndices.kt") public void testForInReversedArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); } @TestMetadata("forInReversedCharSequenceIndices.kt") public void testForInReversedCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); } @TestMetadata("forInReversedCollectionIndices.kt") public void testForInReversedCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); } @TestMetadata("forInReversedDownTo.kt") public void testForInReversedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); } @TestMetadata("forInReversedEmptyRange.kt") public void testForInReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); } @TestMetadata("forInReversedEmptyRangeLiteral.kt") public void testForInReversedEmptyRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); } @TestMetadata("forInReversedEmptyRangeLiteralWithNonConstBounds.kt") public void testForInReversedEmptyRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("forInReversedRange.kt") public void testForInReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); } @TestMetadata("forInReversedRangeLiteral.kt") public void testForInReversedRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); } @TestMetadata("forInReversedRangeLiteralWithNonConstBounds.kt") public void testForInReversedRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("ForInReversedReversedRange.kt") public void testForInReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); } @TestMetadata("forInReversedReversedReversedRange.kt") public void testForInReversedReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); } @TestMetadata("forInReversedUntil.kt") public void testForInReversedUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); } @TestMetadata("forInReversedUntilWithNonConstBounds.kt") public void testForInReversedUntilWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluationOrder extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEvaluationOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInReversedDownToEvaluationOrder.kt") public void testForInReversedDownToEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); } @TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt") public void testForInReversedRangeLiteralEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); } @TestMetadata("forInReversedUntilEvaluationOrder.kt") public void testForInReversedUntilEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); } } } @@ -16433,62 +14603,57 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInUntil extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForInUntil() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInUntilChar.kt") public void testForInUntilChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); } @TestMetadata("forInUntilChar0.kt") public void testForInUntilChar0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); } @TestMetadata("forInUntilInt.kt") public void testForInUntilInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); } @TestMetadata("forInUntilLesserInt.kt") public void testForInUntilLesserInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); } @TestMetadata("forInUntilLong.kt") public void testForInUntilLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); } @TestMetadata("forInUntilMaxint.kt") public void testForInUntilMaxint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); } @TestMetadata("forInUntilMinint.kt") public void testForInUntilMinint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); } @TestMetadata("forInUntilMinlong.kt") public void testForInUntilMinlong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); } @TestMetadata("forIntInIntUntilSmartcastInt.kt") public void testForIntInIntUntilSmartcastInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); } } @@ -16496,86 +14661,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForWithPossibleOverflow extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("forInDownToCharMinValue.kt") public void testForInDownToCharMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); } @TestMetadata("forInDownToCharMinValueReversed.kt") public void testForInDownToCharMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); } @TestMetadata("forInDownToIntMinValue.kt") public void testForInDownToIntMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); } @TestMetadata("forInDownToIntMinValueReversed.kt") public void testForInDownToIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); } @TestMetadata("forInDownToLongMinValue.kt") public void testForInDownToLongMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); } @TestMetadata("forInDownToLongMinValueReversed.kt") public void testForInDownToLongMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); } @TestMetadata("forInRangeToCharMaxValue.kt") public void testForInRangeToCharMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); } @TestMetadata("forInRangeToCharMaxValueReversed.kt") public void testForInRangeToCharMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); } @TestMetadata("forInRangeToIntMaxValue.kt") public void testForInRangeToIntMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); } @TestMetadata("forInRangeToIntMaxValueReversed.kt") public void testForInRangeToIntMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); } @TestMetadata("forInRangeToLongMaxValue.kt") public void testForInRangeToLongMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); } @TestMetadata("forInRangeToLongMaxValueReversed.kt") public void testForInRangeToLongMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); } @TestMetadata("forInUntilIntMinValueReversed.kt") public void testForInUntilIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); } } @@ -16583,176 +14739,152 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Literal extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); } } @@ -16760,26 +14892,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableLoopParameter extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNullableLoopParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("progressionExpression.kt") public void testProgressionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); } @TestMetadata("rangeExpression.kt") public void testRangeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); } @TestMetadata("rangeLiteral.kt") public void testRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } } @@ -16788,6 +14921,10 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @@ -16796,86 +14933,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationRetentionAnnotation.kt") public void testAnnotationRetentionAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); } @TestMetadata("annotationsOnJavaMembers.kt") public void testAnnotationsOnJavaMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); } @TestMetadata("findAnnotation.kt") public void testFindAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); } @TestMetadata("privateAnnotation.kt") public void testPrivateAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); } @TestMetadata("propertyWithoutBackingField.kt") public void testPropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); } @TestMetadata("retentions.kt") public void testRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); } @TestMetadata("simpleClassAnnotation.kt") public void testSimpleClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); } @TestMetadata("simpleConstructorAnnotation.kt") public void testSimpleConstructorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); } @TestMetadata("simpleFunAnnotation.kt") public void testSimpleFunAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); } @TestMetadata("simpleParamAnnotation.kt") public void testSimpleParamAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); } @TestMetadata("simpleValAnnotation.kt") public void testSimpleValAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } } @@ -16883,232 +15011,204 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callInstanceJavaMethod.kt") public void testCallInstanceJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); } @TestMetadata("callPrivateJavaMethod.kt") public void testCallPrivateJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); } @TestMetadata("callStaticJavaMethod.kt") public void testCallStaticJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); } @TestMetadata("cannotCallEnumConstructor.kt") public void testCannotCallEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); } @TestMetadata("disallowNullValueForNotNullField.kt") public void testDisallowNullValueForNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); } @TestMetadata("exceptionHappened.kt") public void testExceptionHappened() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); } @TestMetadata("fakeOverrideSubstituted.kt") public void testFakeOverrideSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); } @TestMetadata("incorrectNumberOfArguments.kt") public void testIncorrectNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); } @TestMetadata("jvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); } @TestMetadata("jvmStaticInObjectIncorrectReceiver.kt") public void testJvmStaticInObjectIncorrectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); } @TestMetadata("memberOfGenericClass.kt") public void testMemberOfGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); } @TestMetadata("privateProperty.kt") public void testPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); } @TestMetadata("propertyGetterAndGetFunctionDifferentReturnType.kt") public void testPropertyGetterAndGetFunctionDifferentReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); } @TestMetadata("returnUnit.kt") public void testReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunction.kt") public void testSimpleMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); } @TestMetadata("simpleTopLevelFunctions.kt") public void testSimpleTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObjectPropertyAccessors.kt") public void testCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); } @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); } @TestMetadata("javaInstanceField.kt") public void testJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); } @TestMetadata("javaInstanceMethod.kt") public void testJavaInstanceMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); } @TestMetadata("jvmStaticCompanionObjectPropertyAccessors.kt") public void testJvmStaticCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); } @TestMetadata("jvmStaticObjectFunction.kt") public void testJvmStaticObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); } @TestMetadata("jvmStaticObjectPropertyAccessors.kt") public void testJvmStaticObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); } @TestMetadata("objectPropertyAccessors.kt") public void testObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); } } } @@ -17117,128 +15217,112 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallBy extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCallBy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundExtensionFunction.kt") public void testBoundExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); } @TestMetadata("boundExtensionPropertyAcessor.kt") public void testBoundExtensionPropertyAcessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); } @TestMetadata("boundJvmStaticInObject.kt") public void testBoundJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); } @TestMetadata("defaultAndNonDefaultIntertwined.kt") public void testDefaultAndNonDefaultIntertwined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); } @TestMetadata("jvmStaticInCompanionObject.kt") public void testJvmStaticInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); } @TestMetadata("manyArgumentsNoneDefaultConstructor.kt") public void testManyArgumentsNoneDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); } @TestMetadata("manyArgumentsNoneDefaultFunction.kt") public void testManyArgumentsNoneDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); } @TestMetadata("manyArgumentsOnlyOneDefault.kt") public void testManyArgumentsOnlyOneDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); } @TestMetadata("manyMaskArguments.kt") public void testManyMaskArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); } @TestMetadata("nonDefaultParameterOmitted.kt") public void testNonDefaultParameterOmitted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); } @TestMetadata("nullValue.kt") public void testNullValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); } @TestMetadata("ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt") public void testOrdinaryMethodIsInvokedWhenNoDefaultValuesAreUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); } @TestMetadata("primitiveDefaultValues.kt") public void testPrimitiveDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunciton.kt") public void testSimpleMemberFunciton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); } @TestMetadata("simpleTopLevelFunction.kt") public void testSimpleTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); } } @@ -17246,50 +15330,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiterals extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClassLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationClassLiteral.kt") public void testAnnotationClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); } @TestMetadata("builtinClassLiterals.kt") public void testBuiltinClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); } @TestMetadata("genericArrays.kt") public void testGenericArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } @TestMetadata("reifiedTypeClassLiteral.kt") public void testReifiedTypeClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); } @TestMetadata("simpleClassLiteral.kt") public void testSimpleClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); } } @@ -17297,86 +15378,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classSimpleName.kt") public void testClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); } @TestMetadata("createInstance.kt") public void testCreateInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); } @TestMetadata("declaredMembers.kt") public void testDeclaredMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); } @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); } @TestMetadata("localClassSimpleName.kt") public void testLocalClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); } @TestMetadata("nestedClassesJava.kt") public void testNestedClassesJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); } @TestMetadata("objectInstance.kt") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); } @TestMetadata("qualifiedName.kt") public void testQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); } @TestMetadata("starProjectedType.kt") public void testStarProjectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); } } @@ -17384,38 +15456,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); } @TestMetadata("classesWithoutConstructors.kt") public void testClassesWithoutConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); } @TestMetadata("constructorName.kt") public void testConstructorName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); } @TestMetadata("simpleGetConstructors.kt") public void testSimpleGetConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); } } @@ -17423,80 +15494,72 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateAnnotation extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCreateAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationType.kt") public void testAnnotationType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); } @TestMetadata("arrayOfKClasses.kt") public void testArrayOfKClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); } @TestMetadata("callByJava.kt") public void testCallByJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); } @TestMetadata("callByKotlin.kt") public void testCallByKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); } @TestMetadata("callJava.kt") public void testCallJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); } @TestMetadata("callKotlin.kt") public void testCallKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); } @TestMetadata("createJdkAnnotationInstance.kt") public void testCreateJdkAnnotationInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); } @TestMetadata("enumKClassAnnotation.kt") public void testEnumKClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); } @TestMetadata("floatingPointParameters.kt") public void testFloatingPointParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); } @TestMetadata("parameterNamedEquals.kt") public void testParameterNamedEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); } @TestMetadata("primitivesAndArrays.kt") public void testPrimitivesAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); } } @@ -17504,152 +15567,132 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enclosing extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnclosing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObjectInInlinedLambda.kt") public void testAnonymousObjectInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); } @TestMetadata("classInLambda.kt") public void testClassInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); } @TestMetadata("functionExpressionInProperty.kt") public void testFunctionExpressionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); } @TestMetadata("kt11969.kt") public void testKt11969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); } @TestMetadata("kt6368.kt") public void testKt6368() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); } @TestMetadata("kt6691_lambdaInSamConstructor.kt") public void testKt6691_lambdaInSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); } @TestMetadata("lambdaInClassObject.kt") public void testLambdaInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); } @TestMetadata("lambdaInConstructor.kt") public void testLambdaInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); } @TestMetadata("lambdaInFunction.kt") public void testLambdaInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); } @TestMetadata("lambdaInLocalClassConstructor.kt") public void testLambdaInLocalClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); } @TestMetadata("lambdaInLocalClassSuperCall.kt") public void testLambdaInLocalClassSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); } @TestMetadata("lambdaInLocalFunction.kt") public void testLambdaInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); } @TestMetadata("lambdaInMemberFunction.kt") public void testLambdaInMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); } @TestMetadata("lambdaInMemberFunctionInLocalClass.kt") public void testLambdaInMemberFunctionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); } @TestMetadata("lambdaInMemberFunctionInNestedClass.kt") public void testLambdaInMemberFunctionInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); } @TestMetadata("lambdaInObjectDeclaration.kt") public void testLambdaInObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); } @TestMetadata("lambdaInObjectExpression.kt") public void testLambdaInObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); } @TestMetadata("lambdaInObjectLiteralSuperCall.kt") public void testLambdaInObjectLiteralSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); } @TestMetadata("lambdaInPackage.kt") public void testLambdaInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); } @TestMetadata("lambdaInPropertyGetter.kt") public void testLambdaInPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); } @TestMetadata("lambdaInPropertySetter.kt") public void testLambdaInPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); } @TestMetadata("localClassInTopLevelFunction.kt") public void testLocalClassInTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); } @TestMetadata("objectInLambda.kt") public void testObjectInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); } } @@ -17657,74 +15700,67 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("declaredVsInheritedFunctions.kt") public void testDeclaredVsInheritedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); } @TestMetadata("functionFromStdlib.kt") public void testFunctionFromStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); } @TestMetadata("functionReferenceErasedToKFunction.kt") public void testFunctionReferenceErasedToKFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); } @TestMetadata("genericOverriddenFunction.kt") public void testGenericOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); } @TestMetadata("instanceOfFunction.kt") public void testInstanceOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); } @TestMetadata("javaClassGetFunctions.kt") public void testJavaClassGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); } @TestMetadata("javaMethodsSmokeTest.kt") public void testJavaMethodsSmokeTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaMethodsSmokeTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/javaMethodsSmokeTest.kt"); } @TestMetadata("platformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/platformName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/platformName.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); } @TestMetadata("simpleGetFunctions.kt") public void testSimpleGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); } @TestMetadata("simpleNames.kt") public void testSimpleNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); } } @@ -17732,92 +15768,82 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericSignature extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGenericSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); } @TestMetadata("defaultImplsGenericSignature.kt") public void testDefaultImplsGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); } @TestMetadata("functionLiteralGenericSignature.kt") public void testFunctionLiteralGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); } @TestMetadata("genericBackingFieldSignature.kt") public void testGenericBackingFieldSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); } @TestMetadata("genericMethodSignature.kt") public void testGenericMethodSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); } @TestMetadata("kt11121.kt") public void testKt11121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); } @TestMetadata("kt5112.kt") public void testKt5112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); } @TestMetadata("kt6106.kt") public void testKt6106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); } @TestMetadata("signatureOfDeepGenericInner.kt") public void testSignatureOfDeepGenericInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); } @TestMetadata("signatureOfDeepInner.kt") public void testSignatureOfDeepInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); } @TestMetadata("signatureOfDeepInnerLastGeneric.kt") public void testSignatureOfDeepInnerLastGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); } @TestMetadata("signatureOfGenericInnerGenericOuter.kt") public void testSignatureOfGenericInnerGenericOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); } @TestMetadata("signatureOfGenericInnerSimpleOuter.kt") public void testSignatureOfGenericInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); } @TestMetadata("signatureOfSimpleInnerSimpleOuter.kt") public void testSignatureOfSimpleInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); } } @@ -17825,14 +15851,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInstance extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInIsInstance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("isInstanceCastAndSafeCast.kt") public void testIsInstanceCastAndSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); } } @@ -17840,62 +15869,57 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClassInAnnotation extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInKClassInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); } @TestMetadata("arrayInJava.kt") public void testArrayInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); } @TestMetadata("basicInJava.kt") public void testBasicInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); } @TestMetadata("forceWrapping.kt") public void testForceWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); } @TestMetadata("wrappingForCallableReferences.kt") public void testWrappingForCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); } } @@ -17903,14 +15927,17 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClasses extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLambdaClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("parameterNamesAndNullability.kt") public void testParameterNamesAndNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); } } @@ -17918,100 +15945,94 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mapping extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/functions.kt"); } @TestMetadata("inlineReifiedFun.kt") public void testInlineReifiedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); } @TestMetadata("mappedClassIsEqualToClassLiteral.kt") public void testMappedClassIsEqualToClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); } @TestMetadata("propertyAccessorsWithJvmName.kt") public void testPropertyAccessorsWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); } @TestMetadata("syntheticFields.kt") public void testSyntheticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); } @TestMetadata("topLevelFunctionOtherFile.kt") public void testTopLevelFunctionOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverrides extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInFakeOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaFieldGetterSetter.kt") public void testJavaFieldGetterSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); } } @@ -18019,20 +16040,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("companionObjectFunction.kt") public void testCompanionObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); } } @@ -18040,104 +16063,92 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("annotationConstructorParameters.kt") public void testAnnotationConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); } @TestMetadata("genericArrayElementType.kt") public void testGenericArrayElementType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); } @TestMetadata("innerGenericTypeArgument.kt") public void testInnerGenericTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); } @TestMetadata("memberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); } @TestMetadata("overrideAnyWithPrimitive.kt") public void testOverrideAnyWithPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); } @TestMetadata("parameterizedTypeArgument.kt") public void testParameterizedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); } @TestMetadata("parameterizedTypes.kt") public void testParameterizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); } @TestMetadata("rawTypeArgument.kt") public void testRawTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/rawTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/rawTypeArgument.kt"); } @TestMetadata("supertypes.kt") public void testSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); } @TestMetadata("topLevelFunctions.kt") public void testTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); } } } @@ -18146,110 +16157,97 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReferencesEqualToCallablesFromAPI.kt") public void testCallableReferencesEqualToCallablesFromAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); } @TestMetadata("classToString.kt") public void testClassToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); } @TestMetadata("extensionPropertyReceiverToString.kt") public void testExtensionPropertyReceiverToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); } @TestMetadata("functionEqualsHashCode.kt") public void testFunctionEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); } @TestMetadata("functionFromStdlibMultiFileFacade.kt") public void testFunctionFromStdlibMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); } @TestMetadata("functionFromStdlibSingleFileFacade.kt") public void testFunctionFromStdlibSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); } @TestMetadata("functionToString.kt") public void testFunctionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); } @TestMetadata("memberExtensionToString.kt") public void testMemberExtensionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); } @TestMetadata("parametersEqualsHashCode.kt") public void testParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); } @TestMetadata("parametersToString.kt") public void testParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); } @TestMetadata("propertyEqualsHashCode.kt") public void testPropertyEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); } @TestMetadata("propertyToString.kt") public void testPropertyToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); } @TestMetadata("typeEqualsHashCode.kt") public void testTypeEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); } @TestMetadata("typeParametersEqualsHashCode.kt") public void testTypeParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); } @TestMetadata("typeParametersToString.kt") public void testTypeParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); } @TestMetadata("typeToString.kt") public void testTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); } @TestMetadata("typeToStringInnerGeneric.kt") public void testTypeToStringInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); } } @@ -18257,62 +16255,57 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableModality.kt") public void testCallableModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); } @TestMetadata("callableVisibility.kt") public void testCallableVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); } @TestMetadata("classModality.kt") public void testClassModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); } @TestMetadata("classVisibility.kt") public void testClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); } @TestMetadata("javaVisibility.kt") public void testJavaVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); } } @@ -18320,26 +16313,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callFunctionsInMultifileClass.kt") public void testCallFunctionsInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); } @TestMetadata("callPropertiesInMultifileClass.kt") public void testCallPropertiesInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); } @TestMetadata("javaFieldForVarAndConstVal.kt") public void testJavaFieldForVarAndConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); } } @@ -18347,76 +16341,74 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoReflectAtRuntime extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); } @TestMetadata("primitiveJavaClass.kt") public void testPrimitiveJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); } @TestMetadata("propertyGetSetName.kt") public void testPropertyGetSetName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); } @TestMetadata("propertyInstanceof.kt") public void testPropertyInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); } @TestMetadata("reifiedTypeJavaClass.kt") public void testReifiedTypeJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); } @TestMetadata("simpleClassLiterals.kt") public void testSimpleClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); } } } @@ -18425,74 +16417,67 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("boundInnerClassConstructor.kt") public void testBoundInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); } @TestMetadata("boundObjectMemberReferences.kt") public void testBoundObjectMemberReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); } @TestMetadata("boundReferences.kt") public void testBoundReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); } @TestMetadata("findParameterByName.kt") public void testFindParameterByName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); } @TestMetadata("functionParameterNameAndIndex.kt") public void testFunctionParameterNameAndIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); } @TestMetadata("instanceExtensionReceiverAndValueParameters.kt") public void testInstanceExtensionReceiverAndValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); } @TestMetadata("isMarkedNullable.kt") public void testIsMarkedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); } @TestMetadata("isOptional.kt") public void testIsOptional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); } @TestMetadata("javaAnnotationConstructor.kt") public void testJavaAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); } @TestMetadata("kinds.kt") public void testKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } } @@ -18500,192 +16485,170 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("allVsDeclared.kt") public void testAllVsDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); } @TestMetadata("callPrivatePropertyFromGetProperties.kt") public void testCallPrivatePropertyFromGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); } @TestMetadata("declaredVsInheritedProperties.kt") public void testDeclaredVsInheritedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); } @TestMetadata("genericClassLiteralPropertyReceiverIsStar.kt") public void testGenericClassLiteralPropertyReceiverIsStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); } @TestMetadata("genericOverriddenProperty.kt") public void testGenericOverriddenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); } @TestMetadata("getExtensionPropertiesMutableVsReadonly.kt") public void testGetExtensionPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); } @TestMetadata("getPropertiesMutableVsReadonly.kt") public void testGetPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); } @TestMetadata("invokeKProperty.kt") public void testInvokeKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); } @TestMetadata("javaPropertyInheritedInKotlin.kt") public void testJavaPropertyInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); } @TestMetadata("javaStaticField.kt") public void testJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); } @TestMetadata("kotlinPropertyInheritedInJava.kt") public void testKotlinPropertyInheritedInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); } @TestMetadata("memberAndMemberExtensionWithSameName.kt") public void testMemberAndMemberExtensionWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); } @TestMetadata("mutatePrivateJavaInstanceField.kt") public void testMutatePrivateJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); } @TestMetadata("mutatePrivateJavaStaticField.kt") public void testMutatePrivateJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); } @TestMetadata("noConflictOnKotlinGetterAndJavaField.kt") public void testNoConflictOnKotlinGetterAndJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); } @TestMetadata("overrideKotlinPropertyByJavaMethod.kt") public void testOverrideKotlinPropertyByJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); } @TestMetadata("privateClassVal.kt") public void testPrivateClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); } @TestMetadata("privateClassVar.kt") public void testPrivateClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); } @TestMetadata("privateFakeOverrideFromSuperclass.kt") public void testPrivateFakeOverrideFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); } @TestMetadata("privateJvmStaticVarInObject.kt") public void testPrivateJvmStaticVarInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); } @TestMetadata("privatePropertyCallIsAccessibleOnAccessors.kt") public void testPrivatePropertyCallIsAccessibleOnAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); } @TestMetadata("privateToThisAccessors.kt") public void testPrivateToThisAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); } @TestMetadata("propertyOfNestedClassAndArrayType.kt") public void testPropertyOfNestedClassAndArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); } @TestMetadata("publicClassValAccessible.kt") public void testPublicClassValAccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); } @TestMetadata("referenceToJavaFieldOfKotlinSubclass.kt") public void testReferenceToJavaFieldOfKotlinSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); } @TestMetadata("simpleGetProperties.kt") public void testSimpleGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); } public void testAllFilesPresentInAccessors() throws Exception { @@ -18694,26 +16657,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); } @TestMetadata("memberExtensions.kt") public void testMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); } @TestMetadata("topLevelPropertyAccessors.kt") public void testTopLevelPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); } } @@ -18721,98 +16680,87 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GetDelegate extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInGetDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("booleanPropertyNameStartsWithIs.kt") public void testBooleanPropertyNameStartsWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); } @TestMetadata("boundExtensionProperty.kt") public void testBoundExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); } @TestMetadata("boundMemberProperty.kt") public void testBoundMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); } @TestMetadata("getExtensionDelegate.kt") public void testGetExtensionDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); } @TestMetadata("kPropertyForDelegatedProperty.kt") public void testKPropertyForDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); } @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); } @TestMetadata("nameClashClassAndCompanion.kt") public void testNameClashClassAndCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); } @TestMetadata("nameClashExtensionProperties.kt") public void testNameClashExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); } @TestMetadata("noSetAccessibleTrue.kt") public void testNoSetAccessibleTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); } @TestMetadata("notDelegatedProperty.kt") public void testNotDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); } @TestMetadata("overrideDelegatedByDelegated.kt") public void testOverrideDelegatedByDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); } } @@ -18820,38 +16768,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalDelegated extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInLocalDelegated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/defaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/defaultImpls.kt"); } @TestMetadata("inlineFun.kt") public void testInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/inlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/inlineFun.kt"); } @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/localDelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/localDelegatedProperty.kt"); } @TestMetadata("multiFileClass.kt") public void testMultiFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/multiFileClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/multiFileClass.kt"); } @TestMetadata("variableOfGenericType.kt") public void testVariableOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/localDelegated/variableOfGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/properties/localDelegated/variableOfGenericType.kt"); } } } @@ -18862,8 +16809,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public static class SpecialBuiltIns extends AbstractLightAnalysisModeTest { @TestMetadata("getMembersOfStandardJavaClasses.kt") public void ignoreGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } public void testAllFilesPresentInSpecialBuiltIns() throws Exception { @@ -18875,38 +16825,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Supertypes extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSupertypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("builtInClassSupertypes.kt") public void testBuiltInClassSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); } @TestMetadata("genericSubstitution.kt") public void testGenericSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); } @TestMetadata("isSubclassOfIsSuperclassOf.kt") public void testIsSubclassOfIsSuperclassOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); } @TestMetadata("simpleSupertypes.kt") public void testSimpleSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); } } @@ -18914,26 +16863,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("declarationSiteVariance.kt") public void testDeclarationSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); } @TestMetadata("typeParametersAndNames.kt") public void testTypeParametersAndNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); } @TestMetadata("upperBounds.kt") public void testUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); } } @@ -18941,118 +16891,109 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classifierIsClass.kt") public void testClassifierIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); } @TestMetadata("classifierIsTypeParameter.kt") public void testClassifierIsTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); } @TestMetadata("classifiersOfBuiltInTypes.kt") public void testClassifiersOfBuiltInTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); } @TestMetadata("innerGenericArguments.kt") public void testInnerGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); } @TestMetadata("jvmErasureOfClass.kt") public void testJvmErasureOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); } @TestMetadata("jvmErasureOfTypeParameter.kt") public void testJvmErasureOfTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); } @TestMetadata("platformTypeClassifier.kt") public void testPlatformTypeClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeClassifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeClassifier.kt"); } @TestMetadata("platformTypeNotEqualToKotlinType.kt") public void testPlatformTypeNotEqualToKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); } @TestMetadata("platformTypeToString.kt") public void testPlatformTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeToString.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); } @TestMetadata("useSiteVariance.kt") public void testUseSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/withNullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/withNullability.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateType extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInCreateType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("equality.kt") public void testEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); } @TestMetadata("simpleCreateType.kt") public void testSimpleCreateType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); } @TestMetadata("wrongNumberOfArguments.kt") public void testWrongNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); } } @@ -19060,32 +17001,32 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Subtyping extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSubtyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("platformType.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); } @TestMetadata("simpleGenericTypes.kt") public void testSimpleGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); } @TestMetadata("simpleSubtypeSupertype.kt") public void testSimpleSubtypeSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); } @TestMetadata("typeProjection.kt") public void testTypeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); } } } @@ -19095,530 +17036,447 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("approximateIntersectionType.kt") public void testApproximateIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); } @TestMetadata("arrayLengthNPE.kt") public void testArrayLengthNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/collections.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/collections.kt"); } @TestMetadata("commonSupertypeContravariant.kt") public void testCommonSupertypeContravariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); } @TestMetadata("commonSupertypeContravariant2.kt") public void testCommonSupertypeContravariant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); } @TestMetadata("dontCaptureTypesWithTypeVariables.kt") public void testDontCaptureTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); } @TestMetadata("doubleMerge.kt") public void testDoubleMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/doubleMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/doubleMerge.kt"); } @TestMetadata("floatMerge.kt") public void testFloatMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/floatMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/floatMerge.kt"); } @TestMetadata("functionLiteralAsLastExpressionInBlock.kt") public void testFunctionLiteralAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/generic.kt"); } @TestMetadata("getGenericInterfaces.kt") public void testGetGenericInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); } @TestMetadata("hashCodeNPE.kt") public void testHashCodeNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); } @TestMetadata("internalTopLevelOtherPackage.kt") public void testInternalTopLevelOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); } @TestMetadata("intersectionAsLastLambda.kt") public void testIntersectionAsLastLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); } @TestMetadata("intersectionOfEqualTypes.kt") public void testIntersectionOfEqualTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); } @TestMetadata("kt10143.kt") public void testKt10143() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10143.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10143.kt"); } @TestMetadata("kt10934.kt") public void testKt10934() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10934.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10934.kt"); } @TestMetadata("Kt1149.kt") public void testKt1149() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1149.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1149.kt"); } @TestMetadata("kt1172.kt") public void testKt1172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1172.kt"); } @TestMetadata("kt1202.kt") public void testKt1202() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1202.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1202.kt"); } @TestMetadata("kt13381.kt") public void testKt13381() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt13381.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt13381.kt"); } @TestMetadata("kt1406.kt") public void testKt1406() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1406.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1406.kt"); } @TestMetadata("kt14447.kt") public void testKt14447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt14447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt14447.kt"); } @TestMetadata("kt1515.kt") public void testKt1515() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1515.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1515.kt"); } @TestMetadata("kt15196.kt") public void testKt15196() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt15196.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt15196.kt"); } @TestMetadata("kt1528.kt") public void testKt1528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1528.kt"); } @TestMetadata("kt1568.kt") public void testKt1568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1568.kt"); } @TestMetadata("Kt1619Test.kt") public void testKt1619Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); } @TestMetadata("kt1779.kt") public void testKt1779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1779.kt"); } @TestMetadata("kt1800.kt") public void testKt1800() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1800.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1800.kt"); } @TestMetadata("kt1845.kt") public void testKt1845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1845.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1845.kt"); } @TestMetadata("kt18779.kt") public void testKt18779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt18779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt18779.kt"); } @TestMetadata("kt1932.kt") public void testKt1932() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1932.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1932.kt"); } @TestMetadata("kt2017.kt") public void testKt2017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2017.kt"); } @TestMetadata("kt2060.kt") public void testKt2060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2060.kt"); } @TestMetadata("kt2210.kt") public void testKt2210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2210.kt"); } @TestMetadata("kt2246.kt") public void testKt2246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2246.kt"); } @TestMetadata("kt2318.kt") public void testKt2318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2318.kt"); } @TestMetadata("Kt2495Test.kt") public void testKt2495Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); } @TestMetadata("kt2509.kt") public void testKt2509() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2509.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2509.kt"); } @TestMetadata("kt2593.kt") public void testKt2593() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2593.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2593.kt"); } @TestMetadata("kt274.kt") public void testKt274() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt274.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt274.kt"); } @TestMetadata("kt3046.kt") public void testKt3046() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3046.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3046.kt"); } @TestMetadata("kt3107.kt") public void testKt3107() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3107.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3107.kt"); } @TestMetadata("kt3421.kt") public void testKt3421() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3421.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3421.kt"); } @TestMetadata("kt344.kt") public void testKt344() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt344.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt344.kt"); } @TestMetadata("kt3442.kt") public void testKt3442() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3442.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3442.kt"); } @TestMetadata("kt3587.kt") public void testKt3587() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3587.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3587.kt"); } @TestMetadata("kt3850.kt") public void testKt3850() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3850.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3850.kt"); } @TestMetadata("kt3903.kt") public void testKt3903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3903.kt"); } @TestMetadata("kt4142.kt") public void testKt4142() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4142.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4142.kt"); } @TestMetadata("kt4259.kt") public void testKt4259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4259.kt"); } @TestMetadata("kt4262.kt") public void testKt4262() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4262.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4262.kt"); } @TestMetadata("kt4281.kt") public void testKt4281() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4281.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4281.kt"); } @TestMetadata("kt5056.kt") public void testKt5056() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5056.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5056.kt"); } @TestMetadata("kt528.kt") public void testKt528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt528.kt"); } @TestMetadata("kt529.kt") public void testKt529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt529.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt529.kt"); } @TestMetadata("kt533.kt") public void testKt533() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt533.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt533.kt"); } @TestMetadata("kt5395.kt") public void testKt5395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5395.kt"); } @TestMetadata("kt5445.kt") public void testKt5445() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5445.kt"); } @TestMetadata("kt5445_2.kt") public void testKt5445_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5445_2.kt"); } @TestMetadata("kt5786_privateWithDefault.kt") public void testKt5786_privateWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); } @TestMetadata("kt5953.kt") public void testKt5953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5953.kt"); } @TestMetadata("kt6153.kt") public void testKt6153() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6153.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6153.kt"); } @TestMetadata("kt6434.kt") public void testKt6434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434.kt"); } @TestMetadata("kt6434_2.kt") public void testKt6434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434_2.kt"); } @TestMetadata("kt6485.kt") public void testKt6485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6485.kt"); } @TestMetadata("kt715.kt") public void testKt715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt715.kt"); } @TestMetadata("kt7401.kt") public void testKt7401() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt7401.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt7401.kt"); } @TestMetadata("kt789.kt") public void testKt789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt789.kt"); } @TestMetadata("kt864.kt") public void testKt864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt864.kt"); } @TestMetadata("kt998.kt") public void testKt998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt998.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt998.kt"); } @TestMetadata("lambdaAsLastExpressionInLambda.kt") public void testLambdaAsLastExpressionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); } @TestMetadata("lambdaPostponeConstruction.kt") public void testLambdaPostponeConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); } @TestMetadata("lambdaWrongReturnType.kt") public void testLambdaWrongReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); } @TestMetadata("nestedIntersection.kt") public void testNestedIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); } @TestMetadata("noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt") public void testNoAssertionsWhenNullableTypeParameterReplacedWithIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); } @TestMetadata("noCapturingForTypesWithTypeVariables.kt") public void testNoCapturingForTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); } @TestMetadata("noResolutionRecursion.kt") public void testNoResolutionRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); } @TestMetadata("nullabilityForCommonCapturedSupertypes.kt") public void testNullabilityForCommonCapturedSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); } @TestMetadata("nullableAfterExclExcl.kt") public void testNullableAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); } @TestMetadata("objectCaptureOuterConstructorProperty.kt") public void testObjectCaptureOuterConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); } @TestMetadata("objectInsideDelegation.kt") public void testObjectInsideDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); } @TestMetadata("referenceToSelfInLocal.kt") public void testReferenceToSelfInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); } @TestMetadata("resolvedCallForGetOperator.kt") public void testResolvedCallForGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); } @TestMetadata("supertypeDepth.kt") public void testSupertypeDepth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); } @TestMetadata("typeCastException.kt") public void testTypeCastException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/typeCastException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/typeCastException.kt"); } } @@ -19626,232 +17484,204 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObject.kt"); } @TestMetadata("anonymousObjectNoPropagate.kt") public void testAnonymousObjectNoPropagate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); } @TestMetadata("anonymousObjectReifiedSupertype.kt") public void testAnonymousObjectReifiedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); } @TestMetadata("approximateCapturedTypes.kt") public void testApproximateCapturedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); } @TestMetadata("asOnPlatformType.kt") public void testAsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/checkcast.kt"); } @TestMetadata("copyToArray.kt") public void testCopyToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/copyToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/copyToArray.kt"); } @TestMetadata("DIExample.kt") public void testDIExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/DIExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/DIExample.kt"); } @TestMetadata("defaultJavaClass.kt") public void testDefaultJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); } @TestMetadata("expectedTypeFromCast.kt") public void testExpectedTypeFromCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); } @TestMetadata("filterIsInstance.kt") public void testFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/filterIsInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/filterIsInstance.kt"); } @TestMetadata("innerAnonymousObject.kt") public void testInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); } @TestMetadata("instanceof.kt") public void testInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/instanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } @TestMetadata("isOnPlatformType.kt") public void testIsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/javaClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nestedReified.kt"); } @TestMetadata("nestedReifiedSignature.kt") public void testNestedReifiedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); } @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/newArrayInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); } @TestMetadata("nonInlineableLambdaInReifiedFunction.kt") public void testNonInlineableLambdaInReifiedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); } @TestMetadata("recursiveInnerAnonymousObject.kt") public void testRecursiveInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); } @TestMetadata("recursiveNewArray.kt") public void testRecursiveNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); } @TestMetadata("recursiveNonInlineableLambda.kt") public void testRecursiveNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); } @TestMetadata("reifiedChain.kt") public void testReifiedChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedChain.kt"); } @TestMetadata("reifiedInlineFunOfObject.kt") public void testReifiedInlineFunOfObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); } @TestMetadata("reifiedInlineFunOfObjectWithinReified.kt") public void testReifiedInlineFunOfObjectWithinReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); } @TestMetadata("reifiedInlineIntoNonInlineableLambda.kt") public void testReifiedInlineIntoNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); } @TestMetadata("safecast.kt") public void testSafecast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/safecast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/safecast.kt"); } @TestMetadata("sameIndexRecursive.kt") public void testSameIndexRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); } @TestMetadata("spreads.kt") public void testSpreads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/spreads.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/spreads.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/varargs.kt"); } @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArraysReification extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInArraysReification() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("instanceOf.kt") public void testInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); } @TestMetadata("instanceOfArrays.kt") public void testInstanceOfArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); } @TestMetadata("jClass.kt") public void testJClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); } @TestMetadata("jaggedArray.kt") public void testJaggedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); } @TestMetadata("jaggedArrayOfNulls.kt") public void testJaggedArrayOfNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); } @TestMetadata("jaggedDeep.kt") public void testJaggedDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); } } } @@ -19860,86 +17690,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/genericNull.kt"); } @TestMetadata("kt1572.kt") public void testKt1572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt1572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt1572.kt"); } @TestMetadata("kt232.kt") public void testKt232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt232.kt"); } @TestMetadata("kt245.kt") public void testKt245() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt245.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt245.kt"); } @TestMetadata("kt247.kt") public void testKt247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt247.kt"); } @TestMetadata("kt3430.kt") public void testKt3430() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt3430.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt3430.kt"); } @TestMetadata("kt4733.kt") public void testKt4733() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt4733.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt4733.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitive.kt"); } @TestMetadata("primitiveEqSafeCall.kt") public void testPrimitiveEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); } @TestMetadata("primitiveNotEqSafeCall.kt") public void testPrimitiveNotEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); } @TestMetadata("safeCallEqPrimitive.kt") public void testSafeCallEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); } @TestMetadata("safeCallNotEqPrimitive.kt") public void testSafeCallNotEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); } @TestMetadata("safeCallOnLong.kt") public void testSafeCallOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); } } @@ -19947,136 +17768,124 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt17091.kt") public void testKt17091() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091.kt"); } @TestMetadata("kt17091_2.kt") public void testKt17091_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_2.kt"); } @TestMetadata("kt17091_3.kt") public void testKt17091_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_3.kt"); } @TestMetadata("kt17091_4.kt") public void testKt17091_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt17091_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt17091_4.kt"); } @TestMetadata("kt22906.kt") public void testKt22906() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt22906.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt22906.kt"); } @TestMetadata("kt22906_2.kt") public void testKt22906_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/kt22906_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/kt22906_2.kt"); } @TestMetadata("compiler/testData/codegen/box/sam/constructors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparator.kt") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/comparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/comparator.kt"); } @TestMetadata("filenameFilter.kt") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); } @TestMetadata("kt19251.kt") public void testKt19251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/kt19251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/kt19251.kt"); } @TestMetadata("kt19251_child.kt") public void testKt19251_child() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/kt19251_child.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/kt19251_child.kt"); } @TestMetadata("nonLiteralComparator.kt") public void testNonLiteralComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); } @TestMetadata("nonLiteralFilenameFilter.kt") public void testNonLiteralFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); } @TestMetadata("nonLiteralRunnable.kt") public void testNonLiteralRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralRunnable.kt"); } @TestMetadata("nonTrivialRunnable.kt") public void testNonTrivialRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonTrivialRunnable.kt"); } @TestMetadata("runnable.kt") public void testRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnable.kt"); } @TestMetadata("runnableAccessingClosure1.kt") public void testRunnableAccessingClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure1.kt"); } @TestMetadata("runnableAccessingClosure2.kt") public void testRunnableAccessingClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/runnableAccessingClosure2.kt"); } @TestMetadata("samWrappersDifferentFiles.kt") public void testSamWrappersDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); } @TestMetadata("sameWrapperClass.kt") public void testSameWrapperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); } @TestMetadata("syntheticVsReal.kt") public void testSyntheticVsReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/syntheticVsReal.kt"); } } } @@ -20085,20 +17894,22 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/objects.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/simple.kt"); } } @@ -20106,16 +17917,18 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); } @TestMetadata("accessToNestedObject.kt") public void testAccessToNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); } public void testAllFilesPresentInSecondaryConstructors() throws Exception { @@ -20124,176 +17937,147 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("basicNoPrimaryManySinks.kt") public void testBasicNoPrimaryManySinks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); } @TestMetadata("basicNoPrimaryOneSink.kt") public void testBasicNoPrimaryOneSink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); } @TestMetadata("basicPrimary.kt") public void testBasicPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); } @TestMetadata("callFromLocalSubClass.kt") public void testCallFromLocalSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); } @TestMetadata("callFromPrimaryWithNamedArgs.kt") public void testCallFromPrimaryWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); } @TestMetadata("callFromPrimaryWithOptionalArgs.kt") public void testCallFromPrimaryWithOptionalArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); } @TestMetadata("callFromSubClass.kt") public void testCallFromSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); } @TestMetadata("clashingDefaultConstructors.kt") public void testClashingDefaultConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); } @TestMetadata("defaultParametersNotDuplicated.kt") public void testDefaultParametersNotDuplicated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); } @TestMetadata("delegateWithComplexExpression.kt") public void testDelegateWithComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); } @TestMetadata("delegatedThisWithLambda.kt") public void testDelegatedThisWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); } @TestMetadata("delegationWithPrimary.kt") public void testDelegationWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); } @TestMetadata("innerClassesInheritance.kt") public void testInnerClassesInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); } @TestMetadata("superCallPrimary.kt") public void testSuperCallPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); } @TestMetadata("superCallSecondary.kt") public void testSuperCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); } @TestMetadata("withGenerics.kt") public void testWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withGenerics.kt"); } @TestMetadata("withNonLocalReturn.kt") public void testWithNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); } @TestMetadata("withPrimary.kt") public void testWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withPrimary.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); } @TestMetadata("withReturnUnit.kt") public void testWithReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withVarargs.kt"); } @TestMetadata("withoutPrimary.kt") public void testWithoutPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withoutPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withoutPrimary.kt"); } } @@ -20301,86 +18085,77 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("defaultAndNamedCombination.kt") public void testDefaultAndNamedCombination() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultAndNamedCombination.kt"); } @TestMetadata("defaultBoxTypes.kt") public void testDefaultBoxTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultBoxTypes.kt"); } @TestMetadata("defaultEnumType.kt") public void testDefaultEnumType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultEnumType.kt"); } @TestMetadata("defaultLongLiteral.kt") public void testDefaultLongLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultLongLiteral.kt"); } @TestMetadata("defaultMultipleParams.kt") public void testDefaultMultipleParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultMultipleParams.kt"); } @TestMetadata("defaultNull.kt") public void testDefaultNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNull.kt"); } @TestMetadata("defaultNullableBoxTypes.kt") public void testDefaultNullableBoxTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultNullableBoxTypes.kt"); } @TestMetadata("defaultOverrides.kt") public void testDefaultOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultOverrides.kt"); } @TestMetadata("defaultPrimitiveTypes.kt") public void testDefaultPrimitiveTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultPrimitiveTypes.kt"); } @TestMetadata("defaultValueInConstructor.kt") public void testDefaultValueInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultValueInConstructor.kt"); } @TestMetadata("defaultWithJavaBase.kt") public void testDefaultWithJavaBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithJavaBase.kt"); } @TestMetadata("defaultWithKotlinBase.kt") public void testDefaultWithKotlinBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/defaultWithKotlinBase.kt"); } @TestMetadata("reorderedParameterNames.kt") public void testReorderedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/signatureAnnotations/reorderedParameterNames.kt"); } } @@ -20388,26 +18163,27 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("chainCalls.kt") public void testChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/chainCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/chainCalls.kt"); } @TestMetadata("infixCalls.kt") public void testInfixCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/infixCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/infixCalls.kt"); } @TestMetadata("simpleCallWithParams.kt") public void testSimpleCallWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smap/simpleCallWithParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smap/simpleCallWithParams.kt"); } } @@ -20415,98 +18191,87 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("falseSmartCast.kt") public void testFalseSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); } @TestMetadata("genericIntersection.kt") public void testGenericIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); } @TestMetadata("genericSet.kt") public void testGenericSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericSet.kt"); } @TestMetadata("implicitExtensionReceiver.kt") public void testImplicitExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); } @TestMetadata("implicitMemberReceiver.kt") public void testImplicitMemberReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); } @TestMetadata("implicitReceiverInWhen.kt") public void testImplicitReceiverInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); } @TestMetadata("implicitToGrandSon.kt") public void testImplicitToGrandSon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt17725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt17725.kt"); } @TestMetadata("kt19058.kt") public void testKt19058() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19058.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19058.kt"); } @TestMetadata("kt19100.kt") public void testKt19100() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19100.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19100.kt"); } @TestMetadata("lambdaArgumentWithoutType.kt") public void testLambdaArgumentWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); } @TestMetadata("nullSmartCast.kt") public void testNullSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); } @TestMetadata("smartCastInsideIf.kt") public void testSmartCastInsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); } @TestMetadata("whenSmartCast.kt") public void testWhenSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); } } @@ -20514,152 +18279,132 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltins extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bridgeNotEmptyMap.kt") public void testBridgeNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); } @TestMetadata("bridges.kt") public void testBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); } @TestMetadata("commonBridgesTarget.kt") public void testCommonBridgesTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); } @TestMetadata("emptyMap.kt") public void testEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); } @TestMetadata("emptyStringMap.kt") public void testEmptyStringMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); } @TestMetadata("entrySetSOE.kt") public void testEntrySetSOE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); } @TestMetadata("enumAsOrdinaled.kt") public void testEnumAsOrdinaled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); } @TestMetadata("exceptionCause.kt") public void testExceptionCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); } @TestMetadata("explicitSuperCall.kt") public void testExplicitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); } @TestMetadata("irrelevantRemoveAtOverride.kt") public void testIrrelevantRemoveAtOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); } @TestMetadata("maps.kt") public void testMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/maps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/maps.kt"); } @TestMetadata("noSpecialBridgeInSuperClass.kt") public void testNoSpecialBridgeInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); } @TestMetadata("notEmptyListAny.kt") public void testNotEmptyListAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); } @TestMetadata("notEmptyMap.kt") public void testNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); } @TestMetadata("redundantStubForSize.kt") public void testRedundantStubForSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); } @TestMetadata("removeAtTwoSpecialBridges.kt") public void testRemoveAtTwoSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); } @TestMetadata("removeSetInt.kt") public void testRemoveSetInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); } @TestMetadata("throwableCause.kt") public void testThrowableCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); } @TestMetadata("throwableImpl.kt") public void testThrowableImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); } @TestMetadata("throwableImplWithSecondaryConstructor.kt") public void testThrowableImplWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); } @TestMetadata("valuesInsideEnum.kt") public void testValuesInsideEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); } } @@ -20667,104 +18412,92 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("anonymousInitializerIObject.kt") public void testAnonymousInitializerIObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); } @TestMetadata("anonymousInitializerInClassObject.kt") public void testAnonymousInitializerInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); } @TestMetadata("fields.kt") public void testFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/fields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/fields.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/functions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/functions.kt"); } @TestMetadata("hidePrivateByPublic.kt") public void testHidePrivateByPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); } @TestMetadata("incInClassObject.kt") public void testIncInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInClassObject.kt"); } @TestMetadata("incInObject.kt") public void testIncInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInObject.kt"); } @TestMetadata("inheritedPropertyInClassObject.kt") public void testInheritedPropertyInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); } @TestMetadata("inheritedPropertyInObject.kt") public void testInheritedPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); } @TestMetadata("inlineCallsStaticMethod.kt") public void testInlineCallsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); } @TestMetadata("kt8089.kt") public void testKt8089() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/kt8089.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/kt8089.kt"); } @TestMetadata("protectedSamConstructor.kt") public void testProtectedSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); } @TestMetadata("protectedStatic.kt") public void testProtectedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStatic.kt"); } @TestMetadata("protectedStatic2.kt") public void testProtectedStatic2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStatic2.kt"); } @TestMetadata("protectedStaticAndInline.kt") public void testProtectedStaticAndInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); } } @@ -20772,38 +18505,37 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StoreStackBeforeInline extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); } @TestMetadata("primitiveMerge.kt") public void testPrimitiveMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); } @TestMetadata("unreachableMarker.kt") public void testUnreachableMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); } @TestMetadata("withLambda.kt") public void testWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); } } @@ -20811,116 +18543,102 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Strings extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStrings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); } @TestMetadata("ea35743.kt") public void testEa35743() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/ea35743.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/ea35743.kt"); } @TestMetadata("forInString.kt") public void testForInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/forInString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/forInString.kt"); } @TestMetadata("interpolation.kt") public void testInterpolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/interpolation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/interpolation.kt"); } @TestMetadata("kt2592.kt") public void testKt2592() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt2592.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt2592.kt"); } @TestMetadata("kt3571.kt") public void testKt3571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3571.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3571.kt"); } @TestMetadata("kt3652.kt") public void testKt3652() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3652.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3652.kt"); } @TestMetadata("kt5389_stringBuilderGet.kt") public void testKt5389_stringBuilderGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); } @TestMetadata("kt5956.kt") public void testKt5956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5956.kt"); } @TestMetadata("kt881.kt") public void testKt881() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt881.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt881.kt"); } @TestMetadata("kt889.kt") public void testKt889() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt889.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt889.kt"); } @TestMetadata("kt894.kt") public void testKt894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt894.kt"); } @TestMetadata("multilineStringsWithTemplates.kt") public void testMultilineStringsWithTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); } @TestMetadata("nestedConcat.kt") public void testNestedConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/nestedConcat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/nestedConcat.kt"); } @TestMetadata("rawStrings.kt") public void testRawStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStrings.kt"); } @TestMetadata("rawStringsWithManyQuotes.kt") public void testRawStringsWithManyQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); } @TestMetadata("stringBuilderAppend.kt") public void testStringBuilderAppend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); } @TestMetadata("stringPlusOnlyWorksOnString.kt") public void testStringPlusOnlyWorksOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); } } @@ -20928,220 +18646,194 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("basicmethodSuperClass.kt") public void testBasicmethodSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); } @TestMetadata("basicmethodSuperTrait.kt") public void testBasicmethodSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); } @TestMetadata("basicproperty.kt") public void testBasicproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicproperty.kt"); } @TestMetadata("enclosedFun.kt") public void testEnclosedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedFun.kt"); } @TestMetadata("enclosedVar.kt") public void testEnclosedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedVar.kt"); } @TestMetadata("innerClassLabeledSuper.kt") public void testInnerClassLabeledSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); } @TestMetadata("innerClassLabeledSuper2.kt") public void testInnerClassLabeledSuper2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); } @TestMetadata("innerClassLabeledSuperProperty.kt") public void testInnerClassLabeledSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); } @TestMetadata("innerClassLabeledSuperProperty2.kt") public void testInnerClassLabeledSuperProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); } @TestMetadata("innerClassQualifiedFunctionCall.kt") public void testInnerClassQualifiedFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); } @TestMetadata("innerClassQualifiedPropertyAccess.kt") public void testInnerClassQualifiedPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); } @TestMetadata("kt14243.kt") public void testKt14243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243.kt"); } @TestMetadata("kt14243_2.kt") public void testKt14243_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_2.kt"); } @TestMetadata("kt14243_class.kt") public void testKt14243_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_class.kt"); } @TestMetadata("kt14243_prop.kt") public void testKt14243_prop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_prop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_prop.kt"); } @TestMetadata("kt3492ClassFun.kt") public void testKt3492ClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); } @TestMetadata("kt3492ClassProperty.kt") public void testKt3492ClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); } @TestMetadata("kt3492TraitFun.kt") public void testKt3492TraitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); } @TestMetadata("kt3492TraitProperty.kt") public void testKt3492TraitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); } @TestMetadata("kt4173.kt") public void testKt4173() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173.kt"); } @TestMetadata("kt4173_2.kt") public void testKt4173_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_2.kt"); } @TestMetadata("kt4173_3.kt") public void testKt4173_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_3.kt"); } @TestMetadata("kt4982.kt") public void testKt4982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4982.kt"); } @TestMetadata("multipleSuperTraits.kt") public void testMultipleSuperTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); } @TestMetadata("traitproperty.kt") public void testTraitproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/traitproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/traitproperty.kt"); } @TestMetadata("unqualifiedSuper.kt") public void testUnqualifiedSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); } @TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt") public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); } @TestMetadata("unqualifiedSuperWithMethodsOfAny.kt") public void testUnqualifiedSuperWithMethodsOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); } @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructor extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt17464_arrayOf.kt") public void testKt17464_arrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); } @TestMetadata("kt17464_linkedMapOf.kt") public void testKt17464_linkedMapOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); } @TestMetadata("kt18356.kt") public void testKt18356() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); } @TestMetadata("kt18356_2.kt") public void testKt18356_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); } @TestMetadata("objectExtendsLocalInner.kt") public void testObjectExtendsLocalInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); } } } @@ -21150,74 +18842,67 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Synchronized extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInSynchronized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("changeMonitor.kt") public void testChangeMonitor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); } @TestMetadata("exceptionInMonitorExpression.kt") public void testExceptionInMonitorExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/finally.kt"); } @TestMetadata("longValue.kt") public void testLongValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/longValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/longValue.kt"); } @TestMetadata("nestedDifferentObjects.kt") public void testNestedDifferentObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); } @TestMetadata("nestedSameObject.kt") public void testNestedSameObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); } @TestMetadata("objectValue.kt") public void testObjectValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/objectValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/objectValue.kt"); } @TestMetadata("sync.kt") public void testSync() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/sync.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/sync.kt"); } @TestMetadata("value.kt") public void testValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/value.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/value.kt"); } @TestMetadata("wait.kt") public void testWait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/wait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/synchronized/wait.kt"); } } @@ -21225,34 +18910,33 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("accessorForGenericConstructor.kt") public void testAccessorForGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); } @TestMetadata("accessorForGenericMethod.kt") public void testAccessorForGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); } @TestMetadata("accessorForGenericMethodWithDefaults.kt") public void testAccessorForGenericMethodWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); } @TestMetadata("accessorForProtected.kt") public void testAccessorForProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); } @TestMetadata("accessorForProtectedInvokeVirtual.kt") public void testAccessorForProtectedInvokeVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); } public void testAllFilesPresentInSyntheticAccessors() throws Exception { @@ -21261,62 +18945,52 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("jvmNameForAccessors.kt") public void testJvmNameForAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); } @TestMetadata("kt10047.kt") public void testKt10047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); } @TestMetadata("kt21258_indirect.kt") public void testKt21258_indirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); } @TestMetadata("kt21258_simple.kt") public void testKt21258_simple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); } @TestMetadata("kt9717.kt") public void testKt9717() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); } @TestMetadata("kt9717DifferentPackages.kt") public void testKt9717DifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); } @TestMetadata("kt9958.kt") public void testKt9958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); } @TestMetadata("kt9958Interface.kt") public void testKt9958Interface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); } @TestMetadata("protectedFromLambda.kt") public void testProtectedFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); } @TestMetadata("syntheticAccessorNames.kt") public void testSyntheticAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); } } @@ -21324,50 +18998,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToArray extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInToArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("kt3177-toTypedArray.kt") public void testKt3177_toTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); } @TestMetadata("returnToTypedArray.kt") public void testReturnToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); } @TestMetadata("toArray.kt") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArray.kt"); } @TestMetadata("toArrayAlreadyPresent.kt") public void testToArrayAlreadyPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayAlreadyPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayAlreadyPresent.kt"); } @TestMetadata("toArrayShouldBePublic.kt") public void testToArrayShouldBePublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayShouldBePublic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayShouldBePublic.kt"); } @TestMetadata("toArrayShouldBePublicWithJava.kt") public void testToArrayShouldBePublicWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toArrayShouldBePublicWithJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toArrayShouldBePublicWithJava.kt"); } @TestMetadata("toTypedArray.kt") public void testToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/toTypedArray.kt"); } } @@ -21375,44 +19046,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelPrivate extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTopLevelPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade.kt") public void testNoPrivateNoAccessorsInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade2.kt") public void testNoPrivateNoAccessorsInMultiFileFacade2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); } @TestMetadata("privateInInlineNested.kt") public void testPrivateInInlineNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); } @TestMetadata("privateVisibility.kt") public void testPrivateVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); } @TestMetadata("syntheticAccessorInMultiFile.kt") public void testSyntheticAccessorInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); } } @@ -21420,10 +19089,13 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Traits extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); } public void testAllFilesPresentInTraits() throws Exception { @@ -21432,176 +19104,147 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestMetadata("diamondPropertyAccessors.kt") public void testDiamondPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/genericMethod.kt"); } @TestMetadata("indirectlyInheritPropertyGetter.kt") public void testIndirectlyInheritPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); } @TestMetadata("inheritJavaInterface.kt") public void testInheritJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); } @TestMetadata("inheritedFun.kt") public void testInheritedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedFun.kt"); } @TestMetadata("inheritedVar.kt") public void testInheritedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedVar.kt"); } @TestMetadata("interfaceDefaultImpls.kt") public void testInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirect.kt") public void testInterfaceWithNonAbstractFunIndirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirectGeneric.kt") public void testInterfaceWithNonAbstractFunIndirectGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); } @TestMetadata("kt1936.kt") public void testKt1936() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936.kt"); } @TestMetadata("kt1936_1.kt") public void testKt1936_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936_1.kt"); } @TestMetadata("kt2260.kt") public void testKt2260() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2260.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2260.kt"); } @TestMetadata("kt2399.kt") public void testKt2399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2399.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2399.kt"); } @TestMetadata("kt2541.kt") public void testKt2541() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2541.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2541.kt"); } @TestMetadata("kt3315.kt") public void testKt3315() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3315.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3315.kt"); } @TestMetadata("kt3500.kt") public void testKt3500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3500.kt"); } @TestMetadata("kt3579.kt") public void testKt3579() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579.kt"); } @TestMetadata("kt3579_2.kt") public void testKt3579_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579_2.kt"); } @TestMetadata("kt5393.kt") public void testKt5393() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393.kt"); } @TestMetadata("kt5393_property.kt") public void testKt5393_property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393_property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393_property.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/multiple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/multiple.kt"); } @TestMetadata("noPrivateDelegation.kt") public void testNoPrivateDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); } @TestMetadata("traitImplDelegationWithCovariantOverride.kt") public void testTraitImplDelegationWithCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); } @TestMetadata("traitImplDiamond.kt") public void testTraitImplDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); } @TestMetadata("traitImplGenericDelegation.kt") public void testTraitImplGenericDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); } @TestMetadata("traitWithPrivateExtension.kt") public void testTraitWithPrivateExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); } @TestMetadata("traitWithPrivateMember.kt") public void testTraitWithPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); } @TestMetadata("traitWithPrivateMemberAccessFromLambda.kt") public void testTraitWithPrivateMemberAccessFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); } } @@ -21609,50 +19252,47 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeInfo extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("asInLoop.kt") public void testAsInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); } @TestMetadata("ifOrWhenSpecialCall.kt") public void testIfOrWhenSpecialCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); } @TestMetadata("implicitSmartCastThis.kt") public void testImplicitSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/inheritance.kt"); } @TestMetadata("kt2811.kt") public void testKt2811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/kt2811.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/kt2811.kt"); } @TestMetadata("primitiveTypeInfo.kt") public void testPrimitiveTypeInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); } @TestMetadata("smartCastThis.kt") public void testSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); } } @@ -21660,68 +19300,62 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMapping extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypeMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enhancedPrimitives.kt") public void testEnhancedPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); } @TestMetadata("genericTypeWithNothing.kt") public void testGenericTypeWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); } @TestMetadata("kt2831.kt") public void testKt2831() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt2831.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt2831.kt"); } @TestMetadata("kt309.kt") public void testKt309() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt309.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt309.kt"); } @TestMetadata("kt3286.kt") public void testKt3286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3286.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3286.kt"); } @TestMetadata("kt3863.kt") public void testKt3863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3863.kt"); } @TestMetadata("kt3976.kt") public void testKt3976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3976.kt"); } @TestMetadata("nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nothing.kt"); } @TestMetadata("nullableNothing.kt") public void testNullableNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); } @TestMetadata("typeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); } } @@ -21729,116 +19363,102 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); } @TestMetadata("genericTypeAliasConstructor.kt") public void testGenericTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); } @TestMetadata("genericTypeAliasConstructor2.kt") public void testGenericTypeAliasConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); } @TestMetadata("innerClassTypeAliasConstructor.kt") public void testInnerClassTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); } @TestMetadata("innerClassTypeAliasConstructorInSupertypes.kt") public void testInnerClassTypeAliasConstructorInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/kt15109.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/kt15109.kt"); } @TestMetadata("objectLiteralConstructor.kt") public void testObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/simple.kt"); } @TestMetadata("typeAliasAsBareType.kt") public void testTypeAliasAsBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); } @TestMetadata("typeAliasCompanion.kt") public void testTypeAliasCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); } @TestMetadata("typeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); } @TestMetadata("typeAliasConstructorAccessor.kt") public void testTypeAliasConstructorAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); } @TestMetadata("typeAliasConstructorForArray.kt") public void testTypeAliasConstructorForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); } @TestMetadata("typeAliasConstructorInSuperCall.kt") public void testTypeAliasConstructorInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); } @TestMetadata("typeAliasObject.kt") public void testTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); } @TestMetadata("typeAliasObjectCallable.kt") public void testTypeAliasObjectCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); } @TestMetadata("typeAliasSecondaryConstructor.kt") public void testTypeAliasSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); } } @@ -21846,44 +19466,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryOp extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/call.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callNullable.kt"); } @TestMetadata("callWithCommonType.kt") public void testCallWithCommonType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); } @TestMetadata("longOverflow.kt") public void testLongOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); } } @@ -21891,74 +19509,67 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unit extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("closureReturnsNullableUnit.kt") public void testClosureReturnsNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/ifElse.kt"); } @TestMetadata("kt3634.kt") public void testKt3634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt3634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt3634.kt"); } @TestMetadata("kt4212.kt") public void testKt4212() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4212.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4212.kt"); } @TestMetadata("kt4265.kt") public void testKt4265() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4265.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4265.kt"); } @TestMetadata("nullableUnit.kt") public void testNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnit.kt"); } @TestMetadata("nullableUnitInWhen1.kt") public void testNullableUnitInWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); } @TestMetadata("nullableUnitInWhen2.kt") public void testNullableUnitInWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); } @TestMetadata("nullableUnitInWhen3.kt") public void testNullableUnitInWhen3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); } @TestMetadata("unitClassObject.kt") public void testUnitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/unitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/unitClassObject.kt"); } @TestMetadata("UnitValue.kt") public void testUnitValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/UnitValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/UnitValue.kt"); } } @@ -21966,68 +19577,62 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("assigningArrayToVarargInAnnotation.kt") public void testAssigningArrayToVarargInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); } @TestMetadata("doNotCopyImmediatelyCreatedArrays.kt") public void testDoNotCopyImmediatelyCreatedArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); } @TestMetadata("kt1978.kt") public void testKt1978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt1978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt1978.kt"); } @TestMetadata("kt581.kt") public void testKt581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt581.kt"); } @TestMetadata("kt6192.kt") public void testKt6192() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt6192.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt6192.kt"); } @TestMetadata("kt796_797.kt") public void testKt796_797() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt796_797.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } @TestMetadata("spreadCopiesArray.kt") public void testSpreadCopiesArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); } @TestMetadata("varargInFunParam.kt") public void testVarargInFunParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInJava.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInJava.kt"); } @TestMetadata("varargsAndFunctionLiterals.kt") public void testVarargsAndFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); } } @@ -22035,322 +19640,279 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("callProperty.kt") public void testCallProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/callProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/callProperty.kt"); } @TestMetadata("emptyWhen.kt") public void testEmptyWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/emptyWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/emptyWhen.kt"); } @TestMetadata("exceptionOnNoMatch.kt") public void testExceptionOnNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); } @TestMetadata("exhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); } @TestMetadata("exhaustiveBreakContinue.kt") public void testExhaustiveBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); } @TestMetadata("exhaustiveWhenInitialization.kt") public void testExhaustiveWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); } @TestMetadata("exhaustiveWhenReturn.kt") public void testExhaustiveWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); } @TestMetadata("implicitExhaustiveAndReturn.kt") public void testImplicitExhaustiveAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); } @TestMetadata("integralWhenWithNoInlinedConstants.kt") public void testIntegralWhenWithNoInlinedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/is.kt"); } @TestMetadata("kt2457.kt") public void testKt2457() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2457.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2457.kt"); } @TestMetadata("kt2466.kt") public void testKt2466() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2466.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2466.kt"); } @TestMetadata("kt5307.kt") public void testKt5307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5307.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5307.kt"); } @TestMetadata("kt5448.kt") public void testKt5448() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5448.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5448.kt"); } @TestMetadata("longInRange.kt") public void testLongInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/longInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/longInRange.kt"); } @TestMetadata("matchNotNullAgainstNullable.kt") public void testMatchNotNullAgainstNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); } @TestMetadata("multipleEntries.kt") public void testMultipleEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/multipleEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/multipleEntries.kt"); } @TestMetadata("noElseExhaustive.kt") public void testNoElseExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustive.kt"); } @TestMetadata("noElseExhaustiveStatement.kt") public void testNoElseExhaustiveStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); } @TestMetadata("noElseExhaustiveUnitExpected.kt") public void testNoElseExhaustiveUnitExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); } @TestMetadata("noElseInStatement.kt") public void testNoElseInStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseInStatement.kt"); } @TestMetadata("noElseNoMatch.kt") public void testNoElseNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseNoMatch.kt"); } @TestMetadata("nullableWhen.kt") public void testNullableWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/nullableWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/nullableWhen.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/range.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/range.kt"); } @TestMetadata("sealedWhenInitialization.kt") public void testSealedWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); } @TestMetadata("switchOptimizationDense.kt") public void testSwitchOptimizationDense() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); } @TestMetadata("switchOptimizationMultipleConditions.kt") public void testSwitchOptimizationMultipleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); } @TestMetadata("switchOptimizationSingleStatementCase.kt") public void testSwitchOptimizationSingleStatementCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); } @TestMetadata("switchOptimizationSparse.kt") public void testSwitchOptimizationSparse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); } @TestMetadata("switchOptimizationStatement.kt") public void testSwitchOptimizationStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); } @TestMetadata("switchOptimizationTypes.kt") public void testSwitchOptimizationTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); } @TestMetadata("switchOptimizationUnordered.kt") public void testSwitchOptimizationUnordered() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); } @TestMetadata("switchOptimizationWithGap.kt") public void testSwitchOptimizationWithGap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); } @TestMetadata("typeDisjunction.kt") public void testTypeDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/typeDisjunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/typeDisjunction.kt"); } @TestMetadata("whenArgumentIsEvaluatedOnlyOnce.kt") public void testWhenArgumentIsEvaluatedOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); } @TestMetadata("whenSafeCallSubjectEvaluatedOnce.kt") public void testWhenSafeCallSubjectEvaluatedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); } @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumOptimization extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInEnumOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("bigEnum.kt") public void testBigEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); } @TestMetadata("enumInsideClassObject.kt") public void testEnumInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); } @TestMetadata("functionLiteralInTopLevel.kt") public void testFunctionLiteralInTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); } @TestMetadata("kt14597.kt") public void testKt14597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); } @TestMetadata("kt14597_full.kt") public void testKt14597_full() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); } @TestMetadata("kt14802.kt") public void testKt14802() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); } @TestMetadata("kt15806.kt") public void testKt15806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); } @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); } @TestMetadata("nonConstantEnum.kt") public void testNonConstantEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); } @TestMetadata("nullableEnum.kt") public void testNullableEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); } @TestMetadata("subjectAny.kt") public void testSubjectAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); } @TestMetadata("withoutElse.kt") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); } } @@ -22358,44 +19920,42 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringOptimization extends AbstractLightAnalysisModeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInStringOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); } @TestMetadata("duplicatingItemsSameHashCode.kt") public void testDuplicatingItemsSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); } @TestMetadata("sameHashCode.kt") public void testSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); } @TestMetadata("statement.kt") public void testStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LineNumberTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LineNumberTestGenerated.java index 2cc8e40421f..da3a411cbfd 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LineNumberTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LineNumberTestGenerated.java @@ -23,110 +23,97 @@ public class LineNumberTestGenerated extends AbstractLineNumberTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LineNumber extends AbstractLineNumberTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLineNumber() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lineNumber"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("anonymousFunction.kt") public void testAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/anonymousFunction.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/anonymousFunction.kt"); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/class.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/classObject.kt"); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/defaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/defaultParameter.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/enum.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/enum.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/for.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/for.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/if.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/if.kt"); } @TestMetadata("inlineSimpleCall.kt") public void testInlineSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/inlineSimpleCall.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/inlineSimpleCall.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/localFunction.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/object.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/object.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/propertyAccessor.kt"); } @TestMetadata("psvm.kt") public void testPsvm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/psvm.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/psvm.kt"); } @TestMetadata("simpleSmap.kt") public void testSimpleSmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/simpleSmap.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/simpleSmap.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/topLevel.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/trait.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/trait.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/tryCatch.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/while.kt"); - doTest(fileName); + runTest("compiler/testData/lineNumber/while.kt"); } } @@ -134,146 +121,127 @@ public class LineNumberTestGenerated extends AbstractLineNumberTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Custom extends AbstractLineNumberTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCustom, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCustom() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/lineNumber/custom"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("beforeGotoToWhileStart.kt") public void testBeforeGotoToWhileStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/beforeGotoToWhileStart.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/beforeGotoToWhileStart.kt"); } @TestMetadata("callWithCallInArguments.kt") public void testCallWithCallInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/callWithCallInArguments.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/callWithCallInArguments.kt"); } @TestMetadata("callWithReceiver.kt") public void testCallWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/callWithReceiver.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/callWithReceiver.kt"); } @TestMetadata("chainCall.kt") public void testChainCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/chainCall.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/chainCall.kt"); } @TestMetadata("compileTimeConstant.kt") public void testCompileTimeConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/compileTimeConstant.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/compileTimeConstant.kt"); } @TestMetadata("functionCallWithDefault.kt") public void testFunctionCallWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithDefault.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/functionCallWithDefault.kt"); } @TestMetadata("functionCallWithInlinedLambdaParam.kt") public void testFunctionCallWithInlinedLambdaParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithInlinedLambdaParam.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/functionCallWithInlinedLambdaParam.kt"); } @TestMetadata("functionCallWithLambdaParam.kt") public void testFunctionCallWithLambdaParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/functionCallWithLambdaParam.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/functionCallWithLambdaParam.kt"); } @TestMetadata("ifThen.kt") public void testIfThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/ifThen.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/ifThen.kt"); } @TestMetadata("ifThenElse.kt") public void testIfThenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/ifThenElse.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/ifThenElse.kt"); } @TestMetadata("inTheEndOfLambdaArgumentOfInlineCall.kt") public void testInTheEndOfLambdaArgumentOfInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/inTheEndOfLambdaArgumentOfInlineCall.kt"); } @TestMetadata("multilineFunctionCall.kt") public void testMultilineFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/multilineFunctionCall.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/multilineFunctionCall.kt"); } @TestMetadata("multilineInfixCall.kt") public void testMultilineInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/multilineInfixCall.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/multilineInfixCall.kt"); } @TestMetadata("noParametersArgumentCallInExpression.kt") public void testNoParametersArgumentCallInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/noParametersArgumentCallInExpression.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/noParametersArgumentCallInExpression.kt"); } @TestMetadata("smapInlineAsArgument.kt") public void testSmapInlineAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsArgument.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/smapInlineAsArgument.kt"); } @TestMetadata("smapInlineAsInfixArgument.kt") public void testSmapInlineAsInfixArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsInfixArgument.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/smapInlineAsInfixArgument.kt"); } @TestMetadata("smapInlineAsInlineArgument.kt") public void testSmapInlineAsInlineArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/smapInlineAsInlineArgument.kt"); } @TestMetadata("smapInlineInIntrinsicArgument.kt") public void testSmapInlineInIntrinsicArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/smapInlineInIntrinsicArgument.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/smapInlineInIntrinsicArgument.kt"); } @TestMetadata("tryCatchExpression.kt") public void testTryCatchExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryCatchExpression.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/tryCatchExpression.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryCatchFinally.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/tryCatchFinally.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/tryFinally.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/tryFinally.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/when.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/when.kt"); } @TestMetadata("whenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/lineNumber/custom/whenSubject.kt"); - doTestCustom(fileName); + runTest("compiler/testData/lineNumber/custom/whenSubject.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ScriptCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ScriptCodegenTestGenerated.java index d26619ef938..c95c9752bba 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ScriptCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ScriptCodegenTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ScriptCodegenTestGenerated extends AbstractScriptCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("adder.kts") public void testAdder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/adder.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/adder.kts"); } public void testAllFilesPresentInScript() throws Exception { @@ -33,169 +36,141 @@ public class ScriptCodegenTestGenerated extends AbstractScriptCodegenTest { @TestMetadata("classLiteralInsideFunction.kts") public void testClassLiteralInsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/classLiteralInsideFunction.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/classLiteralInsideFunction.kts"); } @TestMetadata("destructuringDeclaration.kts") public void testDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/destructuringDeclaration.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/destructuringDeclaration.kts"); } @TestMetadata("destructuringDeclarationUnderscore.kts") public void testDestructuringDeclarationUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/destructuringDeclarationUnderscore.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/destructuringDeclarationUnderscore.kts"); } @TestMetadata("empty.kts") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/empty.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/empty.kts"); } @TestMetadata("helloWorld.kts") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/helloWorld.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/helloWorld.kts"); } @TestMetadata("inline.kts") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/inline.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/inline.kts"); } @TestMetadata("kt20707.kts") public void testKt20707() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/kt20707.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/kt20707.kts"); } @TestMetadata("kt22029.kts") public void testKt22029() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/kt22029.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/kt22029.kts"); } @TestMetadata("localDelegatedProperty.kts") public void testLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/localDelegatedProperty.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/localDelegatedProperty.kts"); } @TestMetadata("localDelegatedPropertyNoExplicitType.kts") public void testLocalDelegatedPropertyNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/localDelegatedPropertyNoExplicitType.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/localDelegatedPropertyNoExplicitType.kts"); } @TestMetadata("localFunction.kts") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/localFunction.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/localFunction.kts"); } @TestMetadata("outerCapture.kts") public void testOuterCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/outerCapture.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/outerCapture.kts"); } @TestMetadata("parameter.kts") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameter.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/parameter.kts"); } @TestMetadata("parameterArray.kts") public void testParameterArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterArray.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/parameterArray.kts"); } @TestMetadata("parameterClosure.kts") public void testParameterClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterClosure.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/parameterClosure.kts"); } @TestMetadata("parameterLong.kts") public void testParameterLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/parameterLong.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/parameterLong.kts"); } @TestMetadata("secondLevelFunction.kts") public void testSecondLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelFunction.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/secondLevelFunction.kts"); } @TestMetadata("secondLevelFunctionClosure.kts") public void testSecondLevelFunctionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelFunctionClosure.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/secondLevelFunctionClosure.kts"); } @TestMetadata("secondLevelVal.kts") public void testSecondLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/secondLevelVal.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/secondLevelVal.kts"); } @TestMetadata("simpleClass.kts") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/simpleClass.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/simpleClass.kts"); } @TestMetadata("string.kts") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/string.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/string.kts"); } @TestMetadata("topLevelFunction.kts") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelFunction.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelFunction.kts"); } @TestMetadata("topLevelFunctionClosure.kts") public void testTopLevelFunctionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelFunctionClosure.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelFunctionClosure.kts"); } @TestMetadata("topLevelLocalDelegatedProperty.kts") public void testTopLevelLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelLocalDelegatedProperty.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelLocalDelegatedProperty.kts"); } @TestMetadata("topLevelPropertiesWithGetSet.kts") public void testTopLevelPropertiesWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelPropertiesWithGetSet.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelPropertiesWithGetSet.kts"); } @TestMetadata("topLevelProperty.kts") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelProperty.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelProperty.kts"); } @TestMetadata("topLevelPropertyWithProvideDelegate.kts") public void testTopLevelPropertyWithProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelPropertyWithProvideDelegate.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelPropertyWithProvideDelegate.kts"); } @TestMetadata("topLevelTypealias.kts") public void testTopLevelTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/script/topLevelTypealias.kts"); - doTest(fileName); + runTest("compiler/testData/codegen/script/topLevelTypealias.kts"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/TopLevelMembersInvocationTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/TopLevelMembersInvocationTestGenerated.java index 4519aa1f7d3..b2e2c54a988 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/TopLevelMembersInvocationTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/TopLevelMembersInvocationTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class TopLevelMembersInvocationTestGenerated extends AbstractTopLevelMembersInvocationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTopLevelMemberInvocation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/topLevelMemberInvocation"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("extensionFunction") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/extensionFunction/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/extensionFunction/"); } @TestMetadata("functionDifferentPackage") public void testFunctionDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionDifferentPackage/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/functionDifferentPackage/"); } @TestMetadata("functionInMultiFilePackage") public void testFunctionInMultiFilePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/functionInMultiFilePackage/"); } @TestMetadata("functionSamePackage") public void testFunctionSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/functionSamePackage/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/functionSamePackage/"); } @TestMetadata("property") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/property/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/property/"); } @TestMetadata("propertyWithGetter") public void testPropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/propertyWithGetter/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/propertyWithGetter/"); } @TestMetadata("twoModules") public void testTwoModules() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/topLevelMemberInvocation/twoModules/"); - doTest(fileName); + runTest("compiler/testData/codegen/topLevelMemberInvocation/twoModules/"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/defaultConstructor/DefaultArgumentsReflectionTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/defaultConstructor/DefaultArgumentsReflectionTestGenerated.java index 62e8605c56b..6b72c818f34 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/defaultConstructor/DefaultArgumentsReflectionTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/defaultConstructor/DefaultArgumentsReflectionTestGenerated.java @@ -21,79 +21,71 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DefaultArgumentsReflectionTestGenerated extends AbstractDefaultArgumentsReflectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/defaultArguments/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/classInClassObject.kt"); } @TestMetadata("classInObject.kt") public void testClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/classInObject.kt"); } @TestMetadata("classWithTwoDefaultArgs.kt") public void testClassWithTwoDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classWithTwoDefaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/classWithTwoDefaultArgs.kt"); } @TestMetadata("classWithVararg.kt") public void testClassWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/classWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/classWithVararg.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/enum.kt"); } @TestMetadata("internalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/internalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/internalClass.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/privateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/privateClass.kt"); } @TestMetadata("privateConstructor.kt") public void testPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/privateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/privateConstructor.kt"); } @TestMetadata("publicClass.kt") public void testPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/publicClass.kt"); } @TestMetadata("publicClassWoDefArgs.kt") public void testPublicClassWoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicClassWoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/publicClassWoDefArgs.kt"); } @TestMetadata("publicInnerClass.kt") public void testPublicInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/publicInnerClass.kt"); } @TestMetadata("publicInnerClassInPrivateClass.kt") public void testPublicInnerClassInPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/defaultArguments/reflection/publicInnerClassInPrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/defaultArguments/reflection/publicInnerClassInPrivateClass.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java index 6ace870082a..8357ccf39a6 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/flags/WriteFlagsTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWriteFlags() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,6 +33,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -37,32 +45,32 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/callableReference/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/functionReference.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/callableReference/visibility/functionReference.kt"); } @TestMetadata("functionReferenceInInlineFunction.kt") public void testFunctionReferenceInInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/callableReference/visibility/functionReferenceInInlineFunction.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/callableReference/visibility/propertyReference.kt"); } @TestMetadata("propertyReferenceInInlineFunction.kt") public void testPropertyReferenceInInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/callableReference/visibility/propertyReferenceInInlineFunction.kt"); } } } @@ -71,6 +79,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -79,62 +91,57 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AccessFlags extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAccessFlags() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/accessFlags"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/defaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/defaultImpls.kt"); } @TestMetadata("innerSealed.kt") public void testInnerSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/innerSealed.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/innerSealed.kt"); } @TestMetadata("mappingWhen.kt") public void testMappingWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/mappingWhen.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/objectLiteral.kt"); } @TestMetadata("publicFinalClass.kt") public void testPublicFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicFinalClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/publicFinalClass.kt"); } @TestMetadata("publicFinalInnerClass.kt") public void testPublicFinalInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicFinalInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/publicFinalInnerClass.kt"); } @TestMetadata("publicInnerInterface.kt") public void testPublicInnerInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/publicInnerInterface.kt"); } @TestMetadata("publicInterface.kt") public void testPublicInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/publicInterface.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/publicInterface.kt"); } @TestMetadata("simpleFilePackageFacade.kt") public void testSimpleFilePackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/accessFlags/simpleFilePackageFacade.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/accessFlags/simpleFilePackageFacade.kt"); } } @@ -142,38 +149,37 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedFlag extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecatedFlag() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/class.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/deprecatedFlag/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/deprecatedFlag/classObject.kt"); } @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/deprecatedFlag/enumClass.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/deprecatedFlag/innerClass.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/deprecatedFlag/trait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/deprecatedFlag/trait.kt"); } } @@ -181,6 +187,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -189,56 +199,52 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Internal extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/internal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/class.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/class.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/enum.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/enum.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/innerClass.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/innerEnum.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/innerObject.kt"); } @TestMetadata("innerTrait.kt") public void testInnerTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/innerTrait.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/object.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/object.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/internal/trait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/internal/trait.kt"); } } @@ -246,56 +252,52 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/class.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/class.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/enum.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/enum.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/innerClass.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/innerEnum.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/innerObject.kt"); } @TestMetadata("innerTrait.kt") public void testInnerTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/innerTrait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/innerTrait.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/object.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/object.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/private/trait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/private/trait.kt"); } } @@ -303,56 +305,52 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Public extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/class/visibility/public"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/class.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/class.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/enum.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/enum.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/innerClass.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/innerEnum.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/innerObject.kt"); } @TestMetadata("innerTrait.kt") public void testInnerTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/innerTrait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/innerTrait.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/object.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/object.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/class/visibility/public/trait.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/class/visibility/public/trait.kt"); } } } @@ -362,6 +360,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -370,14 +372,17 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/delegatedProperty/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("privateSet.kt") public void testPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/delegatedProperty/visibility/privateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/delegatedProperty/visibility/privateSet.kt"); } } } @@ -386,6 +391,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -394,26 +403,27 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObjectPrivate extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObjectPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/classObjectPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("privateFun.kt") public void testPrivateFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/classObjectPrivate/privateFun.kt"); } @TestMetadata("privateVal.kt") public void testPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/classObjectPrivate/privateVal.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/classObjectPrivate/privateVar.kt"); } } @@ -421,32 +431,32 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/constructors/classObject.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/objectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/constructors/objectInClass.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/constructors/objectLiteral.kt"); } @TestMetadata("topLevelObject.kt") public void testTopLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/constructors/topLevelObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/constructors/topLevelObject.kt"); } } @@ -454,80 +464,72 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedFlag extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecatedFlag() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("emptyGetter.kt") public void testEmptyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/emptyGetter.kt"); } @TestMetadata("emptySetter.kt") public void testEmptySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/emptySetter.kt"); } @TestMetadata("extentionFun.kt") public void testExtentionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/extentionFun.kt"); } @TestMetadata("funInClass.kt") public void testFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/funInClass.kt"); } @TestMetadata("funInClassObject.kt") public void testFunInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/funInClassObject.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/getter.kt"); } @TestMetadata("getterAnnotationOnProperty.kt") public void testGetterAnnotationOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/getterAnnotationOnProperty.kt"); } @TestMetadata("getterForPropertyInConstructor.kt") public void testGetterForPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/getterForPropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/getterForPropertyInConstructor.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/setter.kt"); } @TestMetadata("setterAnnotationOnProperty.kt") public void testSetterAnnotationOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/setterAnnotationOnProperty.kt"); } @TestMetadata("setterForPropertyInConstructor.kt") public void testSetterForPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/setterForPropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/setterForPropertyInConstructor.kt"); } @TestMetadata("topLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/deprecatedFlag/topLevelFun.kt"); } } @@ -535,38 +537,37 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithDefaultArguments extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/function/withDefaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("funInClass.kt") public void testFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/withDefaultArguments/funInClass.kt"); } @TestMetadata("funInClassObject.kt") public void testFunInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/withDefaultArguments/funInClassObject.kt"); } @TestMetadata("inlineOnlyFunInClass.kt") public void testInlineOnlyFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/withDefaultArguments/inlineOnlyFunInClass.kt"); } @TestMetadata("reifiedFunInClass.kt") public void testReifiedFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/withDefaultArguments/reifiedFunInClass.kt"); } @TestMetadata("topLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/function/withDefaultArguments/topLevelFun.kt"); } } } @@ -575,26 +576,27 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Hidden extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHidden() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/hidden"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/function.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/hidden/function.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/hidden/propertyGetter.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/hidden/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/hidden/propertySetter.kt"); } } @@ -602,26 +604,27 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lostInnerClass.kt") public void testLostInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/inline/lostInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/inline/lostInnerClass.kt"); } @TestMetadata("lostInnerClass2.kt") public void testLostInnerClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/inline/lostInnerClass2.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/inline/lostInnerClass2.kt"); } @TestMetadata("lostInnerClass3.kt") public void testLostInnerClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/inline/lostInnerClass3.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/inline/lostInnerClass3.kt"); } } @@ -629,6 +632,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerClass extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInnerClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -637,44 +644,42 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/innerClass/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/internal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/innerClass/visibility/internal.kt"); } @TestMetadata("internalClassObject.kt") public void testInternalClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/innerClass/visibility/internalClassObject.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/private.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/innerClass/visibility/private.kt"); } @TestMetadata("privateClassObject.kt") public void testPrivateClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/innerClass/visibility/privateClassObject.kt"); } @TestMetadata("public.kt") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/public.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/innerClass/visibility/public.kt"); } @TestMetadata("publicClassObject.kt") public void testPublicClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/innerClass/visibility/publicClassObject.kt"); } } } @@ -683,20 +688,22 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lambda extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaInInlineFunction.kt") public void testLambdaInInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/lambda/lambdaInInlineFunction.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/lambda/simpleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/lambda/simpleLambda.kt"); } } @@ -704,26 +711,27 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/lateinit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lateinitGetter.kt") public void testLateinitGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/lateinit/lateinitGetter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/lateinit/lateinitGetter.kt"); } @TestMetadata("lateinitProperty.kt") public void testLateinitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/lateinit/lateinitProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/lateinit/lateinitProperty.kt"); } @TestMetadata("lateinitPropertyNoSetter.kt") public void testLateinitPropertyNoSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/lateinit/lateinitPropertyNoSetter.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/lateinit/lateinitPropertyNoSetter.kt"); } } @@ -731,6 +739,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -739,6 +751,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -747,110 +763,97 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegatedProtectedVar.kt") public void testDelegatedProtectedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/delegatedProtectedVar.kt"); } @TestMetadata("delegatedPublicVal.kt") public void testDelegatedPublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/delegatedPublicVal.kt"); } @TestMetadata("internalVal.kt") public void testInternalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/internalVal.kt"); } @TestMetadata("internalVar.kt") public void testInternalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/internalVar.kt"); } @TestMetadata("internalVarPrivateSet.kt") public void testInternalVarPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/internalVarPrivateSet.kt"); } @TestMetadata("noBackingField.kt") public void testNoBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/noBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/noBackingField.kt"); } @TestMetadata("privateVal.kt") public void testPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/privateVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/privateVal.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/privateVar.kt"); } @TestMetadata("protectedVal.kt") public void testProtectedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/protectedVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/protectedVal.kt"); } @TestMetadata("protectedVarPrivateSet.kt") public void testProtectedVarPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/protectedVarPrivateSet.kt"); } @TestMetadata("publicVal.kt") public void testPublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicVal.kt"); } @TestMetadata("publicValNonDefault.kt") public void testPublicValNonDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicValNonDefault.kt"); } @TestMetadata("publicVar.kt") public void testPublicVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicVar.kt"); } @TestMetadata("publicVarNonDefault.kt") public void testPublicVarNonDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarNonDefault.kt"); } @TestMetadata("publicVarPrivateSet.kt") public void testPublicVarPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarPrivateSet.kt"); } @TestMetadata("publicVarProtectedSet.kt") public void testPublicVarProtectedSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarProtectedSet.kt"); } @TestMetadata("publicVarPublicSet.kt") public void testPublicVarPublicSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/class/publicVarPublicSet.kt"); } } @@ -858,32 +861,32 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rename extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRename() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/rename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructorAndClassObject.kt") public void testConstructorAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/rename/constructorAndClassObject.kt"); } @TestMetadata("delegatedAndDelegated.kt") public void testDelegatedAndDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/rename/delegatedAndDelegated.kt"); } @TestMetadata("delegatedAndProperty.kt") public void testDelegatedAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/rename/delegatedAndProperty.kt"); } @TestMetadata("propertyAndProperty.kt") public void testPropertyAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/rename/propertyAndProperty.kt"); } } @@ -891,128 +894,112 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/classObject/trait"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("delegatedProtectedVar.kt") public void testDelegatedProtectedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/delegatedProtectedVar.kt"); } @TestMetadata("delegatedPublicVal.kt") public void testDelegatedPublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/delegatedPublicVal.kt"); } @TestMetadata("internalConstVal.kt") public void testInternalConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/internalConstVal.kt"); } @TestMetadata("internalVal.kt") public void testInternalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/internalVal.kt"); } @TestMetadata("internalVar.kt") public void testInternalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/internalVar.kt"); } @TestMetadata("internalVarPrivateSet.kt") public void testInternalVarPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/internalVarPrivateSet.kt"); } @TestMetadata("noBackingField.kt") public void testNoBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/noBackingField.kt"); } @TestMetadata("privateVal.kt") public void testPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/privateVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/privateVal.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/privateVar.kt"); } @TestMetadata("protectedConstVal.kt") public void testProtectedConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/protectedConstVal.kt"); } @TestMetadata("protectedVal.kt") public void testProtectedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/protectedVal.kt"); } @TestMetadata("protectedVarPrivateSet.kt") public void testProtectedVarPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/protectedVarPrivateSet.kt"); } @TestMetadata("publicConstVal.kt") public void testPublicConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicConstVal.kt"); } @TestMetadata("publicVal.kt") public void testPublicVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVal.kt"); } @TestMetadata("publicValNonDefault.kt") public void testPublicValNonDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicValNonDefault.kt"); } @TestMetadata("publicVar.kt") public void testPublicVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVar.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVar.kt"); } @TestMetadata("publicVarNonDefault.kt") public void testPublicVarNonDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarNonDefault.kt"); } @TestMetadata("publicVarPrivateSet.kt") public void testPublicVarPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarPrivateSet.kt"); } @TestMetadata("publicVarProtectedSet.kt") public void testPublicVarProtectedSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarProtectedSet.kt"); } @TestMetadata("publicVarPublicSet.kt") public void testPublicVarPublicSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/classObject/trait/publicVarPublicSet.kt"); } } } @@ -1021,20 +1008,22 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedFlag extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecatedFlag() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/deprecatedFlag"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("propertyInClass.kt") public void testPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/deprecatedFlag/propertyInClass.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/deprecatedFlag/topLevelProperty.kt"); } } @@ -1042,26 +1031,27 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAnnotationsMethod extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticAnnotationsMethod() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("privateProperty.kt") public void testPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/privateProperty.kt"); } @TestMetadata("protectedProperty.kt") public void testProtectedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/protectedProperty.kt"); } @TestMetadata("publicProperty.kt") public void testPublicProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/syntheticAnnotationsMethod/publicProperty.kt"); } } @@ -1069,26 +1059,27 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/property/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/internal.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/visibility/internal.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/private.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/visibility/private.kt"); } @TestMetadata("public.kt") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/property/visibility/public.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/property/visibility/public.kt"); } } } @@ -1097,6 +1088,10 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1105,20 +1100,22 @@ public class WriteFlagsTestGenerated extends AbstractWriteFlagsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAnnotationsMethod extends AbstractWriteFlagsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticAnnotationsMethod() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("privateTypealias.kt") public void testPrivateTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/privateTypealias.kt"); } @TestMetadata("publicTypealias.kt") public void testPublicTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt"); - doTest(fileName); + runTest("compiler/testData/writeFlags/typealias/syntheticAnnotationsMethod/publicTypealias.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrOnlyBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrOnlyBoxCodegenTestGenerated.java index 7681913b7f8..bda5765c7be 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrOnlyBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrOnlyBoxCodegenTestGenerated.java @@ -21,106 +21,99 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrOnlyBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("classInitializers.kt") public void testClassInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/classInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/classInitializers.kt"); } @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/enumClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/enumClass.kt"); } @TestMetadata("enumClass2.kt") public void testEnumClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/enumClass2.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/enumClass2.kt"); } @TestMetadata("enumClass3.kt") public void testEnumClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/enumClass3.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/enumClass3.kt"); } @TestMetadata("fileClassInitializers.kt") public void testFileClassInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/fileClassInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/fileClassInitializers.kt"); } @TestMetadata("objectClass.kt") public void testObjectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/objectClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/objectClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/simple.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/simple.kt"); } @TestMetadata("compiler/testData/ir/box/closureConversion") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClosureConversion extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInClosureConversion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/box/closureConversion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("closureConversion1.kt") public void testClosureConversion1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/closureConversion1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/closureConversion1.kt"); } @TestMetadata("closureConversion2.kt") public void testClosureConversion2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/closureConversion2.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/closureConversion2.kt"); } @TestMetadata("closureConversion3.kt") public void testClosureConversion3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/closureConversion3.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/closureConversion3.kt"); } @TestMetadata("closureConversion4.kt") public void testClosureConversion4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/closureConversion4.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/closureConversion4.kt"); } @TestMetadata("innerClass1.kt") public void testInnerClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/innerClass1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/innerClass1.kt"); } @TestMetadata("innerClass2.kt") public void testInnerClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/innerClass2.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/innerClass2.kt"); } @TestMetadata("mutable1.kt") public void testMutable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/mutable1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/mutable1.kt"); } @TestMetadata("mutablePrimitives.kt") public void testMutablePrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/closureConversion/mutablePrimitives.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/closureConversion/mutablePrimitives.kt"); } } @@ -128,32 +121,32 @@ public class IrOnlyBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveNumberComparisons extends AbstractIrBlackBoxCodegenTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveNumberComparisons() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/box/primitiveNumberComparisons"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("comparableToDouble.kt") public void testComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/primitiveNumberComparisons/comparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/primitiveNumberComparisons/comparableToDouble.kt"); } @TestMetadata("doubleEqeq.kt") public void testDoubleEqeq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/primitiveNumberComparisons/doubleEqeq.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/primitiveNumberComparisons/doubleEqeq.kt"); } @TestMetadata("floatEqeq.kt") public void testFloatEqeq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/primitiveNumberComparisons/floatEqeq.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/primitiveNumberComparisons/floatEqeq.kt"); } @TestMetadata("mixedNumberTypes.kt") public void testMixedNumberTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/box/primitiveNumberComparisons/mixedNumberTypes.kt"); - doTest(fileName); + runTest("compiler/testData/ir/box/primitiveNumberComparisons/mixedNumberTypes.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/integration/AntTaskTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/integration/AntTaskTestGenerated.java index 8c91115e9ab..ea34fea4603 100644 --- a/compiler/tests/org/jetbrains/kotlin/integration/AntTaskTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/integration/AntTaskTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AntTaskTestGenerated extends AbstractAntTaskTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("additionalArguments") public void testAdditionalArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/additionalArguments/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/additionalArguments/"); } public void testAllFilesPresentInJvm() throws Exception { @@ -33,145 +36,121 @@ public class AntTaskTestGenerated extends AbstractAntTaskTest { @TestMetadata("doNotFailOnError") public void testDoNotFailOnError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/doNotFailOnError/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/doNotFailOnError/"); } @TestMetadata("failOnErrorByDefault") public void testFailOnErrorByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/failOnErrorByDefault/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/failOnErrorByDefault/"); } @TestMetadata("helloWorld") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/helloWorld/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/helloWorld/"); } @TestMetadata("internalMembers") public void testInternalMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/internalMembers/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/internalMembers/"); } @TestMetadata("jvmClasspath") public void testJvmClasspath() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/jvmClasspath/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/jvmClasspath/"); } @TestMetadata("kt11995") public void testKt11995() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/kt11995/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/kt11995/"); } @TestMetadata("languageVersion") public void testLanguageVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/languageVersion/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/languageVersion/"); } @TestMetadata("mainInFiles") public void testMainInFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/mainInFiles/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/mainInFiles/"); } @TestMetadata("moduleName") public void testModuleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleName/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/moduleName/"); } @TestMetadata("moduleNameDefault") public void testModuleNameDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleNameDefault/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/moduleNameDefault/"); } @TestMetadata("moduleNameWithKotlin") public void testModuleNameWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/moduleNameWithKotlin/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/moduleNameWithKotlin/"); } @TestMetadata("noReflectForJavac") public void testNoReflectForJavac() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/noReflectForJavac/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/noReflectForJavac/"); } @TestMetadata("noStdlibForJavac") public void testNoStdlibForJavac() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/noStdlibForJavac/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/noStdlibForJavac/"); } @TestMetadata("overloadResolutionOnCollectionLiteral") public void testOverloadResolutionOnCollectionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/overloadResolutionOnCollectionLiteral/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/overloadResolutionOnCollectionLiteral/"); } @TestMetadata("stdlibForJavacWithNoKotlin") public void testStdlibForJavacWithNoKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/stdlibForJavacWithNoKotlin/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/stdlibForJavacWithNoKotlin/"); } @TestMetadata("stdlibJre78AndStdlibJdk78") public void testStdlibJre78AndStdlibJdk78() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/stdlibJre78AndStdlibJdk78/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/stdlibJre78AndStdlibJdk78/"); } @TestMetadata("suppressWarnings") public void testSuppressWarnings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/suppressWarnings/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/suppressWarnings/"); } @TestMetadata("twoStdlibForCollectionLiterals") public void testTwoStdlibForCollectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/twoStdlibForCollectionLiterals/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/twoStdlibForCollectionLiterals/"); } @TestMetadata("valWithInvoke") public void testValWithInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/valWithInvoke/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/valWithInvoke/"); } @TestMetadata("verbose") public void testVerbose() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/verbose/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/verbose/"); } @TestMetadata("version") public void testVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/version/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/version/"); } @TestMetadata("withKotlinFork") public void testWithKotlinFork() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/withKotlinFork/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/withKotlinFork/"); } @TestMetadata("withKotlinNoJavaSources") public void testWithKotlinNoJavaSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/withKotlinNoJavaSources/"); } @TestMetadata("wrongCallForCollectionLiteral") public void testWrongCallForCollectionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/"); - doTest(fileName); + runTest("compiler/testData/integration/ant/jvm/wrongCallForCollectionLiteral/"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrCfgTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrCfgTestCaseGenerated.java index 7a8291d4b56..18d3ccf17b4 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrCfgTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrCfgTestCaseGenerated.java @@ -21,70 +21,69 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrCfgTestCaseGenerated extends AbstractIrCfgTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIrCfg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irCfg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("expressionFun.kt") public void testExpressionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/expressionFun.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/expressionFun.kt"); } @TestMetadata("expressionUnit.kt") public void testExpressionUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/expressionUnit.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/expressionUnit.kt"); } @TestMetadata("returnUnit.kt") public void testReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/returnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/returnUnit.kt"); } @TestMetadata("sequentialFun.kt") public void testSequentialFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/sequentialFun.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/sequentialFun.kt"); } @TestMetadata("simpleFun.kt") public void testSimpleFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/simpleFun.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/simpleFun.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/simpleReturn.kt"); } @TestMetadata("compiler/testData/ir/irCfg/loop") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Loop extends AbstractIrCfgTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLoop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irCfg/loop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("digitCount.kt") public void testDigitCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/loop/digitCount.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/loop/digitCount.kt"); } @TestMetadata("factorial.kt") public void testFactorial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/loop/factorial.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/loop/factorial.kt"); } @TestMetadata("isPerfect.kt") public void testIsPerfect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/loop/isPerfect.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/loop/isPerfect.kt"); } } @@ -92,38 +91,37 @@ public class IrCfgTestCaseGenerated extends AbstractIrCfgTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractIrCfgTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irCfg/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cascadeIf.kt") public void testCascadeIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/when/cascadeIf.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/when/cascadeIf.kt"); } @TestMetadata("emptyWhen.kt") public void testEmptyWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/when/emptyWhen.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/when/emptyWhen.kt"); } @TestMetadata("expressionIf.kt") public void testExpressionIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/when/expressionIf.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/when/expressionIf.kt"); } @TestMetadata("ifChain.kt") public void testIfChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/when/ifChain.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/when/ifChain.kt"); } @TestMetadata("whenReturn.kt") public void testWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irCfg/when/whenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irCfg/when/whenReturn.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrSourceRangesTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrSourceRangesTestCaseGenerated.java index fdf4ec2a757..43c61d7d741 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrSourceRangesTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrSourceRangesTestCaseGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrSourceRangesTestCaseGenerated extends AbstractIrSourceRangesTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceRanges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/sourceRanges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("augmentedAssignmentWithExpression.kt") public void testAugmentedAssignmentWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.kt"); - doTest(fileName); + runTest("compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.kt"); } @TestMetadata("kt17108.kt") public void testKt17108() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/sourceRanges/kt17108.kt"); - doTest(fileName); + runTest("compiler/testData/ir/sourceRanges/kt17108.kt"); } @TestMetadata("synthesizedDataClassMembers.kt") public void testSynthesizedDataClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/sourceRanges/synthesizedDataClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/sourceRanges/synthesizedDataClassMembers.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index d5b6c0f3708..4cf97526293 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIrText() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,10 +33,13 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractMembers.kt") public void testAbstractMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/abstractMembers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/abstractMembers.kt"); } public void testAllFilesPresentInClasses() throws Exception { @@ -41,188 +48,157 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestMetadata("annotationClasses.kt") public void testAnnotationClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/annotationClasses.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/annotationClasses.kt"); } @TestMetadata("argumentReorderingInDelegatingConstructorCall.kt") public void testArgumentReorderingInDelegatingConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/classMembers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/classMembers.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/classes.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/classes.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/companionObject.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/companionObject.kt"); } @TestMetadata("dataClassWithArrayMembers.kt") public void testDataClassWithArrayMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/dataClasses.kt"); } @TestMetadata("dataClassesGeneric.kt") public void testDataClassesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/dataClassesGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/dataClassesGeneric.kt"); } @TestMetadata("delegatedImplementation.kt") public void testDelegatedImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/delegatedImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/delegatedImplementation.kt"); } @TestMetadata("delegatedImplementationWithExplicitOverride.kt") public void testDelegatedImplementationWithExplicitOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.kt"); } @TestMetadata("delegatingConstructorCallToTypeAliasConstructor.kt") public void testDelegatingConstructorCallToTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.kt"); } @TestMetadata("delegatingConstructorCallsInSecondaryConstructors.kt") public void testDelegatingConstructorCallsInSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/enum.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/enum.kt"); } @TestMetadata("enumWithSecondaryCtor.kt") public void testEnumWithSecondaryCtor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/enumWithSecondaryCtor.kt"); } @TestMetadata("initBlock.kt") public void testInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/initBlock.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/initBlock.kt"); } @TestMetadata("initVal.kt") public void testInitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/initVal.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/initVal.kt"); } @TestMetadata("initVar.kt") public void testInitVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/initVar.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/initVar.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/innerClass.kt"); } @TestMetadata("innerClassWithDelegatingConstructor.kt") public void testInnerClassWithDelegatingConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/innerClassWithDelegatingConstructor.kt"); } @TestMetadata("lambdaInDataClassDefaultParameter.kt") public void testLambdaInDataClassDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/localClasses.kt"); } @TestMetadata("objectLiteralExpressions.kt") public void testObjectLiteralExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/objectLiteralExpressions.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/objectLiteralExpressions.kt"); } @TestMetadata("objectWithInitializers.kt") public void testObjectWithInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/objectWithInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/objectWithInitializers.kt"); } @TestMetadata("outerClassAccess.kt") public void testOuterClassAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/outerClassAccess.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/outerClassAccess.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/primaryConstructor.kt"); } @TestMetadata("primaryConstructorWithSuperConstructorCall.kt") public void testPrimaryConstructorWithSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.kt"); } @TestMetadata("qualifiedSuperCalls.kt") public void testQualifiedSuperCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/qualifiedSuperCalls.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/qualifiedSuperCalls.kt"); } @TestMetadata("sealedClasses.kt") public void testSealedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/sealedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/sealedClasses.kt"); } @TestMetadata("secondaryConstructorWithInitializersFromClassBody.kt") public void testSecondaryConstructorWithInitializersFromClassBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.kt"); } @TestMetadata("secondaryConstructors.kt") public void testSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/secondaryConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/secondaryConstructors.kt"); } @TestMetadata("superCalls.kt") public void testSuperCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/classes/superCalls.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/classes/superCalls.kt"); } } @@ -230,280 +206,244 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchParameterInTopLevelProperty.kt") public void testCatchParameterInTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/catchParameterInTopLevelProperty.kt"); } @TestMetadata("classLevelProperties.kt") public void testClassLevelProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/classLevelProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/classLevelProperties.kt"); } @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/defaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/defaultArguments.kt"); } @TestMetadata("delegatedProperties.kt") public void testDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/delegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/delegatedProperties.kt"); } @TestMetadata("extensionProperties.kt") public void testExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/extensionProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/extensionProperties.kt"); } @TestMetadata("fakeOverrides.kt") public void testFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/fakeOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/fakeOverrides.kt"); } @TestMetadata("fileWithAnnotations.kt") public void testFileWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/fileWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/fileWithAnnotations.kt"); } @TestMetadata("interfaceProperties.kt") public void testInterfaceProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/interfaceProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/interfaceProperties.kt"); } @TestMetadata("localClassWithOverrides.kt") public void testLocalClassWithOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/localClassWithOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/localClassWithOverrides.kt"); } @TestMetadata("localDelegatedProperties.kt") public void testLocalDelegatedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/localDelegatedProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/localDelegatedProperties.kt"); } @TestMetadata("localDelegatedPropertyWithSuspendOperators.kt") public void testLocalDelegatedPropertyWithSuspendOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/localDelegatedPropertyWithSuspendOperators.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/localDelegatedPropertyWithSuspendOperators.kt"); } @TestMetadata("localVarInDoWhile.kt") public void testLocalVarInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/localVarInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/localVarInDoWhile.kt"); } @TestMetadata("packageLevelProperties.kt") public void testPackageLevelProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/packageLevelProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/packageLevelProperties.kt"); } @TestMetadata("primaryCtorDefaultArguments.kt") public void testPrimaryCtorDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.kt"); } @TestMetadata("primaryCtorProperties.kt") public void testPrimaryCtorProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/primaryCtorProperties.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/primaryCtorProperties.kt"); } @TestMetadata("typeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/typeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/typeAlias.kt"); } @TestMetadata("compiler/testData/ir/irText/declarations/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/declarations/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationsInAnnotationArguments.kt") public void testAnnotationsInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsInAnnotationArguments.kt"); } @TestMetadata("annotationsWithDefaultParameterValues.kt") public void testAnnotationsWithDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.kt"); } @TestMetadata("annotationsWithVarargParameters.kt") public void testAnnotationsWithVarargParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.kt"); } @TestMetadata("arrayInAnnotationArguments.kt") public void testArrayInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.kt"); } @TestMetadata("classesWithAnnotations.kt") public void testClassesWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.kt"); } @TestMetadata("constExpressionsInAnnotationArguments.kt") public void testConstExpressionsInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/constExpressionsInAnnotationArguments.kt"); } @TestMetadata("constructorsWithAnnotations.kt") public void testConstructorsWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/constructorsWithAnnotations.kt"); } @TestMetadata("delegateFieldWithAnnotations.kt") public void testDelegateFieldWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/delegateFieldWithAnnotations.kt"); } @TestMetadata("delegatedPropertyAccessorsWithAnnotations.kt") public void testDelegatedPropertyAccessorsWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt"); } @TestMetadata("enumEntriesWithAnnotations.kt") public void testEnumEntriesWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.kt"); } @TestMetadata("enumsInAnnotationArguments.kt") public void testEnumsInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.kt"); } @TestMetadata("fieldsWithAnnotations.kt") public void testFieldsWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.kt"); } @TestMetadata("fileAnnotations.kt") public void testFileAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/fileAnnotations.kt"); } @TestMetadata("functionsWithAnnotations.kt") public void testFunctionsWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/functionsWithAnnotations.kt"); } @TestMetadata("localDelegatedPropertiesWithAnnotations.kt") public void testLocalDelegatedPropertiesWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.kt"); } @TestMetadata("multipleAnnotationsInSquareBrackets.kt") public void testMultipleAnnotationsInSquareBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/multipleAnnotationsInSquareBrackets.kt"); } @TestMetadata("primaryConstructorParameterWithAnnotations.kt") public void testPrimaryConstructorParameterWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/primaryConstructorParameterWithAnnotations.kt"); } @TestMetadata("propertiesWithAnnotations.kt") public void testPropertiesWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.kt"); } @TestMetadata("propertyAccessorsFromClassHeaderWithAnnotations.kt") public void testPropertyAccessorsFromClassHeaderWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.kt"); } @TestMetadata("propertyAccessorsWithAnnotations.kt") public void testPropertyAccessorsWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.kt"); } @TestMetadata("propertySetterParameterWithAnnotations.kt") public void testPropertySetterParameterWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/propertySetterParameterWithAnnotations.kt"); } @TestMetadata("receiverParameterWithAnnotations.kt") public void testReceiverParameterWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.kt"); } @TestMetadata("spreadOperatorInAnnotationArguments.kt") public void testSpreadOperatorInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.kt"); } @TestMetadata("typeAliasesWithAnnotations.kt") public void testTypeAliasesWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.kt"); } @TestMetadata("typeParametersWithAnnotations.kt") public void testTypeParametersWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/typeParametersWithAnnotations.kt"); } @TestMetadata("valueParametersWithAnnotations.kt") public void testValueParametersWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.kt"); } @TestMetadata("varargsInAnnotationArguments.kt") public void testVarargsInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.kt"); } @TestMetadata("variablesWithAnnotations.kt") public void testVariablesWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.kt"); } } @@ -511,26 +451,27 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/declarations/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("expectClassInherited.kt") public void testExpectClassInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectClassInherited.kt"); } @TestMetadata("expectedEnumClass.kt") public void testExpectedEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass.kt"); } @TestMetadata("expectedSealedClass.kt") public void testExpectedSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/multiplatform/expectedSealedClass.kt"); } } @@ -538,80 +479,72 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/declarations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/class.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/class.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/constructor.kt"); } @TestMetadata("dataClassMembers.kt") public void testDataClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt"); } @TestMetadata("defaultPropertyAccessors.kt") public void testDefaultPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/defaultPropertyAccessors.kt"); } @TestMetadata("delegatedMembers.kt") public void testDelegatedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/delegatedMembers.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/fun.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/fun.kt"); } @TestMetadata("genericInnerClass.kt") public void testGenericInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/genericInnerClass.kt"); } @TestMetadata("lambdas.kt") public void testLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/lambdas.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/lambdas.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/localFun.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/localFun.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/propertyAccessors.kt"); } @TestMetadata("typeParameterBeforeBound.kt") public void testTypeParameterBeforeBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/typeParameterBeforeBound.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/typeParameterBeforeBound.kt"); } @TestMetadata("typeParameterBoundedBySubclass.kt") public void testTypeParameterBoundedBySubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/parameters/typeParameterBoundedBySubclass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/parameters/typeParameterBoundedBySubclass.kt"); } } @@ -619,44 +552,42 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/declarations/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentReceivers.kt") public void testDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/local.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/provideDelegate/local.kt"); } @TestMetadata("localDifferentReceivers.kt") public void testLocalDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/member.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/provideDelegate/member.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt"); } } } @@ -665,20 +596,22 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Errors extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErrors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/errors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("suppressedNonPublicCall.kt") public void testSuppressedNonPublicCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/errors/suppressedNonPublicCall.kt"); } @TestMetadata("unresolvedReference.kt") public void testUnresolvedReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/errors/unresolvedReference.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/errors/unresolvedReference.kt"); } } @@ -686,664 +619,564 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentMappedWithError.kt") public void testArgumentMappedWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/argumentMappedWithError.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/argumentMappedWithError.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/arrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/arrayAccess.kt"); } @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/arrayAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/arrayAssignment.kt"); } @TestMetadata("arrayAugmentedAssignment1.kt") public void testArrayAugmentedAssignment1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt"); } @TestMetadata("arrayAugmentedAssignment2.kt") public void testArrayAugmentedAssignment2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt"); } @TestMetadata("assignments.kt") public void testAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/assignments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/assignments.kt"); } @TestMetadata("augmentedAssignment1.kt") public void testAugmentedAssignment1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/augmentedAssignment1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/augmentedAssignment1.kt"); } @TestMetadata("augmentedAssignment2.kt") public void testAugmentedAssignment2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/augmentedAssignment2.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/augmentedAssignment2.kt"); } @TestMetadata("augmentedAssignmentWithExpression.kt") public void testAugmentedAssignmentWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt"); } @TestMetadata("badBreakContinue.kt") public void testBadBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/badBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/badBreakContinue.kt"); } @TestMetadata("bangbang.kt") public void testBangbang() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/bangbang.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/bangbang.kt"); } @TestMetadata("booleanConstsInAndAndOrOr.kt") public void testBooleanConstsInAndAndOrOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/booleanConstsInAndAndOrOr.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/booleanConstsInAndAndOrOr.kt"); } @TestMetadata("booleanOperators.kt") public void testBooleanOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/booleanOperators.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/booleanOperators.kt"); } @TestMetadata("boundCallableReferences.kt") public void testBoundCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/boundCallableReferences.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/boundCallableReferences.kt"); } @TestMetadata("boxOk.kt") public void testBoxOk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/boxOk.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/boxOk.kt"); } @TestMetadata("breakContinue.kt") public void testBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/breakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/breakContinue.kt"); } @TestMetadata("breakContinueInLoopHeader.kt") public void testBreakContinueInLoopHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt"); } @TestMetadata("callWithReorderedArguments.kt") public void testCallWithReorderedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt"); } @TestMetadata("callableRefToGenericMember.kt") public void testCallableRefToGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/callableRefToGenericMember.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/callableRefToGenericMember.kt"); } @TestMetadata("callableReferenceToImportedFromObject.kt") public void testCallableReferenceToImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.kt"); } @TestMetadata("calls.kt") public void testCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/calls.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/calls.kt"); } @TestMetadata("castToTypeParameter.kt") public void testCastToTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/castToTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/castToTypeParameter.kt"); } @TestMetadata("catchParameterAccess.kt") public void testCatchParameterAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/catchParameterAccess.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/catchParameterAccess.kt"); } @TestMetadata("chainOfSafeCalls.kt") public void testChainOfSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/classReference.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/classReference.kt"); } @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/coercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/coercionToUnit.kt"); } @TestMetadata("complexAugmentedAssignment.kt") public void testComplexAugmentedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt"); } @TestMetadata("contructorCall.kt") public void testContructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/contructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/contructorCall.kt"); } @TestMetadata("conventionComparisons.kt") public void testConventionComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/conventionComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/conventionComparisons.kt"); } @TestMetadata("destructuring1.kt") public void testDestructuring1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/destructuring1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/destructuring1.kt"); } @TestMetadata("destructuringWithUnderscore.kt") public void testDestructuringWithUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt"); } @TestMetadata("dotQualified.kt") public void testDotQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/dotQualified.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/dotQualified.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/elvis.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/elvis.kt"); } @TestMetadata("enumEntryAsReceiver.kt") public void testEnumEntryAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/enumEntryAsReceiver.kt"); } @TestMetadata("equality.kt") public void testEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/equality.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/equality.kt"); } @TestMetadata("extFunInvokeAsFun.kt") public void testExtFunInvokeAsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/extFunInvokeAsFun.kt"); } @TestMetadata("extFunSafeInvoke.kt") public void testExtFunSafeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt"); } @TestMetadata("extensionPropertyGetterCall.kt") public void testExtensionPropertyGetterCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/field.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/field.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/for.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/for.kt"); } @TestMetadata("forWithBreakContinue.kt") public void testForWithBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/forWithBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/forWithBreakContinue.kt"); } @TestMetadata("forWithImplicitReceivers.kt") public void testForWithImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt"); } @TestMetadata("funImportedFromObject.kt") public void testFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/funImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/funImportedFromObject.kt"); } @TestMetadata("genericPropertyCall.kt") public void testGenericPropertyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/genericPropertyCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/genericPropertyCall.kt"); } @TestMetadata("identity.kt") public void testIdentity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/identity.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/identity.kt"); } @TestMetadata("ifElseIf.kt") public void testIfElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/ifElseIf.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/ifElseIf.kt"); } @TestMetadata("implicitCastOnPlatformType.kt") public void testImplicitCastOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.kt"); } @TestMetadata("implicitCastToTypeParameter.kt") public void testImplicitCastToTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/implicitCastToTypeParameter.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/in.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/in.kt"); } @TestMetadata("incrementDecrement.kt") public void testIncrementDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/incrementDecrement.kt"); } @TestMetadata("interfaceThisRef.kt") public void testInterfaceThisRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/interfaceThisRef.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/interfaceThisRef.kt"); } @TestMetadata("jvmInstanceFieldReference.kt") public void testJvmInstanceFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.kt"); } @TestMetadata("jvmStaticFieldReference.kt") public void testJvmStaticFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/jvmStaticFieldReference.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/jvmStaticFieldReference.kt"); } @TestMetadata("kt16904.kt") public void testKt16904() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/kt16904.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/kt16904.kt"); } @TestMetadata("kt16905.kt") public void testKt16905() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/kt16905.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/kt16905.kt"); } @TestMetadata("kt23030.kt") public void testKt23030() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/kt23030.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/kt23030.kt"); } @TestMetadata("lambdaInCAO.kt") public void testLambdaInCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/lambdaInCAO.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/lambdaInCAO.kt"); } @TestMetadata("literals.kt") public void testLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/literals.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/literals.kt"); } @TestMetadata("memberTypeArguments.kt") public void testMemberTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/memberTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/memberTypeArguments.kt"); } @TestMetadata("membersImportedFromObject.kt") public void testMembersImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/membersImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/membersImportedFromObject.kt"); } @TestMetadata("multipleThisReferences.kt") public void testMultipleThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/multipleThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/multipleThisReferences.kt"); } @TestMetadata("objectAsCallable.kt") public void testObjectAsCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/objectAsCallable.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/objectAsCallable.kt"); } @TestMetadata("objectClassReference.kt") public void testObjectClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/objectClassReference.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/objectClassReference.kt"); } @TestMetadata("outerClassInstanceReference.kt") public void testOuterClassInstanceReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/outerClassInstanceReference.kt"); } @TestMetadata("primitiveComparisons.kt") public void testPrimitiveComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/primitiveComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/primitiveComparisons.kt"); } @TestMetadata("primitivesImplicitConversions.kt") public void testPrimitivesImplicitConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/primitivesImplicitConversions.kt"); } @TestMetadata("references.kt") public void testReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/references.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/references.kt"); } @TestMetadata("reflectionLiterals.kt") public void testReflectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/reflectionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/reflectionLiterals.kt"); } @TestMetadata("safeAssignment.kt") public void testSafeAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/safeAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/safeAssignment.kt"); } @TestMetadata("safeCallWithIncrementDecrement.kt") public void testSafeCallWithIncrementDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt"); } @TestMetadata("safeCalls.kt") public void testSafeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/safeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/safeCalls.kt"); } @TestMetadata("setFieldWithImplicitCast.kt") public void testSetFieldWithImplicitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.kt"); } @TestMetadata("simpleOperators.kt") public void testSimpleOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/simpleOperators.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/simpleOperators.kt"); } @TestMetadata("simpleUnaryOperators.kt") public void testSimpleUnaryOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/simpleUnaryOperators.kt"); } @TestMetadata("smartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/smartCasts.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/smartCasts.kt"); } @TestMetadata("smartCastsWithDestructuring.kt") public void testSmartCastsWithDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt"); } @TestMetadata("specializedTypeAliasConstructorCall.kt") public void testSpecializedTypeAliasConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt"); } @TestMetadata("stringComparisons.kt") public void testStringComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/stringComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/stringComparisons.kt"); } @TestMetadata("stringPlus.kt") public void testStringPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/stringPlus.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/stringPlus.kt"); } @TestMetadata("stringTemplates.kt") public void testStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/stringTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/stringTemplates.kt"); } @TestMetadata("thisOfGenericOuterClass.kt") public void testThisOfGenericOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/throw.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/throw.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/tryCatch.kt"); } @TestMetadata("tryCatchWithImplicitCast.kt") public void testTryCatchWithImplicitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/typeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/typeArguments.kt"); } @TestMetadata("typeOperators.kt") public void testTypeOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/typeOperators.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/typeOperators.kt"); } @TestMetadata("typeParameterClassLiteral.kt") public void testTypeParameterClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/typeParameterClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/typeParameterClassLiteral.kt"); } @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/useImportedMember.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/useImportedMember.kt"); } @TestMetadata("values.kt") public void testValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/values.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/values.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/vararg.kt"); } @TestMetadata("varargWithImplicitCast.kt") public void testVarargWithImplicitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/varargWithImplicitCast.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/varargWithImplicitCast.kt"); } @TestMetadata("variableAsFunctionCall.kt") public void testVariableAsFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/when.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/when.kt"); } @TestMetadata("whenCoercedToUnit.kt") public void testWhenCoercedToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt"); } @TestMetadata("whenElse.kt") public void testWhenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/whenElse.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/whenElse.kt"); } @TestMetadata("whenReturn.kt") public void testWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/whenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/whenReturn.kt"); } @TestMetadata("whileDoWhile.kt") public void testWhileDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/whileDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/whileDoWhile.kt"); } @TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FloatingPointComparisons extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFloatingPointComparisons() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/expressions/floatingPointComparisons"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("comparableWithDoubleOrFloat.kt") public void testComparableWithDoubleOrFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/comparableWithDoubleOrFloat.kt"); } @TestMetadata("eqeqRhsConditionPossiblyAffectingLhs.kt") public void testEqeqRhsConditionPossiblyAffectingLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.kt"); } @TestMetadata("floatingPointCompareTo.kt") public void testFloatingPointCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.kt"); } @TestMetadata("floatingPointEqeq.kt") public void testFloatingPointEqeq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEqeq.kt"); } @TestMetadata("floatingPointEquals.kt") public void testFloatingPointEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointEquals.kt"); } @TestMetadata("floatingPointExcleq.kt") public void testFloatingPointExcleq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointExcleq.kt"); } @TestMetadata("floatingPointLess.kt") public void testFloatingPointLess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointLess.kt"); } @TestMetadata("nullableAnyAsIntToDouble.kt") public void testNullableAnyAsIntToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableAnyAsIntToDouble.kt"); } @TestMetadata("nullableFloatingPointEqeq.kt") public void testNullableFloatingPointEqeq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt"); } @TestMetadata("typeParameterWithPrimitiveNumericSupertype.kt") public void testTypeParameterWithPrimitiveNumericSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/typeParameterWithPrimitiveNumericSupertype.kt"); } @TestMetadata("whenByFloatingPoint.kt") public void testWhenByFloatingPoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt"); } } } @@ -1352,56 +1185,52 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lambdas extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdas() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/lambdas"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousFunction.kt") public void testAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/anonymousFunction.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/anonymousFunction.kt"); } @TestMetadata("destructuringInLambda.kt") public void testDestructuringInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/destructuringInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/destructuringInLambda.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/extensionLambda.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/extensionLambda.kt"); } @TestMetadata("justLambda.kt") public void testJustLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/justLambda.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/justLambda.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/localFunction.kt"); } @TestMetadata("multipleImplicitReceivers.kt") public void testMultipleImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/nonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/nonLocalReturn.kt"); } @TestMetadata("samAdapter.kt") public void testSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/lambdas/samAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/lambdas/samAdapter.kt"); } } @@ -1409,40 +1238,44 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("coercionInLoop.kt") public void testCoercionInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/regressions/coercionInLoop.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/regressions/coercionInLoop.kt"); } @TestMetadata("integerCoercionToT.kt") public void testIntegerCoercionToT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/regressions/integerCoercionToT.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/regressions/integerCoercionToT.kt"); } @TestMetadata("typeAliasCtorForGenericClass.kt") public void testTypeAliasCtorForGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt"); } @TestMetadata("compiler/testData/ir/irText/regressions/newInference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NewInference extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/regressions/newInference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fixationOrder1.kt") public void testFixationOrder1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/regressions/newInference/fixationOrder1.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/regressions/newInference/fixationOrder1.kt"); } } } @@ -1451,26 +1284,27 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Singletons extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSingletons() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/singletons"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/singletons/companion.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/singletons/companion.kt"); } @TestMetadata("enumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/singletons/enumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/singletons/enumEntry.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/singletons/object.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/singletons/object.kt"); } } @@ -1478,56 +1312,52 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Stubs extends AbstractIrTextTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStubs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irText/stubs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builtinMap.kt") public void testBuiltinMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/builtinMap.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/builtinMap.kt"); } @TestMetadata("javaEnum.kt") public void testJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaEnum.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/javaEnum.kt"); } @TestMetadata("javaInnerClass.kt") public void testJavaInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/javaInnerClass.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaMethod.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/javaMethod.kt"); } @TestMetadata("javaNestedClass.kt") public void testJavaNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/javaNestedClass.kt"); } @TestMetadata("javaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/javaStaticMethod.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/javaStaticMethod.kt"); } @TestMetadata("kotlinInnerClass.kt") public void testKotlinInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/kotlinInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/kotlinInnerClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/ir/irText/stubs/simple.kt"); - doTest(fileName); + runTest("compiler/testData/ir/irText/stubs/simple.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileJavaAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileJavaAgainstKotlinTestGenerated.java index 3006b08b5ff..c445351dad5 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileJavaAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileJavaAgainstKotlinTestGenerated.java @@ -23,6 +23,10 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithoutJavac extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithoutJavac() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -31,14 +35,17 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("GenericSignature.kt") public void testGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/callableReference/GenericSignature.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/callableReference/GenericSignature.kt"); } } @@ -46,86 +53,77 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt"); } @TestMetadata("DefaultConstructor.kt") public void testDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt"); } @TestMetadata("DefaultConstructorWithTwoArgs.kt") public void testDefaultConstructorWithTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructorWithTwoArgs.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructorWithTwoArgs.kt"); } @TestMetadata("ExtendsAbstractListT.kt") public void testExtendsAbstractListT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.kt"); } @TestMetadata("ImplementsListString.kt") public void testImplementsListString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.kt"); } @TestMetadata("ImplementsMapPP.kt") public void testImplementsMapPP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClass.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/InnerClass.kt"); } @TestMetadata("InnerClassConstructors.kt") public void testInnerClassConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassConstructors.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/InnerClassConstructors.kt"); } @TestMetadata("InnerClassOfGeneric.kt") public void testInnerClassOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassOfGeneric.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/InnerClassOfGeneric.kt"); } @TestMetadata("kt3561.kt") public void testKt3561() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt3561.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/kt3561.kt"); } @TestMetadata("kt4050.kt") public void testKt4050() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt4050.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/kt4050.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/Simple.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/Simple.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/StarProjection.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/StarProjection.kt"); } } @@ -133,14 +131,17 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultArgumentInEnumConstructor.kt") public void testDefaultArgumentInEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/enum/DefaultArgumentInEnumConstructor.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/enum/DefaultArgumentInEnumConstructor.kt"); } } @@ -148,32 +149,32 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleCompanionObject.kt") public void testSimpleCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObject.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObject.kt"); } @TestMetadata("simpleCompanionObjectProperty.kt") public void testSimpleCompanionObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObjectProperty.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObjectProperty.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObject.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObject.kt"); } @TestMetadata("simpleObjectProperty.kt") public void testSimpleObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObjectProperty.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObjectProperty.kt"); } } @@ -181,10 +182,13 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Method extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AccessorGenericSignature.kt") public void testAccessorGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/AccessorGenericSignature.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/AccessorGenericSignature.kt"); } public void testAllFilesPresentInMethod() throws Exception { @@ -193,148 +197,129 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Any.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Any.kt"); } @TestMetadata("ArrayOfIntArray.kt") public void testArrayOfIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntArray.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntArray.kt"); } @TestMetadata("ArrayOfIntegerArray.kt") public void testArrayOfIntegerArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt"); } @TestMetadata("ClashingSignaturesWithoutReturnType.kt") public void testClashingSignaturesWithoutReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ClashingSignaturesWithoutReturnType.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ClashingSignaturesWithoutReturnType.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt"); } @TestMetadata("Extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt"); } @TestMetadata("GenericArray.kt") public void testGenericArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt"); } @TestMetadata("Hello.kt") public void testHello() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Hello.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Hello.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Int.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntArray.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/IntArray.kt"); } @TestMetadata("IntWithDefault.kt") public void testIntWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntWithDefault.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/IntWithDefault.kt"); } @TestMetadata("IntegerArray.kt") public void testIntegerArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntegerArray.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/IntegerArray.kt"); } @TestMetadata("ListOfInt.kt") public void testListOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt"); } @TestMetadata("ListOfT.kt") public void testListOfT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt"); } @TestMetadata("MapOfKString.kt") public void testMapOfKString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt"); } @TestMetadata("MapOfStringIntQ.kt") public void testMapOfStringIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt"); } @TestMetadata("QExtendsListString.kt") public void testQExtendsListString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt"); } @TestMetadata("QExtendsString.kt") public void testQExtendsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt"); } @TestMetadata("TraitImpl.kt") public void testTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt"); } @TestMetadata("Vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt"); } @TestMetadata("Void.kt") public void testVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Void.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Void.kt"); } @TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/platformName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PlatformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt"); } } @@ -342,74 +327,67 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveOverride extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ByteOverridesObject.kt") public void testByteOverridesObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt"); } @TestMetadata("CallFinalNotInSubclass.kt") public void testCallFinalNotInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt"); } @TestMetadata("CallNotInSubclass.kt") public void testCallNotInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt"); } @TestMetadata("CovariantReturnTypeOverride.kt") public void testCovariantReturnTypeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt"); } @TestMetadata("FinalOverride.kt") public void testFinalOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt"); } @TestMetadata("IntOverridesComparable.kt") public void testIntOverridesComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt"); } @TestMetadata("IntOverridesNumber.kt") public void testIntOverridesNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt"); } @TestMetadata("IntOverridesObject.kt") public void testIntOverridesObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt"); } @TestMetadata("ManyClassesHierarchy.kt") public void testManyClassesHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt"); } @TestMetadata("NullableIntOverridesObject.kt") public void testNullableIntOverridesObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt"); } @TestMetadata("OverrideInJava.kt") public void testOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt"); } } @@ -417,50 +395,47 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Throws extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThrows() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/throws"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/ClassMembers.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/ClassMembers.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt"); } @TestMetadata("DefaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt"); } @TestMetadata("GenericSubstitution.kt") public void testGenericSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TopLevel.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/TopLevel.kt"); } @TestMetadata("TraitMembers.kt") public void testTraitMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt"); } } } @@ -469,40 +444,44 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstVal.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/ConstVal.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/ConstVal.kt"); } @TestMetadata("Extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt"); } @TestMetadata("GenericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt"); } @TestMetadata("compiler/testData/compileJavaAgainstKotlin/property/platformName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property/platformName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PlatformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt"); } } } @@ -511,20 +490,22 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Derived.kt") public void testDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Derived.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/sealed/Derived.kt"); } @TestMetadata("Instance.kt") public void testInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Instance.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/sealed/Instance.kt"); } } @@ -532,38 +513,37 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticFields extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/staticFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt"); } @TestMetadata("AnnotationTrait.kt") public void testAnnotationTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt"); } @TestMetadata("kt3698.kt") public void testKt3698() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt"); } @TestMetadata("staticClassProperty.kt") public void testStaticClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt"); } @TestMetadata("staticTraitProperty.kt") public void testStaticTraitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt"); } } @@ -571,86 +551,77 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Targets extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithoutJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargets() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/targets"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/annotation.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/annotation.kt"); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/base.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/base.kt"); } @TestMetadata("classifier.kt") public void testClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/classifier.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/classifier.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/constructor.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/constructor.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/empty.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/empty.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/field.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/field.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/function.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/function.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/getter.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/getter.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/local.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/local.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/multiple.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/multiple.kt"); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/parameter.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/parameter.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/property.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/property.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/setter.kt"); - doTestWithoutJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/setter.kt"); } } } @@ -659,6 +630,10 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithJavac extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithJavac() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -667,14 +642,17 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("GenericSignature.kt") public void testGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/callableReference/GenericSignature.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/callableReference/GenericSignature.kt"); } } @@ -682,86 +660,77 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ClassObject.kt"); } @TestMetadata("DefaultConstructor.kt") public void testDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructor.kt"); } @TestMetadata("DefaultConstructorWithTwoArgs.kt") public void testDefaultConstructorWithTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructorWithTwoArgs.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/DefaultConstructorWithTwoArgs.kt"); } @TestMetadata("ExtendsAbstractListT.kt") public void testExtendsAbstractListT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.kt"); } @TestMetadata("ImplementsListString.kt") public void testImplementsListString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.kt"); } @TestMetadata("ImplementsMapPP.kt") public void testImplementsMapPP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/ImplementsMapPP.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClass.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/InnerClass.kt"); } @TestMetadata("InnerClassConstructors.kt") public void testInnerClassConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassConstructors.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/InnerClassConstructors.kt"); } @TestMetadata("InnerClassOfGeneric.kt") public void testInnerClassOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/InnerClassOfGeneric.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/InnerClassOfGeneric.kt"); } @TestMetadata("kt3561.kt") public void testKt3561() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt3561.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/kt3561.kt"); } @TestMetadata("kt4050.kt") public void testKt4050() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/kt4050.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/kt4050.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/Simple.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/Simple.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/class/StarProjection.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/class/StarProjection.kt"); } } @@ -769,14 +738,17 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultArgumentInEnumConstructor.kt") public void testDefaultArgumentInEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/enum/DefaultArgumentInEnumConstructor.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/enum/DefaultArgumentInEnumConstructor.kt"); } } @@ -784,32 +756,32 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simpleCompanionObject.kt") public void testSimpleCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObject.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObject.kt"); } @TestMetadata("simpleCompanionObjectProperty.kt") public void testSimpleCompanionObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObjectProperty.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleCompanionObjectProperty.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObject.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObject.kt"); } @TestMetadata("simpleObjectProperty.kt") public void testSimpleObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObjectProperty.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/jvmStatic/simpleObjectProperty.kt"); } } @@ -817,10 +789,13 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Method extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AccessorGenericSignature.kt") public void testAccessorGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/AccessorGenericSignature.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/AccessorGenericSignature.kt"); } public void testAllFilesPresentInMethod() throws Exception { @@ -829,148 +804,129 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Any.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Any.kt"); } @TestMetadata("ArrayOfIntArray.kt") public void testArrayOfIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntArray.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntArray.kt"); } @TestMetadata("ArrayOfIntegerArray.kt") public void testArrayOfIntegerArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ArrayOfIntegerArray.kt"); } @TestMetadata("ClashingSignaturesWithoutReturnType.kt") public void testClashingSignaturesWithoutReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ClashingSignaturesWithoutReturnType.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ClashingSignaturesWithoutReturnType.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Delegation.kt"); } @TestMetadata("Extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Extensions.kt"); } @TestMetadata("GenericArray.kt") public void testGenericArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/GenericArray.kt"); } @TestMetadata("Hello.kt") public void testHello() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Hello.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Hello.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Int.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntArray.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/IntArray.kt"); } @TestMetadata("IntWithDefault.kt") public void testIntWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntWithDefault.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/IntWithDefault.kt"); } @TestMetadata("IntegerArray.kt") public void testIntegerArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/IntegerArray.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/IntegerArray.kt"); } @TestMetadata("ListOfInt.kt") public void testListOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ListOfInt.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ListOfString.kt"); } @TestMetadata("ListOfT.kt") public void testListOfT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/ListOfT.kt"); } @TestMetadata("MapOfKString.kt") public void testMapOfKString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/MapOfKString.kt"); } @TestMetadata("MapOfStringIntQ.kt") public void testMapOfStringIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/MapOfStringIntQ.kt"); } @TestMetadata("QExtendsListString.kt") public void testQExtendsListString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/QExtendsListString.kt"); } @TestMetadata("QExtendsString.kt") public void testQExtendsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/QExtendsString.kt"); } @TestMetadata("TraitImpl.kt") public void testTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/TraitImpl.kt"); } @TestMetadata("Vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Vararg.kt"); } @TestMetadata("Void.kt") public void testVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/Void.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/Void.kt"); } @TestMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/platformName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PlatformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/platformName/PlatformName.kt"); } } @@ -978,74 +934,67 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveOverride extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ByteOverridesObject.kt") public void testByteOverridesObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ByteOverridesObject.kt"); } @TestMetadata("CallFinalNotInSubclass.kt") public void testCallFinalNotInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallFinalNotInSubclass.kt"); } @TestMetadata("CallNotInSubclass.kt") public void testCallNotInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CallNotInSubclass.kt"); } @TestMetadata("CovariantReturnTypeOverride.kt") public void testCovariantReturnTypeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/CovariantReturnTypeOverride.kt"); } @TestMetadata("FinalOverride.kt") public void testFinalOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/FinalOverride.kt"); } @TestMetadata("IntOverridesComparable.kt") public void testIntOverridesComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesComparable.kt"); } @TestMetadata("IntOverridesNumber.kt") public void testIntOverridesNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesNumber.kt"); } @TestMetadata("IntOverridesObject.kt") public void testIntOverridesObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/IntOverridesObject.kt"); } @TestMetadata("ManyClassesHierarchy.kt") public void testManyClassesHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/ManyClassesHierarchy.kt"); } @TestMetadata("NullableIntOverridesObject.kt") public void testNullableIntOverridesObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/NullableIntOverridesObject.kt"); } @TestMetadata("OverrideInJava.kt") public void testOverrideInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/primitiveOverride/OverrideInJava.kt"); } } @@ -1053,50 +1002,47 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Throws extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThrows() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/method/throws"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/ClassMembers.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/ClassMembers.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/Constructor.kt"); } @TestMetadata("DefaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/DefaultArgs.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/Delegation.kt"); } @TestMetadata("GenericSubstitution.kt") public void testGenericSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/GenericSubstitution.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TopLevel.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/TopLevel.kt"); } @TestMetadata("TraitMembers.kt") public void testTraitMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/method/throws/TraitMembers.kt"); } } } @@ -1105,40 +1051,44 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstVal.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/ConstVal.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/ConstVal.kt"); } @TestMetadata("Extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/Extensions.kt"); } @TestMetadata("GenericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/GenericProperty.kt"); } @TestMetadata("compiler/testData/compileJavaAgainstKotlin/property/platformName") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformName extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/property/platformName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PlatformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/property/platformName/PlatformName.kt"); } } } @@ -1147,20 +1097,22 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Derived.kt") public void testDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Derived.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/sealed/Derived.kt"); } @TestMetadata("Instance.kt") public void testInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/sealed/Instance.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/sealed/Instance.kt"); } } @@ -1168,38 +1120,37 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticFields extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/staticFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationClass.kt"); } @TestMetadata("AnnotationTrait.kt") public void testAnnotationTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/AnnotationTrait.kt"); } @TestMetadata("kt3698.kt") public void testKt3698() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/kt3698.kt"); } @TestMetadata("staticClassProperty.kt") public void testStaticClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/staticClassProperty.kt"); } @TestMetadata("staticTraitProperty.kt") public void testStaticTraitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/staticFields/staticTraitProperty.kt"); } } @@ -1207,86 +1158,77 @@ public class CompileJavaAgainstKotlinTestGenerated extends AbstractCompileJavaAg @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Targets extends AbstractCompileJavaAgainstKotlinTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJavac, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargets() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/compileJavaAgainstKotlin/targets"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/annotation.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/annotation.kt"); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/base.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/base.kt"); } @TestMetadata("classifier.kt") public void testClassifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/classifier.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/classifier.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/constructor.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/constructor.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/empty.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/empty.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/field.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/field.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/function.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/function.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/getter.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/getter.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/local.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/local.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/multiple.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/multiple.kt"); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/parameter.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/parameter.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/property.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/property.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileJavaAgainstKotlin/targets/setter.kt"); - doTestWithJavac(fileName); + runTest("compiler/testData/compileJavaAgainstKotlin/targets/setter.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstJavaTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstJavaTestGenerated.java index 61ed67adc13..c5637e2078f 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/CompileKotlinAgainstJavaTestGenerated.java @@ -21,16 +21,18 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlinAgainstJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractClass.kt") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/AbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/AbstractClass.kt"); } @TestMetadata("AbstractEnum.kt") public void testAbstractEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/AbstractEnum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/AbstractEnum.kt"); } public void testAllFilesPresentInCompileKotlinAgainstJava() throws Exception { @@ -39,313 +41,261 @@ public class CompileKotlinAgainstJavaTestGenerated extends AbstractCompileKotlin @TestMetadata("AnnotationWithArguments.kt") public void testAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/AnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithArguments.kt"); } @TestMetadata("AnnotationWithField.kt") public void testAnnotationWithField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/AnnotationWithField.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/AnnotationWithField.kt"); } @TestMetadata("AsteriskInImport.kt") public void testAsteriskInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/AsteriskInImport.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/AsteriskInImport.kt"); } @TestMetadata("CheckKotlinStub.kt") public void testCheckKotlinStub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/CheckKotlinStub.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/CheckKotlinStub.kt"); } @TestMetadata("CheckNotNull.kt") public void testCheckNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/CheckNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/CheckNotNull.kt"); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Class.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Class.kt"); } @TestMetadata("ClassWithNestedEnum.kt") public void testClassWithNestedEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ClassWithNestedEnum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ClassWithNestedEnum.kt"); } @TestMetadata("ClassWithTypeParameter.kt") public void testClassWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ClassWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ClassWithTypeParameter.kt"); } @TestMetadata("CyclicDependencies.kt") public void testCyclicDependencies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/CyclicDependencies.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/CyclicDependencies.kt"); } @TestMetadata("DefaultModifier.kt") public void testDefaultModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/DefaultModifier.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/DefaultModifier.kt"); } @TestMetadata("EnclosingClassInner.kt") public void testEnclosingClassInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/EnclosingClassInner.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/EnclosingClassInner.kt"); } @TestMetadata("Enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Enum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Enum.kt"); } @TestMetadata("EnumName.kt") public void testEnumName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/EnumName.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/EnumName.kt"); } @TestMetadata("EnumValues.kt") public void testEnumValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/EnumValues.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/EnumValues.kt"); } @TestMetadata("Inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Inheritance.kt"); } @TestMetadata("InheritedInner.kt") public void testInheritedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InheritedInner.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InheritedInner.kt"); } @TestMetadata("InnerCanonicalName.kt") public void testInnerCanonicalName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InnerCanonicalName.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InnerCanonicalName.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InnerClass.kt"); } @TestMetadata("InnerClassFromAsteriskImport.kt") public void testInnerClassFromAsteriskImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InnerClassFromAsteriskImport.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromAsteriskImport.kt"); } @TestMetadata("InnerClassFromImport.kt") public void testInnerClassFromImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InnerClassFromImport.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InnerClassFromImport.kt"); } @TestMetadata("InnerWithGenericOuter.kt") public void testInnerWithGenericOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InnerWithGenericOuter.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InnerWithGenericOuter.kt"); } @TestMetadata("Interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Interface.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Interface.kt"); } @TestMetadata("InterfaceField.kt") public void testInterfaceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InterfaceField.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InterfaceField.kt"); } @TestMetadata("InterfaceMemberClass.kt") public void testInterfaceMemberClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InterfaceMemberClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InterfaceMemberClass.kt"); } @TestMetadata("InterfaceWithDefault.kt") public void testInterfaceWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/InterfaceWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/InterfaceWithDefault.kt"); } @TestMetadata("JavaLangClass.kt") public void testJavaLangClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/JavaLangClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/JavaLangClass.kt"); } @TestMetadata("ListImpl.kt") public void testListImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ListImpl.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ListImpl.kt"); } @TestMetadata("MapExample.kt") public void testMapExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/MapExample.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/MapExample.kt"); } @TestMetadata("Method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Method.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Method.kt"); } @TestMetadata("MethodWithArgument.kt") public void testMethodWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/MethodWithArgument.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/MethodWithArgument.kt"); } @TestMetadata("MethodWithSeveralTypeParameters.kt") public void testMethodWithSeveralTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/MethodWithSeveralTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/MethodWithSeveralTypeParameters.kt"); } @TestMetadata("MethodWithTypeParameter.kt") public void testMethodWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/MethodWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/MethodWithTypeParameter.kt"); } @TestMetadata("MethodWithWildcard.kt") public void testMethodWithWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/MethodWithWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/MethodWithWildcard.kt"); } @TestMetadata("Nesting.kt") public void testNesting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Nesting.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Nesting.kt"); } @TestMetadata("RawReturnType.kt") public void testRawReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/RawReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/RawReturnType.kt"); } @TestMetadata("ReturnEnum.kt") public void testReturnEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnEnum.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnEnum.kt"); } @TestMetadata("ReturnInnerClass.kt") public void testReturnInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerClass.kt"); } @TestMetadata("ReturnInnerInInner.kt") public void testReturnInnerInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnInnerInInner.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInInner.kt"); } @TestMetadata("ReturnInnerInner.kt") public void testReturnInnerInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnInnerInner.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnInnerInner.kt"); } @TestMetadata("ReturnNested.kt") public void testReturnNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnNested.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnNested.kt"); } @TestMetadata("ReturnNestedFQ.kt") public void testReturnNestedFQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnNestedFQ.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnNestedFQ.kt"); } @TestMetadata("ReturnType.kt") public void testReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnType.kt"); } @TestMetadata("ReturnTypeResolution.kt") public void testReturnTypeResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/ReturnTypeResolution.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/ReturnTypeResolution.kt"); } @TestMetadata("SeveralInnerClasses.kt") public void testSeveralInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/SeveralInnerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/SeveralInnerClasses.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/SimpleAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/SimpleAnnotation.kt"); } @TestMetadata("SimpleWildcard.kt") public void testSimpleWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/SimpleWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/SimpleWildcard.kt"); } @TestMetadata("Singleton.kt") public void testSingleton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Singleton.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Singleton.kt"); } @TestMetadata("StaticNestedClass.kt") public void testStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/StaticNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/StaticNestedClass.kt"); } @TestMetadata("TypeArgumentInSuperType.kt") public void testTypeArgumentInSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/TypeArgumentInSuperType.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/TypeArgumentInSuperType.kt"); } @TestMetadata("TypeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/TypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/TypeParameter.kt"); } @TestMetadata("UseKtClass.kt") public void testUseKtClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/UseKtClass.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/UseKtClass.kt"); } @TestMetadata("Vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/compileKotlinAgainstJava/Vararg.kt"); - doTest(fileName); + runTest("compiler/testData/compileKotlinAgainstJava/Vararg.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaTestGenerated.java index f481a0fbe51..a72228be87e 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaTestGenerated.java @@ -23,472 +23,404 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJava extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.java") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); } @TestMetadata("ClassDoesNotOverrideMethod.java") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); } @TestMetadata("ClassWithConstVal.java") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); } @TestMetadata("ClassWithTypeP.java") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); } @TestMetadata("ClassWithTypePExtendsIterableP.java") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); } @TestMetadata("ClassWithTypePP.java") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); } @TestMetadata("ClassWithTypePRefNext.java") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); } @TestMetadata("ClassWithTypePRefSelf.java") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); } @TestMetadata("ClassWithTypePRefSelfAndClass.java") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); } @TestMetadata("FieldAsVar.java") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); } @TestMetadata("FieldOfArrayType.java") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); } @TestMetadata("FinalFieldAsVal.java") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); } @TestMetadata("InheritMethodsDifferentReturnTypes.java") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.java") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClass.java"); } @TestMetadata("InnerClassReferencesOuterTP.java") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); } @TestMetadata("InnerClassTypeMultipleGeneric.java") public void testInnerClassTypeMultipleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); } @TestMetadata("InnerClassesInGeneric.java") public void testInnerClassesInGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); } @TestMetadata("InnerOfGeneric.java") public void testInnerOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); } @TestMetadata("IntrinsicCompanionObject.java") public void testIntrinsicCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); } @TestMetadata("MethodReferencesOuterClassTP.java") public void testMethodReferencesOuterClassTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); } @TestMetadata("MethodTypePOneUpperBound.java") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); } @TestMetadata("MethodTypePTwoUpperBounds.java") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); } @TestMetadata("MethodWithTypeP.java") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); } @TestMetadata("MethodWithTypePP.java") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); } @TestMetadata("MethodWithTypePRefClassP.java") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); } @TestMetadata("MethosWithPRefTP.java") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); } @TestMetadata("MyException.java") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MyException.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MyException.java"); } @TestMetadata("NestedClass.java") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/NestedClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/NestedClass.java"); } @TestMetadata("OverrideMethod.java") public void testOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); } @TestMetadata("PackageLocalVisibility.java") public void testPackageLocalVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); } @TestMetadata("PrivateMembers.java") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); } @TestMetadata("PrivateMembersInHierarchy.java") public void testPrivateMembersInHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); } @TestMetadata("RawOverrides.java") public void testRawOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawOverrides.java"); } @TestMetadata("RawTypeWithUpperBound.java") public void testRawTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); } @TestMetadata("RawUpperBound.java") public void testRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); } @TestMetadata("RecursiveRawUpperBound.java") public void testRecursiveRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); } @TestMetadata("RecursiveWildcardUpperBound.java") public void testRecursiveWildcardUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); } @TestMetadata("RemoveRedundantProjectionKind.java") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/Simple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/Simple.java"); } @TestMetadata("SubclassFromNested.java") public void testSubclassFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); } @TestMetadata("TopLevel$Class.java") public void testTopLevel$Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); } @TestMetadata("TwoFields.java") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TwoFields.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/TwoFields.java"); } @TestMetadata("UnboundWildcard.java") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); } @TestMetadata("WildcardBounds.java") public void testWildcardBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.java") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); } @TestMetadata("AnnotatedConstructor.java") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); } @TestMetadata("AnnotatedEnumEntry.java") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); } @TestMetadata("AnnotatedField.java") public void testAnnotatedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); } @TestMetadata("AnnotatedMethod.java") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); } @TestMetadata("AnnotatedValueParameter.java") public void testAnnotatedValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); } @TestMetadata("AnnotationInParam.java") public void testAnnotationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); } @TestMetadata("AnnotationRetentions.java") public void testAnnotationRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); } @TestMetadata("AnnotationTargets.java") public void testAnnotationTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); } @TestMetadata("ArithmeticExpressionInParam.java") public void testArithmeticExpressionInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); } @TestMetadata("ArrayOfEnumInParam.java") public void testArrayOfEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); } @TestMetadata("ArrayOfStringInParam.java") public void testArrayOfStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); } @TestMetadata("ClassObjectArrayInParam.java") public void testClassObjectArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); } @TestMetadata("ClassObjectInParam.java") public void testClassObjectInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); } @TestMetadata("ClassObjectInParamRaw.java") public void testClassObjectInParamRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); } @TestMetadata("ClassObjectInParamVariance.java") public void testClassObjectInParamVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); } @TestMetadata("CustomAnnotation.java") public void testCustomAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); } @TestMetadata("CustomAnnotationWithDefaultParameter.java") public void testCustomAnnotationWithDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); } @TestMetadata("EmptyArrayInParam.java") public void testEmptyArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); } @TestMetadata("EnumArgumentWithCustomToString.java") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); } @TestMetadata("EnumConstructorParameter.java") public void testEnumConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); } @TestMetadata("EnumInParam.java") public void testEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); } @TestMetadata("JavaDocDeprecated.java") public void testJavaDocDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); } @TestMetadata("NestedEnumArgument.java") public void testNestedEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); } @TestMetadata("PrimitiveValueInParam.java") public void testPrimitiveValueInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); } @TestMetadata("RecursiveAnnotation.java") public void testRecursiveAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); } @TestMetadata("RecursiveAnnotation2.java") public void testRecursiveAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); } @TestMetadata("SimpleAnnotation.java") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); } @TestMetadata("StringConcatenationInParam.java") public void testStringConcatenationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); } @TestMetadata("StringConstantInParam.java") public void testStringConstantInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); } @TestMetadata("StringInParam.java") public void testStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); } } @@ -496,26 +428,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/constructor"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorGenericDeep.java") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); } @TestMetadata("ConstructorGenericSimple.java") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); } @TestMetadata("ConstructorGenericUpperBound.java") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); } } @@ -523,26 +456,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("EnumMembers.java") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); } @TestMetadata("EnumWithSpecializedEntry.java") public void testEnumWithSpecializedEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); } @TestMetadata("JavaEnum.java") public void testJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); } } @@ -550,44 +484,42 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/javaBean"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.java") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); } @TestMetadata("JavaBeanAbstractGetter.java") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); } @TestMetadata("JavaBeanVal.java") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); } @TestMetadata("JavaBeanVar.java") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); } @TestMetadata("JavaBeanVarOfGenericType.java") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); } @TestMetadata("TwoSetters.java") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); } } @@ -595,10 +527,13 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.java") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -607,124 +542,109 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestMetadata("ArrayType.java") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); } @TestMetadata("ConstructorWithNewTypeParams.java") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); } @TestMetadata("ConstructorWithParentTypeParams.java") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); } @TestMetadata("ConstructorWithSeveralParams.java") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); } @TestMetadata("ConstructorWithoutParams.java") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); } @TestMetadata("CustomProjectionKind.java") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); } @TestMetadata("MethodWithFunctionTypes.java") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); } @TestMetadata("MethodWithGenerics.java") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); } @TestMetadata("MethodWithMappedClasses.java") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); } @TestMetadata("MethodWithTypeParameters.java") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); } @TestMetadata("MethodWithVararg.java") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); } @TestMetadata("PropertyArrayTypes.java") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); } @TestMetadata("PropertyComplexTypes.java") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); } @TestMetadata("PropertySimpleType.java") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); } @TestMetadata("StarProjection.java") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInError() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("WrongProjectionKind.java") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); } @TestMetadata("WrongReturnTypeStructure.java") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); } @TestMetadata("WrongTypeParameterBoundStructure1.java") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); } @TestMetadata("WrongValueParameterStructure1.java") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); } } @@ -732,154 +652,139 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.java") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.java") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); } @TestMetadata("DeeplySubstitutedClassParameter.java") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); } @TestMetadata("DeeplySubstitutedClassParameter2.java") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); } @TestMetadata("InheritNotVararg.java") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java"); } @TestMetadata("InheritNotVarargInteger.java") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); } @TestMetadata("InheritNotVarargNotNull.java") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); } @TestMetadata("InheritNotVarargPrimitive.java") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); } @TestMetadata("InheritNullability.java") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNullability.java"); } @TestMetadata("InheritVararg.java") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java"); } @TestMetadata("InheritVarargInteger.java") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); } @TestMetadata("InheritVarargNotNull.java") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); } @TestMetadata("InheritVarargPrimitive.java") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); } @TestMetadata("Kt3302.java") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.java"); } @TestMetadata("MutableToReadOnly.java") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); } @TestMetadata("NotNullToNullable.java") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.java"); } @TestMetadata("NullableToNotNull.java") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.java"); } @TestMetadata("NullableToNotNullKotlinSignature.java") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); } @TestMetadata("OverrideWithErasedParameter.java") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); } @TestMetadata("ReadOnlyToMutable.java") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); } @TestMetadata("SubclassFromGenericAndNot.java") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); } @TestMetadata("SubstitutedClassParameter.java") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); } @TestMetadata("SubstitutedClassParameters.java") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); } } @@ -887,40 +792,38 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.java") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); } @TestMetadata("AddNotNullSameJavaType.java") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); } @TestMetadata("AddNullabilityJavaSubtype.java") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); } @TestMetadata("AddNullabilitySameGenericType1.java") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); } @TestMetadata("AddNullabilitySameGenericType2.java") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); } @TestMetadata("AddNullabilitySameJavaType.java") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); } public void testAllFilesPresentInReturn() throws Exception { @@ -929,170 +832,142 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestMetadata("CantMakeImmutableInSubclass.java") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); } @TestMetadata("DeeplySubstitutedClassParameter.java") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); } @TestMetadata("DeeplySubstitutedClassParameter2.java") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); } @TestMetadata("HalfSubstitutedTypeParameters.java") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.java") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); } @TestMetadata("InheritNullabilityJavaSubtype.java") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); } @TestMetadata("InheritNullabilitySameGenericType.java") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); } @TestMetadata("InheritNullabilitySameJavaType.java") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); } @TestMetadata("InheritProjectionKind.java") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritProjectionKind.java"); } @TestMetadata("InheritReadOnlinessOfArgument.java") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); } @TestMetadata("InheritReadOnlinessSameClass.java") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); } @TestMetadata("InheritReadOnlinessSubclass.java") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); } @TestMetadata("SameProjectionKind.java") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SameProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SameProjectionKind.java"); } @TestMetadata("SubclassFromGenericAndNot.java") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); } @TestMetadata("SubclassOfCollection.java") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.java"); } @TestMetadata("SubclassOfMapEntry.java") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); } @TestMetadata("SubstitutedClassParameter.java") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); } @TestMetadata("SubstitutedClassParameters.java") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.java") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.java") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.java") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); } @TestMetadata("TwoSuperclassesMutableAndNot.java") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.java") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.java") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); } @TestMetadata("TwoSuperclassesSupplementNotNull.java") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); } @TestMetadata("TypeParamOfClass.java") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.java"); } @TestMetadata("TypeParamOfClassSubstituted.java") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); } @TestMetadata("TypeParamOfFun.java") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.java"); } } @@ -1100,50 +975,47 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InheritNullability.java") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java"); } @TestMetadata("TwoBounds.java") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java"); } @TestMetadata("TwoSuperclasses.java") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); } @TestMetadata("TwoTypeParameters.java") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); } @TestMetadata("UseParameterAsUpperBound.java") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); } @TestMetadata("UseParameterInUpperBound.java") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.java") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); } } } @@ -1153,26 +1025,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/library"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); } @TestMetadata("LoadIterator.java") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); } @TestMetadata("Max.java") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/Max.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/Max.java"); } } @@ -1180,14 +1053,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/modality"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.java") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); } } @@ -1195,38 +1071,37 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mutability extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/mutability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); } @TestMetadata("LoadIterableWithConflict.java") public void testLoadIterableWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); } @TestMetadata("LoadIterableWithNullability.java") public void testLoadIterableWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); } @TestMetadata("LoadIterableWithPropagation.java") public void testLoadIterableWithPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); } @TestMetadata("ReadOnlyExtendsWildcard.java") public void testReadOnlyExtendsWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); } } @@ -1234,38 +1109,37 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/notNull"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.java") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); } @TestMetadata("NotNullIntArray.java") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); } @TestMetadata("NotNullMethod.java") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); } @TestMetadata("NotNullObjectArray.java") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); } @TestMetadata("NotNullParameter.java") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); } } @@ -1273,26 +1147,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedPackage extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedPackage"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ProtectedPackageConstructor.java") public void testProtectedPackageConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); } @TestMetadata("ProtectedPackageFun.java") public void testProtectedPackageFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); } @TestMetadata("ProtectedPackageProperty.java") public void testProtectedPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); } } @@ -1300,14 +1175,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedStatic extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedStatic"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorInProtectedStaticNestedClass.java") public void testConstructorInProtectedStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); } } @@ -1315,14 +1193,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rendering extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRendering() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/rendering"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Rendering.java") public void testRendering() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); } } @@ -1330,206 +1211,187 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/sam"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Comparator.java") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Comparator.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Comparator.java"); } @TestMetadata("DifferentParametersCount.java") public void testDifferentParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/DifferentParametersCount.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/DifferentParametersCount.java"); } @TestMetadata("FakeStaticOverrides.java") public void testFakeStaticOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/FakeStaticOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/FakeStaticOverrides.java"); } @TestMetadata("FilenameFilter.java") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/FilenameFilter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/FilenameFilter.java"); } @TestMetadata("GenericInterfaceParameterWithSelfBound.java") public void testGenericInterfaceParameterWithSelfBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.java"); } @TestMetadata("GenericInterfaceParametersWithBounds.java") public void testGenericInterfaceParametersWithBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.java"); } @TestMetadata("GenericMethodParameters.java") public void testGenericMethodParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.java"); } @TestMetadata("InterfaceWithObjectMethod.java") public void testInterfaceWithObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/InterfaceWithObjectMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/InterfaceWithObjectMethod.java"); } @TestMetadata("Nested.java") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Nested.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Nested.java"); } @TestMetadata("Runnable.java") public void testRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Runnable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Runnable.java"); } @TestMetadata("SamSubinterfaceOfTwo.java") public void testSamSubinterfaceOfTwo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.java"); } @TestMetadata("SamSubinterfaceOverridding.java") public void testSamSubinterfaceOverridding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOverridding.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOverridding.java"); } @TestMetadata("StaticOverrides.java") public void testStaticOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java"); } @TestMetadata("SubstitutedSamInterface.java") public void testSubstitutedSamInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java"); } @TestMetadata("SubstitutedSamInterfaceSubclassOfBuiltin.java") public void testSubstitutedSamInterfaceSubclassOfBuiltin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.java"); } @TestMetadata("VarargParameter.java") public void testVarargParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/VarargParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/VarargParameter.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/sam/adapters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Adapters extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/sam/adapters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousAdapters.java") public void testAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.java"); } @TestMetadata("Basic.java") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/Basic.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/Basic.java"); } @TestMetadata("Constructor.java") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.java"); } @TestMetadata("ConstructorWithAnnotations.java") public void testConstructorWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.java"); } @TestMetadata("DeepSamLoop.java") public void testDeepSamLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.java"); } @TestMetadata("NoSamForClassTypeParameter.java") public void testNoSamForClassTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForClassTypeParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForClassTypeParameter.java"); } @TestMetadata("NoSamForMethodTypeParameter.java") public void testNoSamForMethodTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForMethodTypeParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForMethodTypeParameter.java"); } @TestMetadata("NonTrivialFunctionType.java") public void testNonTrivialFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.java"); } @TestMetadata("PrivateSamAdapter.java") public void testPrivateSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.java"); } @TestMetadata("SelfAsParameter.java") public void testSelfAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.java"); } @TestMetadata("SeveralSamParameters.java") public void testSeveralSamParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.java"); } @TestMetadata("TypeParameterOfClass.java") public void testTypeParameterOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.java"); } @TestMetadata("TypeParameterOfMethod.java") public void testTypeParameterOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.java"); } @TestMetadata("TypeParameterOfOuterClass.java") public void testTypeParameterOfOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AdapterDoesntOverrideDeclaration.java") public void testAdapterDoesntOverrideDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/AdapterDoesntOverrideDeclaration.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/AdapterDoesntOverrideDeclaration.java"); } public void testAllFilesPresentInInheritance() throws Exception { @@ -1538,56 +1400,47 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestMetadata("InheritedAdapterAndDeclaration.java") public void testInheritedAdapterAndDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAdapterAndDeclaration.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAdapterAndDeclaration.java"); } @TestMetadata("InheritedAmbiguousAdapters.java") public void testInheritedAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAmbiguousAdapters.java"); } @TestMetadata("InheritedAndOverriddenAmbiguousAdapters.java") public void testInheritedAndOverriddenAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAndOverriddenAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAndOverriddenAmbiguousAdapters.java"); } @TestMetadata("InheritedOverridden.java") public void testInheritedOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverridden.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverridden.java"); } @TestMetadata("InheritedOverriddenAdapter.java") public void testInheritedOverriddenAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverriddenAdapter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverriddenAdapter.java"); } @TestMetadata("InheritedSameAdapters.java") public void testInheritedSameAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdapters.java"); } @TestMetadata("InheritedSameAdaptersWithSubstitution.java") public void testInheritedSameAdaptersWithSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.java"); } @TestMetadata("InheritedSimple.java") public void testInheritedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.java"); } @TestMetadata("OverriddenAmbiguousAdapters.java") public void testOverriddenAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/OverriddenAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/OverriddenAmbiguousAdapters.java"); } } } @@ -1597,14 +1450,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("StableName.java") public void testStableName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); } } @@ -1612,62 +1468,57 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignaturePropagation extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignaturePropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signaturePropagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArraysInSubtypes.java") public void testArraysInSubtypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); } @TestMetadata("MethodTypeParameterErased.java") public void testMethodTypeParameterErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); } @TestMetadata("RawSuperType.java") public void testRawSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); } @TestMetadata("RawSuperTypeWithBound.java") public void testRawSuperTypeWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBound.java") public void testRawSuperTypeWithRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBoundMultipleParameters.java") public void testRawSuperTypeWithRecursiveBoundMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); } @TestMetadata("ReturnInnerSubclassOfSupersInner.java") public void testReturnInnerSubclassOfSupersInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); } @TestMetadata("SubclassWithRawType.java") public void testSubclassWithRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); } @TestMetadata("TwoSuperclassesInconsistentGenericTypes.java") public void testTwoSuperclassesInconsistentGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); } } @@ -1675,74 +1526,67 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Static extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/static"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DeeplyInnerClass.java") public void testDeeplyInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); } @TestMetadata("DeeplyNestedStatic.java") public void testDeeplyNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); } @TestMetadata("Enum.java") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Enum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Enum.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Simple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Simple.java"); } @TestMetadata("StaticFinal.java") public void testStaticFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); } @TestMetadata("StaticMembersFromParentClass.java") public void testStaticMembersFromParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); } @TestMetadata("StaticMembersFromParentClassVisibility.java") public void testStaticMembersFromParentClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); } @TestMetadata("StaticMembersFromParentInterface.java") public void testStaticMembersFromParentInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); } @TestMetadata("StaticMembersInEnum.java") public void testStaticMembersInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); } @TestMetadata("StaticMembersInEnumFromParents.java") public void testStaticMembersInEnumFromParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); } } @@ -1750,20 +1594,22 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/vararg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("VarargInt.java") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); } @TestMetadata("VarargString.java") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); } } } @@ -1772,14 +1618,30 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJavaAndKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJavaAndKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJavaAndKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJavaAndKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("MixedPackage.txt") public void testMixedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage.txt"); - doTestCompiledJavaAndKotlin(fileName); + runTest("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage.txt"); + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MixedPackage extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJavaAndKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMixedPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } @@ -1787,26 +1649,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJavaIncludeObjectMethods extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJavaIncludeObjectMethods, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJavaIncludeObjectMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJavaIncludeObjectMethods"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ClassWithObjectMethod.java") public void testClassWithObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.java"); - doTestCompiledJavaIncludeObjectMethods(fileName); + runTest("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.java"); } @TestMetadata("EmptyInterface.java") public void testEmptyInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/EmptyInterface.java"); - doTestCompiledJavaIncludeObjectMethods(fileName); + runTest("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/EmptyInterface.java"); } @TestMetadata("InterfaceWithObjectMethods.java") public void testInterfaceWithObjectMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.java"); - doTestCompiledJavaIncludeObjectMethods(fileName); + runTest("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.java"); } } @@ -1814,6 +1677,10 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1822,118 +1689,109 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.kt") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); } @TestMetadata("AnnotatedMethod.kt") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); } @TestMetadata("AnnotationInAnnotationArguments.kt") public void testAnnotationInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); } @TestMetadata("EnumArgumentWithCustomToString.kt") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); } @TestMetadata("MultiDimensionalArrayMethod.kt") public void testMultiDimensionalArrayMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); } @TestMetadata("PrimitiveArrayArguments.kt") public void testPrimitiveArrayArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); } @TestMetadata("TargetedAnnotation.kt") public void testTargetedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembers extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectPropertyField.kt") public void testClassObjectPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); } } @@ -1941,98 +1799,87 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInClassObject.kt") public void testAnnotationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); } @TestMetadata("DollarsInAnnotationName.kt") public void testDollarsInAnnotationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); } @TestMetadata("MultipleAnnotations.kt") public void testMultipleAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); } @TestMetadata("NestedAnnotation.kt") public void testNestedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); } @TestMetadata("Retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); } @TestMetadata("WithArgument.kt") public void testWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); } @TestMetadata("WithMultipleArguments.kt") public void testWithMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); } } @@ -2040,56 +1887,52 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); } @TestMetadata("EnumArrayArgument.kt") public void testEnumArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); } @TestMetadata("StringArrayArgument.kt") public void testStringArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); } } @@ -2097,80 +1940,72 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); } @TestMetadata("ExtensionFunctionInClass.kt") public void testExtensionFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); } @TestMetadata("ExtensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); } @TestMetadata("FunctionInClass.kt") public void testFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); } @TestMetadata("FunctionInTrait.kt") public void testFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); } @TestMetadata("InnerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); } @TestMetadata("ManyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); } @TestMetadata("PropertySetterInClass.kt") public void testPropertySetterInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); } @TestMetadata("TopLevelPropertySetter.kt") public void testTopLevelPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); } } @@ -2178,56 +2013,52 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertiesWithoutBackingFields extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); } @TestMetadata("ExtensionsWithSameNameClass.kt") public void testExtensionsWithSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); } @TestMetadata("ExtensionsWithSameNamePackage.kt") public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); } @TestMetadata("NestedTrait.kt") public void testNestedTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); } @TestMetadata("TraitClassObject.kt") public void testTraitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); } } @@ -2235,56 +2066,52 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassLiteralArgument.kt") public void testClassLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); } @TestMetadata("ReceiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); } @TestMetadata("SimpleTypeAnnotation.kt") public void testSimpleTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); } @TestMetadata("SupertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); } @TestMetadata("TypeAnnotationWithArguments.kt") public void testTypeAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); } @TestMetadata("TypeArgument.kt") public void testTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); } @TestMetadata("TypeParameterAnnotation.kt") public void testTypeParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); } @TestMetadata("TypeParameterAnnotationWithArguments.kt") public void testTypeParameterAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); } } @@ -2292,26 +2119,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateTarget.kt") public void testDelegateTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); } @TestMetadata("FieldTarget.kt") public void testFieldTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); } @TestMetadata("ReceiverTarget.kt") public void testReceiverTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); } } } @@ -2320,262 +2148,229 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); } @TestMetadata("ClassInParam.kt") public void testClassInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); } @TestMetadata("ClassInnerClass.kt") public void testClassInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); } @TestMetadata("ClassMemberConflict.kt") public void testClassMemberConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); } @TestMetadata("ClassOutParam.kt") public void testClassOutParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); } @TestMetadata("ClassParam.kt") public void testClassParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); } @TestMetadata("ClassParamReferencesParam.kt") public void testClassParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); } @TestMetadata("ClassParamReferencesParam2.kt") public void testClassParamReferencesParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); } @TestMetadata("ClassParamReferencesSelf.kt") public void testClassParamReferencesSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); } @TestMetadata("ClassParamUpperClassBound.kt") public void testClassParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); } @TestMetadata("ClassParamUpperClassInterfaceBound.kt") public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); } @TestMetadata("ClassParamUpperInterfaceBound.kt") public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); } @TestMetadata("ClassTwoParams.kt") public void testClassTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); } @TestMetadata("ClassTwoParams2.kt") public void testClassTwoParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); } @TestMetadata("EnumWithGenericConstructorParameter.kt") public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); } @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); } @TestMetadata("InheritClassSimple.kt") public void testInheritClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); } @TestMetadata("InheritClassWithParam.kt") public void testInheritClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); } @TestMetadata("InheritSubstitutedMethod.kt") public void testInheritSubstitutedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); } @TestMetadata("InheritTraitWithFunctionParam.kt") public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); } @TestMetadata("InheritTraitWithParam.kt") public void testInheritTraitWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); } @TestMetadata("InnerClassExtendInnerClass.kt") public void testInnerClassExtendInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); } @TestMetadata("InnerGenericClass.kt") public void testInnerGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); } @TestMetadata("InnerTypes.kt") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); } @TestMetadata("NamedObjectInClass.kt") public void testNamedObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); } @TestMetadata("NamedObjectInClassObject.kt") public void testNamedObjectInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); } @TestMetadata("NamedObjectInNamedObject.kt") public void testNamedObjectInNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); } @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); } @TestMetadata("NestedClassExtendNestedClass.kt") public void testNestedClassExtendNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); } @TestMetadata("NestedGenericClass.kt") public void testNestedGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); } @TestMetadata("RecursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); } @TestMetadata("SingleAbstractMethod.kt") public void testSingleAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.kt") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); } @TestMetadata("JavaBeanAbstractGetter.kt") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); } @TestMetadata("JavaBeanVal.kt") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); } @TestMetadata("JavaBeanVar.kt") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); } @TestMetadata("JavaBeanVarOfGenericType.kt") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); } @TestMetadata("TwoSetters.kt") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); } } } @@ -2584,38 +2379,37 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassFun extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassInParamUsedInFun.kt") public void testClassInParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); } @TestMetadata("ClassParamUsedInFun.kt") public void testClassParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); } @TestMetadata("FunDelegationToTraitImpl.kt") public void testFunDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); } @TestMetadata("FunInParamSuper.kt") public void testFunInParamSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); } @TestMetadata("TraitOpenFun.kt") public void testTraitOpenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); } } @@ -2623,86 +2417,77 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectDeclaresVal.kt") public void testClassObjectDeclaresVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); } @TestMetadata("ClassObjectDeclaresVar.kt") public void testClassObjectDeclaresVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); } @TestMetadata("ClassObjectDefaultVisibility.kt") public void testClassObjectDefaultVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); } @TestMetadata("ClassObjectExplicitVisibility.kt") public void testClassObjectExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); } @TestMetadata("ClassObjectExtendsTrait.kt") public void testClassObjectExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); } @TestMetadata("ClassObjectExtendsTraitWithTP.kt") public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); } @TestMetadata("classObjectInClassStaticFields.kt") public void testClassObjectInClassStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); } @TestMetadata("classObjectInTraitStaticFields.kt") public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); } @TestMetadata("ClassObjectPropertyInClass.kt") public void testClassObjectPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); } @TestMetadata("InnerClassInClassObject.kt") public void testInnerClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); } @TestMetadata("SimpleClassObject.kt") public void testSimpleClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); } } @@ -2710,124 +2495,114 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); } @TestMetadata("Constructor1.kt") public void testConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); } @TestMetadata("Constructor1WithParamDefaultValue.kt") public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); } @TestMetadata("Constructor2WithOneParamDefaultValue.kt") public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorGenericDeep.kt") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); } @TestMetadata("ConstructorGenericSimple.kt") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); } @TestMetadata("ConstructorGenericUpperBound.kt") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); } @TestMetadata("ConstructorWithTwoDefArgs.kt") public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); } @TestMetadata("ConstructorWithTwoTypeParameters.kt") public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); } @TestMetadata("InnerClassConstructorWithDefArgs.kt") public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); } @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorNonLastVararg.kt") public void testConstructorNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); } @TestMetadata("ConstructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); } } } @@ -2836,14 +2611,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); } } @@ -2851,32 +2629,32 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MixedComponents.kt") public void testMixedComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); } @TestMetadata("OneVal.kt") public void testOneVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); } @TestMetadata("TwoVals.kt") public void testTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); } @TestMetadata("TwoVars.kt") public void testTwoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); } } @@ -2884,44 +2662,42 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumVisibility.kt") public void testEnumVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); } @TestMetadata("enumWithConstuctor.kt") public void testEnumWithConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); } @TestMetadata("enumWithInnerClasses.kt") public void testEnumWithInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); } @TestMetadata("innerEnumExistingClassObject.kt") public void testInnerEnumExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); } } @@ -2929,222 +2705,195 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromLoadJava extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromLoadJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.kt") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); } @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); } @TestMetadata("classObjectAnnotation.kt") public void testClassObjectAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); } @TestMetadata("ClassWithConstVal.kt") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); } @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); } @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); } @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); } @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); } @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); } @TestMetadata("ClassWithTypePRefSelfAndClass.kt") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); } @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); } @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); } @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypes.kt") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); } @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); } @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); } @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); } @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); } @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); } @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); } @TestMetadata("MyException.kt") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); } @TestMetadata("objectMembers.kt") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); } @TestMetadata("packageLevelObject.kt") public void testPackageLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); } @TestMetadata("RemoveRedundantProjectionKind.kt") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); } @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); } @TestMetadata("UnboundWildcard.kt") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.kt") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -3153,102 +2902,90 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestMetadata("ArrayType.kt") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); } @TestMetadata("ConstructorWithNewTypeParams.kt") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); } @TestMetadata("ConstructorWithParentTypeParams.kt") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); } @TestMetadata("ConstructorWithSeveralParams.kt") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); } @TestMetadata("ConstructorWithoutParams.kt") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); } @TestMetadata("CustomProjectionKind.kt") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); } @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); } @TestMetadata("MethodWithGenerics.kt") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); } @TestMetadata("MethodWithMappedClasses.kt") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); } @TestMetadata("MethodWithTypeParameters.kt") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); } @TestMetadata("MethodWithVararg.kt") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); } @TestMetadata("PropertyArrayTypes.kt") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); } @TestMetadata("PropertyComplexTypes.kt") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); } @TestMetadata("PropertySimpleType.kt") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddingNullability.kt") public void testAddingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); } public void testAllFilesPresentInError() throws Exception { @@ -3257,158 +2994,132 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestMetadata("ConflictingProjectionKind.kt") public void testConflictingProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); } @TestMetadata("ExplicitFieldGettersAndSetters.kt") public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); } @TestMetadata("ExtraUpperBound.kt") public void testExtraUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); } @TestMetadata("MissingUpperBound.kt") public void testMissingUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); } @TestMetadata("NoFieldTypeRef.kt") public void testNoFieldTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); } @TestMetadata("NotVarargReplacedWithVararg.kt") public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); } @TestMetadata("RedundantProjectionKind.kt") public void testRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); } @TestMetadata("ReturnTypeMissing.kt") public void testReturnTypeMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); } @TestMetadata("SyntaxErrorInFieldAnnotation.kt") public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); } @TestMetadata("VarargReplacedWithNotVararg.kt") public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); } @TestMetadata("WrongFieldInitializer.kt") public void testWrongFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); } @TestMetadata("WrongFieldMutability.kt") public void testWrongFieldMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); } @TestMetadata("WrongFieldName.kt") public void testWrongFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); } @TestMetadata("WrongMethodName.kt") public void testWrongMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); } @TestMetadata("WrongProjectionKind.kt") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); } @TestMetadata("WrongReturnTypeStructure.kt") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); } @TestMetadata("WrongTypeName1.kt") public void testWrongTypeName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); } @TestMetadata("WrongTypeName2.kt") public void testWrongTypeName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); } @TestMetadata("WrongTypeName3.kt") public void testWrongTypeName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); } @TestMetadata("WrongTypeParameterBoundStructure1.kt") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); } @TestMetadata("WrongTypeParameterBoundStructure2.kt") public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); } @TestMetadata("WrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); } @TestMetadata("WrongValueParameterStructure1.kt") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); } @TestMetadata("WrongValueParameterStructure2.kt") public void testWrongValueParameterStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); } @TestMetadata("WrongValueParametersCount.kt") public void testWrongValueParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); } } @@ -3416,178 +3127,159 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.kt") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.kt") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); } @TestMetadata("ChangeProjectionKind2.kt") public void testChangeProjectionKind2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); } @TestMetadata("InheritNotVararg.kt") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); } @TestMetadata("InheritNotVarargInteger.kt") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); } @TestMetadata("InheritNotVarargNotNull.kt") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); } @TestMetadata("InheritNotVarargPrimitive.kt") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); } @TestMetadata("InheritVararg.kt") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); } @TestMetadata("InheritVarargInteger.kt") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); } @TestMetadata("InheritVarargNotNull.kt") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); } @TestMetadata("InheritVarargPrimitive.kt") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); } @TestMetadata("Kt3302.kt") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); } @TestMetadata("MutableToReadOnly.kt") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); } @TestMetadata("NotNullToNullable.kt") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); } @TestMetadata("NullableToNotNull.kt") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); } @TestMetadata("NullableToNotNullKotlinSignature.kt") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); } @TestMetadata("OverrideWithErasedParameter.kt") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); } @TestMetadata("ReadOnlyToMutable.kt") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); } } @@ -3595,40 +3287,38 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.kt") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); } @TestMetadata("AddNotNullSameJavaType.kt") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); } @TestMetadata("AddNullabilityJavaSubtype.kt") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); } @TestMetadata("AddNullabilitySameGenericType1.kt") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); } @TestMetadata("AddNullabilitySameGenericType2.kt") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); } @TestMetadata("AddNullabilitySameJavaType.kt") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); } public void testAllFilesPresentInReturn() throws Exception { @@ -3637,170 +3327,142 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestMetadata("CantMakeImmutableInSubclass.kt") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("HalfSubstitutedTypeParameters.kt") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); } @TestMetadata("InheritNullabilityJavaSubtype.kt") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); } @TestMetadata("InheritNullabilitySameGenericType.kt") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); } @TestMetadata("InheritNullabilitySameJavaType.kt") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnlinessOfArgument.kt") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); } @TestMetadata("InheritReadOnlinessSameClass.kt") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); } @TestMetadata("InheritReadOnlinessSubclass.kt") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); } @TestMetadata("SameProjectionKind.kt") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubclassOfCollection.kt") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); } @TestMetadata("SubclassOfMapEntry.kt") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); } @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); } @TestMetadata("TwoSuperclassesSupplementNotNull.kt") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); } @TestMetadata("TypeParamOfClass.kt") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); } @TestMetadata("TypeParamOfClassSubstituted.kt") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); } @TestMetadata("TypeParamOfFun.kt") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); } } @@ -3808,62 +3470,57 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); } @TestMetadata("TwoBounds.kt") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); } @TestMetadata("TwoSuperclasses.kt") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); } @TestMetadata("TwoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); } @TestMetadata("UseParameterAsUpperBound.kt") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); } @TestMetadata("UseParameterInUpperBound.kt") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); } } } @@ -3873,26 +3530,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); } @TestMetadata("LoadIterator.kt") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); } @TestMetadata("Max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); } } @@ -3900,14 +3558,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.kt") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); } } @@ -3915,38 +3576,37 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.kt") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); } @TestMetadata("NotNullIntArray.kt") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); } @TestMetadata("NotNullMethod.kt") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); } @TestMetadata("NotNullObjectArray.kt") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); } @TestMetadata("NotNullParameter.kt") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); } } } @@ -3955,142 +3615,129 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fun extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); } @TestMetadata("DeclaredMemberOverridesDelegated.kt") public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); } @TestMetadata("InfixKeyword.kt") public void testInfixKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); } @TestMetadata("InheritValAndVar.kt") public void testInheritValAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); } @TestMetadata("InheritValsDifferentTypes.kt") public void testInheritValsDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); } @TestMetadata("NoSamAdapter.kt") public void testNoSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); } @TestMetadata("NoSamConstructor.kt") public void testNoSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); } @TestMetadata("OperatorKeyword.kt") public void testOperatorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); } @TestMetadata("PropagateDeepSubclass.kt") public void testPropagateDeepSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); } @TestMetadata("PropagateSubclassOfComparable.kt") public void testPropagateSubclassOfComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithTypeVariables extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunGenericParam.kt") public void testFunGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); } @TestMetadata("FunParamParam.kt") public void testFunParamParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); } @TestMetadata("FunParamParamErased.kt") public void testFunParamParamErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); } @TestMetadata("FunParamReferencesParam.kt") public void testFunParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); } @TestMetadata("FunParamTwoUpperBounds.kt") public void testFunParamTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); } @TestMetadata("FunParamUpperClassBound.kt") public void testFunParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); } @TestMetadata("FunParamUpperClassInterfaceBound.kt") public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); } @TestMetadata("FunParamUpperInterfaceBound.kt") public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); } @TestMetadata("FunParamVaragParam.kt") public void testFunParamVaragParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); } @TestMetadata("FunTwoTypeParams.kt") public void testFunTwoTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); } } @@ -4098,38 +3745,37 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithoutTypeVariables extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunClassParamNotNull.kt") public void testFunClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); } @TestMetadata("FunClassParamNullable.kt") public void testFunClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); } @TestMetadata("FunParamNullable.kt") public void testFunParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); } @TestMetadata("ReturnTypeClassParamNotNull.kt") public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); } @TestMetadata("ReturnTypeClassParamNullable.kt") public void testReturnTypeClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); } } @@ -4137,104 +3783,92 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonGeneric extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassFun.kt") public void testClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); } @TestMetadata("ClassFunGetFoo.kt") public void testClassFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); } @TestMetadata("ClassFunGetFooSetFoo.kt") public void testClassFunGetFooSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); } @TestMetadata("ClassFunSetFoo.kt") public void testClassFunSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); } @TestMetadata("ExtFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); } @TestMetadata("ExtFunInClass.kt") public void testExtFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); } @TestMetadata("FunDefaultArg.kt") public void testFunDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); } @TestMetadata("FunParamNotNull.kt") public void testFunParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); } @TestMetadata("FunVarargInt.kt") public void testFunVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); } @TestMetadata("FunVarargInteger.kt") public void testFunVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); } @TestMetadata("ModifierAbstract.kt") public void testModifierAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); } @TestMetadata("ModifierOpen.kt") public void testModifierOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); } @TestMetadata("NsFun.kt") public void testNsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); } @TestMetadata("NsFunGetFoo.kt") public void testNsFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); } @TestMetadata("ReturnTypeNotNull.kt") public void testReturnTypeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); } @TestMetadata("ReturnTypeNullable.kt") public void testReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); } } @@ -4242,26 +3876,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonLastVararg.kt") public void testNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); } @TestMetadata("VarargInt.kt") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); } @TestMetadata("VarargString.kt") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); } } } @@ -4270,14 +3905,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); } } @@ -4285,44 +3923,42 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberOrder extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callablesNameClash.kt") public void testCallablesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); } @TestMetadata("extensionMembers.kt") public void testExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); } @TestMetadata("extensionPropertiesNameClash.kt") public void testExtensionPropertiesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); } } @@ -4330,26 +3966,27 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deepInnerGeneric.kt") public void testDeepInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); } @TestMetadata("innerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); } @TestMetadata("membersReferenceOuterTP.kt") public void testMembersReferenceOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); } } @@ -4357,20 +3994,22 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notnullTypeArgument.kt") public void testNotnullTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); } } @@ -4378,274 +4017,239 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Prop extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); } @TestMetadata("ClassValAbstract.kt") public void testClassValAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); } @TestMetadata("CollectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); } @TestMetadata("ExtValClass.kt") public void testExtValClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); } @TestMetadata("ExtValInClass.kt") public void testExtValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); } @TestMetadata("ExtValInt.kt") public void testExtValInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); } @TestMetadata("ExtValIntCharSequence.kt") public void testExtValIntCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); } @TestMetadata("ExtValIntCharSequenceQ.kt") public void testExtValIntCharSequenceQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); } @TestMetadata("ExtValIntListQOfIntInClass.kt") public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); } @TestMetadata("ExtValIntTInClass.kt") public void testExtValIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); } @TestMetadata("ExtValIntTQInClass.kt") public void testExtValIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); } @TestMetadata("ExtValTIntInClass.kt") public void testExtValTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); } @TestMetadata("ExtVarClass.kt") public void testExtVarClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); } @TestMetadata("ExtVarInClass.kt") public void testExtVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); } @TestMetadata("ExtVarInt.kt") public void testExtVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); } @TestMetadata("ExtVarIntTInClass.kt") public void testExtVarIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); } @TestMetadata("ExtVarIntTQInClass.kt") public void testExtVarIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); } @TestMetadata("ExtVarMapPQInt.kt") public void testExtVarMapPQInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); } @TestMetadata("ExtVarTIntInClass.kt") public void testExtVarTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); } @TestMetadata("ExtVarTQIntInClass.kt") public void testExtVarTQIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); } @TestMetadata("ExtVarl.kt") public void testExtVarl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); } @TestMetadata("NsVal.kt") public void testNsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); } @TestMetadata("NsVar.kt") public void testNsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); } @TestMetadata("OverrideClassVal.kt") public void testOverrideClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); } @TestMetadata("OverrideTraitVal.kt") public void testOverrideTraitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); } @TestMetadata("PropFromSuperclass.kt") public void testPropFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); } @TestMetadata("TraitFinalVar.kt") public void testTraitFinalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); } @TestMetadata("TraitOpenVal.kt") public void testTraitOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); } @TestMetadata("VarDelegationToTraitImpl.kt") public void testVarDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); } @TestMetadata("VarWithDelegated.kt") public void testVarWithDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultAccessors extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); } @TestMetadata("ClassValParams.kt") public void testClassValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); } @TestMetadata("ClassValWithGet.kt") public void testClassValWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); } @TestMetadata("ClassVarModality.kt") public void testClassVarModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); } @TestMetadata("ClassVarParams.kt") public void testClassVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); } @TestMetadata("ClassVarWithGet.kt") public void testClassVarWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); } @TestMetadata("ClassVarWithSet.kt") public void testClassVarWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); } @TestMetadata("ExtValLong.kt") public void testExtValLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); } @TestMetadata("ExtVarLong.kt") public void testExtVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); } } } @@ -4654,194 +4258,167 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); } @TestMetadata("AnyQ.kt") public void testAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); } @TestMetadata("ArrayOfInNumber.kt") public void testArrayOfInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); } @TestMetadata("ArrayOfInteger.kt") public void testArrayOfInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); } @TestMetadata("ArrayOfOutNumber.kt") public void testArrayOfOutNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); } @TestMetadata("ArrayOfOutT.kt") public void testArrayOfOutT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); } @TestMetadata("ArrayOfString.kt") public void testArrayOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); } @TestMetadata("Function1IntString.kt") public void testFunction1IntString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); } @TestMetadata("jlInteger.kt") public void testJlInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); } @TestMetadata("jlIntegerQ.kt") public void testJlIntegerQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); } @TestMetadata("jlNumber.kt") public void testJlNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); } @TestMetadata("jlObject.kt") public void testJlObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); } @TestMetadata("jlObjectQ.kt") public void testJlObjectQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); } @TestMetadata("jlStringQ.kt") public void testJlStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); } @TestMetadata("ListOfAny.kt") public void testListOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); } @TestMetadata("ListOfAnyQ.kt") public void testListOfAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); } @TestMetadata("ListOfjlString.kt") public void testListOfjlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); } @TestMetadata("Nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); } @TestMetadata("NothingQ.kt") public void testNothingQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); } @TestMetadata("platform.kt") public void testPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/String.kt"); } @TestMetadata("StringQ.kt") public void testStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); } @TestMetadata("Unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); } } @@ -4849,32 +4426,32 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); } @TestMetadata("TypeAliasToExtension.kt") public void testTypeAliasToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); } } @@ -4882,74 +4459,67 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InternalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); } @TestMetadata("InternalConstructor.kt") public void testInternalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); } @TestMetadata("InternalTopLevelMembers.kt") public void testInternalTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); } @TestMetadata("PrivateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); } @TestMetadata("PrivateClassMembers.kt") public void testPrivateClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); } @TestMetadata("PrivateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); } @TestMetadata("PrivateTopLevelFun.kt") public void testPrivateTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); } @TestMetadata("PrivateTopLevelVal.kt") public void testPrivateTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); } @TestMetadata("PropertyInConstructorExplicitVisibility.kt") public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); } @TestMetadata("TopLevelVarWithPrivateSetter.kt") public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); } } } @@ -4958,6 +4528,10 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledKotlinWithStdlib extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlinWithStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -4966,14 +4540,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstValInMultifileClass.kt") public void testConstValInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/ConstValInMultifileClass.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/ConstValInMultifileClass.kt"); } } @@ -4981,68 +4558,62 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callsEffect.kt") public void testCallsEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/callsEffect.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/callsEffect.kt"); } @TestMetadata("deeplyNestedExpression.kt") public void testDeeplyNestedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/deeplyNestedExpression.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/deeplyNestedExpression.kt"); } @TestMetadata("embedding.kt") public void testEmbedding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/embedding.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/embedding.kt"); } @TestMetadata("fromStandardKt.kt") public void testFromStandardKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/fromStandardKt.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/fromStandardKt.kt"); } @TestMetadata("isInstancePredicate.kt") public void testIsInstancePredicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/isInstancePredicate.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/isInstancePredicate.kt"); } @TestMetadata("logicOperators.kt") public void testLogicOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/logicOperators.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/logicOperators.kt"); } @TestMetadata("multieffectContracts.kt") public void testMultieffectContracts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/multieffectContracts.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/multieffectContracts.kt"); } @TestMetadata("mutualRecursion.kt") public void testMutualRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/mutualRecursion.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/mutualRecursion.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/recursion.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/recursion.kt"); } @TestMetadata("withReceiver.kt") public void testWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/withReceiver.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/withReceiver.kt"); } } @@ -5050,14 +4621,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedSuspendFun.kt") public void testAnnotatedSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt"); } } @@ -5065,32 +4639,32 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mutability extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt"); } @TestMetadata("LoadIterableWithConflict.kt") public void testLoadIterableWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt"); } @TestMetadata("LoadIterableWithNullability.kt") public void testLoadIterableWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt"); } @TestMetadata("LoadIterableWithPropagation.kt") public void testLoadIterableWithPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt"); } } @@ -5098,14 +4672,17 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformNames extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt"); } } } @@ -5114,6 +4691,10 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAgainstKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAgainstKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @@ -5122,38 +4703,102 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamAdapters extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("InheritAmbguousSamAdaptersInKotlin.txt") public void testInheritAmbguousSamAdaptersInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt"); } @TestMetadata("InheritSamAdapterInKotlin.txt") public void testInheritSamAdapterInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt"); } @TestMetadata("OverrideSamAdapterInKotlin.txt") public void testOverrideSamAdapterInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt"); } @TestMetadata("SamAdapterForInheritedFromKotlin.txt") public void testSamAdapterForInheritedFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin.txt"); } @TestMetadata("SamAdapterForOverriddenFromKotlin.txt") public void testSamAdapterForOverriddenFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt"); + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritAmbguousSamAdaptersInKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritAmbguousSamAdaptersInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritSamAdapterInKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritSamAdapterInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OverrideSamAdapterInKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOverrideSamAdapterInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SamAdapterForInheritedFromKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSamAdapterForInheritedFromKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SamAdapterForOverriddenFromKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSamAdapterForOverriddenFromKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } @@ -5161,38 +4806,102 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignaturePropagation extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignaturePropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("DeepSubclassingKotlinInJava.txt") public void testDeepSubclassingKotlinInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt"); } @TestMetadata("InheritExtensionAndNot.txt") public void testInheritExtensionAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt"); } @TestMetadata("InheritExtensionFunction.txt") public void testInheritExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt"); } @TestMetadata("SubclassFromTraitImplementation.txt") public void testSubclassFromTraitImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt"); } @TestMetadata("SubclassingKotlinInJava.txt") public void testSubclassingKotlinInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt"); + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeepSubclassingKotlinInJava extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDeepSubclassingKotlinInJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritExtensionAndNot extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritExtensionAndNot() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritExtensionFunction extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritExtensionFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SubclassFromTraitImplementation extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSubclassFromTraitImplementation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SubclassingKotlinInJava extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSubclassingKotlinInJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } @@ -5200,20 +4909,48 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/visibility"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("PackageLocal.txt") public void testPackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal.txt"); } @TestMetadata("ProtectedPackage.txt") public void testProtectedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage.txt"); + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageLocal extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageLocal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedPackage extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInProtectedPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } } @@ -5222,32 +4959,32 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinAgainstCompiledJavaWithKotlin extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestKotlinAgainstCompiledJavaWithKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinAgainstCompiledJavaWithKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("InheritJavaField.kt") public void testInheritJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt"); } @TestMetadata("InheritParameterName.kt") public void testInheritParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt"); } @TestMetadata("javaRefersToKotlin.kt") public void testJavaRefersToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt"); } @TestMetadata("propagationAgainstDeserializedSuperclass.kt") public void testPropagationAgainstDeserializedSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.kt"); } } @@ -5255,44 +4992,42 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceJava extends AbstractLoadJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestSourceJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/sourceJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ClassExtendsTypeParameter.java") public void testClassExtendsTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.java"); } @TestMetadata("ErrorTypes.java") public void testErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ErrorTypes.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ErrorTypes.java"); } @TestMetadata("NullInAnnotation.java") public void testNullInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/NullInAnnotation.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/NullInAnnotation.java"); } @TestMetadata("ReturnInnerSubclassOfSupersInner.java") public void testReturnInnerSubclassOfSupersInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.java"); } @TestMetadata("ReturnNotSubtype.java") public void testReturnNotSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ReturnNotSubtype.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ReturnNotSubtype.java"); } @TestMetadata("WrongNumberOfGenericParameters.java") public void testWrongNumberOfGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.java"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaWithFastClassReadingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaWithFastClassReadingTestGenerated.java index d76a93701fc..b50b0825aac 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaWithFastClassReadingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadJavaWithFastClassReadingTestGenerated.java @@ -21,472 +21,404 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.java") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); } @TestMetadata("ClassDoesNotOverrideMethod.java") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); } @TestMetadata("ClassWithConstVal.java") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); } @TestMetadata("ClassWithTypeP.java") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); } @TestMetadata("ClassWithTypePExtendsIterableP.java") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); } @TestMetadata("ClassWithTypePP.java") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); } @TestMetadata("ClassWithTypePRefNext.java") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); } @TestMetadata("ClassWithTypePRefSelf.java") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); } @TestMetadata("ClassWithTypePRefSelfAndClass.java") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); } @TestMetadata("FieldAsVar.java") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); } @TestMetadata("FieldOfArrayType.java") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); } @TestMetadata("FinalFieldAsVal.java") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); } @TestMetadata("InheritMethodsDifferentReturnTypes.java") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.java") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClass.java"); } @TestMetadata("InnerClassReferencesOuterTP.java") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); } @TestMetadata("InnerClassTypeMultipleGeneric.java") public void testInnerClassTypeMultipleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); } @TestMetadata("InnerClassesInGeneric.java") public void testInnerClassesInGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); } @TestMetadata("InnerOfGeneric.java") public void testInnerOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); } @TestMetadata("IntrinsicCompanionObject.java") public void testIntrinsicCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); } @TestMetadata("MethodReferencesOuterClassTP.java") public void testMethodReferencesOuterClassTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); } @TestMetadata("MethodTypePOneUpperBound.java") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); } @TestMetadata("MethodTypePTwoUpperBounds.java") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); } @TestMetadata("MethodWithTypeP.java") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); } @TestMetadata("MethodWithTypePP.java") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); } @TestMetadata("MethodWithTypePRefClassP.java") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); } @TestMetadata("MethosWithPRefTP.java") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); } @TestMetadata("MyException.java") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MyException.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MyException.java"); } @TestMetadata("NestedClass.java") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/NestedClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/NestedClass.java"); } @TestMetadata("OverrideMethod.java") public void testOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); } @TestMetadata("PackageLocalVisibility.java") public void testPackageLocalVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); } @TestMetadata("PrivateMembers.java") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); } @TestMetadata("PrivateMembersInHierarchy.java") public void testPrivateMembersInHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); } @TestMetadata("RawOverrides.java") public void testRawOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawOverrides.java"); } @TestMetadata("RawTypeWithUpperBound.java") public void testRawTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); } @TestMetadata("RawUpperBound.java") public void testRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); } @TestMetadata("RecursiveRawUpperBound.java") public void testRecursiveRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); } @TestMetadata("RecursiveWildcardUpperBound.java") public void testRecursiveWildcardUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); } @TestMetadata("RemoveRedundantProjectionKind.java") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/Simple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/Simple.java"); } @TestMetadata("SubclassFromNested.java") public void testSubclassFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); } @TestMetadata("TopLevel$Class.java") public void testTopLevel$Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); } @TestMetadata("TwoFields.java") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TwoFields.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/TwoFields.java"); } @TestMetadata("UnboundWildcard.java") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); } @TestMetadata("WildcardBounds.java") public void testWildcardBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.java") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); } @TestMetadata("AnnotatedConstructor.java") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); } @TestMetadata("AnnotatedEnumEntry.java") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); } @TestMetadata("AnnotatedField.java") public void testAnnotatedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); } @TestMetadata("AnnotatedMethod.java") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); } @TestMetadata("AnnotatedValueParameter.java") public void testAnnotatedValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); } @TestMetadata("AnnotationInParam.java") public void testAnnotationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); } @TestMetadata("AnnotationRetentions.java") public void testAnnotationRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); } @TestMetadata("AnnotationTargets.java") public void testAnnotationTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); } @TestMetadata("ArithmeticExpressionInParam.java") public void testArithmeticExpressionInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); } @TestMetadata("ArrayOfEnumInParam.java") public void testArrayOfEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); } @TestMetadata("ArrayOfStringInParam.java") public void testArrayOfStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); } @TestMetadata("ClassObjectArrayInParam.java") public void testClassObjectArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); } @TestMetadata("ClassObjectInParam.java") public void testClassObjectInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); } @TestMetadata("ClassObjectInParamRaw.java") public void testClassObjectInParamRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); } @TestMetadata("ClassObjectInParamVariance.java") public void testClassObjectInParamVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); } @TestMetadata("CustomAnnotation.java") public void testCustomAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); } @TestMetadata("CustomAnnotationWithDefaultParameter.java") public void testCustomAnnotationWithDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); } @TestMetadata("EmptyArrayInParam.java") public void testEmptyArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); } @TestMetadata("EnumArgumentWithCustomToString.java") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); } @TestMetadata("EnumConstructorParameter.java") public void testEnumConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); } @TestMetadata("EnumInParam.java") public void testEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); } @TestMetadata("JavaDocDeprecated.java") public void testJavaDocDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); } @TestMetadata("NestedEnumArgument.java") public void testNestedEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); } @TestMetadata("PrimitiveValueInParam.java") public void testPrimitiveValueInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); } @TestMetadata("RecursiveAnnotation.java") public void testRecursiveAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); } @TestMetadata("RecursiveAnnotation2.java") public void testRecursiveAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); } @TestMetadata("SimpleAnnotation.java") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); } @TestMetadata("StringConcatenationInParam.java") public void testStringConcatenationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); } @TestMetadata("StringConstantInParam.java") public void testStringConstantInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); } @TestMetadata("StringInParam.java") public void testStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); } } @@ -494,26 +426,27 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/constructor"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorGenericDeep.java") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); } @TestMetadata("ConstructorGenericSimple.java") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); } @TestMetadata("ConstructorGenericUpperBound.java") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); } } @@ -521,26 +454,27 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("EnumMembers.java") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); } @TestMetadata("EnumWithSpecializedEntry.java") public void testEnumWithSpecializedEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); } @TestMetadata("JavaEnum.java") public void testJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); } } @@ -548,44 +482,42 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/javaBean"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.java") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); } @TestMetadata("JavaBeanAbstractGetter.java") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); } @TestMetadata("JavaBeanVal.java") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); } @TestMetadata("JavaBeanVar.java") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); } @TestMetadata("JavaBeanVarOfGenericType.java") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); } @TestMetadata("TwoSetters.java") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); } } @@ -593,10 +525,13 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.java") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -605,124 +540,109 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestMetadata("ArrayType.java") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); } @TestMetadata("ConstructorWithNewTypeParams.java") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); } @TestMetadata("ConstructorWithParentTypeParams.java") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); } @TestMetadata("ConstructorWithSeveralParams.java") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); } @TestMetadata("ConstructorWithoutParams.java") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); } @TestMetadata("CustomProjectionKind.java") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); } @TestMetadata("MethodWithFunctionTypes.java") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); } @TestMetadata("MethodWithGenerics.java") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); } @TestMetadata("MethodWithMappedClasses.java") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); } @TestMetadata("MethodWithTypeParameters.java") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); } @TestMetadata("MethodWithVararg.java") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); } @TestMetadata("PropertyArrayTypes.java") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); } @TestMetadata("PropertyComplexTypes.java") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); } @TestMetadata("PropertySimpleType.java") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); } @TestMetadata("StarProjection.java") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInError() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("WrongProjectionKind.java") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); } @TestMetadata("WrongReturnTypeStructure.java") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); } @TestMetadata("WrongTypeParameterBoundStructure1.java") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); } @TestMetadata("WrongValueParameterStructure1.java") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); } } @@ -730,154 +650,139 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.java") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.java") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); } @TestMetadata("DeeplySubstitutedClassParameter.java") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); } @TestMetadata("DeeplySubstitutedClassParameter2.java") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); } @TestMetadata("InheritNotVararg.java") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java"); } @TestMetadata("InheritNotVarargInteger.java") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); } @TestMetadata("InheritNotVarargNotNull.java") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); } @TestMetadata("InheritNotVarargPrimitive.java") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); } @TestMetadata("InheritNullability.java") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNullability.java"); } @TestMetadata("InheritVararg.java") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java"); } @TestMetadata("InheritVarargInteger.java") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); } @TestMetadata("InheritVarargNotNull.java") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); } @TestMetadata("InheritVarargPrimitive.java") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); } @TestMetadata("Kt3302.java") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.java"); } @TestMetadata("MutableToReadOnly.java") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); } @TestMetadata("NotNullToNullable.java") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.java"); } @TestMetadata("NullableToNotNull.java") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.java"); } @TestMetadata("NullableToNotNullKotlinSignature.java") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); } @TestMetadata("OverrideWithErasedParameter.java") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); } @TestMetadata("ReadOnlyToMutable.java") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); } @TestMetadata("SubclassFromGenericAndNot.java") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); } @TestMetadata("SubstitutedClassParameter.java") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); } @TestMetadata("SubstitutedClassParameters.java") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); } } @@ -885,40 +790,38 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.java") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); } @TestMetadata("AddNotNullSameJavaType.java") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); } @TestMetadata("AddNullabilityJavaSubtype.java") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); } @TestMetadata("AddNullabilitySameGenericType1.java") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); } @TestMetadata("AddNullabilitySameGenericType2.java") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); } @TestMetadata("AddNullabilitySameJavaType.java") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); } public void testAllFilesPresentInReturn() throws Exception { @@ -927,170 +830,142 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestMetadata("CantMakeImmutableInSubclass.java") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); } @TestMetadata("DeeplySubstitutedClassParameter.java") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); } @TestMetadata("DeeplySubstitutedClassParameter2.java") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); } @TestMetadata("HalfSubstitutedTypeParameters.java") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.java") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); } @TestMetadata("InheritNullabilityJavaSubtype.java") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); } @TestMetadata("InheritNullabilitySameGenericType.java") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); } @TestMetadata("InheritNullabilitySameJavaType.java") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); } @TestMetadata("InheritProjectionKind.java") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritProjectionKind.java"); } @TestMetadata("InheritReadOnlinessOfArgument.java") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); } @TestMetadata("InheritReadOnlinessSameClass.java") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); } @TestMetadata("InheritReadOnlinessSubclass.java") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); } @TestMetadata("SameProjectionKind.java") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SameProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SameProjectionKind.java"); } @TestMetadata("SubclassFromGenericAndNot.java") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); } @TestMetadata("SubclassOfCollection.java") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.java"); } @TestMetadata("SubclassOfMapEntry.java") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); } @TestMetadata("SubstitutedClassParameter.java") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); } @TestMetadata("SubstitutedClassParameters.java") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.java") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.java") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.java") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); } @TestMetadata("TwoSuperclassesMutableAndNot.java") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.java") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.java") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); } @TestMetadata("TwoSuperclassesSupplementNotNull.java") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); } @TestMetadata("TypeParamOfClass.java") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.java"); } @TestMetadata("TypeParamOfClassSubstituted.java") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); } @TestMetadata("TypeParamOfFun.java") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.java"); } } @@ -1098,50 +973,47 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InheritNullability.java") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java"); } @TestMetadata("TwoBounds.java") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java"); } @TestMetadata("TwoSuperclasses.java") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); } @TestMetadata("TwoTypeParameters.java") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); } @TestMetadata("UseParameterAsUpperBound.java") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); } @TestMetadata("UseParameterInUpperBound.java") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.java") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); } } } @@ -1151,26 +1023,27 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/library"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); } @TestMetadata("LoadIterator.java") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); } @TestMetadata("Max.java") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/Max.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/Max.java"); } } @@ -1178,14 +1051,17 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/modality"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.java") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); } } @@ -1193,38 +1069,37 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mutability extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/mutability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); } @TestMetadata("LoadIterableWithConflict.java") public void testLoadIterableWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); } @TestMetadata("LoadIterableWithNullability.java") public void testLoadIterableWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); } @TestMetadata("LoadIterableWithPropagation.java") public void testLoadIterableWithPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); } @TestMetadata("ReadOnlyExtendsWildcard.java") public void testReadOnlyExtendsWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); } } @@ -1232,38 +1107,37 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/notNull"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.java") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); } @TestMetadata("NotNullIntArray.java") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); } @TestMetadata("NotNullMethod.java") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); } @TestMetadata("NotNullObjectArray.java") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); } @TestMetadata("NotNullParameter.java") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); } } @@ -1271,26 +1145,27 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedPackage extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedPackage"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ProtectedPackageConstructor.java") public void testProtectedPackageConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); } @TestMetadata("ProtectedPackageFun.java") public void testProtectedPackageFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); } @TestMetadata("ProtectedPackageProperty.java") public void testProtectedPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); } } @@ -1298,14 +1173,17 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedStatic extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedStatic"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorInProtectedStaticNestedClass.java") public void testConstructorInProtectedStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); } } @@ -1313,14 +1191,17 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rendering extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRendering() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/rendering"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Rendering.java") public void testRendering() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); } } @@ -1328,206 +1209,187 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/sam"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Comparator.java") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Comparator.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Comparator.java"); } @TestMetadata("DifferentParametersCount.java") public void testDifferentParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/DifferentParametersCount.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/DifferentParametersCount.java"); } @TestMetadata("FakeStaticOverrides.java") public void testFakeStaticOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/FakeStaticOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/FakeStaticOverrides.java"); } @TestMetadata("FilenameFilter.java") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/FilenameFilter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/FilenameFilter.java"); } @TestMetadata("GenericInterfaceParameterWithSelfBound.java") public void testGenericInterfaceParameterWithSelfBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.java"); } @TestMetadata("GenericInterfaceParametersWithBounds.java") public void testGenericInterfaceParametersWithBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.java"); } @TestMetadata("GenericMethodParameters.java") public void testGenericMethodParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.java"); } @TestMetadata("InterfaceWithObjectMethod.java") public void testInterfaceWithObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/InterfaceWithObjectMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/InterfaceWithObjectMethod.java"); } @TestMetadata("Nested.java") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Nested.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Nested.java"); } @TestMetadata("Runnable.java") public void testRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Runnable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Runnable.java"); } @TestMetadata("SamSubinterfaceOfTwo.java") public void testSamSubinterfaceOfTwo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.java"); } @TestMetadata("SamSubinterfaceOverridding.java") public void testSamSubinterfaceOverridding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOverridding.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOverridding.java"); } @TestMetadata("StaticOverrides.java") public void testStaticOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java"); } @TestMetadata("SubstitutedSamInterface.java") public void testSubstitutedSamInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java"); } @TestMetadata("SubstitutedSamInterfaceSubclassOfBuiltin.java") public void testSubstitutedSamInterfaceSubclassOfBuiltin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.java"); } @TestMetadata("VarargParameter.java") public void testVarargParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/VarargParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/VarargParameter.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/sam/adapters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Adapters extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/sam/adapters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousAdapters.java") public void testAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.java"); } @TestMetadata("Basic.java") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/Basic.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/Basic.java"); } @TestMetadata("Constructor.java") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.java"); } @TestMetadata("ConstructorWithAnnotations.java") public void testConstructorWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.java"); } @TestMetadata("DeepSamLoop.java") public void testDeepSamLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.java"); } @TestMetadata("NoSamForClassTypeParameter.java") public void testNoSamForClassTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForClassTypeParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForClassTypeParameter.java"); } @TestMetadata("NoSamForMethodTypeParameter.java") public void testNoSamForMethodTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForMethodTypeParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForMethodTypeParameter.java"); } @TestMetadata("NonTrivialFunctionType.java") public void testNonTrivialFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.java"); } @TestMetadata("PrivateSamAdapter.java") public void testPrivateSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.java"); } @TestMetadata("SelfAsParameter.java") public void testSelfAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.java"); } @TestMetadata("SeveralSamParameters.java") public void testSeveralSamParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.java"); } @TestMetadata("TypeParameterOfClass.java") public void testTypeParameterOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.java"); } @TestMetadata("TypeParameterOfMethod.java") public void testTypeParameterOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.java"); } @TestMetadata("TypeParameterOfOuterClass.java") public void testTypeParameterOfOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AdapterDoesntOverrideDeclaration.java") public void testAdapterDoesntOverrideDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/AdapterDoesntOverrideDeclaration.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/AdapterDoesntOverrideDeclaration.java"); } public void testAllFilesPresentInInheritance() throws Exception { @@ -1536,56 +1398,47 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestMetadata("InheritedAdapterAndDeclaration.java") public void testInheritedAdapterAndDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAdapterAndDeclaration.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAdapterAndDeclaration.java"); } @TestMetadata("InheritedAmbiguousAdapters.java") public void testInheritedAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAmbiguousAdapters.java"); } @TestMetadata("InheritedAndOverriddenAmbiguousAdapters.java") public void testInheritedAndOverriddenAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAndOverriddenAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAndOverriddenAmbiguousAdapters.java"); } @TestMetadata("InheritedOverridden.java") public void testInheritedOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverridden.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverridden.java"); } @TestMetadata("InheritedOverriddenAdapter.java") public void testInheritedOverriddenAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverriddenAdapter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverriddenAdapter.java"); } @TestMetadata("InheritedSameAdapters.java") public void testInheritedSameAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdapters.java"); } @TestMetadata("InheritedSameAdaptersWithSubstitution.java") public void testInheritedSameAdaptersWithSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.java"); } @TestMetadata("InheritedSimple.java") public void testInheritedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.java"); } @TestMetadata("OverriddenAmbiguousAdapters.java") public void testOverriddenAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/OverriddenAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/OverriddenAmbiguousAdapters.java"); } } } @@ -1595,14 +1448,17 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("StableName.java") public void testStableName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); } } @@ -1610,62 +1466,57 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignaturePropagation extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignaturePropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signaturePropagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArraysInSubtypes.java") public void testArraysInSubtypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); } @TestMetadata("MethodTypeParameterErased.java") public void testMethodTypeParameterErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); } @TestMetadata("RawSuperType.java") public void testRawSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); } @TestMetadata("RawSuperTypeWithBound.java") public void testRawSuperTypeWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBound.java") public void testRawSuperTypeWithRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBoundMultipleParameters.java") public void testRawSuperTypeWithRecursiveBoundMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); } @TestMetadata("ReturnInnerSubclassOfSupersInner.java") public void testReturnInnerSubclassOfSupersInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); } @TestMetadata("SubclassWithRawType.java") public void testSubclassWithRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); } @TestMetadata("TwoSuperclassesInconsistentGenericTypes.java") public void testTwoSuperclassesInconsistentGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); } } @@ -1673,74 +1524,67 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Static extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/static"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DeeplyInnerClass.java") public void testDeeplyInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); } @TestMetadata("DeeplyNestedStatic.java") public void testDeeplyNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); } @TestMetadata("Enum.java") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Enum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Enum.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Simple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Simple.java"); } @TestMetadata("StaticFinal.java") public void testStaticFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); } @TestMetadata("StaticMembersFromParentClass.java") public void testStaticMembersFromParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); } @TestMetadata("StaticMembersFromParentClassVisibility.java") public void testStaticMembersFromParentClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); } @TestMetadata("StaticMembersFromParentInterface.java") public void testStaticMembersFromParentInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); } @TestMetadata("StaticMembersInEnum.java") public void testStaticMembersInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); } @TestMetadata("StaticMembersInEnumFromParents.java") public void testStaticMembersInEnumFromParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); } } @@ -1748,20 +1592,22 @@ public class LoadJavaWithFastClassReadingTestGenerated extends AbstractLoadJavaW @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaWithFastClassReadingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/vararg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("VarargInt.java") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); } @TestMetadata("VarargString.java") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadKotlinWithTypeTableTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadKotlinWithTypeTableTestGenerated.java index 0f578d90647..d36b0b73c05 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadKotlinWithTypeTableTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/LoadKotlinWithTypeTableTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,118 +33,109 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.kt") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); } @TestMetadata("AnnotatedMethod.kt") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); } @TestMetadata("AnnotationInAnnotationArguments.kt") public void testAnnotationInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); } @TestMetadata("EnumArgumentWithCustomToString.kt") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); } @TestMetadata("MultiDimensionalArrayMethod.kt") public void testMultiDimensionalArrayMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); } @TestMetadata("PrimitiveArrayArguments.kt") public void testPrimitiveArrayArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); } @TestMetadata("TargetedAnnotation.kt") public void testTargetedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembers extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectPropertyField.kt") public void testClassObjectPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); } } @@ -148,98 +143,87 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInClassObject.kt") public void testAnnotationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); } @TestMetadata("DollarsInAnnotationName.kt") public void testDollarsInAnnotationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); } @TestMetadata("MultipleAnnotations.kt") public void testMultipleAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); } @TestMetadata("NestedAnnotation.kt") public void testNestedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); } @TestMetadata("Retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); } @TestMetadata("WithArgument.kt") public void testWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); } @TestMetadata("WithMultipleArguments.kt") public void testWithMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); } } @@ -247,56 +231,52 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); } @TestMetadata("EnumArrayArgument.kt") public void testEnumArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); } @TestMetadata("StringArrayArgument.kt") public void testStringArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); } } @@ -304,80 +284,72 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); } @TestMetadata("ExtensionFunctionInClass.kt") public void testExtensionFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); } @TestMetadata("ExtensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); } @TestMetadata("FunctionInClass.kt") public void testFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); } @TestMetadata("FunctionInTrait.kt") public void testFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); } @TestMetadata("InnerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); } @TestMetadata("ManyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); } @TestMetadata("PropertySetterInClass.kt") public void testPropertySetterInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); } @TestMetadata("TopLevelPropertySetter.kt") public void testTopLevelPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); } } @@ -385,56 +357,52 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertiesWithoutBackingFields extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); } @TestMetadata("ExtensionsWithSameNameClass.kt") public void testExtensionsWithSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); } @TestMetadata("ExtensionsWithSameNamePackage.kt") public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); } @TestMetadata("NestedTrait.kt") public void testNestedTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); } @TestMetadata("TraitClassObject.kt") public void testTraitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); } } @@ -442,56 +410,52 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassLiteralArgument.kt") public void testClassLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); } @TestMetadata("ReceiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); } @TestMetadata("SimpleTypeAnnotation.kt") public void testSimpleTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); } @TestMetadata("SupertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); } @TestMetadata("TypeAnnotationWithArguments.kt") public void testTypeAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); } @TestMetadata("TypeArgument.kt") public void testTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); } @TestMetadata("TypeParameterAnnotation.kt") public void testTypeParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); } @TestMetadata("TypeParameterAnnotationWithArguments.kt") public void testTypeParameterAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); } } @@ -499,26 +463,27 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateTarget.kt") public void testDelegateTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); } @TestMetadata("FieldTarget.kt") public void testFieldTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); } @TestMetadata("ReceiverTarget.kt") public void testReceiverTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); } } } @@ -527,262 +492,229 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); } @TestMetadata("ClassInParam.kt") public void testClassInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); } @TestMetadata("ClassInnerClass.kt") public void testClassInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); } @TestMetadata("ClassMemberConflict.kt") public void testClassMemberConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); } @TestMetadata("ClassOutParam.kt") public void testClassOutParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); } @TestMetadata("ClassParam.kt") public void testClassParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); } @TestMetadata("ClassParamReferencesParam.kt") public void testClassParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); } @TestMetadata("ClassParamReferencesParam2.kt") public void testClassParamReferencesParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); } @TestMetadata("ClassParamReferencesSelf.kt") public void testClassParamReferencesSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); } @TestMetadata("ClassParamUpperClassBound.kt") public void testClassParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); } @TestMetadata("ClassParamUpperClassInterfaceBound.kt") public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); } @TestMetadata("ClassParamUpperInterfaceBound.kt") public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); } @TestMetadata("ClassTwoParams.kt") public void testClassTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); } @TestMetadata("ClassTwoParams2.kt") public void testClassTwoParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); } @TestMetadata("EnumWithGenericConstructorParameter.kt") public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); } @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); } @TestMetadata("InheritClassSimple.kt") public void testInheritClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); } @TestMetadata("InheritClassWithParam.kt") public void testInheritClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); } @TestMetadata("InheritSubstitutedMethod.kt") public void testInheritSubstitutedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); } @TestMetadata("InheritTraitWithFunctionParam.kt") public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); } @TestMetadata("InheritTraitWithParam.kt") public void testInheritTraitWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); } @TestMetadata("InnerClassExtendInnerClass.kt") public void testInnerClassExtendInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); } @TestMetadata("InnerGenericClass.kt") public void testInnerGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); } @TestMetadata("InnerTypes.kt") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); } @TestMetadata("NamedObjectInClass.kt") public void testNamedObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); } @TestMetadata("NamedObjectInClassObject.kt") public void testNamedObjectInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); } @TestMetadata("NamedObjectInNamedObject.kt") public void testNamedObjectInNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); } @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); } @TestMetadata("NestedClassExtendNestedClass.kt") public void testNestedClassExtendNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); } @TestMetadata("NestedGenericClass.kt") public void testNestedGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); } @TestMetadata("RecursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); } @TestMetadata("SingleAbstractMethod.kt") public void testSingleAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.kt") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); } @TestMetadata("JavaBeanAbstractGetter.kt") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); } @TestMetadata("JavaBeanVal.kt") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); } @TestMetadata("JavaBeanVar.kt") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); } @TestMetadata("JavaBeanVarOfGenericType.kt") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); } @TestMetadata("TwoSetters.kt") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); } } } @@ -791,38 +723,37 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassFun extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassInParamUsedInFun.kt") public void testClassInParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); } @TestMetadata("ClassParamUsedInFun.kt") public void testClassParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); } @TestMetadata("FunDelegationToTraitImpl.kt") public void testFunDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); } @TestMetadata("FunInParamSuper.kt") public void testFunInParamSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); } @TestMetadata("TraitOpenFun.kt") public void testTraitOpenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); } } @@ -830,86 +761,77 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectDeclaresVal.kt") public void testClassObjectDeclaresVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); } @TestMetadata("ClassObjectDeclaresVar.kt") public void testClassObjectDeclaresVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); } @TestMetadata("ClassObjectDefaultVisibility.kt") public void testClassObjectDefaultVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); } @TestMetadata("ClassObjectExplicitVisibility.kt") public void testClassObjectExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); } @TestMetadata("ClassObjectExtendsTrait.kt") public void testClassObjectExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); } @TestMetadata("ClassObjectExtendsTraitWithTP.kt") public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); } @TestMetadata("classObjectInClassStaticFields.kt") public void testClassObjectInClassStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); } @TestMetadata("classObjectInTraitStaticFields.kt") public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); } @TestMetadata("ClassObjectPropertyInClass.kt") public void testClassObjectPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); } @TestMetadata("InnerClassInClassObject.kt") public void testInnerClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); } @TestMetadata("SimpleClassObject.kt") public void testSimpleClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); } } @@ -917,124 +839,114 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); } @TestMetadata("Constructor1.kt") public void testConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); } @TestMetadata("Constructor1WithParamDefaultValue.kt") public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); } @TestMetadata("Constructor2WithOneParamDefaultValue.kt") public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorGenericDeep.kt") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); } @TestMetadata("ConstructorGenericSimple.kt") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); } @TestMetadata("ConstructorGenericUpperBound.kt") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); } @TestMetadata("ConstructorWithTwoDefArgs.kt") public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); } @TestMetadata("ConstructorWithTwoTypeParameters.kt") public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); } @TestMetadata("InnerClassConstructorWithDefArgs.kt") public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); } @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorNonLastVararg.kt") public void testConstructorNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); } @TestMetadata("ConstructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); } } } @@ -1043,14 +955,17 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); } } @@ -1058,32 +973,32 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MixedComponents.kt") public void testMixedComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); } @TestMetadata("OneVal.kt") public void testOneVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); } @TestMetadata("TwoVals.kt") public void testTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); } @TestMetadata("TwoVars.kt") public void testTwoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); } } @@ -1091,44 +1006,42 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumVisibility.kt") public void testEnumVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); } @TestMetadata("enumWithConstuctor.kt") public void testEnumWithConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); } @TestMetadata("enumWithInnerClasses.kt") public void testEnumWithInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); } @TestMetadata("innerEnumExistingClassObject.kt") public void testInnerEnumExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); } } @@ -1136,222 +1049,195 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromLoadJava extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromLoadJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.kt") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); } @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); } @TestMetadata("classObjectAnnotation.kt") public void testClassObjectAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); } @TestMetadata("ClassWithConstVal.kt") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); } @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); } @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); } @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); } @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); } @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); } @TestMetadata("ClassWithTypePRefSelfAndClass.kt") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); } @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); } @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); } @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypes.kt") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); } @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); } @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); } @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); } @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); } @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); } @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); } @TestMetadata("MyException.kt") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); } @TestMetadata("objectMembers.kt") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); } @TestMetadata("packageLevelObject.kt") public void testPackageLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); } @TestMetadata("RemoveRedundantProjectionKind.kt") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); } @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); } @TestMetadata("UnboundWildcard.kt") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.kt") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -1360,102 +1246,90 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestMetadata("ArrayType.kt") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); } @TestMetadata("ConstructorWithNewTypeParams.kt") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); } @TestMetadata("ConstructorWithParentTypeParams.kt") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); } @TestMetadata("ConstructorWithSeveralParams.kt") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); } @TestMetadata("ConstructorWithoutParams.kt") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); } @TestMetadata("CustomProjectionKind.kt") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); } @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); } @TestMetadata("MethodWithGenerics.kt") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); } @TestMetadata("MethodWithMappedClasses.kt") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); } @TestMetadata("MethodWithTypeParameters.kt") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); } @TestMetadata("MethodWithVararg.kt") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); } @TestMetadata("PropertyArrayTypes.kt") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); } @TestMetadata("PropertyComplexTypes.kt") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); } @TestMetadata("PropertySimpleType.kt") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddingNullability.kt") public void testAddingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); } public void testAllFilesPresentInError() throws Exception { @@ -1464,158 +1338,132 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestMetadata("ConflictingProjectionKind.kt") public void testConflictingProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); } @TestMetadata("ExplicitFieldGettersAndSetters.kt") public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); } @TestMetadata("ExtraUpperBound.kt") public void testExtraUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); } @TestMetadata("MissingUpperBound.kt") public void testMissingUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); } @TestMetadata("NoFieldTypeRef.kt") public void testNoFieldTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); } @TestMetadata("NotVarargReplacedWithVararg.kt") public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); } @TestMetadata("RedundantProjectionKind.kt") public void testRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); } @TestMetadata("ReturnTypeMissing.kt") public void testReturnTypeMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); } @TestMetadata("SyntaxErrorInFieldAnnotation.kt") public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); } @TestMetadata("VarargReplacedWithNotVararg.kt") public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); } @TestMetadata("WrongFieldInitializer.kt") public void testWrongFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); } @TestMetadata("WrongFieldMutability.kt") public void testWrongFieldMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); } @TestMetadata("WrongFieldName.kt") public void testWrongFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); } @TestMetadata("WrongMethodName.kt") public void testWrongMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); } @TestMetadata("WrongProjectionKind.kt") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); } @TestMetadata("WrongReturnTypeStructure.kt") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); } @TestMetadata("WrongTypeName1.kt") public void testWrongTypeName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); } @TestMetadata("WrongTypeName2.kt") public void testWrongTypeName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); } @TestMetadata("WrongTypeName3.kt") public void testWrongTypeName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); } @TestMetadata("WrongTypeParameterBoundStructure1.kt") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); } @TestMetadata("WrongTypeParameterBoundStructure2.kt") public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); } @TestMetadata("WrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); } @TestMetadata("WrongValueParameterStructure1.kt") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); } @TestMetadata("WrongValueParameterStructure2.kt") public void testWrongValueParameterStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); } @TestMetadata("WrongValueParametersCount.kt") public void testWrongValueParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); } } @@ -1623,178 +1471,159 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.kt") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.kt") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); } @TestMetadata("ChangeProjectionKind2.kt") public void testChangeProjectionKind2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); } @TestMetadata("InheritNotVararg.kt") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); } @TestMetadata("InheritNotVarargInteger.kt") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); } @TestMetadata("InheritNotVarargNotNull.kt") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); } @TestMetadata("InheritNotVarargPrimitive.kt") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); } @TestMetadata("InheritVararg.kt") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); } @TestMetadata("InheritVarargInteger.kt") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); } @TestMetadata("InheritVarargNotNull.kt") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); } @TestMetadata("InheritVarargPrimitive.kt") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); } @TestMetadata("Kt3302.kt") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); } @TestMetadata("MutableToReadOnly.kt") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); } @TestMetadata("NotNullToNullable.kt") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); } @TestMetadata("NullableToNotNull.kt") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); } @TestMetadata("NullableToNotNullKotlinSignature.kt") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); } @TestMetadata("OverrideWithErasedParameter.kt") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); } @TestMetadata("ReadOnlyToMutable.kt") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); } } @@ -1802,40 +1631,38 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.kt") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); } @TestMetadata("AddNotNullSameJavaType.kt") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); } @TestMetadata("AddNullabilityJavaSubtype.kt") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); } @TestMetadata("AddNullabilitySameGenericType1.kt") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); } @TestMetadata("AddNullabilitySameGenericType2.kt") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); } @TestMetadata("AddNullabilitySameJavaType.kt") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); } public void testAllFilesPresentInReturn() throws Exception { @@ -1844,170 +1671,142 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestMetadata("CantMakeImmutableInSubclass.kt") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("HalfSubstitutedTypeParameters.kt") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); } @TestMetadata("InheritNullabilityJavaSubtype.kt") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); } @TestMetadata("InheritNullabilitySameGenericType.kt") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); } @TestMetadata("InheritNullabilitySameJavaType.kt") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnlinessOfArgument.kt") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); } @TestMetadata("InheritReadOnlinessSameClass.kt") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); } @TestMetadata("InheritReadOnlinessSubclass.kt") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); } @TestMetadata("SameProjectionKind.kt") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubclassOfCollection.kt") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); } @TestMetadata("SubclassOfMapEntry.kt") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); } @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); } @TestMetadata("TwoSuperclassesSupplementNotNull.kt") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); } @TestMetadata("TypeParamOfClass.kt") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); } @TestMetadata("TypeParamOfClassSubstituted.kt") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); } @TestMetadata("TypeParamOfFun.kt") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); } } @@ -2015,62 +1814,57 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); } @TestMetadata("TwoBounds.kt") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); } @TestMetadata("TwoSuperclasses.kt") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); } @TestMetadata("TwoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); } @TestMetadata("UseParameterAsUpperBound.kt") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); } @TestMetadata("UseParameterInUpperBound.kt") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); } } } @@ -2080,26 +1874,27 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); } @TestMetadata("LoadIterator.kt") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); } @TestMetadata("Max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); } } @@ -2107,14 +1902,17 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.kt") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); } } @@ -2122,38 +1920,37 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.kt") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); } @TestMetadata("NotNullIntArray.kt") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); } @TestMetadata("NotNullMethod.kt") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); } @TestMetadata("NotNullObjectArray.kt") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); } @TestMetadata("NotNullParameter.kt") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); } } } @@ -2162,142 +1959,129 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fun extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); } @TestMetadata("DeclaredMemberOverridesDelegated.kt") public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); } @TestMetadata("InfixKeyword.kt") public void testInfixKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); } @TestMetadata("InheritValAndVar.kt") public void testInheritValAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); } @TestMetadata("InheritValsDifferentTypes.kt") public void testInheritValsDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); } @TestMetadata("NoSamAdapter.kt") public void testNoSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); } @TestMetadata("NoSamConstructor.kt") public void testNoSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); } @TestMetadata("OperatorKeyword.kt") public void testOperatorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); } @TestMetadata("PropagateDeepSubclass.kt") public void testPropagateDeepSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); } @TestMetadata("PropagateSubclassOfComparable.kt") public void testPropagateSubclassOfComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithTypeVariables extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunGenericParam.kt") public void testFunGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); } @TestMetadata("FunParamParam.kt") public void testFunParamParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); } @TestMetadata("FunParamParamErased.kt") public void testFunParamParamErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); } @TestMetadata("FunParamReferencesParam.kt") public void testFunParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); } @TestMetadata("FunParamTwoUpperBounds.kt") public void testFunParamTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); } @TestMetadata("FunParamUpperClassBound.kt") public void testFunParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); } @TestMetadata("FunParamUpperClassInterfaceBound.kt") public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); } @TestMetadata("FunParamUpperInterfaceBound.kt") public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); } @TestMetadata("FunParamVaragParam.kt") public void testFunParamVaragParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); } @TestMetadata("FunTwoTypeParams.kt") public void testFunTwoTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); } } @@ -2305,38 +2089,37 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithoutTypeVariables extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunClassParamNotNull.kt") public void testFunClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); } @TestMetadata("FunClassParamNullable.kt") public void testFunClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); } @TestMetadata("FunParamNullable.kt") public void testFunParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); } @TestMetadata("ReturnTypeClassParamNotNull.kt") public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); } @TestMetadata("ReturnTypeClassParamNullable.kt") public void testReturnTypeClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); } } @@ -2344,104 +2127,92 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonGeneric extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassFun.kt") public void testClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); } @TestMetadata("ClassFunGetFoo.kt") public void testClassFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); } @TestMetadata("ClassFunGetFooSetFoo.kt") public void testClassFunGetFooSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); } @TestMetadata("ClassFunSetFoo.kt") public void testClassFunSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); } @TestMetadata("ExtFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); } @TestMetadata("ExtFunInClass.kt") public void testExtFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); } @TestMetadata("FunDefaultArg.kt") public void testFunDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); } @TestMetadata("FunParamNotNull.kt") public void testFunParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); } @TestMetadata("FunVarargInt.kt") public void testFunVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); } @TestMetadata("FunVarargInteger.kt") public void testFunVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); } @TestMetadata("ModifierAbstract.kt") public void testModifierAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); } @TestMetadata("ModifierOpen.kt") public void testModifierOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); } @TestMetadata("NsFun.kt") public void testNsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); } @TestMetadata("NsFunGetFoo.kt") public void testNsFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); } @TestMetadata("ReturnTypeNotNull.kt") public void testReturnTypeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); } @TestMetadata("ReturnTypeNullable.kt") public void testReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); } } @@ -2449,26 +2220,27 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonLastVararg.kt") public void testNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); } @TestMetadata("VarargInt.kt") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); } @TestMetadata("VarargString.kt") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); } } } @@ -2477,14 +2249,17 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); } } @@ -2492,44 +2267,42 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberOrder extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callablesNameClash.kt") public void testCallablesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); } @TestMetadata("extensionMembers.kt") public void testExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); } @TestMetadata("extensionPropertiesNameClash.kt") public void testExtensionPropertiesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); } } @@ -2537,26 +2310,27 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deepInnerGeneric.kt") public void testDeepInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); } @TestMetadata("innerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); } @TestMetadata("membersReferenceOuterTP.kt") public void testMembersReferenceOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); } } @@ -2564,20 +2338,22 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notnullTypeArgument.kt") public void testNotnullTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); } } @@ -2585,274 +2361,239 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Prop extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); } @TestMetadata("ClassValAbstract.kt") public void testClassValAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); } @TestMetadata("CollectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); } @TestMetadata("ExtValClass.kt") public void testExtValClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); } @TestMetadata("ExtValInClass.kt") public void testExtValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); } @TestMetadata("ExtValInt.kt") public void testExtValInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); } @TestMetadata("ExtValIntCharSequence.kt") public void testExtValIntCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); } @TestMetadata("ExtValIntCharSequenceQ.kt") public void testExtValIntCharSequenceQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); } @TestMetadata("ExtValIntListQOfIntInClass.kt") public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); } @TestMetadata("ExtValIntTInClass.kt") public void testExtValIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); } @TestMetadata("ExtValIntTQInClass.kt") public void testExtValIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); } @TestMetadata("ExtValTIntInClass.kt") public void testExtValTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); } @TestMetadata("ExtVarClass.kt") public void testExtVarClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); } @TestMetadata("ExtVarInClass.kt") public void testExtVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); } @TestMetadata("ExtVarInt.kt") public void testExtVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); } @TestMetadata("ExtVarIntTInClass.kt") public void testExtVarIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); } @TestMetadata("ExtVarIntTQInClass.kt") public void testExtVarIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); } @TestMetadata("ExtVarMapPQInt.kt") public void testExtVarMapPQInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); } @TestMetadata("ExtVarTIntInClass.kt") public void testExtVarTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); } @TestMetadata("ExtVarTQIntInClass.kt") public void testExtVarTQIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); } @TestMetadata("ExtVarl.kt") public void testExtVarl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); } @TestMetadata("NsVal.kt") public void testNsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); } @TestMetadata("NsVar.kt") public void testNsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); } @TestMetadata("OverrideClassVal.kt") public void testOverrideClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); } @TestMetadata("OverrideTraitVal.kt") public void testOverrideTraitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); } @TestMetadata("PropFromSuperclass.kt") public void testPropFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); } @TestMetadata("TraitFinalVar.kt") public void testTraitFinalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); } @TestMetadata("TraitOpenVal.kt") public void testTraitOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); } @TestMetadata("VarDelegationToTraitImpl.kt") public void testVarDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); } @TestMetadata("VarWithDelegated.kt") public void testVarWithDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultAccessors extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); } @TestMetadata("ClassValParams.kt") public void testClassValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); } @TestMetadata("ClassValWithGet.kt") public void testClassValWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); } @TestMetadata("ClassVarModality.kt") public void testClassVarModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); } @TestMetadata("ClassVarParams.kt") public void testClassVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); } @TestMetadata("ClassVarWithGet.kt") public void testClassVarWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); } @TestMetadata("ClassVarWithSet.kt") public void testClassVarWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); } @TestMetadata("ExtValLong.kt") public void testExtValLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); } @TestMetadata("ExtVarLong.kt") public void testExtVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); } } } @@ -2861,194 +2602,167 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); } @TestMetadata("AnyQ.kt") public void testAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); } @TestMetadata("ArrayOfInNumber.kt") public void testArrayOfInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); } @TestMetadata("ArrayOfInteger.kt") public void testArrayOfInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); } @TestMetadata("ArrayOfOutNumber.kt") public void testArrayOfOutNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); } @TestMetadata("ArrayOfOutT.kt") public void testArrayOfOutT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); } @TestMetadata("ArrayOfString.kt") public void testArrayOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); } @TestMetadata("Function1IntString.kt") public void testFunction1IntString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); } @TestMetadata("jlInteger.kt") public void testJlInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); } @TestMetadata("jlIntegerQ.kt") public void testJlIntegerQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); } @TestMetadata("jlNumber.kt") public void testJlNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); } @TestMetadata("jlObject.kt") public void testJlObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); } @TestMetadata("jlObjectQ.kt") public void testJlObjectQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); } @TestMetadata("jlStringQ.kt") public void testJlStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); } @TestMetadata("ListOfAny.kt") public void testListOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); } @TestMetadata("ListOfAnyQ.kt") public void testListOfAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); } @TestMetadata("ListOfjlString.kt") public void testListOfjlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); } @TestMetadata("Nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); } @TestMetadata("NothingQ.kt") public void testNothingQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); } @TestMetadata("platform.kt") public void testPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/String.kt"); } @TestMetadata("StringQ.kt") public void testStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); } @TestMetadata("Unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); } } @@ -3056,32 +2770,32 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); } @TestMetadata("TypeAliasToExtension.kt") public void testTypeAliasToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); } } @@ -3089,74 +2803,67 @@ public class LoadKotlinWithTypeTableTestGenerated extends AbstractLoadKotlinWith @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractLoadKotlinWithTypeTableTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InternalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); } @TestMetadata("InternalConstructor.kt") public void testInternalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); } @TestMetadata("InternalTopLevelMembers.kt") public void testInternalTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); } @TestMetadata("PrivateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); } @TestMetadata("PrivateClassMembers.kt") public void testPrivateClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); } @TestMetadata("PrivateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); } @TestMetadata("PrivateTopLevelFun.kt") public void testPrivateTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); } @TestMetadata("PrivateTopLevelVal.kt") public void testPrivateTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); } @TestMetadata("PropertyInConstructorExplicitVisibility.kt") public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); } @TestMetadata("TopLevelVarWithPrivateSetter.kt") public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/WriteSignatureTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/WriteSignatureTestGenerated.java index 2d882741d06..524c464bf12 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/WriteSignatureTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/WriteSignatureTestGenerated.java @@ -21,172 +21,154 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWriteSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayOfCharSequence.kt") public void testArrayOfCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ArrayOfCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/ArrayOfCharSequence.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ArrayOfInt.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/ArrayOfInt.kt"); } @TestMetadata("backingFieldForGenericDelegated.kt") public void testBackingFieldForGenericDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/backingFieldForGenericDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/backingFieldForGenericDelegated.kt"); } @TestMetadata("Comparable.kt") public void testComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/Comparable.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/Comparable.kt"); } @TestMetadata("DeepGenericInnerClass.kt") public void testDeepGenericInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/DeepGenericInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/DeepGenericInnerClass.kt"); } @TestMetadata("GenericInnerClass.kt") public void testGenericInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/GenericInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/GenericInnerClass.kt"); } @TestMetadata("GenericInnerClassWithSimpleOuter.kt") public void testGenericInnerClassWithSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/GenericInnerClassWithSimpleOuter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/GenericInnerClassWithSimpleOuter.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/Int.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/IntArray.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/IntQ.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/IntQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/jlString.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/jlString.kt"); } @TestMetadata("ListOfCharSequence.kt") public void testListOfCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ListOfCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/ListOfCharSequence.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/ListOfStar.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/ListOfStar.kt"); } @TestMetadata("MapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/MapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/MapEntry.kt"); } @TestMetadata("MutableMapEntry.kt") public void testMutableMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/MutableMapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/MutableMapEntry.kt"); } @TestMetadata("NonGeneric.kt") public void testNonGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/NonGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/NonGeneric.kt"); } @TestMetadata("StarProjectionInClass.kt") public void testStarProjectionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/StarProjectionInClass.kt"); } @TestMetadata("StarProjectionInSuper.kt") public void testStarProjectionInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionInSuper.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/StarProjectionInSuper.kt"); } @TestMetadata("StarProjectionOutsideClass.kt") public void testStarProjectionOutsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/StarProjectionOutsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/StarProjectionOutsideClass.kt"); } @TestMetadata("syntheticAccessorForGeneric.kt") public void testSyntheticAccessorForGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/syntheticAccessorForGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/syntheticAccessorForGeneric.kt"); } @TestMetadata("VarargCharSequence.kt") public void testVarargCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/VarargCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/VarargCharSequence.kt"); } @TestMetadata("VarargGeneric.kt") public void testVarargGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/VarargGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/VarargGeneric.kt"); } @TestMetadata("compiler/testData/writeSignature/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("kArrayClassOfJClass.kt") public void testKArrayClassOfJClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kArrayClassOfJClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/annotations/kArrayClassOfJClass.kt"); } @TestMetadata("kArrayClassOfKClass.kt") public void testKArrayClassOfKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kArrayClassOfKClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/annotations/kArrayClassOfKClass.kt"); } @TestMetadata("kClassBasic.kt") public void testKClassBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kClassBasic.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/annotations/kClassBasic.kt"); } @TestMetadata("kClassInt.kt") public void testKClassInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/annotations/kClassInt.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/annotations/kClassInt.kt"); } } @@ -194,26 +176,27 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructorReferenceInReturnType.kt") public void testConstructorReferenceInReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/callableReference/constructorReferenceInReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/callableReference/constructorReferenceInReturnType.kt"); } @TestMetadata("functionReferenceInvoke.kt") public void testFunctionReferenceInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/callableReference/functionReferenceInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/callableReference/functionReferenceInvoke.kt"); } @TestMetadata("propertyReferenceGet.kt") public void testPropertyReferenceGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/callableReference/propertyReferenceGet.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/callableReference/propertyReferenceGet.kt"); } } @@ -221,32 +204,32 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/Constructor0.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/constructor/Constructor0.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorCollectionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParameterAndValueParameterP.kt") public void testConstructorWithTypeParameterAndValueParameterP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameterAndValueParameterP.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/constructor/ConstructorWithTypeParameterAndValueParameterP.kt"); } } @@ -254,196 +237,174 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationSiteVariance extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationSiteVariance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/declarationSiteVariance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunctionTwoTypeParameters.kt") public void testFunctionTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/FunctionTwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/FunctionTwoTypeParameters.kt"); } @TestMetadata("GenericOverrides.kt") public void testGenericOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/GenericOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/GenericOverrides.kt"); } @TestMetadata("InInInPosition.kt") public void testInInInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InInInPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/InInInPosition.kt"); } @TestMetadata("InInOutPosition.kt") public void testInInOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InInOutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/InInOutPosition.kt"); } @TestMetadata("InOfInInInPosition.kt") public void testInOfInInInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfInInInPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/InOfInInInPosition.kt"); } @TestMetadata("InOfInInOutPosition.kt") public void testInOfInInOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfInInOutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/InOfInInOutPosition.kt"); } @TestMetadata("InOfOutInInPosition.kt") public void testInOfOutInInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInInPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInInPosition.kt"); } @TestMetadata("InOfOutInOutPosition.kt") public void testInOfOutInOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInOutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/InOfOutInOutPosition.kt"); } @TestMetadata("MappedSupertypeWithVariance.kt") public void testMappedSupertypeWithVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/MappedSupertypeWithVariance.kt"); } @TestMetadata("OpenMembersReturnType.kt") public void testOpenMembersReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OpenMembersReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OpenMembersReturnType.kt"); } @TestMetadata("OpenMembersValueParameter.kt") public void testOpenMembersValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OpenMembersValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OpenMembersValueParameter.kt"); } @TestMetadata("OutInField.kt") public void testOutInField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInField.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutInField.kt"); } @TestMetadata("OutInInPosition.kt") public void testOutInInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInInPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutInInPosition.kt"); } @TestMetadata("OutInOutPosition.kt") public void testOutInOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutInOutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutInOutPosition.kt"); } @TestMetadata("OutOfInInInPosition.kt") public void testOutOfInInInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInInPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInInPosition.kt"); } @TestMetadata("OutOfInInOutPosition.kt") public void testOutOfInInOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInOutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutOfInInOutPosition.kt"); } @TestMetadata("OutOfOutInInPosition.kt") public void testOutOfOutInInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInInPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInInPosition.kt"); } @TestMetadata("OutOfOutInOutPosition.kt") public void testOutOfOutInOutPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInOutPosition.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/OutOfOutInOutPosition.kt"); } @TestMetadata("PropertyGetterIn.kt") public void testPropertyGetterIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterIn.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterIn.kt"); } @TestMetadata("PropertyGetterOut.kt") public void testPropertyGetterOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterOut.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterOut.kt"); } @TestMetadata("PropertyGetterTwoParams.kt") public void testPropertyGetterTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterTwoParams.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/PropertyGetterTwoParams.kt"); } @TestMetadata("PropertySetterIn.kt") public void testPropertySetterIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterIn.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterIn.kt"); } @TestMetadata("PropertySetterOut.kt") public void testPropertySetterOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterOut.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/PropertySetterOut.kt"); } @TestMetadata("RedundantProjections.kt") public void testRedundantProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/RedundantProjections.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/RedundantProjections.kt"); } @TestMetadata("SuperClassWithVariance.kt") public void testSuperClassWithVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperClassWithVariance.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/SuperClassWithVariance.kt"); } @TestMetadata("SuperTraitWithVariance.kt") public void testSuperTraitWithVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/SuperTraitWithVariance.kt"); } @TestMetadata("SuperTypeWithVarianceInArguments.kt") public void testSuperTypeWithVarianceInArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/SuperTypeWithVarianceInArguments.kt"); } @TestMetadata("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmWildcardAnnotations extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmWildcardAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("onFunction.kt") public void testOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/onFunction.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/onFunction.kt"); } @TestMetadata("onTypes.kt") public void testOnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/onTypes.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/onTypes.kt"); } @TestMetadata("primitiveTypes.kt") public void testPrimitiveTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/primitiveTypes.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/jvmWildcardAnnotations/primitiveTypes.kt"); } } @@ -451,74 +412,67 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WildcardOptimization extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWildcardOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentOverridability.kt") public void testArgumentOverridability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/argumentOverridability.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/argumentOverridability.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/arrays.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/arrays.kt"); } @TestMetadata("complicatedInBounds.kt") public void testComplicatedInBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/complicatedInBounds.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/complicatedInBounds.kt"); } @TestMetadata("deepOut.kt") public void testDeepOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/deepOut.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/deepOut.kt"); } @TestMetadata("fields.kt") public void testFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/fields.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/fields.kt"); } @TestMetadata("finalReturnType.kt") public void testFinalReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/finalReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/finalReturnType.kt"); } @TestMetadata("outIn.kt") public void testOutIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/outIn.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/outIn.kt"); } @TestMetadata("outInv.kt") public void testOutInv() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/outInv.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/outInv.kt"); } @TestMetadata("topLevelIn.kt") public void testTopLevelIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/topLevelIn.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/topLevelIn.kt"); } @TestMetadata("topLevelInv.kt") public void testTopLevelInv() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/topLevelInv.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/topLevelInv.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/typeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/declarationSiteVariance/wildcardOptimization/typeParameter.kt"); } } } @@ -527,26 +481,27 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultImpls extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultImpls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/defaultImpls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionTypeParameterClash.kt") public void testFunctionTypeParameterClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/defaultImpls/functionTypeParameterClash.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/defaultImpls/functionTypeParameterClash.kt"); } @TestMetadata("functionTypeParameterClashWith_I.kt") public void testFunctionTypeParameterClashWith_I() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/defaultImpls/functionTypeParameterClashWith_I.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/defaultImpls/functionTypeParameterClashWith_I.kt"); } @TestMetadata("propertyTypeParameterClash.kt") public void testPropertyTypeParameterClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/defaultImpls/propertyTypeParameterClash.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/defaultImpls/propertyTypeParameterClash.kt"); } } @@ -554,74 +509,67 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicInlineClassDeclarationCodegen.kt") public void testBasicInlineClassDeclarationCodegen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/basicInlineClassDeclarationCodegen.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/basicInlineClassDeclarationCodegen.kt"); } @TestMetadata("genericInlineClassBasedOnGenericType.kt") public void testGenericInlineClassBasedOnGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/genericInlineClassBasedOnGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/genericInlineClassBasedOnGenericType.kt"); } @TestMetadata("genericInlineClassWithDefaultTypeParameter.kt") public void testGenericInlineClassWithDefaultTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/genericInlineClassWithDefaultTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/genericInlineClassWithDefaultTypeParameter.kt"); } @TestMetadata("genericInlineClassWithNotNullTypeParameter.kt") public void testGenericInlineClassWithNotNullTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/genericInlineClassWithNotNullTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/genericInlineClassWithNotNullTypeParameter.kt"); } @TestMetadata("inlineClassAsGenericArgument.kt") public void testInlineClassAsGenericArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/inlineClassAsGenericArgument.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/inlineClassAsGenericArgument.kt"); } @TestMetadata("inlineClassBasedOnOtherInlineClass.kt") public void testInlineClassBasedOnOtherInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/inlineClassBasedOnOtherInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/inlineClassBasedOnOtherInlineClass.kt"); } @TestMetadata("inlineClassWithComplexSubstitutedType.kt") public void testInlineClassWithComplexSubstitutedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/inlineClassWithComplexSubstitutedType.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/inlineClassWithComplexSubstitutedType.kt"); } @TestMetadata("inlineClassesInsideFunctionalTypes.kt") public void testInlineClassesInsideFunctionalTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/inlineClassesInsideFunctionalTypes.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/inlineClassesInsideFunctionalTypes.kt"); } @TestMetadata("nullableInlineClassType.kt") public void testNullableInlineClassType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/nullableInlineClassType.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/nullableInlineClassType.kt"); } @TestMetadata("simpleSignatureWithInlineClassTypesAsPrimitive.kt") public void testSimpleSignatureWithInlineClassTypesAsPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/simpleSignatureWithInlineClassTypesAsPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/simpleSignatureWithInlineClassTypesAsPrimitive.kt"); } @TestMetadata("simpleSignatureWithInlineClassTypesAsReference.kt") public void testSimpleSignatureWithInlineClassTypesAsReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/inlineClasses/simpleSignatureWithInlineClassTypesAsReference.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/inlineClasses/simpleSignatureWithInlineClassTypesAsReference.kt"); } } @@ -629,20 +577,22 @@ public class WriteSignatureTestGenerated extends AbstractWriteSignatureTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nothing extends AbstractWriteSignatureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNothing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/writeSignature/nothing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/nothing/nothing.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/nothing/nothing.kt"); } @TestMetadata("nullableNothing.kt") public void testNullableNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/writeSignature/nothing/nullableNothing.kt"); - doTest(fileName); + runTest("compiler/testData/writeSignature/nothing/nullableNothing.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJavaUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJavaUsingJavacTestGenerated.java index 6ce2ef7bb06..fa362dc29dc 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJavaUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/javac/LoadJavaUsingJavacTestGenerated.java @@ -23,472 +23,404 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJava extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.java") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); } @TestMetadata("ClassDoesNotOverrideMethod.java") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); } @TestMetadata("ClassWithConstVal.java") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); } @TestMetadata("ClassWithTypeP.java") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); } @TestMetadata("ClassWithTypePExtendsIterableP.java") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); } @TestMetadata("ClassWithTypePP.java") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); } @TestMetadata("ClassWithTypePRefNext.java") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); } @TestMetadata("ClassWithTypePRefSelf.java") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); } @TestMetadata("ClassWithTypePRefSelfAndClass.java") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); } @TestMetadata("FieldAsVar.java") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); } @TestMetadata("FieldOfArrayType.java") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); } @TestMetadata("FinalFieldAsVal.java") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); } @TestMetadata("InheritMethodsDifferentReturnTypes.java") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.java") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClass.java"); } @TestMetadata("InnerClassReferencesOuterTP.java") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); } @TestMetadata("InnerClassTypeMultipleGeneric.java") public void testInnerClassTypeMultipleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); } @TestMetadata("InnerClassesInGeneric.java") public void testInnerClassesInGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); } @TestMetadata("InnerOfGeneric.java") public void testInnerOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); } @TestMetadata("IntrinsicCompanionObject.java") public void testIntrinsicCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); } @TestMetadata("MethodReferencesOuterClassTP.java") public void testMethodReferencesOuterClassTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); } @TestMetadata("MethodTypePOneUpperBound.java") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); } @TestMetadata("MethodTypePTwoUpperBounds.java") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); } @TestMetadata("MethodWithTypeP.java") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); } @TestMetadata("MethodWithTypePP.java") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); } @TestMetadata("MethodWithTypePRefClassP.java") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); } @TestMetadata("MethosWithPRefTP.java") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); } @TestMetadata("MyException.java") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MyException.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/MyException.java"); } @TestMetadata("NestedClass.java") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/NestedClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/NestedClass.java"); } @TestMetadata("OverrideMethod.java") public void testOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); } @TestMetadata("PackageLocalVisibility.java") public void testPackageLocalVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); } @TestMetadata("PrivateMembers.java") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); } @TestMetadata("PrivateMembersInHierarchy.java") public void testPrivateMembersInHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); } @TestMetadata("RawOverrides.java") public void testRawOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawOverrides.java"); } @TestMetadata("RawTypeWithUpperBound.java") public void testRawTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); } @TestMetadata("RawUpperBound.java") public void testRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); } @TestMetadata("RecursiveRawUpperBound.java") public void testRecursiveRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); } @TestMetadata("RecursiveWildcardUpperBound.java") public void testRecursiveWildcardUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); } @TestMetadata("RemoveRedundantProjectionKind.java") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/Simple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/Simple.java"); } @TestMetadata("SubclassFromNested.java") public void testSubclassFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); } @TestMetadata("TopLevel$Class.java") public void testTopLevel$Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); } @TestMetadata("TwoFields.java") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TwoFields.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/TwoFields.java"); } @TestMetadata("UnboundWildcard.java") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); } @TestMetadata("WildcardBounds.java") public void testWildcardBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.java") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); } @TestMetadata("AnnotatedConstructor.java") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); } @TestMetadata("AnnotatedEnumEntry.java") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); } @TestMetadata("AnnotatedField.java") public void testAnnotatedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); } @TestMetadata("AnnotatedMethod.java") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); } @TestMetadata("AnnotatedValueParameter.java") public void testAnnotatedValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); } @TestMetadata("AnnotationInParam.java") public void testAnnotationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); } @TestMetadata("AnnotationRetentions.java") public void testAnnotationRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); } @TestMetadata("AnnotationTargets.java") public void testAnnotationTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); } @TestMetadata("ArithmeticExpressionInParam.java") public void testArithmeticExpressionInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); } @TestMetadata("ArrayOfEnumInParam.java") public void testArrayOfEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); } @TestMetadata("ArrayOfStringInParam.java") public void testArrayOfStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); } @TestMetadata("ClassObjectArrayInParam.java") public void testClassObjectArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); } @TestMetadata("ClassObjectInParam.java") public void testClassObjectInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); } @TestMetadata("ClassObjectInParamRaw.java") public void testClassObjectInParamRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); } @TestMetadata("ClassObjectInParamVariance.java") public void testClassObjectInParamVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); } @TestMetadata("CustomAnnotation.java") public void testCustomAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); } @TestMetadata("CustomAnnotationWithDefaultParameter.java") public void testCustomAnnotationWithDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); } @TestMetadata("EmptyArrayInParam.java") public void testEmptyArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); } @TestMetadata("EnumArgumentWithCustomToString.java") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); } @TestMetadata("EnumConstructorParameter.java") public void testEnumConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); } @TestMetadata("EnumInParam.java") public void testEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); } @TestMetadata("JavaDocDeprecated.java") public void testJavaDocDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); } @TestMetadata("NestedEnumArgument.java") public void testNestedEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); } @TestMetadata("PrimitiveValueInParam.java") public void testPrimitiveValueInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); } @TestMetadata("RecursiveAnnotation.java") public void testRecursiveAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); } @TestMetadata("RecursiveAnnotation2.java") public void testRecursiveAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); } @TestMetadata("SimpleAnnotation.java") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); } @TestMetadata("StringConcatenationInParam.java") public void testStringConcatenationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); } @TestMetadata("StringConstantInParam.java") public void testStringConstantInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); } @TestMetadata("StringInParam.java") public void testStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); } } @@ -496,26 +428,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/constructor"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorGenericDeep.java") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); } @TestMetadata("ConstructorGenericSimple.java") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); } @TestMetadata("ConstructorGenericUpperBound.java") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); } } @@ -523,26 +456,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("EnumMembers.java") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); } @TestMetadata("EnumWithSpecializedEntry.java") public void testEnumWithSpecializedEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); } @TestMetadata("JavaEnum.java") public void testJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); } } @@ -550,44 +484,42 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/javaBean"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.java") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); } @TestMetadata("JavaBeanAbstractGetter.java") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); } @TestMetadata("JavaBeanVal.java") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); } @TestMetadata("JavaBeanVar.java") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); } @TestMetadata("JavaBeanVarOfGenericType.java") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); } @TestMetadata("TwoSetters.java") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); } } @@ -595,10 +527,13 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.java") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -607,124 +542,109 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestMetadata("ArrayType.java") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); } @TestMetadata("ConstructorWithNewTypeParams.java") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); } @TestMetadata("ConstructorWithParentTypeParams.java") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); } @TestMetadata("ConstructorWithSeveralParams.java") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); } @TestMetadata("ConstructorWithoutParams.java") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); } @TestMetadata("CustomProjectionKind.java") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); } @TestMetadata("MethodWithFunctionTypes.java") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); } @TestMetadata("MethodWithGenerics.java") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); } @TestMetadata("MethodWithMappedClasses.java") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); } @TestMetadata("MethodWithTypeParameters.java") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); } @TestMetadata("MethodWithVararg.java") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); } @TestMetadata("PropertyArrayTypes.java") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); } @TestMetadata("PropertyComplexTypes.java") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); } @TestMetadata("PropertySimpleType.java") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); } @TestMetadata("StarProjection.java") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInError() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("WrongProjectionKind.java") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); } @TestMetadata("WrongReturnTypeStructure.java") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); } @TestMetadata("WrongTypeParameterBoundStructure1.java") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); } @TestMetadata("WrongValueParameterStructure1.java") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); } } @@ -732,154 +652,139 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.java") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.java") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.java"); } @TestMetadata("DeeplySubstitutedClassParameter.java") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.java"); } @TestMetadata("DeeplySubstitutedClassParameter2.java") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.java"); } @TestMetadata("InheritNotVararg.java") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVararg.java"); } @TestMetadata("InheritNotVarargInteger.java") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.java"); } @TestMetadata("InheritNotVarargNotNull.java") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.java"); } @TestMetadata("InheritNotVarargPrimitive.java") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.java"); } @TestMetadata("InheritNullability.java") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritNullability.java"); } @TestMetadata("InheritVararg.java") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVararg.java"); } @TestMetadata("InheritVarargInteger.java") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargInteger.java"); } @TestMetadata("InheritVarargNotNull.java") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.java"); } @TestMetadata("InheritVarargPrimitive.java") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.java"); } @TestMetadata("Kt3302.java") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/Kt3302.java"); } @TestMetadata("MutableToReadOnly.java") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/MutableToReadOnly.java"); } @TestMetadata("NotNullToNullable.java") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NotNullToNullable.java"); } @TestMetadata("NullableToNotNull.java") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNull.java"); } @TestMetadata("NullableToNotNullKotlinSignature.java") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.java"); } @TestMetadata("OverrideWithErasedParameter.java") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.java"); } @TestMetadata("ReadOnlyToMutable.java") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.java"); } @TestMetadata("SubclassFromGenericAndNot.java") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.java"); } @TestMetadata("SubstitutedClassParameter.java") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.java"); } @TestMetadata("SubstitutedClassParameters.java") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.java"); } } @@ -887,40 +792,38 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.java") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.java"); } @TestMetadata("AddNotNullSameJavaType.java") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.java"); } @TestMetadata("AddNullabilityJavaSubtype.java") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.java"); } @TestMetadata("AddNullabilitySameGenericType1.java") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.java"); } @TestMetadata("AddNullabilitySameGenericType2.java") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.java"); } @TestMetadata("AddNullabilitySameJavaType.java") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.java"); } public void testAllFilesPresentInReturn() throws Exception { @@ -929,170 +832,142 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestMetadata("CantMakeImmutableInSubclass.java") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.java"); } @TestMetadata("DeeplySubstitutedClassParameter.java") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.java"); } @TestMetadata("DeeplySubstitutedClassParameter2.java") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.java"); } @TestMetadata("HalfSubstitutedTypeParameters.java") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.java"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.java") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.java"); } @TestMetadata("InheritNullabilityJavaSubtype.java") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.java"); } @TestMetadata("InheritNullabilitySameGenericType.java") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.java"); } @TestMetadata("InheritNullabilitySameJavaType.java") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.java"); } @TestMetadata("InheritProjectionKind.java") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritProjectionKind.java"); } @TestMetadata("InheritReadOnlinessOfArgument.java") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.java"); } @TestMetadata("InheritReadOnlinessSameClass.java") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.java"); } @TestMetadata("InheritReadOnlinessSubclass.java") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.java"); } @TestMetadata("SameProjectionKind.java") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SameProjectionKind.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SameProjectionKind.java"); } @TestMetadata("SubclassFromGenericAndNot.java") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.java"); } @TestMetadata("SubclassOfCollection.java") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.java"); } @TestMetadata("SubclassOfMapEntry.java") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfMapEntry.java"); } @TestMetadata("SubstitutedClassParameter.java") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameter.java"); } @TestMetadata("SubstitutedClassParameters.java") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubstitutedClassParameters.java"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.java") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.java"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.java") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.java"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.java") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.java"); } @TestMetadata("TwoSuperclassesMutableAndNot.java") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.java"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.java") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.java"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.java") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.java"); } @TestMetadata("TwoSuperclassesSupplementNotNull.java") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.java"); } @TestMetadata("TypeParamOfClass.java") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClass.java"); } @TestMetadata("TypeParamOfClassSubstituted.java") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.java"); } @TestMetadata("TypeParamOfFun.java") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/TypeParamOfFun.java"); } } @@ -1100,50 +975,47 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InheritNullability.java") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/InheritNullability.java"); } @TestMetadata("TwoBounds.java") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoBounds.java"); } @TestMetadata("TwoSuperclasses.java") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.java"); } @TestMetadata("TwoTypeParameters.java") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.java"); } @TestMetadata("UseParameterAsUpperBound.java") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.java"); } @TestMetadata("UseParameterInUpperBound.java") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.java"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.java") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.java"); } } } @@ -1153,26 +1025,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/library"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); } @TestMetadata("LoadIterator.java") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); } @TestMetadata("Max.java") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/Max.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/Max.java"); } } @@ -1180,14 +1053,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/modality"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.java") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); } } @@ -1195,38 +1071,37 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mutability extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/mutability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); } @TestMetadata("LoadIterableWithConflict.java") public void testLoadIterableWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); } @TestMetadata("LoadIterableWithNullability.java") public void testLoadIterableWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); } @TestMetadata("LoadIterableWithPropagation.java") public void testLoadIterableWithPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); } @TestMetadata("ReadOnlyExtendsWildcard.java") public void testReadOnlyExtendsWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); } } @@ -1234,38 +1109,37 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/notNull"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.java") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); } @TestMetadata("NotNullIntArray.java") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); } @TestMetadata("NotNullMethod.java") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); } @TestMetadata("NotNullObjectArray.java") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); } @TestMetadata("NotNullParameter.java") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); } } @@ -1273,26 +1147,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedPackage extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedPackage"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ProtectedPackageConstructor.java") public void testProtectedPackageConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); } @TestMetadata("ProtectedPackageFun.java") public void testProtectedPackageFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); } @TestMetadata("ProtectedPackageProperty.java") public void testProtectedPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); } } @@ -1300,14 +1175,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedStatic extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedStatic"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorInProtectedStaticNestedClass.java") public void testConstructorInProtectedStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); } } @@ -1315,14 +1193,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rendering extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRendering() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/rendering"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Rendering.java") public void testRendering() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); } } @@ -1330,206 +1211,187 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/sam"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Comparator.java") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Comparator.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Comparator.java"); } @TestMetadata("DifferentParametersCount.java") public void testDifferentParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/DifferentParametersCount.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/DifferentParametersCount.java"); } @TestMetadata("FakeStaticOverrides.java") public void testFakeStaticOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/FakeStaticOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/FakeStaticOverrides.java"); } @TestMetadata("FilenameFilter.java") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/FilenameFilter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/FilenameFilter.java"); } @TestMetadata("GenericInterfaceParameterWithSelfBound.java") public void testGenericInterfaceParameterWithSelfBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParameterWithSelfBound.java"); } @TestMetadata("GenericInterfaceParametersWithBounds.java") public void testGenericInterfaceParametersWithBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericInterfaceParametersWithBounds.java"); } @TestMetadata("GenericMethodParameters.java") public void testGenericMethodParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/GenericMethodParameters.java"); } @TestMetadata("InterfaceWithObjectMethod.java") public void testInterfaceWithObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/InterfaceWithObjectMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/InterfaceWithObjectMethod.java"); } @TestMetadata("Nested.java") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Nested.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Nested.java"); } @TestMetadata("Runnable.java") public void testRunnable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/Runnable.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/Runnable.java"); } @TestMetadata("SamSubinterfaceOfTwo.java") public void testSamSubinterfaceOfTwo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOfTwo.java"); } @TestMetadata("SamSubinterfaceOverridding.java") public void testSamSubinterfaceOverridding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOverridding.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SamSubinterfaceOverridding.java"); } @TestMetadata("StaticOverrides.java") public void testStaticOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/StaticOverrides.java"); } @TestMetadata("SubstitutedSamInterface.java") public void testSubstitutedSamInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterface.java"); } @TestMetadata("SubstitutedSamInterfaceSubclassOfBuiltin.java") public void testSubstitutedSamInterfaceSubclassOfBuiltin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/SubstitutedSamInterfaceSubclassOfBuiltin.java"); } @TestMetadata("VarargParameter.java") public void testVarargParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/VarargParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/VarargParameter.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/sam/adapters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Adapters extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/sam/adapters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousAdapters.java") public void testAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/AmbiguousAdapters.java"); } @TestMetadata("Basic.java") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/Basic.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/Basic.java"); } @TestMetadata("Constructor.java") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/Constructor.java"); } @TestMetadata("ConstructorWithAnnotations.java") public void testConstructorWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/ConstructorWithAnnotations.java"); } @TestMetadata("DeepSamLoop.java") public void testDeepSamLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/DeepSamLoop.java"); } @TestMetadata("NoSamForClassTypeParameter.java") public void testNoSamForClassTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForClassTypeParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForClassTypeParameter.java"); } @TestMetadata("NoSamForMethodTypeParameter.java") public void testNoSamForMethodTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForMethodTypeParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NoSamForMethodTypeParameter.java"); } @TestMetadata("NonTrivialFunctionType.java") public void testNonTrivialFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/NonTrivialFunctionType.java"); } @TestMetadata("PrivateSamAdapter.java") public void testPrivateSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/PrivateSamAdapter.java"); } @TestMetadata("SelfAsParameter.java") public void testSelfAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/SelfAsParameter.java"); } @TestMetadata("SeveralSamParameters.java") public void testSeveralSamParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/SeveralSamParameters.java"); } @TestMetadata("TypeParameterOfClass.java") public void testTypeParameterOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfClass.java"); } @TestMetadata("TypeParameterOfMethod.java") public void testTypeParameterOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfMethod.java"); } @TestMetadata("TypeParameterOfOuterClass.java") public void testTypeParameterOfOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/TypeParameterOfOuterClass.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AdapterDoesntOverrideDeclaration.java") public void testAdapterDoesntOverrideDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/AdapterDoesntOverrideDeclaration.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/AdapterDoesntOverrideDeclaration.java"); } public void testAllFilesPresentInInheritance() throws Exception { @@ -1538,56 +1400,47 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestMetadata("InheritedAdapterAndDeclaration.java") public void testInheritedAdapterAndDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAdapterAndDeclaration.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAdapterAndDeclaration.java"); } @TestMetadata("InheritedAmbiguousAdapters.java") public void testInheritedAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAmbiguousAdapters.java"); } @TestMetadata("InheritedAndOverriddenAmbiguousAdapters.java") public void testInheritedAndOverriddenAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAndOverriddenAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedAndOverriddenAmbiguousAdapters.java"); } @TestMetadata("InheritedOverridden.java") public void testInheritedOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverridden.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverridden.java"); } @TestMetadata("InheritedOverriddenAdapter.java") public void testInheritedOverriddenAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverriddenAdapter.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedOverriddenAdapter.java"); } @TestMetadata("InheritedSameAdapters.java") public void testInheritedSameAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdapters.java"); } @TestMetadata("InheritedSameAdaptersWithSubstitution.java") public void testInheritedSameAdaptersWithSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSameAdaptersWithSubstitution.java"); } @TestMetadata("InheritedSimple.java") public void testInheritedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/InheritedSimple.java"); } @TestMetadata("OverriddenAmbiguousAdapters.java") public void testOverriddenAmbiguousAdapters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/OverriddenAmbiguousAdapters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/sam/adapters/inheritance/OverriddenAmbiguousAdapters.java"); } } } @@ -1597,14 +1450,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("StableName.java") public void testStableName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); } } @@ -1612,62 +1468,57 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignaturePropagation extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignaturePropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signaturePropagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArraysInSubtypes.java") public void testArraysInSubtypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); } @TestMetadata("MethodTypeParameterErased.java") public void testMethodTypeParameterErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); } @TestMetadata("RawSuperType.java") public void testRawSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); } @TestMetadata("RawSuperTypeWithBound.java") public void testRawSuperTypeWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBound.java") public void testRawSuperTypeWithRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBoundMultipleParameters.java") public void testRawSuperTypeWithRecursiveBoundMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); } @TestMetadata("ReturnInnerSubclassOfSupersInner.java") public void testReturnInnerSubclassOfSupersInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); } @TestMetadata("SubclassWithRawType.java") public void testSubclassWithRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); } @TestMetadata("TwoSuperclassesInconsistentGenericTypes.java") public void testTwoSuperclassesInconsistentGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); } } @@ -1675,74 +1526,67 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Static extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/static"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DeeplyInnerClass.java") public void testDeeplyInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); } @TestMetadata("DeeplyNestedStatic.java") public void testDeeplyNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); } @TestMetadata("Enum.java") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Enum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Enum.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Simple.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Simple.java"); } @TestMetadata("StaticFinal.java") public void testStaticFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); } @TestMetadata("StaticMembersFromParentClass.java") public void testStaticMembersFromParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); } @TestMetadata("StaticMembersFromParentClassVisibility.java") public void testStaticMembersFromParentClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); } @TestMetadata("StaticMembersFromParentInterface.java") public void testStaticMembersFromParentInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); } @TestMetadata("StaticMembersInEnum.java") public void testStaticMembersInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); } @TestMetadata("StaticMembersInEnumFromParents.java") public void testStaticMembersInEnumFromParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); } } @@ -1750,20 +1594,22 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/vararg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("VarargInt.java") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); } @TestMetadata("VarargString.java") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); - doTestCompiledJava(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); } } } @@ -1772,14 +1618,30 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJavaAndKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJavaAndKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJavaAndKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJavaAndKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("MixedPackage.txt") public void testMixedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage.txt"); - doTestCompiledJavaAndKotlin(fileName); + runTest("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage.txt"); + } + + @TestMetadata("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MixedPackage extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJavaAndKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMixedPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJavaAndKotlin/MixedPackage"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } @@ -1787,26 +1649,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJavaIncludeObjectMethods extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledJavaIncludeObjectMethods, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJavaIncludeObjectMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJavaIncludeObjectMethods"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ClassWithObjectMethod.java") public void testClassWithObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.java"); - doTestCompiledJavaIncludeObjectMethods(fileName); + runTest("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/ClassWithObjectMethod.java"); } @TestMetadata("EmptyInterface.java") public void testEmptyInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/EmptyInterface.java"); - doTestCompiledJavaIncludeObjectMethods(fileName); + runTest("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/EmptyInterface.java"); } @TestMetadata("InterfaceWithObjectMethods.java") public void testInterfaceWithObjectMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.java"); - doTestCompiledJavaIncludeObjectMethods(fileName); + runTest("compiler/testData/loadJava/compiledJavaIncludeObjectMethods/InterfaceWithObjectMethods.java"); } } @@ -1814,6 +1677,10 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -1822,118 +1689,109 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.kt") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); } @TestMetadata("AnnotatedMethod.kt") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); } @TestMetadata("AnnotationInAnnotationArguments.kt") public void testAnnotationInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); } @TestMetadata("EnumArgumentWithCustomToString.kt") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); } @TestMetadata("MultiDimensionalArrayMethod.kt") public void testMultiDimensionalArrayMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); } @TestMetadata("PrimitiveArrayArguments.kt") public void testPrimitiveArrayArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); } @TestMetadata("TargetedAnnotation.kt") public void testTargetedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembers extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectPropertyField.kt") public void testClassObjectPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); } } @@ -1941,98 +1799,87 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInClassObject.kt") public void testAnnotationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); } @TestMetadata("DollarsInAnnotationName.kt") public void testDollarsInAnnotationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); } @TestMetadata("MultipleAnnotations.kt") public void testMultipleAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); } @TestMetadata("NestedAnnotation.kt") public void testNestedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); } @TestMetadata("Retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); } @TestMetadata("WithArgument.kt") public void testWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); } @TestMetadata("WithMultipleArguments.kt") public void testWithMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); } } @@ -2040,56 +1887,52 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); } @TestMetadata("EnumArrayArgument.kt") public void testEnumArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); } @TestMetadata("StringArrayArgument.kt") public void testStringArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); } } @@ -2097,80 +1940,72 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); } @TestMetadata("ExtensionFunctionInClass.kt") public void testExtensionFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); } @TestMetadata("ExtensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); } @TestMetadata("FunctionInClass.kt") public void testFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); } @TestMetadata("FunctionInTrait.kt") public void testFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); } @TestMetadata("InnerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); } @TestMetadata("ManyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); } @TestMetadata("PropertySetterInClass.kt") public void testPropertySetterInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); } @TestMetadata("TopLevelPropertySetter.kt") public void testTopLevelPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); } } @@ -2178,56 +2013,52 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertiesWithoutBackingFields extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); } @TestMetadata("ExtensionsWithSameNameClass.kt") public void testExtensionsWithSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); } @TestMetadata("ExtensionsWithSameNamePackage.kt") public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); } @TestMetadata("NestedTrait.kt") public void testNestedTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); } @TestMetadata("TraitClassObject.kt") public void testTraitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); } } @@ -2235,56 +2066,52 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassLiteralArgument.kt") public void testClassLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); } @TestMetadata("ReceiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); } @TestMetadata("SimpleTypeAnnotation.kt") public void testSimpleTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); } @TestMetadata("SupertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); } @TestMetadata("TypeAnnotationWithArguments.kt") public void testTypeAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); } @TestMetadata("TypeArgument.kt") public void testTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); } @TestMetadata("TypeParameterAnnotation.kt") public void testTypeParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); } @TestMetadata("TypeParameterAnnotationWithArguments.kt") public void testTypeParameterAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); } } @@ -2292,26 +2119,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateTarget.kt") public void testDelegateTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); } @TestMetadata("FieldTarget.kt") public void testFieldTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); } @TestMetadata("ReceiverTarget.kt") public void testReceiverTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); } } } @@ -2320,262 +2148,229 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); } @TestMetadata("ClassInParam.kt") public void testClassInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); } @TestMetadata("ClassInnerClass.kt") public void testClassInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); } @TestMetadata("ClassMemberConflict.kt") public void testClassMemberConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); } @TestMetadata("ClassOutParam.kt") public void testClassOutParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); } @TestMetadata("ClassParam.kt") public void testClassParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); } @TestMetadata("ClassParamReferencesParam.kt") public void testClassParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); } @TestMetadata("ClassParamReferencesParam2.kt") public void testClassParamReferencesParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); } @TestMetadata("ClassParamReferencesSelf.kt") public void testClassParamReferencesSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); } @TestMetadata("ClassParamUpperClassBound.kt") public void testClassParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); } @TestMetadata("ClassParamUpperClassInterfaceBound.kt") public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); } @TestMetadata("ClassParamUpperInterfaceBound.kt") public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); } @TestMetadata("ClassTwoParams.kt") public void testClassTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); } @TestMetadata("ClassTwoParams2.kt") public void testClassTwoParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); } @TestMetadata("EnumWithGenericConstructorParameter.kt") public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); } @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); } @TestMetadata("InheritClassSimple.kt") public void testInheritClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); } @TestMetadata("InheritClassWithParam.kt") public void testInheritClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); } @TestMetadata("InheritSubstitutedMethod.kt") public void testInheritSubstitutedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); } @TestMetadata("InheritTraitWithFunctionParam.kt") public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); } @TestMetadata("InheritTraitWithParam.kt") public void testInheritTraitWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); } @TestMetadata("InnerClassExtendInnerClass.kt") public void testInnerClassExtendInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); } @TestMetadata("InnerGenericClass.kt") public void testInnerGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); } @TestMetadata("InnerTypes.kt") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); } @TestMetadata("NamedObjectInClass.kt") public void testNamedObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); } @TestMetadata("NamedObjectInClassObject.kt") public void testNamedObjectInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); } @TestMetadata("NamedObjectInNamedObject.kt") public void testNamedObjectInNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); } @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); } @TestMetadata("NestedClassExtendNestedClass.kt") public void testNestedClassExtendNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); } @TestMetadata("NestedGenericClass.kt") public void testNestedGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); } @TestMetadata("RecursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); } @TestMetadata("SingleAbstractMethod.kt") public void testSingleAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.kt") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); } @TestMetadata("JavaBeanAbstractGetter.kt") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); } @TestMetadata("JavaBeanVal.kt") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); } @TestMetadata("JavaBeanVar.kt") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); } @TestMetadata("JavaBeanVarOfGenericType.kt") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); } @TestMetadata("TwoSetters.kt") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); } } } @@ -2584,38 +2379,37 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassFun extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassInParamUsedInFun.kt") public void testClassInParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); } @TestMetadata("ClassParamUsedInFun.kt") public void testClassParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); } @TestMetadata("FunDelegationToTraitImpl.kt") public void testFunDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); } @TestMetadata("FunInParamSuper.kt") public void testFunInParamSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); } @TestMetadata("TraitOpenFun.kt") public void testTraitOpenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); } } @@ -2623,86 +2417,77 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectDeclaresVal.kt") public void testClassObjectDeclaresVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); } @TestMetadata("ClassObjectDeclaresVar.kt") public void testClassObjectDeclaresVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); } @TestMetadata("ClassObjectDefaultVisibility.kt") public void testClassObjectDefaultVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); } @TestMetadata("ClassObjectExplicitVisibility.kt") public void testClassObjectExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); } @TestMetadata("ClassObjectExtendsTrait.kt") public void testClassObjectExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); } @TestMetadata("ClassObjectExtendsTraitWithTP.kt") public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); } @TestMetadata("classObjectInClassStaticFields.kt") public void testClassObjectInClassStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); } @TestMetadata("classObjectInTraitStaticFields.kt") public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); } @TestMetadata("ClassObjectPropertyInClass.kt") public void testClassObjectPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); } @TestMetadata("InnerClassInClassObject.kt") public void testInnerClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); } @TestMetadata("SimpleClassObject.kt") public void testSimpleClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); } } @@ -2710,124 +2495,114 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); } @TestMetadata("Constructor1.kt") public void testConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); } @TestMetadata("Constructor1WithParamDefaultValue.kt") public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); } @TestMetadata("Constructor2WithOneParamDefaultValue.kt") public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorGenericDeep.kt") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); } @TestMetadata("ConstructorGenericSimple.kt") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); } @TestMetadata("ConstructorGenericUpperBound.kt") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); } @TestMetadata("ConstructorWithTwoDefArgs.kt") public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); } @TestMetadata("ConstructorWithTwoTypeParameters.kt") public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); } @TestMetadata("InnerClassConstructorWithDefArgs.kt") public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); } @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorNonLastVararg.kt") public void testConstructorNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); } @TestMetadata("ConstructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); } } } @@ -2836,14 +2611,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); } } @@ -2851,32 +2629,32 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MixedComponents.kt") public void testMixedComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); } @TestMetadata("OneVal.kt") public void testOneVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); } @TestMetadata("TwoVals.kt") public void testTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); } @TestMetadata("TwoVars.kt") public void testTwoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); } } @@ -2884,44 +2662,42 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumVisibility.kt") public void testEnumVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); } @TestMetadata("enumWithConstuctor.kt") public void testEnumWithConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); } @TestMetadata("enumWithInnerClasses.kt") public void testEnumWithInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); } @TestMetadata("innerEnumExistingClassObject.kt") public void testInnerEnumExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); } } @@ -2929,222 +2705,195 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromLoadJava extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromLoadJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.kt") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); } @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); } @TestMetadata("classObjectAnnotation.kt") public void testClassObjectAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); } @TestMetadata("ClassWithConstVal.kt") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); } @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); } @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); } @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); } @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); } @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); } @TestMetadata("ClassWithTypePRefSelfAndClass.kt") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); } @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); } @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); } @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypes.kt") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); } @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); } @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); } @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); } @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); } @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); } @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); } @TestMetadata("MyException.kt") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); } @TestMetadata("objectMembers.kt") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); } @TestMetadata("packageLevelObject.kt") public void testPackageLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); } @TestMetadata("RemoveRedundantProjectionKind.kt") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); } @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); } @TestMetadata("UnboundWildcard.kt") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.kt") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -3153,102 +2902,90 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestMetadata("ArrayType.kt") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); } @TestMetadata("ConstructorWithNewTypeParams.kt") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); } @TestMetadata("ConstructorWithParentTypeParams.kt") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); } @TestMetadata("ConstructorWithSeveralParams.kt") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); } @TestMetadata("ConstructorWithoutParams.kt") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); } @TestMetadata("CustomProjectionKind.kt") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); } @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); } @TestMetadata("MethodWithGenerics.kt") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); } @TestMetadata("MethodWithMappedClasses.kt") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); } @TestMetadata("MethodWithTypeParameters.kt") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); } @TestMetadata("MethodWithVararg.kt") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); } @TestMetadata("PropertyArrayTypes.kt") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); } @TestMetadata("PropertyComplexTypes.kt") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); } @TestMetadata("PropertySimpleType.kt") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddingNullability.kt") public void testAddingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); } public void testAllFilesPresentInError() throws Exception { @@ -3257,158 +2994,132 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestMetadata("ConflictingProjectionKind.kt") public void testConflictingProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); } @TestMetadata("ExplicitFieldGettersAndSetters.kt") public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); } @TestMetadata("ExtraUpperBound.kt") public void testExtraUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); } @TestMetadata("MissingUpperBound.kt") public void testMissingUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); } @TestMetadata("NoFieldTypeRef.kt") public void testNoFieldTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); } @TestMetadata("NotVarargReplacedWithVararg.kt") public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); } @TestMetadata("RedundantProjectionKind.kt") public void testRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); } @TestMetadata("ReturnTypeMissing.kt") public void testReturnTypeMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); } @TestMetadata("SyntaxErrorInFieldAnnotation.kt") public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); } @TestMetadata("VarargReplacedWithNotVararg.kt") public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); } @TestMetadata("WrongFieldInitializer.kt") public void testWrongFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); } @TestMetadata("WrongFieldMutability.kt") public void testWrongFieldMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); } @TestMetadata("WrongFieldName.kt") public void testWrongFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); } @TestMetadata("WrongMethodName.kt") public void testWrongMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); } @TestMetadata("WrongProjectionKind.kt") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); } @TestMetadata("WrongReturnTypeStructure.kt") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); } @TestMetadata("WrongTypeName1.kt") public void testWrongTypeName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); } @TestMetadata("WrongTypeName2.kt") public void testWrongTypeName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); } @TestMetadata("WrongTypeName3.kt") public void testWrongTypeName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); } @TestMetadata("WrongTypeParameterBoundStructure1.kt") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); } @TestMetadata("WrongTypeParameterBoundStructure2.kt") public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); } @TestMetadata("WrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); } @TestMetadata("WrongValueParameterStructure1.kt") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); } @TestMetadata("WrongValueParameterStructure2.kt") public void testWrongValueParameterStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); } @TestMetadata("WrongValueParametersCount.kt") public void testWrongValueParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); } } @@ -3416,178 +3127,159 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.kt") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.kt") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); } @TestMetadata("ChangeProjectionKind2.kt") public void testChangeProjectionKind2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); } @TestMetadata("InheritNotVararg.kt") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); } @TestMetadata("InheritNotVarargInteger.kt") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); } @TestMetadata("InheritNotVarargNotNull.kt") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); } @TestMetadata("InheritNotVarargPrimitive.kt") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); } @TestMetadata("InheritVararg.kt") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); } @TestMetadata("InheritVarargInteger.kt") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); } @TestMetadata("InheritVarargNotNull.kt") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); } @TestMetadata("InheritVarargPrimitive.kt") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); } @TestMetadata("Kt3302.kt") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); } @TestMetadata("MutableToReadOnly.kt") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); } @TestMetadata("NotNullToNullable.kt") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); } @TestMetadata("NullableToNotNull.kt") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); } @TestMetadata("NullableToNotNullKotlinSignature.kt") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); } @TestMetadata("OverrideWithErasedParameter.kt") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); } @TestMetadata("ReadOnlyToMutable.kt") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); } } @@ -3595,40 +3287,38 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.kt") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); } @TestMetadata("AddNotNullSameJavaType.kt") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); } @TestMetadata("AddNullabilityJavaSubtype.kt") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); } @TestMetadata("AddNullabilitySameGenericType1.kt") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); } @TestMetadata("AddNullabilitySameGenericType2.kt") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); } @TestMetadata("AddNullabilitySameJavaType.kt") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); } public void testAllFilesPresentInReturn() throws Exception { @@ -3637,170 +3327,142 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestMetadata("CantMakeImmutableInSubclass.kt") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("HalfSubstitutedTypeParameters.kt") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); } @TestMetadata("InheritNullabilityJavaSubtype.kt") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); } @TestMetadata("InheritNullabilitySameGenericType.kt") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); } @TestMetadata("InheritNullabilitySameJavaType.kt") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnlinessOfArgument.kt") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); } @TestMetadata("InheritReadOnlinessSameClass.kt") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); } @TestMetadata("InheritReadOnlinessSubclass.kt") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); } @TestMetadata("SameProjectionKind.kt") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubclassOfCollection.kt") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); } @TestMetadata("SubclassOfMapEntry.kt") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); } @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); } @TestMetadata("TwoSuperclassesSupplementNotNull.kt") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); } @TestMetadata("TypeParamOfClass.kt") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); } @TestMetadata("TypeParamOfClassSubstituted.kt") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); } @TestMetadata("TypeParamOfFun.kt") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); } } @@ -3808,62 +3470,57 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); } @TestMetadata("TwoBounds.kt") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); } @TestMetadata("TwoSuperclasses.kt") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); } @TestMetadata("TwoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); } @TestMetadata("UseParameterAsUpperBound.kt") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); } @TestMetadata("UseParameterInUpperBound.kt") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); } } } @@ -3873,26 +3530,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); } @TestMetadata("LoadIterator.kt") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); } @TestMetadata("Max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); } } @@ -3900,14 +3558,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.kt") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); } } @@ -3915,38 +3576,37 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.kt") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); } @TestMetadata("NotNullIntArray.kt") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); } @TestMetadata("NotNullMethod.kt") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); } @TestMetadata("NotNullObjectArray.kt") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); } @TestMetadata("NotNullParameter.kt") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); } } } @@ -3955,142 +3615,129 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fun extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); } @TestMetadata("DeclaredMemberOverridesDelegated.kt") public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); } @TestMetadata("InfixKeyword.kt") public void testInfixKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); } @TestMetadata("InheritValAndVar.kt") public void testInheritValAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); } @TestMetadata("InheritValsDifferentTypes.kt") public void testInheritValsDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); } @TestMetadata("NoSamAdapter.kt") public void testNoSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); } @TestMetadata("NoSamConstructor.kt") public void testNoSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); } @TestMetadata("OperatorKeyword.kt") public void testOperatorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); } @TestMetadata("PropagateDeepSubclass.kt") public void testPropagateDeepSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); } @TestMetadata("PropagateSubclassOfComparable.kt") public void testPropagateSubclassOfComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithTypeVariables extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunGenericParam.kt") public void testFunGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); } @TestMetadata("FunParamParam.kt") public void testFunParamParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); } @TestMetadata("FunParamParamErased.kt") public void testFunParamParamErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); } @TestMetadata("FunParamReferencesParam.kt") public void testFunParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); } @TestMetadata("FunParamTwoUpperBounds.kt") public void testFunParamTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); } @TestMetadata("FunParamUpperClassBound.kt") public void testFunParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); } @TestMetadata("FunParamUpperClassInterfaceBound.kt") public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); } @TestMetadata("FunParamUpperInterfaceBound.kt") public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); } @TestMetadata("FunParamVaragParam.kt") public void testFunParamVaragParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); } @TestMetadata("FunTwoTypeParams.kt") public void testFunTwoTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); } } @@ -4098,38 +3745,37 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithoutTypeVariables extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunClassParamNotNull.kt") public void testFunClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); } @TestMetadata("FunClassParamNullable.kt") public void testFunClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); } @TestMetadata("FunParamNullable.kt") public void testFunParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); } @TestMetadata("ReturnTypeClassParamNotNull.kt") public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); } @TestMetadata("ReturnTypeClassParamNullable.kt") public void testReturnTypeClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); } } @@ -4137,104 +3783,92 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonGeneric extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassFun.kt") public void testClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); } @TestMetadata("ClassFunGetFoo.kt") public void testClassFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); } @TestMetadata("ClassFunGetFooSetFoo.kt") public void testClassFunGetFooSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); } @TestMetadata("ClassFunSetFoo.kt") public void testClassFunSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); } @TestMetadata("ExtFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); } @TestMetadata("ExtFunInClass.kt") public void testExtFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); } @TestMetadata("FunDefaultArg.kt") public void testFunDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); } @TestMetadata("FunParamNotNull.kt") public void testFunParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); } @TestMetadata("FunVarargInt.kt") public void testFunVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); } @TestMetadata("FunVarargInteger.kt") public void testFunVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); } @TestMetadata("ModifierAbstract.kt") public void testModifierAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); } @TestMetadata("ModifierOpen.kt") public void testModifierOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); } @TestMetadata("NsFun.kt") public void testNsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); } @TestMetadata("NsFunGetFoo.kt") public void testNsFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); } @TestMetadata("ReturnTypeNotNull.kt") public void testReturnTypeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); } @TestMetadata("ReturnTypeNullable.kt") public void testReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); } } @@ -4242,26 +3876,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonLastVararg.kt") public void testNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); } @TestMetadata("VarargInt.kt") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); } @TestMetadata("VarargString.kt") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); } } } @@ -4270,14 +3905,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); } } @@ -4285,44 +3923,42 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberOrder extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callablesNameClash.kt") public void testCallablesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); } @TestMetadata("extensionMembers.kt") public void testExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); } @TestMetadata("extensionPropertiesNameClash.kt") public void testExtensionPropertiesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); } } @@ -4330,26 +3966,27 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deepInnerGeneric.kt") public void testDeepInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); } @TestMetadata("innerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); } @TestMetadata("membersReferenceOuterTP.kt") public void testMembersReferenceOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); } } @@ -4357,20 +3994,22 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notnullTypeArgument.kt") public void testNotnullTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); } } @@ -4378,274 +4017,239 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Prop extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); } @TestMetadata("ClassValAbstract.kt") public void testClassValAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); } @TestMetadata("CollectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); } @TestMetadata("ExtValClass.kt") public void testExtValClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); } @TestMetadata("ExtValInClass.kt") public void testExtValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); } @TestMetadata("ExtValInt.kt") public void testExtValInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); } @TestMetadata("ExtValIntCharSequence.kt") public void testExtValIntCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); } @TestMetadata("ExtValIntCharSequenceQ.kt") public void testExtValIntCharSequenceQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); } @TestMetadata("ExtValIntListQOfIntInClass.kt") public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); } @TestMetadata("ExtValIntTInClass.kt") public void testExtValIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); } @TestMetadata("ExtValIntTQInClass.kt") public void testExtValIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); } @TestMetadata("ExtValTIntInClass.kt") public void testExtValTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); } @TestMetadata("ExtVarClass.kt") public void testExtVarClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); } @TestMetadata("ExtVarInClass.kt") public void testExtVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); } @TestMetadata("ExtVarInt.kt") public void testExtVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); } @TestMetadata("ExtVarIntTInClass.kt") public void testExtVarIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); } @TestMetadata("ExtVarIntTQInClass.kt") public void testExtVarIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); } @TestMetadata("ExtVarMapPQInt.kt") public void testExtVarMapPQInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); } @TestMetadata("ExtVarTIntInClass.kt") public void testExtVarTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); } @TestMetadata("ExtVarTQIntInClass.kt") public void testExtVarTQIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); } @TestMetadata("ExtVarl.kt") public void testExtVarl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); } @TestMetadata("NsVal.kt") public void testNsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); } @TestMetadata("NsVar.kt") public void testNsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); } @TestMetadata("OverrideClassVal.kt") public void testOverrideClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); } @TestMetadata("OverrideTraitVal.kt") public void testOverrideTraitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); } @TestMetadata("PropFromSuperclass.kt") public void testPropFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); } @TestMetadata("TraitFinalVar.kt") public void testTraitFinalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); } @TestMetadata("TraitOpenVal.kt") public void testTraitOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); } @TestMetadata("VarDelegationToTraitImpl.kt") public void testVarDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); } @TestMetadata("VarWithDelegated.kt") public void testVarWithDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultAccessors extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); } @TestMetadata("ClassValParams.kt") public void testClassValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); } @TestMetadata("ClassValWithGet.kt") public void testClassValWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); } @TestMetadata("ClassVarModality.kt") public void testClassVarModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); } @TestMetadata("ClassVarParams.kt") public void testClassVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); } @TestMetadata("ClassVarWithGet.kt") public void testClassVarWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); } @TestMetadata("ClassVarWithSet.kt") public void testClassVarWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); } @TestMetadata("ExtValLong.kt") public void testExtValLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); } @TestMetadata("ExtVarLong.kt") public void testExtVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); } } } @@ -4654,194 +4258,167 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); } @TestMetadata("AnyQ.kt") public void testAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); } @TestMetadata("ArrayOfInNumber.kt") public void testArrayOfInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); } @TestMetadata("ArrayOfInteger.kt") public void testArrayOfInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); } @TestMetadata("ArrayOfOutNumber.kt") public void testArrayOfOutNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); } @TestMetadata("ArrayOfOutT.kt") public void testArrayOfOutT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); } @TestMetadata("ArrayOfString.kt") public void testArrayOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); } @TestMetadata("Function1IntString.kt") public void testFunction1IntString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); } @TestMetadata("jlInteger.kt") public void testJlInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); } @TestMetadata("jlIntegerQ.kt") public void testJlIntegerQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); } @TestMetadata("jlNumber.kt") public void testJlNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); } @TestMetadata("jlObject.kt") public void testJlObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); } @TestMetadata("jlObjectQ.kt") public void testJlObjectQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); } @TestMetadata("jlStringQ.kt") public void testJlStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); } @TestMetadata("ListOfAny.kt") public void testListOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); } @TestMetadata("ListOfAnyQ.kt") public void testListOfAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); } @TestMetadata("ListOfjlString.kt") public void testListOfjlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); } @TestMetadata("Nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); } @TestMetadata("NothingQ.kt") public void testNothingQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); } @TestMetadata("platform.kt") public void testPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/String.kt"); } @TestMetadata("StringQ.kt") public void testStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); } @TestMetadata("Unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); } } @@ -4849,32 +4426,32 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); } @TestMetadata("TypeAliasToExtension.kt") public void testTypeAliasToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); } } @@ -4882,74 +4459,67 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InternalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); } @TestMetadata("InternalConstructor.kt") public void testInternalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); } @TestMetadata("InternalTopLevelMembers.kt") public void testInternalTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); } @TestMetadata("PrivateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); } @TestMetadata("PrivateClassMembers.kt") public void testPrivateClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); } @TestMetadata("PrivateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); } @TestMetadata("PrivateTopLevelFun.kt") public void testPrivateTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); } @TestMetadata("PrivateTopLevelVal.kt") public void testPrivateTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); } @TestMetadata("PropertyInConstructorExplicitVisibility.kt") public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); } @TestMetadata("TopLevelVarWithPrivateSetter.kt") public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); } } } @@ -4958,6 +4528,10 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledKotlinWithStdlib extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlinWithStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -4966,14 +4540,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstValInMultifileClass.kt") public void testConstValInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/ConstValInMultifileClass.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/annotations/ConstValInMultifileClass.kt"); } } @@ -4981,68 +4558,62 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contracts extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContracts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callsEffect.kt") public void testCallsEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/callsEffect.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/callsEffect.kt"); } @TestMetadata("deeplyNestedExpression.kt") public void testDeeplyNestedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/deeplyNestedExpression.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/deeplyNestedExpression.kt"); } @TestMetadata("embedding.kt") public void testEmbedding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/embedding.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/embedding.kt"); } @TestMetadata("fromStandardKt.kt") public void testFromStandardKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/fromStandardKt.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/fromStandardKt.kt"); } @TestMetadata("isInstancePredicate.kt") public void testIsInstancePredicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/isInstancePredicate.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/isInstancePredicate.kt"); } @TestMetadata("logicOperators.kt") public void testLogicOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/logicOperators.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/logicOperators.kt"); } @TestMetadata("multieffectContracts.kt") public void testMultieffectContracts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/multieffectContracts.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/multieffectContracts.kt"); } @TestMetadata("mutualRecursion.kt") public void testMutualRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/mutualRecursion.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/mutualRecursion.kt"); } @TestMetadata("recursion.kt") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/recursion.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/recursion.kt"); } @TestMetadata("withReceiver.kt") public void testWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/withReceiver.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/contracts/withReceiver.kt"); } } @@ -5050,14 +4621,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotatedSuspendFun.kt") public void testAnnotatedSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/coroutines/annotatedSuspendFun.kt"); } } @@ -5065,32 +4639,32 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mutability extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterable.kt"); } @TestMetadata("LoadIterableWithConflict.kt") public void testLoadIterableWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithConflict.kt"); } @TestMetadata("LoadIterableWithNullability.kt") public void testLoadIterableWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithNullability.kt"); } @TestMetadata("LoadIterableWithPropagation.kt") public void testLoadIterableWithPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/mutability/LoadIterableWithPropagation.kt"); } } @@ -5098,14 +4672,17 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformNames extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlinWithStdlib, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt"); - doTestCompiledKotlinWithStdlib(fileName); + runTest("compiler/testData/loadJava/compiledKotlinWithStdlib/platformNames/functionName.kt"); } } } @@ -5114,6 +4691,10 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAgainstKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAgainstKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @@ -5122,38 +4703,102 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamAdapters extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamAdapters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("InheritAmbguousSamAdaptersInKotlin.txt") public void testInheritAmbguousSamAdaptersInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin.txt"); } @TestMetadata("InheritSamAdapterInKotlin.txt") public void testInheritSamAdapterInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin.txt"); } @TestMetadata("OverrideSamAdapterInKotlin.txt") public void testOverrideSamAdapterInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin.txt"); } @TestMetadata("SamAdapterForInheritedFromKotlin.txt") public void testSamAdapterForInheritedFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin.txt"); } @TestMetadata("SamAdapterForOverriddenFromKotlin.txt") public void testSamAdapterForOverriddenFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin.txt"); + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritAmbguousSamAdaptersInKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritAmbguousSamAdaptersInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritAmbguousSamAdaptersInKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritSamAdapterInKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritSamAdapterInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/InheritSamAdapterInKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OverrideSamAdapterInKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOverrideSamAdapterInKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/OverrideSamAdapterInKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SamAdapterForInheritedFromKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSamAdapterForInheritedFromKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForInheritedFromKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SamAdapterForOverriddenFromKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSamAdapterForOverriddenFromKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/samAdapters/SamAdapterForOverriddenFromKotlin"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } @@ -5161,38 +4806,102 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignaturePropagation extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignaturePropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("DeepSubclassingKotlinInJava.txt") public void testDeepSubclassingKotlinInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava.txt"); } @TestMetadata("InheritExtensionAndNot.txt") public void testInheritExtensionAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot.txt"); } @TestMetadata("InheritExtensionFunction.txt") public void testInheritExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction.txt"); } @TestMetadata("SubclassFromTraitImplementation.txt") public void testSubclassFromTraitImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation.txt"); } @TestMetadata("SubclassingKotlinInJava.txt") public void testSubclassingKotlinInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava.txt"); + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeepSubclassingKotlinInJava extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDeepSubclassingKotlinInJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/DeepSubclassingKotlinInJava"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritExtensionAndNot extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritExtensionAndNot() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionAndNot"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InheritExtensionFunction extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInheritExtensionFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/InheritExtensionFunction"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SubclassFromTraitImplementation extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSubclassFromTraitImplementation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassFromTraitImplementation"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SubclassingKotlinInJava extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSubclassingKotlinInJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/signaturePropagation/SubclassingKotlinInJava"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } @@ -5200,20 +4909,48 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/visibility"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("PackageLocal.txt") public void testPackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal.txt"); } @TestMetadata("ProtectedPackage.txt") public void testProtectedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage.txt"); - doTestJavaAgainstKotlin(fileName); + runTest("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage.txt"); + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageLocal extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageLocal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/visibility/PackageLocal"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedPackage extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestJavaAgainstKotlin, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInProtectedPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/javaAgainstKotlin/visibility/ProtectedPackage"), Pattern.compile("^(.+)\\.txt$"), TargetBackend.ANY, true); + } } } } @@ -5222,32 +4959,32 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinAgainstCompiledJavaWithKotlin extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestKotlinAgainstCompiledJavaWithKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinAgainstCompiledJavaWithKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("InheritJavaField.kt") public void testInheritJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritJavaField.kt"); } @TestMetadata("InheritParameterName.kt") public void testInheritParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/InheritParameterName.kt"); } @TestMetadata("javaRefersToKotlin.kt") public void testJavaRefersToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/javaRefersToKotlin.kt"); } @TestMetadata("propagationAgainstDeserializedSuperclass.kt") public void testPropagationAgainstDeserializedSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.kt"); - doTestKotlinAgainstCompiledJavaWithKotlin(fileName); + runTest("compiler/testData/loadJava/kotlinAgainstCompiledJavaWithKotlin/propagationAgainstDeserializedSuperclass.kt"); } } @@ -5255,44 +4992,42 @@ public class LoadJavaUsingJavacTestGenerated extends AbstractLoadJavaUsingJavacT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceJava extends AbstractLoadJavaUsingJavacTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestSourceJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/sourceJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ClassExtendsTypeParameter.java") public void testClassExtendsTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ClassExtendsTypeParameter.java"); } @TestMetadata("ErrorTypes.java") public void testErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ErrorTypes.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ErrorTypes.java"); } @TestMetadata("NullInAnnotation.java") public void testNullInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/NullInAnnotation.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/NullInAnnotation.java"); } @TestMetadata("ReturnInnerSubclassOfSupersInner.java") public void testReturnInnerSubclassOfSupersInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ReturnInnerSubclassOfSupersInner.java"); } @TestMetadata("ReturnNotSubtype.java") public void testReturnNotSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/ReturnNotSubtype.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/ReturnNotSubtype.java"); } @TestMetadata("WrongNumberOfGenericParameters.java") public void testWrongNumberOfGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.java"); - doTestSourceJava(fileName); + runTest("compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.java"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/kdoc/KDocLexerTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/kdoc/KDocLexerTestGenerated.java index d104da76a23..8602ebc48ab 100644 --- a/compiler/tests/org/jetbrains/kotlin/kdoc/KDocLexerTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/kdoc/KDocLexerTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KDocLexerTestGenerated extends AbstractKDocLexerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLexer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/kdoc/lexer"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("codeBlocks.kt") public void testCodeBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/kdoc/lexer/codeBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/kdoc/lexer/codeBlocks.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/modules/xml/ModuleXmlParserTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/modules/xml/ModuleXmlParserTestGenerated.java index 8c208bb526a..0cf73487dfa 100644 --- a/compiler/tests/org/jetbrains/kotlin/modules/xml/ModuleXmlParserTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/modules/xml/ModuleXmlParserTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ModuleXmlParserTestGenerated extends AbstractModuleXmlParserTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModules_xml() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/modules.xml"), Pattern.compile("^(.+)\\.xml$"), TargetBackend.ANY, true); } @TestMetadata("allOnce.xml") public void testAllOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/allOnce.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/allOnce.xml"); } @TestMetadata("comments.xml") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/comments.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/comments.xml"); } @TestMetadata("empty.xml") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/empty.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/empty.xml"); } @TestMetadata("emptyModule.xml") public void testEmptyModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/emptyModule.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/emptyModule.xml"); } @TestMetadata("manyTimes.xml") public void testManyTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/manyTimes.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/manyTimes.xml"); } @TestMetadata("onlySources.xml") public void testOnlySources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/onlySources.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/onlySources.xml"); } @TestMetadata("twoModules.xml") public void testTwoModules() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/twoModules.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/twoModules.xml"); } @TestMetadata("typeTestModule.xml") public void testTypeTestModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/modules.xml/typeTestModule.xml"); - doTest(fileName); + runTest("compiler/testData/modules.xml/typeTestModule.xml"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java index ee0e2659332..8d9fe94b84a 100644 --- a/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/multiplatform/MultiPlatformIntegrationTestGenerated.java @@ -21,172 +21,310 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("compatibleProperties") public void testCompatibleProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/compatibleProperties/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/compatibleProperties/"); } @TestMetadata("compilerArguments") public void testCompilerArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/compilerArguments/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/compilerArguments/"); } @TestMetadata("createImplClassInPlatformModule") public void testCreateImplClassInPlatformModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/createImplClassInPlatformModule/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/createImplClassInPlatformModule/"); } @TestMetadata("explicitActualOnOverrideOfAbstractMethod") public void testExplicitActualOnOverrideOfAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/explicitActualOnOverrideOfAbstractMethod/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/explicitActualOnOverrideOfAbstractMethod/"); } @TestMetadata("genericDeclarations") public void testGenericDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/genericDeclarations/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/genericDeclarations/"); } @TestMetadata("incompatibleCallables") public void testIncompatibleCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/incompatibleCallables/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/incompatibleCallables/"); } @TestMetadata("incompatibleClasses") public void testIncompatibleClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/incompatibleClasses/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/incompatibleClasses/"); } @TestMetadata("incompatibleFunctions") public void testIncompatibleFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/incompatibleFunctions/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/incompatibleFunctions/"); } @TestMetadata("incompatibleNestedClasses") public void testIncompatibleNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/incompatibleNestedClasses/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/incompatibleNestedClasses/"); } @TestMetadata("incompatibleProperties") public void testIncompatibleProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/incompatibleProperties/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/incompatibleProperties/"); } @TestMetadata("incorrectImplInClass") public void testIncorrectImplInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/incorrectImplInClass/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/incorrectImplInClass/"); } @TestMetadata("jsNameClash") public void testJsNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/jsNameClash/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/jsNameClash/"); } @TestMetadata("jvmMultifileClass") public void testJvmMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/jvmMultifileClass/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/jvmMultifileClass/"); } @TestMetadata("missingOverload") public void testMissingOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/missingOverload/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/missingOverload/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/simple/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/simple/"); } @TestMetadata("simpleNoImplKeywordOnTopLevelFunction") public void testSimpleNoImplKeywordOnTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction/"); } @TestMetadata("weakIncompatibilityWithoutActualModifier") public void testWeakIncompatibilityWithoutActualModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/weakIncompatibilityWithoutActualModifier/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/weakIncompatibilityWithoutActualModifier/"); } @TestMetadata("compiler/testData/multiplatform/classScopes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassScopes extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassScopes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("constructorIncorrectSignature") public void testConstructorIncorrectSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/constructorIncorrectSignature/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/constructorIncorrectSignature/"); } @TestMetadata("enumsWithDifferentEntries") public void testEnumsWithDifferentEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/enumsWithDifferentEntries/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/enumsWithDifferentEntries/"); } @TestMetadata("fakeOverrides") public void testFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/fakeOverrides/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/fakeOverrides/"); } @TestMetadata("functionAndPropertyWithSameName") public void testFunctionAndPropertyWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/functionAndPropertyWithSameName/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/functionAndPropertyWithSameName/"); } @TestMetadata("functionIncorrectSignature") public void testFunctionIncorrectSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/functionIncorrectSignature/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/functionIncorrectSignature/"); } @TestMetadata("functionIncorrectSignatureFromSuperclass") public void testFunctionIncorrectSignatureFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/functionIncorrectSignatureFromSuperclass/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/functionIncorrectSignatureFromSuperclass/"); } @TestMetadata("missingConstructor") public void testMissingConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/missingConstructor/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/missingConstructor/"); } @TestMetadata("missingFunction") public void testMissingFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/missingFunction/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/missingFunction/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/classScopes/simple/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/classScopes/simple/"); + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/constructorIncorrectSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstructorIncorrectSignature extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstructorIncorrectSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/constructorIncorrectSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/enumsWithDifferentEntries") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumsWithDifferentEntries extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumsWithDifferentEntries() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/enumsWithDifferentEntries"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/fakeOverrides") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FakeOverrides extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFakeOverrides() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/fakeOverrides"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/functionAndPropertyWithSameName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionAndPropertyWithSameName extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunctionAndPropertyWithSameName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/functionAndPropertyWithSameName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/functionIncorrectSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionIncorrectSignature extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunctionIncorrectSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/functionIncorrectSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/functionIncorrectSignatureFromSuperclass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionIncorrectSignatureFromSuperclass extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunctionIncorrectSignatureFromSuperclass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/functionIncorrectSignatureFromSuperclass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/missingConstructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MissingConstructor extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMissingConstructor() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/missingConstructor"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/missingFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MissingFunction extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMissingFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/missingFunction"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/classScopes/simple") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Simple extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimple() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/classScopes/simple"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/testData/multiplatform/compatibleProperties") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompatibleProperties extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompatibleProperties() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/compatibleProperties"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/compilerArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompilerArguments extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompilerArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/compilerArguments"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/createImplClassInPlatformModule") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CreateImplClassInPlatformModule extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCreateImplClassInPlatformModule() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/createImplClassInPlatformModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } } @@ -194,14 +332,56 @@ public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatform @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/defaultArguments"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("useDefaultArgumentsInDependency") public void testUseDefaultArgumentsInDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/defaultArguments/useDefaultArgumentsInDependency/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/defaultArguments/useDefaultArgumentsInDependency/"); + } + + @TestMetadata("compiler/testData/multiplatform/defaultArguments/useDefaultArgumentsInDependency") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UseDefaultArgumentsInDependency extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUseDefaultArgumentsInDependency() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/defaultArguments/useDefaultArgumentsInDependency"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/testData/multiplatform/explicitActualOnOverrideOfAbstractMethod") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExplicitActualOnOverrideOfAbstractMethod extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExplicitActualOnOverrideOfAbstractMethod() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/explicitActualOnOverrideOfAbstractMethod"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/genericDeclarations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class GenericDeclarations extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInGenericDeclarations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/genericDeclarations"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } } @@ -209,26 +389,183 @@ public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatform @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplTypeAlias extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/implTypeAlias"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("discriminateHeaderClassInFavorOfTypeAlias") public void testDiscriminateHeaderClassInFavorOfTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/implTypeAlias/discriminateHeaderClassInFavorOfTypeAlias/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/implTypeAlias/discriminateHeaderClassInFavorOfTypeAlias/"); } @TestMetadata("generic") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/implTypeAlias/generic/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/implTypeAlias/generic/"); } @TestMetadata("nestedClassesViaTypeAlias") public void testNestedClassesViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/implTypeAlias/nestedClassesViaTypeAlias/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/implTypeAlias/nestedClassesViaTypeAlias/"); + } + + @TestMetadata("compiler/testData/multiplatform/implTypeAlias/discriminateHeaderClassInFavorOfTypeAlias") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DiscriminateHeaderClassInFavorOfTypeAlias extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDiscriminateHeaderClassInFavorOfTypeAlias() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/implTypeAlias/discriminateHeaderClassInFavorOfTypeAlias"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/implTypeAlias/generic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Generic extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInGeneric() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/implTypeAlias/generic"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/implTypeAlias/nestedClassesViaTypeAlias") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClassesViaTypeAlias extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNestedClassesViaTypeAlias() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/implTypeAlias/nestedClassesViaTypeAlias"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/testData/multiplatform/incompatibleCallables") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncompatibleCallables extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncompatibleCallables() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/incompatibleCallables"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/incompatibleClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncompatibleClasses extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncompatibleClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/incompatibleClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/incompatibleFunctions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncompatibleFunctions extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncompatibleFunctions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/incompatibleFunctions"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/incompatibleNestedClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncompatibleNestedClasses extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncompatibleNestedClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/incompatibleNestedClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/incompatibleProperties") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncompatibleProperties extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncompatibleProperties() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/incompatibleProperties"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/incorrectImplInClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncorrectImplInClass extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncorrectImplInClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/incorrectImplInClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/jsNameClash") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JsNameClash extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJsNameClash() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/jsNameClash"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/jvmMultifileClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmMultifileClass extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmMultifileClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/jvmMultifileClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/missingOverload") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MissingOverload extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMissingOverload() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/missingOverload"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } } @@ -236,20 +573,87 @@ public class MultiPlatformIntegrationTestGenerated extends AbstractMultiPlatform @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/regressions"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("incompatibleClassScopesWithImplTypeAlias") public void testIncompatibleClassScopesWithImplTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias/"); } @TestMetadata("kt17001") public void testKt17001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/multiplatform/regressions/kt17001/"); - doTest(fileName); + runTest("compiler/testData/multiplatform/regressions/kt17001/"); + } + + @TestMetadata("compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncompatibleClassScopesWithImplTypeAlias extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncompatibleClassScopesWithImplTypeAlias() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/regressions/incompatibleClassScopesWithImplTypeAlias"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/regressions/kt17001") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Kt17001 extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKt17001() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/regressions/kt17001"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/testData/multiplatform/simple") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Simple extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimple() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/simple"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleNoImplKeywordOnTopLevelFunction extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimpleNoImplKeywordOnTopLevelFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/simpleNoImplKeywordOnTopLevelFunction"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/testData/multiplatform/weakIncompatibilityWithoutActualModifier") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WeakIncompatibilityWithoutActualModifier extends AbstractMultiPlatformIntegrationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWeakIncompatibilityWithoutActualModifier() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/multiplatform/weakIncompatibilityWithoutActualModifier"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java index 975b261cd9f..ad0e2810619 100644 --- a/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/parsing/ParsingTestGenerated.java @@ -23,10 +23,13 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Psi extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbsentInnerType.kt") public void testAbsentInnerType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/AbsentInnerType.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/AbsentInnerType.kt"); } public void testAllFilesPresentInPsi() throws Exception { @@ -35,978 +38,826 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestMetadata("AnonymousInitializer.kt") public void testAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/AnonymousInitializer.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/AnonymousInitializer.kt"); } @TestMetadata("AssertNotNull.kt") public void testAssertNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/AssertNotNull.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/AssertNotNull.kt"); } @TestMetadata("BabySteps.kt") public void testBabySteps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BabySteps.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BabySteps.kt"); } @TestMetadata("BabySteps_ERR.kt") public void testBabySteps_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BabySteps_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BabySteps_ERR.kt"); } @TestMetadata("BackslashInString.kt") public void testBackslashInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BackslashInString.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BackslashInString.kt"); } @TestMetadata("BlockCommentAtBeginningOfFile1.kt") public void testBlockCommentAtBeginningOfFile1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BlockCommentAtBeginningOfFile1.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BlockCommentAtBeginningOfFile1.kt"); } @TestMetadata("BlockCommentAtBeginningOfFile2.kt") public void testBlockCommentAtBeginningOfFile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BlockCommentAtBeginningOfFile2.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BlockCommentAtBeginningOfFile2.kt"); } @TestMetadata("BlockCommentAtBeginningOfFile3.kt") public void testBlockCommentAtBeginningOfFile3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BlockCommentAtBeginningOfFile3.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BlockCommentAtBeginningOfFile3.kt"); } @TestMetadata("BlockCommentAtBeginningOfFile4.kt") public void testBlockCommentAtBeginningOfFile4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BlockCommentAtBeginningOfFile4.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BlockCommentAtBeginningOfFile4.kt"); } @TestMetadata("BlockCommentUnmatchedClosing_ERR.kt") public void testBlockCommentUnmatchedClosing_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/BlockCommentUnmatchedClosing_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/BlockCommentUnmatchedClosing_ERR.kt"); } @TestMetadata("ByClauses.kt") public void testByClauses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ByClauses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ByClauses.kt"); } @TestMetadata("CallWithManyClosures.kt") public void testCallWithManyClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CallWithManyClosures.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CallWithManyClosures.kt"); } @TestMetadata("CallsInWhen.kt") public void testCallsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CallsInWhen.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CallsInWhen.kt"); } @TestMetadata("CollectionLiterals.kt") public void testCollectionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CollectionLiterals.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CollectionLiterals.kt"); } @TestMetadata("CollectionLiterals_ERR.kt") public void testCollectionLiterals_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CollectionLiterals_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CollectionLiterals_ERR.kt"); } @TestMetadata("CommentsBinding.kt") public void testCommentsBinding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CommentsBinding.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CommentsBinding.kt"); } @TestMetadata("CommentsBindingInLambda.kt") public void testCommentsBindingInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CommentsBindingInLambda.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CommentsBindingInLambda.kt"); } @TestMetadata("CommentsBindingInStatementBlock.kt") public void testCommentsBindingInStatementBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/CommentsBindingInStatementBlock.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/CommentsBindingInStatementBlock.kt"); } @TestMetadata("Constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Constructors.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Constructors.kt"); } @TestMetadata("ControlStructures.kt") public void testControlStructures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ControlStructures.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ControlStructures.kt"); } @TestMetadata("DefaultKeyword.kt") public void testDefaultKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DefaultKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DefaultKeyword.kt"); } @TestMetadata("destructuringInLambdas.kt") public void testDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/destructuringInLambdas.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/destructuringInLambdas.kt"); } @TestMetadata("destructuringInLambdas_ERR.kt") public void testDestructuringInLambdas_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/destructuringInLambdas_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/destructuringInLambdas_ERR.kt"); } @TestMetadata("DocCommentAfterFileAnnotations.kt") public void testDocCommentAfterFileAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DocCommentAfterFileAnnotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DocCommentAfterFileAnnotations.kt"); } @TestMetadata("DocCommentForFirstDeclaration.kt") public void testDocCommentForFirstDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DocCommentForFirstDeclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DocCommentForFirstDeclaration.kt"); } @TestMetadata("DocCommentOnPackageDirectiveLine.kt") public void testDocCommentOnPackageDirectiveLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DocCommentOnPackageDirectiveLine.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DocCommentOnPackageDirectiveLine.kt"); } @TestMetadata("DocCommentsBinding.kt") public void testDocCommentsBinding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DocCommentsBinding.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DocCommentsBinding.kt"); } @TestMetadata("DoubleColon.kt") public void testDoubleColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DoubleColon.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DoubleColon.kt"); } @TestMetadata("DoubleColonWhitespaces.kt") public void testDoubleColonWhitespaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DoubleColonWhitespaces.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DoubleColonWhitespaces.kt"); } @TestMetadata("DoubleColon_ERR.kt") public void testDoubleColon_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DoubleColon_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DoubleColon_ERR.kt"); } @TestMetadata("DuplicateAccessor.kt") public void testDuplicateAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DuplicateAccessor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DuplicateAccessor.kt"); } @TestMetadata("DynamicReceiver.kt") public void testDynamicReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DynamicReceiver.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DynamicReceiver.kt"); } @TestMetadata("DynamicSoftKeyword.kt") public void testDynamicSoftKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DynamicSoftKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DynamicSoftKeyword.kt"); } @TestMetadata("DynamicTypes.kt") public void testDynamicTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/DynamicTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/DynamicTypes.kt"); } @TestMetadata("EOLsInComments.kt") public void testEOLsInComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EOLsInComments.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EOLsInComments.kt"); } @TestMetadata("EOLsOnRollback.kt") public void testEOLsOnRollback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EOLsOnRollback.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EOLsOnRollback.kt"); } @TestMetadata("EmptyFile.kt") public void testEmptyFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EmptyFile.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EmptyFile.kt"); } @TestMetadata("EmptyName.kt") public void testEmptyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EmptyName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EmptyName.kt"); } @TestMetadata("EnumCommas.kt") public void testEnumCommas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumCommas.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumCommas.kt"); } @TestMetadata("EnumEntryCommaAnnotatedMember.kt") public void testEnumEntryCommaAnnotatedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntryCommaAnnotatedMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntryCommaAnnotatedMember.kt"); } @TestMetadata("EnumEntryCommaInlineMember.kt") public void testEnumEntryCommaInlineMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntryCommaInlineMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntryCommaInlineMember.kt"); } @TestMetadata("EnumEntryCommaMember.kt") public void testEnumEntryCommaMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntryCommaMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntryCommaMember.kt"); } @TestMetadata("EnumEntryCommaPublicMember.kt") public void testEnumEntryCommaPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntryCommaPublicMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntryCommaPublicMember.kt"); } @TestMetadata("EnumEntrySemicolonInlineMember.kt") public void testEnumEntrySemicolonInlineMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntrySemicolonInlineMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntrySemicolonInlineMember.kt"); } @TestMetadata("EnumEntrySemicolonMember.kt") public void testEnumEntrySemicolonMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntrySemicolonMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntrySemicolonMember.kt"); } @TestMetadata("EnumEntrySpaceInlineMember.kt") public void testEnumEntrySpaceInlineMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntrySpaceInlineMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntrySpaceInlineMember.kt"); } @TestMetadata("EnumEntrySpaceMember.kt") public void testEnumEntrySpaceMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntrySpaceMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntrySpaceMember.kt"); } @TestMetadata("EnumEntryTwoCommas.kt") public void testEnumEntryTwoCommas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumEntryTwoCommas.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumEntryTwoCommas.kt"); } @TestMetadata("EnumIn.kt") public void testEnumIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumIn.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumIn.kt"); } @TestMetadata("EnumInline.kt") public void testEnumInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumInline.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumInline.kt"); } @TestMetadata("EnumInlinePublic.kt") public void testEnumInlinePublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumInlinePublic.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumInlinePublic.kt"); } @TestMetadata("EnumMissingName.kt") public void testEnumMissingName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumMissingName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumMissingName.kt"); } @TestMetadata("EnumOldConstructorSyntax.kt") public void testEnumOldConstructorSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumOldConstructorSyntax.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumOldConstructorSyntax.kt"); } @TestMetadata("EnumShortCommas.kt") public void testEnumShortCommas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumShortCommas.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumShortCommas.kt"); } @TestMetadata("EnumShortWithOverload.kt") public void testEnumShortWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumShortWithOverload.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumShortWithOverload.kt"); } @TestMetadata("EnumWithAnnotationKeyword.kt") public void testEnumWithAnnotationKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/EnumWithAnnotationKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/EnumWithAnnotationKeyword.kt"); } @TestMetadata("Enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Enums.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Enums.kt"); } @TestMetadata("Expressions_ERR.kt") public void testExpressions_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Expressions_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Expressions_ERR.kt"); } @TestMetadata("ExtensionsWithQNReceiver.kt") public void testExtensionsWithQNReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ExtensionsWithQNReceiver.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ExtensionsWithQNReceiver.kt"); } @TestMetadata("FileStart_ERR.kt") public void testFileStart_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FileStart_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FileStart_ERR.kt"); } @TestMetadata("FloatingPointLiteral.kt") public void testFloatingPointLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FloatingPointLiteral.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FloatingPointLiteral.kt"); } @TestMetadata("ForWithMultiDecl.kt") public void testForWithMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ForWithMultiDecl.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ForWithMultiDecl.kt"); } @TestMetadata("FunctionCalls.kt") public void testFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionCalls.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionCalls.kt"); } @TestMetadata("FunctionExpressions.kt") public void testFunctionExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionExpressions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionExpressions.kt"); } @TestMetadata("FunctionExpressions_ERR.kt") public void testFunctionExpressions_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionExpressions_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionExpressions_ERR.kt"); } @TestMetadata("FunctionLiterals.kt") public void testFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionLiterals.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionLiterals.kt"); } @TestMetadata("FunctionLiterals_ERR.kt") public void testFunctionLiterals_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionLiterals_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionLiterals_ERR.kt"); } @TestMetadata("FunctionNoParameterList.kt") public void testFunctionNoParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionNoParameterList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionNoParameterList.kt"); } @TestMetadata("FunctionTypes.kt") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionTypes.kt"); } @TestMetadata("FunctionTypes_ERR.kt") public void testFunctionTypes_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionTypes_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionTypes_ERR.kt"); } @TestMetadata("Functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Functions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Functions.kt"); } @TestMetadata("FunctionsWithoutName.kt") public void testFunctionsWithoutName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionsWithoutName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionsWithoutName.kt"); } @TestMetadata("FunctionsWithoutName_ERR.kt") public void testFunctionsWithoutName_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/FunctionsWithoutName_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/FunctionsWithoutName_ERR.kt"); } @TestMetadata("Functions_ERR.kt") public void testFunctions_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Functions_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Functions_ERR.kt"); } @TestMetadata("HangOnLonelyModifier.kt") public void testHangOnLonelyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/HangOnLonelyModifier.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/HangOnLonelyModifier.kt"); } @TestMetadata("IfWithPropery.kt") public void testIfWithPropery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/IfWithPropery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/IfWithPropery.kt"); } @TestMetadata("ImportSoftKW.kt") public void testImportSoftKW() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ImportSoftKW.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ImportSoftKW.kt"); } @TestMetadata("Imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Imports.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Imports.kt"); } @TestMetadata("Imports_ERR.kt") public void testImports_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Imports_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Imports_ERR.kt"); } @TestMetadata("IncompleteFunctionLiteral.kt") public void testIncompleteFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/IncompleteFunctionLiteral.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/IncompleteFunctionLiteral.kt"); } @TestMetadata("Inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Inner.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Inner.kt"); } @TestMetadata("IntegerLiteral.kt") public void testIntegerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/IntegerLiteral.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/IntegerLiteral.kt"); } @TestMetadata("Interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Interface.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Interface.kt"); } @TestMetadata("InterfaceWithEnumKeyword.kt") public void testInterfaceWithEnumKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/InterfaceWithEnumKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/InterfaceWithEnumKeyword.kt"); } @TestMetadata("Labels.kt") public void testLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Labels.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Labels.kt"); } @TestMetadata("LineCommentAfterFileAnnotations.kt") public void testLineCommentAfterFileAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/LineCommentAfterFileAnnotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/LineCommentAfterFileAnnotations.kt"); } @TestMetadata("LineCommentForFirstDeclaration.kt") public void testLineCommentForFirstDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/LineCommentForFirstDeclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/LineCommentForFirstDeclaration.kt"); } @TestMetadata("LineCommentsInBlock.kt") public void testLineCommentsInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/LineCommentsInBlock.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/LineCommentsInBlock.kt"); } @TestMetadata("LocalDeclarations.kt") public void testLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/LocalDeclarations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/LocalDeclarations.kt"); } @TestMetadata("LongPackageName.kt") public void testLongPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/LongPackageName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/LongPackageName.kt"); } @TestMetadata("ModifierAsSelector.kt") public void testModifierAsSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ModifierAsSelector.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ModifierAsSelector.kt"); } @TestMetadata("MultiVariableDeclarations.kt") public void testMultiVariableDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/MultiVariableDeclarations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/MultiVariableDeclarations.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/NamedClassObject.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/NamedClassObject.kt"); } @TestMetadata("namelessObjectAsEnumMember.kt") public void testNamelessObjectAsEnumMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/namelessObjectAsEnumMember.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/namelessObjectAsEnumMember.kt"); } @TestMetadata("NestedComments.kt") public void testNestedComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/NestedComments.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/NestedComments.kt"); } @TestMetadata("NewLinesValidOperations.kt") public void testNewLinesValidOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/NewLinesValidOperations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/NewLinesValidOperations.kt"); } @TestMetadata("NewlinesInParentheses.kt") public void testNewlinesInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/NewlinesInParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/NewlinesInParentheses.kt"); } @TestMetadata("NonTypeBeforeDotInBaseClass.kt") public void testNonTypeBeforeDotInBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/NonTypeBeforeDotInBaseClass.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/NonTypeBeforeDotInBaseClass.kt"); } @TestMetadata("NotIsAndNotIn.kt") public void testNotIsAndNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/NotIsAndNotIn.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/NotIsAndNotIn.kt"); } @TestMetadata("ObjectLiteralAsStatement.kt") public void testObjectLiteralAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ObjectLiteralAsStatement.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ObjectLiteralAsStatement.kt"); } @TestMetadata("ParameterNameMising.kt") public void testParameterNameMising() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ParameterNameMising.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ParameterNameMising.kt"); } @TestMetadata("ParameterType.kt") public void testParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ParameterType.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ParameterType.kt"); } @TestMetadata("ParameterType_ERR.kt") public void testParameterType_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/ParameterType_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/ParameterType_ERR.kt"); } @TestMetadata("Precedence.kt") public void testPrecedence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Precedence.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Precedence.kt"); } @TestMetadata("PrimaryConstructorModifiers_ERR.kt") public void testPrimaryConstructorModifiers_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/PrimaryConstructorModifiers_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/PrimaryConstructorModifiers_ERR.kt"); } @TestMetadata("Properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Properties.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Properties.kt"); } @TestMetadata("PropertiesFollowedByInitializers.kt") public void testPropertiesFollowedByInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/PropertiesFollowedByInitializers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/PropertiesFollowedByInitializers.kt"); } @TestMetadata("Properties_ERR.kt") public void testProperties_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Properties_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Properties_ERR.kt"); } @TestMetadata("PropertyInvokes.kt") public void testPropertyInvokes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/PropertyInvokes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/PropertyInvokes.kt"); } @TestMetadata("QuotedIdentifiers.kt") public void testQuotedIdentifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/QuotedIdentifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/QuotedIdentifiers.kt"); } @TestMetadata("Reserved.kt") public void testReserved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Reserved.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Reserved.kt"); } @TestMetadata("SemicolonAfterIf.kt") public void testSemicolonAfterIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SemicolonAfterIf.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SemicolonAfterIf.kt"); } @TestMetadata("semicolonBetweenDeclarations.kt") public void testSemicolonBetweenDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/semicolonBetweenDeclarations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/semicolonBetweenDeclarations.kt"); } @TestMetadata("SimpleClassMembers.kt") public void testSimpleClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SimpleClassMembers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SimpleClassMembers.kt"); } @TestMetadata("SimpleClassMembers_ERR.kt") public void testSimpleClassMembers_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SimpleClassMembers_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SimpleClassMembers_ERR.kt"); } @TestMetadata("SimpleExpressions.kt") public void testSimpleExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SimpleExpressions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SimpleExpressions.kt"); } @TestMetadata("SimpleModifiers.kt") public void testSimpleModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SimpleModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SimpleModifiers.kt"); } @TestMetadata("SoftKeywords.kt") public void testSoftKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SoftKeywords.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SoftKeywords.kt"); } @TestMetadata("SoftKeywordsInTypeArguments.kt") public void testSoftKeywordsInTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/SoftKeywordsInTypeArguments.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/SoftKeywordsInTypeArguments.kt"); } @TestMetadata("StringTemplates.kt") public void testStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/StringTemplates.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/StringTemplates.kt"); } @TestMetadata("Super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/Super.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/Super.kt"); } @TestMetadata("TraitConstructor.kt") public void testTraitConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TraitConstructor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TraitConstructor.kt"); } @TestMetadata("TripleDot.kt") public void testTripleDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TripleDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TripleDot.kt"); } @TestMetadata("TryRecovery.kt") public void testTryRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TryRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TryRecovery.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeAlias.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeAlias.kt"); } @TestMetadata("TypeAlias_ERR.kt") public void testTypeAlias_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeAlias_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeAlias_ERR.kt"); } @TestMetadata("TypeConstraints.kt") public void testTypeConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeConstraints.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeConstraints.kt"); } @TestMetadata("TypeExpressionAmbiguities_ERR.kt") public void testTypeExpressionAmbiguities_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeExpressionAmbiguities_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeExpressionAmbiguities_ERR.kt"); } @TestMetadata("TypeModifiers.kt") public void testTypeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeModifiers.kt"); } @TestMetadata("TypeModifiersParenthesized.kt") public void testTypeModifiersParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeModifiersParenthesized.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeModifiersParenthesized.kt"); } @TestMetadata("TypeModifiers_ERR.kt") public void testTypeModifiers_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeModifiers_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeModifiers_ERR.kt"); } @TestMetadata("TypeParametersBeforeName.kt") public void testTypeParametersBeforeName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypeParametersBeforeName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypeParametersBeforeName.kt"); } @TestMetadata("TypealiasIsKeyword.kt") public void testTypealiasIsKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/TypealiasIsKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/TypealiasIsKeyword.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/When.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/When.kt"); } @TestMetadata("When_ERR.kt") public void testWhen_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/When_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/When_ERR.kt"); } @TestMetadata("compiler/testData/psi/annotation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotation extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedExpressions.kt") public void testAnnotatedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/AnnotatedExpressions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/AnnotatedExpressions.kt"); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/Annotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/Annotations.kt"); } @TestMetadata("annotationsOnNullableTypes.kt") public void testAnnotationsOnNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/annotationsOnNullableTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/annotationsOnNullableTypes.kt"); } @TestMetadata("annotationsOnParenthesizedTypes.kt") public void testAnnotationsOnParenthesizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/annotationsOnParenthesizedTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/annotationsOnParenthesizedTypes.kt"); } @TestMetadata("AnnotationsOnPatterns.kt") public void testAnnotationsOnPatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/AnnotationsOnPatterns.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/AnnotationsOnPatterns.kt"); } @TestMetadata("Annotations_ERR.kt") public void testAnnotations_ERR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/Annotations_ERR.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/Annotations_ERR.kt"); } @TestMetadata("forParameters.kt") public void testForParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/forParameters.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/forParameters.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/lambda.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/lambda.kt"); } @TestMetadata("lambdaRecovery.kt") public void testLambdaRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/lambdaRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/lambdaRecovery.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/multiDeclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/multiDeclaration.kt"); } @TestMetadata("noParameterYet.kt") public void testNoParameterYet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/noParameterYet.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/noParameterYet.kt"); } @TestMetadata("oldAnnotationsRecovery.kt") public void testOldAnnotationsRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/oldAnnotationsRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/oldAnnotationsRecovery.kt"); } @TestMetadata("ShortAnnotations.kt") public void testShortAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/ShortAnnotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/ShortAnnotations.kt"); } @TestMetadata("compiler/testData/psi/annotation/at") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class At extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/at"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("annotationAtFileStart.kt") public void testAnnotationAtFileStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/annotationAtFileStart.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/annotationAtFileStart.kt"); } @TestMetadata("annotationValueArgumentsAmbiguity.kt") public void testAnnotationValueArgumentsAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/annotationValueArgumentsAmbiguity.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/annotationValueArgumentsAmbiguity.kt"); } @TestMetadata("blockLevelExpressions.kt") public void testBlockLevelExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/blockLevelExpressions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/blockLevelExpressions.kt"); } @TestMetadata("blockLevelExpressionsNoNewLine.kt") public void testBlockLevelExpressionsNoNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/blockLevelExpressionsNoNewLine.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/blockLevelExpressionsNoNewLine.kt"); } @TestMetadata("danglingBlockLevelAnnotations.kt") public void testDanglingBlockLevelAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/danglingBlockLevelAnnotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/danglingBlockLevelAnnotations.kt"); } @TestMetadata("declarationsJustAtTyped.kt") public void testDeclarationsJustAtTyped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/declarationsJustAtTyped.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/declarationsJustAtTyped.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/enumEntries.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/enumEntries.kt"); } @TestMetadata("expressionJustAtTyped.kt") public void testExpressionJustAtTyped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/expressionJustAtTyped.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/expressionJustAtTyped.kt"); } @TestMetadata("modifierAtFileStart.kt") public void testModifierAtFileStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/modifierAtFileStart.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/modifierAtFileStart.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/primaryConstructor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/primaryConstructor.kt"); } @TestMetadata("validDeclarations.kt") public void testValidDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/validDeclarations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/validDeclarations.kt"); } @TestMetadata("validExpressions.kt") public void testValidExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/at/validExpressions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/at/validExpressions.kt"); } } @@ -1014,20 +865,22 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class List extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/list"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/list/basic.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/list/basic.kt"); } @TestMetadata("recovery.kt") public void testRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/list/recovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/list/recovery.kt"); } } @@ -1035,20 +888,22 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ModifiersMigration extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModifiersMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/modifiersMigration"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("newModifiers.kt") public void testNewModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/modifiersMigration/newModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/modifiersMigration/newModifiers.kt"); } @TestMetadata("oldUsages.kt") public void testOldUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/modifiersMigration/oldUsages.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/modifiersMigration/oldUsages.kt"); } } @@ -1056,32 +911,32 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Options extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/options"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("annotationAsArg.kt") public void testAnnotationAsArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotationAsArg.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/options/annotationAsArg.kt"); } @TestMetadata("annotationAsArgComplex.kt") public void testAnnotationAsArgComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/annotationAsArgComplex.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/options/annotationAsArgComplex.kt"); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/java.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/options/java.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/options/local.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/options/local.kt"); } } @@ -1089,6 +944,10 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Targeted extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargeted() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/targeted"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @@ -1097,38 +956,37 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnField extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOnField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/targeted/onField"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onField/delegate.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onField/delegate.kt"); } @TestMetadata("fqName.kt") public void testFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onField/fqName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onField/fqName.kt"); } @TestMetadata("inWrongPlace.kt") public void testInWrongPlace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onField/inWrongPlace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onField/inWrongPlace.kt"); } @TestMetadata("manyInOneAnnotationBlock.kt") public void testManyInOneAnnotationBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onField/manyInOneAnnotationBlock.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onField/manyInOneAnnotationBlock.kt"); } @TestMetadata("simpleFieldAnnotation.kt") public void testSimpleFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onField/simpleFieldAnnotation.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onField/simpleFieldAnnotation.kt"); } } @@ -1136,56 +994,52 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnFile extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOnFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/targeted/onFile"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("fileAnnotationInWrongPlace.kt") public void testFileAnnotationInWrongPlace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/fileAnnotationInWrongPlace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/fileAnnotationInWrongPlace.kt"); } @TestMetadata("manyAnnotationBlocks.kt") public void testManyAnnotationBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/manyAnnotationBlocks.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/manyAnnotationBlocks.kt"); } @TestMetadata("manyInOneAnnotationBlock.kt") public void testManyInOneAnnotationBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/manyInOneAnnotationBlock.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/manyInOneAnnotationBlock.kt"); } @TestMetadata("nonFIleAnnotationBeforePackage.kt") public void testNonFIleAnnotationBeforePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/nonFIleAnnotationBeforePackage.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/nonFIleAnnotationBeforePackage.kt"); } @TestMetadata("single.kt") public void testSingle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/single.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/single.kt"); } @TestMetadata("withoutFileAnnotationAndPackageDeclaration.kt") public void testWithoutFileAnnotationAndPackageDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/withoutFileAnnotationAndPackageDeclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/withoutFileAnnotationAndPackageDeclaration.kt"); } @TestMetadata("withoutPackage.kt") public void testWithoutPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/withoutPackage.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/withoutPackage.kt"); } @TestMetadata("withoutPackageWithSimpleAnnotation.kt") public void testWithoutPackageWithSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onFile/withoutPackageWithSimpleAnnotation.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onFile/withoutPackageWithSimpleAnnotation.kt"); } } @@ -1193,26 +1047,27 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnGetSetSparam extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOnGetSetSparam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/targeted/onGetSetSparam"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("inWrongPlace.kt") public void testInWrongPlace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onGetSetSparam/inWrongPlace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onGetSetSparam/inWrongPlace.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onGetSetSparam/simple.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onGetSetSparam/simple.kt"); } @TestMetadata("twoAnnotationLists.kt") public void testTwoAnnotationLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onGetSetSparam/twoAnnotationLists.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onGetSetSparam/twoAnnotationLists.kt"); } } @@ -1220,32 +1075,32 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnParam extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOnParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/annotation/targeted/onParam"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("modifiers.kt") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onParam/modifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onParam/modifiers.kt"); } @TestMetadata("recovery.kt") public void testRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onParam/recovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onParam/recovery.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onParam/simple.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onParam/simple.kt"); } @TestMetadata("targetExpected.kt") public void testTargetExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/annotation/targeted/onParam/targetExpected.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/annotation/targeted/onParam/targetExpected.kt"); } } } @@ -1255,106 +1110,99 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Examples extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExamples() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/AnonymousObjects.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/AnonymousObjects.kt"); } @TestMetadata("BinaryTree.kt") public void testBinaryTree() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/BinaryTree.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/BinaryTree.kt"); } @TestMetadata("BitArith.kt") public void testBitArith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/BitArith.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/BitArith.kt"); } @TestMetadata("Builder.kt") public void testBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/Builder.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/Builder.kt"); } @TestMetadata("Color.kt") public void testColor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/Color.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/Color.kt"); } @TestMetadata("FunctionsAndTypes.kt") public void testFunctionsAndTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/FunctionsAndTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/FunctionsAndTypes.kt"); } @TestMetadata("Graph.kt") public void testGraph() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/Graph.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/Graph.kt"); } @TestMetadata("IPushPop.kt") public void testIPushPop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/IPushPop.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/IPushPop.kt"); } @TestMetadata("LINQ.kt") public void testLINQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/LINQ.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/LINQ.kt"); } @TestMetadata("Queue.kt") public void testQueue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/Queue.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/Queue.kt"); } @TestMetadata("Stack.kt") public void testStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/Stack.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/Stack.kt"); } @TestMetadata("UnionFind.kt") public void testUnionFind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/UnionFind.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/UnionFind.kt"); } @TestMetadata("UpdateOperation.kt") public void testUpdateOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/UpdateOperation.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/UpdateOperation.kt"); } @TestMetadata("With.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/With.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/With.kt"); } @TestMetadata("compiler/testData/psi/examples/array") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Array extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples/array"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("MutableArray.kt") public void testMutableArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/array/MutableArray.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/array/MutableArray.kt"); } } @@ -1362,80 +1210,72 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples/collections"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("ArrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/ArrayList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/ArrayList.kt"); } @TestMetadata("HashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/HashMap.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/HashMap.kt"); } @TestMetadata("IIterable.kt") public void testIIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IIterable.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IIterable.kt"); } @TestMetadata("IIterator.kt") public void testIIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IIterator.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IIterator.kt"); } @TestMetadata("IList.kt") public void testIList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IList.kt"); } @TestMetadata("IMutableIterable.kt") public void testIMutableIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IMutableIterable.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IMutableIterable.kt"); } @TestMetadata("IMutableIterator.kt") public void testIMutableIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IMutableIterator.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IMutableIterator.kt"); } @TestMetadata("IMutableList.kt") public void testIMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IMutableList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IMutableList.kt"); } @TestMetadata("IMutableSet.kt") public void testIMutableSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/IMutableSet.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/IMutableSet.kt"); } @TestMetadata("ISet.kt") public void testISet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/ISet.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/ISet.kt"); } @TestMetadata("ISized.kt") public void testISized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/ISized.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/ISized.kt"); } @TestMetadata("LinkedList.kt") public void testLinkedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/collections/LinkedList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/collections/LinkedList.kt"); } } @@ -1443,14 +1283,17 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Io extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples/io"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("IOSamples.kt") public void testIOSamples() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/io/IOSamples.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/io/IOSamples.kt"); } } @@ -1458,14 +1301,17 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Map extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples/map"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("IMap.kt") public void testIMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/map/IMap.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/map/IMap.kt"); } } @@ -1473,26 +1319,27 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Priorityqueues extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPriorityqueues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples/priorityqueues"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("BinaryHeap.kt") public void testBinaryHeap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/priorityqueues/BinaryHeap.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/priorityqueues/BinaryHeap.kt"); } @TestMetadata("IPriorityQueue.kt") public void testIPriorityQueue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/priorityqueues/IPriorityQueue.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/priorityqueues/IPriorityQueue.kt"); } @TestMetadata("PriorityQueueAsPushPop.kt") public void testPriorityQueueAsPushPop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/priorityqueues/PriorityQueueAsPushPop.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/priorityqueues/PriorityQueueAsPushPop.kt"); } } @@ -1500,20 +1347,22 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Util extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUtil() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/examples/util"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("Comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/util/Comparison.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/util/Comparison.kt"); } @TestMetadata("IComparable.kt") public void testIComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/examples/util/IComparable.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/examples/util/IComparable.kt"); } } } @@ -1522,50 +1371,47 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionReceivers extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionReceivers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/functionReceivers"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("FunctionTypesWithFunctionReceivers.kt") public void testFunctionTypesWithFunctionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/FunctionTypesWithFunctionReceivers.kt"); } @TestMetadata("FunctionsWithFunctionReceivers.kt") public void testFunctionsWithFunctionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceivers.kt"); } @TestMetadata("FunctionsWithFunctionReceiversAnnotations.kt") public void testFunctionsWithFunctionReceiversAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceiversAnnotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceiversAnnotations.kt"); } @TestMetadata("FunctionsWithFunctionReceiversRecovery.kt") public void testFunctionsWithFunctionReceiversRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceiversRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/FunctionsWithFunctionReceiversRecovery.kt"); } @TestMetadata("PropertiesWithFunctionReceivers.kt") public void testPropertiesWithFunctionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceivers.kt"); } @TestMetadata("PropertiesWithFunctionReceiversAnnotations.kt") public void testPropertiesWithFunctionReceiversAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceiversAnnotations.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceiversAnnotations.kt"); } @TestMetadata("PropertiesWithFunctionReceiversRecovery.kt") public void testPropertiesWithFunctionReceiversRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceiversRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/functionReceivers/PropertiesWithFunctionReceiversRecovery.kt"); } } @@ -1573,32 +1419,32 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GreatSyntacticShift extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGreatSyntacticShift() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/greatSyntacticShift"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("functionLiterals.kt") public void testFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/greatSyntacticShift/functionLiterals.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/greatSyntacticShift/functionLiterals.kt"); } @TestMetadata("functionTypes.kt") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/greatSyntacticShift/functionTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/greatSyntacticShift/functionTypes.kt"); } @TestMetadata("FunctionTypesAsArguments.kt") public void testFunctionTypesAsArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/greatSyntacticShift/FunctionTypesAsArguments.kt"); } @TestMetadata("nullableTypes.kt") public void testNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/greatSyntacticShift/nullableTypes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/greatSyntacticShift/nullableTypes.kt"); } } @@ -1606,140 +1452,122 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kdoc extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKdoc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/kdoc"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("AtTags.kt") public void testAtTags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/AtTags.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/AtTags.kt"); } @TestMetadata("DocCommentAtBeginningOfFile1.kt") public void testDocCommentAtBeginningOfFile1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile1.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile1.kt"); } @TestMetadata("DocCommentAtBeginningOfFile2.kt") public void testDocCommentAtBeginningOfFile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile2.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile2.kt"); } @TestMetadata("DocCommentAtBeginningOfFile3.kt") public void testDocCommentAtBeginningOfFile3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile3.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile3.kt"); } @TestMetadata("DocCommentAtBeginningOfFile4.kt") public void testDocCommentAtBeginningOfFile4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile4.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/DocCommentAtBeginningOfFile4.kt"); } @TestMetadata("EndOnLeadingAsterisks.kt") public void testEndOnLeadingAsterisks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/EndOnLeadingAsterisks.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/EndOnLeadingAsterisks.kt"); } @TestMetadata("EndRightAfterText.kt") public void testEndRightAfterText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/EndRightAfterText.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/EndRightAfterText.kt"); } @TestMetadata("HttpLink.kt") public void testHttpLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/HttpLink.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/HttpLink.kt"); } @TestMetadata("Incomplete.kt") public void testIncomplete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/Incomplete.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/Incomplete.kt"); } @TestMetadata("Markdown.kt") public void testMarkdown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/Markdown.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/Markdown.kt"); } @TestMetadata("MarkdownLinkWithError.kt") public void testMarkdownLinkWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/MarkdownLinkWithError.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/MarkdownLinkWithError.kt"); } @TestMetadata("MarkdownLinkWithLabel.kt") public void testMarkdownLinkWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/MarkdownLinkWithLabel.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/MarkdownLinkWithLabel.kt"); } @TestMetadata("MarkdownQualifiedName.kt") public void testMarkdownQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/MarkdownQualifiedName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/MarkdownQualifiedName.kt"); } @TestMetadata("ParamTag.kt") public void testParamTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/ParamTag.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/ParamTag.kt"); } @TestMetadata("ParamTagAtStart.kt") public void testParamTagAtStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/ParamTagAtStart.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/ParamTagAtStart.kt"); } @TestMetadata("ReturnWithBrackets.kt") public void testReturnWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/ReturnWithBrackets.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/ReturnWithBrackets.kt"); } @TestMetadata("Sections.kt") public void testSections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/Sections.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/Sections.kt"); } @TestMetadata("SeeEmpty.kt") public void testSeeEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/SeeEmpty.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/SeeEmpty.kt"); } @TestMetadata("SeeLink.kt") public void testSeeLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/SeeLink.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/SeeLink.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/Simple.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/Simple.kt"); } @TestMetadata("TextRightAfterLeadAsterisks.kt") public void testTextRightAfterLeadAsterisks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/TextRightAfterLeadAsterisks.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/TextRightAfterLeadAsterisks.kt"); } @TestMetadata("TwoTags.kt") public void testTwoTags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/kdoc/TwoTags.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/kdoc/TwoTags.kt"); } } @@ -1747,32 +1575,32 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NewLabels extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/newLabels"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/newLabels/basic.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/newLabels/basic.kt"); } @TestMetadata("oldSyntaxExpressions.kt") public void testOldSyntaxExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/newLabels/oldSyntaxExpressions.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/newLabels/oldSyntaxExpressions.kt"); } @TestMetadata("recovery.kt") public void testRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/newLabels/recovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/newLabels/recovery.kt"); } @TestMetadata("spaceBeforeLabelReference.kt") public void testSpaceBeforeLabelReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/newLabels/spaceBeforeLabelReference.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/newLabels/spaceBeforeLabelReference.kt"); } } @@ -1780,74 +1608,67 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Packages extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/packages"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("PackageBlockFirst.kt") public void testPackageBlockFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageBlockFirst.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageBlockFirst.kt"); } @TestMetadata("PackageLeadingDotDoubleID.kt") public void testPackageLeadingDotDoubleID() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageLeadingDotDoubleID.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageLeadingDotDoubleID.kt"); } @TestMetadata("PackageLongNameBetweenDots.kt") public void testPackageLongNameBetweenDots() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageLongNameBetweenDots.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageLongNameBetweenDots.kt"); } @TestMetadata("PackageLongNameDoubleID.kt") public void testPackageLongNameDoubleID() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageLongNameDoubleID.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageLongNameDoubleID.kt"); } @TestMetadata("PackageLongNameLeadingDot.kt") public void testPackageLongNameLeadingDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageLongNameLeadingDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageLongNameLeadingDot.kt"); } @TestMetadata("PackageLongNameLeadingDoubleDot.kt") public void testPackageLongNameLeadingDoubleDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageLongNameLeadingDoubleDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageLongNameLeadingDoubleDot.kt"); } @TestMetadata("PackageModifiers.kt") public void testPackageModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageModifiers.kt"); } @TestMetadata("PackageNameDoubleDot.kt") public void testPackageNameDoubleDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageNameDoubleDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageNameDoubleDot.kt"); } @TestMetadata("PackageNameJustDot.kt") public void testPackageNameJustDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageNameJustDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageNameJustDot.kt"); } @TestMetadata("PackageSimpleNameLeadingDot.kt") public void testPackageSimpleNameLeadingDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageSimpleNameLeadingDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageSimpleNameLeadingDot.kt"); } @TestMetadata("PackageSimpleNameLeadingDoubleDot.kt") public void testPackageSimpleNameLeadingDoubleDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/packages/PackageSimpleNameLeadingDoubleDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/packages/PackageSimpleNameLeadingDoubleDot.kt"); } } @@ -1855,68 +1676,62 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypesRecovery extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypesRecovery() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/platformTypesRecovery"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("Array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/Array.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/Array.kt"); } @TestMetadata("BeforeDot.kt") public void testBeforeDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/BeforeDot.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/BeforeDot.kt"); } @TestMetadata("Collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/Collections.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/Collections.kt"); } @TestMetadata("FunctionsNotPlatform.kt") public void testFunctionsNotPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/FunctionsNotPlatform.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/FunctionsNotPlatform.kt"); } @TestMetadata("MapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/MapEntry.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/MapEntry.kt"); } @TestMetadata("ParenthesizedNotPlatform.kt") public void testParenthesizedNotPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/ParenthesizedNotPlatform.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/ParenthesizedNotPlatform.kt"); } @TestMetadata("Qualified.kt") public void testQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/Qualified.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/Qualified.kt"); } @TestMetadata("QualifiedCollections.kt") public void testQualifiedCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/QualifiedCollections.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/QualifiedCollections.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/Simple.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/Simple.kt"); } @TestMetadata("WrongWordInParentheses.kt") public void testWrongWordInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/platformTypesRecovery/WrongWordInParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/platformTypesRecovery/WrongWordInParentheses.kt"); } } @@ -1924,38 +1739,37 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimaryConstructor extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimaryConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/primaryConstructor"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/primaryConstructor/local.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/primaryConstructor/local.kt"); } @TestMetadata("nestedClassAmbiguity.kt") public void testNestedClassAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/primaryConstructor/nestedClassAmbiguity.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/primaryConstructor/nestedClassAmbiguity.kt"); } @TestMetadata("recovery.kt") public void testRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/primaryConstructor/recovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/primaryConstructor/recovery.kt"); } @TestMetadata("recoveryNestedClassAmbiguity.kt") public void testRecoveryNestedClassAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/primaryConstructor/recoveryNestedClassAmbiguity.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/primaryConstructor/recoveryNestedClassAmbiguity.kt"); } @TestMetadata("valid.kt") public void testValid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/primaryConstructor/valid.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/primaryConstructor/valid.kt"); } } @@ -1963,74 +1777,67 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyDelegate extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/propertyDelegate"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("BracketsInDelegate.kt") public void testBracketsInDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/BracketsInDelegate.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/BracketsInDelegate.kt"); } @TestMetadata("DelegateAndInitializer.kt") public void testDelegateAndInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/DelegateAndInitializer.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/DelegateAndInitializer.kt"); } @TestMetadata("GetterInSameLine.kt") public void testGetterInSameLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/GetterInSameLine.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/GetterInSameLine.kt"); } @TestMetadata("LocalProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/LocalProperty.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/LocalProperty.kt"); } @TestMetadata("OnlyBy.kt") public void testOnlyBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/OnlyBy.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/OnlyBy.kt"); } @TestMetadata("PropertyInClass.kt") public void testPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/PropertyInClass.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/PropertyInClass.kt"); } @TestMetadata("PropertyWithGetter.kt") public void testPropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/PropertyWithGetter.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/PropertyWithGetter.kt"); } @TestMetadata("PropertyWithInitializer.kt") public void testPropertyWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/PropertyWithInitializer.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/PropertyWithInitializer.kt"); } @TestMetadata("PropertyWithoutTypeRef.kt") public void testPropertyWithoutTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/PropertyWithoutTypeRef.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/PropertyWithoutTypeRef.kt"); } @TestMetadata("TopLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/TopLevelProperty.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/TopLevelProperty.kt"); } @TestMetadata("TwoProperties.kt") public void testTwoProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/propertyDelegate/TwoProperties.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/propertyDelegate/TwoProperties.kt"); } } @@ -2038,10 +1845,13 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Recovery extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbsentLeftHandSide.kt") public void testAbsentLeftHandSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/AbsentLeftHandSide.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/AbsentLeftHandSide.kt"); } public void testAllFilesPresentInRecovery() throws Exception { @@ -2050,374 +1860,317 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestMetadata("BareVal.kt") public void testBareVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/BareVal.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/BareVal.kt"); } @TestMetadata("BrokenFunctionSuperType.kt") public void testBrokenFunctionSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/BrokenFunctionSuperType.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/BrokenFunctionSuperType.kt"); } @TestMetadata("CatchKeywordRBrace.kt") public void testCatchKeywordRBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/CatchKeywordRBrace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/CatchKeywordRBrace.kt"); } @TestMetadata("CloseBraceAtTopLevel.kt") public void testCloseBraceAtTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/CloseBraceAtTopLevel.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/CloseBraceAtTopLevel.kt"); } @TestMetadata("DeclarationAfterDotSelectorExpected.kt") public void testDeclarationAfterDotSelectorExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/DeclarationAfterDotSelectorExpected.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/DeclarationAfterDotSelectorExpected.kt"); } @TestMetadata("DeclarationAfterIncompleteElvis.kt") public void testDeclarationAfterIncompleteElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/DeclarationAfterIncompleteElvis.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/DeclarationAfterIncompleteElvis.kt"); } @TestMetadata("DoWhileWithEmptyCondition.kt") public void testDoWhileWithEmptyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/DoWhileWithEmptyCondition.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/DoWhileWithEmptyCondition.kt"); } @TestMetadata("DoWhileWithoutLPar.kt") public void testDoWhileWithoutLPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/DoWhileWithoutLPar.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/DoWhileWithoutLPar.kt"); } @TestMetadata("ForEmptyParentheses.kt") public void testForEmptyParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForEmptyParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForEmptyParentheses.kt"); } @TestMetadata("ForEmptyWithoutBody.kt") public void testForEmptyWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForEmptyWithoutBody.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForEmptyWithoutBody.kt"); } @TestMetadata("ForNoBodyBeforeRBrace.kt") public void testForNoBodyBeforeRBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForNoBodyBeforeRBrace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForNoBodyBeforeRBrace.kt"); } @TestMetadata("ForRecovery.kt") public void testForRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForRecovery.kt"); } @TestMetadata("ForWithOnlyOneLParInEOF.kt") public void testForWithOnlyOneLParInEOF() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForWithOnlyOneLParInEOF.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForWithOnlyOneLParInEOF.kt"); } @TestMetadata("ForWithoutBodyInEOF.kt") public void testForWithoutBodyInEOF() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForWithoutBodyInEOF.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForWithoutBodyInEOF.kt"); } @TestMetadata("ForWithoutLPar.kt") public void testForWithoutLPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForWithoutLPar.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForWithoutLPar.kt"); } @TestMetadata("ForWithoutLParInEOF.kt") public void testForWithoutLParInEOF() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForWithoutLParInEOF.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForWithoutLParInEOF.kt"); } @TestMetadata("ForWithoutParamButWithRange.kt") public void testForWithoutParamButWithRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForWithoutParamButWithRange.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForWithoutParamButWithRange.kt"); } @TestMetadata("ForWithoutRange.kt") public void testForWithoutRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ForWithoutRange.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ForWithoutRange.kt"); } @TestMetadata("FunFun.kt") public void testFunFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/FunFun.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/FunFun.kt"); } @TestMetadata("IfKeywordRBrace.kt") public void testIfKeywordRBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IfKeywordRBrace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IfKeywordRBrace.kt"); } @TestMetadata("IfWithEmptyCondition.kt") public void testIfWithEmptyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IfWithEmptyCondition.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IfWithEmptyCondition.kt"); } @TestMetadata("IfWithoutLPar.kt") public void testIfWithoutLPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IfWithoutLPar.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IfWithoutLPar.kt"); } @TestMetadata("ImportRecovery.kt") public void testImportRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ImportRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ImportRecovery.kt"); } @TestMetadata("IncompleteAccessor1.kt") public void testIncompleteAccessor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteAccessor1.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteAccessor1.kt"); } @TestMetadata("IncompleteAccessor2.kt") public void testIncompleteAccessor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteAccessor2.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteAccessor2.kt"); } @TestMetadata("IncompleteClassDeclaration.kt") public void testIncompleteClassDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteClassDeclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteClassDeclaration.kt"); } @TestMetadata("IncompleteClassTypeParameters.kt") public void testIncompleteClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteClassTypeParameters.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteClassTypeParameters.kt"); } @TestMetadata("IncompleteForRBrace.kt") public void testIncompleteForRBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteForRBrace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteForRBrace.kt"); } @TestMetadata("IncompleteFun.kt") public void testIncompleteFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteFun.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteFun.kt"); } @TestMetadata("IncompleteFunDeclaration.kt") public void testIncompleteFunDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteFunDeclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteFunDeclaration.kt"); } @TestMetadata("IncompleteFunTypeParameters.kt") public void testIncompleteFunTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteFunTypeParameters.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteFunTypeParameters.kt"); } @TestMetadata("IncompleteTypeParameters.kt") public void testIncompleteTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteTypeParameters.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteTypeParameters.kt"); } @TestMetadata("IncompleteTypeRefWithPackageKeyword.kt") public void testIncompleteTypeRefWithPackageKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteTypeRefWithPackageKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteTypeRefWithPackageKeyword.kt"); } @TestMetadata("IncompleteValTypeParameters.kt") public void testIncompleteValTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteValTypeParameters.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteValTypeParameters.kt"); } @TestMetadata("IncompleteWhenElse.kt") public void testIncompleteWhenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteWhenElse.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteWhenElse.kt"); } @TestMetadata("IncompleteWhere.kt") public void testIncompleteWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteWhere.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteWhere.kt"); } @TestMetadata("IncompleteWhere2.kt") public void testIncompleteWhere2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/IncompleteWhere2.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/IncompleteWhere2.kt"); } @TestMetadata("initRecovery.kt") public void testInitRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/initRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/initRecovery.kt"); } @TestMetadata("InterfaceInExpressionPosition.kt") public void testInterfaceInExpressionPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/InterfaceInExpressionPosition.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/InterfaceInExpressionPosition.kt"); } @TestMetadata("InvalidCharAfterPropertyName.kt") public void testInvalidCharAfterPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/InvalidCharAfterPropertyName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/InvalidCharAfterPropertyName.kt"); } @TestMetadata("InvalidCharInSingleLineLambda.kt") public void testInvalidCharInSingleLineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/InvalidCharInSingleLineLambda.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/InvalidCharInSingleLineLambda.kt"); } @TestMetadata("kt2172.kt") public void testKt2172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/kt2172.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/kt2172.kt"); } @TestMetadata("kt5102.kt") public void testKt5102() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/kt5102.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/kt5102.kt"); } @TestMetadata("lambdaExpressionInString_1.kt") public void testLambdaExpressionInString_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/lambdaExpressionInString_1.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/lambdaExpressionInString_1.kt"); } @TestMetadata("lambdaExpressionInString_2.kt") public void testLambdaExpressionInString_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/lambdaExpressionInString_2.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/lambdaExpressionInString_2.kt"); } @TestMetadata("MissingCommaInConstructorValueParameterList.kt") public void testMissingCommaInConstructorValueParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/MissingCommaInConstructorValueParameterList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/MissingCommaInConstructorValueParameterList.kt"); } @TestMetadata("MissingCommaInValueArgumentList.kt") public void testMissingCommaInValueArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/MissingCommaInValueArgumentList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/MissingCommaInValueArgumentList.kt"); } @TestMetadata("MissingCommaInValueParameterList.kt") public void testMissingCommaInValueParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/MissingCommaInValueParameterList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/MissingCommaInValueParameterList.kt"); } @TestMetadata("MissingCommaInValueParameterListWithValOrVar.kt") public void testMissingCommaInValueParameterListWithValOrVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/MissingCommaInValueParameterListWithValOrVar.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/MissingCommaInValueParameterListWithValOrVar.kt"); } @TestMetadata("NoArrowInWhen.kt") public void testNoArrowInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/NoArrowInWhen.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/NoArrowInWhen.kt"); } @TestMetadata("PackageNewLineRecovery.kt") public void testPackageNewLineRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/PackageNewLineRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/PackageNewLineRecovery.kt"); } @TestMetadata("PackageRecovery.kt") public void testPackageRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/PackageRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/PackageRecovery.kt"); } @TestMetadata("SameLineStatementRecovery.kt") public void testSameLineStatementRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/SameLineStatementRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/SameLineStatementRecovery.kt"); } @TestMetadata("ValNoName.kt") public void testValNoName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ValNoName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ValNoName.kt"); } @TestMetadata("ValWithNoNameBeforeNextDeclarationWithModifiers.kt") public void testValWithNoNameBeforeNextDeclarationWithModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ValWithNoNameBeforeNextDeclarationWithModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ValWithNoNameBeforeNextDeclarationWithModifiers.kt"); } @TestMetadata("ValWithNoNameInBlock.kt") public void testValWithNoNameInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ValWithNoNameInBlock.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ValWithNoNameInBlock.kt"); } @TestMetadata("ValueParameterNoTypeRecovery.kt") public void testValueParameterNoTypeRecovery() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/ValueParameterNoTypeRecovery.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/ValueParameterNoTypeRecovery.kt"); } @TestMetadata("WhenWithoutBraces.kt") public void testWhenWithoutBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/WhenWithoutBraces.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/WhenWithoutBraces.kt"); } @TestMetadata("WhileWithEmptyCondition.kt") public void testWhileWithEmptyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/WhileWithEmptyCondition.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/WhileWithEmptyCondition.kt"); } @TestMetadata("WhileWithoutLPar.kt") public void testWhileWithoutLPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/WhileWithoutLPar.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/WhileWithoutLPar.kt"); } @TestMetadata("WithWithoutInAndMultideclaration.kt") public void testWithWithoutInAndMultideclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/WithWithoutInAndMultideclaration.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/WithWithoutInAndMultideclaration.kt"); } @TestMetadata("compiler/testData/psi/recovery/objects") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/recovery/objects"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @@ -2426,56 +2179,52 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/recovery/objects/declarations"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorModifiers.kt") public void testConstructorModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/ConstructorModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/ConstructorModifiers.kt"); } @TestMetadata("EmptyParentheses.kt") public void testEmptyParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/EmptyParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/EmptyParentheses.kt"); } @TestMetadata("Everything.kt") public void testEverything() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/Everything.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/Everything.kt"); } @TestMetadata("FollowedByModifiers.kt") public void testFollowedByModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/FollowedByModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/FollowedByModifiers.kt"); } @TestMetadata("ParametersInParentheses.kt") public void testParametersInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/ParametersInParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/ParametersInParentheses.kt"); } @TestMetadata("TypeParametersAndParentheses.kt") public void testTypeParametersAndParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/TypeParametersAndParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/TypeParametersAndParentheses.kt"); } @TestMetadata("TypeParameterss.kt") public void testTypeParameterss() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/TypeParameterss.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/TypeParameterss.kt"); } @TestMetadata("Where.kt") public void testWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/declarations/Where.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/declarations/Where.kt"); } } @@ -2483,62 +2232,57 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/recovery/objects/expressions"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorModifiers.kt") public void testConstructorModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/ConstructorModifiers.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/ConstructorModifiers.kt"); } @TestMetadata("ConstructorModifiersAndName.kt") public void testConstructorModifiersAndName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/ConstructorModifiersAndName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/ConstructorModifiersAndName.kt"); } @TestMetadata("EmptyParentheses.kt") public void testEmptyParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/EmptyParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/EmptyParentheses.kt"); } @TestMetadata("Everything.kt") public void testEverything() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/Everything.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/Everything.kt"); } @TestMetadata("InFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/InFunction.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/InFunction.kt"); } @TestMetadata("ParametersInParentheses.kt") public void testParametersInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/ParametersInParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/ParametersInParentheses.kt"); } @TestMetadata("TypeParametersAndParentheses.kt") public void testTypeParametersAndParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/TypeParametersAndParentheses.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/TypeParametersAndParentheses.kt"); } @TestMetadata("TypeParameterss.kt") public void testTypeParameterss() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/TypeParameterss.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/TypeParameterss.kt"); } @TestMetadata("Where.kt") public void testWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/objects/expressions/Where.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/objects/expressions/Where.kt"); } } } @@ -2547,44 +2291,42 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class QualifiedExpression extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQualifiedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/recovery/qualifiedExpression"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("noQualifiedExpression.kt") public void testNoQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/qualifiedExpression/noQualifiedExpression.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/qualifiedExpression/noQualifiedExpression.kt"); } @TestMetadata("noSafeQualifiedExpression.kt") public void testNoSafeQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/qualifiedExpression/noSafeQualifiedExpression.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/qualifiedExpression/noSafeQualifiedExpression.kt"); } @TestMetadata("qualifiedExpressionWithSelector.kt") public void testQualifiedExpressionWithSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/qualifiedExpression/qualifiedExpressionWithSelector.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/qualifiedExpression/qualifiedExpressionWithSelector.kt"); } @TestMetadata("qualifiedExpressionWithoutSelector.kt") public void testQualifiedExpressionWithoutSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/qualifiedExpression/qualifiedExpressionWithoutSelector.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/qualifiedExpression/qualifiedExpressionWithoutSelector.kt"); } @TestMetadata("safeQualifiedExpressionWithSelector.kt") public void testSafeQualifiedExpressionWithSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/qualifiedExpression/safeQualifiedExpressionWithSelector.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/qualifiedExpression/safeQualifiedExpressionWithSelector.kt"); } @TestMetadata("safeQualifiedExpressionWithoutSelector.kt") public void testSafeQualifiedExpressionWithoutSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/qualifiedExpression/safeQualifiedExpressionWithoutSelector.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/qualifiedExpression/safeQualifiedExpressionWithoutSelector.kt"); } } @@ -2592,74 +2334,67 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnnamedParameter extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnnamedParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/recovery/unnamedParameter"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("firstInFunction.kt") public void testFirstInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/firstInFunction.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/firstInFunction.kt"); } @TestMetadata("firstInFunctionalType.kt") public void testFirstInFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/firstInFunctionalType.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/firstInFunctionalType.kt"); } @TestMetadata("firstInLambda.kt") public void testFirstInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/firstInLambda.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/firstInLambda.kt"); } @TestMetadata("firstInPrimaryConstructor.kt") public void testFirstInPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/firstInPrimaryConstructor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/firstInPrimaryConstructor.kt"); } @TestMetadata("firstInSecondaryConstructor.kt") public void testFirstInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/firstInSecondaryConstructor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/firstInSecondaryConstructor.kt"); } @TestMetadata("firstInSetter.kt") public void testFirstInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/firstInSetter.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/firstInSetter.kt"); } @TestMetadata("secondInFunction.kt") public void testSecondInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/secondInFunction.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/secondInFunction.kt"); } @TestMetadata("secondInFunctionalType.kt") public void testSecondInFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/secondInFunctionalType.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/secondInFunctionalType.kt"); } @TestMetadata("secondInLambda.kt") public void testSecondInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/secondInLambda.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/secondInLambda.kt"); } @TestMetadata("secondInPrimaryConstructor.kt") public void testSecondInPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/secondInPrimaryConstructor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/secondInPrimaryConstructor.kt"); } @TestMetadata("secondInSecondaryConstructor.kt") public void testSecondInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/recovery/unnamedParameter/secondInSecondaryConstructor.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/recovery/unnamedParameter/secondInSecondaryConstructor.kt"); } } } @@ -2668,74 +2403,67 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/script"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("ComplexScript.kts") public void testComplexScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/ComplexScript.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/ComplexScript.kts"); } @TestMetadata("FunctionComment.kts") public void testFunctionComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/FunctionComment.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/FunctionComment.kts"); } @TestMetadata("Import.kts") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/Import.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/Import.kts"); } @TestMetadata("manyAnnotationsOnFile.kts") public void testManyAnnotationsOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/manyAnnotationsOnFile.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/manyAnnotationsOnFile.kts"); } @TestMetadata("Shebang.kts") public void testShebang() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/Shebang.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/Shebang.kts"); } @TestMetadata("ShebangIncorrect.kts") public void testShebangIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/ShebangIncorrect.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/ShebangIncorrect.kts"); } @TestMetadata("ShebangWithImports.kts") public void testShebangWithImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/ShebangWithImports.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/ShebangWithImports.kts"); } @TestMetadata("ShebangWithPackage.kts") public void testShebangWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/ShebangWithPackage.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/ShebangWithPackage.kts"); } @TestMetadata("SimpleScript.kts") public void testSimpleScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/SimpleScript.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/SimpleScript.kts"); } @TestMetadata("topLevelPropertiesWithGetSet.kts") public void testTopLevelPropertiesWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/topLevelPropertiesWithGetSet.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/topLevelPropertiesWithGetSet.kts"); } @TestMetadata("unexpectedSymbol.kts") public void testUnexpectedSymbol() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/script/unexpectedSymbol.kts"); - doParsingTest(fileName); + runTest("compiler/testData/psi/script/unexpectedSymbol.kts"); } } @@ -2743,74 +2471,67 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/secondaryConstructors"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInitializer.kt") public void testAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/anonymousInitializer.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/anonymousInitializer.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/basic.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/basic.kt"); } @TestMetadata("emptyBody.kt") public void testEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/emptyBody.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/emptyBody.kt"); } @TestMetadata("enumParsing.kt") public void testEnumParsing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/enumParsing.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/enumParsing.kt"); } @TestMetadata("recoveryEmptyDelegationType.kt") public void testRecoveryEmptyDelegationType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryEmptyDelegationType.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryEmptyDelegationType.kt"); } @TestMetadata("recoveryJustConstructorKeyword.kt") public void testRecoveryJustConstructorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryJustConstructorKeyword.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryJustConstructorKeyword.kt"); } @TestMetadata("recoveryJustConstructorKeywordSameLineBrace.kt") public void testRecoveryJustConstructorKeywordSameLineBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryJustConstructorKeywordSameLineBrace.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryJustConstructorKeywordSameLineBrace.kt"); } @TestMetadata("recoveryNoDelegationCallAfterColon.kt") public void testRecoveryNoDelegationCallAfterColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryNoDelegationCallAfterColon.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryNoDelegationCallAfterColon.kt"); } @TestMetadata("recoveryWithoutBodyWrongDelegationName.kt") public void testRecoveryWithoutBodyWrongDelegationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryWithoutBodyWrongDelegationName.kt"); } @TestMetadata("recoveryWithoutParameterList.kt") public void testRecoveryWithoutParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryWithoutParameterList.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryWithoutParameterList.kt"); } @TestMetadata("recoveryWrongDelegationName.kt") public void testRecoveryWrongDelegationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/secondaryConstructors/recoveryWrongDelegationName.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/secondaryConstructors/recoveryWrongDelegationName.kt"); } } @@ -2818,14 +2539,17 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/psi/stringTemplates"), Pattern.compile("^(.*)\\.kts?$"), TargetBackend.ANY, true); } @TestMetadata("RawStringsWithManyQuotes.kt") public void testRawStringsWithManyQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/psi/stringTemplates/RawStringsWithManyQuotes.kt"); - doParsingTest(fileName); + runTest("compiler/testData/psi/stringTemplates/RawStringsWithManyQuotes.kt"); } } } @@ -2834,20 +2558,22 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExpressionCodeFragmentParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/parseCodeFragment/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("error.kt") public void testError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/expression/error.kt"); - doExpressionCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/expression/error.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/expression/simple.kt"); - doExpressionCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/expression/simple.kt"); } } @@ -2855,68 +2581,62 @@ public class ParsingTestGenerated extends AbstractParsingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Block extends AbstractParsingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doBlockCodeFragmentParsingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBlock() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/parseCodeFragment/block"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("expressionOnTopLevel.kt") public void testExpressionOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/expressionOnTopLevel.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/expressionOnTopLevel.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/imports.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/imports.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/localFun.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/localFun.kt"); } @TestMetadata("oneLine.kt") public void testOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/oneLine.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/oneLine.kt"); } @TestMetadata("oneStatement.kt") public void testOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/oneStatement.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/oneStatement.kt"); } @TestMetadata("packageAndImport.kt") public void testPackageAndImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/packageAndImport.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/packageAndImport.kt"); } @TestMetadata("packageDirective.kt") public void testPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/packageDirective.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/packageDirective.kt"); } @TestMetadata("severalExpressions.kt") public void testSeveralExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/severalExpressions.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/severalExpressions.kt"); } @TestMetadata("severalStatements.kt") public void testSeveralStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/severalStatements.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/severalStatements.kt"); } @TestMetadata("unexpectedSymbol.kt") public void testUnexpectedSymbol() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/parseCodeFragment/block/unexpectedSymbol.kt"); - doBlockCodeFragmentParsingTest(fileName); + runTest("compiler/testData/parseCodeFragment/block/unexpectedSymbol.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java index 4783d4a6e67..0dba2aef08f 100644 --- a/compiler/tests/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/renderer/DescriptorRendererTestGenerated.java @@ -21,91 +21,81 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DescriptorRendererTestGenerated extends AbstractDescriptorRendererTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenderer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/renderer"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/Classes.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/Classes.kt"); } @TestMetadata("Enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/Enum.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/Enum.kt"); } @TestMetadata("ErrorType.kt") public void testErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/ErrorType.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/ErrorType.kt"); } @TestMetadata("FunctionTypes.kt") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/FunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/FunctionTypes.kt"); } @TestMetadata("FunctionTypesInSignature.kt") public void testFunctionTypesInSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/FunctionTypesInSignature.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/FunctionTypesInSignature.kt"); } @TestMetadata("GlobalFunctions.kt") public void testGlobalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/GlobalFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/GlobalFunctions.kt"); } @TestMetadata("GlobalProperties.kt") public void testGlobalProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/GlobalProperties.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/GlobalProperties.kt"); } @TestMetadata("InheritedMembersVisibility.kt") public void testInheritedMembersVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/InheritedMembersVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/InheritedMembersVisibility.kt"); } @TestMetadata("KeywordsInNames.kt") public void testKeywordsInNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/KeywordsInNames.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/KeywordsInNames.kt"); } @TestMetadata("ObjectWithConstructor.kt") public void testObjectWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/ObjectWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/ObjectWithConstructor.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/StarProjection.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/StarProjection.kt"); } @TestMetadata("TraitWithConstructor.kt") public void testTraitWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/TraitWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/TraitWithConstructor.kt"); } @TestMetadata("TypeAnnotations.kt") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/TypeAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/TypeAnnotations.kt"); } @TestMetadata("UnitType.kt") public void testUnitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderer/UnitType.kt"); - doTest(fileName); + runTest("compiler/testData/renderer/UnitType.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java index 793088430cb..7d18420dd02 100644 --- a/compiler/tests/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/renderer/FunctionDescriptorInExpressionRendererTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class FunctionDescriptorInExpressionRendererTestGenerated extends AbstractFunctionDescriptorInExpressionRendererTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenderFunctionDescriptorInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/renderFunctionDescriptorInExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basicFunExpr.kt") public void testBasicFunExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt"); - doTest(fileName); + runTest("compiler/testData/renderFunctionDescriptorInExpression/basicFunExpr.kt"); } @TestMetadata("basicFunExprArgs.kt") public void testBasicFunExprArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt"); - doTest(fileName); + runTest("compiler/testData/renderFunctionDescriptorInExpression/basicFunExprArgs.kt"); } @TestMetadata("basicLambda.kt") public void testBasicLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt"); - doTest(fileName); + runTest("compiler/testData/renderFunctionDescriptorInExpression/basicLambda.kt"); } @TestMetadata("labeledLambda.kt") public void testLabeledLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt"); - doTest(fileName); + runTest("compiler/testData/renderFunctionDescriptorInExpression/labeledLambda.kt"); } @TestMetadata("parenthesizedFunExpr.kt") public void testParenthesizedFunExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt"); - doTest(fileName); + runTest("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedFunExpr.kt"); } @TestMetadata("parenthesizedLambda.kt") public void testParenthesizedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/renderFunctionDescriptorInExpression/parenthesizedLambda.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/repl/ReplInterpreterTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/repl/ReplInterpreterTestGenerated.java index 8d53a23b1ff..ebdcb12cfa1 100644 --- a/compiler/tests/org/jetbrains/kotlin/repl/ReplInterpreterTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/repl/ReplInterpreterTestGenerated.java @@ -21,190 +21,169 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRepl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("analyzeErrors.repl") public void testAnalyzeErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/analyzeErrors.repl"); - doTest(fileName); + runTest("compiler/testData/repl/analyzeErrors.repl"); } @TestMetadata("constants.repl") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/constants.repl"); - doTest(fileName); + runTest("compiler/testData/repl/constants.repl"); } @TestMetadata("destructuringDeclaration.repl") public void testDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/destructuringDeclaration.repl"); - doTest(fileName); + runTest("compiler/testData/repl/destructuringDeclaration.repl"); } @TestMetadata("empty.repl") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/empty.repl"); - doTest(fileName); + runTest("compiler/testData/repl/empty.repl"); } @TestMetadata("evaluationErrors.repl") public void testEvaluationErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/evaluationErrors.repl"); - doTest(fileName); + runTest("compiler/testData/repl/evaluationErrors.repl"); } @TestMetadata("exceptionInValueToString.repl") public void testExceptionInValueToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/exceptionInValueToString.repl"); - doTest(fileName); + runTest("compiler/testData/repl/exceptionInValueToString.repl"); } @TestMetadata("exceptionInVariableInitializer.repl") public void testExceptionInVariableInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/exceptionInVariableInitializer.repl"); - doTest(fileName); + runTest("compiler/testData/repl/exceptionInVariableInitializer.repl"); } @TestMetadata("function.repl") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/function.repl"); - doTest(fileName); + runTest("compiler/testData/repl/function.repl"); } @TestMetadata("functionOverloadResolution.repl") public void testFunctionOverloadResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/functionOverloadResolution.repl"); - doTest(fileName); + runTest("compiler/testData/repl/functionOverloadResolution.repl"); } @TestMetadata("functionOverloadResolutionAnyBeatsString.repl") public void testFunctionOverloadResolutionAnyBeatsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/functionOverloadResolutionAnyBeatsString.repl"); - doTest(fileName); + runTest("compiler/testData/repl/functionOverloadResolutionAnyBeatsString.repl"); } @TestMetadata("functionReferencesPrev.repl") public void testFunctionReferencesPrev() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/functionReferencesPrev.repl"); - doTest(fileName); + runTest("compiler/testData/repl/functionReferencesPrev.repl"); } @TestMetadata("imports.repl") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/imports.repl"); - doTest(fileName); + runTest("compiler/testData/repl/imports.repl"); } @TestMetadata("multipleImports.repl") public void testMultipleImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multipleImports.repl"); - doTest(fileName); + runTest("compiler/testData/repl/multipleImports.repl"); } @TestMetadata("noWarningsWithErrors.repl") public void testNoWarningsWithErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/noWarningsWithErrors.repl"); - doTest(fileName); + runTest("compiler/testData/repl/noWarningsWithErrors.repl"); } @TestMetadata("simple.repl") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/simple.repl"); - doTest(fileName); + runTest("compiler/testData/repl/simple.repl"); } @TestMetadata("simpleTwoVals.repl") public void testSimpleTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/simpleTwoVals.repl"); - doTest(fileName); + runTest("compiler/testData/repl/simpleTwoVals.repl"); } @TestMetadata("syntaxErrors.repl") public void testSyntaxErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/syntaxErrors.repl"); - doTest(fileName); + runTest("compiler/testData/repl/syntaxErrors.repl"); } @TestMetadata("topLevelLocalDelegatedProperty.repl") public void testTopLevelLocalDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/topLevelLocalDelegatedProperty.repl"); - doTest(fileName); + runTest("compiler/testData/repl/topLevelLocalDelegatedProperty.repl"); } @TestMetadata("twoClosures.repl") public void testTwoClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/twoClosures.repl"); - doTest(fileName); + runTest("compiler/testData/repl/twoClosures.repl"); } @TestMetadata("compiler/testData/repl/classes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/classes"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("classInheritance.repl") public void testClassInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/classInheritance.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/classInheritance.repl"); } @TestMetadata("classRedeclaration.repl") public void testClassRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/classRedeclaration.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/classRedeclaration.repl"); } @TestMetadata("classReferencesVal.repl") public void testClassReferencesVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/classReferencesVal.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/classReferencesVal.repl"); } @TestMetadata("emptyClass.repl") public void testEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/emptyClass.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/emptyClass.repl"); } @TestMetadata("emptyClassRedeclaration.repl") public void testEmptyClassRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/emptyClassRedeclaration.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/emptyClassRedeclaration.repl"); } @TestMetadata("enumEntrySubclass.repl") public void testEnumEntrySubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/enumEntrySubclass.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/enumEntrySubclass.repl"); } @TestMetadata("import.repl") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/import.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/import.repl"); } @TestMetadata("simpleClass.repl") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleClass.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/simpleClass.repl"); } @TestMetadata("simpleEnum.repl") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleEnum.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/simpleEnum.repl"); } @TestMetadata("simpleTrait.repl") public void testSimpleTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/classes/simpleTrait.repl"); - doTest(fileName); + runTest("compiler/testData/repl/classes/simpleTrait.repl"); } } @@ -212,50 +191,47 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/controlFlow"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("functionWithoutReturn.repl") public void testFunctionWithoutReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/functionWithoutReturn.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/functionWithoutReturn.repl"); } @TestMetadata("incompleteIf.repl") public void testIncompleteIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/incompleteIf.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/incompleteIf.repl"); } @TestMetadata("incompleteWhen.repl") public void testIncompleteWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/incompleteWhen.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/incompleteWhen.repl"); } @TestMetadata("kt15407.repl") public void testKt15407() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/kt15407.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/kt15407.repl"); } @TestMetadata("loopWithWrongLabel.repl") public void testLoopWithWrongLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/loopWithWrongLabel.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/loopWithWrongLabel.repl"); } @TestMetadata("mutateVal.repl") public void testMutateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/mutateVal.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/mutateVal.repl"); } @TestMetadata("useUninitializedVal.repl") public void testUseUninitializedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/controlFlow/useUninitializedVal.repl"); - doTest(fileName); + runTest("compiler/testData/repl/controlFlow/useUninitializedVal.repl"); } } @@ -263,14 +239,17 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modules extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModules() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/modules"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("kt10001.repl") public void testKt10001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/modules/kt10001.repl"); - doTest(fileName); + runTest("compiler/testData/repl/modules/kt10001.repl"); } } @@ -278,38 +257,37 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiline extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/multiline"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("blankLinesAndComments.repl") public void testBlankLinesAndComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/blankLinesAndComments.repl"); - doTest(fileName); + runTest("compiler/testData/repl/multiline/blankLinesAndComments.repl"); } @TestMetadata("functionOnSeveralLines.repl") public void testFunctionOnSeveralLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/functionOnSeveralLines.repl"); - doTest(fileName); + runTest("compiler/testData/repl/multiline/functionOnSeveralLines.repl"); } @TestMetadata("multilineFunctionInvocation.repl") public void testMultilineFunctionInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/multilineFunctionInvocation.repl"); - doTest(fileName); + runTest("compiler/testData/repl/multiline/multilineFunctionInvocation.repl"); } @TestMetadata("openParenthesisIncomplete.repl") public void testOpenParenthesisIncomplete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/openParenthesisIncomplete.repl"); - doTest(fileName); + runTest("compiler/testData/repl/multiline/openParenthesisIncomplete.repl"); } @TestMetadata("simpleFunctionBodyOnNextLine.repl") public void testSimpleFunctionBodyOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/multiline/simpleFunctionBodyOnNextLine.repl"); - doTest(fileName); + runTest("compiler/testData/repl/multiline/simpleFunctionBodyOnNextLine.repl"); } } @@ -317,26 +295,27 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/objects"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("emptyObject.repl") public void testEmptyObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/objects/emptyObject.repl"); - doTest(fileName); + runTest("compiler/testData/repl/objects/emptyObject.repl"); } @TestMetadata("localObject.repl") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/objects/localObject.repl"); - doTest(fileName); + runTest("compiler/testData/repl/objects/localObject.repl"); } @TestMetadata("simpleObjectDeclaration.repl") public void testSimpleObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/objects/simpleObjectDeclaration.repl"); - doTest(fileName); + runTest("compiler/testData/repl/objects/simpleObjectDeclaration.repl"); } } @@ -344,20 +323,22 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveTypes extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/primitiveTypes"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("arrayOfBoxed.repl") public void testArrayOfBoxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/primitiveTypes/arrayOfBoxed.repl"); - doTest(fileName); + runTest("compiler/testData/repl/primitiveTypes/arrayOfBoxed.repl"); } @TestMetadata("boxingOnPurpose.repl") public void testBoxingOnPurpose() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/primitiveTypes/boxingOnPurpose.repl"); - doTest(fileName); + runTest("compiler/testData/repl/primitiveTypes/boxingOnPurpose.repl"); } } @@ -365,14 +346,17 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/regressions"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("kt6843.repl") public void testKt6843() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/regressions/kt6843.repl"); - doTest(fileName); + runTest("compiler/testData/repl/regressions/kt6843.repl"); } } @@ -380,14 +364,17 @@ public class ReplInterpreterTestGenerated extends AbstractReplInterpreterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UseJava extends AbstractReplInterpreterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUseJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/repl/useJava"), Pattern.compile("^(.+)\\.repl$"), TargetBackend.ANY, true); } @TestMetadata("syntheticProperty.repl") public void testSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/repl/useJava/syntheticProperty.repl"); - doTest(fileName); + runTest("compiler/testData/repl/useJava/syntheticProperty.repl"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/ResolveTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/ResolveTestGenerated.java index 80f26489c7a..b29b914f8cd 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/ResolveTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/ResolveTestGenerated.java @@ -21,286 +21,249 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ResolveTestGenerated extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("Basic.resolve") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Basic.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/Basic.resolve"); } @TestMetadata("ClassObjects.resolve") public void testClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ClassObjects.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ClassObjects.resolve"); } @TestMetadata("Classifiers.resolve") public void testClassifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Classifiers.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/Classifiers.resolve"); } @TestMetadata("DefaultParamsOfLocalFunctions.resolve") public void testDefaultParamsOfLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/DefaultParamsOfLocalFunctions.resolve"); } @TestMetadata("ErrorSupertype.resolve") public void testErrorSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ErrorSupertype.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ErrorSupertype.resolve"); } @TestMetadata("ExtensionFunctions.resolve") public void testExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ExtensionFunctions.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ExtensionFunctions.resolve"); } @TestMetadata("FunctionVariable.resolve") public void testFunctionVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/FunctionVariable.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/FunctionVariable.resolve"); } @TestMetadata("ImportFromRootScope.resolve") public void testImportFromRootScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ImportFromRootScope.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ImportFromRootScope.resolve"); } @TestMetadata("ImportingRootScopeWhenProcessingImports.resolve") public void testImportingRootScopeWhenProcessingImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ImportingRootScopeWhenProcessingImports.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ImportingRootScopeWhenProcessingImports.resolve"); } @TestMetadata("kt304.resolve") public void testKt304() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/kt304.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/kt304.resolve"); } @TestMetadata("LocalObjects.resolve") public void testLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/LocalObjects.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/LocalObjects.resolve"); } @TestMetadata("NestedObjects.resolve") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/NestedObjects.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/NestedObjects.resolve"); } @TestMetadata("NoReferenceForErrorAnnotation.resolve") public void testNoReferenceForErrorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/NoReferenceForErrorAnnotation.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/NoReferenceForErrorAnnotation.resolve"); } @TestMetadata("Objects.resolve") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Objects.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/Objects.resolve"); } @TestMetadata("Packages.resolve") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Packages.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/Packages.resolve"); } @TestMetadata("PrimaryConstructorParameters.resolve") public void testPrimaryConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/PrimaryConstructorParameters.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/PrimaryConstructorParameters.resolve"); } @TestMetadata("PrimaryConstructors.resolve") public void testPrimaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/PrimaryConstructors.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/PrimaryConstructors.resolve"); } @TestMetadata("Projections.resolve") public void testProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Projections.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/Projections.resolve"); } @TestMetadata("PropertyAndFunctionNameClash.resolve") public void testPropertyAndFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/PropertyAndFunctionNameClash.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/PropertyAndFunctionNameClash.resolve"); } @TestMetadata("ResolveOfInfixExpressions.resolve") public void testResolveOfInfixExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveOfInfixExpressions.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ResolveOfInfixExpressions.resolve"); } @TestMetadata("ResolveToJava.resolve") public void testResolveToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ResolveToJava.resolve"); } @TestMetadata("ResolveToJava2.resolve") public void testResolveToJava2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava2.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ResolveToJava2.resolve"); } @TestMetadata("ResolveToJava3.resolve") public void testResolveToJava3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJava3.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ResolveToJava3.resolve"); } @TestMetadata("ResolveToJavaTypeTransform.resolve") public void testResolveToJavaTypeTransform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ResolveToJavaTypeTransform.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ResolveToJavaTypeTransform.resolve"); } @TestMetadata("ScopeInteraction.resolve") public void testScopeInteraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/ScopeInteraction.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/ScopeInteraction.resolve"); } @TestMetadata("StringTemplates.resolve") public void testStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/StringTemplates.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/StringTemplates.resolve"); } @TestMetadata("Super.resolve") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/Super.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/Super.resolve"); } @TestMetadata("TryCatch.resolve") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/TryCatch.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/TryCatch.resolve"); } @TestMetadata("compiler/testData/resolve/candidatesPriority") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CandidatesPriority extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCandidatesPriority() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/candidatesPriority"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("classObjectOuterResolve.resolve") public void testClassObjectOuterResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/classObjectOuterResolve.resolve"); } @TestMetadata("closerReceiver1.resolve") public void testCloserReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver1.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/closerReceiver1.resolve"); } @TestMetadata("closerReceiver2.resolve") public void testCloserReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver2.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/closerReceiver2.resolve"); } @TestMetadata("closerReceiver3.resolve") public void testCloserReceiver3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerReceiver3.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/closerReceiver3.resolve"); } @TestMetadata("closerScope.resolve") public void testCloserScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/closerScope.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/closerScope.resolve"); } @TestMetadata("dispatchReceiverVsExtensionReceiver.resolve") public void testDispatchReceiverVsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver.resolve"); } @TestMetadata("dispatchReceiverVsExtensionReceiver2.resolve") public void testDispatchReceiverVsExtensionReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver2.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/dispatchReceiverVsExtensionReceiver2.resolve"); } @TestMetadata("extensionToCloserReceiverVsMember.resolve") public void testExtensionToCloserReceiverVsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/extensionToCloserReceiverVsMember.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/extensionToCloserReceiverVsMember.resolve"); } @TestMetadata("implicitThisVsNoReceiver.resolve") public void testImplicitThisVsNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver.resolve"); } @TestMetadata("implicitThisVsNoReceiver2.resolve") public void testImplicitThisVsNoReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver2.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/implicitThisVsNoReceiver2.resolve"); } @TestMetadata("localVsImplicitThis.resolve") public void testLocalVsImplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/localVsImplicitThis.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/localVsImplicitThis.resolve"); } @TestMetadata("memberVsExtension1.resolve") public void testMemberVsExtension1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension1.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/memberVsExtension1.resolve"); } @TestMetadata("memberVsExtension2.resolve") public void testMemberVsExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension2.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/memberVsExtension2.resolve"); } @TestMetadata("memberVsExtension3.resolve") public void testMemberVsExtension3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsExtension3.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/memberVsExtension3.resolve"); } @TestMetadata("memberVsLocalExtension.resolve") public void testMemberVsLocalExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberVsLocalExtension.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/memberVsLocalExtension.resolve"); } @TestMetadata("memberWithInvokeVsNonLocal.resolve") public void testMemberWithInvokeVsNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/memberWithInvokeVsNonLocal.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/memberWithInvokeVsNonLocal.resolve"); } @TestMetadata("wrongReceiverVsOtherError.resolve") public void testWrongReceiverVsOtherError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/candidatesPriority/wrongReceiverVsOtherError.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/candidatesPriority/wrongReceiverVsOtherError.resolve"); } } @@ -308,50 +271,47 @@ public class ResolveTestGenerated extends AbstractResolveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/delegatedProperty"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("delegationByCall.resolve") public void testDelegationByCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByCall.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/delegationByCall.resolve"); } @TestMetadata("delegationByConstructor.resolve") public void testDelegationByConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByConstructor.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/delegationByConstructor.resolve"); } @TestMetadata("delegationByFun.resolve") public void testDelegationByFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByFun.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/delegationByFun.resolve"); } @TestMetadata("delegationByObject.resolve") public void testDelegationByObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByObject.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/delegationByObject.resolve"); } @TestMetadata("delegationByProperty.resolve") public void testDelegationByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationByProperty.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/delegationByProperty.resolve"); } @TestMetadata("delegationInClass.resolve") public void testDelegationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/delegationInClass.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/delegationInClass.resolve"); } @TestMetadata("localDelegation.resolve") public void testLocalDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/delegatedProperty/localDelegation.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/delegatedProperty/localDelegation.resolve"); } } @@ -359,80 +319,72 @@ public class ResolveTestGenerated extends AbstractResolveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/imports"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("ImportConflictAllPackage.resolve") public void testImportConflictAllPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictAllPackage.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictAllPackage.resolve"); } @TestMetadata("ImportConflictBetweenImportedAndRootPackage.resolve") public void testImportConflictBetweenImportedAndRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndRootPackage.resolve"); } @TestMetadata("ImportConflictBetweenImportedAndSamePackage.resolve") public void testImportConflictBetweenImportedAndSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictBetweenImportedAndSamePackage.resolve"); } @TestMetadata("ImportConflictForFunctions.resolve") public void testImportConflictForFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictForFunctions.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictForFunctions.resolve"); } @TestMetadata("ImportConflictPackageAndClass.resolve") public void testImportConflictPackageAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictPackageAndClass.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictPackageAndClass.resolve"); } @TestMetadata("ImportConflictSameNameClass.resolve") public void testImportConflictSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictSameNameClass.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictSameNameClass.resolve"); } @TestMetadata("ImportConflictWithClassObject.resolve") public void testImportConflictWithClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictWithClassObject.resolve"); } @TestMetadata("ImportConflictWithInFileClass.resolve") public void testImportConflictWithInFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithInFileClass.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictWithInFileClass.resolve"); } @TestMetadata("ImportConflictWithInnerClass.resolve") public void testImportConflictWithInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictWithInnerClass.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictWithInnerClass.resolve"); } @TestMetadata("ImportConflictsWithMappedToJava.resolve") public void testImportConflictsWithMappedToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportConflictsWithMappedToJava.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportConflictsWithMappedToJava.resolve"); } @TestMetadata("ImportNonBlockingAnalysis.resolve") public void testImportNonBlockingAnalysis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportNonBlockingAnalysis.resolve"); } @TestMetadata("ImportResolveOrderStable.resolve") public void testImportResolveOrderStable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/imports/ImportResolveOrderStable.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/imports/ImportResolveOrderStable.resolve"); } } @@ -440,20 +392,22 @@ public class ResolveTestGenerated extends AbstractResolveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/labels"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("labelForPropertyInGetter.resolve") public void testLabelForPropertyInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/labels/labelForPropertyInGetter.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/labels/labelForPropertyInGetter.resolve"); } @TestMetadata("labelForPropertyInSetter.resolve") public void testLabelForPropertyInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/labels/labelForPropertyInSetter.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/labels/labelForPropertyInSetter.resolve"); } } @@ -461,20 +415,22 @@ public class ResolveTestGenerated extends AbstractResolveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/regressions"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("kt300.resolve") public void testKt300() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/regressions/kt300.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/regressions/kt300.resolve"); } @TestMetadata("objectInsideFun.resolve") public void testObjectInsideFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/regressions/objectInsideFun.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/regressions/objectInsideFun.resolve"); } } @@ -482,26 +438,27 @@ public class ResolveTestGenerated extends AbstractResolveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Varargs extends AbstractResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolve/varargs"), Pattern.compile("^(.+)\\.resolve$"), TargetBackend.ANY, true); } @TestMetadata("MoreSpecificVarargsOfEqualLength.resolve") public void testMoreSpecificVarargsOfEqualLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/varargs/MoreSpecificVarargsOfEqualLength.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/varargs/MoreSpecificVarargsOfEqualLength.resolve"); } @TestMetadata("NilaryVsVararg.resolve") public void testNilaryVsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/varargs/NilaryVsVararg.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/varargs/NilaryVsVararg.resolve"); } @TestMetadata("UnaryVsVararg.resolve") public void testUnaryVsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolve/varargs/UnaryVsVararg.resolve"); - doTest(fileName); + runTest("compiler/testData/resolve/varargs/UnaryVsVararg.resolve"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationParameterTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationParameterTestGenerated.java index ae9718ae99b..2439268b339 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationParameterTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/annotation/AnnotationParameterTestGenerated.java @@ -21,262 +21,229 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AnnotationParameterTestGenerated extends AbstractAnnotationParameterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveAnnotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/byte.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/char.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/char.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/double.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/float.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/float.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/int.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/long.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/long.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/short.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/short.kt"); } @TestMetadata("compiler/testData/resolveAnnotations/parameters/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractAnnotationParameterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveAnnotations/parameters/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("andAnd.kt") public void testAndAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/andAnd.kt"); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/boolean.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/char.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/char.kt"); } @TestMetadata("compositeCallBinary.kt") public void testCompositeCallBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/compositeCallBinary.kt"); } @TestMetadata("divide.kt") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/divide.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/divide.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/double.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/double.kt"); } @TestMetadata("eqeq.kt") public void testEqeq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/eqeq.kt"); } @TestMetadata("escapedString.kt") public void testEscapedString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/escapedString.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/float.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/float.kt"); } @TestMetadata("gt.kt") public void testGt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/gt.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/gt.kt"); } @TestMetadata("gteq.kt") public void testGteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/gteq.kt"); } @TestMetadata("intrincics.kt") public void testIntrincics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/intrincics.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/labeled.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/long.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/long.kt"); } @TestMetadata("lt.kt") public void testLt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/lt.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/lt.kt"); } @TestMetadata("lteq.kt") public void testLteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/lteq.kt"); } @TestMetadata("maxValue.kt") public void testMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/maxValue.kt"); } @TestMetadata("maxValueByte.kt") public void testMaxValueByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/maxValueByte.kt"); } @TestMetadata("maxValueInt.kt") public void testMaxValueInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/maxValueInt.kt"); } @TestMetadata("miltiply.kt") public void testMiltiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/miltiply.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/minus.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/mod.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/mod.kt"); } @TestMetadata("multilineString.kt") public void testMultilineString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/multilineString.kt"); } @TestMetadata("not.kt") public void testNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/not.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/not.kt"); } @TestMetadata("noteq.kt") public void testNoteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/noteq.kt"); } @TestMetadata("orOr.kt") public void testOrOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/orOr.kt"); } @TestMetadata("paranthesized.kt") public void testParanthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/paranthesized.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/plus.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/plus.kt"); } @TestMetadata("simpleCallBinary.kt") public void testSimpleCallBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/simpleCallBinary.kt"); } @TestMetadata("stringPlusInt.kt") public void testStringPlusInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/stringPlusInt.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/stringTemplate.kt"); } @TestMetadata("strings.kt") public void testStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/strings.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/strings.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/resolveAnnotations/parameters/expressions/unaryPlus.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedCallsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedCallsTestGenerated.java index bf8c7793292..1485804161f 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedCallsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedCallsTestGenerated.java @@ -21,62 +21,62 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolvedCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "enhancedSignatures"); } @TestMetadata("explicitReceiverIsDispatchReceiver.kt") public void testExplicitReceiverIsDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/explicitReceiverIsDispatchReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/explicitReceiverIsDispatchReceiver.kt"); } @TestMetadata("explicitReceiverIsExtensionReceiver.kt") public void testExplicitReceiverIsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/explicitReceiverIsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/explicitReceiverIsExtensionReceiver.kt"); } @TestMetadata("hasBothDispatchAndExtensionReceivers.kt") public void testHasBothDispatchAndExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceivers.kt"); } @TestMetadata("hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt") public void testHasBothDispatchAndExtensionReceiversWithoutExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt"); } @TestMetadata("implicitReceiverIsDispatchReceiver.kt") public void testImplicitReceiverIsDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/implicitReceiverIsDispatchReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/implicitReceiverIsDispatchReceiver.kt"); } @TestMetadata("implicitReceiverIsExtensionReceiver.kt") public void testImplicitReceiverIsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/implicitReceiverIsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/implicitReceiverIsExtensionReceiver.kt"); } @TestMetadata("impliedThisNoExplicitReceiver.kt") public void testImpliedThisNoExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/impliedThisNoExplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/impliedThisNoExplicitReceiver.kt"); } @TestMetadata("simpleCall.kt") public void testSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/simpleCall.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/simpleCall.kt"); } @TestMetadata("compiler/testData/resolvedCalls/arguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arguments extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -85,44 +85,42 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/functionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("chainedLambdas.kt") public void testChainedLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/chainedLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/functionLiterals/chainedLambdas.kt"); } @TestMetadata("notInferredLambdaReturnType.kt") public void testNotInferredLambdaReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaReturnType.kt"); } @TestMetadata("notInferredLambdaType.kt") public void testNotInferredLambdaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/functionLiterals/notInferredLambdaType.kt"); } @TestMetadata("simpleGenericLambda.kt") public void testSimpleGenericLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleGenericLambda.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleGenericLambda.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleLambda.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/functionLiterals/simpleLambda.kt"); } @TestMetadata("unmappedLambda.kt") public void testUnmappedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/functionLiterals/unmappedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/functionLiterals/unmappedLambda.kt"); } } @@ -130,32 +128,32 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericCalls extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/genericCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inferredParameter.kt") public void testInferredParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/inferredParameter.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/genericCalls/inferredParameter.kt"); } @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/simpleGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/genericCalls/simpleGeneric.kt"); } @TestMetadata("uninferredParameter.kt") public void testUninferredParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameter.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameter.kt"); } @TestMetadata("uninferredParameterTypeMismatch.kt") public void testUninferredParameterTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameterTypeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/genericCalls/uninferredParameterTypeMismatch.kt"); } } @@ -163,20 +161,22 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NamedArguments extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNamedArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/namedArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("positionedAfterNamed.kt") public void testPositionedAfterNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/namedArguments/positionedAfterNamed.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/namedArguments/positionedAfterNamed.kt"); } @TestMetadata("shiftedArgsMatch.kt") public void testShiftedArgsMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/namedArguments/shiftedArgsMatch.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/namedArguments/shiftedArgsMatch.kt"); } } @@ -184,32 +184,32 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OneArgument extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOneArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/oneArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentHasNoType.kt") public void testArgumentHasNoType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/argumentHasNoType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/oneArgument/argumentHasNoType.kt"); } @TestMetadata("simpleMatch.kt") public void testSimpleMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/simpleMatch.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/oneArgument/simpleMatch.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/typeMismatch.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/oneArgument/typeMismatch.kt"); } @TestMetadata("unmappedArgument.kt") public void testUnmappedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/oneArgument/unmappedArgument.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/oneArgument/unmappedArgument.kt"); } } @@ -217,20 +217,22 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RealExamples extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRealExamples() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/realExamples"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/realExamples/emptyList.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/realExamples/emptyList.kt"); } @TestMetadata("emptyMutableList.kt") public void testEmptyMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/realExamples/emptyMutableList.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/realExamples/emptyMutableList.kt"); } } @@ -238,14 +240,17 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SeveralCandidates extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSeveralCandidates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/arguments/severalCandidates"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mostSpecific.kt") public void testMostSpecific() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/arguments/severalCandidates/mostSpecific.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/arguments/severalCandidates/mostSpecific.kt"); } } } @@ -254,26 +259,27 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DifferentCallElements extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDifferentCallElements() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/differentCallElements"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationCall.kt") public void testAnnotationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/differentCallElements/annotationCall.kt"); } @TestMetadata("delegatorToSuperCall.kt") public void testDelegatorToSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/delegatorToSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/differentCallElements/delegatorToSuperCall.kt"); } @TestMetadata("simpleArrayAccess.kt") public void testSimpleArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/differentCallElements/simpleArrayAccess.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/differentCallElements/simpleArrayAccess.kt"); } } @@ -281,44 +287,42 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Dynamic extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDynamic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/dynamic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("explicitReceiverIsDispatchReceiver.kt") public void testExplicitReceiverIsDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsDispatchReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsDispatchReceiver.kt"); } @TestMetadata("explicitReceiverIsExtensionReceiver.kt") public void testExplicitReceiverIsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/dynamic/explicitReceiverIsExtensionReceiver.kt"); } @TestMetadata("hasBothDispatchAndExtensionReceivers.kt") public void testHasBothDispatchAndExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceivers.kt"); } @TestMetadata("hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt") public void testHasBothDispatchAndExtensionReceiversWithoutExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/dynamic/hasBothDispatchAndExtensionReceiversWithoutExplicitReceiver.kt"); } @TestMetadata("implicitReceiverIsDispatchReceiver.kt") public void testImplicitReceiverIsDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsDispatchReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsDispatchReceiver.kt"); } @TestMetadata("implicitReceiverIsExtensionReceiver.kt") public void testImplicitReceiverIsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/dynamic/implicitReceiverIsExtensionReceiver.kt"); } } @@ -326,44 +330,42 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionTypes extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/functionTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeForExtensionFunctionType.kt") public void testInvokeForExtensionFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/invokeForExtensionFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/functionTypes/invokeForExtensionFunctionType.kt"); } @TestMetadata("invokeForFunctionType.kt") public void testInvokeForFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/invokeForFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/functionTypes/invokeForFunctionType.kt"); } @TestMetadata("valOfExtensionFunctionType.kt") public void testValOfExtensionFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionType.kt"); } @TestMetadata("valOfExtensionFunctionTypeInvoke.kt") public void testValOfExtensionFunctionTypeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/functionTypes/valOfExtensionFunctionTypeInvoke.kt"); } @TestMetadata("valOfFunctionType.kt") public void testValOfFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/functionTypes/valOfFunctionType.kt"); } @TestMetadata("valOfFunctionTypeInvoke.kt") public void testValOfFunctionTypeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/functionTypes/valOfFunctionTypeInvoke.kt"); } } @@ -371,68 +373,62 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bothReceivers.kt") public void testBothReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/bothReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/bothReceivers.kt"); } @TestMetadata("dispatchReceiverAsReceiverForInvoke.kt") public void testDispatchReceiverAsReceiverForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/dispatchReceiverAsReceiverForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/dispatchReceiverAsReceiverForInvoke.kt"); } @TestMetadata("extensionReceiverAsReceiverForInvoke.kt") public void testExtensionReceiverAsReceiverForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/extensionReceiverAsReceiverForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/extensionReceiverAsReceiverForInvoke.kt"); } @TestMetadata("implicitReceiverForInvoke.kt") public void testImplicitReceiverForInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/implicitReceiverForInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/implicitReceiverForInvoke.kt"); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnEnumEntry1.kt") public void testInvokeOnEnumEntry1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry1.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry1.kt"); } @TestMetadata("invokeOnEnumEntry2.kt") public void testInvokeOnEnumEntry2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry2.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/invokeOnEnumEntry2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/invoke/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/invoke/invokeOnObject2.kt"); } } @@ -440,26 +436,27 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectsAndClassObjects extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjectsAndClassObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/objectsAndClassObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/objectsAndClassObjects/classObject.kt"); } @TestMetadata("kt5308IntRangeConstant.kt") public void testKt5308IntRangeConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/kt5308IntRangeConstant.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/objectsAndClassObjects/kt5308IntRangeConstant.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/objectsAndClassObjects/object.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/objectsAndClassObjects/object.kt"); } } @@ -467,14 +464,17 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RealExamples extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRealExamples() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/realExamples"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("stringPlusInBuilders.kt") public void testStringPlusInBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/realExamples/stringPlusInBuilders.kt"); } } @@ -482,20 +482,22 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Resolve extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mostSpecificUninferredParam.kt") public void testMostSpecificUninferredParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/resolve/mostSpecificUninferredParam.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/resolve/mostSpecificUninferredParam.kt"); } @TestMetadata("mostSpecificWithLambda.kt") public void testMostSpecificWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/resolve/mostSpecificWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/resolve/mostSpecificWithLambda.kt"); } } @@ -503,92 +505,82 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classWithGenerics.kt") public void testClassWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics.kt"); } @TestMetadata("classWithGenerics2.kt") public void testClassWithGenerics2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics2.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics2.kt"); } @TestMetadata("classWithGenerics3.kt") public void testClassWithGenerics3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics3.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/classWithGenerics3.kt"); } @TestMetadata("explicitPrimaryArgs.kt") public void testExplicitPrimaryArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryArgs.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryArgs.kt"); } @TestMetadata("explicitPrimaryCallSecondary.kt") public void testExplicitPrimaryCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryCallSecondary.kt"); } @TestMetadata("explicitPrimaryNoArgs.kt") public void testExplicitPrimaryNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/explicitPrimaryNoArgs.kt"); } @TestMetadata("implicitPrimary.kt") public void testImplicitPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/implicitPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/implicitPrimary.kt"); } @TestMetadata("overload1.kt") public void testOverload1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload1.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/overload1.kt"); } @TestMetadata("overload2.kt") public void testOverload2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload2.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/overload2.kt"); } @TestMetadata("overload3.kt") public void testOverload3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overload3.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/overload3.kt"); } @TestMetadata("overloadDefault.kt") public void testOverloadDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overloadDefault.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/overloadDefault.kt"); } @TestMetadata("overloadNamed.kt") public void testOverloadNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/overloadNamed.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/overloadNamed.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/simple.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/simple.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/secondaryConstructors/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/secondaryConstructors/varargs.kt"); } } @@ -596,38 +588,37 @@ public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThisOrSuper extends AbstractResolvedCallsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThisOrSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/thisOrSuper"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("labeledSuper.kt") public void testLabeledSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/labeledSuper.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/thisOrSuper/labeledSuper.kt"); } @TestMetadata("labeledThis.kt") public void testLabeledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/labeledThis.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/thisOrSuper/labeledThis.kt"); } @TestMetadata("simpleSuper.kt") public void testSimpleSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/simpleSuper.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/thisOrSuper/simpleSuper.kt"); } @TestMetadata("simpleThis.kt") public void testSimpleThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/simpleThis.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/thisOrSuper/simpleThis.kt"); } @TestMetadata("thisInExtensionFunction.kt") public void testThisInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/thisOrSuper/thisInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/resolvedCalls/thisOrSuper/thisInExtensionFunction.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedConstructorDelegationCallsTestsGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedConstructorDelegationCallsTestsGenerated.java index a1a37b52563..a21aac89f69 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedConstructorDelegationCallsTestsGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/calls/ResolvedConstructorDelegationCallsTestsGenerated.java @@ -21,133 +21,116 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ResolvedConstructorDelegationCallsTestsGenerated extends AbstractResolvedConstructorDelegationCallsTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolveConstructorDelegationCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolveConstructorDelegationCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classWithGenerics.kt") public void testClassWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/classWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/classWithGenerics.kt"); } @TestMetadata("generics2.kt") public void testGenerics2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics2.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/generics2.kt"); } @TestMetadata("generics3.kt") public void testGenerics3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics3.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/generics3.kt"); } @TestMetadata("generics4.kt") public void testGenerics4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics4.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/generics4.kt"); } @TestMetadata("generics5.kt") public void testGenerics5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/generics5.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/generics5.kt"); } @TestMetadata("inheritanceWithGeneric.kt") public void testInheritanceWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/inheritanceWithGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/inheritanceWithGeneric.kt"); } @TestMetadata("innerClassDelegatingPrimary.kt") public void testInnerClassDelegatingPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingPrimary.kt"); } @TestMetadata("innerClassDelegatingSecondary.kt") public void testInnerClassDelegatingSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/innerClassDelegatingSecondary.kt"); } @TestMetadata("superAnyEmpty.kt") public void testSuperAnyEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superAnyEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superAnyEmpty.kt"); } @TestMetadata("superAnyImplicit.kt") public void testSuperAnyImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superAnyImplicit.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superAnyImplicit.kt"); } @TestMetadata("superPrimary.kt") public void testSuperPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superPrimary.kt"); } @TestMetadata("superPrimaryEmpty.kt") public void testSuperPrimaryEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superPrimaryEmpty.kt"); } @TestMetadata("superPrimaryImplicit.kt") public void testSuperPrimaryImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superPrimaryImplicit.kt"); } @TestMetadata("superSecondary.kt") public void testSuperSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superSecondary.kt"); } @TestMetadata("superSecondaryImplicit.kt") public void testSuperSecondaryImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superSecondaryImplicit.kt"); } @TestMetadata("superSecondaryOverload.kt") public void testSuperSecondaryOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/superSecondaryOverload.kt"); } @TestMetadata("thisPrimary.kt") public void testThisPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/thisPrimary.kt"); } @TestMetadata("thisPrimaryEmpty.kt") public void testThisPrimaryEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisPrimaryEmpty.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/thisPrimaryEmpty.kt"); } @TestMetadata("thisSecondary.kt") public void testThisSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/thisSecondary.kt"); } @TestMetadata("thisSecondaryOverload.kt") public void testThisSecondaryOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/thisSecondaryOverload.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/thisSecondaryOverload.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolveConstructorDelegationCalls/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/resolveConstructorDelegationCalls/varargs.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/constants/evaluate/CompileTimeConstantEvaluatorTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/constants/evaluate/CompileTimeConstantEvaluatorTestGenerated.java index 09cfbe40253..e4e4ba5744c 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/constants/evaluate/CompileTimeConstantEvaluatorTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/constants/evaluate/CompileTimeConstantEvaluatorTestGenerated.java @@ -23,134 +23,117 @@ public class CompileTimeConstantEvaluatorTestGenerated extends AbstractCompileTi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constant extends AbstractCompileTimeConstantEvaluatorTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doConstantTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/constant"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectProperty.kt") public void testClassObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/classObjectProperty.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/classObjectProperty.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/compareTo.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/compareTo.kt"); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/differentTypes.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/differentTypes.kt"); } @TestMetadata("divideByZero.kt") public void testDivideByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/divideByZero.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/divideByZero.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/equals.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/equals.kt"); } @TestMetadata("exceptionWhenEvaluate.kt") public void testExceptionWhenEvaluate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/exceptionWhenEvaluate.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/exceptionWhenEvaluate.kt"); } @TestMetadata("finalProperty.kt") public void testFinalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/finalProperty.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/finalProperty.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/float.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/float.kt"); } @TestMetadata("floatsAndDoubles.kt") public void testFloatsAndDoubles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/floatsAndDoubles.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/floatsAndDoubles.kt"); } @TestMetadata("integer.kt") public void testInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integer.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/integer.kt"); } @TestMetadata("integerOperations.kt") public void testIntegerOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integerOperations.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/integerOperations.kt"); } @TestMetadata("integers.kt") public void testIntegers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/integers.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/integers.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/localVal.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/localVar.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/localVar.kt"); } @TestMetadata("nonFinalProperty.kt") public void testNonFinalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/nonFinalProperty.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/nonFinalProperty.kt"); } @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/objectProperty.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/objectProperty.kt"); } @TestMetadata("strings.kt") public void testStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/strings.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/strings.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/topLevelVal.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/topLevelVar.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/topLevelVar.kt"); } @TestMetadata("unaryMinusIndepWoExpType.kt") public void testUnaryMinusIndepWoExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/unaryMinusIndepWoExpType.kt"); } @TestMetadata("unaryMinusIndependentExpType.kt") public void testUnaryMinusIndependentExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt"); - doConstantTest(fileName); + runTest("compiler/testData/evaluate/constant/unaryMinusIndependentExpType.kt"); } } @@ -158,38 +141,37 @@ public class CompileTimeConstantEvaluatorTestGenerated extends AbstractCompileTi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsPure extends AbstractCompileTimeConstantEvaluatorTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIsPureTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsPure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/isPure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerToType.kt") public void testInnerToType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/innerToType.kt"); - doIsPureTest(fileName); + runTest("compiler/testData/evaluate/isPure/innerToType.kt"); } @TestMetadata("namedConstants.kt") public void testNamedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/namedConstants.kt"); - doIsPureTest(fileName); + runTest("compiler/testData/evaluate/isPure/namedConstants.kt"); } @TestMetadata("toType.kt") public void testToType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/toType.kt"); - doIsPureTest(fileName); + runTest("compiler/testData/evaluate/isPure/toType.kt"); } @TestMetadata("unaryMinusIndepWoExpType.kt") public void testUnaryMinusIndepWoExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/unaryMinusIndepWoExpType.kt"); - doIsPureTest(fileName); + runTest("compiler/testData/evaluate/isPure/unaryMinusIndepWoExpType.kt"); } @TestMetadata("unaryMinusIndependentExpType.kt") public void testUnaryMinusIndependentExpType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/isPure/unaryMinusIndependentExpType.kt"); - doIsPureTest(fileName); + runTest("compiler/testData/evaluate/isPure/unaryMinusIndependentExpType.kt"); } } @@ -197,32 +179,32 @@ public class CompileTimeConstantEvaluatorTestGenerated extends AbstractCompileTi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UsesVariableAsConstant extends AbstractCompileTimeConstantEvaluatorTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doUsesVariableAsConstantTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUsesVariableAsConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/evaluate/usesVariableAsConstant"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("binaryTypes.kt") public void testBinaryTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/binaryTypes.kt"); - doUsesVariableAsConstantTest(fileName); + runTest("compiler/testData/evaluate/usesVariableAsConstant/binaryTypes.kt"); } @TestMetadata("NamedConstants.kt") public void testNamedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/NamedConstants.kt"); - doUsesVariableAsConstantTest(fileName); + runTest("compiler/testData/evaluate/usesVariableAsConstant/NamedConstants.kt"); } @TestMetadata("OtherTypes.kt") public void testOtherTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/OtherTypes.kt"); - doUsesVariableAsConstantTest(fileName); + runTest("compiler/testData/evaluate/usesVariableAsConstant/OtherTypes.kt"); } @TestMetadata("simpleTypes.kt") public void testSimpleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/evaluate/usesVariableAsConstant/simpleTypes.kt"); - doUsesVariableAsConstantTest(fileName); + runTest("compiler/testData/evaluate/usesVariableAsConstant/simpleTypes.kt"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java index 5d9ee85f248..6db4439a0ea 100644 --- a/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/resolve/constraintSystem/ConstraintSystemTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstraintSystem() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @@ -29,32 +33,32 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckStatus extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckStatus() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/checkStatus"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("conflictingConstraints.constraints") public void testConflictingConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/conflictingConstraints.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/checkStatus/conflictingConstraints.constraints"); } @TestMetadata("successful.constraints") public void testSuccessful() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/successful.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/checkStatus/successful.constraints"); } @TestMetadata("typeConstructorMismatch.constraints") public void testTypeConstructorMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/checkStatus/typeConstructorMismatch.constraints"); } @TestMetadata("unknownParameters.constraints") public void testUnknownParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/checkStatus/unknownParameters.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/checkStatus/unknownParameters.constraints"); } } @@ -62,32 +66,32 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ComputeValues extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComputeValues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/computeValues"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("contradiction.constraints") public void testContradiction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/contradiction.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/computeValues/contradiction.constraints"); } @TestMetadata("subTypeOfUpperBounds.constraints") public void testSubTypeOfUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/computeValues/subTypeOfUpperBounds.constraints"); } @TestMetadata("superTypeOfLowerBounds1.constraints") public void testSuperTypeOfLowerBounds1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds1.constraints"); } @TestMetadata("superTypeOfLowerBounds2.constraints") public void testSuperTypeOfLowerBounds2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/computeValues/superTypeOfLowerBounds2.constraints"); } } @@ -95,56 +99,52 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntegerValueTypes extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntegerValueTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/integerValueTypes"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("byteOverflow.constraints") public void testByteOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/byteOverflow.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/byteOverflow.constraints"); } @TestMetadata("defaultLong.constraints") public void testDefaultLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/defaultLong.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/defaultLong.constraints"); } @TestMetadata("numberAndAny.constraints") public void testNumberAndAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/numberAndAny.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/numberAndAny.constraints"); } @TestMetadata("numberAndString.constraints") public void testNumberAndString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/numberAndString.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/numberAndString.constraints"); } @TestMetadata("severalNumbers.constraints") public void testSeveralNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/severalNumbers.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/severalNumbers.constraints"); } @TestMetadata("simpleByte.constraints") public void testSimpleByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleByte.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/simpleByte.constraints"); } @TestMetadata("simpleInt.constraints") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleInt.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/simpleInt.constraints"); } @TestMetadata("simpleShort.constraints") public void testSimpleShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/integerValueTypes/simpleShort.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/integerValueTypes/simpleShort.constraints"); } } @@ -152,50 +152,52 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SeveralVariables extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSeveralVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("simpleDependency.constraints") public void testSimpleDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleDependency.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/simpleDependency.constraints"); } @TestMetadata("simpleEquality.constraints") public void testSimpleEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleEquality.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/simpleEquality.constraints"); } @TestMetadata("simpleEquality1.constraints") public void testSimpleEquality1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleEquality1.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/simpleEquality1.constraints"); } @TestMetadata("simpleReversedDependency.constraints") public void testSimpleReversedDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleReversedDependency.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/simpleReversedDependency.constraints"); } @TestMetadata("simpleSubtype.constraints") public void testSimpleSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleSubtype.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/simpleSubtype.constraints"); } @TestMetadata("simpleSubtype1.constraints") public void testSimpleSubtype1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/simpleSubtype1.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/simpleSubtype1.constraints"); } @TestMetadata("compiler/testData/constraintSystem/severalVariables/direct") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Direct extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDirect() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/direct"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @@ -204,62 +206,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contravariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContravariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/direct/contravariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/contravariant/varSuperDepSuper.constraints"); } } @@ -267,62 +264,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Covariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCovariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/direct/covariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/covariant/varSuperDepSuper.constraints"); } } @@ -330,62 +322,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/direct/invariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/direct/invariant/varSuperDepSuper.constraints"); } } } @@ -394,26 +381,27 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Interdependency extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInterdependency() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/interdependency"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("interdependency1.constraints") public void testInterdependency1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/interdependency/interdependency1.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/interdependency/interdependency1.constraints"); } @TestMetadata("interdependency2.constraints") public void testInterdependency2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/interdependency/interdependency2.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/interdependency/interdependency2.constraints"); } @TestMetadata("interdependency3.constraints") public void testInterdependency3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/interdependency/interdependency3.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/interdependency/interdependency3.constraints"); } } @@ -421,6 +409,10 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullable extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/nullable"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @@ -429,62 +421,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contravariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContravariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/nullable/contravariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/contravariant/varSuperDepSuper.constraints"); } } @@ -492,62 +479,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Covariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCovariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/nullable/covariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/covariant/varSuperDepSuper.constraints"); } } @@ -555,62 +537,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/nullable/invariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/nullable/invariant/varSuperDepSuper.constraints"); } } } @@ -619,80 +596,72 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Other extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOther() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/other"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("constraintForNullables.constraints") public void testConstraintForNullables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/constraintForNullables.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/constraintForNullables.constraints"); } @TestMetadata("nestedConsumer.constraints") public void testNestedConsumer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedConsumer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/nestedConsumer.constraints"); } @TestMetadata("nestedConsumer1.constraints") public void testNestedConsumer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedConsumer1.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/nestedConsumer1.constraints"); } @TestMetadata("nestedInvConsumer.constraints") public void testNestedInvConsumer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedInvConsumer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/nestedInvConsumer.constraints"); } @TestMetadata("nestedInvProducer.constraints") public void testNestedInvProducer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedInvProducer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/nestedInvProducer.constraints"); } @TestMetadata("nestedProducer.constraints") public void testNestedProducer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedProducer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/nestedProducer.constraints"); } @TestMetadata("nestedProducerAndConsumer.constraints") public void testNestedProducerAndConsumer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/nestedProducerAndConsumer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/nestedProducerAndConsumer.constraints"); } @TestMetadata("severalOccurrences.constraints") public void testSeveralOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/severalOccurrences.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/severalOccurrences.constraints"); } @TestMetadata("simpleFun.constraints") public void testSimpleFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleFun.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/simpleFun.constraints"); } @TestMetadata("simpleThreeVars.constraints") public void testSimpleThreeVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVars.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVars.constraints"); } @TestMetadata("simpleThreeVarsNoIncorporation.constraints") public void testSimpleThreeVarsNoIncorporation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporation.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporation.constraints"); } @TestMetadata("simpleThreeVarsNoIncorporationFixed.constraints") public void testSimpleThreeVarsNoIncorporationFixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporationFixed.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/other/simpleThreeVarsNoIncorporationFixed.constraints"); } } @@ -700,32 +669,32 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Recursive extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecursive() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/recursive"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("implicitlyRecursive.constraints") public void testImplicitlyRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/recursive/implicitlyRecursive.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/recursive/implicitlyRecursive.constraints"); } @TestMetadata("kt8879.constraints") public void testKt8879() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/recursive/kt8879.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/recursive/kt8879.constraints"); } @TestMetadata("mutuallyRecursive.constraints") public void testMutuallyRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/recursive/mutuallyRecursive.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/recursive/mutuallyRecursive.constraints"); } @TestMetadata("simpleRecursive.constraints") public void testSimpleRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/recursive/simpleRecursive.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/recursive/simpleRecursive.constraints"); } } @@ -733,6 +702,10 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reversed extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReversed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/reversed"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @@ -741,62 +714,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contravariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContravariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/reversed/contravariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/contravariant/varSuperDepSuper.constraints"); } } @@ -804,62 +772,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Covariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCovariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/reversed/covariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/covariant/varSuperDepSuper.constraints"); } } @@ -867,62 +830,57 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invariant extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvariant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/severalVariables/reversed/invariant"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("varEqDepEq.constraints") public void testVarEqDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varEqDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varEqDepEq.constraints"); } @TestMetadata("varEqDepSub.constraints") public void testVarEqDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varEqDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varEqDepSub.constraints"); } @TestMetadata("varEqDepSuper.constraints") public void testVarEqDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varEqDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varEqDepSuper.constraints"); } @TestMetadata("varSubDepEq.constraints") public void testVarSubDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSubDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSubDepEq.constraints"); } @TestMetadata("varSubDepSub.constraints") public void testVarSubDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSubDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSubDepSub.constraints"); } @TestMetadata("varSubDepSuper.constraints") public void testVarSubDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSubDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSubDepSuper.constraints"); } @TestMetadata("varSuperDepEq.constraints") public void testVarSuperDepEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSuperDepEq.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSuperDepEq.constraints"); } @TestMetadata("varSuperDepSub.constraints") public void testVarSuperDepSub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSuperDepSub.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSuperDepSub.constraints"); } @TestMetadata("varSuperDepSuper.constraints") public void testVarSuperDepSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSuperDepSuper.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/severalVariables/reversed/invariant/varSuperDepSuper.constraints"); } } } @@ -932,26 +890,27 @@ public class ConstraintSystemTestGenerated extends AbstractConstraintSystemTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variance extends AbstractConstraintSystemTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/constraintSystem/variance"), Pattern.compile("^(.+)\\.constraints$"), TargetBackend.ANY, true); } @TestMetadata("consumer.constraints") public void testConsumer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/consumer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/variance/consumer.constraints"); } @TestMetadata("invariant.constraints") public void testInvariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/invariant.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/variance/invariant.constraints"); } @TestMetadata("producer.constraints") public void testProducer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/constraintSystem/variance/producer.constraints"); - doTest(fileName); + runTest("compiler/testData/constraintSystem/variance/producer.constraints"); } } } diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/LocalClassProtoTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/serialization/LocalClassProtoTestGenerated.java index 498d7fe9abe..7e7537e5334 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/LocalClassProtoTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/LocalClassProtoTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LocalClassProtoTestGenerated extends AbstractLocalClassProtoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/serialization/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationsInLocalClass.kt") public void testAnnotationsInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/annotationsInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/annotationsInLocalClass.kt"); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/anonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/anonymousObject.kt"); } @TestMetadata("deepInnerChain.kt") public void testDeepInnerChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/deepInnerChain.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/deepInnerChain.kt"); } @TestMetadata("innerOfLocal.kt") public void testInnerOfLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/innerOfLocal.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/innerOfLocal.kt"); } @TestMetadata("localClassInSignature.kt") public void testLocalClassInSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/localClassInSignature.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/localClassInSignature.kt"); } @TestMetadata("simpleInMemberFunction.kt") public void testSimpleInMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/simpleInMemberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/simpleInMemberFunction.kt"); } @TestMetadata("simpleInTopLevelFunction.kt") public void testSimpleInTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/serialization/local/simpleInTopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/serialization/local/simpleInTopLevelFunction.kt"); } } diff --git a/compiler/tests/org/jetbrains/kotlin/types/TypeBindingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/types/TypeBindingTestGenerated.java index 0df24ba678e..950d8058ce2 100644 --- a/compiler/tests/org/jetbrains/kotlin/types/TypeBindingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/types/TypeBindingTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class TypeBindingTestGenerated extends AbstractTypeBindingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/type/binding"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,116 +33,102 @@ public class TypeBindingTestGenerated extends AbstractTypeBindingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Explicit extends AbstractTypeBindingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExplicit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/type/binding/explicit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingProjection.kt") public void testConflictingProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/conflictingProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/conflictingProjection.kt"); } @TestMetadata("conflictingProjection2.kt") public void testConflictingProjection2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/conflictingProjection2.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/conflictingProjection2.kt"); } @TestMetadata("errorPair.kt") public void testErrorPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/errorPair.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/errorPair.kt"); } @TestMetadata("errorWithProjection.kt") public void testErrorWithProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/errorWithProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/errorWithProjection.kt"); } @TestMetadata("functionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/functionType.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/functionType.kt"); } @TestMetadata("functionType2.kt") public void testFunctionType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/functionType2.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/functionType2.kt"); } @TestMetadata("functionType3.kt") public void testFunctionType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/functionType3.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/functionType3.kt"); } @TestMetadata("inProjection.kt") public void testInProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/inProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/inProjection.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/int.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/int.kt"); } @TestMetadata("list0.kt") public void testList0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/list0.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/list0.kt"); } @TestMetadata("list2.kt") public void testList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/list2.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/list2.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/nullableType.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/nullableType.kt"); } @TestMetadata("outProjection.kt") public void testOutProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/outProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/outProjection.kt"); } @TestMetadata("pair.kt") public void testPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/pair.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/pair.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/simple.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/simple.kt"); } @TestMetadata("star.kt") public void testStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/star.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/star.kt"); } @TestMetadata("typeWithBracket.kt") public void testTypeWithBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/typeWithBracket.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/typeWithBracket.kt"); } @TestMetadata("unresolvedType.kt") public void testUnresolvedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/explicit/unresolvedType.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/explicit/unresolvedType.kt"); } } @@ -146,116 +136,102 @@ public class TypeBindingTestGenerated extends AbstractTypeBindingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Implicit extends AbstractTypeBindingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplicit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/type/binding/implicit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingProjection.kt") public void testConflictingProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/conflictingProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/conflictingProjection.kt"); } @TestMetadata("conflictingProjection2.kt") public void testConflictingProjection2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/conflictingProjection2.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/conflictingProjection2.kt"); } @TestMetadata("errorPair.kt") public void testErrorPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/errorPair.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/errorPair.kt"); } @TestMetadata("errorWithProjection.kt") public void testErrorWithProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/errorWithProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/errorWithProjection.kt"); } @TestMetadata("functionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/functionType.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/functionType.kt"); } @TestMetadata("functionType2.kt") public void testFunctionType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/functionType2.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/functionType2.kt"); } @TestMetadata("functionType3.kt") public void testFunctionType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/functionType3.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/functionType3.kt"); } @TestMetadata("inProjection.kt") public void testInProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/inProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/inProjection.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/int.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/int.kt"); } @TestMetadata("list0.kt") public void testList0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/list0.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/list0.kt"); } @TestMetadata("list2.kt") public void testList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/list2.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/list2.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/nullableType.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/nullableType.kt"); } @TestMetadata("outProjection.kt") public void testOutProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/outProjection.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/outProjection.kt"); } @TestMetadata("pair.kt") public void testPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/pair.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/pair.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/simple.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/simple.kt"); } @TestMetadata("star.kt") public void testStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/star.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/star.kt"); } @TestMetadata("typeWithBracket.kt") public void testTypeWithBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/typeWithBracket.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/typeWithBracket.kt"); } @TestMetadata("unresolvedType.kt") public void testUnresolvedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/type/binding/implicit/unresolvedType.kt"); - doTest(fileName); + runTest("compiler/testData/type/binding/implicit/unresolvedType.kt"); } } } diff --git a/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java index 639f4ee71c5..b1460f3c1ac 100644 --- a/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java +++ b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/Jvm8RuntimeDescriptorLoaderTestGenerated.java @@ -21,31 +21,31 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class Jvm8RuntimeDescriptorLoaderTestGenerated extends AbstractJvm8RuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava8/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("InnerClassTypeAnnotation.java") public void testInnerClassTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); - doTest(fileName); + runTest("compiler/testData/loadJava8/compiledJava/InnerClassTypeAnnotation.java"); } @TestMetadata("MapRemove.java") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/MapRemove.java"); - doTest(fileName); + runTest("compiler/testData/loadJava8/compiledJava/MapRemove.java"); } @TestMetadata("TypeAnnotations.java") public void testTypeAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); - doTest(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeAnnotations.java"); } @TestMetadata("TypeParameterAnnotations.java") public void testTypeParameterAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); - doTest(fileName); + runTest("compiler/testData/loadJava8/compiledJava/TypeParameterAnnotations.java"); } } diff --git a/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java index 9c2b5ca60bc..b0298c2a544 100644 --- a/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java +++ b/core/descriptors.runtime/tests/org/jetbrains/kotlin/jvm/runtime/JvmRuntimeDescriptorLoaderTestGenerated.java @@ -23,6 +23,10 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledKotlin extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -31,118 +35,109 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.kt") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); } @TestMetadata("AnnotatedMethod.kt") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); } @TestMetadata("AnnotationInAnnotationArguments.kt") public void testAnnotationInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); } @TestMetadata("EnumArgumentWithCustomToString.kt") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); } @TestMetadata("MultiDimensionalArrayMethod.kt") public void testMultiDimensionalArrayMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); } @TestMetadata("PrimitiveArrayArguments.kt") public void testPrimitiveArrayArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); } @TestMetadata("TargetedAnnotation.kt") public void testTargetedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembers extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectPropertyField.kt") public void testClassObjectPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); } } @@ -150,98 +145,87 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInClassObject.kt") public void testAnnotationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); } @TestMetadata("DollarsInAnnotationName.kt") public void testDollarsInAnnotationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); } @TestMetadata("MultipleAnnotations.kt") public void testMultipleAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); } @TestMetadata("NestedAnnotation.kt") public void testNestedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); } @TestMetadata("Retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); } @TestMetadata("WithArgument.kt") public void testWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); } @TestMetadata("WithMultipleArguments.kt") public void testWithMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); } } @@ -249,56 +233,52 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); } @TestMetadata("EnumArrayArgument.kt") public void testEnumArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); } @TestMetadata("StringArrayArgument.kt") public void testStringArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); } } @@ -306,80 +286,72 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); } @TestMetadata("ExtensionFunctionInClass.kt") public void testExtensionFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); } @TestMetadata("ExtensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); } @TestMetadata("FunctionInClass.kt") public void testFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); } @TestMetadata("FunctionInTrait.kt") public void testFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); } @TestMetadata("InnerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); } @TestMetadata("ManyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); } @TestMetadata("PropertySetterInClass.kt") public void testPropertySetterInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); } @TestMetadata("TopLevelPropertySetter.kt") public void testTopLevelPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); } } @@ -387,56 +359,52 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertiesWithoutBackingFields extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); } @TestMetadata("ExtensionsWithSameNameClass.kt") public void testExtensionsWithSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); } @TestMetadata("ExtensionsWithSameNamePackage.kt") public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); } @TestMetadata("NestedTrait.kt") public void testNestedTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); } @TestMetadata("TraitClassObject.kt") public void testTraitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); } } @@ -444,56 +412,52 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassLiteralArgument.kt") public void testClassLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); } @TestMetadata("ReceiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); } @TestMetadata("SimpleTypeAnnotation.kt") public void testSimpleTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); } @TestMetadata("SupertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); } @TestMetadata("TypeAnnotationWithArguments.kt") public void testTypeAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); } @TestMetadata("TypeArgument.kt") public void testTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); } @TestMetadata("TypeParameterAnnotation.kt") public void testTypeParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); } @TestMetadata("TypeParameterAnnotationWithArguments.kt") public void testTypeParameterAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); } } @@ -501,26 +465,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateTarget.kt") public void testDelegateTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); } @TestMetadata("FieldTarget.kt") public void testFieldTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); } @TestMetadata("ReceiverTarget.kt") public void testReceiverTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); } } } @@ -529,262 +494,229 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); } @TestMetadata("ClassInParam.kt") public void testClassInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); } @TestMetadata("ClassInnerClass.kt") public void testClassInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); } @TestMetadata("ClassMemberConflict.kt") public void testClassMemberConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); } @TestMetadata("ClassOutParam.kt") public void testClassOutParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); } @TestMetadata("ClassParam.kt") public void testClassParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); } @TestMetadata("ClassParamReferencesParam.kt") public void testClassParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); } @TestMetadata("ClassParamReferencesParam2.kt") public void testClassParamReferencesParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); } @TestMetadata("ClassParamReferencesSelf.kt") public void testClassParamReferencesSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); } @TestMetadata("ClassParamUpperClassBound.kt") public void testClassParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); } @TestMetadata("ClassParamUpperClassInterfaceBound.kt") public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); } @TestMetadata("ClassParamUpperInterfaceBound.kt") public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); } @TestMetadata("ClassTwoParams.kt") public void testClassTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); } @TestMetadata("ClassTwoParams2.kt") public void testClassTwoParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); } @TestMetadata("EnumWithGenericConstructorParameter.kt") public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); } @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); } @TestMetadata("InheritClassSimple.kt") public void testInheritClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); } @TestMetadata("InheritClassWithParam.kt") public void testInheritClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); } @TestMetadata("InheritSubstitutedMethod.kt") public void testInheritSubstitutedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); } @TestMetadata("InheritTraitWithFunctionParam.kt") public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); } @TestMetadata("InheritTraitWithParam.kt") public void testInheritTraitWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); } @TestMetadata("InnerClassExtendInnerClass.kt") public void testInnerClassExtendInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); } @TestMetadata("InnerGenericClass.kt") public void testInnerGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); } @TestMetadata("InnerTypes.kt") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); } @TestMetadata("NamedObjectInClass.kt") public void testNamedObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); } @TestMetadata("NamedObjectInClassObject.kt") public void testNamedObjectInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); } @TestMetadata("NamedObjectInNamedObject.kt") public void testNamedObjectInNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); } @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); } @TestMetadata("NestedClassExtendNestedClass.kt") public void testNestedClassExtendNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); } @TestMetadata("NestedGenericClass.kt") public void testNestedGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); } @TestMetadata("RecursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); } @TestMetadata("SingleAbstractMethod.kt") public void testSingleAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.kt") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); } @TestMetadata("JavaBeanAbstractGetter.kt") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); } @TestMetadata("JavaBeanVal.kt") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); } @TestMetadata("JavaBeanVar.kt") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); } @TestMetadata("JavaBeanVarOfGenericType.kt") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); } @TestMetadata("TwoSetters.kt") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); } } } @@ -793,38 +725,37 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassFun extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassInParamUsedInFun.kt") public void testClassInParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); } @TestMetadata("ClassParamUsedInFun.kt") public void testClassParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); } @TestMetadata("FunDelegationToTraitImpl.kt") public void testFunDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); } @TestMetadata("FunInParamSuper.kt") public void testFunInParamSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); } @TestMetadata("TraitOpenFun.kt") public void testTraitOpenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); } } @@ -832,86 +763,77 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectDeclaresVal.kt") public void testClassObjectDeclaresVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); } @TestMetadata("ClassObjectDeclaresVar.kt") public void testClassObjectDeclaresVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); } @TestMetadata("ClassObjectDefaultVisibility.kt") public void testClassObjectDefaultVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); } @TestMetadata("ClassObjectExplicitVisibility.kt") public void testClassObjectExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); } @TestMetadata("ClassObjectExtendsTrait.kt") public void testClassObjectExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); } @TestMetadata("ClassObjectExtendsTraitWithTP.kt") public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); } @TestMetadata("classObjectInClassStaticFields.kt") public void testClassObjectInClassStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); } @TestMetadata("classObjectInTraitStaticFields.kt") public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); } @TestMetadata("ClassObjectPropertyInClass.kt") public void testClassObjectPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); } @TestMetadata("InnerClassInClassObject.kt") public void testInnerClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); } @TestMetadata("SimpleClassObject.kt") public void testSimpleClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); } } @@ -919,124 +841,114 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); } @TestMetadata("Constructor1.kt") public void testConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); } @TestMetadata("Constructor1WithParamDefaultValue.kt") public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); } @TestMetadata("Constructor2WithOneParamDefaultValue.kt") public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorGenericDeep.kt") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); } @TestMetadata("ConstructorGenericSimple.kt") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); } @TestMetadata("ConstructorGenericUpperBound.kt") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); } @TestMetadata("ConstructorWithTwoDefArgs.kt") public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); } @TestMetadata("ConstructorWithTwoTypeParameters.kt") public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); } @TestMetadata("InnerClassConstructorWithDefArgs.kt") public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); } @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorNonLastVararg.kt") public void testConstructorNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); } @TestMetadata("ConstructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); } } } @@ -1045,14 +957,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); } } @@ -1060,32 +975,32 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MixedComponents.kt") public void testMixedComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); } @TestMetadata("OneVal.kt") public void testOneVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); } @TestMetadata("TwoVals.kt") public void testTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); } @TestMetadata("TwoVars.kt") public void testTwoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); } } @@ -1093,44 +1008,42 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumVisibility.kt") public void testEnumVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); } @TestMetadata("enumWithConstuctor.kt") public void testEnumWithConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); } @TestMetadata("enumWithInnerClasses.kt") public void testEnumWithInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); } @TestMetadata("innerEnumExistingClassObject.kt") public void testInnerEnumExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); } } @@ -1138,222 +1051,195 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromLoadJava extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromLoadJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.kt") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); } @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); } @TestMetadata("classObjectAnnotation.kt") public void testClassObjectAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); } @TestMetadata("ClassWithConstVal.kt") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); } @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); } @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); } @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); } @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); } @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); } @TestMetadata("ClassWithTypePRefSelfAndClass.kt") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); } @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); } @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); } @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypes.kt") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); } @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); } @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); } @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); } @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); } @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); } @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); } @TestMetadata("MyException.kt") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); } @TestMetadata("objectMembers.kt") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); } @TestMetadata("packageLevelObject.kt") public void testPackageLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); } @TestMetadata("RemoveRedundantProjectionKind.kt") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); } @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); } @TestMetadata("UnboundWildcard.kt") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.kt") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -1362,102 +1248,90 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestMetadata("ArrayType.kt") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); } @TestMetadata("ConstructorWithNewTypeParams.kt") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); } @TestMetadata("ConstructorWithParentTypeParams.kt") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); } @TestMetadata("ConstructorWithSeveralParams.kt") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); } @TestMetadata("ConstructorWithoutParams.kt") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); } @TestMetadata("CustomProjectionKind.kt") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); } @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); } @TestMetadata("MethodWithGenerics.kt") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); } @TestMetadata("MethodWithMappedClasses.kt") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); } @TestMetadata("MethodWithTypeParameters.kt") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); } @TestMetadata("MethodWithVararg.kt") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); } @TestMetadata("PropertyArrayTypes.kt") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); } @TestMetadata("PropertyComplexTypes.kt") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); } @TestMetadata("PropertySimpleType.kt") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddingNullability.kt") public void testAddingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); } public void testAllFilesPresentInError() throws Exception { @@ -1466,158 +1340,132 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestMetadata("ConflictingProjectionKind.kt") public void testConflictingProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); } @TestMetadata("ExplicitFieldGettersAndSetters.kt") public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); } @TestMetadata("ExtraUpperBound.kt") public void testExtraUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); } @TestMetadata("MissingUpperBound.kt") public void testMissingUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); } @TestMetadata("NoFieldTypeRef.kt") public void testNoFieldTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); } @TestMetadata("NotVarargReplacedWithVararg.kt") public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); } @TestMetadata("RedundantProjectionKind.kt") public void testRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); } @TestMetadata("ReturnTypeMissing.kt") public void testReturnTypeMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); } @TestMetadata("SyntaxErrorInFieldAnnotation.kt") public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); } @TestMetadata("VarargReplacedWithNotVararg.kt") public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); } @TestMetadata("WrongFieldInitializer.kt") public void testWrongFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); } @TestMetadata("WrongFieldMutability.kt") public void testWrongFieldMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); } @TestMetadata("WrongFieldName.kt") public void testWrongFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); } @TestMetadata("WrongMethodName.kt") public void testWrongMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); } @TestMetadata("WrongProjectionKind.kt") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); } @TestMetadata("WrongReturnTypeStructure.kt") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); } @TestMetadata("WrongTypeName1.kt") public void testWrongTypeName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); } @TestMetadata("WrongTypeName2.kt") public void testWrongTypeName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); } @TestMetadata("WrongTypeName3.kt") public void testWrongTypeName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); } @TestMetadata("WrongTypeParameterBoundStructure1.kt") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); } @TestMetadata("WrongTypeParameterBoundStructure2.kt") public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); } @TestMetadata("WrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); } @TestMetadata("WrongValueParameterStructure1.kt") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); } @TestMetadata("WrongValueParameterStructure2.kt") public void testWrongValueParameterStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); } @TestMetadata("WrongValueParametersCount.kt") public void testWrongValueParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); } } @@ -1625,178 +1473,159 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.kt") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.kt") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); } @TestMetadata("ChangeProjectionKind2.kt") public void testChangeProjectionKind2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); } @TestMetadata("InheritNotVararg.kt") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); } @TestMetadata("InheritNotVarargInteger.kt") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); } @TestMetadata("InheritNotVarargNotNull.kt") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); } @TestMetadata("InheritNotVarargPrimitive.kt") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); } @TestMetadata("InheritVararg.kt") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); } @TestMetadata("InheritVarargInteger.kt") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); } @TestMetadata("InheritVarargNotNull.kt") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); } @TestMetadata("InheritVarargPrimitive.kt") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); } @TestMetadata("Kt3302.kt") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); } @TestMetadata("MutableToReadOnly.kt") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); } @TestMetadata("NotNullToNullable.kt") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); } @TestMetadata("NullableToNotNull.kt") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); } @TestMetadata("NullableToNotNullKotlinSignature.kt") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); } @TestMetadata("OverrideWithErasedParameter.kt") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); } @TestMetadata("ReadOnlyToMutable.kt") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); } } @@ -1804,40 +1633,38 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.kt") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); } @TestMetadata("AddNotNullSameJavaType.kt") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); } @TestMetadata("AddNullabilityJavaSubtype.kt") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); } @TestMetadata("AddNullabilitySameGenericType1.kt") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); } @TestMetadata("AddNullabilitySameGenericType2.kt") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); } @TestMetadata("AddNullabilitySameJavaType.kt") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); } public void testAllFilesPresentInReturn() throws Exception { @@ -1846,170 +1673,142 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestMetadata("CantMakeImmutableInSubclass.kt") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("HalfSubstitutedTypeParameters.kt") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); } @TestMetadata("InheritNullabilityJavaSubtype.kt") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); } @TestMetadata("InheritNullabilitySameGenericType.kt") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); } @TestMetadata("InheritNullabilitySameJavaType.kt") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnlinessOfArgument.kt") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); } @TestMetadata("InheritReadOnlinessSameClass.kt") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); } @TestMetadata("InheritReadOnlinessSubclass.kt") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); } @TestMetadata("SameProjectionKind.kt") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubclassOfCollection.kt") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); } @TestMetadata("SubclassOfMapEntry.kt") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); } @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); } @TestMetadata("TwoSuperclassesSupplementNotNull.kt") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); } @TestMetadata("TypeParamOfClass.kt") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); } @TestMetadata("TypeParamOfClassSubstituted.kt") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); } @TestMetadata("TypeParamOfFun.kt") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); } } @@ -2017,62 +1816,57 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); } @TestMetadata("TwoBounds.kt") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); } @TestMetadata("TwoSuperclasses.kt") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); } @TestMetadata("TwoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); } @TestMetadata("UseParameterAsUpperBound.kt") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); } @TestMetadata("UseParameterInUpperBound.kt") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); } } } @@ -2082,26 +1876,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); } @TestMetadata("LoadIterator.kt") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); } @TestMetadata("Max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); } } @@ -2109,14 +1904,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.kt") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); } } @@ -2124,38 +1922,37 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.kt") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); } @TestMetadata("NotNullIntArray.kt") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); } @TestMetadata("NotNullMethod.kt") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); } @TestMetadata("NotNullObjectArray.kt") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); } @TestMetadata("NotNullParameter.kt") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); } } } @@ -2164,142 +1961,129 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fun extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); } @TestMetadata("DeclaredMemberOverridesDelegated.kt") public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); } @TestMetadata("InfixKeyword.kt") public void testInfixKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); } @TestMetadata("InheritValAndVar.kt") public void testInheritValAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); } @TestMetadata("InheritValsDifferentTypes.kt") public void testInheritValsDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); } @TestMetadata("NoSamAdapter.kt") public void testNoSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); } @TestMetadata("NoSamConstructor.kt") public void testNoSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); } @TestMetadata("OperatorKeyword.kt") public void testOperatorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); } @TestMetadata("PropagateDeepSubclass.kt") public void testPropagateDeepSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); } @TestMetadata("PropagateSubclassOfComparable.kt") public void testPropagateSubclassOfComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithTypeVariables extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunGenericParam.kt") public void testFunGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); } @TestMetadata("FunParamParam.kt") public void testFunParamParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); } @TestMetadata("FunParamParamErased.kt") public void testFunParamParamErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); } @TestMetadata("FunParamReferencesParam.kt") public void testFunParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); } @TestMetadata("FunParamTwoUpperBounds.kt") public void testFunParamTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); } @TestMetadata("FunParamUpperClassBound.kt") public void testFunParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); } @TestMetadata("FunParamUpperClassInterfaceBound.kt") public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); } @TestMetadata("FunParamUpperInterfaceBound.kt") public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); } @TestMetadata("FunParamVaragParam.kt") public void testFunParamVaragParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); } @TestMetadata("FunTwoTypeParams.kt") public void testFunTwoTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); } } @@ -2307,38 +2091,37 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithoutTypeVariables extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunClassParamNotNull.kt") public void testFunClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); } @TestMetadata("FunClassParamNullable.kt") public void testFunClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); } @TestMetadata("FunParamNullable.kt") public void testFunParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); } @TestMetadata("ReturnTypeClassParamNotNull.kt") public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); } @TestMetadata("ReturnTypeClassParamNullable.kt") public void testReturnTypeClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); } } @@ -2346,104 +2129,92 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonGeneric extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassFun.kt") public void testClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); } @TestMetadata("ClassFunGetFoo.kt") public void testClassFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); } @TestMetadata("ClassFunGetFooSetFoo.kt") public void testClassFunGetFooSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); } @TestMetadata("ClassFunSetFoo.kt") public void testClassFunSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); } @TestMetadata("ExtFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); } @TestMetadata("ExtFunInClass.kt") public void testExtFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); } @TestMetadata("FunDefaultArg.kt") public void testFunDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); } @TestMetadata("FunParamNotNull.kt") public void testFunParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); } @TestMetadata("FunVarargInt.kt") public void testFunVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); } @TestMetadata("FunVarargInteger.kt") public void testFunVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); } @TestMetadata("ModifierAbstract.kt") public void testModifierAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); } @TestMetadata("ModifierOpen.kt") public void testModifierOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); } @TestMetadata("NsFun.kt") public void testNsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); } @TestMetadata("NsFunGetFoo.kt") public void testNsFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); } @TestMetadata("ReturnTypeNotNull.kt") public void testReturnTypeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); } @TestMetadata("ReturnTypeNullable.kt") public void testReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); } } @@ -2451,26 +2222,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonLastVararg.kt") public void testNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); } @TestMetadata("VarargInt.kt") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); } @TestMetadata("VarargString.kt") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); } } } @@ -2479,14 +2251,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); } } @@ -2494,44 +2269,42 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberOrder extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callablesNameClash.kt") public void testCallablesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); } @TestMetadata("extensionMembers.kt") public void testExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); } @TestMetadata("extensionPropertiesNameClash.kt") public void testExtensionPropertiesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); } } @@ -2539,26 +2312,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deepInnerGeneric.kt") public void testDeepInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); } @TestMetadata("innerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); } @TestMetadata("membersReferenceOuterTP.kt") public void testMembersReferenceOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); } } @@ -2566,20 +2340,22 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notnullTypeArgument.kt") public void testNotnullTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); } } @@ -2587,274 +2363,239 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Prop extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); } @TestMetadata("ClassValAbstract.kt") public void testClassValAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); } @TestMetadata("CollectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); } @TestMetadata("ExtValClass.kt") public void testExtValClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); } @TestMetadata("ExtValInClass.kt") public void testExtValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); } @TestMetadata("ExtValInt.kt") public void testExtValInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); } @TestMetadata("ExtValIntCharSequence.kt") public void testExtValIntCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); } @TestMetadata("ExtValIntCharSequenceQ.kt") public void testExtValIntCharSequenceQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); } @TestMetadata("ExtValIntListQOfIntInClass.kt") public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); } @TestMetadata("ExtValIntTInClass.kt") public void testExtValIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); } @TestMetadata("ExtValIntTQInClass.kt") public void testExtValIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); } @TestMetadata("ExtValTIntInClass.kt") public void testExtValTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); } @TestMetadata("ExtVarClass.kt") public void testExtVarClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); } @TestMetadata("ExtVarInClass.kt") public void testExtVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); } @TestMetadata("ExtVarInt.kt") public void testExtVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); } @TestMetadata("ExtVarIntTInClass.kt") public void testExtVarIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); } @TestMetadata("ExtVarIntTQInClass.kt") public void testExtVarIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); } @TestMetadata("ExtVarMapPQInt.kt") public void testExtVarMapPQInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); } @TestMetadata("ExtVarTIntInClass.kt") public void testExtVarTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); } @TestMetadata("ExtVarTQIntInClass.kt") public void testExtVarTQIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); } @TestMetadata("ExtVarl.kt") public void testExtVarl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); } @TestMetadata("NsVal.kt") public void testNsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); } @TestMetadata("NsVar.kt") public void testNsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); } @TestMetadata("OverrideClassVal.kt") public void testOverrideClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); } @TestMetadata("OverrideTraitVal.kt") public void testOverrideTraitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); } @TestMetadata("PropFromSuperclass.kt") public void testPropFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); } @TestMetadata("TraitFinalVar.kt") public void testTraitFinalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); } @TestMetadata("TraitOpenVal.kt") public void testTraitOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); } @TestMetadata("VarDelegationToTraitImpl.kt") public void testVarDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); } @TestMetadata("VarWithDelegated.kt") public void testVarWithDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultAccessors extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); } @TestMetadata("ClassValParams.kt") public void testClassValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); } @TestMetadata("ClassValWithGet.kt") public void testClassValWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); } @TestMetadata("ClassVarModality.kt") public void testClassVarModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); } @TestMetadata("ClassVarParams.kt") public void testClassVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); } @TestMetadata("ClassVarWithGet.kt") public void testClassVarWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); } @TestMetadata("ClassVarWithSet.kt") public void testClassVarWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); } @TestMetadata("ExtValLong.kt") public void testExtValLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); } @TestMetadata("ExtVarLong.kt") public void testExtVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); } } } @@ -2863,194 +2604,167 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); } @TestMetadata("AnyQ.kt") public void testAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); } @TestMetadata("ArrayOfInNumber.kt") public void testArrayOfInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); } @TestMetadata("ArrayOfInteger.kt") public void testArrayOfInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); } @TestMetadata("ArrayOfOutNumber.kt") public void testArrayOfOutNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); } @TestMetadata("ArrayOfOutT.kt") public void testArrayOfOutT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); } @TestMetadata("ArrayOfString.kt") public void testArrayOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); } @TestMetadata("Function1IntString.kt") public void testFunction1IntString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); } @TestMetadata("jlInteger.kt") public void testJlInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); } @TestMetadata("jlIntegerQ.kt") public void testJlIntegerQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); } @TestMetadata("jlNumber.kt") public void testJlNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); } @TestMetadata("jlObject.kt") public void testJlObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); } @TestMetadata("jlObjectQ.kt") public void testJlObjectQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); } @TestMetadata("jlStringQ.kt") public void testJlStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); } @TestMetadata("ListOfAny.kt") public void testListOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); } @TestMetadata("ListOfAnyQ.kt") public void testListOfAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); } @TestMetadata("ListOfjlString.kt") public void testListOfjlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); } @TestMetadata("Nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); } @TestMetadata("NothingQ.kt") public void testNothingQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); } @TestMetadata("platform.kt") public void testPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/String.kt"); } @TestMetadata("StringQ.kt") public void testStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); } @TestMetadata("Unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); } } @@ -3058,32 +2772,32 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); } @TestMetadata("TypeAliasToExtension.kt") public void testTypeAliasToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); } } @@ -3091,74 +2805,67 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InternalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); } @TestMetadata("InternalConstructor.kt") public void testInternalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); } @TestMetadata("InternalTopLevelMembers.kt") public void testInternalTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); } @TestMetadata("PrivateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); } @TestMetadata("PrivateClassMembers.kt") public void testPrivateClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); } @TestMetadata("PrivateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); } @TestMetadata("PrivateTopLevelFun.kt") public void testPrivateTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); } @TestMetadata("PrivateTopLevelVal.kt") public void testPrivateTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); } @TestMetadata("PropertyInConstructorExplicitVisibility.kt") public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); } @TestMetadata("TopLevelVarWithPrivateSetter.kt") public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); } } } @@ -3167,472 +2874,404 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompiledJava extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true, "sam", "kotlinSignature/propagation"); } @TestMetadata("ArrayTypeVariance.java") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ArrayTypeVariance.java"); } @TestMetadata("ClassDoesNotOverrideMethod.java") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassDoesNotOverrideMethod.java"); } @TestMetadata("ClassWithConstVal.java") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithConstVal.java"); } @TestMetadata("ClassWithTypeP.java") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypeP.java"); } @TestMetadata("ClassWithTypePExtendsIterableP.java") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePExtendsIterableP.java"); } @TestMetadata("ClassWithTypePP.java") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePP.java"); } @TestMetadata("ClassWithTypePRefNext.java") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefNext.java"); } @TestMetadata("ClassWithTypePRefSelf.java") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelf.java"); } @TestMetadata("ClassWithTypePRefSelfAndClass.java") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/ClassWithTypePRefSelfAndClass.java"); } @TestMetadata("FieldAsVar.java") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldAsVar.java"); } @TestMetadata("FieldOfArrayType.java") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/FieldOfArrayType.java"); } @TestMetadata("FinalFieldAsVal.java") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/FinalFieldAsVal.java"); } @TestMetadata("InheritMethodsDifferentReturnTypes.java") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypes.java"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.java") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InheritMethodsDifferentReturnTypesGeneric.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClass.java"); } @TestMetadata("InnerClassReferencesOuterTP.java") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassReferencesOuterTP.java"); } @TestMetadata("InnerClassTypeMultipleGeneric.java") public void testInnerClassTypeMultipleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassTypeMultipleGeneric.java"); } @TestMetadata("InnerClassesInGeneric.java") public void testInnerClassesInGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerClassesInGeneric.java"); } @TestMetadata("InnerOfGeneric.java") public void testInnerOfGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/InnerOfGeneric.java"); } @TestMetadata("IntrinsicCompanionObject.java") public void testIntrinsicCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/IntrinsicCompanionObject.java"); } @TestMetadata("MethodReferencesOuterClassTP.java") public void testMethodReferencesOuterClassTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodReferencesOuterClassTP.java"); } @TestMetadata("MethodTypePOneUpperBound.java") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePOneUpperBound.java"); } @TestMetadata("MethodTypePTwoUpperBounds.java") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodTypePTwoUpperBounds.java"); } @TestMetadata("MethodWithTypeP.java") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypeP.java"); } @TestMetadata("MethodWithTypePP.java") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePP.java"); } @TestMetadata("MethodWithTypePRefClassP.java") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethodWithTypePRefClassP.java"); } @TestMetadata("MethosWithPRefTP.java") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MethosWithPRefTP.java"); } @TestMetadata("MyException.java") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/MyException.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/MyException.java"); } @TestMetadata("NestedClass.java") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/NestedClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/NestedClass.java"); } @TestMetadata("OverrideMethod.java") public void testOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/OverrideMethod.java"); } @TestMetadata("PackageLocalVisibility.java") public void testPackageLocalVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/PackageLocalVisibility.java"); } @TestMetadata("PrivateMembers.java") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembers.java"); } @TestMetadata("PrivateMembersInHierarchy.java") public void testPrivateMembersInHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/PrivateMembersInHierarchy.java"); } @TestMetadata("RawOverrides.java") public void testRawOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawOverrides.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawOverrides.java"); } @TestMetadata("RawTypeWithUpperBound.java") public void testRawTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawTypeWithUpperBound.java"); } @TestMetadata("RawUpperBound.java") public void testRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/RawUpperBound.java"); } @TestMetadata("RecursiveRawUpperBound.java") public void testRecursiveRawUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveRawUpperBound.java"); } @TestMetadata("RecursiveWildcardUpperBound.java") public void testRecursiveWildcardUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/RecursiveWildcardUpperBound.java"); } @TestMetadata("RemoveRedundantProjectionKind.java") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/RemoveRedundantProjectionKind.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/Simple.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/Simple.java"); } @TestMetadata("SubclassFromNested.java") public void testSubclassFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/SubclassFromNested.java"); } @TestMetadata("TopLevel$Class.java") public void testTopLevel$Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/TopLevel$Class.java"); } @TestMetadata("TwoFields.java") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/TwoFields.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/TwoFields.java"); } @TestMetadata("UnboundWildcard.java") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/UnboundWildcard.java"); } @TestMetadata("WildcardBounds.java") public void testWildcardBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/WildcardBounds.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.java") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedAnnotation.java"); } @TestMetadata("AnnotatedConstructor.java") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedConstructor.java"); } @TestMetadata("AnnotatedEnumEntry.java") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedEnumEntry.java"); } @TestMetadata("AnnotatedField.java") public void testAnnotatedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedField.java"); } @TestMetadata("AnnotatedMethod.java") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedMethod.java"); } @TestMetadata("AnnotatedValueParameter.java") public void testAnnotatedValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotatedValueParameter.java"); } @TestMetadata("AnnotationInParam.java") public void testAnnotationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationInParam.java"); } @TestMetadata("AnnotationRetentions.java") public void testAnnotationRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationRetentions.java"); } @TestMetadata("AnnotationTargets.java") public void testAnnotationTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/AnnotationTargets.java"); } @TestMetadata("ArithmeticExpressionInParam.java") public void testArithmeticExpressionInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArithmeticExpressionInParam.java"); } @TestMetadata("ArrayOfEnumInParam.java") public void testArrayOfEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfEnumInParam.java"); } @TestMetadata("ArrayOfStringInParam.java") public void testArrayOfStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ArrayOfStringInParam.java"); } @TestMetadata("ClassObjectArrayInParam.java") public void testClassObjectArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectArrayInParam.java"); } @TestMetadata("ClassObjectInParam.java") public void testClassObjectInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParam.java"); } @TestMetadata("ClassObjectInParamRaw.java") public void testClassObjectInParamRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamRaw.java"); } @TestMetadata("ClassObjectInParamVariance.java") public void testClassObjectInParamVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/ClassObjectInParamVariance.java"); } @TestMetadata("CustomAnnotation.java") public void testCustomAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotation.java"); } @TestMetadata("CustomAnnotationWithDefaultParameter.java") public void testCustomAnnotationWithDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/CustomAnnotationWithDefaultParameter.java"); } @TestMetadata("EmptyArrayInParam.java") public void testEmptyArrayInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EmptyArrayInParam.java"); } @TestMetadata("EnumArgumentWithCustomToString.java") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumArgumentWithCustomToString.java"); } @TestMetadata("EnumConstructorParameter.java") public void testEnumConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumConstructorParameter.java"); } @TestMetadata("EnumInParam.java") public void testEnumInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/EnumInParam.java"); } @TestMetadata("JavaDocDeprecated.java") public void testJavaDocDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/JavaDocDeprecated.java"); } @TestMetadata("NestedEnumArgument.java") public void testNestedEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/NestedEnumArgument.java"); } @TestMetadata("PrimitiveValueInParam.java") public void testPrimitiveValueInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/PrimitiveValueInParam.java"); } @TestMetadata("RecursiveAnnotation.java") public void testRecursiveAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation.java"); } @TestMetadata("RecursiveAnnotation2.java") public void testRecursiveAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/RecursiveAnnotation2.java"); } @TestMetadata("SimpleAnnotation.java") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/SimpleAnnotation.java"); } @TestMetadata("StringConcatenationInParam.java") public void testStringConcatenationInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConcatenationInParam.java"); } @TestMetadata("StringConstantInParam.java") public void testStringConstantInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringConstantInParam.java"); } @TestMetadata("StringInParam.java") public void testStringInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/annotations/StringInParam.java"); } } @@ -3640,26 +3279,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/constructor"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorGenericDeep.java") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericDeep.java"); } @TestMetadata("ConstructorGenericSimple.java") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericSimple.java"); } @TestMetadata("ConstructorGenericUpperBound.java") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/constructor/ConstructorGenericUpperBound.java"); } } @@ -3667,26 +3307,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("EnumMembers.java") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumMembers.java"); } @TestMetadata("EnumWithSpecializedEntry.java") public void testEnumWithSpecializedEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/EnumWithSpecializedEntry.java"); } @TestMetadata("JavaEnum.java") public void testJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/enum/JavaEnum.java"); } } @@ -3694,44 +3335,42 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/javaBean"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.java") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/DifferentGetterAndSetter.java"); } @TestMetadata("JavaBeanAbstractGetter.java") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanAbstractGetter.java"); } @TestMetadata("JavaBeanVal.java") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVal.java"); } @TestMetadata("JavaBeanVar.java") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVar.java"); } @TestMetadata("JavaBeanVarOfGenericType.java") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/JavaBeanVarOfGenericType.java"); } @TestMetadata("TwoSetters.java") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/javaBean/TwoSetters.java"); } } @@ -3739,10 +3378,13 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.java") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/AllBoundsInWhen.java"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -3751,124 +3393,109 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestMetadata("ArrayType.java") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ArrayType.java"); } @TestMetadata("ConstructorWithNewTypeParams.java") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithNewTypeParams.java"); } @TestMetadata("ConstructorWithParentTypeParams.java") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithParentTypeParams.java"); } @TestMetadata("ConstructorWithSeveralParams.java") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithSeveralParams.java"); } @TestMetadata("ConstructorWithoutParams.java") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/ConstructorWithoutParams.java"); } @TestMetadata("CustomProjectionKind.java") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/CustomProjectionKind.java"); } @TestMetadata("MethodWithFunctionTypes.java") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithFunctionTypes.java"); } @TestMetadata("MethodWithGenerics.java") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithGenerics.java"); } @TestMetadata("MethodWithMappedClasses.java") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithMappedClasses.java"); } @TestMetadata("MethodWithTypeParameters.java") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithTypeParameters.java"); } @TestMetadata("MethodWithVararg.java") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/MethodWithVararg.java"); } @TestMetadata("PropertyArrayTypes.java") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyArrayTypes.java"); } @TestMetadata("PropertyComplexTypes.java") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertyComplexTypes.java"); } @TestMetadata("PropertySimpleType.java") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/PropertySimpleType.java"); } @TestMetadata("StarProjection.java") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/StarProjection.java"); } @TestMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInError() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/kotlinSignature/error"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("WrongProjectionKind.java") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongProjectionKind.java"); } @TestMetadata("WrongReturnTypeStructure.java") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongReturnTypeStructure.java"); } @TestMetadata("WrongTypeParameterBoundStructure1.java") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.java"); } @TestMetadata("WrongValueParameterStructure1.java") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/kotlinSignature/error/WrongValueParameterStructure1.java"); } } } @@ -3877,26 +3504,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/library"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterable.java"); } @TestMetadata("LoadIterator.java") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/LoadIterator.java"); } @TestMetadata("Max.java") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/library/Max.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/library/Max.java"); } } @@ -3904,14 +3532,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/modality"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.java") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.java"); } } @@ -3919,38 +3550,37 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mutability extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/mutability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.java") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterable.java"); } @TestMetadata("LoadIterableWithConflict.java") public void testLoadIterableWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithConflict.java"); } @TestMetadata("LoadIterableWithNullability.java") public void testLoadIterableWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithNullability.java"); } @TestMetadata("LoadIterableWithPropagation.java") public void testLoadIterableWithPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/LoadIterableWithPropagation.java"); } @TestMetadata("ReadOnlyExtendsWildcard.java") public void testReadOnlyExtendsWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/mutability/ReadOnlyExtendsWildcard.java"); } } @@ -3958,38 +3588,37 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/notNull"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.java") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullField.java"); } @TestMetadata("NotNullIntArray.java") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullIntArray.java"); } @TestMetadata("NotNullMethod.java") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullMethod.java"); } @TestMetadata("NotNullObjectArray.java") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullObjectArray.java"); } @TestMetadata("NotNullParameter.java") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/notNull/NotNullParameter.java"); } } @@ -3997,26 +3626,27 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedPackage extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedPackage"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ProtectedPackageConstructor.java") public void testProtectedPackageConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageConstructor.java"); } @TestMetadata("ProtectedPackageFun.java") public void testProtectedPackageFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageFun.java"); } @TestMetadata("ProtectedPackageProperty.java") public void testProtectedPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedPackage/ProtectedPackageProperty.java"); } } @@ -4024,14 +3654,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedStatic extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/protectedStatic"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorInProtectedStaticNestedClass.java") public void testConstructorInProtectedStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/protectedStatic/ConstructorInProtectedStaticNestedClass.java"); } } @@ -4039,14 +3672,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rendering extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRendering() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/rendering"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Rendering.java") public void testRendering() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/rendering/Rendering.java"); } } @@ -4054,14 +3690,17 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signatureAnnotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("StableName.java") public void testStableName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signatureAnnotations/StableName.java"); } } @@ -4069,62 +3708,57 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignaturePropagation extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSignaturePropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/signaturePropagation"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ArraysInSubtypes.java") public void testArraysInSubtypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ArraysInSubtypes.java"); } @TestMetadata("MethodTypeParameterErased.java") public void testMethodTypeParameterErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/MethodTypeParameterErased.java"); } @TestMetadata("RawSuperType.java") public void testRawSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperType.java"); } @TestMetadata("RawSuperTypeWithBound.java") public void testRawSuperTypeWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBound.java") public void testRawSuperTypeWithRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBound.java"); } @TestMetadata("RawSuperTypeWithRecursiveBoundMultipleParameters.java") public void testRawSuperTypeWithRecursiveBoundMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/RawSuperTypeWithRecursiveBoundMultipleParameters.java"); } @TestMetadata("ReturnInnerSubclassOfSupersInner.java") public void testReturnInnerSubclassOfSupersInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/ReturnInnerSubclassOfSupersInner.java"); } @TestMetadata("SubclassWithRawType.java") public void testSubclassWithRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/SubclassWithRawType.java"); } @TestMetadata("TwoSuperclassesInconsistentGenericTypes.java") public void testTwoSuperclassesInconsistentGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/signaturePropagation/TwoSuperclassesInconsistentGenericTypes.java"); } } @@ -4132,74 +3766,67 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Static extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/static"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("DeeplyInnerClass.java") public void testDeeplyInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyInnerClass.java"); } @TestMetadata("DeeplyNestedStatic.java") public void testDeeplyNestedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/DeeplyNestedStatic.java"); } @TestMetadata("Enum.java") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Enum.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Enum.java"); } @TestMetadata("InnerClass.java") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/InnerClass.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/Simple.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/Simple.java"); } @TestMetadata("StaticFinal.java") public void testStaticFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticFinal.java"); } @TestMetadata("StaticMembersFromParentClass.java") public void testStaticMembersFromParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClass.java"); } @TestMetadata("StaticMembersFromParentClassVisibility.java") public void testStaticMembersFromParentClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentClassVisibility.java"); } @TestMetadata("StaticMembersFromParentInterface.java") public void testStaticMembersFromParentInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersFromParentInterface.java"); } @TestMetadata("StaticMembersInEnum.java") public void testStaticMembersInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnum.java"); } @TestMetadata("StaticMembersInEnumFromParents.java") public void testStaticMembersInEnumFromParents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/static/StaticMembersInEnumFromParents.java"); } } @@ -4207,20 +3834,22 @@ public class JvmRuntimeDescriptorLoaderTestGenerated extends AbstractJvmRuntimeD @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractJvmRuntimeDescriptorLoaderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledJava/vararg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("VarargInt.java") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargInt.java"); } @TestMetadata("VarargString.java") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledJava/vararg/VarargString.java"); } } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/annotator/AndroidGutterIconTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/annotator/AndroidGutterIconTestGenerated.java index 210e6bbdc6a..472191be9af 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/annotator/AndroidGutterIconTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/annotator/AndroidGutterIconTestGenerated.java @@ -21,52 +21,106 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidGutterIconTestGenerated extends AbstractAndroidGutterIconTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGutterIcon() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/gutterIcon"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("color.kt") public void testColor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/gutterIcon/color.kt"); - doTest(fileName); + runTest("idea/testData/android/gutterIcon/color.kt"); } @TestMetadata("drawable.kt") public void testDrawable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/gutterIcon/drawable.kt"); - doTest(fileName); + runTest("idea/testData/android/gutterIcon/drawable.kt"); } @TestMetadata("mipmap.kt") public void testMipmap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/gutterIcon/mipmap.kt"); - doTest(fileName); + runTest("idea/testData/android/gutterIcon/mipmap.kt"); } @TestMetadata("relatedFiles.kt") public void testRelatedFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/gutterIcon/relatedFiles.kt"); - doTest(fileName); + runTest("idea/testData/android/gutterIcon/relatedFiles.kt"); } @TestMetadata("systemColor.kt") public void testSystemColor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/gutterIcon/systemColor.kt"); - doTest(fileName); + runTest("idea/testData/android/gutterIcon/systemColor.kt"); } @TestMetadata("systemDrawable.kt") public void testSystemDrawable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/gutterIcon/systemDrawable.kt"); - doTest(fileName); + runTest("idea/testData/android/gutterIcon/systemDrawable.kt"); } @TestMetadata("idea/testData/android/gutterIcon/res") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Res extends AbstractAndroidGutterIconTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/gutterIcon/res"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/android/gutterIcon/res/drawable") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Drawable extends AbstractAndroidGutterIconTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDrawable() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/gutterIcon/res/drawable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/android/gutterIcon/res/layout") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Layout extends AbstractAndroidGutterIconTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLayout() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/gutterIcon/res/layout"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/android/gutterIcon/res/mipmap-mdpi") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Mipmap_mdpi extends AbstractAndroidGutterIconTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMipmap_mdpi() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/gutterIcon/res/mipmap-mdpi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/android/gutterIcon/res/values") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Values extends AbstractAndroidGutterIconTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInValues() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/gutterIcon/res/values"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/configure/ConfigureProjectTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/configure/ConfigureProjectTestGenerated.java index ab0699a071e..c37bb08c66d 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/configure/ConfigureProjectTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/configure/ConfigureProjectTestGenerated.java @@ -23,136 +23,124 @@ public class ConfigureProjectTestGenerated extends AbstractConfigureProjectTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Android_gradle extends AbstractConfigureProjectTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestAndroidGradle, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAndroid_gradle() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/android-gradle"), Pattern.compile("(\\w+)_before\\.gradle$"), TargetBackend.ANY, true); } @TestMetadata("androidStudioDefault_before.gradle") public void testAndroidStudioDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/androidStudioDefault_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/androidStudioDefault_before.gradle"); } @TestMetadata("androidStudioDefaultShapshot_before.gradle") public void testAndroidStudioDefaultShapshot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/androidStudioDefaultShapshot_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/androidStudioDefaultShapshot_before.gradle"); } @TestMetadata("buildConfigs_before.gradle") public void testBuildConfigs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/buildConfigs_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/buildConfigs_before.gradle"); } @TestMetadata("emptyDependencyList_before.gradle") public void testEmptyDependencyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/emptyDependencyList_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/emptyDependencyList_before.gradle"); } @TestMetadata("emptyFile_before.gradle") public void testEmptyFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/emptyFile_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/emptyFile_before.gradle"); } @TestMetadata("helloWorld_before.gradle") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/helloWorld_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/helloWorld_before.gradle"); } @TestMetadata("libraryFile_before.gradle") public void testLibraryFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/libraryFile_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/libraryFile_before.gradle"); } @TestMetadata("missedApplyAndroidStatement_before.gradle") public void testMissedApplyAndroidStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/missedApplyAndroidStatement_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/missedApplyAndroidStatement_before.gradle"); } @TestMetadata("missedBuildscriptBlock_before.gradle") public void testMissedBuildscriptBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/missedBuildscriptBlock_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/missedBuildscriptBlock_before.gradle"); } @TestMetadata("missedRepositoriesInBuildscriptBlock_before.gradle") public void testMissedRepositoriesInBuildscriptBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/missedRepositoriesInBuildscriptBlock_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/missedRepositoriesInBuildscriptBlock_before.gradle"); } @TestMetadata("productFlavor_before.gradle") public void testProductFlavor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/productFlavor_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/productFlavor_before.gradle"); } @TestMetadata("idea/testData/configuration/android-gradle/gradleExamples") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GradleExamples extends AbstractConfigureProjectTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestAndroidGradle, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGradleExamples() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/android-gradle/gradleExamples"), Pattern.compile("(\\w+)_before\\.gradle$"), TargetBackend.ANY, true); } @TestMetadata("gradleExample0_before.gradle") public void testGradleExample0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample0_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample0_before.gradle"); } @TestMetadata("gradleExample18_before.gradle") public void testGradleExample18() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample18_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample18_before.gradle"); } @TestMetadata("gradleExample22_before.gradle") public void testGradleExample22() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample22_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample22_before.gradle"); } @TestMetadata("gradleExample44_before.gradle") public void testGradleExample44() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample44_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample44_before.gradle"); } @TestMetadata("gradleExample5_before.gradle") public void testGradleExample5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample5_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample5_before.gradle"); } @TestMetadata("gradleExample50_before.gradle") public void testGradleExample50() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample50_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample50_before.gradle"); } @TestMetadata("gradleExample58_before.gradle") public void testGradleExample58() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample58_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample58_before.gradle"); } @TestMetadata("gradleExample65_before.gradle") public void testGradleExample65() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample65_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample65_before.gradle"); } @TestMetadata("gradleExample8_before.gradle") public void testGradleExample8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gradle/gradleExamples/gradleExample8_before.gradle"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gradle/gradleExamples/gradleExample8_before.gradle"); } } } @@ -161,20 +149,22 @@ public class ConfigureProjectTestGenerated extends AbstractConfigureProjectTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Android_gsk extends AbstractConfigureProjectTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestAndroidGradle, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAndroid_gsk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/android-gsk"), Pattern.compile("(\\w+)_before\\.gradle.kts$"), TargetBackend.ANY, true); } @TestMetadata("emptyFile_before.gradle.kts") public void testEmptyFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gsk/emptyFile_before.gradle.kts"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gsk/emptyFile_before.gradle.kts"); } @TestMetadata("helloWorld_before.gradle.kts") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/android-gsk/helloWorld_before.gradle.kts"); - doTestAndroidGradle(fileName); + runTest("idea/testData/configuration/android-gsk/helloWorld_before.gradle.kts"); } } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/folding/AndroidResourceFoldingTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/folding/AndroidResourceFoldingTestGenerated.java index 278168c8557..f2f9b55d121 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/folding/AndroidResourceFoldingTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/folding/AndroidResourceFoldingTestGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidResourceFoldingTestGenerated extends AbstractAndroidResourceFoldingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFolding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/folding"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dimensions.kt") public void testDimensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/folding/dimensions.kt"); - doTest(fileName); + runTest("idea/testData/android/folding/dimensions.kt"); } @TestMetadata("getString.kt") public void testGetString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/folding/getString.kt"); - doTest(fileName); + runTest("idea/testData/android/folding/getString.kt"); } @TestMetadata("plurals.kt") public void testPlurals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/folding/plurals.kt"); - doTest(fileName); + runTest("idea/testData/android/folding/plurals.kt"); } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidIntentionTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidIntentionTestGenerated.java index 15085cfa94a..b7725dfa5a1 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidIntentionTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidIntentionTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/intention"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,10 +33,13 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddActivityToManifest extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/abstract.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/abstract.kt"); } public void testAllFilesPresentInAddActivityToManifest() throws Exception { @@ -41,56 +48,47 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestMetadata("alreadyExists.kt") public void testAlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/alreadyExists.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/alreadyExists.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/inner.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/inner.kt"); } @TestMetadata("insideBody.kt") public void testInsideBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/insideBody.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/insideBody.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/local.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/local.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/nested.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/nested.kt"); } @TestMetadata("notActivity.kt") public void testNotActivity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/notActivity.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/notActivity.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/private.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/private.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/protected.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/protected.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addActivityToManifest/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addActivityToManifest/simple.kt"); } } @@ -98,10 +96,13 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddBroadcastReceiverToManifest extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/abstract.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/abstract.kt"); } public void testAllFilesPresentInAddBroadcastReceiverToManifest() throws Exception { @@ -110,56 +111,47 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestMetadata("alreadyExists.kt") public void testAlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/alreadyExists.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/alreadyExists.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/inner.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/inner.kt"); } @TestMetadata("insideBody.kt") public void testInsideBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/insideBody.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/insideBody.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/local.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/local.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/nested.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/nested.kt"); } @TestMetadata("notReceiver.kt") public void testNotReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/notReceiver.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/notReceiver.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/private.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/private.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/protected.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/protected.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addBroadcastReceiverToManifest/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addBroadcastReceiverToManifest/simple.kt"); } } @@ -167,10 +159,13 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddServiceToManifest extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/abstract.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/abstract.kt"); } public void testAllFilesPresentInAddServiceToManifest() throws Exception { @@ -179,56 +174,47 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestMetadata("alreadyExists.kt") public void testAlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/alreadyExists.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/alreadyExists.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/inner.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/inner.kt"); } @TestMetadata("insideBody.kt") public void testInsideBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/insideBody.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/insideBody.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/local.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/local.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/nested.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/nested.kt"); } @TestMetadata("notService.kt") public void testNotService() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/notService.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/notService.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/private.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/private.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/protected.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/protected.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/addServiceToManifest/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/addServiceToManifest/simple.kt"); } } @@ -236,68 +222,62 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplementParcelable extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplementParcelable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/intention/implementParcelable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allNullableTypes.kt") public void testAllNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/allNullableTypes.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/allNullableTypes.kt"); } @TestMetadata("allTypes.kt") public void testAllTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/allTypes.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/allTypes.kt"); } @TestMetadata("alreadyImplemented.kt") public void testAlreadyImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/alreadyImplemented.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/alreadyImplemented.kt"); } @TestMetadata("constructorProperties.kt") public void testConstructorProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/constructorProperties.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/constructorProperties.kt"); } @TestMetadata("constructorPropertiesWithParameters.kt") public void testConstructorPropertiesWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/constructorPropertiesWithParameters.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/constructorPropertiesWithParameters.kt"); } @TestMetadata("missingConstructor.kt") public void testMissingConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/missingConstructor.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/missingConstructor.kt"); } @TestMetadata("missingDescribeContents.kt") public void testMissingDescribeContents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/missingDescribeContents.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/missingDescribeContents.kt"); } @TestMetadata("missingWriteToParcel.kt") public void testMissingWriteToParcel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/missingWriteToParcel.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/missingWriteToParcel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/simple.kt"); } @TestMetadata("withTransient.kt") public void testWithTransient() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/implementParcelable/withTransient.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/implementParcelable/withTransient.kt"); } } @@ -305,56 +285,52 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedoParcelable extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedoParcelable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/intention/redoParcelable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("indirectParcelable.kt") public void testIndirectParcelable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/indirectParcelable.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/indirectParcelable.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/init.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/init.kt"); } @TestMetadata("initWithExtraStatements.kt") public void testInitWithExtraStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/initWithExtraStatements.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/initWithExtraStatements.kt"); } @TestMetadata("noParcelable.kt") public void testNoParcelable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/noParcelable.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/noParcelable.kt"); } @TestMetadata("oldField.kt") public void testOldField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/oldField.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/oldField.kt"); } @TestMetadata("oldFieldSecondary.kt") public void testOldFieldSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/oldFieldSecondary.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/oldFieldSecondary.kt"); } @TestMetadata("parcelize.kt") public void testParcelize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/parcelize.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/parcelize.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/redoParcelable/simple.kt"); } } @@ -362,44 +338,42 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveParcelable extends AbstractAndroidIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveParcelable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/intention/removeParcelable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inderectParcelable.kt") public void testInderectParcelable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/inderectParcelable.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/removeParcelable/inderectParcelable.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/init.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/removeParcelable/init.kt"); } @TestMetadata("initWithExtraStatements.kt") public void testInitWithExtraStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/initWithExtraStatements.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/removeParcelable/initWithExtraStatements.kt"); } @TestMetadata("noParcelable.kt") public void testNoParcelable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/noParcelable.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/removeParcelable/noParcelable.kt"); } @TestMetadata("parcelize.kt") public void testParcelize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/parcelize.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/removeParcelable/parcelize.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/intention/removeParcelable/simple.kt"); } } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidResourceIntentionTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidResourceIntentionTestGenerated.java index f591cbb8cc3..89656281830 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidResourceIntentionTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/intention/AndroidResourceIntentionTestGenerated.java @@ -21,127 +21,111 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidResourceIntentionTestGenerated extends AbstractAndroidResourceIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResourceIntention() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/android/resourceIntention"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("createColorValueResource/alreadyExists/alreadyExists.test") public void testCreateColorValueResource_alreadyExists_AlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/createColorValueResource/alreadyExists/alreadyExists.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/createColorValueResource/alreadyExists/alreadyExists.test"); } @TestMetadata("createColorValueResource/simpleFunction/simpleFunction.test") public void testCreateColorValueResource_simpleFunction_SimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/createColorValueResource/simpleFunction/simpleFunction.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/createColorValueResource/simpleFunction/simpleFunction.test"); } @TestMetadata("createLayoutResourceFile/alreadyExists/alreadyExists.test") public void testCreateLayoutResourceFile_alreadyExists_AlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/createLayoutResourceFile/alreadyExists/alreadyExists.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/createLayoutResourceFile/alreadyExists/alreadyExists.test"); } @TestMetadata("createLayoutResourceFile/simpleFunction/simpleFunction.test") public void testCreateLayoutResourceFile_simpleFunction_SimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/createLayoutResourceFile/simpleFunction/simpleFunction.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/createLayoutResourceFile/simpleFunction/simpleFunction.test"); } @TestMetadata("createStringValueResource/alreadyExists/alreadyExists.test") public void testCreateStringValueResource_alreadyExists_AlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/createStringValueResource/alreadyExists/alreadyExists.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/createStringValueResource/alreadyExists/alreadyExists.test"); } @TestMetadata("createStringValueResource/simpleFunction/simpleFunction.test") public void testCreateStringValueResource_simpleFunction_SimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/createStringValueResource/simpleFunction/simpleFunction.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/createStringValueResource/simpleFunction/simpleFunction.test"); } @TestMetadata("kotlinAndroidAddStringResource/activityExtension/activityExtension.test") public void testKotlinAndroidAddStringResource_activityExtension_ActivityExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/activityExtension/activityExtension.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/activityExtension/activityExtension.test"); } @TestMetadata("kotlinAndroidAddStringResource/activityMethod/activityMethod.test") public void testKotlinAndroidAddStringResource_activityMethod_ActivityMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/activityMethod/activityMethod.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/activityMethod/activityMethod.test"); } @TestMetadata("kotlinAndroidAddStringResource/classInActivity/classInActivity.test") public void testKotlinAndroidAddStringResource_classInActivity_ClassInActivity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/classInActivity/classInActivity.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/classInActivity/classInActivity.test"); } @TestMetadata("kotlinAndroidAddStringResource/extensionLambda/extensionLambda.test") public void testKotlinAndroidAddStringResource_extensionLambda_ExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/extensionLambda/extensionLambda.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/extensionLambda/extensionLambda.test"); } @TestMetadata("kotlinAndroidAddStringResource/function/function.test") public void testKotlinAndroidAddStringResource_function_Function() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/function/function.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/function/function.test"); } @TestMetadata("kotlinAndroidAddStringResource/genericContextExtensionFunction/genericContextExtensionFunction.test") public void testKotlinAndroidAddStringResource_genericContextExtensionFunction_GenericContextExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/genericContextExtensionFunction/genericContextExtensionFunction.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/genericContextExtensionFunction/genericContextExtensionFunction.test"); } @TestMetadata("kotlinAndroidAddStringResource/innerClassInActivity/innerClassInActivity.test") public void testKotlinAndroidAddStringResource_innerClassInActivity_InnerClassInActivity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/innerClassInActivity/innerClassInActivity.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/innerClassInActivity/innerClassInActivity.test"); } @TestMetadata("kotlinAndroidAddStringResource/innerViewInActivity/innerViewInActivity.test") public void testKotlinAndroidAddStringResource_innerViewInActivity_InnerViewInActivity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/innerViewInActivity/innerViewInActivity.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/innerViewInActivity/innerViewInActivity.test"); } @TestMetadata("kotlinAndroidAddStringResource/objectInActivity/objectInActivity.test") public void testKotlinAndroidAddStringResource_objectInActivity_ObjectInActivity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/objectInActivity/objectInActivity.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/objectInActivity/objectInActivity.test"); } @TestMetadata("kotlinAndroidAddStringResource/objectInActivityMethod/objectInActivityMethod.test") public void testKotlinAndroidAddStringResource_objectInActivityMethod_ObjectInActivityMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/objectInActivityMethod/objectInActivityMethod.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/objectInActivityMethod/objectInActivityMethod.test"); } @TestMetadata("kotlinAndroidAddStringResource/objectInFunction/objectInFunction.test") public void testKotlinAndroidAddStringResource_objectInFunction_ObjectInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/objectInFunction/objectInFunction.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/objectInFunction/objectInFunction.test"); } @TestMetadata("kotlinAndroidAddStringResource/stringTemplate/stringTemplate.test") public void testKotlinAndroidAddStringResource_stringTemplate_StringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/stringTemplate/stringTemplate.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/stringTemplate/stringTemplate.test"); } @TestMetadata("kotlinAndroidAddStringResource/viewExtensionActivityMethod/viewExtensionActivityMethod.test") public void testKotlinAndroidAddStringResource_viewExtensionActivityMethod_ViewExtensionActivityMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/viewExtensionActivityMethod/viewExtensionActivityMethod.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/viewExtensionActivityMethod/viewExtensionActivityMethod.test"); } @TestMetadata("kotlinAndroidAddStringResource/viewMethod/viewMethod.test") public void testKotlinAndroidAddStringResource_viewMethod_ViewMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/viewMethod/viewMethod.test"); - doTest(fileName); + runTest("idea/testData/android/resourceIntention/kotlinAndroidAddStringResource/viewMethod/viewMethod.test"); } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/lint/KotlinLintTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/lint/KotlinLintTestGenerated.java index 1f30788eb80..3b34672d2c6 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/lint/KotlinLintTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/lint/KotlinLintTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinLintTestGenerated extends AbstractKotlinLintTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("alarm.kt") public void testAlarm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/alarm.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/alarm.kt"); } public void testAllFilesPresentInLint() throws Exception { @@ -33,163 +36,136 @@ public class KotlinLintTestGenerated extends AbstractKotlinLintTest { @TestMetadata("apiCheck.kt") public void testApiCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/apiCheck.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/apiCheck.kt"); } @TestMetadata("callSuper.kt") public void testCallSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/callSuper.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/callSuper.kt"); } @TestMetadata("closeCursor.kt") public void testCloseCursor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/closeCursor.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/closeCursor.kt"); } @TestMetadata("commitFragment.kt") public void testCommitFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/commitFragment.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/commitFragment.kt"); } @TestMetadata("findViewById.kt") public void testFindViewById() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/findViewById.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/findViewById.kt"); } @TestMetadata("javaPerformance.kt") public void testJavaPerformance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/javaPerformance.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/javaPerformance.kt"); } @TestMetadata("javaScriptInterface.kt") public void testJavaScriptInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/javaScriptInterface.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/javaScriptInterface.kt"); } @TestMetadata("layoutInflation.kt") public void testLayoutInflation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/layoutInflation.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/layoutInflation.kt"); } @TestMetadata("log.kt") public void testLog() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/log.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/log.kt"); } @TestMetadata("noInternationalSms.kt") public void testNoInternationalSms() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/noInternationalSms.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/noInternationalSms.kt"); } @TestMetadata("overrideConcrete.kt") public void testOverrideConcrete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/overrideConcrete.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/overrideConcrete.kt"); } @TestMetadata("parcel.kt") public void testParcel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/parcel.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/parcel.kt"); } @TestMetadata("sdCardTest.kt") public void testSdCardTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/sdCardTest.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/sdCardTest.kt"); } @TestMetadata("setJavaScriptEnabled.kt") public void testSetJavaScriptEnabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/setJavaScriptEnabled.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/setJavaScriptEnabled.kt"); } @TestMetadata("sharedPrefs.kt") public void testSharedPrefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/sharedPrefs.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/sharedPrefs.kt"); } @TestMetadata("showDiagnosticsWhenFileIsRed.kt") public void testShowDiagnosticsWhenFileIsRed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/showDiagnosticsWhenFileIsRed.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/showDiagnosticsWhenFileIsRed.kt"); } @TestMetadata("sqlite.kt") public void testSqlite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/sqlite.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/sqlite.kt"); } @TestMetadata("supportAnnotation.kt") public void testSupportAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/supportAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/supportAnnotation.kt"); } @TestMetadata("systemServices.kt") public void testSystemServices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/systemServices.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/systemServices.kt"); } @TestMetadata("toast.kt") public void testToast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/toast.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/toast.kt"); } @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/valueOf.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/valueOf.kt"); } @TestMetadata("velocityTrackerRecycle.kt") public void testVelocityTrackerRecycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/velocityTrackerRecycle.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/velocityTrackerRecycle.kt"); } @TestMetadata("viewConstructor.kt") public void testViewConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/viewConstructor.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/viewConstructor.kt"); } @TestMetadata("viewHolder.kt") public void testViewHolder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/viewHolder.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/viewHolder.kt"); } @TestMetadata("wrongAnnotation.kt") public void testWrongAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/wrongAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/wrongAnnotation.kt"); } @TestMetadata("wrongImport.kt") public void testWrongImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/wrongImport.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/wrongImport.kt"); } @TestMetadata("wrongViewCall.kt") public void testWrongViewCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lint/wrongViewCall.kt"); - doTest(fileName); + runTest("idea/testData/android/lint/wrongViewCall.kt"); } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java index eacd5f0237c..90c52675aa5 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLintQuickfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,20 +33,22 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindViewById extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindViewById() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/findViewById"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/findViewById/nullableType.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/findViewById/nullableType.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/findViewById/simple.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/findViewById/simple.kt"); } } @@ -50,20 +56,22 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parcelable extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParcelable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/parcelable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("missingCreator.kt") public void testMissingCreator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/parcelable/missingCreator.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/parcelable/missingCreator.kt"); } @TestMetadata("noImplementation.kt") public void testNoImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/parcelable/noImplementation.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/parcelable/noImplementation.kt"); } } @@ -71,68 +79,62 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RequiresApi extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRequiresApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/requiresApi"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/annotation.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/annotation.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/companion.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/companion.kt"); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/defaultParameter.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/defaultParameter.kt"); } @TestMetadata("extend.kt") public void testExtend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/extend.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/extend.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/functionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/functionLiteral.kt"); } @TestMetadata("inlinedConstant.kt") public void testInlinedConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/inlinedConstant.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/inlinedConstant.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/method.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/method.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/property.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/property.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/topLevelProperty.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/topLevelProperty.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/requiresApi/when.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/requiresApi/when.kt"); } } @@ -140,16 +142,18 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuppressLint extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("activityMethod.kt") public void testActivityMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/activityMethod.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/activityMethod.kt"); } @TestMetadata("addToExistingAnnotation.kt") public void testAddToExistingAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/addToExistingAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/addToExistingAnnotation.kt"); } public void testAllFilesPresentInSuppressLint() throws Exception { @@ -158,44 +162,37 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestMetadata("constructorParameter.kt") public void testConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/constructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/constructorParameter.kt"); } @TestMetadata("destructuringDeclaration.kt") public void testDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/destructuringDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/destructuringDeclaration.kt"); } @TestMetadata("lambdaArgument.kt") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/lambdaArgument.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/lambdaArgument.kt"); } @TestMetadata("lambdaArgumentProperty.kt") public void testLambdaArgumentProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/lambdaArgumentProperty.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/lambdaArgumentProperty.kt"); } @TestMetadata("methodParameter.kt") public void testMethodParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/methodParameter.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/methodParameter.kt"); } @TestMetadata("propertyWithLambda.kt") public void testPropertyWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/propertyWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/propertyWithLambda.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/suppressLint/simpleProperty.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/suppressLint/simpleProperty.kt"); } } @@ -203,68 +200,62 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TargetApi extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargetApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/targetApi"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/annotation.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/annotation.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/companion.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/companion.kt"); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/defaultParameter.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/defaultParameter.kt"); } @TestMetadata("extend.kt") public void testExtend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/extend.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/extend.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/functionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/functionLiteral.kt"); } @TestMetadata("inlinedConstant.kt") public void testInlinedConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/inlinedConstant.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/inlinedConstant.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/method.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/method.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/property.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/property.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/topLevelProperty.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/topLevelProperty.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetApi/when.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetApi/when.kt"); } } @@ -272,74 +263,67 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TargetVersionCheck extends AbstractAndroidLintQuickfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTargetVersionCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/targetVersionCheck"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/annotation.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/annotation.kt"); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/defaultParameter.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/defaultParameter.kt"); } @TestMetadata("destructuringDeclaration.kt") public void testDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/destructuringDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/destructuringDeclaration.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/expressionBody.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/expressionBody.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/functionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/functionLiteral.kt"); } @TestMetadata("getterWIthExpressionBody.kt") public void testGetterWIthExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/getterWIthExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/getterWIthExpressionBody.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/if.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/if.kt"); } @TestMetadata("ifWithBlock.kt") public void testIfWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/ifWithBlock.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/ifWithBlock.kt"); } @TestMetadata("inlinedConstant.kt") public void testInlinedConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/inlinedConstant.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/inlinedConstant.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/method.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/method.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/lintQuickfix/targetVersionCheck/when.kt"); - doTest(fileName); + runTest("idea/testData/android/lintQuickfix/targetVersionCheck/when.kt"); } } } diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidQuickFixMultiFileTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidQuickFixMultiFileTestGenerated.java index ce62980d74e..a936e5c0880 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidQuickFixMultiFileTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidQuickFixMultiFileTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidQuickFixMultiFileTestGenerated extends AbstractAndroidQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQuickfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/quickfix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -29,14 +33,17 @@ public class AndroidQuickFixMultiFileTestGenerated extends AbstractAndroidQuickF @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AutoImports extends AbstractAndroidQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAutoImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/quickfix/autoImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("androidRImport.before.Main.kt") public void testAndroidRImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/quickfix/autoImports/androidRImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/android/quickfix/autoImports/androidRImport.before.Main.kt"); } } @@ -44,20 +51,22 @@ public class AndroidQuickFixMultiFileTestGenerated extends AbstractAndroidQuickF @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ViewConstructor extends AbstractAndroidQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInViewConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/quickfix/viewConstructor"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("indirect.before.Main.kt") public void testIndirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/quickfix/viewConstructor/indirect.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/android/quickfix/viewConstructor/indirect.before.Main.kt"); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/quickfix/viewConstructor/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/android/quickfix/viewConstructor/simple.before.Main.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompiledKotlinInJavaCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompiledKotlinInJavaCompletionTestGenerated.java index dcaee2c2ab8..b507a4bc5b2 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompiledKotlinInJavaCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompiledKotlinInJavaCompletionTestGenerated.java @@ -21,181 +21,156 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompiledKotlinInJavaCompletionTestGenerated extends AbstractCompiledKotlinInJavaCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInjava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/injava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, false); } @TestMetadata("AnnotationParameter.java") public void testAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/AnnotationParameter.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/AnnotationParameter.java"); } @TestMetadata("Class.java") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/Class.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/Class.java"); } @TestMetadata("ClassMembers.java") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassMembers.java"); } @TestMetadata("ClassObject.java") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassObject.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassObject.java"); } @TestMetadata("ClassObjectField.java") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassObjectField.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassObjectField.java"); } @TestMetadata("ClassesFromNamespace.java") public void testClassesFromNamespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassesFromNamespace.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassesFromNamespace.java"); } @TestMetadata("EnumConstants.java") public void testEnumConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/EnumConstants.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/EnumConstants.java"); } @TestMetadata("InterfaceDefaultImpl.java") public void testInterfaceDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImpl.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImpl.java"); } @TestMetadata("InterfaceDefaultImplImportedMembers.java") public void testInterfaceDefaultImplImportedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplImportedMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplImportedMembers.java"); } @TestMetadata("InterfaceDefaultImplMembers.java") public void testInterfaceDefaultImplMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplMembers.java"); } @TestMetadata("InterfaceDefaultImplStaticImportedMembers.java") public void testInterfaceDefaultImplStaticImportedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplStaticImportedMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplStaticImportedMembers.java"); } @TestMetadata("InterfaceDefaultImplsNonImported.java") public void testInterfaceDefaultImplsNonImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplsNonImported.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplsNonImported.java"); } @TestMetadata("MultiFileFacade.java") public void testMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/MultiFileFacade.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/MultiFileFacade.java"); } @TestMetadata("MultiFileFacadeMembers.java") public void testMultiFileFacadeMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/MultiFileFacadeMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/MultiFileFacadeMembers.java"); } @TestMetadata("MultiFileFacadeNoImport.java") public void testMultiFileFacadeNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/MultiFileFacadeNoImport.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/MultiFileFacadeNoImport.java"); } @TestMetadata("Nested.java") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/Nested.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/Nested.java"); } @TestMetadata("NestedClassMembers.java") public void testNestedClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedClassMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedClassMembers.java"); } @TestMetadata("NestedClassMembers2.java") public void testNestedClassMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedClassMembers2.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedClassMembers2.java"); } @TestMetadata("NestedNoImport.java") public void testNestedNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedNoImport.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedNoImport.java"); } @TestMetadata("NestedObjectInstance.java") public void testNestedObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedObjectInstance.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedObjectInstance.java"); } @TestMetadata("ObjectInClassObjects.java") public void testObjectInClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ObjectInClassObjects.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ObjectInClassObjects.java"); } @TestMetadata("ObjectInstance.java") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ObjectInstance.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ObjectInstance.java"); } @TestMetadata("RenamedFacade.java") public void testRenamedFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/RenamedFacade.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/RenamedFacade.java"); } @TestMetadata("SingleFileFacade.java") public void testSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/SingleFileFacade.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/SingleFileFacade.java"); } @TestMetadata("SingleFileFacadeMembers.java") public void testSingleFileFacadeMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/SingleFileFacadeMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/SingleFileFacadeMembers.java"); } @TestMetadata("SingleFileFacadeNoImport.java") public void testSingleFileFacadeNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/SingleFileFacadeNoImport.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/SingleFileFacadeNoImport.java"); } @TestMetadata("Subpackage.java") public void testSubpackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/Subpackage.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/Subpackage.java"); } @TestMetadata("TopLevelMembers.java") public void testTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/TopLevelMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/TopLevelMembers.java"); } @TestMetadata("TraitMember.java") public void testTraitMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/TraitMember.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/TraitMember.java"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompletionIncrementalResolveTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompletionIncrementalResolveTestGenerated.java index a1885e74eb3..33ade296a0a 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompletionIncrementalResolveTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/CompletionIncrementalResolveTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompletionIncrementalResolveTestGenerated extends AbstractCompletionIncrementalResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIncrementalResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/incrementalResolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("codeAboveChanged.kt") public void testCodeAboveChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/codeAboveChanged.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/codeAboveChanged.kt"); } @TestMetadata("codeAboveChanged2.kt") public void testCodeAboveChanged2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/codeAboveChanged2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/codeAboveChanged2.kt"); } @TestMetadata("dataFlowInfoFromPrevStatement.kt") public void testDataFlowInfoFromPrevStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/dataFlowInfoFromPrevStatement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/dataFlowInfoFromPrevStatement.kt"); } @TestMetadata("dataFlowInfoFromSameStatement.kt") public void testDataFlowInfoFromSameStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/dataFlowInfoFromSameStatement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/dataFlowInfoFromSameStatement.kt"); } @TestMetadata("doNotAnalyzeComplexStatement.kt") public void testDoNotAnalyzeComplexStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/doNotAnalyzeComplexStatement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/doNotAnalyzeComplexStatement.kt"); } @TestMetadata("noDataFlowFromOldStatement.kt") public void testNoDataFlowFromOldStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/noDataFlowFromOldStatement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/noDataFlowFromOldStatement.kt"); } @TestMetadata("noPrevStatement.kt") public void testNoPrevStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/noPrevStatement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/noPrevStatement.kt"); } @TestMetadata("outOfBlockModification.kt") public void testOutOfBlockModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/outOfBlockModification.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/outOfBlockModification.kt"); } @TestMetadata("prevStatementNotResolved.kt") public void testPrevStatementNotResolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/prevStatementNotResolved.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/prevStatementNotResolved.kt"); } @TestMetadata("sameStatement.kt") public void testSameStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/incrementalResolve/sameStatement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/incrementalResolve/sameStatement.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java index 9d85550771d..8c217f6e31d 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JSBasicCompletionTestGenerated.java @@ -23,16 +23,18 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterFloatOnNewLine.kt") public void testAfterFloatOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/AfterFloatOnNewLine.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/AfterFloatOnNewLine.kt"); } @TestMetadata("AfterIntSeparatedWithComments.kt") public void testAfterIntSeparatedWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/AfterIntSeparatedWithComments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/AfterIntSeparatedWithComments.kt"); } public void testAllFilesPresentInCommon() throws Exception { @@ -41,822 +43,690 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("BasicAny.kt") public void testBasicAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/BasicAny.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/BasicAny.kt"); } @TestMetadata("BasicInt.kt") public void testBasicInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/BasicInt.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/BasicInt.kt"); } @TestMetadata("BeforeDotInCall.kt") public void testBeforeDotInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/BeforeDotInCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/BeforeDotInCall.kt"); } @TestMetadata("CallLocalLambda.kt") public void testCallLocalLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/CallLocalLambda.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/CallLocalLambda.kt"); } @TestMetadata("classObjectElementsInClass.kt") public void testClassObjectElementsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/classObjectElementsInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/classObjectElementsInClass.kt"); } @TestMetadata("ClassRedeclaration1.kt") public void testClassRedeclaration1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ClassRedeclaration1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ClassRedeclaration1.kt"); } @TestMetadata("ClassRedeclaration2.kt") public void testClassRedeclaration2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ClassRedeclaration2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ClassRedeclaration2.kt"); } @TestMetadata("CompletionInSetter.kt") public void testCompletionInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/CompletionInSetter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/CompletionInSetter.kt"); } @TestMetadata("ComponentFunction.kt") public void testComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ComponentFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ComponentFunction.kt"); } @TestMetadata("CoroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/CoroutineContext.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/CoroutineContext.kt"); } @TestMetadata("DataClassMembers.kt") public void testDataClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/DataClassMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/DataClassMembers.kt"); } @TestMetadata("DataClassMembers2.kt") public void testDataClassMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/DataClassMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/DataClassMembers2.kt"); } @TestMetadata("ExtendClassName.kt") public void testExtendClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtendClassName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtendClassName.kt"); } @TestMetadata("ExtendQualifiedClassName.kt") public void testExtendQualifiedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtendQualifiedClassName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtendQualifiedClassName.kt"); } @TestMetadata("ExtensionForProperty.kt") public void testExtensionForProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionForProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionForProperty.kt"); } @TestMetadata("ExtensionFunReceiver.kt") public void testExtensionFunReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionFunReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionFunReceiver.kt"); } @TestMetadata("ExtensionFunReceiverForce.kt") public void testExtensionFunReceiverForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionFunReceiverForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionFunReceiverForce.kt"); } @TestMetadata("ExtensionFunctionInClassObject.kt") public void testExtensionFunctionInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionFunctionInClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionFunctionInClassObject.kt"); } @TestMetadata("ExtensionInsideFunction.kt") public void testExtensionInsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionInsideFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionInsideFunction.kt"); } @TestMetadata("ExtensionOnTypeAliasFromOtherTypeAlias.kt") public void testExtensionOnTypeAliasFromOtherTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionOnTypeAliasFromOtherTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionOnTypeAliasFromOtherTypeAlias.kt"); } @TestMetadata("ExtensionToIntInFloatStyle.kt") public void testExtensionToIntInFloatStyle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionToIntInFloatStyle.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionToIntInFloatStyle.kt"); } @TestMetadata("ExtensionWithAdditionalTypeParameters.kt") public void testExtensionWithAdditionalTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithAdditionalTypeParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithAdditionalTypeParameters.kt"); } @TestMetadata("ExtensionWithGenericParamInReceiver.kt") public void testExtensionWithGenericParamInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithGenericParamInReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithGenericParamInReceiver.kt"); } @TestMetadata("ExtensionWithGenericReceiver.kt") public void testExtensionWithGenericReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithGenericReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithGenericReceiver.kt"); } @TestMetadata("ExtensionWithInternalGenericParameters.kt") public void testExtensionWithInternalGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithInternalGenericParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithInternalGenericParameters.kt"); } @TestMetadata("ExtensionWithManyTypeParamsInReceiver.kt") public void testExtensionWithManyTypeParamsInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithManyTypeParamsInReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithManyTypeParamsInReceiver.kt"); } @TestMetadata("FromImports.kt") public void testFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/FromImports.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/FromImports.kt"); } @TestMetadata("FunctionCompletionFormatting.kt") public void testFunctionCompletionFormatting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/FunctionCompletionFormatting.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/FunctionCompletionFormatting.kt"); } @TestMetadata("FunctionVariableCallArgument.kt") public void testFunctionVariableCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/FunctionVariableCallArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/FunctionVariableCallArgument.kt"); } @TestMetadata("GenericExtensionFunReceiver1.kt") public void testGenericExtensionFunReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver1.kt"); } @TestMetadata("GenericExtensionFunReceiver2.kt") public void testGenericExtensionFunReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver2.kt"); } @TestMetadata("GenericKotlinClass.kt") public void testGenericKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GenericKotlinClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GenericKotlinClass.kt"); } @TestMetadata("GetPrefixForProperties.kt") public void testGetPrefixForProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GetPrefixForProperties.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GetPrefixForProperties.kt"); } @TestMetadata("ImportedEnumMembers.kt") public void testImportedEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ImportedEnumMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ImportedEnumMembers.kt"); } @TestMetadata("ImportedMemberFromObject.kt") public void testImportedMemberFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ImportedMemberFromObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ImportedMemberFromObject.kt"); } @TestMetadata("InCallExpression.kt") public void testInCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InCallExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InCallExpression.kt"); } @TestMetadata("InClassInitializer.kt") public void testInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InClassInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InClassInitializer.kt"); } @TestMetadata("InClassObject.kt") public void testInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InClassObject.kt"); } @TestMetadata("InClassPropertyAccessor.kt") public void testInClassPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InClassPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InClassPropertyAccessor.kt"); } @TestMetadata("InEmptyImport.kt") public void testInEmptyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InEmptyImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InEmptyImport.kt"); } @TestMetadata("InEmptyPackage.kt") public void testInEmptyPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InEmptyPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InEmptyPackage.kt"); } @TestMetadata("InExpressionNoPrefix.kt") public void testInExpressionNoPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt"); } @TestMetadata("InExtendTypeAnnotation.kt") public void testInExtendTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt"); } @TestMetadata("InFileWithMultiDeclaration.kt") public void testInFileWithMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFileWithMultiDeclaration.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFileWithMultiDeclaration.kt"); } @TestMetadata("InFileWithTypedef.kt") public void testInFileWithTypedef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFileWithTypedef.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFileWithTypedef.kt"); } @TestMetadata("InFunInClassInitializer.kt") public void testInFunInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt"); } @TestMetadata("InFunctionArguments.kt") public void testInFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFunctionArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFunctionArguments.kt"); } @TestMetadata("InGlobalPropertyInitializer.kt") public void testInGlobalPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InGlobalPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InGlobalPropertyInitializer.kt"); } @TestMetadata("InImport.kt") public void testInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InImport.kt"); } @TestMetadata("InInitializerInPropertyAccessor.kt") public void testInInitializerInPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt"); } @TestMetadata("InInnerClass.kt") public void testInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InInnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InInnerClass.kt"); } @TestMetadata("InLambda.kt") public void testInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InLambda.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InLambda.kt"); } @TestMetadata("InLocalObjectDeclaration.kt") public void testInLocalObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InLocalObjectDeclaration.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InLocalObjectDeclaration.kt"); } @TestMetadata("InLongDotQualifiedExpression.kt") public void testInLongDotQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InLongDotQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InLongDotQualifiedExpression.kt"); } @TestMetadata("InMiddleOfPackage.kt") public void testInMiddleOfPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InMiddleOfPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InMiddleOfPackage.kt"); } @TestMetadata("InMiddleOfPackageDirective.kt") public void testInMiddleOfPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InMiddleOfPackageDirective.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InMiddleOfPackageDirective.kt"); } @TestMetadata("InNestedClass.kt") public void testInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InNestedClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InNestedClass.kt"); } @TestMetadata("InObjectInDelegationSpecifier.kt") public void testInObjectInDelegationSpecifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InObjectInDelegationSpecifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InObjectInDelegationSpecifier.kt"); } @TestMetadata("InPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InPackage.kt"); } @TestMetadata("InParametersTypes.kt") public void testInParametersTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InParametersTypes.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InParametersTypes.kt"); } @TestMetadata("InParametersTypesForce.kt") public void testInParametersTypesForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InParametersTypesForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InParametersTypesForce.kt"); } @TestMetadata("InPropertyAccessor.kt") public void testInPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InPropertyAccessor.kt"); } @TestMetadata("InPropertyInitializer.kt") public void testInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InPropertyInitializer.kt"); } @TestMetadata("InSecondaryConstructorBody.kt") public void testInSecondaryConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorBody.kt"); } @TestMetadata("InSecondaryConstructorDefaultParameter.kt") public void testInSecondaryConstructorDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorDefaultParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorDefaultParameter.kt"); } @TestMetadata("InSecondaryConstructorDelegationCall.kt") public void testInSecondaryConstructorDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorDelegationCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorDelegationCall.kt"); } @TestMetadata("InSecondaryConstructorFirstDefaultParameter.kt") public void testInSecondaryConstructorFirstDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorFirstDefaultParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorFirstDefaultParameter.kt"); } @TestMetadata("InTypeAnnotation.kt") public void testInTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InTypeAnnotation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InTypeAnnotation.kt"); } @TestMetadata("InfixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InfixCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InfixCall.kt"); } @TestMetadata("InfixCallNoSpecialLambdaArgumentItem.kt") public void testInfixCallNoSpecialLambdaArgumentItem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InfixCallNoSpecialLambdaArgumentItem.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InfixCallNoSpecialLambdaArgumentItem.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InnerClass.kt"); } @TestMetadata("InnerInBaseClass.kt") public void testInnerInBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InnerInBaseClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InnerInBaseClass.kt"); } @TestMetadata("InsideAnonymousClass.kt") public void testInsideAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InsideAnonymousClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InsideAnonymousClass.kt"); } @TestMetadata("InterfaceNameBeforeRunBug.kt") public void testInterfaceNameBeforeRunBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InterfaceNameBeforeRunBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InterfaceNameBeforeRunBug.kt"); } @TestMetadata("KT10664.kt") public void testKT10664() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT10664.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT10664.kt"); } @TestMetadata("KT12033.kt") public void testKT12033() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT12033.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT12033.kt"); } @TestMetadata("KT13780.kt") public void testKT13780() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT13780.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT13780.kt"); } @TestMetadata("KT13780_1.kt") public void testKT13780_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT13780_1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT13780_1.kt"); } @TestMetadata("LocalMultideclarationValues.kt") public void testLocalMultideclarationValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/LocalMultideclarationValues.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/LocalMultideclarationValues.kt"); } @TestMetadata("NameWithDollars.kt") public void testNameWithDollars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NameWithDollars.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NameWithDollars.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NamedObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NamedObject.kt"); } @TestMetadata("NestedBuiltInClass.kt") public void testNestedBuiltInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedBuiltInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedBuiltInClass.kt"); } @TestMetadata("NestedClassBug.kt") public void testNestedClassBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassBug.kt"); } @TestMetadata("NestedClassNameForExtension.kt") public void testNestedClassNameForExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassNameForExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassNameForExtension.kt"); } @TestMetadata("NestedClassNameForExtension2.kt") public void testNestedClassNameForExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassNameForExtension2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassNameForExtension2.kt"); } @TestMetadata("NestedClassesOnClassWithDefaultObject.kt") public void testNestedClassesOnClassWithDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithDefaultObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithDefaultObject.kt"); } @TestMetadata("NestedClassesOnClassWithNamedDefaultObject.kt") public void testNestedClassesOnClassWithNamedDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt"); } @TestMetadata("NestedClassesOnDefaultObjectLiteral.kt") public void testNestedClassesOnDefaultObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassesOnDefaultObjectLiteral.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassesOnDefaultObjectLiteral.kt"); } @TestMetadata("NoAutoInsertionOfNotImported.kt") public void testNoAutoInsertionOfNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoAutoInsertionOfNotImported.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoAutoInsertionOfNotImported.kt"); } @TestMetadata("NoClassNameDuplication.kt") public void testNoClassNameDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoClassNameDuplication.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoClassNameDuplication.kt"); } @TestMetadata("NoCompletionForCoroutinesIntinsics.kt") public void testNoCompletionForCoroutinesIntinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesIntinsics.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesIntinsics.kt"); } @TestMetadata("NoCompletionForCoroutinesJvmInternal.kt") public void testNoCompletionForCoroutinesJvmInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesJvmInternal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesJvmInternal.kt"); } @TestMetadata("NoCompletionForExcluded.kt") public void testNoCompletionForExcluded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoCompletionForExcluded.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoCompletionForExcluded.kt"); } @TestMetadata("NoEmptyPackage.kt") public void testNoEmptyPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoEmptyPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoEmptyPackage.kt"); } @TestMetadata("NoEnumEntryType.kt") public void testNoEnumEntryType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoEnumEntryType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoEnumEntryType.kt"); } @TestMetadata("NoEnumMembersFromImplicitQualifier.kt") public void testNoEnumMembersFromImplicitQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoEnumMembersFromImplicitQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoEnumMembersFromImplicitQualifier.kt"); } @TestMetadata("NoExtensionsAfterQualifier.kt") public void testNoExtensionsAfterQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoExtensionsAfterQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoExtensionsAfterQualifier.kt"); } @TestMetadata("NoLocalsDeclaredAhead.kt") public void testNoLocalsDeclaredAhead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoLocalsDeclaredAhead.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoLocalsDeclaredAhead.kt"); } @TestMetadata("NoNestedClassAfterReceiver.kt") public void testNoNestedClassAfterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoNestedClassAfterReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoNestedClassAfterReceiver.kt"); } @TestMetadata("NoNestedClassesFromImplicitQualifier.kt") public void testNoNestedClassesFromImplicitQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoNestedClassesFromImplicitQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoNestedClassesFromImplicitQualifier.kt"); } @TestMetadata("NoPackageFacadeClasses.kt") public void testNoPackageFacadeClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoPackageFacadeClasses.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoPackageFacadeClasses.kt"); } @TestMetadata("NoParameterAnnotationInPresentation.kt") public void testNoParameterAnnotationInPresentation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoParameterAnnotationInPresentation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoParameterAnnotationInPresentation.kt"); } @TestMetadata("NoTopLevelCompletionInQualifiedUserTypes.kt") public void testNoTopLevelCompletionInQualifiedUserTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoTopLevelCompletionInQualifiedUserTypes.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoTopLevelCompletionInQualifiedUserTypes.kt"); } @TestMetadata("ObjectInTypePosition.kt") public void testObjectInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectInTypePosition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectInTypePosition.kt"); } @TestMetadata("ObjectMembersFromNested.kt") public void testObjectMembersFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectMembersFromNested.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectMembersFromNested.kt"); } @TestMetadata("ObjectRedeclaration1.kt") public void testObjectRedeclaration1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectRedeclaration1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectRedeclaration1.kt"); } @TestMetadata("ObjectRedeclaration2.kt") public void testObjectRedeclaration2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectRedeclaration2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectRedeclaration2.kt"); } @TestMetadata("OverloadFunctions.kt") public void testOverloadFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/OverloadFunctions.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/OverloadFunctions.kt"); } @TestMetadata("PreferLessParameters.kt") public void testPreferLessParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/PreferLessParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/PreferLessParameters.kt"); } @TestMetadata("PrivatesInSecondPressCompletion.kt") public void testPrivatesInSecondPressCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/PrivatesInSecondPressCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/PrivatesInSecondPressCompletion.kt"); } @TestMetadata("ProtectedExtensionMethod.kt") public void testProtectedExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ProtectedExtensionMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ProtectedExtensionMethod.kt"); } @TestMetadata("QualifiedSuperMembers.kt") public void testQualifiedSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/QualifiedSuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/QualifiedSuperMembers.kt"); } @TestMetadata("RecieverMembersFromExtAccessor.kt") public void testRecieverMembersFromExtAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/RecieverMembersFromExtAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtAccessor.kt"); } @TestMetadata("RecieverMembersFromExtFun.kt") public void testRecieverMembersFromExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt"); } @TestMetadata("SetPrefixForProperties.kt") public void testSetPrefixForProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt"); } @TestMetadata("ShortClassNamesInTypePosition.kt") public void testShortClassNamesInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ShortClassNamesInTypePosition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ShortClassNamesInTypePosition.kt"); } @TestMetadata("StandardJetArrayFirst.kt") public void testStandardJetArrayFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/StandardJetArrayFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/StandardJetArrayFirst.kt"); } @TestMetadata("StandardJetDoubleFirst.kt") public void testStandardJetDoubleFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/StandardJetDoubleFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/StandardJetDoubleFirst.kt"); } @TestMetadata("SubpackageInFun.kt") public void testSubpackageInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SubpackageInFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SubpackageInFun.kt"); } @TestMetadata("SuperMembers.kt") public void testSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers.kt"); } @TestMetadata("SuperMembers2.kt") public void testSuperMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers2.kt"); } @TestMetadata("SuperMembers3.kt") public void testSuperMembers3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers3.kt"); } @TestMetadata("SuperMembers4.kt") public void testSuperMembers4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers4.kt"); } @TestMetadata("TopLevelClassCompletionInQualifiedCall.kt") public void testTopLevelClassCompletionInQualifiedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassCompletionInQualifiedCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassCompletionInQualifiedCall.kt"); } @TestMetadata("TopLevelClassName1.kt") public void testTopLevelClassName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName1.kt"); } @TestMetadata("topLevelClassName2.kt") public void testTopLevelClassName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/topLevelClassName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/topLevelClassName2.kt"); } @TestMetadata("TopLevelClassName4.kt") public void testTopLevelClassName4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName4.kt"); } @TestMetadata("TopLevelClassName5.kt") public void testTopLevelClassName5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName5.kt"); } @TestMetadata("TopLevelClassName6.kt") public void testTopLevelClassName6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName6.kt"); } @TestMetadata("TopLevelClassName-3.kt") public void testTopLevelClassName_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName-3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName-3.kt"); } @TestMetadata("TypeArgCompletionBug.kt") public void testTypeArgCompletionBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeArgCompletionBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeArgCompletionBug.kt"); } @TestMetadata("TypeArgFromTheSameFile.kt") public void testTypeArgFromTheSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeArgFromTheSameFile.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeArgFromTheSameFile.kt"); } @TestMetadata("TypeArgOfOwnerClass.kt") public void testTypeArgOfOwnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeArgOfOwnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeArgOfOwnerClass.kt"); } @TestMetadata("TypeParameterFromOuterClass.kt") public void testTypeParameterFromOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeParameterFromOuterClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeParameterFromOuterClass.kt"); } @TestMetadata("VariableClassName.kt") public void testVariableClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/VariableClassName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/VariableClassName.kt"); } @TestMetadata("idea/idea-completion/testData/basic/common/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterPackageName.kt") public void testAfterPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AfterPackageName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/AfterPackageName.kt"); } public void testAllFilesPresentInAnnotations() throws Exception { @@ -865,176 +735,147 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("Annotated.kt") public void testAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Annotated.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/Annotated.kt"); } @TestMetadata("AnnotationTarget.kt") public void testAnnotationTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Deprecated.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/Deprecated.kt"); } @TestMetadata("Deprecated2.kt") public void testDeprecated2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Deprecated2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/Deprecated2.kt"); } @TestMetadata("ForType.kt") public void testForType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ForType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ForType.kt"); } @TestMetadata("FunctionAnnotation1.kt") public void testFunctionAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation1.kt"); } @TestMetadata("FunctionAnnotation2.kt") public void testFunctionAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt"); } @TestMetadata("NoCatchParameterAutopopup.kt") public void testNoCatchParameterAutopopup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/NoCatchParameterAutopopup.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/NoCatchParameterAutopopup.kt"); } @TestMetadata("NoSetterParameterAutopopup.kt") public void testNoSetterParameterAutopopup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/NoSetterParameterAutopopup.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/NoSetterParameterAutopopup.kt"); } @TestMetadata("OnlyAnnotations.kt") public void testOnlyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/OnlyAnnotations.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/OnlyAnnotations.kt"); } @TestMetadata("ParameterAnnotation1.kt") public void testParameterAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation1.kt"); } @TestMetadata("ParameterAnnotation2.kt") public void testParameterAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation2.kt"); } @TestMetadata("ParameterAnnotation3.kt") public void testParameterAnnotation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation3.kt"); } @TestMetadata("ParameterAnnotation4.kt") public void testParameterAnnotation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation4.kt"); } @TestMetadata("ParameterAnnotation5.kt") public void testParameterAnnotation5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation5.kt"); } @TestMetadata("ParameterAnnotation6.kt") public void testParameterAnnotation6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation6.kt"); } @TestMetadata("ParameterAnnotation7.kt") public void testParameterAnnotation7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation7.kt"); } @TestMetadata("ParameterAnnotation8.kt") public void testParameterAnnotation8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt"); } @TestMetadata("ParameterAnnotation9.kt") public void testParameterAnnotation9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt"); } @TestMetadata("ParameterAnnotationArgs.kt") public void testParameterAnnotationArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationArgs.kt"); } @TestMetadata("ParameterAnnotationAutoPopup1.kt") public void testParameterAnnotationAutoPopup1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt"); } @TestMetadata("ParameterAnnotationAutoPopup2.kt") public void testParameterAnnotationAutoPopup2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt"); } @TestMetadata("TopLevelAnnotation1.kt") public void testTopLevelAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation1.kt"); } @TestMetadata("TopLevelAnnotation2.kt") public void testTopLevelAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt"); } @TestMetadata("TopLevelAnnotation3.kt") public void testTopLevelAnnotation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation3.kt"); } @TestMetadata("TopLevelAnnotation4.kt") public void testTopLevelAnnotation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt"); } @TestMetadata("TopLevelAnnotationArg1.kt") public void testTopLevelAnnotationArg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg1.kt"); } @TestMetadata("TopLevelAnnotationArg2.kt") public void testTopLevelAnnotationArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg2.kt"); } @TestMetadata("TypeAliasToAnnotation.kt") public void testTypeAliasToAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TypeAliasToAnnotation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TypeAliasToAnnotation.kt"); } } @@ -1042,98 +883,87 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AutoPopup extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAutoPopup() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/autoPopup"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutopopupInFunExtensionReceiver.kt") public void testAutopopupInFunExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/AutopopupInFunExtensionReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/AutopopupInFunExtensionReceiver.kt"); } @TestMetadata("GenericExtensionFunTypeArgument.kt") public void testGenericExtensionFunTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument.kt"); } @TestMetadata("GenericExtensionFunTypeArgument2.kt") public void testGenericExtensionFunTypeArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument2.kt"); } @TestMetadata("InExtFunName.kt") public void testInExtFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InExtFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/InExtFunName.kt"); } @TestMetadata("InGenericExtFunName.kt") public void testInGenericExtFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InGenericExtFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/InGenericExtFunName.kt"); } @TestMetadata("InValExtType.kt") public void testInValExtType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InValExtType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/InValExtType.kt"); } @TestMetadata("NoAutoPopupAfterNumberLiteral.kt") public void testNoAutoPopupAfterNumberLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt"); } @TestMetadata("NoAutoPopupInValName.kt") public void testNoAutoPopupInValName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupInValName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupInValName.kt"); } @TestMetadata("NoAutopopupInFunName.kt") public void testNoAutopopupInFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInFunName.kt"); } @TestMetadata("NoAutopopupInGenericFunName.kt") public void testNoAutopopupInGenericFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericFunName.kt"); } @TestMetadata("NoAutopopupInGenericValName.kt") public void testNoAutopopupInGenericValName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericValName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericValName.kt"); } @TestMetadata("NoAutopopupInGenericVarName.kt") public void testNoAutopopupInGenericVarName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericVarName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericVarName.kt"); } @TestMetadata("NoAutopopupInVarName.kt") public void testNoAutopopupInVarName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInVarName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInVarName.kt"); } @TestMetadata("NoSecondPressCompletionInAutoPopup.kt") public void testNoSecondPressCompletionInAutoPopup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoSecondPressCompletionInAutoPopup.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoSecondPressCompletionInAutoPopup.kt"); } @TestMetadata("OnlyScopedClassesWithoutExplicit.kt") public void testOnlyScopedClassesWithoutExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/OnlyScopedClassesWithoutExplicit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/OnlyScopedClassesWithoutExplicit.kt"); } } @@ -1141,22 +971,23 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoldOrGrayed extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterNullable.kt") public void testAfterNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullable.kt"); } @TestMetadata("AfterNullableAutoCast.kt") public void testAfterNullableAutoCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast.kt"); } @TestMetadata("AfterNullableAutoCast2.kt") public void testAfterNullableAutoCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast2.kt"); } public void testAllFilesPresentInBoldOrGrayed() throws Exception { @@ -1165,98 +996,82 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("ImmediateExtensionMembers1.kt") public void testImmediateExtensionMembers1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers1.kt"); } @TestMetadata("ImmediateExtensionMembers2.kt") public void testImmediateExtensionMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers2.kt"); } @TestMetadata("ImmediateExtensionMembers3.kt") public void testImmediateExtensionMembers3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers3.kt"); } @TestMetadata("ImmediateExtensionMembers4.kt") public void testImmediateExtensionMembers4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers4.kt"); } @TestMetadata("ImmediateExtensionMembersGeneric.kt") public void testImmediateExtensionMembersGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembersGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembersGeneric.kt"); } @TestMetadata("ImmediateMembers1.kt") public void testImmediateMembers1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers1.kt"); } @TestMetadata("ImmediateMembers2.kt") public void testImmediateMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers2.kt"); } @TestMetadata("ImmediateMembers3.kt") public void testImmediateMembers3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers3.kt"); } @TestMetadata("ImmediateMembers4.kt") public void testImmediateMembers4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers4.kt"); } @TestMetadata("ImmediateMembers5.kt") public void testImmediateMembers5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers5.kt"); } @TestMetadata("InExtensionForNullable.kt") public void testInExtensionForNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/InExtensionForNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/InExtensionForNullable.kt"); } @TestMetadata("KT9835.kt") public void testKT9835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/KT9835.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/KT9835.kt"); } @TestMetadata("NonPredictableSmartCast.kt") public void testNonPredictableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCast.kt"); } @TestMetadata("NonPredictableSmartCastWithWrongReturnType.kt") public void testNonPredictableSmartCastWithWrongReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCastWithWrongReturnType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCastWithWrongReturnType.kt"); } @TestMetadata("SafeCallAfterNullable.kt") public void testSafeCallAfterNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/SafeCallAfterNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/SafeCallAfterNullable.kt"); } @TestMetadata("TwoReceivers.kt") public void testTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/TwoReceivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/TwoReceivers.kt"); } } @@ -1264,56 +1079,52 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EmptyQualifier.kt") public void testEmptyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt"); } @TestMetadata("EmptyQualifierInExtensionFun.kt") public void testEmptyQualifierInExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifierInExtensionFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifierInExtensionFun.kt"); } @TestMetadata("ExpressionQualifier.kt") public void testExpressionQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/ExpressionQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/ExpressionQualifier.kt"); } @TestMetadata("GenericConstructor.kt") public void testGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/GenericConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/GenericConstructor.kt"); } @TestMetadata("HigherOrderFunction.kt") public void testHigherOrderFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/HigherOrderFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/HigherOrderFunction.kt"); } @TestMetadata("NonEmptyQualifier.kt") public void testNonEmptyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/NonEmptyQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/NonEmptyQualifier.kt"); } @TestMetadata("SyntheticExtensions.kt") public void testSyntheticExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions.kt"); } @TestMetadata("SyntheticExtensions2.kt") public void testSyntheticExtensions2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions2.kt"); } } @@ -1321,16 +1132,18 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DslMarker extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("2dslsInsideOtherChild.kt") public void test2dslsInsideOtherChild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/2dslsInsideOtherChild.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/2dslsInsideOtherChild.kt"); } @TestMetadata("2receivers.kt") public void test2receivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/2receivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/2receivers.kt"); } public void testAllFilesPresentInDslMarker() throws Exception { @@ -1339,26 +1152,22 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("child.kt") public void testChild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/child.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/child.kt"); } @TestMetadata("compositeDsl.kt") public void testCompositeDsl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/compositeDsl.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/compositeDsl.kt"); } @TestMetadata("container.kt") public void testContainer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/container.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/container.kt"); } @TestMetadata("root.kt") public void testRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/root.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/root.kt"); } } @@ -1366,32 +1175,32 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunctionTypeValues extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunctionTypeValues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ImplicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/ImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/ImplicitReceiver.kt"); } @TestMetadata("SafeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SafeCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SafeCall.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/Simple.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SmartCast.kt"); } } @@ -1399,146 +1208,127 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Extensions extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/extensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ComplexCapture.kt") public void testComplexCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ComplexCapture.kt"); } @TestMetadata("ComplexCapture2.kt") public void testComplexCapture2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ComplexCapture2.kt"); } @TestMetadata("ExtensionInExtendedClass.kt") public void testExtensionInExtendedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClass.kt"); } @TestMetadata("ExtensionInExtendedClassThis.kt") public void testExtensionInExtendedClassThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClassThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClassThis.kt"); } @TestMetadata("ExtensionInExtension.kt") public void testExtensionInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtension.kt"); } @TestMetadata("ExtensionInExtensionThis.kt") public void testExtensionInExtensionThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtensionThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtensionThis.kt"); } @TestMetadata("ExtensionOnFQObject.kt") public void testExtensionOnFQObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionOnFQObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionOnFQObject.kt"); } @TestMetadata("ExtensionOnNestedClassObject.kt") public void testExtensionOnNestedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionOnNestedClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionOnNestedClassObject.kt"); } @TestMetadata("Extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/Extensions.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/Extensions.kt"); } @TestMetadata("InvalidTypeParameters.kt") public void testInvalidTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/InvalidTypeParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/InvalidTypeParameters.kt"); } @TestMetadata("IrrelevantExtension.kt") public void testIrrelevantExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/IrrelevantExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/IrrelevantExtension.kt"); } @TestMetadata("JavaTypeExtension.kt") public void testJavaTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/JavaTypeExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/JavaTypeExtension.kt"); } @TestMetadata("KotlinGenericTypeExtension.kt") public void testKotlinGenericTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/KotlinGenericTypeExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/KotlinGenericTypeExtension.kt"); } @TestMetadata("KotlinTypeExtension.kt") public void testKotlinTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/KotlinTypeExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/KotlinTypeExtension.kt"); } @TestMetadata("MemberExtensionFromWith.kt") public void testMemberExtensionFromWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/MemberExtensionFromWith.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/MemberExtensionFromWith.kt"); } @TestMetadata("MemberExtensionWithoutExplicitReceiver.kt") public void testMemberExtensionWithoutExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/MemberExtensionWithoutExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/MemberExtensionWithoutExplicitReceiver.kt"); } @TestMetadata("MemberExtensionsFromMemberExtension.kt") public void testMemberExtensionsFromMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/MemberExtensionsFromMemberExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/MemberExtensionsFromMemberExtension.kt"); } @TestMetadata("NoDuplicatedMethodForSmartCast.kt") public void testNoDuplicatedMethodForSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/NoDuplicatedMethodForSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/NoDuplicatedMethodForSmartCast.kt"); } @TestMetadata("NoExtensionFromOuter.kt") public void testNoExtensionFromOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/NoExtensionFromOuter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/NoExtensionFromOuter.kt"); } @TestMetadata("NoMemberExtensionsFromCompanionObject.kt") public void testNoMemberExtensionsFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/NoMemberExtensionsFromCompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/NoMemberExtensionsFromCompanionObject.kt"); } @TestMetadata("StarTypeArg.kt") public void testStarTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/StarTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/StarTypeArg.kt"); } @TestMetadata("WrongExplicitReceiver.kt") public void testWrongExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/WrongExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/WrongExplicitReceiver.kt"); } @TestMetadata("WrongImplicitReceiver.kt") public void testWrongImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/WrongImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/WrongImplicitReceiver.kt"); } } @@ -1546,16 +1336,18 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromSmart extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterAs.kt") public void testAfterAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/AfterAs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/AfterAs.kt"); } @TestMetadata("AfterAsNoDuplicates.kt") public void testAfterAsNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/AfterAsNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/AfterAsNoDuplicates.kt"); } public void testAllFilesPresentInFromSmart() throws Exception { @@ -1564,62 +1356,52 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("ArrayLiteralAnnotationConstructorAsDefaultValueForArray.kt") public void testArrayLiteralAnnotationConstructorAsDefaultValueForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForArray.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForArray.kt"); } @TestMetadata("ArrayLiteralAnnotationConstructorAsDefaultValueForVararg.kt") public void testArrayLiteralAnnotationConstructorAsDefaultValueForVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForVararg.kt"); } @TestMetadata("ArrayLiteralAnnotationUseForArray.kt") public void testArrayLiteralAnnotationUseForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForArray.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForArray.kt"); } @TestMetadata("ArrayLiteralAnnotationUseForVararg.kt") public void testArrayLiteralAnnotationUseForVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForVararg.kt"); } @TestMetadata("EnumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/EnumEntries.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/EnumEntries.kt"); } @TestMetadata("JavaStaticMethods.kt") public void testJavaStaticMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods.kt"); } @TestMetadata("JavaStaticMethods2.kt") public void testJavaStaticMethods2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods2.kt"); } @TestMetadata("MultipleArgs.kt") public void testMultipleArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/MultipleArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/MultipleArgs.kt"); } @TestMetadata("PropertyDelegate.kt") public void testPropertyDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/PropertyDelegate.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/PropertyDelegate.kt"); } @TestMetadata("WhenByEnum.kt") public void testWhenByEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/WhenByEnum.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/WhenByEnum.kt"); } } @@ -1627,68 +1409,62 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromUnresolvedNames extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromUnresolvedNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/fromUnresolvedNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunctionInCompanionObject.kt") public void testFunctionInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/FunctionInCompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/FunctionInCompanionObject.kt"); } @TestMetadata("LocalVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/LocalVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/LocalVal.kt"); } @TestMetadata("MemberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberFunction.kt"); } @TestMetadata("MemberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberProperty.kt"); } @TestMetadata("NotForExtensionFunction.kt") public void testNotForExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/NotForExtensionFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/NotForExtensionFunction.kt"); } @TestMetadata("Parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/Parameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/Parameter.kt"); } @TestMetadata("TopLevelClass.kt") public void testTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelFunction.kt"); } @TestMetadata("TopLevelInterface.kt") public void testTopLevelInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelInterface.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelInterface.kt"); } @TestMetadata("TopLevelObject.kt") public void testTopLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelObject.kt"); } } @@ -1696,26 +1472,27 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GetOperator extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGetOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/getOperator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/getOperator/Extension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/getOperator/Extension.kt"); } @TestMetadata("NotForSafeCall.kt") public void testNotForSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/getOperator/NotForSafeCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/getOperator/NotForSafeCall.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/getOperator/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/getOperator/Simple.kt"); } } @@ -1723,68 +1500,62 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HighOrderFunctions extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHighOrderFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/highOrderFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ContextVariables1.kt") public void testContextVariables1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables1.kt"); } @TestMetadata("ContextVariables2.kt") public void testContextVariables2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables2.kt"); } @TestMetadata("ContextVariables3.kt") public void testContextVariables3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables3.kt"); } @TestMetadata("ContextVariablesFilter.kt") public void testContextVariablesFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesFilter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesFilter.kt"); } @TestMetadata("ContextVariablesMap.kt") public void testContextVariablesMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesMap.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesMap.kt"); } @TestMetadata("ContextVariablesShadowing.kt") public void testContextVariablesShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesShadowing.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesShadowing.kt"); } @TestMetadata("HigherOrderFunction1.kt") public void testHigherOrderFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction1.kt"); } @TestMetadata("HigherOrderFunction2.kt") public void testHigherOrderFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction2.kt"); } @TestMetadata("OptionalParameters.kt") public void testOptionalParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/OptionalParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/OptionalParameters.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/SuspendFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/SuspendFunction.kt"); } } @@ -1792,44 +1563,42 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InStringLiterals extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInStringLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/inStringLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EA76497.kt") public void testEA76497() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/EA76497.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/EA76497.kt"); } @TestMetadata("StringTemplate1.kt") public void testStringTemplate1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate1.kt"); } @TestMetadata("StringTemplate2.kt") public void testStringTemplate2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate2.kt"); } @TestMetadata("StringTemplateDot.kt") public void testStringTemplateDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot.kt"); } @TestMetadata("StringTemplateDot2.kt") public void testStringTemplateDot2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot2.kt"); } @TestMetadata("StringTemplateDotSomething.kt") public void testStringTemplateDotSomething() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDotSomething.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDotSomething.kt"); } } @@ -1837,68 +1606,62 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaSignature extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/lambdaSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ParameterName1.kt") public void testParameterName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName1.kt"); } @TestMetadata("ParameterName2.kt") public void testParameterName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName2.kt"); } @TestMetadata("ParameterName3.kt") public void testParameterName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName3.kt"); } @TestMetadata("ParameterName4.kt") public void testParameterName4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName4.kt"); } @TestMetadata("ParameterName5.kt") public void testParameterName5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName5.kt"); } @TestMetadata("ParameterType1.kt") public void testParameterType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType1.kt"); } @TestMetadata("ParameterType2.kt") public void testParameterType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType2.kt"); } @TestMetadata("ParameterType3.kt") public void testParameterType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType3.kt"); } @TestMetadata("ParameterType4.kt") public void testParameterType4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType4.kt"); } @TestMetadata("ParameterType5.kt") public void testParameterType5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType5.kt"); } } @@ -1906,22 +1669,23 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NamedArguments extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterBrace.kt") public void testAfterBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/AfterBrace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/AfterBrace.kt"); } @TestMetadata("AfterComma.kt") public void testAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/AfterComma.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/AfterComma.kt"); } @TestMetadata("AfterVararg.kt") public void testAfterVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/AfterVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/AfterVararg.kt"); } public void testAllFilesPresentInNamedArguments() throws Exception { @@ -1930,98 +1694,82 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("BooleanArgumentExpected.kt") public void testBooleanArgumentExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/BooleanArgumentExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/BooleanArgumentExpected.kt"); } @TestMetadata("CompactTypeNames.kt") public void testCompactTypeNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/CompactTypeNames.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/CompactTypeNames.kt"); } @TestMetadata("ForEmptyParametersFunction.kt") public void testForEmptyParametersFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/ForEmptyParametersFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/ForEmptyParametersFunction.kt"); } @TestMetadata("InParameterExpression.kt") public void testInParameterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/InParameterExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/InParameterExpression.kt"); } @TestMetadata("NamedArgumentsFromOverloads.kt") public void testNamedArgumentsFromOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads.kt"); } @TestMetadata("NamedArgumentsFromOverloads2.kt") public void testNamedArgumentsFromOverloads2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads2.kt"); } @TestMetadata("NoAlreadyUsedParameters.kt") public void testNoAlreadyUsedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NoAlreadyUsedParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NoAlreadyUsedParameters.kt"); } @TestMetadata("NoParamsFromUnapplicableOverload.kt") public void testNoParamsFromUnapplicableOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NoParamsFromUnapplicableOverload.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NoParamsFromUnapplicableOverload.kt"); } @TestMetadata("NotAfterDot.kt") public void testNotAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotAfterDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotAfterDot.kt"); } @TestMetadata("NotInBrackets.kt") public void testNotInBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotInBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotInBrackets.kt"); } @TestMetadata("NotInElse.kt") public void testNotInElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotInElse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotInElse.kt"); } @TestMetadata("NotOnlyNamedArguments.kt") public void testNotOnlyNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments.kt"); } @TestMetadata("NotOnlyNamedArguments2.kt") public void testNotOnlyNamedArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments2.kt"); } @TestMetadata("OfConstructor.kt") public void testOfConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/OfConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/OfConstructor.kt"); } @TestMetadata("OnlyNamedArguments.kt") public void testOnlyNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/OnlyNamedArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/OnlyNamedArguments.kt"); } @TestMetadata("WithParameterExpression.kt") public void testWithParameterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/WithParameterExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/WithParameterExpression.kt"); } } @@ -2029,50 +1777,47 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoCompletion extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoCompletion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/noCompletion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DoNotCompleteForErrorReceivers.kt") public void testDoNotCompleteForErrorReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceivers.kt"); } @TestMetadata("DoNotCompleteForErrorReceiversForce.kt") public void testDoNotCompleteForErrorReceiversForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceiversForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceiversForce.kt"); } @TestMetadata("InPackageBegin.kt") public void testInPackageBegin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/InPackageBegin.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/InPackageBegin.kt"); } @TestMetadata("NoCompletionAfterBigFloat.kt") public void testNoCompletionAfterBigFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterBigFloat.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterBigFloat.kt"); } @TestMetadata("NoCompletionAfterFloat.kt") public void testNoCompletionAfterFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterFloat.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterFloat.kt"); } @TestMetadata("NoCompletionAfterInt.kt") public void testNoCompletionAfterInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterInt.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterInt.kt"); } @TestMetadata("NoCompletionAfterLong.kt") public void testNoCompletionAfterLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterLong.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterLong.kt"); } } @@ -2080,26 +1825,27 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass.kt") public void testPropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/objects/PropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/objects/PropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass.kt"); } @TestMetadata("PropertyOfTypeAliasToObject.kt") public void testPropertyOfTypeAliasToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/objects/PropertyOfTypeAliasToObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/objects/PropertyOfTypeAliasToObject.kt"); } @TestMetadata("TypeAliasToNestedObject.kt") public void testTypeAliasToNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/objects/TypeAliasToNestedObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/objects/TypeAliasToNestedObject.kt"); } } @@ -2107,26 +1853,27 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorNames extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/operatorNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NoOperatorNameForTopLevel.kt") public void testNoOperatorNameForTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/operatorNames/NoOperatorNameForTopLevel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/operatorNames/NoOperatorNameForTopLevel.kt"); } @TestMetadata("OperatorNameForExtension.kt") public void testOperatorNameForExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForExtension.kt"); } @TestMetadata("OperatorNameForMember.kt") public void testOperatorNameForMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForMember.kt"); } } @@ -2134,28 +1881,28 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterFunKeyword.kt") public void testAfterFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterFunKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterFunKeyword.kt"); } @TestMetadata("AfterValKeyword.kt") public void testAfterValKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterValKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterValKeyword.kt"); } @TestMetadata("AfterValKeywordInConstructorParameter.kt") public void testAfterValKeywordInConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterValKeywordInConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterValKeywordInConstructorParameter.kt"); } @TestMetadata("AfterVarKeyword.kt") public void testAfterVarKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterVarKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterVarKeyword.kt"); } public void testAllFilesPresentInOverride() throws Exception { @@ -2164,50 +1911,42 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestMetadata("Generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/Generics.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/Generics.kt"); } @TestMetadata("InConstructorParameters.kt") public void testInConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/InConstructorParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/InConstructorParameters.kt"); } @TestMetadata("InConstructorParameters2.kt") public void testInConstructorParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/InConstructorParameters2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/InConstructorParameters2.kt"); } @TestMetadata("NoOverrideAfterFunKeyword.kt") public void testNoOverrideAfterFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/NoOverrideAfterFunKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/NoOverrideAfterFunKeyword.kt"); } @TestMetadata("PreferImplementToOverride.kt") public void testPreferImplementToOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/PreferImplementToOverride.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/PreferImplementToOverride.kt"); } @TestMetadata("SecondConstructorParameter.kt") public void testSecondConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/SecondConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/SecondConstructorParameter.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/Simple.kt"); } @TestMetadata("TypeFunctionName.kt") public void testTypeFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/TypeFunctionName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/TypeFunctionName.kt"); } } @@ -2215,170 +1954,147 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterNameAndType extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterNameAndType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/parameterNameAndType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ByAbbreviation.kt") public void testByAbbreviation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ByAbbreviation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ByAbbreviation.kt"); } @TestMetadata("NoAutoInsertion.kt") public void testNoAutoInsertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoAutoInsertion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoAutoInsertion.kt"); } @TestMetadata("NoDuplication.kt") public void testNoDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplication.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplication.kt"); } @TestMetadata("NoDuplicationJava.kt") public void testNoDuplicationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplicationJava.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplicationJava.kt"); } @TestMetadata("NoFromFileAndFromClassesDuplication.kt") public void testNoFromFileAndFromClassesDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoFromFileAndFromClassesDuplication.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoFromFileAndFromClassesDuplication.kt"); } @TestMetadata("NotForAnnnotationTypeConstructor.kt") public void testNotForAnnnotationTypeConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnnnotationTypeConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnnnotationTypeConstructor.kt"); } @TestMetadata("NotForAnonymousFunction.kt") public void testNotForAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnonymousFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnonymousFunction.kt"); } @TestMetadata("NotForCatchParameter.kt") public void testNotForCatchParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt"); } @TestMetadata("NotForLambdaParameter1.kt") public void testNotForLambdaParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter1.kt"); } @TestMetadata("NotForLambdaParameter2.kt") public void testNotForLambdaParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter2.kt"); } @TestMetadata("NotForLambdaParameter3.kt") public void testNotForLambdaParameter3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter3.kt"); } @TestMetadata("NotForSetterParameter.kt") public void testNotForSetterParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForSetterParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForSetterParameter.kt"); } @TestMetadata("NotImported.kt") public void testNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImported.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImported.kt"); } @TestMetadata("NotImportedJava.kt") public void testNotImportedJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImportedJava.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImportedJava.kt"); } @TestMetadata("ParametersInFile.kt") public void testParametersInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFile.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFile.kt"); } @TestMetadata("ParametersInFileInaccessibleType.kt") public void testParametersInFileInaccessibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType.kt"); } @TestMetadata("ParametersInFileInaccessibleType2.kt") public void testParametersInFileInaccessibleType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType2.kt"); } @TestMetadata("ParametersInFileTypeParameter1.kt") public void testParametersInFileTypeParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter1.kt"); } @TestMetadata("ParametersInFileTypeParameter2.kt") public void testParametersInFileTypeParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter2.kt"); } @TestMetadata("ParametersInFileTypeParameter3.kt") public void testParametersInFileTypeParameter3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter3.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/Simple.kt"); } @TestMetadata("URLConnection.kt") public void testURLConnection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/URLConnection.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/URLConnection.kt"); } @TestMetadata("UserPrefix1.kt") public void testUserPrefix1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix1.kt"); } @TestMetadata("UserPrefix2.kt") public void testUserPrefix2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix2.kt"); } @TestMetadata("UserPrefix3.kt") public void testUserPrefix3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix3.kt"); } @TestMetadata("ValParameter.kt") public void testValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ValParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ValParameter.kt"); } @TestMetadata("VarParameter.kt") public void testVarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/VarParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/VarParameter.kt"); } } @@ -2386,122 +2102,107 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Shadowing extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShadowing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/shadowing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InInitializer1.kt") public void testInInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt"); } @TestMetadata("InInitializer2.kt") public void testInInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt"); } @TestMetadata("InInitializer3.kt") public void testInInitializer3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer3.kt"); } @TestMetadata("InInitializer4.kt") public void testInInitializer4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer4.kt"); } @TestMetadata("InInitializer5.kt") public void testInInitializer5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer5.kt"); } @TestMetadata("InInitializer6.kt") public void testInInitializer6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer6.kt"); } @TestMetadata("InInitializer7.kt") public void testInInitializer7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer7.kt"); } @TestMetadata("Locals1.kt") public void testLocals1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/Locals1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/Locals1.kt"); } @TestMetadata("Locals2.kt") public void testLocals2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/Locals2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/Locals2.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/Overloads.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/Overloads.kt"); } @TestMetadata("OverloadsAndVararg.kt") public void testOverloadsAndVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/OverloadsAndVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/OverloadsAndVararg.kt"); } @TestMetadata("PreferCloserMember.kt") public void testPreferCloserMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferCloserMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferCloserMember.kt"); } @TestMetadata("PreferCloserReceiverGeneric.kt") public void testPreferCloserReceiverGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferCloserReceiverGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferCloserReceiverGeneric.kt"); } @TestMetadata("PreferMemberExtension.kt") public void testPreferMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMemberExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMemberExtension.kt"); } @TestMetadata("PreferMemberToExtension.kt") public void testPreferMemberToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToExtension.kt"); } @TestMetadata("PreferMemberToGlobal.kt") public void testPreferMemberToGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToGlobal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToGlobal.kt"); } @TestMetadata("PreferMoreSpecificExtension.kt") public void testPreferMoreSpecificExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtension.kt"); } @TestMetadata("PreferMoreSpecificExtensionGeneric.kt") public void testPreferMoreSpecificExtensionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGeneric.kt"); } @TestMetadata("PreferMoreSpecificExtensionGenericWithParam.kt") public void testPreferMoreSpecificExtensionGenericWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGenericWithParam.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGenericWithParam.kt"); } } @@ -2509,50 +2210,47 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCast extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/smartCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MemberExtensionAfterThisSmartCast.kt") public void testMemberExtensionAfterThisSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/MemberExtensionAfterThisSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/MemberExtensionAfterThisSmartCast.kt"); } @TestMetadata("MembersAfterSmartCast.kt") public void testMembersAfterSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/MembersAfterSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/MembersAfterSmartCast.kt"); } @TestMetadata("SmartCastAfterIf.kt") public void testSmartCastAfterIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIf.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIf.kt"); } @TestMetadata("SmartCastAfterIfMethod.kt") public void testSmartCastAfterIfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIfMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIfMethod.kt"); } @TestMetadata("SmartCastForThis.kt") public void testSmartCastForThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastForThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastForThis.kt"); } @TestMetadata("SmartCastInWhen.kt") public void testSmartCastInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastInWhen.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastInWhen.kt"); } @TestMetadata("SmartCastThis.kt") public void testSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastThis.kt"); } } @@ -2560,62 +2258,57 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticMembers extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/staticMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ImportsFromEnumEntry.kt") public void testImportsFromEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromEnumEntry.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromEnumEntry.kt"); } @TestMetadata("ImportsFromNonObject.kt") public void testImportsFromNonObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromNonObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromNonObject.kt"); } @TestMetadata("ImportsFromObjectNoDuplicates.kt") public void testImportsFromObjectNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromObjectNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromObjectNoDuplicates.kt"); } @TestMetadata("JavaStaticFields.kt") public void testJavaStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFields.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFields.kt"); } @TestMetadata("JavaStaticFieldsFromImports.kt") public void testJavaStaticFieldsFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFieldsFromImports.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFieldsFromImports.kt"); } @TestMetadata("JavaStaticMethods.kt") public void testJavaStaticMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethods.kt"); } @TestMetadata("JavaStaticMethodsFromImports.kt") public void testJavaStaticMethodsFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsFromImports.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsFromImports.kt"); } @TestMetadata("JavaStaticMethodsNoDuplicates.kt") public void testJavaStaticMethodsNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicates.kt"); } @TestMetadata("JavaStaticMethodsNoDuplicatesFromBases.kt") public void testJavaStaticMethodsNoDuplicatesFromBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicatesFromBases.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicatesFromBases.kt"); } } @@ -2623,50 +2316,47 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SubstitutedSignature extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubstitutedSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/substitutedSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("SubstitutedSignature1.kt") public void testSubstitutedSignature1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature1.kt"); } @TestMetadata("SubstitutedSignature2.kt") public void testSubstitutedSignature2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature2.kt"); } @TestMetadata("SubstitutedSignature3.kt") public void testSubstitutedSignature3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature3.kt"); } @TestMetadata("SubstitutedSignature4.kt") public void testSubstitutedSignature4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature4.kt"); } @TestMetadata("SubstitutedSignature5.kt") public void testSubstitutedSignature5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature5.kt"); } @TestMetadata("SubstitutedSignature6.kt") public void testSubstitutedSignature6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature6.kt"); } @TestMetadata("SubstitutedSignatureSOE.kt") public void testSubstitutedSignatureSOE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignatureSOE.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignatureSOE.kt"); } } @@ -2674,62 +2364,57 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("QualifierType1.kt") public void testQualifierType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType1.kt"); } @TestMetadata("QualifierType2.kt") public void testQualifierType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType2.kt"); } @TestMetadata("QualifierType3.kt") public void testQualifierType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType3.kt"); } @TestMetadata("QualifierType4.kt") public void testQualifierType4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType4.kt"); } @TestMetadata("QualifierType5.kt") public void testQualifierType5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType5.kt"); } @TestMetadata("QualifierType6.kt") public void testQualifierType6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType6.kt"); } @TestMetadata("QualifierTypeAny.kt") public void testQualifierTypeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierTypeAny.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierTypeAny.kt"); } @TestMetadata("QualifierTypeAnyInInterface.kt") public void testQualifierTypeAnyInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierTypeAnyInInterface.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierTypeAnyInInterface.kt"); } @TestMetadata("QualifierTypeGeneric.kt") public void testQualifierTypeGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierTypeGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierTypeGeneric.kt"); } } @@ -2737,62 +2422,57 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArgsOrNot extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArgsOrNot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/typeArgsOrNot"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorTypeArg.kt") public void testConstructorTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/ConstructorTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/ConstructorTypeArg.kt"); } @TestMetadata("FunctionTypeArg.kt") public void testFunctionTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg.kt"); } @TestMetadata("FunctionTypeArg2.kt") public void testFunctionTypeArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg2.kt"); } @TestMetadata("LessThan.kt") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/LessThan.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/LessThan.kt"); } @TestMetadata("NestedTypeArg.kt") public void testNestedTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/NestedTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/NestedTypeArg.kt"); } @TestMetadata("SecondTypeArg.kt") public void testSecondTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg.kt"); } @TestMetadata("SecondTypeArg2.kt") public void testSecondTypeArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg2.kt"); } @TestMetadata("SecondTypeArg3.kt") public void testSecondTypeArg3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg3.kt"); } @TestMetadata("SecondTypeArg4.kt") public void testSecondTypeArg4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg4.kt"); } } @@ -2800,26 +2480,27 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VariableNameAndType extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariableNameAndType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/variableNameAndType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/variableNameAndType/Lateinit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/variableNameAndType/Lateinit.kt"); } @TestMetadata("Local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/variableNameAndType/Local.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/variableNameAndType/Local.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/variableNameAndType/TopLevel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/variableNameAndType/TopLevel.kt"); } } @@ -2827,86 +2508,77 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("KT9970.kt") public void testKT9970() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/KT9970.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/KT9970.kt"); } @TestMetadata("VisibilityClassMembersFromExternal.kt") public void testVisibilityClassMembersFromExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternal.kt"); } @TestMetadata("VisibilityClassMembersFromExternalForce.kt") public void testVisibilityClassMembersFromExternalForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternalForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternalForce.kt"); } @TestMetadata("VisibilityInSubclass.kt") public void testVisibilityInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclass.kt"); } @TestMetadata("VisibilityInSubclassForce.kt") public void testVisibilityInSubclassForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclassForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclassForce.kt"); } @TestMetadata("VisibilityPrivateToThis.kt") public void testVisibilityPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThis.kt"); } @TestMetadata("VisibilityPrivateToThisInConstructor.kt") public void testVisibilityPrivateToThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt"); } @TestMetadata("VisibilityPrivateToThisInConstructorWithThis.kt") public void testVisibilityPrivateToThisInConstructorWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt"); } @TestMetadata("VisibilityPrivateToThisInSpecialScope.kt") public void testVisibilityPrivateToThisInSpecialScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInSpecialScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInSpecialScope.kt"); } @TestMetadata("VisibilityPrivateToThisWithReceiver.kt") public void testVisibilityPrivateToThisWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver.kt"); } @TestMetadata("VisibilityPrivateToThisWithReceiver2.kt") public void testVisibilityPrivateToThisWithReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver2.kt"); } @TestMetadata("VisibilityPrivateToThisWithThis.kt") public void testVisibilityPrivateToThisWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithThis.kt"); } @TestMetadata("VisibilityPrivateToThisWithWrongThis.kt") public void testVisibilityPrivateToThisWithWrongThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithWrongThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithWrongThis.kt"); } } } @@ -2915,38 +2587,37 @@ public class JSBasicCompletionTestGenerated extends AbstractJSBasicCompletionTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Js extends AbstractJSBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/js"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoForceCompletion.kt") public void testAutoForceCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/js/AutoForceCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/js/AutoForceCompletion.kt"); } @TestMetadata("DoNotPreferDynamic.kt") public void testDoNotPreferDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/js/DoNotPreferDynamic.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/js/DoNotPreferDynamic.kt"); } @TestMetadata("DynamicKeyword.kt") public void testDynamicKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/js/DynamicKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/js/DynamicKeyword.kt"); } @TestMetadata("InPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/js/InPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/js/InPackage.kt"); } @TestMetadata("JSStd.kt") public void testJSStd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/js/JSStd.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/js/JSStd.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/Java8BasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/Java8BasicCompletionTestGenerated.java index b3de33ee087..f8c016c2c74 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/Java8BasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/Java8BasicCompletionTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class Java8BasicCompletionTestGenerated extends AbstractJava8BasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava8() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/java8"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CollectionMethods.kt") public void testCollectionMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java8/CollectionMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java8/CollectionMethods.kt"); } @TestMetadata("StreamMethods.kt") public void testStreamMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java8/StreamMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java8/StreamMethods.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java index 1f951253495..9a2625dc0dc 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmBasicCompletionTestGenerated.java @@ -23,16 +23,18 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterFloatOnNewLine.kt") public void testAfterFloatOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/AfterFloatOnNewLine.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/AfterFloatOnNewLine.kt"); } @TestMetadata("AfterIntSeparatedWithComments.kt") public void testAfterIntSeparatedWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/AfterIntSeparatedWithComments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/AfterIntSeparatedWithComments.kt"); } public void testAllFilesPresentInCommon() throws Exception { @@ -41,822 +43,690 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("BasicAny.kt") public void testBasicAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/BasicAny.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/BasicAny.kt"); } @TestMetadata("BasicInt.kt") public void testBasicInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/BasicInt.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/BasicInt.kt"); } @TestMetadata("BeforeDotInCall.kt") public void testBeforeDotInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/BeforeDotInCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/BeforeDotInCall.kt"); } @TestMetadata("CallLocalLambda.kt") public void testCallLocalLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/CallLocalLambda.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/CallLocalLambda.kt"); } @TestMetadata("classObjectElementsInClass.kt") public void testClassObjectElementsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/classObjectElementsInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/classObjectElementsInClass.kt"); } @TestMetadata("ClassRedeclaration1.kt") public void testClassRedeclaration1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ClassRedeclaration1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ClassRedeclaration1.kt"); } @TestMetadata("ClassRedeclaration2.kt") public void testClassRedeclaration2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ClassRedeclaration2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ClassRedeclaration2.kt"); } @TestMetadata("CompletionInSetter.kt") public void testCompletionInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/CompletionInSetter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/CompletionInSetter.kt"); } @TestMetadata("ComponentFunction.kt") public void testComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ComponentFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ComponentFunction.kt"); } @TestMetadata("CoroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/CoroutineContext.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/CoroutineContext.kt"); } @TestMetadata("DataClassMembers.kt") public void testDataClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/DataClassMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/DataClassMembers.kt"); } @TestMetadata("DataClassMembers2.kt") public void testDataClassMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/DataClassMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/DataClassMembers2.kt"); } @TestMetadata("ExtendClassName.kt") public void testExtendClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtendClassName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtendClassName.kt"); } @TestMetadata("ExtendQualifiedClassName.kt") public void testExtendQualifiedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtendQualifiedClassName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtendQualifiedClassName.kt"); } @TestMetadata("ExtensionForProperty.kt") public void testExtensionForProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionForProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionForProperty.kt"); } @TestMetadata("ExtensionFunReceiver.kt") public void testExtensionFunReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionFunReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionFunReceiver.kt"); } @TestMetadata("ExtensionFunReceiverForce.kt") public void testExtensionFunReceiverForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionFunReceiverForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionFunReceiverForce.kt"); } @TestMetadata("ExtensionFunctionInClassObject.kt") public void testExtensionFunctionInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionFunctionInClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionFunctionInClassObject.kt"); } @TestMetadata("ExtensionInsideFunction.kt") public void testExtensionInsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionInsideFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionInsideFunction.kt"); } @TestMetadata("ExtensionOnTypeAliasFromOtherTypeAlias.kt") public void testExtensionOnTypeAliasFromOtherTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionOnTypeAliasFromOtherTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionOnTypeAliasFromOtherTypeAlias.kt"); } @TestMetadata("ExtensionToIntInFloatStyle.kt") public void testExtensionToIntInFloatStyle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionToIntInFloatStyle.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionToIntInFloatStyle.kt"); } @TestMetadata("ExtensionWithAdditionalTypeParameters.kt") public void testExtensionWithAdditionalTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithAdditionalTypeParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithAdditionalTypeParameters.kt"); } @TestMetadata("ExtensionWithGenericParamInReceiver.kt") public void testExtensionWithGenericParamInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithGenericParamInReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithGenericParamInReceiver.kt"); } @TestMetadata("ExtensionWithGenericReceiver.kt") public void testExtensionWithGenericReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithGenericReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithGenericReceiver.kt"); } @TestMetadata("ExtensionWithInternalGenericParameters.kt") public void testExtensionWithInternalGenericParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithInternalGenericParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithInternalGenericParameters.kt"); } @TestMetadata("ExtensionWithManyTypeParamsInReceiver.kt") public void testExtensionWithManyTypeParamsInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ExtensionWithManyTypeParamsInReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ExtensionWithManyTypeParamsInReceiver.kt"); } @TestMetadata("FromImports.kt") public void testFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/FromImports.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/FromImports.kt"); } @TestMetadata("FunctionCompletionFormatting.kt") public void testFunctionCompletionFormatting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/FunctionCompletionFormatting.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/FunctionCompletionFormatting.kt"); } @TestMetadata("FunctionVariableCallArgument.kt") public void testFunctionVariableCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/FunctionVariableCallArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/FunctionVariableCallArgument.kt"); } @TestMetadata("GenericExtensionFunReceiver1.kt") public void testGenericExtensionFunReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver1.kt"); } @TestMetadata("GenericExtensionFunReceiver2.kt") public void testGenericExtensionFunReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GenericExtensionFunReceiver2.kt"); } @TestMetadata("GenericKotlinClass.kt") public void testGenericKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GenericKotlinClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GenericKotlinClass.kt"); } @TestMetadata("GetPrefixForProperties.kt") public void testGetPrefixForProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/GetPrefixForProperties.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/GetPrefixForProperties.kt"); } @TestMetadata("ImportedEnumMembers.kt") public void testImportedEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ImportedEnumMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ImportedEnumMembers.kt"); } @TestMetadata("ImportedMemberFromObject.kt") public void testImportedMemberFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ImportedMemberFromObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ImportedMemberFromObject.kt"); } @TestMetadata("InCallExpression.kt") public void testInCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InCallExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InCallExpression.kt"); } @TestMetadata("InClassInitializer.kt") public void testInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InClassInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InClassInitializer.kt"); } @TestMetadata("InClassObject.kt") public void testInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InClassObject.kt"); } @TestMetadata("InClassPropertyAccessor.kt") public void testInClassPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InClassPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InClassPropertyAccessor.kt"); } @TestMetadata("InEmptyImport.kt") public void testInEmptyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InEmptyImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InEmptyImport.kt"); } @TestMetadata("InEmptyPackage.kt") public void testInEmptyPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InEmptyPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InEmptyPackage.kt"); } @TestMetadata("InExpressionNoPrefix.kt") public void testInExpressionNoPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InExpressionNoPrefix.kt"); } @TestMetadata("InExtendTypeAnnotation.kt") public void testInExtendTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InExtendTypeAnnotation.kt"); } @TestMetadata("InFileWithMultiDeclaration.kt") public void testInFileWithMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFileWithMultiDeclaration.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFileWithMultiDeclaration.kt"); } @TestMetadata("InFileWithTypedef.kt") public void testInFileWithTypedef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFileWithTypedef.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFileWithTypedef.kt"); } @TestMetadata("InFunInClassInitializer.kt") public void testInFunInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt"); } @TestMetadata("InFunctionArguments.kt") public void testInFunctionArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InFunctionArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InFunctionArguments.kt"); } @TestMetadata("InGlobalPropertyInitializer.kt") public void testInGlobalPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InGlobalPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InGlobalPropertyInitializer.kt"); } @TestMetadata("InImport.kt") public void testInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InImport.kt"); } @TestMetadata("InInitializerInPropertyAccessor.kt") public void testInInitializerInPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt"); } @TestMetadata("InInnerClass.kt") public void testInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InInnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InInnerClass.kt"); } @TestMetadata("InLambda.kt") public void testInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InLambda.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InLambda.kt"); } @TestMetadata("InLocalObjectDeclaration.kt") public void testInLocalObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InLocalObjectDeclaration.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InLocalObjectDeclaration.kt"); } @TestMetadata("InLongDotQualifiedExpression.kt") public void testInLongDotQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InLongDotQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InLongDotQualifiedExpression.kt"); } @TestMetadata("InMiddleOfPackage.kt") public void testInMiddleOfPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InMiddleOfPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InMiddleOfPackage.kt"); } @TestMetadata("InMiddleOfPackageDirective.kt") public void testInMiddleOfPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InMiddleOfPackageDirective.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InMiddleOfPackageDirective.kt"); } @TestMetadata("InNestedClass.kt") public void testInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InNestedClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InNestedClass.kt"); } @TestMetadata("InObjectInDelegationSpecifier.kt") public void testInObjectInDelegationSpecifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InObjectInDelegationSpecifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InObjectInDelegationSpecifier.kt"); } @TestMetadata("InPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InPackage.kt"); } @TestMetadata("InParametersTypes.kt") public void testInParametersTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InParametersTypes.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InParametersTypes.kt"); } @TestMetadata("InParametersTypesForce.kt") public void testInParametersTypesForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InParametersTypesForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InParametersTypesForce.kt"); } @TestMetadata("InPropertyAccessor.kt") public void testInPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InPropertyAccessor.kt"); } @TestMetadata("InPropertyInitializer.kt") public void testInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InPropertyInitializer.kt"); } @TestMetadata("InSecondaryConstructorBody.kt") public void testInSecondaryConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorBody.kt"); } @TestMetadata("InSecondaryConstructorDefaultParameter.kt") public void testInSecondaryConstructorDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorDefaultParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorDefaultParameter.kt"); } @TestMetadata("InSecondaryConstructorDelegationCall.kt") public void testInSecondaryConstructorDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorDelegationCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorDelegationCall.kt"); } @TestMetadata("InSecondaryConstructorFirstDefaultParameter.kt") public void testInSecondaryConstructorFirstDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InSecondaryConstructorFirstDefaultParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InSecondaryConstructorFirstDefaultParameter.kt"); } @TestMetadata("InTypeAnnotation.kt") public void testInTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InTypeAnnotation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InTypeAnnotation.kt"); } @TestMetadata("InfixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InfixCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InfixCall.kt"); } @TestMetadata("InfixCallNoSpecialLambdaArgumentItem.kt") public void testInfixCallNoSpecialLambdaArgumentItem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InfixCallNoSpecialLambdaArgumentItem.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InfixCallNoSpecialLambdaArgumentItem.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InnerClass.kt"); } @TestMetadata("InnerInBaseClass.kt") public void testInnerInBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InnerInBaseClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InnerInBaseClass.kt"); } @TestMetadata("InsideAnonymousClass.kt") public void testInsideAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InsideAnonymousClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InsideAnonymousClass.kt"); } @TestMetadata("InterfaceNameBeforeRunBug.kt") public void testInterfaceNameBeforeRunBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/InterfaceNameBeforeRunBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/InterfaceNameBeforeRunBug.kt"); } @TestMetadata("KT10664.kt") public void testKT10664() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT10664.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT10664.kt"); } @TestMetadata("KT12033.kt") public void testKT12033() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT12033.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT12033.kt"); } @TestMetadata("KT13780.kt") public void testKT13780() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT13780.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT13780.kt"); } @TestMetadata("KT13780_1.kt") public void testKT13780_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/KT13780_1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/KT13780_1.kt"); } @TestMetadata("LocalMultideclarationValues.kt") public void testLocalMultideclarationValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/LocalMultideclarationValues.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/LocalMultideclarationValues.kt"); } @TestMetadata("NameWithDollars.kt") public void testNameWithDollars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NameWithDollars.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NameWithDollars.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NamedObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NamedObject.kt"); } @TestMetadata("NestedBuiltInClass.kt") public void testNestedBuiltInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedBuiltInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedBuiltInClass.kt"); } @TestMetadata("NestedClassBug.kt") public void testNestedClassBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassBug.kt"); } @TestMetadata("NestedClassNameForExtension.kt") public void testNestedClassNameForExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassNameForExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassNameForExtension.kt"); } @TestMetadata("NestedClassNameForExtension2.kt") public void testNestedClassNameForExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassNameForExtension2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassNameForExtension2.kt"); } @TestMetadata("NestedClassesOnClassWithDefaultObject.kt") public void testNestedClassesOnClassWithDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithDefaultObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithDefaultObject.kt"); } @TestMetadata("NestedClassesOnClassWithNamedDefaultObject.kt") public void testNestedClassesOnClassWithNamedDefaultObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassesOnClassWithNamedDefaultObject.kt"); } @TestMetadata("NestedClassesOnDefaultObjectLiteral.kt") public void testNestedClassesOnDefaultObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NestedClassesOnDefaultObjectLiteral.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NestedClassesOnDefaultObjectLiteral.kt"); } @TestMetadata("NoAutoInsertionOfNotImported.kt") public void testNoAutoInsertionOfNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoAutoInsertionOfNotImported.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoAutoInsertionOfNotImported.kt"); } @TestMetadata("NoClassNameDuplication.kt") public void testNoClassNameDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoClassNameDuplication.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoClassNameDuplication.kt"); } @TestMetadata("NoCompletionForCoroutinesIntinsics.kt") public void testNoCompletionForCoroutinesIntinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesIntinsics.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesIntinsics.kt"); } @TestMetadata("NoCompletionForCoroutinesJvmInternal.kt") public void testNoCompletionForCoroutinesJvmInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesJvmInternal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoCompletionForCoroutinesJvmInternal.kt"); } @TestMetadata("NoCompletionForExcluded.kt") public void testNoCompletionForExcluded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoCompletionForExcluded.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoCompletionForExcluded.kt"); } @TestMetadata("NoEmptyPackage.kt") public void testNoEmptyPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoEmptyPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoEmptyPackage.kt"); } @TestMetadata("NoEnumEntryType.kt") public void testNoEnumEntryType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoEnumEntryType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoEnumEntryType.kt"); } @TestMetadata("NoEnumMembersFromImplicitQualifier.kt") public void testNoEnumMembersFromImplicitQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoEnumMembersFromImplicitQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoEnumMembersFromImplicitQualifier.kt"); } @TestMetadata("NoExtensionsAfterQualifier.kt") public void testNoExtensionsAfterQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoExtensionsAfterQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoExtensionsAfterQualifier.kt"); } @TestMetadata("NoLocalsDeclaredAhead.kt") public void testNoLocalsDeclaredAhead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoLocalsDeclaredAhead.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoLocalsDeclaredAhead.kt"); } @TestMetadata("NoNestedClassAfterReceiver.kt") public void testNoNestedClassAfterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoNestedClassAfterReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoNestedClassAfterReceiver.kt"); } @TestMetadata("NoNestedClassesFromImplicitQualifier.kt") public void testNoNestedClassesFromImplicitQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoNestedClassesFromImplicitQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoNestedClassesFromImplicitQualifier.kt"); } @TestMetadata("NoPackageFacadeClasses.kt") public void testNoPackageFacadeClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoPackageFacadeClasses.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoPackageFacadeClasses.kt"); } @TestMetadata("NoParameterAnnotationInPresentation.kt") public void testNoParameterAnnotationInPresentation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoParameterAnnotationInPresentation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoParameterAnnotationInPresentation.kt"); } @TestMetadata("NoTopLevelCompletionInQualifiedUserTypes.kt") public void testNoTopLevelCompletionInQualifiedUserTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/NoTopLevelCompletionInQualifiedUserTypes.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/NoTopLevelCompletionInQualifiedUserTypes.kt"); } @TestMetadata("ObjectInTypePosition.kt") public void testObjectInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectInTypePosition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectInTypePosition.kt"); } @TestMetadata("ObjectMembersFromNested.kt") public void testObjectMembersFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectMembersFromNested.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectMembersFromNested.kt"); } @TestMetadata("ObjectRedeclaration1.kt") public void testObjectRedeclaration1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectRedeclaration1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectRedeclaration1.kt"); } @TestMetadata("ObjectRedeclaration2.kt") public void testObjectRedeclaration2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ObjectRedeclaration2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ObjectRedeclaration2.kt"); } @TestMetadata("OverloadFunctions.kt") public void testOverloadFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/OverloadFunctions.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/OverloadFunctions.kt"); } @TestMetadata("PreferLessParameters.kt") public void testPreferLessParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/PreferLessParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/PreferLessParameters.kt"); } @TestMetadata("PrivatesInSecondPressCompletion.kt") public void testPrivatesInSecondPressCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/PrivatesInSecondPressCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/PrivatesInSecondPressCompletion.kt"); } @TestMetadata("ProtectedExtensionMethod.kt") public void testProtectedExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ProtectedExtensionMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ProtectedExtensionMethod.kt"); } @TestMetadata("QualifiedSuperMembers.kt") public void testQualifiedSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/QualifiedSuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/QualifiedSuperMembers.kt"); } @TestMetadata("RecieverMembersFromExtAccessor.kt") public void testRecieverMembersFromExtAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/RecieverMembersFromExtAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtAccessor.kt"); } @TestMetadata("RecieverMembersFromExtFun.kt") public void testRecieverMembersFromExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/RecieverMembersFromExtFun.kt"); } @TestMetadata("SetPrefixForProperties.kt") public void testSetPrefixForProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SetPrefixForProperties.kt"); } @TestMetadata("ShortClassNamesInTypePosition.kt") public void testShortClassNamesInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/ShortClassNamesInTypePosition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/ShortClassNamesInTypePosition.kt"); } @TestMetadata("StandardJetArrayFirst.kt") public void testStandardJetArrayFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/StandardJetArrayFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/StandardJetArrayFirst.kt"); } @TestMetadata("StandardJetDoubleFirst.kt") public void testStandardJetDoubleFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/StandardJetDoubleFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/StandardJetDoubleFirst.kt"); } @TestMetadata("SubpackageInFun.kt") public void testSubpackageInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SubpackageInFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SubpackageInFun.kt"); } @TestMetadata("SuperMembers.kt") public void testSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers.kt"); } @TestMetadata("SuperMembers2.kt") public void testSuperMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers2.kt"); } @TestMetadata("SuperMembers3.kt") public void testSuperMembers3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers3.kt"); } @TestMetadata("SuperMembers4.kt") public void testSuperMembers4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/SuperMembers4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/SuperMembers4.kt"); } @TestMetadata("TopLevelClassCompletionInQualifiedCall.kt") public void testTopLevelClassCompletionInQualifiedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassCompletionInQualifiedCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassCompletionInQualifiedCall.kt"); } @TestMetadata("TopLevelClassName1.kt") public void testTopLevelClassName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName1.kt"); } @TestMetadata("topLevelClassName2.kt") public void testTopLevelClassName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/topLevelClassName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/topLevelClassName2.kt"); } @TestMetadata("TopLevelClassName4.kt") public void testTopLevelClassName4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName4.kt"); } @TestMetadata("TopLevelClassName5.kt") public void testTopLevelClassName5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName5.kt"); } @TestMetadata("TopLevelClassName6.kt") public void testTopLevelClassName6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName6.kt"); } @TestMetadata("TopLevelClassName-3.kt") public void testTopLevelClassName_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TopLevelClassName-3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TopLevelClassName-3.kt"); } @TestMetadata("TypeArgCompletionBug.kt") public void testTypeArgCompletionBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeArgCompletionBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeArgCompletionBug.kt"); } @TestMetadata("TypeArgFromTheSameFile.kt") public void testTypeArgFromTheSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeArgFromTheSameFile.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeArgFromTheSameFile.kt"); } @TestMetadata("TypeArgOfOwnerClass.kt") public void testTypeArgOfOwnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeArgOfOwnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeArgOfOwnerClass.kt"); } @TestMetadata("TypeParameterFromOuterClass.kt") public void testTypeParameterFromOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/TypeParameterFromOuterClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/TypeParameterFromOuterClass.kt"); } @TestMetadata("VariableClassName.kt") public void testVariableClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/VariableClassName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/VariableClassName.kt"); } @TestMetadata("idea/idea-completion/testData/basic/common/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterPackageName.kt") public void testAfterPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AfterPackageName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/AfterPackageName.kt"); } public void testAllFilesPresentInAnnotations() throws Exception { @@ -865,176 +735,147 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("Annotated.kt") public void testAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Annotated.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/Annotated.kt"); } @TestMetadata("AnnotationTarget.kt") public void testAnnotationTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/AnnotationTarget.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Deprecated.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/Deprecated.kt"); } @TestMetadata("Deprecated2.kt") public void testDeprecated2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/Deprecated2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/Deprecated2.kt"); } @TestMetadata("ForType.kt") public void testForType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ForType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ForType.kt"); } @TestMetadata("FunctionAnnotation1.kt") public void testFunctionAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation1.kt"); } @TestMetadata("FunctionAnnotation2.kt") public void testFunctionAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/FunctionAnnotation2.kt"); } @TestMetadata("NoCatchParameterAutopopup.kt") public void testNoCatchParameterAutopopup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/NoCatchParameterAutopopup.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/NoCatchParameterAutopopup.kt"); } @TestMetadata("NoSetterParameterAutopopup.kt") public void testNoSetterParameterAutopopup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/NoSetterParameterAutopopup.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/NoSetterParameterAutopopup.kt"); } @TestMetadata("OnlyAnnotations.kt") public void testOnlyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/OnlyAnnotations.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/OnlyAnnotations.kt"); } @TestMetadata("ParameterAnnotation1.kt") public void testParameterAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation1.kt"); } @TestMetadata("ParameterAnnotation2.kt") public void testParameterAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation2.kt"); } @TestMetadata("ParameterAnnotation3.kt") public void testParameterAnnotation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation3.kt"); } @TestMetadata("ParameterAnnotation4.kt") public void testParameterAnnotation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation4.kt"); } @TestMetadata("ParameterAnnotation5.kt") public void testParameterAnnotation5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation5.kt"); } @TestMetadata("ParameterAnnotation6.kt") public void testParameterAnnotation6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation6.kt"); } @TestMetadata("ParameterAnnotation7.kt") public void testParameterAnnotation7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation7.kt"); } @TestMetadata("ParameterAnnotation8.kt") public void testParameterAnnotation8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation8.kt"); } @TestMetadata("ParameterAnnotation9.kt") public void testParameterAnnotation9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotation9.kt"); } @TestMetadata("ParameterAnnotationArgs.kt") public void testParameterAnnotationArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationArgs.kt"); } @TestMetadata("ParameterAnnotationAutoPopup1.kt") public void testParameterAnnotationAutoPopup1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup1.kt"); } @TestMetadata("ParameterAnnotationAutoPopup2.kt") public void testParameterAnnotationAutoPopup2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/ParameterAnnotationAutoPopup2.kt"); } @TestMetadata("TopLevelAnnotation1.kt") public void testTopLevelAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation1.kt"); } @TestMetadata("TopLevelAnnotation2.kt") public void testTopLevelAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation2.kt"); } @TestMetadata("TopLevelAnnotation3.kt") public void testTopLevelAnnotation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation3.kt"); } @TestMetadata("TopLevelAnnotation4.kt") public void testTopLevelAnnotation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotation4.kt"); } @TestMetadata("TopLevelAnnotationArg1.kt") public void testTopLevelAnnotationArg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg1.kt"); } @TestMetadata("TopLevelAnnotationArg2.kt") public void testTopLevelAnnotationArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TopLevelAnnotationArg2.kt"); } @TestMetadata("TypeAliasToAnnotation.kt") public void testTypeAliasToAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/annotations/TypeAliasToAnnotation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/annotations/TypeAliasToAnnotation.kt"); } } @@ -1042,98 +883,87 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AutoPopup extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAutoPopup() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/autoPopup"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutopopupInFunExtensionReceiver.kt") public void testAutopopupInFunExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/AutopopupInFunExtensionReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/AutopopupInFunExtensionReceiver.kt"); } @TestMetadata("GenericExtensionFunTypeArgument.kt") public void testGenericExtensionFunTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument.kt"); } @TestMetadata("GenericExtensionFunTypeArgument2.kt") public void testGenericExtensionFunTypeArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/GenericExtensionFunTypeArgument2.kt"); } @TestMetadata("InExtFunName.kt") public void testInExtFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InExtFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/InExtFunName.kt"); } @TestMetadata("InGenericExtFunName.kt") public void testInGenericExtFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InGenericExtFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/InGenericExtFunName.kt"); } @TestMetadata("InValExtType.kt") public void testInValExtType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/InValExtType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/InValExtType.kt"); } @TestMetadata("NoAutoPopupAfterNumberLiteral.kt") public void testNoAutoPopupAfterNumberLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupAfterNumberLiteral.kt"); } @TestMetadata("NoAutoPopupInValName.kt") public void testNoAutoPopupInValName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupInValName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutoPopupInValName.kt"); } @TestMetadata("NoAutopopupInFunName.kt") public void testNoAutopopupInFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInFunName.kt"); } @TestMetadata("NoAutopopupInGenericFunName.kt") public void testNoAutopopupInGenericFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericFunName.kt"); } @TestMetadata("NoAutopopupInGenericValName.kt") public void testNoAutopopupInGenericValName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericValName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericValName.kt"); } @TestMetadata("NoAutopopupInGenericVarName.kt") public void testNoAutopopupInGenericVarName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericVarName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInGenericVarName.kt"); } @TestMetadata("NoAutopopupInVarName.kt") public void testNoAutopopupInVarName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInVarName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoAutopopupInVarName.kt"); } @TestMetadata("NoSecondPressCompletionInAutoPopup.kt") public void testNoSecondPressCompletionInAutoPopup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/NoSecondPressCompletionInAutoPopup.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/NoSecondPressCompletionInAutoPopup.kt"); } @TestMetadata("OnlyScopedClassesWithoutExplicit.kt") public void testOnlyScopedClassesWithoutExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/autoPopup/OnlyScopedClassesWithoutExplicit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/autoPopup/OnlyScopedClassesWithoutExplicit.kt"); } } @@ -1141,22 +971,23 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoldOrGrayed extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterNullable.kt") public void testAfterNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullable.kt"); } @TestMetadata("AfterNullableAutoCast.kt") public void testAfterNullableAutoCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast.kt"); } @TestMetadata("AfterNullableAutoCast2.kt") public void testAfterNullableAutoCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/AfterNullableAutoCast2.kt"); } public void testAllFilesPresentInBoldOrGrayed() throws Exception { @@ -1165,98 +996,82 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("ImmediateExtensionMembers1.kt") public void testImmediateExtensionMembers1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers1.kt"); } @TestMetadata("ImmediateExtensionMembers2.kt") public void testImmediateExtensionMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers2.kt"); } @TestMetadata("ImmediateExtensionMembers3.kt") public void testImmediateExtensionMembers3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers3.kt"); } @TestMetadata("ImmediateExtensionMembers4.kt") public void testImmediateExtensionMembers4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembers4.kt"); } @TestMetadata("ImmediateExtensionMembersGeneric.kt") public void testImmediateExtensionMembersGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembersGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateExtensionMembersGeneric.kt"); } @TestMetadata("ImmediateMembers1.kt") public void testImmediateMembers1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers1.kt"); } @TestMetadata("ImmediateMembers2.kt") public void testImmediateMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers2.kt"); } @TestMetadata("ImmediateMembers3.kt") public void testImmediateMembers3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers3.kt"); } @TestMetadata("ImmediateMembers4.kt") public void testImmediateMembers4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers4.kt"); } @TestMetadata("ImmediateMembers5.kt") public void testImmediateMembers5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/ImmediateMembers5.kt"); } @TestMetadata("InExtensionForNullable.kt") public void testInExtensionForNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/InExtensionForNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/InExtensionForNullable.kt"); } @TestMetadata("KT9835.kt") public void testKT9835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/KT9835.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/KT9835.kt"); } @TestMetadata("NonPredictableSmartCast.kt") public void testNonPredictableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCast.kt"); } @TestMetadata("NonPredictableSmartCastWithWrongReturnType.kt") public void testNonPredictableSmartCastWithWrongReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCastWithWrongReturnType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/NonPredictableSmartCastWithWrongReturnType.kt"); } @TestMetadata("SafeCallAfterNullable.kt") public void testSafeCallAfterNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/SafeCallAfterNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/SafeCallAfterNullable.kt"); } @TestMetadata("TwoReceivers.kt") public void testTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/boldOrGrayed/TwoReceivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/boldOrGrayed/TwoReceivers.kt"); } } @@ -1264,56 +1079,52 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EmptyQualifier.kt") public void testEmptyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifier.kt"); } @TestMetadata("EmptyQualifierInExtensionFun.kt") public void testEmptyQualifierInExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifierInExtensionFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/EmptyQualifierInExtensionFun.kt"); } @TestMetadata("ExpressionQualifier.kt") public void testExpressionQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/ExpressionQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/ExpressionQualifier.kt"); } @TestMetadata("GenericConstructor.kt") public void testGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/GenericConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/GenericConstructor.kt"); } @TestMetadata("HigherOrderFunction.kt") public void testHigherOrderFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/HigherOrderFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/HigherOrderFunction.kt"); } @TestMetadata("NonEmptyQualifier.kt") public void testNonEmptyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/NonEmptyQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/NonEmptyQualifier.kt"); } @TestMetadata("SyntheticExtensions.kt") public void testSyntheticExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions.kt"); } @TestMetadata("SyntheticExtensions2.kt") public void testSyntheticExtensions2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/callableReference/SyntheticExtensions2.kt"); } } @@ -1321,16 +1132,18 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DslMarker extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("2dslsInsideOtherChild.kt") public void test2dslsInsideOtherChild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/2dslsInsideOtherChild.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/2dslsInsideOtherChild.kt"); } @TestMetadata("2receivers.kt") public void test2receivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/2receivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/2receivers.kt"); } public void testAllFilesPresentInDslMarker() throws Exception { @@ -1339,26 +1152,22 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("child.kt") public void testChild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/child.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/child.kt"); } @TestMetadata("compositeDsl.kt") public void testCompositeDsl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/compositeDsl.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/compositeDsl.kt"); } @TestMetadata("container.kt") public void testContainer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/container.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/container.kt"); } @TestMetadata("root.kt") public void testRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/dslMarker/root.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/dslMarker/root.kt"); } } @@ -1366,32 +1175,32 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunctionTypeValues extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunctionTypeValues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ImplicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/ImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/ImplicitReceiver.kt"); } @TestMetadata("SafeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SafeCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SafeCall.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/Simple.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensionFunctionTypeValues/SmartCast.kt"); } } @@ -1399,146 +1208,127 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Extensions extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/extensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ComplexCapture.kt") public void testComplexCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ComplexCapture.kt"); } @TestMetadata("ComplexCapture2.kt") public void testComplexCapture2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ComplexCapture2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ComplexCapture2.kt"); } @TestMetadata("ExtensionInExtendedClass.kt") public void testExtensionInExtendedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClass.kt"); } @TestMetadata("ExtensionInExtendedClassThis.kt") public void testExtensionInExtendedClassThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClassThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtendedClassThis.kt"); } @TestMetadata("ExtensionInExtension.kt") public void testExtensionInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtension.kt"); } @TestMetadata("ExtensionInExtensionThis.kt") public void testExtensionInExtensionThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtensionThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionInExtensionThis.kt"); } @TestMetadata("ExtensionOnFQObject.kt") public void testExtensionOnFQObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionOnFQObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionOnFQObject.kt"); } @TestMetadata("ExtensionOnNestedClassObject.kt") public void testExtensionOnNestedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/ExtensionOnNestedClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/ExtensionOnNestedClassObject.kt"); } @TestMetadata("Extensions.kt") public void testExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/Extensions.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/Extensions.kt"); } @TestMetadata("InvalidTypeParameters.kt") public void testInvalidTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/InvalidTypeParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/InvalidTypeParameters.kt"); } @TestMetadata("IrrelevantExtension.kt") public void testIrrelevantExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/IrrelevantExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/IrrelevantExtension.kt"); } @TestMetadata("JavaTypeExtension.kt") public void testJavaTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/JavaTypeExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/JavaTypeExtension.kt"); } @TestMetadata("KotlinGenericTypeExtension.kt") public void testKotlinGenericTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/KotlinGenericTypeExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/KotlinGenericTypeExtension.kt"); } @TestMetadata("KotlinTypeExtension.kt") public void testKotlinTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/KotlinTypeExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/KotlinTypeExtension.kt"); } @TestMetadata("MemberExtensionFromWith.kt") public void testMemberExtensionFromWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/MemberExtensionFromWith.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/MemberExtensionFromWith.kt"); } @TestMetadata("MemberExtensionWithoutExplicitReceiver.kt") public void testMemberExtensionWithoutExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/MemberExtensionWithoutExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/MemberExtensionWithoutExplicitReceiver.kt"); } @TestMetadata("MemberExtensionsFromMemberExtension.kt") public void testMemberExtensionsFromMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/MemberExtensionsFromMemberExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/MemberExtensionsFromMemberExtension.kt"); } @TestMetadata("NoDuplicatedMethodForSmartCast.kt") public void testNoDuplicatedMethodForSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/NoDuplicatedMethodForSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/NoDuplicatedMethodForSmartCast.kt"); } @TestMetadata("NoExtensionFromOuter.kt") public void testNoExtensionFromOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/NoExtensionFromOuter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/NoExtensionFromOuter.kt"); } @TestMetadata("NoMemberExtensionsFromCompanionObject.kt") public void testNoMemberExtensionsFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/NoMemberExtensionsFromCompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/NoMemberExtensionsFromCompanionObject.kt"); } @TestMetadata("StarTypeArg.kt") public void testStarTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/StarTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/StarTypeArg.kt"); } @TestMetadata("WrongExplicitReceiver.kt") public void testWrongExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/WrongExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/WrongExplicitReceiver.kt"); } @TestMetadata("WrongImplicitReceiver.kt") public void testWrongImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/extensions/WrongImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/extensions/WrongImplicitReceiver.kt"); } } @@ -1546,16 +1336,18 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromSmart extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterAs.kt") public void testAfterAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/AfterAs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/AfterAs.kt"); } @TestMetadata("AfterAsNoDuplicates.kt") public void testAfterAsNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/AfterAsNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/AfterAsNoDuplicates.kt"); } public void testAllFilesPresentInFromSmart() throws Exception { @@ -1564,62 +1356,52 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("ArrayLiteralAnnotationConstructorAsDefaultValueForArray.kt") public void testArrayLiteralAnnotationConstructorAsDefaultValueForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForArray.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForArray.kt"); } @TestMetadata("ArrayLiteralAnnotationConstructorAsDefaultValueForVararg.kt") public void testArrayLiteralAnnotationConstructorAsDefaultValueForVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationConstructorAsDefaultValueForVararg.kt"); } @TestMetadata("ArrayLiteralAnnotationUseForArray.kt") public void testArrayLiteralAnnotationUseForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForArray.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForArray.kt"); } @TestMetadata("ArrayLiteralAnnotationUseForVararg.kt") public void testArrayLiteralAnnotationUseForVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/ArrayLiteralAnnotationUseForVararg.kt"); } @TestMetadata("EnumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/EnumEntries.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/EnumEntries.kt"); } @TestMetadata("JavaStaticMethods.kt") public void testJavaStaticMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods.kt"); } @TestMetadata("JavaStaticMethods2.kt") public void testJavaStaticMethods2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/JavaStaticMethods2.kt"); } @TestMetadata("MultipleArgs.kt") public void testMultipleArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/MultipleArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/MultipleArgs.kt"); } @TestMetadata("PropertyDelegate.kt") public void testPropertyDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/PropertyDelegate.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/PropertyDelegate.kt"); } @TestMetadata("WhenByEnum.kt") public void testWhenByEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromSmart/WhenByEnum.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromSmart/WhenByEnum.kt"); } } @@ -1627,68 +1409,62 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromUnresolvedNames extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromUnresolvedNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/fromUnresolvedNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunctionInCompanionObject.kt") public void testFunctionInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/FunctionInCompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/FunctionInCompanionObject.kt"); } @TestMetadata("LocalVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/LocalVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/LocalVal.kt"); } @TestMetadata("MemberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberFunction.kt"); } @TestMetadata("MemberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/MemberProperty.kt"); } @TestMetadata("NotForExtensionFunction.kt") public void testNotForExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/NotForExtensionFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/NotForExtensionFunction.kt"); } @TestMetadata("Parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/Parameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/Parameter.kt"); } @TestMetadata("TopLevelClass.kt") public void testTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelFunction.kt"); } @TestMetadata("TopLevelInterface.kt") public void testTopLevelInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelInterface.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelInterface.kt"); } @TestMetadata("TopLevelObject.kt") public void testTopLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/fromUnresolvedNames/TopLevelObject.kt"); } } @@ -1696,26 +1472,27 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GetOperator extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGetOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/getOperator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/getOperator/Extension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/getOperator/Extension.kt"); } @TestMetadata("NotForSafeCall.kt") public void testNotForSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/getOperator/NotForSafeCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/getOperator/NotForSafeCall.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/getOperator/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/getOperator/Simple.kt"); } } @@ -1723,68 +1500,62 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HighOrderFunctions extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHighOrderFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/highOrderFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ContextVariables1.kt") public void testContextVariables1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables1.kt"); } @TestMetadata("ContextVariables2.kt") public void testContextVariables2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables2.kt"); } @TestMetadata("ContextVariables3.kt") public void testContextVariables3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariables3.kt"); } @TestMetadata("ContextVariablesFilter.kt") public void testContextVariablesFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesFilter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesFilter.kt"); } @TestMetadata("ContextVariablesMap.kt") public void testContextVariablesMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesMap.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesMap.kt"); } @TestMetadata("ContextVariablesShadowing.kt") public void testContextVariablesShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesShadowing.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/ContextVariablesShadowing.kt"); } @TestMetadata("HigherOrderFunction1.kt") public void testHigherOrderFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction1.kt"); } @TestMetadata("HigherOrderFunction2.kt") public void testHigherOrderFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/HigherOrderFunction2.kt"); } @TestMetadata("OptionalParameters.kt") public void testOptionalParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/OptionalParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/OptionalParameters.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/highOrderFunctions/SuspendFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/highOrderFunctions/SuspendFunction.kt"); } } @@ -1792,44 +1563,42 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InStringLiterals extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInStringLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/inStringLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EA76497.kt") public void testEA76497() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/EA76497.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/EA76497.kt"); } @TestMetadata("StringTemplate1.kt") public void testStringTemplate1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate1.kt"); } @TestMetadata("StringTemplate2.kt") public void testStringTemplate2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplate2.kt"); } @TestMetadata("StringTemplateDot.kt") public void testStringTemplateDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot.kt"); } @TestMetadata("StringTemplateDot2.kt") public void testStringTemplateDot2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDot2.kt"); } @TestMetadata("StringTemplateDotSomething.kt") public void testStringTemplateDotSomething() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDotSomething.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/inStringLiterals/StringTemplateDotSomething.kt"); } } @@ -1837,68 +1606,62 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaSignature extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/lambdaSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ParameterName1.kt") public void testParameterName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName1.kt"); } @TestMetadata("ParameterName2.kt") public void testParameterName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName2.kt"); } @TestMetadata("ParameterName3.kt") public void testParameterName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName3.kt"); } @TestMetadata("ParameterName4.kt") public void testParameterName4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName4.kt"); } @TestMetadata("ParameterName5.kt") public void testParameterName5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterName5.kt"); } @TestMetadata("ParameterType1.kt") public void testParameterType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType1.kt"); } @TestMetadata("ParameterType2.kt") public void testParameterType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType2.kt"); } @TestMetadata("ParameterType3.kt") public void testParameterType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType3.kt"); } @TestMetadata("ParameterType4.kt") public void testParameterType4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType4.kt"); } @TestMetadata("ParameterType5.kt") public void testParameterType5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/lambdaSignature/ParameterType5.kt"); } } @@ -1906,22 +1669,23 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NamedArguments extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterBrace.kt") public void testAfterBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/AfterBrace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/AfterBrace.kt"); } @TestMetadata("AfterComma.kt") public void testAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/AfterComma.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/AfterComma.kt"); } @TestMetadata("AfterVararg.kt") public void testAfterVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/AfterVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/AfterVararg.kt"); } public void testAllFilesPresentInNamedArguments() throws Exception { @@ -1930,98 +1694,82 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("BooleanArgumentExpected.kt") public void testBooleanArgumentExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/BooleanArgumentExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/BooleanArgumentExpected.kt"); } @TestMetadata("CompactTypeNames.kt") public void testCompactTypeNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/CompactTypeNames.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/CompactTypeNames.kt"); } @TestMetadata("ForEmptyParametersFunction.kt") public void testForEmptyParametersFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/ForEmptyParametersFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/ForEmptyParametersFunction.kt"); } @TestMetadata("InParameterExpression.kt") public void testInParameterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/InParameterExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/InParameterExpression.kt"); } @TestMetadata("NamedArgumentsFromOverloads.kt") public void testNamedArgumentsFromOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads.kt"); } @TestMetadata("NamedArgumentsFromOverloads2.kt") public void testNamedArgumentsFromOverloads2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NamedArgumentsFromOverloads2.kt"); } @TestMetadata("NoAlreadyUsedParameters.kt") public void testNoAlreadyUsedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NoAlreadyUsedParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NoAlreadyUsedParameters.kt"); } @TestMetadata("NoParamsFromUnapplicableOverload.kt") public void testNoParamsFromUnapplicableOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NoParamsFromUnapplicableOverload.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NoParamsFromUnapplicableOverload.kt"); } @TestMetadata("NotAfterDot.kt") public void testNotAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotAfterDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotAfterDot.kt"); } @TestMetadata("NotInBrackets.kt") public void testNotInBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotInBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotInBrackets.kt"); } @TestMetadata("NotInElse.kt") public void testNotInElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotInElse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotInElse.kt"); } @TestMetadata("NotOnlyNamedArguments.kt") public void testNotOnlyNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments.kt"); } @TestMetadata("NotOnlyNamedArguments2.kt") public void testNotOnlyNamedArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/NotOnlyNamedArguments2.kt"); } @TestMetadata("OfConstructor.kt") public void testOfConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/OfConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/OfConstructor.kt"); } @TestMetadata("OnlyNamedArguments.kt") public void testOnlyNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/OnlyNamedArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/OnlyNamedArguments.kt"); } @TestMetadata("WithParameterExpression.kt") public void testWithParameterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/namedArguments/WithParameterExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/namedArguments/WithParameterExpression.kt"); } } @@ -2029,50 +1777,47 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoCompletion extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoCompletion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/noCompletion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DoNotCompleteForErrorReceivers.kt") public void testDoNotCompleteForErrorReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceivers.kt"); } @TestMetadata("DoNotCompleteForErrorReceiversForce.kt") public void testDoNotCompleteForErrorReceiversForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceiversForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/DoNotCompleteForErrorReceiversForce.kt"); } @TestMetadata("InPackageBegin.kt") public void testInPackageBegin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/InPackageBegin.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/InPackageBegin.kt"); } @TestMetadata("NoCompletionAfterBigFloat.kt") public void testNoCompletionAfterBigFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterBigFloat.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterBigFloat.kt"); } @TestMetadata("NoCompletionAfterFloat.kt") public void testNoCompletionAfterFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterFloat.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterFloat.kt"); } @TestMetadata("NoCompletionAfterInt.kt") public void testNoCompletionAfterInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterInt.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterInt.kt"); } @TestMetadata("NoCompletionAfterLong.kt") public void testNoCompletionAfterLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterLong.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/noCompletion/NoCompletionAfterLong.kt"); } } @@ -2080,26 +1825,27 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass.kt") public void testPropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/objects/PropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/objects/PropertyFromCompanionObjectFromTypeAliasToNestedInObjectClass.kt"); } @TestMetadata("PropertyOfTypeAliasToObject.kt") public void testPropertyOfTypeAliasToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/objects/PropertyOfTypeAliasToObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/objects/PropertyOfTypeAliasToObject.kt"); } @TestMetadata("TypeAliasToNestedObject.kt") public void testTypeAliasToNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/objects/TypeAliasToNestedObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/objects/TypeAliasToNestedObject.kt"); } } @@ -2107,26 +1853,27 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorNames extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorNames() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/operatorNames"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NoOperatorNameForTopLevel.kt") public void testNoOperatorNameForTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/operatorNames/NoOperatorNameForTopLevel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/operatorNames/NoOperatorNameForTopLevel.kt"); } @TestMetadata("OperatorNameForExtension.kt") public void testOperatorNameForExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForExtension.kt"); } @TestMetadata("OperatorNameForMember.kt") public void testOperatorNameForMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/operatorNames/OperatorNameForMember.kt"); } } @@ -2134,28 +1881,28 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterFunKeyword.kt") public void testAfterFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterFunKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterFunKeyword.kt"); } @TestMetadata("AfterValKeyword.kt") public void testAfterValKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterValKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterValKeyword.kt"); } @TestMetadata("AfterValKeywordInConstructorParameter.kt") public void testAfterValKeywordInConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterValKeywordInConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterValKeywordInConstructorParameter.kt"); } @TestMetadata("AfterVarKeyword.kt") public void testAfterVarKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/AfterVarKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/AfterVarKeyword.kt"); } public void testAllFilesPresentInOverride() throws Exception { @@ -2164,50 +1911,42 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestMetadata("Generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/Generics.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/Generics.kt"); } @TestMetadata("InConstructorParameters.kt") public void testInConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/InConstructorParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/InConstructorParameters.kt"); } @TestMetadata("InConstructorParameters2.kt") public void testInConstructorParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/InConstructorParameters2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/InConstructorParameters2.kt"); } @TestMetadata("NoOverrideAfterFunKeyword.kt") public void testNoOverrideAfterFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/NoOverrideAfterFunKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/NoOverrideAfterFunKeyword.kt"); } @TestMetadata("PreferImplementToOverride.kt") public void testPreferImplementToOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/PreferImplementToOverride.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/PreferImplementToOverride.kt"); } @TestMetadata("SecondConstructorParameter.kt") public void testSecondConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/SecondConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/SecondConstructorParameter.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/Simple.kt"); } @TestMetadata("TypeFunctionName.kt") public void testTypeFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/override/TypeFunctionName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/override/TypeFunctionName.kt"); } } @@ -2215,170 +1954,147 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterNameAndType extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterNameAndType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/parameterNameAndType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ByAbbreviation.kt") public void testByAbbreviation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ByAbbreviation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ByAbbreviation.kt"); } @TestMetadata("NoAutoInsertion.kt") public void testNoAutoInsertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoAutoInsertion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoAutoInsertion.kt"); } @TestMetadata("NoDuplication.kt") public void testNoDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplication.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplication.kt"); } @TestMetadata("NoDuplicationJava.kt") public void testNoDuplicationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplicationJava.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoDuplicationJava.kt"); } @TestMetadata("NoFromFileAndFromClassesDuplication.kt") public void testNoFromFileAndFromClassesDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NoFromFileAndFromClassesDuplication.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NoFromFileAndFromClassesDuplication.kt"); } @TestMetadata("NotForAnnnotationTypeConstructor.kt") public void testNotForAnnnotationTypeConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnnnotationTypeConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnnnotationTypeConstructor.kt"); } @TestMetadata("NotForAnonymousFunction.kt") public void testNotForAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnonymousFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForAnonymousFunction.kt"); } @TestMetadata("NotForCatchParameter.kt") public void testNotForCatchParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForCatchParameter.kt"); } @TestMetadata("NotForLambdaParameter1.kt") public void testNotForLambdaParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter1.kt"); } @TestMetadata("NotForLambdaParameter2.kt") public void testNotForLambdaParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter2.kt"); } @TestMetadata("NotForLambdaParameter3.kt") public void testNotForLambdaParameter3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForLambdaParameter3.kt"); } @TestMetadata("NotForSetterParameter.kt") public void testNotForSetterParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForSetterParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotForSetterParameter.kt"); } @TestMetadata("NotImported.kt") public void testNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImported.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImported.kt"); } @TestMetadata("NotImportedJava.kt") public void testNotImportedJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImportedJava.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/NotImportedJava.kt"); } @TestMetadata("ParametersInFile.kt") public void testParametersInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFile.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFile.kt"); } @TestMetadata("ParametersInFileInaccessibleType.kt") public void testParametersInFileInaccessibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType.kt"); } @TestMetadata("ParametersInFileInaccessibleType2.kt") public void testParametersInFileInaccessibleType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileInaccessibleType2.kt"); } @TestMetadata("ParametersInFileTypeParameter1.kt") public void testParametersInFileTypeParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter1.kt"); } @TestMetadata("ParametersInFileTypeParameter2.kt") public void testParametersInFileTypeParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter2.kt"); } @TestMetadata("ParametersInFileTypeParameter3.kt") public void testParametersInFileTypeParameter3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ParametersInFileTypeParameter3.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/Simple.kt"); } @TestMetadata("URLConnection.kt") public void testURLConnection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/URLConnection.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/URLConnection.kt"); } @TestMetadata("UserPrefix1.kt") public void testUserPrefix1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix1.kt"); } @TestMetadata("UserPrefix2.kt") public void testUserPrefix2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix2.kt"); } @TestMetadata("UserPrefix3.kt") public void testUserPrefix3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/UserPrefix3.kt"); } @TestMetadata("ValParameter.kt") public void testValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/ValParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/ValParameter.kt"); } @TestMetadata("VarParameter.kt") public void testVarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/parameterNameAndType/VarParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/parameterNameAndType/VarParameter.kt"); } } @@ -2386,122 +2102,107 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Shadowing extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShadowing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/shadowing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InInitializer1.kt") public void testInInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer1.kt"); } @TestMetadata("InInitializer2.kt") public void testInInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer2.kt"); } @TestMetadata("InInitializer3.kt") public void testInInitializer3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer3.kt"); } @TestMetadata("InInitializer4.kt") public void testInInitializer4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer4.kt"); } @TestMetadata("InInitializer5.kt") public void testInInitializer5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer5.kt"); } @TestMetadata("InInitializer6.kt") public void testInInitializer6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer6.kt"); } @TestMetadata("InInitializer7.kt") public void testInInitializer7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/InInitializer7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/InInitializer7.kt"); } @TestMetadata("Locals1.kt") public void testLocals1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/Locals1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/Locals1.kt"); } @TestMetadata("Locals2.kt") public void testLocals2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/Locals2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/Locals2.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/Overloads.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/Overloads.kt"); } @TestMetadata("OverloadsAndVararg.kt") public void testOverloadsAndVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/OverloadsAndVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/OverloadsAndVararg.kt"); } @TestMetadata("PreferCloserMember.kt") public void testPreferCloserMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferCloserMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferCloserMember.kt"); } @TestMetadata("PreferCloserReceiverGeneric.kt") public void testPreferCloserReceiverGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferCloserReceiverGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferCloserReceiverGeneric.kt"); } @TestMetadata("PreferMemberExtension.kt") public void testPreferMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMemberExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMemberExtension.kt"); } @TestMetadata("PreferMemberToExtension.kt") public void testPreferMemberToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToExtension.kt"); } @TestMetadata("PreferMemberToGlobal.kt") public void testPreferMemberToGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToGlobal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMemberToGlobal.kt"); } @TestMetadata("PreferMoreSpecificExtension.kt") public void testPreferMoreSpecificExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtension.kt"); } @TestMetadata("PreferMoreSpecificExtensionGeneric.kt") public void testPreferMoreSpecificExtensionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGeneric.kt"); } @TestMetadata("PreferMoreSpecificExtensionGenericWithParam.kt") public void testPreferMoreSpecificExtensionGenericWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGenericWithParam.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/shadowing/PreferMoreSpecificExtensionGenericWithParam.kt"); } } @@ -2509,50 +2210,47 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCast extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/smartCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MemberExtensionAfterThisSmartCast.kt") public void testMemberExtensionAfterThisSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/MemberExtensionAfterThisSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/MemberExtensionAfterThisSmartCast.kt"); } @TestMetadata("MembersAfterSmartCast.kt") public void testMembersAfterSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/MembersAfterSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/MembersAfterSmartCast.kt"); } @TestMetadata("SmartCastAfterIf.kt") public void testSmartCastAfterIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIf.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIf.kt"); } @TestMetadata("SmartCastAfterIfMethod.kt") public void testSmartCastAfterIfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIfMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastAfterIfMethod.kt"); } @TestMetadata("SmartCastForThis.kt") public void testSmartCastForThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastForThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastForThis.kt"); } @TestMetadata("SmartCastInWhen.kt") public void testSmartCastInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastInWhen.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastInWhen.kt"); } @TestMetadata("SmartCastThis.kt") public void testSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/smartCast/SmartCastThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/smartCast/SmartCastThis.kt"); } } @@ -2560,62 +2258,57 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticMembers extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/staticMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ImportsFromEnumEntry.kt") public void testImportsFromEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromEnumEntry.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromEnumEntry.kt"); } @TestMetadata("ImportsFromNonObject.kt") public void testImportsFromNonObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromNonObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromNonObject.kt"); } @TestMetadata("ImportsFromObjectNoDuplicates.kt") public void testImportsFromObjectNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromObjectNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/ImportsFromObjectNoDuplicates.kt"); } @TestMetadata("JavaStaticFields.kt") public void testJavaStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFields.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFields.kt"); } @TestMetadata("JavaStaticFieldsFromImports.kt") public void testJavaStaticFieldsFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFieldsFromImports.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticFieldsFromImports.kt"); } @TestMetadata("JavaStaticMethods.kt") public void testJavaStaticMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethods.kt"); } @TestMetadata("JavaStaticMethodsFromImports.kt") public void testJavaStaticMethodsFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsFromImports.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsFromImports.kt"); } @TestMetadata("JavaStaticMethodsNoDuplicates.kt") public void testJavaStaticMethodsNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicates.kt"); } @TestMetadata("JavaStaticMethodsNoDuplicatesFromBases.kt") public void testJavaStaticMethodsNoDuplicatesFromBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicatesFromBases.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/staticMembers/JavaStaticMethodsNoDuplicatesFromBases.kt"); } } @@ -2623,50 +2316,47 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SubstitutedSignature extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSubstitutedSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/substitutedSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("SubstitutedSignature1.kt") public void testSubstitutedSignature1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature1.kt"); } @TestMetadata("SubstitutedSignature2.kt") public void testSubstitutedSignature2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature2.kt"); } @TestMetadata("SubstitutedSignature3.kt") public void testSubstitutedSignature3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature3.kt"); } @TestMetadata("SubstitutedSignature4.kt") public void testSubstitutedSignature4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature4.kt"); } @TestMetadata("SubstitutedSignature5.kt") public void testSubstitutedSignature5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature5.kt"); } @TestMetadata("SubstitutedSignature6.kt") public void testSubstitutedSignature6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignature6.kt"); } @TestMetadata("SubstitutedSignatureSOE.kt") public void testSubstitutedSignatureSOE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignatureSOE.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/substitutedSignature/SubstitutedSignatureSOE.kt"); } } @@ -2674,62 +2364,57 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("QualifierType1.kt") public void testQualifierType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType1.kt"); } @TestMetadata("QualifierType2.kt") public void testQualifierType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType2.kt"); } @TestMetadata("QualifierType3.kt") public void testQualifierType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType3.kt"); } @TestMetadata("QualifierType4.kt") public void testQualifierType4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType4.kt"); } @TestMetadata("QualifierType5.kt") public void testQualifierType5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType5.kt"); } @TestMetadata("QualifierType6.kt") public void testQualifierType6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierType6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierType6.kt"); } @TestMetadata("QualifierTypeAny.kt") public void testQualifierTypeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierTypeAny.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierTypeAny.kt"); } @TestMetadata("QualifierTypeAnyInInterface.kt") public void testQualifierTypeAnyInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierTypeAnyInInterface.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierTypeAnyInInterface.kt"); } @TestMetadata("QualifierTypeGeneric.kt") public void testQualifierTypeGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/super/QualifierTypeGeneric.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/super/QualifierTypeGeneric.kt"); } } @@ -2737,62 +2422,57 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArgsOrNot extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArgsOrNot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/typeArgsOrNot"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorTypeArg.kt") public void testConstructorTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/ConstructorTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/ConstructorTypeArg.kt"); } @TestMetadata("FunctionTypeArg.kt") public void testFunctionTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg.kt"); } @TestMetadata("FunctionTypeArg2.kt") public void testFunctionTypeArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/FunctionTypeArg2.kt"); } @TestMetadata("LessThan.kt") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/LessThan.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/LessThan.kt"); } @TestMetadata("NestedTypeArg.kt") public void testNestedTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/NestedTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/NestedTypeArg.kt"); } @TestMetadata("SecondTypeArg.kt") public void testSecondTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg.kt"); } @TestMetadata("SecondTypeArg2.kt") public void testSecondTypeArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg2.kt"); } @TestMetadata("SecondTypeArg3.kt") public void testSecondTypeArg3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg3.kt"); } @TestMetadata("SecondTypeArg4.kt") public void testSecondTypeArg4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/typeArgsOrNot/SecondTypeArg4.kt"); } } @@ -2800,26 +2480,27 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VariableNameAndType extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariableNameAndType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/variableNameAndType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/variableNameAndType/Lateinit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/variableNameAndType/Lateinit.kt"); } @TestMetadata("Local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/variableNameAndType/Local.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/variableNameAndType/Local.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/variableNameAndType/TopLevel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/variableNameAndType/TopLevel.kt"); } } @@ -2827,86 +2508,77 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/common/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("KT9970.kt") public void testKT9970() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/KT9970.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/KT9970.kt"); } @TestMetadata("VisibilityClassMembersFromExternal.kt") public void testVisibilityClassMembersFromExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternal.kt"); } @TestMetadata("VisibilityClassMembersFromExternalForce.kt") public void testVisibilityClassMembersFromExternalForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternalForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityClassMembersFromExternalForce.kt"); } @TestMetadata("VisibilityInSubclass.kt") public void testVisibilityInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclass.kt"); } @TestMetadata("VisibilityInSubclassForce.kt") public void testVisibilityInSubclassForce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclassForce.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityInSubclassForce.kt"); } @TestMetadata("VisibilityPrivateToThis.kt") public void testVisibilityPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThis.kt"); } @TestMetadata("VisibilityPrivateToThisInConstructor.kt") public void testVisibilityPrivateToThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt"); } @TestMetadata("VisibilityPrivateToThisInConstructorWithThis.kt") public void testVisibilityPrivateToThisInConstructorWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt"); } @TestMetadata("VisibilityPrivateToThisInSpecialScope.kt") public void testVisibilityPrivateToThisInSpecialScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInSpecialScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInSpecialScope.kt"); } @TestMetadata("VisibilityPrivateToThisWithReceiver.kt") public void testVisibilityPrivateToThisWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver.kt"); } @TestMetadata("VisibilityPrivateToThisWithReceiver2.kt") public void testVisibilityPrivateToThisWithReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithReceiver2.kt"); } @TestMetadata("VisibilityPrivateToThisWithThis.kt") public void testVisibilityPrivateToThisWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithThis.kt"); } @TestMetadata("VisibilityPrivateToThisWithWrongThis.kt") public void testVisibilityPrivateToThisWithWrongThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithWrongThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisWithWrongThis.kt"); } } } @@ -2915,160 +2587,144 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoForceCompletion.kt") public void testAutoForceCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/AutoForceCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/AutoForceCompletion.kt"); } @TestMetadata("CompletionForExcludedWhenInternalUse.kt") public void testCompletionForExcludedWhenInternalUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/CompletionForExcludedWhenInternalUse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/CompletionForExcludedWhenInternalUse.kt"); } @TestMetadata("ExtensionFromStandardLibrary.kt") public void testExtensionFromStandardLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/ExtensionFromStandardLibrary.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/ExtensionFromStandardLibrary.kt"); } @TestMetadata("InPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/InPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/InPackage.kt"); } @TestMetadata("JavaClassNames.kt") public void testJavaClassNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/JavaClassNames.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/JavaClassNames.kt"); } @TestMetadata("JavaPackage.kt") public void testJavaPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/JavaPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/JavaPackage.kt"); } @TestMetadata("KProperty.kt") public void testKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/KProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/KProperty.kt"); } @TestMetadata("KT9166.kt") public void testKT9166() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/KT9166.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/KT9166.kt"); } @TestMetadata("NoDuplicationForImportedJavaClass.kt") public void testNoDuplicationForImportedJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NoDuplicationForImportedJavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/NoDuplicationForImportedJavaClass.kt"); } @TestMetadata("NoDuplicationForRuntimeClass.kt") public void testNoDuplicationForRuntimeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NoDuplicationForRuntimeClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/NoDuplicationForRuntimeClass.kt"); } @TestMetadata("NoSyntheticClasses.kt") public void testNoSyntheticClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NoSyntheticClasses.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/NoSyntheticClasses.kt"); } @TestMetadata("NonImportedPrefixMatching1.kt") public void testNonImportedPrefixMatching1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NonImportedPrefixMatching1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/NonImportedPrefixMatching1.kt"); } @TestMetadata("NonImportedPrefixMatching2.kt") public void testNonImportedPrefixMatching2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/NonImportedPrefixMatching2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/NonImportedPrefixMatching2.kt"); } @TestMetadata("Number.kt") public void testNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/Number.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/Number.kt"); } @TestMetadata("PackageDirective.kt") public void testPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/PackageDirective.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/PackageDirective.kt"); } @TestMetadata("SAMAdaptersStatic.kt") public void testSAMAdaptersStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/SAMAdaptersStatic.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/SAMAdaptersStatic.kt"); } @TestMetadata("StandardKotlinTypeAliasAfterExplicitlyImported.kt") public void testStandardKotlinTypeAliasAfterExplicitlyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/StandardKotlinTypeAliasAfterExplicitlyImported.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/StandardKotlinTypeAliasAfterExplicitlyImported.kt"); } @TestMetadata("StandardKotlinTypeAliasFirst.kt") public void testStandardKotlinTypeAliasFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/StandardKotlinTypeAliasFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/StandardKotlinTypeAliasFirst.kt"); } @TestMetadata("TopLevelFromStandardLibrary.kt") public void testTopLevelFromStandardLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/TopLevelFromStandardLibrary.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/TopLevelFromStandardLibrary.kt"); } @TestMetadata("idea/idea-completion/testData/basic/java/boldOrGrayed") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoldOrGrayed extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoldOrGrayed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/java/boldOrGrayed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ImmediateMembersForPlatformType.kt") public void testImmediateMembersForPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/boldOrGrayed/ImmediateMembersForPlatformType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/boldOrGrayed/ImmediateMembersForPlatformType.kt"); } @TestMetadata("NonPredictableSmartCast1.kt") public void testNonPredictableSmartCast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/boldOrGrayed/NonPredictableSmartCast1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/boldOrGrayed/NonPredictableSmartCast1.kt"); } @TestMetadata("NonPredictableSmartCast2.kt") public void testNonPredictableSmartCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/boldOrGrayed/NonPredictableSmartCast2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/boldOrGrayed/NonPredictableSmartCast2.kt"); } @TestMetadata("SyntheticJavaProperties1.kt") public void testSyntheticJavaProperties1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/boldOrGrayed/SyntheticJavaProperties1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/boldOrGrayed/SyntheticJavaProperties1.kt"); } @TestMetadata("SyntheticJavaProperties2.kt") public void testSyntheticJavaProperties2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/boldOrGrayed/SyntheticJavaProperties2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/boldOrGrayed/SyntheticJavaProperties2.kt"); } } @@ -3076,62 +2732,57 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportAliases extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportAliases() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/java/importAliases"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/Class.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/Class.kt"); } @TestMetadata("ExtensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/ExtensionFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/ExtensionFun.kt"); } @TestMetadata("ExtensionValSmart.kt") public void testExtensionValSmart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/ExtensionValSmart.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/ExtensionValSmart.kt"); } @TestMetadata("KDoc.kt") public void testKDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/KDoc.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/KDoc.kt"); } @TestMetadata("KDocExtension.kt") public void testKDocExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/KDocExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/KDocExtension.kt"); } @TestMetadata("PrefixUsed.kt") public void testPrefixUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/PrefixUsed.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/PrefixUsed.kt"); } @TestMetadata("TopLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/TopLevelFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/TopLevelFun.kt"); } @TestMetadata("TopLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/TopLevelVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/TopLevelVal.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/importAliases/TypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/importAliases/TypeAlias.kt"); } } @@ -3139,68 +2790,62 @@ public class JvmBasicCompletionTestGenerated extends AbstractJvmBasicCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticExtensions extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSyntheticExtensions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/java/syntheticExtensions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DoNotHideGetterWhenExtensionCannotBeUsed.kt") public void testDoNotHideGetterWhenExtensionCannotBeUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/DoNotHideGetterWhenExtensionCannotBeUsed.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/DoNotHideGetterWhenExtensionCannotBeUsed.kt"); } @TestMetadata("InGenericClass.kt") public void testInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/InGenericClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/InGenericClass.kt"); } @TestMetadata("NullableReceiver.kt") public void testNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/NullableReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/NullableReceiver.kt"); } @TestMetadata("SafeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/SafeCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/SafeCall.kt"); } @TestMetadata("ShowGetSetOnSecondCompletion.kt") public void testShowGetSetOnSecondCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/ShowGetSetOnSecondCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/ShowGetSetOnSecondCompletion.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/SmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/SmartCast.kt"); } @TestMetadata("SmartCast2.kt") public void testSmartCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/SmartCast2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/SmartCast2.kt"); } @TestMetadata("SuppressedByNotPropertyList.kt") public void testSuppressedByNotPropertyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/SuppressedByNotPropertyList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/SuppressedByNotPropertyList.kt"); } @TestMetadata("SyntheticExtensions1.kt") public void testSyntheticExtensions1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/SyntheticExtensions1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/SyntheticExtensions1.kt"); } @TestMetadata("SyntheticExtensions2.kt") public void testSyntheticExtensions2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/java/syntheticExtensions/SyntheticExtensions2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/java/syntheticExtensions/SyntheticExtensions2.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java index f3fdf615331..24cb8341cf2 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmSmartCompletionTestGenerated.java @@ -21,28 +21,28 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractMembers.kt") public void testAbstractMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/AbstractMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/AbstractMembers.kt"); } @TestMetadata("AfterEmptyArgument.kt") public void testAfterEmptyArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/AfterEmptyArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/AfterEmptyArgument.kt"); } @TestMetadata("AfterExclSign.kt") public void testAfterExclSign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/AfterExclSign.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/AfterExclSign.kt"); } @TestMetadata("AfterNamedArgument.kt") public void testAfterNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/AfterNamedArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/AfterNamedArgument.kt"); } public void testAllFilesPresentInSmart() throws Exception { @@ -51,582 +51,490 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("AnyExpected.kt") public void testAnyExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/AnyExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/AnyExpected.kt"); } @TestMetadata("BeforeArgumentWithBinaryOperation.kt") public void testBeforeArgumentWithBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/BeforeArgumentWithBinaryOperation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/BeforeArgumentWithBinaryOperation.kt"); } @TestMetadata("BeforeArgumentWithBinaryOperation2.kt") public void testBeforeArgumentWithBinaryOperation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/BeforeArgumentWithBinaryOperation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/BeforeArgumentWithBinaryOperation2.kt"); } @TestMetadata("BeforeArgumentWithBinaryOperation3.kt") public void testBeforeArgumentWithBinaryOperation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/BeforeArgumentWithBinaryOperation3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/BeforeArgumentWithBinaryOperation3.kt"); } @TestMetadata("BooleanArgumentExpected.kt") public void testBooleanArgumentExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/BooleanArgumentExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/BooleanArgumentExpected.kt"); } @TestMetadata("BooleanExpected.kt") public void testBooleanExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/BooleanExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/BooleanExpected.kt"); } @TestMetadata("BooleanOrNullableArgumentExpected.kt") public void testBooleanOrNullableArgumentExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/BooleanOrNullableArgumentExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/BooleanOrNullableArgumentExpected.kt"); } @TestMetadata("ChainedCall.kt") public void testChainedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ChainedCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ChainedCall.kt"); } @TestMetadata("ClassObjectMembers.kt") public void testClassObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ClassObjectMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ClassObjectMembers.kt"); } @TestMetadata("ClassObjectMembersForNullable.kt") public void testClassObjectMembersForNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ClassObjectMembersForNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ClassObjectMembersForNullable.kt"); } @TestMetadata("ClassObjectMembersWithPrefix.kt") public void testClassObjectMembersWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ClassObjectMembersWithPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ClassObjectMembersWithPrefix.kt"); } @TestMetadata("EA70945.kt") public void testEA70945() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EA70945.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/EA70945.kt"); } @TestMetadata("EmptyPrefix.kt") public void testEmptyPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EmptyPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/EmptyPrefix.kt"); } @TestMetadata("EnumMembers.kt") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EnumMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/EnumMembers.kt"); } @TestMetadata("EqOperator.kt") public void testEqOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EqOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/EqOperator.kt"); } @TestMetadata("EqOperatorPlatformType.kt") public void testEqOperatorPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/EqOperatorPlatformType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/EqOperatorPlatformType.kt"); } @TestMetadata("ExtensionFunctionTypeVariables.kt") public void testExtensionFunctionTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ExtensionFunctionTypeVariables.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ExtensionFunctionTypeVariables.kt"); } @TestMetadata("FilterTo.kt") public void testFilterTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/FilterTo.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/FilterTo.kt"); } @TestMetadata("GetOperator.kt") public void testGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/GetOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/GetOperator.kt"); } @TestMetadata("GroupBySubstitutor.kt") public void testGroupBySubstitutor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/GroupBySubstitutor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/GroupBySubstitutor.kt"); } @TestMetadata("HighOrderFunction.kt") public void testHighOrderFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/HighOrderFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/HighOrderFunction.kt"); } @TestMetadata("IfCondition.kt") public void testIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/IfCondition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/IfCondition.kt"); } @TestMetadata("ImmediateExtensionMembers.kt") public void testImmediateExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImmediateExtensionMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImmediateExtensionMembers.kt"); } @TestMetadata("ImmediateMembers.kt") public void testImmediateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImmediateMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImmediateMembers.kt"); } @TestMetadata("ImplicitInvoke.kt") public void testImplicitInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitInvoke.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitInvoke.kt"); } @TestMetadata("ImplicitlyTypedFunBody.kt") public void testImplicitlyTypedFunBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedFunBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitlyTypedFunBody.kt"); } @TestMetadata("ImplicitlyTypedOverrideFunBody.kt") public void testImplicitlyTypedOverrideFunBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedOverrideFunBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitlyTypedOverrideFunBody.kt"); } @TestMetadata("ImplicitlyTypedOverrideValInitializer.kt") public void testImplicitlyTypedOverrideValInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedOverrideValInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitlyTypedOverrideValInitializer.kt"); } @TestMetadata("ImplicitlyTypedValInitializer1.kt") public void testImplicitlyTypedValInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializer1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializer1.kt"); } @TestMetadata("ImplicitlyTypedValInitializer2.kt") public void testImplicitlyTypedValInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializer2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializer2.kt"); } @TestMetadata("ImplicitlyTypedValInitializerUnknownType.kt") public void testImplicitlyTypedValInitializerUnknownType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializerUnknownType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ImplicitlyTypedValInitializerUnknownType.kt"); } @TestMetadata("InCompanionObject.kt") public void testInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InCompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InCompanionObject.kt"); } @TestMetadata("InNestedClass.kt") public void testInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InNestedClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InNestedClass.kt"); } @TestMetadata("InaccessibleConstructor.kt") public void testInaccessibleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InaccessibleConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InaccessibleConstructor.kt"); } @TestMetadata("InaccessibleDeclarations.kt") public void testInaccessibleDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InaccessibleDeclarations.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InaccessibleDeclarations.kt"); } @TestMetadata("IndexingOperator.kt") public void testIndexingOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/IndexingOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/IndexingOperator.kt"); } @TestMetadata("InfixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InfixCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InfixCall.kt"); } @TestMetadata("InsideIdentifier.kt") public void testInsideIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InsideIdentifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InsideIdentifier.kt"); } @TestMetadata("InvokeFunctionVariable.kt") public void testInvokeFunctionVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/InvokeFunctionVariable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/InvokeFunctionVariable.kt"); } @TestMetadata("JavaEnumMembers.kt") public void testJavaEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/JavaEnumMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/JavaEnumMembers.kt"); } @TestMetadata("JavaEnumMembersAfterQualifier.kt") public void testJavaEnumMembersAfterQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/JavaEnumMembersAfterQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/JavaEnumMembersAfterQualifier.kt"); } @TestMetadata("JavaEnumMembersForNullable.kt") public void testJavaEnumMembersForNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/JavaEnumMembersForNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/JavaEnumMembersForNullable.kt"); } @TestMetadata("JavaStaticFields.kt") public void testJavaStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/JavaStaticFields.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/JavaStaticFields.kt"); } @TestMetadata("JavaStaticFieldsForNullable.kt") public void testJavaStaticFieldsForNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/JavaStaticFieldsForNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/JavaStaticFieldsForNullable.kt"); } @TestMetadata("JavaStaticMethods.kt") public void testJavaStaticMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/JavaStaticMethods.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/JavaStaticMethods.kt"); } @TestMetadata("kt5873.kt") public void testKt5873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/kt5873.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/kt5873.kt"); } @TestMetadata("LambdaValue1.kt") public void testLambdaValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/LambdaValue1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/LambdaValue1.kt"); } @TestMetadata("LambdaValue2.kt") public void testLambdaValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/LambdaValue2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/LambdaValue2.kt"); } @TestMetadata("LambdaValue3.kt") public void testLambdaValue3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/LambdaValue3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/LambdaValue3.kt"); } @TestMetadata("LambdaValue4.kt") public void testLambdaValue4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/LambdaValue4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/LambdaValue4.kt"); } @TestMetadata("MapTo.kt") public void testMapTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/MapTo.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/MapTo.kt"); } @TestMetadata("MapTo2.kt") public void testMapTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/MapTo2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/MapTo2.kt"); } @TestMetadata("MethodCallArgument.kt") public void testMethodCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/MethodCallArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/MethodCallArgument.kt"); } @TestMetadata("NamedArgument.kt") public void testNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NamedArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NamedArgument.kt"); } @TestMetadata("NoAssertFailsWith.kt") public void testNoAssertFailsWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NoAssertFailsWith.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NoAssertFailsWith.kt"); } @TestMetadata("NoExtensionMethodFromClassObject.kt") public void testNoExtensionMethodFromClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NoExtensionMethodFromClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NoExtensionMethodFromClassObject.kt"); } @TestMetadata("NoNothing.kt") public void testNoNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NoNothing.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NoNothing.kt"); } @TestMetadata("NoPrivateOverload.kt") public void testNoPrivateOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NoPrivateOverload.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NoPrivateOverload.kt"); } @TestMetadata("NoSillyAssignment.kt") public void testNoSillyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NoSillyAssignment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NoSillyAssignment.kt"); } @TestMetadata("NotEqOperator.kt") public void testNotEqOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NotEqOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NotEqOperator.kt"); } @TestMetadata("NotSillyAssignment.kt") public void testNotSillyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NotSillyAssignment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NotSillyAssignment.kt"); } @TestMetadata("Null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/Null.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/Null.kt"); } @TestMetadata("NullableBooleanExpected.kt") public void testNullableBooleanExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/NullableBooleanExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/NullableBooleanExpected.kt"); } @TestMetadata("Object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/Object.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/Object.kt"); } @TestMetadata("ObjectsFromType.kt") public void testObjectsFromType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ObjectsFromType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ObjectsFromType.kt"); } @TestMetadata("OverloadedConstructorArgument.kt") public void testOverloadedConstructorArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/OverloadedConstructorArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/OverloadedConstructorArgument.kt"); } @TestMetadata("OverloadedMethodCallArgument1.kt") public void testOverloadedMethodCallArgument1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/OverloadedMethodCallArgument1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/OverloadedMethodCallArgument1.kt"); } @TestMetadata("OverloadedMethodCallArgument2.kt") public void testOverloadedMethodCallArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/OverloadedMethodCallArgument2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/OverloadedMethodCallArgument2.kt"); } @TestMetadata("OverloadedMethodCallArgument3.kt") public void testOverloadedMethodCallArgument3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/OverloadedMethodCallArgument3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/OverloadedMethodCallArgument3.kt"); } @TestMetadata("ParameterWithDefaultValue.kt") public void testParameterWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ParameterWithDefaultValue.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ParameterWithDefaultValue.kt"); } @TestMetadata("PreviousArgError.kt") public void testPreviousArgError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/PreviousArgError.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/PreviousArgError.kt"); } @TestMetadata("PreviousArgMismatchedType.kt") public void testPreviousArgMismatchedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/PreviousArgMismatchedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/PreviousArgMismatchedType.kt"); } @TestMetadata("QualifiedOverloadedMethodCallArgument1.kt") public void testQualifiedOverloadedMethodCallArgument1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/QualifiedOverloadedMethodCallArgument1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/QualifiedOverloadedMethodCallArgument1.kt"); } @TestMetadata("QualifiedOverloadedMethodCallArgument2.kt") public void testQualifiedOverloadedMethodCallArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/QualifiedOverloadedMethodCallArgument2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/QualifiedOverloadedMethodCallArgument2.kt"); } @TestMetadata("SAMConstructorForTypeAlias.kt") public void testSAMConstructorForTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SAMConstructorForTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SAMConstructorForTypeAlias.kt"); } @TestMetadata("SAMExpected1.kt") public void testSAMExpected1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SAMExpected1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SAMExpected1.kt"); } @TestMetadata("SAMExpected2.kt") public void testSAMExpected2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SAMExpected2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SAMExpected2.kt"); } @TestMetadata("SealedMembers.kt") public void testSealedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SealedMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SealedMembers.kt"); } @TestMetadata("SkipDeclarationsOfType.kt") public void testSkipDeclarationsOfType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SkipDeclarationsOfType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SkipDeclarationsOfType.kt"); } @TestMetadata("SkipUnresolvedTypes.kt") public void testSkipUnresolvedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SkipUnresolvedTypes.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SkipUnresolvedTypes.kt"); } @TestMetadata("SuperConstructorArgument.kt") public void testSuperConstructorArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SuperConstructorArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SuperConstructorArgument.kt"); } @TestMetadata("SuperConstructorArgumentInClassHeader.kt") public void testSuperConstructorArgumentInClassHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SuperConstructorArgumentInClassHeader.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SuperConstructorArgumentInClassHeader.kt"); } @TestMetadata("SuperMembers.kt") public void testSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SuperMembers.kt"); } @TestMetadata("SuperMembers2.kt") public void testSuperMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/SuperMembers2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/SuperMembers2.kt"); } @TestMetadata("ThisConstructorArgument.kt") public void testThisConstructorArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ThisConstructorArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ThisConstructorArgument.kt"); } @TestMetadata("UnresolvedExpectedType.kt") public void testUnresolvedExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/UnresolvedExpectedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/UnresolvedExpectedType.kt"); } @TestMetadata("VariableAsFunction1.kt") public void testVariableAsFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/VariableAsFunction1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/VariableAsFunction1.kt"); } @TestMetadata("VariableAsFunction3.kt") public void testVariableAsFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/VariableAsFunction3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/VariableAsFunction3.kt"); } @TestMetadata("VariableInitializer.kt") public void testVariableInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/VariableInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/VariableInitializer.kt"); } @TestMetadata("WithPrefix.kt") public void testWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/WithPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/WithPrefix.kt"); } @TestMetadata("WithQualifier.kt") public void testWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/WithQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/WithQualifier.kt"); } @TestMetadata("WrongNumberOfTypeArguments.kt") public void testWrongNumberOfTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/WrongNumberOfTypeArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/WrongNumberOfTypeArguments.kt"); } @TestMetadata("WrongReceiver.kt") public void testWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/WrongReceiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/WrongReceiver.kt"); } @TestMetadata("idea/idea-completion/testData/smart/afterAs") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AfterAs extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/afterAs/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/afterAs/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/afterAs/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/afterAs/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/afterAs/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/afterAs/3.kt"); } public void testAllFilesPresentInAfterAs() throws Exception { @@ -638,16 +546,18 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousObject extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/anonymousObject/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/anonymousObject/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/anonymousObject/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/anonymousObject/2.kt"); } public void testAllFilesPresentInAnonymousObject() throws Exception { @@ -656,20 +566,17 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("ForJavaInterface.kt") public void testForJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/anonymousObject/ForJavaInterface.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/anonymousObject/ForJavaInterface.kt"); } @TestMetadata("UninferredTypeArgs.kt") public void testUninferredTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/anonymousObject/UninferredTypeArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/anonymousObject/UninferredTypeArgs.kt"); } @TestMetadata("WithPrefix.kt") public void testWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/anonymousObject/WithPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/anonymousObject/WithPrefix.kt"); } } @@ -677,10 +584,13 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterDot.kt") public void testAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/AfterDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/AfterDot.kt"); } public void testAllFilesPresentInCallableReference() throws Exception { @@ -689,134 +599,112 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("ClassLiteral.kt") public void testClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/ClassLiteral.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/ClassLiteral.kt"); } @TestMetadata("ClassLiteralDotJava.kt") public void testClassLiteralDotJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/ClassLiteralDotJava.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/ClassLiteralDotJava.kt"); } @TestMetadata("ConcreteJavaClassExpected.kt") public void testConcreteJavaClassExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/ConcreteJavaClassExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/ConcreteJavaClassExpected.kt"); } @TestMetadata("ConcreteKClassExpected.kt") public void testConcreteKClassExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/ConcreteKClassExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/ConcreteKClassExpected.kt"); } @TestMetadata("ConcreteKClassExpectedNoDuplicates.kt") public void testConcreteKClassExpectedNoDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/ConcreteKClassExpectedNoDuplicates.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/ConcreteKClassExpectedNoDuplicates.kt"); } @TestMetadata("EmptyQualifier1.kt") public void testEmptyQualifier1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/EmptyQualifier1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/EmptyQualifier1.kt"); } @TestMetadata("EmptyQualifier2.kt") public void testEmptyQualifier2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/EmptyQualifier2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/EmptyQualifier2.kt"); } @TestMetadata("EmptyQualifier3.kt") public void testEmptyQualifier3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/EmptyQualifier3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/EmptyQualifier3.kt"); } @TestMetadata("ExpressionQualifier.kt") public void testExpressionQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/ExpressionQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/ExpressionQualifier.kt"); } @TestMetadata("NoQualifier1.kt") public void testNoQualifier1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier1.kt"); } @TestMetadata("NoQualifier10.kt") public void testNoQualifier10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier10.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier10.kt"); } @TestMetadata("NoQualifier12.kt") public void testNoQualifier12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier12.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier12.kt"); } @TestMetadata("NoQualifier2.kt") public void testNoQualifier2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier2.kt"); } @TestMetadata("NoQualifier3.kt") public void testNoQualifier3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier3.kt"); } @TestMetadata("NoQualifier4.kt") public void testNoQualifier4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier4.kt"); } @TestMetadata("NoQualifier7.kt") public void testNoQualifier7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier7.kt"); } @TestMetadata("NoQualifier9.kt") public void testNoQualifier9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifier9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifier9.kt"); } @TestMetadata("NoQualifierMultipleConstructors.kt") public void testNoQualifierMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifierMultipleConstructors.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifierMultipleConstructors.kt"); } @TestMetadata("NoQualifierPropertyExpected.kt") public void testNoQualifierPropertyExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NoQualifierPropertyExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NoQualifierPropertyExpected.kt"); } @TestMetadata("NonConcreteKClassExpected.kt") public void testNonConcreteKClassExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NonConcreteKClassExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NonConcreteKClassExpected.kt"); } @TestMetadata("NonEmptyQualifier1.kt") public void testNonEmptyQualifier1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NonEmptyQualifier1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NonEmptyQualifier1.kt"); } @TestMetadata("NonEmptyQualifier2.kt") public void testNonEmptyQualifier2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/callableReference/NonEmptyQualifier2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/callableReference/NonEmptyQualifier2.kt"); } } @@ -824,116 +712,102 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorViaTypeAlias.kt") public void testConstructorViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/ConstructorViaTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/ConstructorViaTypeAlias.kt"); } @TestMetadata("ConstructorWithTypeParamsPartialSubstitution1ViaTypeAlias.kt") public void testConstructorWithTypeParamsPartialSubstitution1ViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsPartialSubstitution1ViaTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsPartialSubstitution1ViaTypeAlias.kt"); } @TestMetadata("ConstructorWithTypeParamsPartialSubstitution2ViaTypeAlias.kt") public void testConstructorWithTypeParamsPartialSubstitution2ViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsPartialSubstitution2ViaTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsPartialSubstitution2ViaTypeAlias.kt"); } @TestMetadata("ConstructorWithTypeParamsSubstitutionViaTypeAlias.kt") public void testConstructorWithTypeParamsSubstitutionViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsSubstitutionViaTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsSubstitutionViaTypeAlias.kt"); } @TestMetadata("ConstructorWithTypeParamsViaTypeAlias.kt") public void testConstructorWithTypeParamsViaTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsViaTypeAlias.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/ConstructorWithTypeParamsViaTypeAlias.kt"); } @TestMetadata("GenericJavaClass.kt") public void testGenericJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/GenericJavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/GenericJavaClass.kt"); } @TestMetadata("GenericType.kt") public void testGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/GenericType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/GenericType.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/InnerClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/InnerClass.kt"); } @TestMetadata("JavaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/JavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/JavaClass.kt"); } @TestMetadata("NoConstructorWithQualifier.kt") public void testNoConstructorWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/NoConstructorWithQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/NoConstructorWithQualifier.kt"); } @TestMetadata("NoInnerClassInstantiation.kt") public void testNoInnerClassInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/NoInnerClassInstantiation.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/NoInnerClassInstantiation.kt"); } @TestMetadata("Nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/Nullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/Nullable.kt"); } @TestMetadata("PrivateConstructorForAbstract.kt") public void testPrivateConstructorForAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/PrivateConstructorForAbstract.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/PrivateConstructorForAbstract.kt"); } @TestMetadata("ProtectedConstructorForAbstract.kt") public void testProtectedConstructorForAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/ProtectedConstructorForAbstract.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/ProtectedConstructorForAbstract.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/Simple.kt"); } @TestMetadata("StarProjection1.kt") public void testStarProjection1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/StarProjection1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/StarProjection1.kt"); } @TestMetadata("StarProjection2.kt") public void testStarProjection2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/StarProjection2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/StarProjection2.kt"); } @TestMetadata("WithParameters.kt") public void testWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/constructor/WithParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/constructor/WithParameters.kt"); } } @@ -941,10 +815,13 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForLoopRange extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterDot.kt") public void testAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/AfterDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/AfterDot.kt"); } public void testAllFilesPresentInForLoopRange() throws Exception { @@ -953,38 +830,32 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("ExtensionIteratorMethod.kt") public void testExtensionIteratorMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/ExtensionIteratorMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/ExtensionIteratorMethod.kt"); } @TestMetadata("NoGenericT.kt") public void testNoGenericT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/NoGenericT.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/NoGenericT.kt"); } @TestMetadata("Nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/Nullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/Nullable.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/Simple.kt"); } @TestMetadata("SmartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/SmartCasts.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/SmartCasts.kt"); } @TestMetadata("TypedLoopVar.kt") public void testTypedLoopVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/forLoopRange/TypedLoopVar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/forLoopRange/TypedLoopVar.kt"); } } @@ -992,34 +863,33 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiterals extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/4.kt"); } @TestMetadata("5.kt") public void test5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/5.kt"); } public void testAllFilesPresentInFunctionLiterals() throws Exception { @@ -1028,74 +898,62 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("ExplicitParameterTypesRequired.kt") public void testExplicitParameterTypesRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/ExplicitParameterTypesRequired.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/ExplicitParameterTypesRequired.kt"); } @TestMetadata("OutsideCallParenthesis1.kt") public void testOutsideCallParenthesis1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis1.kt"); } @TestMetadata("OutsideCallParenthesis2.kt") public void testOutsideCallParenthesis2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis2.kt"); } @TestMetadata("OutsideCallParenthesis3.kt") public void testOutsideCallParenthesis3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis3.kt"); } @TestMetadata("OutsideCallParenthesis4.kt") public void testOutsideCallParenthesis4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis4.kt"); } @TestMetadata("OutsideCallParenthesis5.kt") public void testOutsideCallParenthesis5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis5.kt"); } @TestMetadata("OutsideCallParenthesis6.kt") public void testOutsideCallParenthesis6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis6.kt"); } @TestMetadata("OutsideCallParenthesis7.kt") public void testOutsideCallParenthesis7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis7.kt"); } @TestMetadata("OutsideCallParenthesis8.kt") public void testOutsideCallParenthesis8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis8.kt"); } @TestMetadata("OutsideCallParenthesis9.kt") public void testOutsideCallParenthesis9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesis9.kt"); } @TestMetadata("OutsideCallParenthesisAndVararg1.kt") public void testOutsideCallParenthesisAndVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesisAndVararg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesisAndVararg1.kt"); } @TestMetadata("OutsideCallParenthesisAndVararg2.kt") public void testOutsideCallParenthesisAndVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesisAndVararg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/functionLiterals/OutsideCallParenthesisAndVararg2.kt"); } } @@ -1103,44 +961,42 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("GenericFunction1.kt") public void testGenericFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/generics/GenericFunction1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/generics/GenericFunction1.kt"); } @TestMetadata("GenericFunction2.kt") public void testGenericFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/generics/GenericFunction2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/generics/GenericFunction2.kt"); } @TestMetadata("GenericFunction3.kt") public void testGenericFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/generics/GenericFunction3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/generics/GenericFunction3.kt"); } @TestMetadata("GenericFunction4.kt") public void testGenericFunction4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/generics/GenericFunction4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/generics/GenericFunction4.kt"); } @TestMetadata("GenericFunction5.kt") public void testGenericFunction5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/generics/GenericFunction5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/generics/GenericFunction5.kt"); } @TestMetadata("GenericMethodArgument.kt") public void testGenericMethodArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/generics/GenericMethodArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/generics/GenericMethodArgument.kt"); } } @@ -1148,86 +1004,77 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HeuristicSignatures extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHeuristicSignatures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/heuristicSignatures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Contains.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/Contains.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/Contains.kt"); } @TestMetadata("ContainsAll.kt") public void testContainsAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/ContainsAll.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/ContainsAll.kt"); } @TestMetadata("ContainsKey.kt") public void testContainsKey() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/ContainsKey.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/ContainsKey.kt"); } @TestMetadata("ContainsValue.kt") public void testContainsValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/ContainsValue.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/ContainsValue.kt"); } @TestMetadata("Get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/Get.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/Get.kt"); } @TestMetadata("GetWithBrackets.kt") public void testGetWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/GetWithBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/GetWithBrackets.kt"); } @TestMetadata("InOperator.kt") public void testInOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/InOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/InOperator.kt"); } @TestMetadata("IndexOf.kt") public void testIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/IndexOf.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/IndexOf.kt"); } @TestMetadata("LastIndexOf.kt") public void testLastIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/LastIndexOf.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/LastIndexOf.kt"); } @TestMetadata("MapRemove.kt") public void testMapRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/MapRemove.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/MapRemove.kt"); } @TestMetadata("Remove.kt") public void testRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/Remove.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/Remove.kt"); } @TestMetadata("RemoveAll.kt") public void testRemoveAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/RemoveAll.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/RemoveAll.kt"); } @TestMetadata("RetainAll.kt") public void testRetainAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/heuristicSignatures/RetainAll.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/heuristicSignatures/RetainAll.kt"); } } @@ -1235,28 +1082,28 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfValue extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ifValue/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ifValue/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ifValue/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ifValue/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ifValue/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ifValue/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ifValue/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ifValue/4.kt"); } public void testAllFilesPresentInIfValue() throws Exception { @@ -1265,14 +1112,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("InBlock1.kt") public void testInBlock1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ifValue/InBlock1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ifValue/InBlock1.kt"); } @TestMetadata("InBlock2.kt") public void testInBlock2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/ifValue/InBlock2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/ifValue/InBlock2.kt"); } } @@ -1280,40 +1125,38 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InElvisOperator extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inElvisOperator/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inElvisOperator/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inElvisOperator/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inElvisOperator/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inElvisOperator/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inElvisOperator/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inElvisOperator/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inElvisOperator/4.kt"); } @TestMetadata("5.kt") public void test5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inElvisOperator/5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inElvisOperator/5.kt"); } @TestMetadata("6.kt") public void test6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inElvisOperator/6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inElvisOperator/6.kt"); } public void testAllFilesPresentInInElvisOperator() throws Exception { @@ -1325,68 +1168,62 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InOperator extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/inOperator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ExtensionContains.kt") public void testExtensionContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/ExtensionContains.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/ExtensionContains.kt"); } @TestMetadata("FilterByArgumentType.kt") public void testFilterByArgumentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/FilterByArgumentType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/FilterByArgumentType.kt"); } @TestMetadata("GenericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/GenericMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/GenericMethod.kt"); } @TestMetadata("GenericMethod2.kt") public void testGenericMethod2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/GenericMethod2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/GenericMethod2.kt"); } @TestMetadata("GenericMethod3.kt") public void testGenericMethod3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/GenericMethod3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/GenericMethod3.kt"); } @TestMetadata("NonBooleanContains.kt") public void testNonBooleanContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/NonBooleanContains.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/NonBooleanContains.kt"); } @TestMetadata("NotIn.kt") public void testNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/NotIn.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/NotIn.kt"); } @TestMetadata("Nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/Nullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/Nullable.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/Simple.kt"); } @TestMetadata("SmartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inOperator/SmartCasts.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inOperator/SmartCasts.kt"); } } @@ -1394,22 +1231,23 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritors extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/3.kt"); } public void testAllFilesPresentInInheritors() throws Exception { @@ -1418,38 +1256,32 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("GenericClass1.kt") public void testGenericClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/GenericClass1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/GenericClass1.kt"); } @TestMetadata("GenericClass2.kt") public void testGenericClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/GenericClass2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/GenericClass2.kt"); } @TestMetadata("GenericClass3.kt") public void testGenericClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/GenericClass3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/GenericClass3.kt"); } @TestMetadata("GenericClass4.kt") public void testGenericClass4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/GenericClass4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/GenericClass4.kt"); } @TestMetadata("GenericClass5.kt") public void testGenericClass5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/GenericClass5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/GenericClass5.kt"); } @TestMetadata("GenericClass6.kt") public void testGenericClass6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/inheritors/GenericClass6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/inheritors/GenericClass6.kt"); } } @@ -1457,44 +1289,42 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaSignature extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/lambdaSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ExplicitParameterTypesRequired.kt") public void testExplicitParameterTypesRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/lambdaSignature/ExplicitParameterTypesRequired.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/lambdaSignature/ExplicitParameterTypesRequired.kt"); } @TestMetadata("Map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/lambdaSignature/Map.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/lambdaSignature/Map.kt"); } @TestMetadata("MultipleParameters.kt") public void testMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/lambdaSignature/MultipleParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/lambdaSignature/MultipleParameters.kt"); } @TestMetadata("NotAfterComma.kt") public void testNotAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/lambdaSignature/NotAfterComma.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/lambdaSignature/NotAfterComma.kt"); } @TestMetadata("NotInBody.kt") public void testNotInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/lambdaSignature/NotInBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/lambdaSignature/NotInBody.kt"); } @TestMetadata("SingleParameter.kt") public void testSingleParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/lambdaSignature/SingleParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/lambdaSignature/SingleParameter.kt"); } } @@ -1502,70 +1332,63 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultipleArgsItem extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/1.kt"); } @TestMetadata("10.kt") public void test10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/10.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/10.kt"); } @TestMetadata("11.kt") public void test11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/11.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/11.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/4.kt"); } @TestMetadata("5.kt") public void test5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/5.kt"); } @TestMetadata("6.kt") public void test6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/6.kt"); } @TestMetadata("7.kt") public void test7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/7.kt"); } @TestMetadata("8.kt") public void test8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/8.kt"); } @TestMetadata("9.kt") public void test9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/9.kt"); } public void testAllFilesPresentInMultipleArgsItem() throws Exception { @@ -1574,14 +1397,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("CallWithBrackets.kt") public void testCallWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/CallWithBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/CallWithBrackets.kt"); } @TestMetadata("notFirstArgument.kt") public void testNotFirstArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/multipleArgsItem/notFirstArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/multipleArgsItem/notFirstArgument.kt"); } } @@ -1589,152 +1410,132 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyDelegate extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/propertyDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConflictingSubstitutors.kt") public void testConflictingSubstitutors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ConflictingSubstitutors.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ConflictingSubstitutors.kt"); } @TestMetadata("DelegatesDot.kt") public void testDelegatesDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/DelegatesDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/DelegatesDot.kt"); } @TestMetadata("DelegatesDotExplicitPropertyType.kt") public void testDelegatesDotExplicitPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/DelegatesDotExplicitPropertyType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/DelegatesDotExplicitPropertyType.kt"); } @TestMetadata("ExplicitValType.kt") public void testExplicitValType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExplicitValType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExplicitValType.kt"); } @TestMetadata("ExplicitVarType.kt") public void testExplicitVarType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExplicitVarType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExplicitVarType.kt"); } @TestMetadata("ExtensionSubstitution1.kt") public void testExtensionSubstitution1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution1.kt"); } @TestMetadata("ExtensionSubstitution2.kt") public void testExtensionSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution2.kt"); } @TestMetadata("ExtensionSubstitution3.kt") public void testExtensionSubstitution3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution3.kt"); } @TestMetadata("ExtensionSubstitution4.kt") public void testExtensionSubstitution4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExtensionSubstitution4.kt"); } @TestMetadata("ExtensionVal.kt") public void testExtensionVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExtensionVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExtensionVal.kt"); } @TestMetadata("ExtensionVar.kt") public void testExtensionVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ExtensionVar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ExtensionVar.kt"); } @TestMetadata("GenericOperator.kt") public void testGenericOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/GenericOperator.kt"); } @TestMetadata("GenericVal.kt") public void testGenericVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/GenericVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/GenericVal.kt"); } @TestMetadata("GenericVar.kt") public void testGenericVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/GenericVar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/GenericVar.kt"); } @TestMetadata("NonConflictingSubstitutors.kt") public void testNonConflictingSubstitutors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/NonConflictingSubstitutors.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/NonConflictingSubstitutors.kt"); } @TestMetadata("Order.kt") public void testOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/Order.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/Order.kt"); } @TestMetadata("OverrideVal.kt") public void testOverrideVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/OverrideVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/OverrideVal.kt"); } @TestMetadata("TopLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/TopLevelVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/TopLevelVal.kt"); } @TestMetadata("ValInClass.kt") public void testValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ValInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ValInClass.kt"); } @TestMetadata("ValInGenericClass1.kt") public void testValInGenericClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ValInGenericClass1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ValInGenericClass1.kt"); } @TestMetadata("ValInGenericClass2.kt") public void testValInGenericClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ValInGenericClass2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ValInGenericClass2.kt"); } @TestMetadata("ValInGenericClass3.kt") public void testValInGenericClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/ValInGenericClass3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/ValInGenericClass3.kt"); } @TestMetadata("VarInClass.kt") public void testVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/VarInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/VarInClass.kt"); } @TestMetadata("VarInGenericClass.kt") public void testVarInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/propertyDelegate/VarInGenericClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/propertyDelegate/VarInGenericClass.kt"); } } @@ -1742,68 +1543,62 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/smartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AutoNotNullThisType.kt") public void testAutoNotNullThisType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/AutoNotNullThisType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/AutoNotNullThisType.kt"); } @TestMetadata("AutoNotNullType.kt") public void testAutoNotNullType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/AutoNotNullType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/AutoNotNullType.kt"); } @TestMetadata("AutoNotNullType2.kt") public void testAutoNotNullType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/AutoNotNullType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/AutoNotNullType2.kt"); } @TestMetadata("AutoNotNullTypeForConstructorParameter.kt") public void testAutoNotNullTypeForConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/AutoNotNullTypeForConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/AutoNotNullTypeForConstructorParameter.kt"); } @TestMetadata("AutoNotNullTypeWithQualifier.kt") public void testAutoNotNullTypeWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/AutoNotNullTypeWithQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/AutoNotNullTypeWithQualifier.kt"); } @TestMetadata("CheckCorrectThis.kt") public void testCheckCorrectThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/CheckCorrectThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/CheckCorrectThis.kt"); } @TestMetadata("SmartCastThisType1.kt") public void testSmartCastThisType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/SmartCastThisType1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/SmartCastThisType1.kt"); } @TestMetadata("SmartCastThisType2.kt") public void testSmartCastThisType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/SmartCastThisType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/SmartCastThisType2.kt"); } @TestMetadata("SmartCastType.kt") public void testSmartCastType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/SmartCastType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/SmartCastType.kt"); } @TestMetadata("SmartCastTypeWithQualifier.kt") public void testSmartCastTypeWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/smartCasts/SmartCastTypeWithQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/smartCasts/SmartCastTypeWithQualifier.kt"); } } @@ -1811,56 +1606,52 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class This extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smart/this"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NoQualifiedThisOfAnonymousObject.kt") public void testNoQualifiedThisOfAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/NoQualifiedThisOfAnonymousObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/NoQualifiedThisOfAnonymousObject.kt"); } @TestMetadata("NullableThis.kt") public void testNullableThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/NullableThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/NullableThis.kt"); } @TestMetadata("QualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/QualifiedThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/QualifiedThis.kt"); } @TestMetadata("QualifiedThisOfExtensionFunction.kt") public void testQualifiedThisOfExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionFunction.kt"); } @TestMetadata("QualifiedThisOfExtensionLambda1.kt") public void testQualifiedThisOfExtensionLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionLambda1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionLambda1.kt"); } @TestMetadata("QualifiedThisOfExtensionLambda2.kt") public void testQualifiedThisOfExtensionLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionLambda2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionLambda2.kt"); } @TestMetadata("QualifiedThisOfExtensionLambda3.kt") public void testQualifiedThisOfExtensionLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionLambda3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/QualifiedThisOfExtensionLambda3.kt"); } @TestMetadata("This.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/this/This.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/this/This.kt"); } } @@ -1868,34 +1659,33 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/4.kt"); } @TestMetadata("AfterStar.kt") public void testAfterStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/AfterStar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/AfterStar.kt"); } public void testAllFilesPresentInVararg() throws Exception { @@ -1904,14 +1694,12 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("NamedArgumentAfterStar.kt") public void testNamedArgumentAfterStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/NamedArgumentAfterStar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/NamedArgumentAfterStar.kt"); } @TestMetadata("SecondVararg.kt") public void testSecondVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/vararg/SecondVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/vararg/SecondVararg.kt"); } } @@ -1919,58 +1707,53 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenEntry extends AbstractJvmSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/4.kt"); } @TestMetadata("5.kt") public void test5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/5.kt"); } @TestMetadata("6.kt") public void test6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/6.kt"); } @TestMetadata("7.kt") public void test7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/7.kt"); } @TestMetadata("8.kt") public void test8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/8.kt"); } @TestMetadata("9.kt") public void test9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/9.kt"); } public void testAllFilesPresentInWhenEntry() throws Exception { @@ -1979,20 +1762,17 @@ public class JvmSmartCompletionTestGenerated extends AbstractJvmSmartCompletionT @TestMetadata("WhenWithNoSubject1.kt") public void testWhenWithNoSubject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/WhenWithNoSubject1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/WhenWithNoSubject1.kt"); } @TestMetadata("WhenWithNoSubject2.kt") public void testWhenWithNoSubject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/WhenWithNoSubject2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/WhenWithNoSubject2.kt"); } @TestMetadata("WhenWithSubjectTrueFalse.kt") public void testWhenWithSubjectTrueFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smart/whenEntry/WhenWithSubjectTrueFalse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/smart/whenEntry/WhenWithSubjectTrueFalse.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmWithLibBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmWithLibBasicCompletionTestGenerated.java index c307395fab1..5b8e685cc8c 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmWithLibBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/JvmWithLibBasicCompletionTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JvmWithLibBasicCompletionTestGenerated extends AbstractJvmWithLibBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/withLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("NamedArgumentsJava.kt") public void testNamedArgumentsJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/NamedArgumentsJava.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/NamedArgumentsJava.kt"); } @TestMetadata("NamedArgumentsKotlin.kt") public void testNamedArgumentsKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/NamedArgumentsKotlin.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/NamedArgumentsKotlin.kt"); } @TestMetadata("SamAdapter.kt") public void testSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/SamAdapter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/SamAdapter.kt"); } @TestMetadata("SamAdapterAndGenerics.kt") public void testSamAdapterAndGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/SamAdapterAndGenerics.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/SamAdapterAndGenerics.kt"); } @TestMetadata("TopLevelNonImportedExtFun.kt") public void testTopLevelNonImportedExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedExtFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedExtFun.kt"); } @TestMetadata("TopLevelNonImportedExtProp.kt") public void testTopLevelNonImportedExtProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedExtProp.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedExtProp.kt"); } @TestMetadata("TopLevelNonImportedFun.kt") public void testTopLevelNonImportedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedFun.kt"); } @TestMetadata("TopLevelNonImportedProperty.kt") public void testTopLevelNonImportedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/withLib/TopLevelNonImportedProperty.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KDocCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KDocCompletionTestGenerated.java index 971ac43100a..de4aac48beb 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KDocCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KDocCompletionTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KDocCompletionTestGenerated extends AbstractJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterPackageName.kt") public void testAfterPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/AfterPackageName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/AfterPackageName.kt"); } public void testAllFilesPresentInKdoc() throws Exception { @@ -33,121 +36,101 @@ public class KDocCompletionTestGenerated extends AbstractJvmBasicCompletionTest @TestMetadata("ExtensionsFQLink.kt") public void testExtensionsFQLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/ExtensionsFQLink.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/ExtensionsFQLink.kt"); } @TestMetadata("ExtensionsForNestedClassFQLink.kt") public void testExtensionsForNestedClassFQLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/ExtensionsForNestedClassFQLink.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/ExtensionsForNestedClassFQLink.kt"); } @TestMetadata("FQLink.kt") public void testFQLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/FQLink.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/FQLink.kt"); } @TestMetadata("FQLinkInTag1.kt") public void testFQLinkInTag1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/FQLinkInTag1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/FQLinkInTag1.kt"); } @TestMetadata("FQLinkInTag2.kt") public void testFQLinkInTag2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/FQLinkInTag2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/FQLinkInTag2.kt"); } @TestMetadata("Link.kt") public void testLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/Link.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/Link.kt"); } @TestMetadata("MemberEnumEntryFQLink.kt") public void testMemberEnumEntryFQLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/MemberEnumEntryFQLink.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/MemberEnumEntryFQLink.kt"); } @TestMetadata("MemberEnumEntryLink.kt") public void testMemberEnumEntryLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/MemberEnumEntryLink.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/MemberEnumEntryLink.kt"); } @TestMetadata("MemberLink.kt") public void testMemberLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/MemberLink.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/MemberLink.kt"); } @TestMetadata("NoCompletionAfterFunName.kt") public void testNoCompletionAfterFunName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/NoCompletionAfterFunName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/NoCompletionAfterFunName.kt"); } @TestMetadata("NoTopLevelForQualified.kt") public void testNoTopLevelForQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/NoTopLevelForQualified.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/NoTopLevelForQualified.kt"); } @TestMetadata("NotTagName.kt") public void testNotTagName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/NotTagName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/NotTagName.kt"); } @TestMetadata("ParamTag.kt") public void testParamTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/ParamTag.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/ParamTag.kt"); } @TestMetadata("SkipExistingParamTag.kt") public void testSkipExistingParamTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/SkipExistingParamTag.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/SkipExistingParamTag.kt"); } @TestMetadata("TagName.kt") public void testTagName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/TagName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/TagName.kt"); } @TestMetadata("TagNameAfterAt.kt") public void testTagNameAfterAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/TagNameAfterAt.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/TagNameAfterAt.kt"); } @TestMetadata("TagNameInClass.kt") public void testTagNameInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/TagNameInClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/TagNameInClass.kt"); } @TestMetadata("TagNameInExtensionFunction.kt") public void testTagNameInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/TagNameInExtensionFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/TagNameInExtensionFunction.kt"); } @TestMetadata("TagNameMiddle.kt") public void testTagNameMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/TagNameMiddle.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/TagNameMiddle.kt"); } @TestMetadata("TagNameStart.kt") public void testTagNameStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/kdoc/TagNameStart.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/kdoc/TagNameStart.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java index 7ac5a98a04f..731b22e1169 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KeywordCompletionTestGenerated.java @@ -21,82 +21,73 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KeywordCompletionTestGenerated extends AbstractKeywordCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterClassProperty.kt") public void testAfterClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterClassProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterClassProperty.kt"); } @TestMetadata("AfterClasses.kt") public void testAfterClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterClasses.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterClasses.kt"); } @TestMetadata("AfterClasses_LangLevel10.kt") public void testAfterClasses_LangLevel10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterClasses_LangLevel10.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterClasses_LangLevel10.kt"); } @TestMetadata("AfterClasses_LangLevel11.kt") public void testAfterClasses_LangLevel11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterClasses_LangLevel11.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterClasses_LangLevel11.kt"); } @TestMetadata("AfterDot.kt") public void testAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterDot.kt"); } @TestMetadata("AfterFuns.kt") public void testAfterFuns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterFuns.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterFuns.kt"); } @TestMetadata("AfterIf.kt") public void testAfterIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterIf.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterIf.kt"); } @TestMetadata("AfterSafeDot.kt") public void testAfterSafeDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterSafeDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterSafeDot.kt"); } @TestMetadata("AfterSpaceAndDot.kt") public void testAfterSpaceAndDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterSpaceAndDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterSpaceAndDot.kt"); } @TestMetadata("AfterTry.kt") public void testAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterTry.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterTry.kt"); } @TestMetadata("AfterTryCatch.kt") public void testAfterTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterTryCatch.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterTryCatch.kt"); } @TestMetadata("AfterTryFinally.kt") public void testAfterTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterTryFinally.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterTryFinally.kt"); } @TestMetadata("AfterTryInAssignment.kt") public void testAfterTryInAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/AfterTryInAssignment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/AfterTryInAssignment.kt"); } public void testAllFilesPresentInKeywords() throws Exception { @@ -105,517 +96,431 @@ public class KeywordCompletionTestGenerated extends AbstractKeywordCompletionTes @TestMetadata("BeforeClass.kt") public void testBeforeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/BeforeClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/BeforeClass.kt"); } @TestMetadata("BeforeDelegationCall.kt") public void testBeforeDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/BeforeDelegationCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/BeforeDelegationCall.kt"); } @TestMetadata("BreakContinue.kt") public void testBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/BreakContinue.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/BreakContinue.kt"); } @TestMetadata("BreakWithLabel.kt") public void testBreakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/BreakWithLabel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/BreakWithLabel.kt"); } @TestMetadata("CommaExpected.kt") public void testCommaExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/CommaExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/CommaExpected.kt"); } @TestMetadata("CompanionObjectBeforeObject.kt") public void testCompanionObjectBeforeObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/CompanionObjectBeforeObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/CompanionObjectBeforeObject.kt"); } @TestMetadata("ContinueWithLabel.kt") public void testContinueWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ContinueWithLabel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ContinueWithLabel.kt"); } @TestMetadata("Else1.kt") public void testElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Else1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Else1.kt"); } @TestMetadata("Else2.kt") public void testElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Else2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Else2.kt"); } @TestMetadata("FileKeyword.kt") public void testFileKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/FileKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/FileKeyword.kt"); } @TestMetadata("GlobalPropertyAccessors.kt") public void testGlobalPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/GlobalPropertyAccessors.kt"); } @TestMetadata("IfTry.kt") public void testIfTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/IfTry.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/IfTry.kt"); } @TestMetadata("IfTryCatch.kt") public void testIfTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/IfTryCatch.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/IfTryCatch.kt"); } @TestMetadata("InAnnotationClassScope.kt") public void testInAnnotationClassScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InAnnotationClassScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InAnnotationClassScope.kt"); } @TestMetadata("InArgumentList.kt") public void testInArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InArgumentList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InArgumentList.kt"); } @TestMetadata("InBlockComment.kt") public void testInBlockComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InBlockComment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InBlockComment.kt"); } @TestMetadata("InChar.kt") public void testInChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InChar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InChar.kt"); } @TestMetadata("InClassBeforeFun.kt") public void testInClassBeforeFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InClassBeforeFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InClassBeforeFun.kt"); } @TestMetadata("InClassNoCompletionInValName.kt") public void testInClassNoCompletionInValName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InClassNoCompletionInValName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InClassNoCompletionInValName.kt"); } @TestMetadata("InClassProperty.kt") public void testInClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InClassProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InClassProperty.kt"); } @TestMetadata("InClassScope.kt") public void testInClassScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InClassScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InClassScope.kt"); } @TestMetadata("InClassTypeParameters.kt") public void testInClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InClassTypeParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InClassTypeParameters.kt"); } @TestMetadata("InCodeBlock.kt") public void testInCodeBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InCodeBlock.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InCodeBlock.kt"); } @TestMetadata("InElse.kt") public void testInElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InElse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InElse.kt"); } @TestMetadata("InEnumScope1.kt") public void testInEnumScope1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InEnumScope1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InEnumScope1.kt"); } @TestMetadata("InEnumScope2.kt") public void testInEnumScope2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InEnumScope2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InEnumScope2.kt"); } @TestMetadata("InFunctionExpressionBody.kt") public void testInFunctionExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InFunctionExpressionBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InFunctionExpressionBody.kt"); } @TestMetadata("InFunctionName.kt") public void testInFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InFunctionName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InFunctionName.kt"); } @TestMetadata("InFunctionRecieverType.kt") public void testInFunctionRecieverType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InFunctionRecieverType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InFunctionRecieverType.kt"); } @TestMetadata("InFunctionTypePosition.kt") public void testInFunctionTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InFunctionTypePosition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InFunctionTypePosition.kt"); } @TestMetadata("InGetterExpressionBody.kt") public void testInGetterExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InGetterExpressionBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InGetterExpressionBody.kt"); } @TestMetadata("InIf.kt") public void testInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InIf.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InIf.kt"); } @TestMetadata("InInterfaceScope.kt") public void testInInterfaceScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InInterfaceScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InInterfaceScope.kt"); } @TestMetadata("InMemberFunParametersList.kt") public void testInMemberFunParametersList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InMemberFunParametersList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InMemberFunParametersList.kt"); } @TestMetadata("InModifierListInsideClass.kt") public void testInModifierListInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InModifierListInsideClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InModifierListInsideClass.kt"); } @TestMetadata("InNotFinishedGenericWithFunAfter.kt") public void testInNotFinishedGenericWithFunAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InNotFinishedGenericWithFunAfter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InNotFinishedGenericWithFunAfter.kt"); } @TestMetadata("InObjectScope.kt") public void testInObjectScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InObjectScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InObjectScope.kt"); } @TestMetadata("InParameterDefaultValue.kt") public void testInParameterDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InParameterDefaultValue.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InParameterDefaultValue.kt"); } @TestMetadata("InPrimaryConstructorParametersList.kt") public void testInPrimaryConstructorParametersList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InPrimaryConstructorParametersList.kt"); } @TestMetadata("InPropertyInitializer.kt") public void testInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InPropertyInitializer.kt"); } @TestMetadata("InPropertyTypeReference.kt") public void testInPropertyTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InPropertyTypeReference.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InPropertyTypeReference.kt"); } @TestMetadata("InString.kt") public void testInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InString.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InString.kt"); } @TestMetadata("InTopFunParametersList.kt") public void testInTopFunParametersList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InTopFunParametersList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InTopFunParametersList.kt"); } @TestMetadata("InTopScopeAfterPackage.kt") public void testInTopScopeAfterPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InTopScopeAfterPackage.kt"); } @TestMetadata("InTypePosition.kt") public void testInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/InTypePosition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/InTypePosition.kt"); } @TestMetadata("LabeledLambdaThis.kt") public void testLabeledLambdaThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/LabeledLambdaThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/LabeledLambdaThis.kt"); } @TestMetadata("LineComment.kt") public void testLineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/LineComment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/LineComment.kt"); } @TestMetadata("NoBreak1.kt") public void testNoBreak1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NoBreak1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NoBreak1.kt"); } @TestMetadata("NoBreak2.kt") public void testNoBreak2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NoBreak2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NoBreak2.kt"); } @TestMetadata("NoCompanionThis.kt") public void testNoCompanionThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NoCompanionThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NoCompanionThis.kt"); } @TestMetadata("NoCompletionForCapitalPrefix.kt") public void testNoCompletionForCapitalPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NoCompletionForCapitalPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NoCompletionForCapitalPrefix.kt"); } @TestMetadata("NoContinue.kt") public void testNoContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NoContinue.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NoContinue.kt"); } @TestMetadata("NoFinalInParameterList.kt") public void testNoFinalInParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NoFinalInParameterList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NoFinalInParameterList.kt"); } @TestMetadata("NotInNotIs.kt") public void testNotInNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NotInNotIs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NotInNotIs.kt"); } @TestMetadata("NotInNotIs2.kt") public void testNotInNotIs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/NotInNotIs2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/NotInNotIs2.kt"); } @TestMetadata("PrefixMatcher.kt") public void testPrefixMatcher() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/PrefixMatcher.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/PrefixMatcher.kt"); } @TestMetadata("PropertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/PropertyAccessors.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/PropertyAccessors.kt"); } @TestMetadata("PropertyAccessors2.kt") public void testPropertyAccessors2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/PropertyAccessors2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/PropertyAccessors2.kt"); } @TestMetadata("PropertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/PropertySetter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/PropertySetter.kt"); } @TestMetadata("QualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/QualifiedThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/QualifiedThis.kt"); } @TestMetadata("QualifiedThisInAccessor.kt") public void testQualifiedThisInAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/QualifiedThisInAccessor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/QualifiedThisInAccessor.kt"); } @TestMetadata("Receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Receiver.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Receiver.kt"); } @TestMetadata("Return1.kt") public void testReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return1.kt"); } @TestMetadata("Return2.kt") public void testReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return2.kt"); } @TestMetadata("Return3.kt") public void testReturn3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return3.kt"); } @TestMetadata("Return4.kt") public void testReturn4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return4.kt"); } @TestMetadata("Return5.kt") public void testReturn5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return5.kt"); } @TestMetadata("Return6.kt") public void testReturn6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return6.kt"); } @TestMetadata("Return7.kt") public void testReturn7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return7.kt"); } @TestMetadata("Return8.kt") public void testReturn8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return8.kt"); } @TestMetadata("Return9.kt") public void testReturn9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/Return9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/Return9.kt"); } @TestMetadata("ReturnBoolean.kt") public void testReturnBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnBoolean.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnBoolean.kt"); } @TestMetadata("ReturnCollection.kt") public void testReturnCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnCollection.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnCollection.kt"); } @TestMetadata("ReturnIterable.kt") public void testReturnIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnIterable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnIterable.kt"); } @TestMetadata("ReturnKeywordName.kt") public void testReturnKeywordName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnKeywordName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnKeywordName.kt"); } @TestMetadata("ReturnList.kt") public void testReturnList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnList.kt"); } @TestMetadata("ReturnNotNull.kt") public void testReturnNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnNotNull.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnNotNull.kt"); } @TestMetadata("ReturnNull.kt") public void testReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnNull.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnNull.kt"); } @TestMetadata("ReturnNullableBoolean.kt") public void testReturnNullableBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnNullableBoolean.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnNullableBoolean.kt"); } @TestMetadata("ReturnSet.kt") public void testReturnSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ReturnSet.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ReturnSet.kt"); } @TestMetadata("SuspendInsideTypeArguments.kt") public void testSuspendInsideTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/SuspendInsideTypeArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/SuspendInsideTypeArguments.kt"); } @TestMetadata("SuspendInsideTypeArguments1.kt") public void testSuspendInsideTypeArguments1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/SuspendInsideTypeArguments1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/SuspendInsideTypeArguments1.kt"); } @TestMetadata("This.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/This.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/This.kt"); } @TestMetadata("ThisPrefixMatching.kt") public void testThisPrefixMatching() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/ThisPrefixMatching.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/ThisPrefixMatching.kt"); } @TestMetadata("TopScope.kt") public void testTopScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/TopScope.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/TopScope.kt"); } @TestMetadata("UseSiteTargetForPrimaryConstructorParameter.kt") public void testUseSiteTargetForPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/keywords/UseSiteTargetForPrimaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/keywords/UseSiteTargetForPrimaryConstructorParameter.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinSourceInJavaCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinSourceInJavaCompletionTestGenerated.java index 35c3cfa8b18..f88a5c057e9 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinSourceInJavaCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinSourceInJavaCompletionTestGenerated.java @@ -21,181 +21,156 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinSourceInJavaCompletionTestGenerated extends AbstractKotlinSourceInJavaCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInjava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/injava"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, false); } @TestMetadata("AnnotationParameter.java") public void testAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/AnnotationParameter.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/AnnotationParameter.java"); } @TestMetadata("Class.java") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/Class.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/Class.java"); } @TestMetadata("ClassMembers.java") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassMembers.java"); } @TestMetadata("ClassObject.java") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassObject.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassObject.java"); } @TestMetadata("ClassObjectField.java") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassObjectField.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassObjectField.java"); } @TestMetadata("ClassesFromNamespace.java") public void testClassesFromNamespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ClassesFromNamespace.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ClassesFromNamespace.java"); } @TestMetadata("EnumConstants.java") public void testEnumConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/EnumConstants.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/EnumConstants.java"); } @TestMetadata("InterfaceDefaultImpl.java") public void testInterfaceDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImpl.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImpl.java"); } @TestMetadata("InterfaceDefaultImplImportedMembers.java") public void testInterfaceDefaultImplImportedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplImportedMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplImportedMembers.java"); } @TestMetadata("InterfaceDefaultImplMembers.java") public void testInterfaceDefaultImplMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplMembers.java"); } @TestMetadata("InterfaceDefaultImplStaticImportedMembers.java") public void testInterfaceDefaultImplStaticImportedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplStaticImportedMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplStaticImportedMembers.java"); } @TestMetadata("InterfaceDefaultImplsNonImported.java") public void testInterfaceDefaultImplsNonImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/InterfaceDefaultImplsNonImported.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/InterfaceDefaultImplsNonImported.java"); } @TestMetadata("MultiFileFacade.java") public void testMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/MultiFileFacade.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/MultiFileFacade.java"); } @TestMetadata("MultiFileFacadeMembers.java") public void testMultiFileFacadeMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/MultiFileFacadeMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/MultiFileFacadeMembers.java"); } @TestMetadata("MultiFileFacadeNoImport.java") public void testMultiFileFacadeNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/MultiFileFacadeNoImport.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/MultiFileFacadeNoImport.java"); } @TestMetadata("Nested.java") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/Nested.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/Nested.java"); } @TestMetadata("NestedClassMembers.java") public void testNestedClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedClassMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedClassMembers.java"); } @TestMetadata("NestedClassMembers2.java") public void testNestedClassMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedClassMembers2.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedClassMembers2.java"); } @TestMetadata("NestedNoImport.java") public void testNestedNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedNoImport.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedNoImport.java"); } @TestMetadata("NestedObjectInstance.java") public void testNestedObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/NestedObjectInstance.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/NestedObjectInstance.java"); } @TestMetadata("ObjectInClassObjects.java") public void testObjectInClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ObjectInClassObjects.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ObjectInClassObjects.java"); } @TestMetadata("ObjectInstance.java") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/ObjectInstance.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/ObjectInstance.java"); } @TestMetadata("RenamedFacade.java") public void testRenamedFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/RenamedFacade.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/RenamedFacade.java"); } @TestMetadata("SingleFileFacade.java") public void testSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/SingleFileFacade.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/SingleFileFacade.java"); } @TestMetadata("SingleFileFacadeMembers.java") public void testSingleFileFacadeMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/SingleFileFacadeMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/SingleFileFacadeMembers.java"); } @TestMetadata("SingleFileFacadeNoImport.java") public void testSingleFileFacadeNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/SingleFileFacadeNoImport.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/SingleFileFacadeNoImport.java"); } @TestMetadata("Subpackage.java") public void testSubpackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/Subpackage.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/Subpackage.java"); } @TestMetadata("TopLevelMembers.java") public void testTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/TopLevelMembers.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/TopLevelMembers.java"); } @TestMetadata("TraitMember.java") public void testTraitMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/TraitMember.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/TraitMember.java"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinStdLibInJavaCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinStdLibInJavaCompletionTestGenerated.java index dd53862c41d..f736638eb9e 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinStdLibInJavaCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/KotlinStdLibInJavaCompletionTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinStdLibInJavaCompletionTestGenerated extends AbstractKotlinStdLibInJavaCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/injava/stdlib"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, false); } @TestMetadata("List.java") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/injava/stdlib/List.java"); - doTest(fileName); + runTest("idea/idea-completion/testData/injava/stdlib/List.java"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileJvmBasicCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileJvmBasicCompletionTestGenerated.java index 4ce08fb73d1..9a92b10b8c6 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileJvmBasicCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileJvmBasicCompletionTestGenerated.java @@ -21,427 +21,361 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiFileJvmBasicCompletionTestGenerated extends AbstractMultiFileJvmBasicCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultifile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/multifile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("CallableReferenceNotImported") public void testCallableReferenceNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CallableReferenceNotImported/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CallableReferenceNotImported/"); } @TestMetadata("CallableReferenceNotImportedExtension") public void testCallableReferenceNotImportedExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CallableReferenceNotImportedExtension/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CallableReferenceNotImportedExtension/"); } @TestMetadata("CallableReferenceNotImportedExtension2") public void testCallableReferenceNotImportedExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CallableReferenceNotImportedExtension2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CallableReferenceNotImportedExtension2/"); } @TestMetadata("CallablesInExcludedPackage") public void testCallablesInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CallablesInExcludedPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CallablesInExcludedPackage/"); } @TestMetadata("ClassInExcludedPackage") public void testClassInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ClassInExcludedPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ClassInExcludedPackage/"); } @TestMetadata("CompleteFunctionWithNoSpecifiedType") public void testCompleteFunctionWithNoSpecifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CompleteFunctionWithNoSpecifiedType/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CompleteFunctionWithNoSpecifiedType/"); } @TestMetadata("CompleteImportedFunction") public void testCompleteImportedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CompleteImportedFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CompleteImportedFunction/"); } @TestMetadata("CompletionOnImportedFunction") public void testCompletionOnImportedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/CompletionOnImportedFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/CompletionOnImportedFunction/"); } @TestMetadata("DoNotCompleteWithConstraints") public void testDoNotCompleteWithConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/DoNotCompleteWithConstraints/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/DoNotCompleteWithConstraints/"); } @TestMetadata("EntriesOfNotImportedEnumFromKotlin") public void testEntriesOfNotImportedEnumFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/EntriesOfNotImportedEnumFromKotlin/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/EntriesOfNotImportedEnumFromKotlin/"); } @TestMetadata("EnumEntry") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/EnumEntry/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/EnumEntry/"); } @TestMetadata("ExactMatchPreferImported") public void testExactMatchPreferImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExactMatchPreferImported/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExactMatchPreferImported/"); } @TestMetadata("ExcludedClass") public void testExcludedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExcludedClass/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExcludedClass/"); } @TestMetadata("ExcludedJavaClass") public void testExcludedJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExcludedJavaClass/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExcludedJavaClass/"); } @TestMetadata("ExtensionFunction") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExtensionFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExtensionFunction/"); } @TestMetadata("ExtensionFunctionOnImportedFunction") public void testExtensionFunctionOnImportedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExtensionFunctionOnImportedFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExtensionFunctionOnImportedFunction/"); } @TestMetadata("ExtensionOnNullable") public void testExtensionOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExtensionOnNullable/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExtensionOnNullable/"); } @TestMetadata("ExtensionsAndGetPrefix") public void testExtensionsAndGetPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExtensionsAndGetPrefix/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExtensionsAndGetPrefix/"); } @TestMetadata("ExtensionsForSmartCast") public void testExtensionsForSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ExtensionsForSmartCast/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ExtensionsForSmartCast/"); } @TestMetadata("FileRefInStringLiteral") public void testFileRefInStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/FileRefInStringLiteral/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/FileRefInStringLiteral/"); } @TestMetadata("FileRefInStringLiteralNoPrefix") public void testFileRefInStringLiteralNoPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/FileRefInStringLiteralNoPrefix/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/FileRefInStringLiteralNoPrefix/"); } @TestMetadata("GroovyClassNameCompletionFromDefaultPackage") public void testGroovyClassNameCompletionFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/GroovyClassNameCompletionFromDefaultPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/GroovyClassNameCompletionFromDefaultPackage/"); } @TestMetadata("GroovyClassNameCompletionFromNonDefaultPackage") public void testGroovyClassNameCompletionFromNonDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/GroovyClassNameCompletionFromNonDefaultPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/GroovyClassNameCompletionFromNonDefaultPackage/"); } @TestMetadata("HiddenDeclarations") public void testHiddenDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/HiddenDeclarations/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/HiddenDeclarations/"); } @TestMetadata("InImport") public void testInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/InImport/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/InImport/"); } @TestMetadata("InImportedFunctionLiteralParameter") public void testInImportedFunctionLiteralParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/InImportedFunctionLiteralParameter/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/InImportedFunctionLiteralParameter/"); } @TestMetadata("IncorrectGetters") public void testIncorrectGetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/IncorrectGetters/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/IncorrectGetters/"); } @TestMetadata("JavaCallableReference") public void testJavaCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/JavaCallableReference/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/JavaCallableReference/"); } @TestMetadata("JavaInnerClasses") public void testJavaInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/JavaInnerClasses/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/JavaInnerClasses/"); } @TestMetadata("KT12124") public void testKT12124() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/KT12124/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/KT12124/"); } @TestMetadata("KT9835") public void testKT9835() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/KT9835/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/KT9835/"); } @TestMetadata("MoreSpecificExtensionGeneric") public void testMoreSpecificExtensionGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionGeneric/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionGeneric/"); } @TestMetadata("MoreSpecificExtensionInDifferentPackage") public void testMoreSpecificExtensionInDifferentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionInDifferentPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionInDifferentPackage/"); } @TestMetadata("MoreSpecificExtensionIsPrivate") public void testMoreSpecificExtensionIsPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionIsPrivate/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/MoreSpecificExtensionIsPrivate/"); } @TestMetadata("NoAutoInsertionOfNotImported") public void testNoAutoInsertionOfNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NoAutoInsertionOfNotImported/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NoAutoInsertionOfNotImported/"); } @TestMetadata("NoExtForOuterFromNested") public void testNoExtForOuterFromNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NoExtForOuterFromNested/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NoExtForOuterFromNested/"); } @TestMetadata("NoExtensionMethodDuplication") public void testNoExtensionMethodDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NoExtensionMethodDuplication/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NoExtensionMethodDuplication/"); } @TestMetadata("NoGenericFunDuplication") public void testNoGenericFunDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NoGenericFunDuplication/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NoGenericFunDuplication/"); } @TestMetadata("NotImportedExtensionForImplicitReceiver") public void testNotImportedExtensionForImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedExtensionForImplicitReceiver/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedExtensionForImplicitReceiver/"); } @TestMetadata("NotImportedExtensionFunction") public void testNotImportedExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunction/"); } @TestMetadata("NotImportedExtensionFunction2") public void testNotImportedExtensionFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunction2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunction2/"); } @TestMetadata("NotImportedExtensionFunction3") public void testNotImportedExtensionFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunction3/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunction3/"); } @TestMetadata("NotImportedExtensionFunctionAndAlias") public void testNotImportedExtensionFunctionAndAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunctionAndAlias/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedExtensionFunctionAndAlias/"); } @TestMetadata("NotImportedExtensionProperty") public void testNotImportedExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedExtensionProperty/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedExtensionProperty/"); } @TestMetadata("NotImportedFunction") public void testNotImportedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedFunction/"); } @TestMetadata("NotImportedInfixExtension") public void testNotImportedInfixExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedInfixExtension/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedInfixExtension/"); } @TestMetadata("NotImportedJavaClass") public void testNotImportedJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedJavaClass/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedJavaClass/"); } @TestMetadata("NotImportedObject") public void testNotImportedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedObject/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedObject/"); } @TestMetadata("NotImportedProperty") public void testNotImportedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/NotImportedProperty/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/NotImportedProperty/"); } @TestMetadata("ObjectInTypePosition") public void testObjectInTypePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ObjectInTypePosition/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ObjectInTypePosition/"); } @TestMetadata("ObjectMembers") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ObjectMembers/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ObjectMembers/"); } @TestMetadata("ParameterNameAndTypeForNotImportedAlias") public void testParameterNameAndTypeForNotImportedAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ParameterNameAndTypeForNotImportedAlias/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ParameterNameAndTypeForNotImportedAlias/"); } @TestMetadata("ParameterNameAndTypeNestedClasses") public void testParameterNameAndTypeNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/ParameterNameAndTypeNestedClasses/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/ParameterNameAndTypeNestedClasses/"); } @TestMetadata("PreferMemberToExtension") public void testPreferMemberToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PreferMemberToExtension/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PreferMemberToExtension/"); } @TestMetadata("PreferMemberToGlobal") public void testPreferMemberToGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PreferMemberToGlobal/"); } @TestMetadata("PreferMoreSpecificExtension1") public void testPreferMoreSpecificExtension1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PreferMoreSpecificExtension1/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PreferMoreSpecificExtension1/"); } @TestMetadata("PreferMoreSpecificExtension2") public void testPreferMoreSpecificExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PreferMoreSpecificExtension2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PreferMoreSpecificExtension2/"); } @TestMetadata("PreferMoreSpecificExtension3") public void testPreferMoreSpecificExtension3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PreferMoreSpecificExtension3/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PreferMoreSpecificExtension3/"); } @TestMetadata("PropertyKeysEmptyString") public void testPropertyKeysEmptyString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PropertyKeysEmptyString/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PropertyKeysEmptyString/"); } @TestMetadata("PropertyKeysNoPrefix") public void testPropertyKeysNoPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PropertyKeysNoPrefix/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PropertyKeysNoPrefix/"); } @TestMetadata("PropertyKeysWithPrefix") public void testPropertyKeysWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/PropertyKeysWithPrefix/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/PropertyKeysWithPrefix/"); } @TestMetadata("StaticMembersOfNotImportedClassFromJava") public void testStaticMembersOfNotImportedClassFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassFromJava/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassFromJava/"); } @TestMetadata("StaticMembersOfNotImportedClassFromKotlin") public void testStaticMembersOfNotImportedClassFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassFromKotlin/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassFromKotlin/"); } @TestMetadata("StaticMembersOfNotImportedClassFromKotlinObject") public void testStaticMembersOfNotImportedClassFromKotlinObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassFromKotlinObject/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassFromKotlinObject/"); } @TestMetadata("StaticMembersOfNotImportedClassNameConflict") public void testStaticMembersOfNotImportedClassNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassNameConflict/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/StaticMembersOfNotImportedClassNameConflict/"); } @TestMetadata("SyntheticExtensionDeprecated") public void testSyntheticExtensionDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/SyntheticExtensionDeprecated/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/SyntheticExtensionDeprecated/"); } @TestMetadata("SyntheticExtensionForGenericClass") public void testSyntheticExtensionForGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/SyntheticExtensionForGenericClass/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/SyntheticExtensionForGenericClass/"); } @TestMetadata("SyntheticExtensionNonVoidSetter") public void testSyntheticExtensionNonVoidSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/SyntheticExtensionNonVoidSetter/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/SyntheticExtensionNonVoidSetter/"); } @TestMetadata("TopLevelFunction") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/TopLevelFunction/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/TopLevelFunction/"); } @TestMetadata("TypeAliases") public void testTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/multifile/TypeAliases/"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/multifile/TypeAliases/"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileSmartCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileSmartCompletionTestGenerated.java index 9c73348402a..6274eaafc39 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileSmartCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiFileSmartCompletionTestGenerated.java @@ -21,133 +21,116 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiFileSmartCompletionTestGenerated extends AbstractMultiFileSmartCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/smartMultiFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("AnonymousObjectGenericJava") public void testAnonymousObjectGenericJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/AnonymousObjectGenericJava/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/AnonymousObjectGenericJava/"); } @TestMetadata("CallableReferenceNotImported") public void testCallableReferenceNotImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/CallableReferenceNotImported/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/CallableReferenceNotImported/"); } @TestMetadata("CallablesInExcludedPackage") public void testCallablesInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/CallablesInExcludedPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/CallablesInExcludedPackage/"); } @TestMetadata("FunctionFromAnotherPackage") public void testFunctionFromAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/FunctionFromAnotherPackage/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/FunctionFromAnotherPackage/"); } @TestMetadata("GenericInheritors1") public void testGenericInheritors1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/GenericInheritors1/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/GenericInheritors1/"); } @TestMetadata("GenericInheritors2") public void testGenericInheritors2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/GenericInheritors2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/GenericInheritors2/"); } @TestMetadata("GenericInheritors3") public void testGenericInheritors3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/GenericInheritors3/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/GenericInheritors3/"); } @TestMetadata("GenericInheritors4") public void testGenericInheritors4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/GenericInheritors4/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/GenericInheritors4/"); } @TestMetadata("InheritorInTheSameFile") public void testInheritorInTheSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/InheritorInTheSameFile/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/InheritorInTheSameFile/"); } @TestMetadata("Inheritors") public void testInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/Inheritors/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/Inheritors/"); } @TestMetadata("InheritorsAndMultipleExpectedTypes") public void testInheritorsAndMultipleExpectedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/InheritorsAndMultipleExpectedTypes/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/InheritorsAndMultipleExpectedTypes/"); } @TestMetadata("JavaStaticMethodArgument") public void testJavaStaticMethodArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/JavaStaticMethodArgument/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/JavaStaticMethodArgument/"); } @TestMetadata("JavaStaticMethodArgument2") public void testJavaStaticMethodArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/JavaStaticMethodArgument2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/JavaStaticMethodArgument2/"); } @TestMetadata("KT_8751") public void testKT_8751() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/KT_8751/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/KT_8751/"); } @TestMetadata("KT_8751_2") public void testKT_8751_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/KT_8751_2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/KT_8751_2/"); } @TestMetadata("NestedClassAfterAs") public void testNestedClassAfterAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/NestedClassAfterAs/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/NestedClassAfterAs/"); } @TestMetadata("NoObjectDuplication") public void testNoObjectDuplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/NoObjectDuplication/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/NoObjectDuplication/"); } @TestMetadata("NotImportedContains") public void testNotImportedContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/NotImportedContains/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/NotImportedContains/"); } @TestMetadata("NotImportedGetValue") public void testNotImportedGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/NotImportedGetValue/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/NotImportedGetValue/"); } @TestMetadata("StaticMembers1") public void testStaticMembers1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/StaticMembers1/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/StaticMembers1/"); } @TestMetadata("StaticMembers2") public void testStaticMembers2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/smartMultiFile/StaticMembers2/"); - doTest(fileName); + runTest("idea/idea-completion/testData/smartMultiFile/StaticMembers2/"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiPlatformCompletionTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiPlatformCompletionTestGenerated.java index 079e5e473e1..317564b43c9 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiPlatformCompletionTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/MultiPlatformCompletionTestGenerated.java @@ -21,31 +21,31 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiPlatformCompletionTestGenerated extends AbstractMultiPlatformCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiPlatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/multiPlatform"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("classInCommon") public void testClassInCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/multiPlatform/classInCommon/"); - doTest(fileName); + runTest("idea/idea-completion/testData/multiPlatform/classInCommon/"); } @TestMetadata("classInPlatform") public void testClassInPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/multiPlatform/classInPlatform/"); - doTest(fileName); + runTest("idea/idea-completion/testData/multiPlatform/classInPlatform/"); } @TestMetadata("functionInCommon") public void testFunctionInCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/multiPlatform/functionInCommon/"); - doTest(fileName); + runTest("idea/idea-completion/testData/multiPlatform/functionInCommon/"); } @TestMetadata("functionInPlatform") public void testFunctionInPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/multiPlatform/functionInPlatform/"); - doTest(fileName); + runTest("idea/idea-completion/testData/multiPlatform/functionInPlatform/"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java index 852e06150ed..0edb68b6ce6 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/BasicCompletionHandlerTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddLabelToReturn.kt") public void testAddLabelToReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/AddLabelToReturn.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/AddLabelToReturn.kt"); } public void testAllFilesPresentInBasic() throws Exception { @@ -33,220 +36,189 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestMetadata("ClassKeywordBeforeName.kt") public void testClassKeywordBeforeName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ClassKeywordBeforeName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ClassKeywordBeforeName.kt"); } @TestMetadata("ClassWithClassObject.kt") public void testClassWithClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ClassWithClassObject.kt"); } @TestMetadata("DoNotUseParenthesisOnNextLine.kt") public void testDoNotUseParenthesisOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/DoNotUseParenthesisOnNextLine.kt"); } @TestMetadata("EA70229.kt") public void testEA70229() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/EA70229.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/EA70229.kt"); } @TestMetadata("ExtensionFunctionTypeVariable1.kt") public void testExtensionFunctionTypeVariable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ExtensionFunctionTypeVariable1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ExtensionFunctionTypeVariable1.kt"); } @TestMetadata("ExtensionFunctionTypeVariable2.kt") public void testExtensionFunctionTypeVariable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ExtensionFunctionTypeVariable2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ExtensionFunctionTypeVariable2.kt"); } @TestMetadata("ExtensionReceiverTypeArg.kt") public void testExtensionReceiverTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ExtensionReceiverTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ExtensionReceiverTypeArg.kt"); } @TestMetadata("FirstTypeArgument.kt") public void testFirstTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/FirstTypeArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/FirstTypeArgument.kt"); } @TestMetadata("GenericFunctionWithTab.kt") public void testGenericFunctionWithTab() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab.kt"); } @TestMetadata("GenericFunctionWithTab2.kt") public void testGenericFunctionWithTab2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/GenericFunctionWithTab2.kt"); } @TestMetadata("GetOperator.kt") public void testGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/GetOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/GetOperator.kt"); } @TestMetadata("InterfaceNameBeforeRunBug.kt") public void testInterfaceNameBeforeRunBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/InterfaceNameBeforeRunBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/InterfaceNameBeforeRunBug.kt"); } @TestMetadata("JavaSAM.kt") public void testJavaSAM() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/JavaSAM.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/JavaSAM.kt"); } @TestMetadata("KT11633.kt") public void testKT11633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/KT11633.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/KT11633.kt"); } @TestMetadata("KT12328.kt") public void testKT12328() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/KT12328.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/KT12328.kt"); } @TestMetadata("KT14130.kt") public void testKT14130() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/KT14130.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/KT14130.kt"); } @TestMetadata("NestedTypeArg.kt") public void testNestedTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/NestedTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/NestedTypeArg.kt"); } @TestMetadata("NoTailFromSmart.kt") public void testNoTailFromSmart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/NoTailFromSmart.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/NoTailFromSmart.kt"); } @TestMetadata("PreferClassToConstructor.kt") public void testPreferClassToConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/PreferClassToConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/PreferClassToConstructor.kt"); } @TestMetadata("PreferMatchingKeyword.kt") public void testPreferMatchingKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/PreferMatchingKeyword.kt"); } @TestMetadata("ReplaceFunctionCallByProperty.kt") public void testReplaceFunctionCallByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByProperty.kt"); } @TestMetadata("ReplaceFunctionCallByPropertyArgs.kt") public void testReplaceFunctionCallByPropertyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/ReplaceFunctionCallByPropertyArgs.kt"); } @TestMetadata("SecondTypeArg.kt") public void testSecondTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/SecondTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/SecondTypeArg.kt"); } @TestMetadata("SpaceAfterParenthesisBug.kt") public void testSpaceAfterParenthesisBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/SpaceAfterParenthesisBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/SpaceAfterParenthesisBug.kt"); } @TestMetadata("StringFakeConstructor.kt") public void testStringFakeConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/StringFakeConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/StringFakeConstructor.kt"); } @TestMetadata("SuperMethod.kt") public void testSuperMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/SuperMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/SuperMethod.kt"); } @TestMetadata("SuperMethod2.kt") public void testSuperMethod2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/SuperMethod2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/SuperMethod2.kt"); } @TestMetadata("SuperTypeArg.kt") public void testSuperTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/SuperTypeArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/SuperTypeArg.kt"); } @TestMetadata("SyntheticExtension.kt") public void testSyntheticExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/SyntheticExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/SyntheticExtension.kt"); } @TestMetadata("TypeInferedFromWrapperType.kt") public void testTypeInferedFromWrapperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/TypeInferedFromWrapperType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/TypeInferedFromWrapperType.kt"); } @TestMetadata("TypeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/TypeParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/TypeParameter.kt"); } @TestMetadata("idea/idea-completion/testData/handlers/basic/annotation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotation extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/annotation"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInBrackets.kt") public void testAnnotationInBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInBrackets.kt"); } @TestMetadata("AnnotationInClassAddImport.kt") public void testAnnotationInClassAddImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInClassAddImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInClassAddImport.kt"); } @TestMetadata("AnnotationInCompanionObjectAddImport.kt") public void testAnnotationInCompanionObjectAddImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInCompanionObjectAddImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/annotation/AnnotationInCompanionObjectAddImport.kt"); } @TestMetadata("KT12077.kt") public void testKT12077() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/annotation/KT12077.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/annotation/KT12077.kt"); } } @@ -254,38 +226,37 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/callableReference"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassConstructor.kt") public void testClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/callableReference/ClassConstructor.kt"); } @TestMetadata("EmptyQualifier.kt") public void testEmptyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/callableReference/EmptyQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/callableReference/EmptyQualifier.kt"); } @TestMetadata("NonEmptyQualifier.kt") public void testNonEmptyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/callableReference/NonEmptyQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/callableReference/NonEmptyQualifier.kt"); } @TestMetadata("NotImportedTopLevel.kt") public void testNotImportedTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/callableReference/NotImportedTopLevel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/callableReference/NotImportedTopLevel.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/callableReference/Property.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/callableReference/Property.kt"); } } @@ -293,34 +264,33 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExclChar extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/exclChar/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/exclChar/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/exclChar/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/exclChar/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/exclChar/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/exclChar/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/exclChar/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/exclChar/4.kt"); } @TestMetadata("5.kt") public void test5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/exclChar/5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/exclChar/5.kt"); } public void testAllFilesPresentInExclChar() throws Exception { @@ -332,122 +302,107 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HighOrderFunctions extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHighOrderFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/highOrderFunctions"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ContextVariable.kt") public void testContextVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariable.kt"); } @TestMetadata("ContextVariableDot.kt") public void testContextVariableDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariableDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariableDot.kt"); } @TestMetadata("ContextVariableTypeArgsNeeded.kt") public void testContextVariableTypeArgsNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariableTypeArgsNeeded.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ContextVariableTypeArgsNeeded.kt"); } @TestMetadata("ForceParenthesisForTabChar.kt") public void testForceParenthesisForTabChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ForceParenthesisForTabChar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ForceParenthesisForTabChar.kt"); } @TestMetadata("FunctionLiteralInsertOnSpace.kt") public void testFunctionLiteralInsertOnSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertOnSpace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertOnSpace.kt"); } @TestMetadata("FunctionLiteralInsertWhenNoSpacesForBraces.kt") public void testFunctionLiteralInsertWhenNoSpacesForBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/FunctionLiteralInsertWhenNoSpacesForBraces.kt"); } @TestMetadata("HigherOrderFunction.kt") public void testHigherOrderFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunction.kt"); } @TestMetadata("HigherOrderFunctionWithArg.kt") public void testHigherOrderFunctionWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArg.kt"); } @TestMetadata("HigherOrderFunctionWithArgs1.kt") public void testHigherOrderFunctionWithArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs1.kt"); } @TestMetadata("HigherOrderFunctionWithArgs2.kt") public void testHigherOrderFunctionWithArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs2.kt"); } @TestMetadata("HigherOrderFunctionWithArgs3.kt") public void testHigherOrderFunctionWithArgs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/HigherOrderFunctionWithArgs3.kt"); } @TestMetadata("InsertFunctionWithSingleParameterWithBrace.kt") public void testInsertFunctionWithSingleParameterWithBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/InsertFunctionWithSingleParameterWithBrace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/InsertFunctionWithSingleParameterWithBrace.kt"); } @TestMetadata("OptionalParameters1.kt") public void testOptionalParameters1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters1.kt"); } @TestMetadata("OptionalParameters2.kt") public void testOptionalParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters2.kt"); } @TestMetadata("OptionalParameters3.kt") public void testOptionalParameters3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/OptionalParameters3.kt"); } @TestMetadata("ParameterTypeIsDerivedFromFunction.kt") public void testParameterTypeIsDerivedFromFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ParameterTypeIsDerivedFromFunction.kt"); } @TestMetadata("ReplaceByLambdaTemplateNoClosingParenth.kt") public void testReplaceByLambdaTemplateNoClosingParenth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ReplaceByLambdaTemplateNoClosingParenth.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/ReplaceByLambdaTemplateNoClosingParenth.kt"); } @TestMetadata("WithArgsEmptyLambdaAfter.kt") public void testWithArgsEmptyLambdaAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/WithArgsEmptyLambdaAfter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/WithArgsEmptyLambdaAfter.kt"); } @TestMetadata("WithArgsNonEmptyLambdaAfter.kt") public void testWithArgsNonEmptyLambdaAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/highOrderFunctions/WithArgsNonEmptyLambdaAfter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/highOrderFunctions/WithArgsNonEmptyLambdaAfter.kt"); } } @@ -455,50 +410,47 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportAliases extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportAliases() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/importAliases"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CompanionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/CompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/CompanionObject.kt"); } @TestMetadata("ExtensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/ExtensionFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/ExtensionFun.kt"); } @TestMetadata("ExtensionVal.kt") public void testExtensionVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/ExtensionVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/ExtensionVal.kt"); } @TestMetadata("KDoc.kt") public void testKDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/KDoc.kt"); } @TestMetadata("TopLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/TopLevelFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/TopLevelFun.kt"); } @TestMetadata("TopLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/TopLevelVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/TopLevelVal.kt"); } @TestMetadata("Type.kt") public void testType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/importAliases/Type.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/importAliases/Type.kt"); } } @@ -506,28 +458,28 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterFunKeyword.kt") public void testAfterFunKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/AfterFunKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/AfterFunKeyword.kt"); } @TestMetadata("AfterFunKeywordKeepModifiersBefore.kt") public void testAfterFunKeywordKeepModifiersBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/AfterFunKeywordKeepModifiersBefore.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/AfterFunKeywordKeepModifiersBefore.kt"); } @TestMetadata("AfterValKeyword.kt") public void testAfterValKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/AfterValKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/AfterValKeyword.kt"); } @TestMetadata("AfterValKeywordInConstructorParameter.kt") public void testAfterValKeywordInConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/AfterValKeywordInConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/AfterValKeywordInConstructorParameter.kt"); } public void testAllFilesPresentInOverride() throws Exception { @@ -536,92 +488,77 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestMetadata("ImplementFunction.kt") public void testImplementFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ImplementFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ImplementFunction.kt"); } @TestMetadata("ImplementVal.kt") public void testImplementVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ImplementVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ImplementVal.kt"); } @TestMetadata("ImplementVar.kt") public void testImplementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ImplementVar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ImplementVar.kt"); } @TestMetadata("KeepAnnotationBefore.kt") public void testKeepAnnotationBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/KeepAnnotationBefore.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/KeepAnnotationBefore.kt"); } @TestMetadata("KeepModifiersBefore.kt") public void testKeepModifiersBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/KeepModifiersBefore.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/KeepModifiersBefore.kt"); } @TestMetadata("OverrideFunction.kt") public void testOverrideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/OverrideFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/OverrideFunction.kt"); } @TestMetadata("OverrideVar.kt") public void testOverrideVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/OverrideVar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/OverrideVar.kt"); } @TestMetadata("PublicValInConstructorParameter.kt") public void testPublicValInConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/PublicValInConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/PublicValInConstructorParameter.kt"); } @TestMetadata("Suspend.kt") public void testSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/Suspend.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/Suspend.kt"); } @TestMetadata("TypeFunctionName.kt") public void testTypeFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/TypeFunctionName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/TypeFunctionName.kt"); } @TestMetadata("TypeNameInConstructorParameter.kt") public void testTypeNameInConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/TypeNameInConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/TypeNameInConstructorParameter.kt"); } @TestMetadata("ValInConstructorParameter.kt") public void testValInConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter.kt"); } @TestMetadata("ValInConstructorParameter2.kt") public void testValInConstructorParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter2.kt"); } @TestMetadata("ValInConstructorParameter3.kt") public void testValInConstructorParameter3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter3.kt"); } @TestMetadata("ValInConstructorParameter4.kt") public void testValInConstructorParameter4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/override/ValInConstructorParameter4.kt"); } } @@ -629,86 +566,77 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterNameAndType extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterNameAndType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/parameterNameAndType"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CodeStyleSettings.kt") public void testCodeStyleSettings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/CodeStyleSettings.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/CodeStyleSettings.kt"); } @TestMetadata("Comma.kt") public void testComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/Comma.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/Comma.kt"); } @TestMetadata("InsertImport.kt") public void testInsertImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/InsertImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/InsertImport.kt"); } @TestMetadata("NoInsertionOnTypingColon.kt") public void testNoInsertionOnTypingColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/NoInsertionOnTypingColon.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/NoInsertionOnTypingColon.kt"); } @TestMetadata("NoInsertionOnTypingSpace.kt") public void testNoInsertionOnTypingSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/NoInsertionOnTypingSpace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/NoInsertionOnTypingSpace.kt"); } @TestMetadata("ParameterInFile.kt") public void testParameterInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/ParameterInFile.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/ParameterInFile.kt"); } @TestMetadata("ParameterInFile2.kt") public void testParameterInFile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/ParameterInFile2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/ParameterInFile2.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/Simple.kt"); } @TestMetadata("TabReplace1.kt") public void testTabReplace1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace1.kt"); } @TestMetadata("TabReplace2.kt") public void testTabReplace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace2.kt"); } @TestMetadata("TabReplace3.kt") public void testTabReplace3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TabReplace3.kt"); } @TestMetadata("TypeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TypeParameter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/TypeParameter.kt"); } @TestMetadata("UserPrefix.kt") public void testUserPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/parameterNameAndType/UserPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/parameterNameAndType/UserPrefix.kt"); } } @@ -716,38 +644,37 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticMemberOfNotImported extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticMemberOfNotImported() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbigiousExtension.kt") public void testAmbigiousExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/AmbigiousExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/AmbigiousExtension.kt"); } @TestMetadata("AmbigiousName.kt") public void testAmbigiousName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/AmbigiousName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/AmbigiousName.kt"); } @TestMetadata("CompanionObjectMember.kt") public void testCompanionObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/CompanionObjectMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/CompanionObjectMember.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/EnumEntry.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/EnumEntry.kt"); } @TestMetadata("ObjectMember.kt") public void testObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/ObjectMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMemberOfNotImported/ObjectMember.kt"); } } @@ -755,32 +682,32 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticMembers extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/basic/staticMembers"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectMethod.kt") public void testClassObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMembers/classObjectMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/classObjectMethod.kt"); } @TestMetadata("ImportFromCompanionObject.kt") public void testImportFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMembers/ImportFromCompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/ImportFromCompanionObject.kt"); } @TestMetadata("ImportJavaStaticMethod.kt") public void testImportJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMembers/ImportJavaStaticMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/ImportJavaStaticMethod.kt"); } @TestMetadata("JavaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/staticMembers/JavaStaticMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/staticMembers/JavaStaticMethod.kt"); } } @@ -788,58 +715,53 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplate extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/4.kt"); } @TestMetadata("AfterDot1.kt") public void testAfterDot1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot1.kt"); } @TestMetadata("AfterDot2.kt") public void testAfterDot2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot2.kt"); } @TestMetadata("AfterDot3.kt") public void testAfterDot3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot3.kt"); } @TestMetadata("AfterDot4.kt") public void testAfterDot4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterDot4.kt"); } @TestMetadata("AfterThisDot.kt") public void testAfterThisDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterThisDot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/AfterThisDot.kt"); } public void testAllFilesPresentInStringTemplate() throws Exception { @@ -848,38 +770,32 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestMetadata("GlobalVal.kt") public void testGlobalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalVal.kt"); } @TestMetadata("GlobalValInCurlyBraces.kt") public void testGlobalValInCurlyBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/GlobalValInCurlyBraces.kt"); } @TestMetadata("InsertCurlyBracesBeforeLetter.kt") public void testInsertCurlyBracesBeforeLetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/InsertCurlyBracesBeforeLetter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/InsertCurlyBracesBeforeLetter.kt"); } @TestMetadata("NotEmptyPrefix.kt") public void testNotEmptyPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/NotEmptyPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/NotEmptyPrefix.kt"); } @TestMetadata("Replace.kt") public void testReplace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/Replace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/Replace.kt"); } @TestMetadata("ValInObject.kt") public void testValInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/stringTemplate/ValInObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/stringTemplate/ValInObject.kt"); } } @@ -887,16 +803,18 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArgsForCall extends AbstractBasicCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterElse.kt") public void testAfterElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElse.kt"); } @TestMetadata("AfterElvis.kt") public void testAfterElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/AfterElvis.kt"); } public void testAllFilesPresentInTypeArgsForCall() throws Exception { @@ -905,68 +823,57 @@ public class BasicCompletionHandlerTestGenerated extends AbstractBasicCompletion @TestMetadata("ExpectedTypeDoesNotHelp.kt") public void testExpectedTypeDoesNotHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExpectedTypeDoesNotHelp.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExpectedTypeDoesNotHelp.kt"); } @TestMetadata("ExpectedTypeDoesNotHelp2.kt") public void testExpectedTypeDoesNotHelp2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExpectedTypeDoesNotHelp2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExpectedTypeDoesNotHelp2.kt"); } @TestMetadata("ExplicitLambdaSignature.kt") public void testExplicitLambdaSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExplicitLambdaSignature.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ExplicitLambdaSignature.kt"); } @TestMetadata("FunctionTypeParameter1.kt") public void testFunctionTypeParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter1.kt"); } @TestMetadata("FunctionTypeParameter2.kt") public void testFunctionTypeParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/FunctionTypeParameter2.kt"); } @TestMetadata("HasExpectedType.kt") public void testHasExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/HasExpectedType.kt"); } @TestMetadata("NotAllTypeArgumentsFromParameters.kt") public void testNotAllTypeArgumentsFromParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/NotAllTypeArgumentsFromParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/NotAllTypeArgumentsFromParameters.kt"); } @TestMetadata("ReplaceByTab1.kt") public void testReplaceByTab1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab1.kt"); } @TestMetadata("ReplaceByTab2.kt") public void testReplaceByTab2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/ReplaceByTab2.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/Simple.kt"); } @TestMetadata("TypeArgumentsFromParameters.kt") public void testTypeArgumentsFromParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/basic/typeArgsForCall/TypeArgumentsFromParameters.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionCharFilterTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionCharFilterTestGenerated.java index 0ace57ec979..03e399008b9 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionCharFilterTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/CompletionCharFilterTestGenerated.java @@ -21,193 +21,166 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CompletionCharFilterTestGenerated extends AbstractCompletionCharFilterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCharFilter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/charFilter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Colon.kt") public void testColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Colon.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Colon.kt"); } @TestMetadata("Comma1.kt") public void testComma1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Comma1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Comma1.kt"); } @TestMetadata("Comma2.kt") public void testComma2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Comma2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Comma2.kt"); } @TestMetadata("Comma3.kt") public void testComma3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Comma3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Comma3.kt"); } @TestMetadata("Comma4.kt") public void testComma4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Comma4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Comma4.kt"); } @TestMetadata("Comma5.kt") public void testComma5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Comma5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Comma5.kt"); } @TestMetadata("CommaForFunction1.kt") public void testCommaForFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/CommaForFunction1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/CommaForFunction1.kt"); } @TestMetadata("CommaForFunction2.kt") public void testCommaForFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/CommaForFunction2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/CommaForFunction2.kt"); } @TestMetadata("ConstructorWithLambdaArg1.kt") public void testConstructorWithLambdaArg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/ConstructorWithLambdaArg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/ConstructorWithLambdaArg1.kt"); } @TestMetadata("ConstructorWithLambdaArg2.kt") public void testConstructorWithLambdaArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/ConstructorWithLambdaArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/ConstructorWithLambdaArg2.kt"); } @TestMetadata("Dot.kt") public void testDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Dot.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Dot.kt"); } @TestMetadata("DotAfterFun1.kt") public void testDotAfterFun1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/DotAfterFun1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/DotAfterFun1.kt"); } @TestMetadata("DotAfterFun2.kt") public void testDotAfterFun2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/DotAfterFun2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/DotAfterFun2.kt"); } @TestMetadata("Eq1.kt") public void testEq1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Eq1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Eq1.kt"); } @TestMetadata("Eq2.kt") public void testEq2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Eq2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Eq2.kt"); } @TestMetadata("FunctionLiteralParameter1.kt") public void testFunctionLiteralParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/FunctionLiteralParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/FunctionLiteralParameter1.kt"); } @TestMetadata("FunctionLiteralParameter2.kt") public void testFunctionLiteralParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/FunctionLiteralParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/FunctionLiteralParameter2.kt"); } @TestMetadata("FunctionLiteralParameter3.kt") public void testFunctionLiteralParameter3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/FunctionLiteralParameter3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/FunctionLiteralParameter3.kt"); } @TestMetadata("FunctionWithLambdaArg1.kt") public void testFunctionWithLambdaArg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/FunctionWithLambdaArg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/FunctionWithLambdaArg1.kt"); } @TestMetadata("FunctionWithLambdaArg2.kt") public void testFunctionWithLambdaArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/FunctionWithLambdaArg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/FunctionWithLambdaArg2.kt"); } @TestMetadata("InfixCallAndSpace.kt") public void testInfixCallAndSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/InfixCallAndSpace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/InfixCallAndSpace.kt"); } @TestMetadata("KeywordAndSpace.kt") public void testKeywordAndSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/KeywordAndSpace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/KeywordAndSpace.kt"); } @TestMetadata("LParenth.kt") public void testLParenth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/LParenth.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/LParenth.kt"); } @TestMetadata("NamedParameter1.kt") public void testNamedParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/NamedParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/NamedParameter1.kt"); } @TestMetadata("NamedParameter2.kt") public void testNamedParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/NamedParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/NamedParameter2.kt"); } @TestMetadata("QualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/QualifiedThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/QualifiedThis.kt"); } @TestMetadata("RangeTyping.kt") public void testRangeTyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/RangeTyping.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/RangeTyping.kt"); } @TestMetadata("Space.kt") public void testSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/Space.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/Space.kt"); } @TestMetadata("VariableName.kt") public void testVariableName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/VariableName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/VariableName.kt"); } @TestMetadata("VariableName2.kt") public void testVariableName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/VariableName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/VariableName2.kt"); } @TestMetadata("VariableName3.kt") public void testVariableName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/charFilter/VariableName3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/charFilter/VariableName3.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/KeywordCompletionHandlerTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/KeywordCompletionHandlerTestGenerated.java index 3611605a690..4f5a6c3005a 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/KeywordCompletionHandlerTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/KeywordCompletionHandlerTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KeywordCompletionHandlerTestGenerated extends AbstractKeywordCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddCompanionToObject.kt") public void testAddCompanionToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/AddCompanionToObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/AddCompanionToObject.kt"); } public void testAllFilesPresentInKeywords() throws Exception { @@ -33,205 +36,171 @@ public class KeywordCompletionHandlerTestGenerated extends AbstractKeywordComple @TestMetadata("Break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Break.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Break.kt"); } @TestMetadata("Catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Catch.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Catch.kt"); } @TestMetadata("CompanionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/CompanionObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/CompanionObject.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Constructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Constructor.kt"); } @TestMetadata("ConstructorPrimary.kt") public void testConstructorPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ConstructorPrimary.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ConstructorPrimary.kt"); } @TestMetadata("Do.kt") public void testDo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Do.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Do.kt"); } @TestMetadata("FileKeyword.kt") public void testFileKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/FileKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/FileKeyword.kt"); } @TestMetadata("Finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Finally.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Finally.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/For.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/For.kt"); } @TestMetadata("Getter1.kt") public void testGetter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Getter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Getter1.kt"); } @TestMetadata("Getter2.kt") public void testGetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Getter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Getter2.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/If.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/If.kt"); } @TestMetadata("IfLParenth.kt") public void testIfLParenth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/IfLParenth.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/IfLParenth.kt"); } @TestMetadata("IfParansOnNextLine.kt") public void testIfParansOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/IfParansOnNextLine.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/IfParansOnNextLine.kt"); } @TestMetadata("IfSpace.kt") public void testIfSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/IfSpace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/IfSpace.kt"); } @TestMetadata("Init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Init.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Init.kt"); } @TestMetadata("NoSpaceAfterNull.kt") public void testNoSpaceAfterNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/NoSpaceAfterNull.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/NoSpaceAfterNull.kt"); } @TestMetadata("QualifiedReturnNonUnit.kt") public void testQualifiedReturnNonUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/QualifiedReturnNonUnit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/QualifiedReturnNonUnit.kt"); } @TestMetadata("QualifiedReturnNonUnitExplicit.kt") public void testQualifiedReturnNonUnitExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/QualifiedReturnNonUnitExplicit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/QualifiedReturnNonUnitExplicit.kt"); } @TestMetadata("QualifiedReturnUnit.kt") public void testQualifiedReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/QualifiedReturnUnit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/QualifiedReturnUnit.kt"); } @TestMetadata("ReturnEmptyList.kt") public void testReturnEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ReturnEmptyList.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ReturnEmptyList.kt"); } @TestMetadata("ReturnInEmptyType.kt") public void testReturnInEmptyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ReturnInEmptyType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ReturnInEmptyType.kt"); } @TestMetadata("ReturnInProperty.kt") public void testReturnInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ReturnInProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ReturnInProperty.kt"); } @TestMetadata("ReturnInTypeFunction.kt") public void testReturnInTypeFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ReturnInTypeFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ReturnInTypeFunction.kt"); } @TestMetadata("ReturnInUnit.kt") public void testReturnInUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ReturnInUnit.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ReturnInUnit.kt"); } @TestMetadata("ReturnNull.kt") public void testReturnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/ReturnNull.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/ReturnNull.kt"); } @TestMetadata("Setter1.kt") public void testSetter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Setter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Setter1.kt"); } @TestMetadata("Setter2.kt") public void testSetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Setter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Setter2.kt"); } @TestMetadata("SpaceAfterImport.kt") public void testSpaceAfterImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/SpaceAfterImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/SpaceAfterImport.kt"); } @TestMetadata("Try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/Try.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/Try.kt"); } @TestMetadata("UseSiteAnnotationTarget1.kt") public void testUseSiteAnnotationTarget1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/UseSiteAnnotationTarget1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/UseSiteAnnotationTarget1.kt"); } @TestMetadata("UseSiteAnnotationTarget2.kt") public void testUseSiteAnnotationTarget2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/UseSiteAnnotationTarget2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/UseSiteAnnotationTarget2.kt"); } @TestMetadata("UseSiteAnnotationTarget3.kt") public void testUseSiteAnnotationTarget3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/UseSiteAnnotationTarget3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/UseSiteAnnotationTarget3.kt"); } @TestMetadata("While.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/keywords/While.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/keywords/While.kt"); } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java index 7e5c3ba5e89..4a9d205f756 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/handlers/SmartCompletionHandlerTestGenerated.java @@ -21,34 +21,33 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterAs.kt") public void testAfterAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AfterAs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AfterAs.kt"); } @TestMetadata("AfterAs2.kt") public void testAfterAs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AfterAs2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AfterAs2.kt"); } @TestMetadata("AfterAs3.kt") public void testAfterAs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AfterAs3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AfterAs3.kt"); } @TestMetadata("AfterSafeAs.kt") public void testAfterSafeAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AfterSafeAs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AfterSafeAs.kt"); } @TestMetadata("AfterVararg.kt") public void testAfterVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AfterVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AfterVararg.kt"); } public void testAllFilesPresentInSmart() throws Exception { @@ -57,840 +56,705 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion @TestMetadata("AnonymousObject1.kt") public void testAnonymousObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AnonymousObject1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AnonymousObject1.kt"); } @TestMetadata("AnonymousObject2.kt") public void testAnonymousObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AnonymousObject2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AnonymousObject2.kt"); } @TestMetadata("AnonymousObject3.kt") public void testAnonymousObject3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AnonymousObject3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AnonymousObject3.kt"); } @TestMetadata("AnonymousObjectInsertsImport.kt") public void testAnonymousObjectInsertsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AnonymousObjectInsertsImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AnonymousObjectInsertsImport.kt"); } @TestMetadata("AnonymousObjectUninferredTypeArgs.kt") public void testAnonymousObjectUninferredTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AnonymousObjectUninferredTypeArgs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AnonymousObjectUninferredTypeArgs.kt"); } @TestMetadata("ArrayClassLiteral.kt") public void testArrayClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ArrayClassLiteral.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ArrayClassLiteral.kt"); } @TestMetadata("AutoCompleteAfterAs1.kt") public void testAutoCompleteAfterAs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AutoCompleteAfterAs1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AutoCompleteAfterAs1.kt"); } @TestMetadata("AutoCompleteAfterAs2.kt") public void testAutoCompleteAfterAs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AutoCompleteAfterAs2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AutoCompleteAfterAs2.kt"); } @TestMetadata("AutoCompleteAfterAs3.kt") public void testAutoCompleteAfterAs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/AutoCompleteAfterAs3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/AutoCompleteAfterAs3.kt"); } @TestMetadata("CallableReference1.kt") public void testCallableReference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/CallableReference1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/CallableReference1.kt"); } @TestMetadata("CallableReference2.kt") public void testCallableReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/CallableReference2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/CallableReference2.kt"); } @TestMetadata("CallableReference3.kt") public void testCallableReference3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/CallableReference3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/CallableReference3.kt"); } @TestMetadata("CallableReference4.kt") public void testCallableReference4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/CallableReference4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/CallableReference4.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassInClassObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassInClassObject.kt"); } @TestMetadata("ClassInObject.kt") public void testClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassInObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassInObject.kt"); } @TestMetadata("ClassObjectFieldKeywordName.kt") public void testClassObjectFieldKeywordName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassObjectFieldKeywordName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassObjectFieldKeywordName.kt"); } @TestMetadata("ClassObjectMethod1.kt") public void testClassObjectMethod1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassObjectMethod1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassObjectMethod1.kt"); } @TestMetadata("ClassObjectMethod2.kt") public void testClassObjectMethod2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassObjectMethod2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassObjectMethod2.kt"); } @TestMetadata("ClassObjectMethod3.kt") public void testClassObjectMethod3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassObjectMethod3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassObjectMethod3.kt"); } @TestMetadata("ClassObjectMethod4.kt") public void testClassObjectMethod4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClassObjectMethod4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClassObjectMethod4.kt"); } @TestMetadata("ClosingParenthesis1.kt") public void testClosingParenthesis1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClosingParenthesis1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClosingParenthesis1.kt"); } @TestMetadata("ClosingParenthesis2.kt") public void testClosingParenthesis2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ClosingParenthesis2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ClosingParenthesis2.kt"); } @TestMetadata("Comma1.kt") public void testComma1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma1.kt"); } @TestMetadata("Comma10.kt") public void testComma10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma10.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma10.kt"); } @TestMetadata("Comma11.kt") public void testComma11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma11.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma11.kt"); } @TestMetadata("Comma2.kt") public void testComma2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma2.kt"); } @TestMetadata("Comma3.kt") public void testComma3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma3.kt"); } @TestMetadata("Comma4.kt") public void testComma4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma4.kt"); } @TestMetadata("Comma5.kt") public void testComma5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma5.kt"); } @TestMetadata("Comma6.kt") public void testComma6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma6.kt"); } @TestMetadata("Comma7.kt") public void testComma7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma7.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma7.kt"); } @TestMetadata("Comma8.kt") public void testComma8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma8.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma8.kt"); } @TestMetadata("Comma9.kt") public void testComma9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Comma9.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Comma9.kt"); } @TestMetadata("CommaInSuperConstructorCall.kt") public void testCommaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/CommaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/CommaInSuperConstructorCall.kt"); } @TestMetadata("ConcreteJavaClass.kt") public void testConcreteJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConcreteJavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConcreteJavaClass.kt"); } @TestMetadata("ConcreteJavaClass2.kt") public void testConcreteJavaClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConcreteJavaClass2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConcreteJavaClass2.kt"); } @TestMetadata("ConcreteKClass.kt") public void testConcreteKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConcreteKClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConcreteKClass.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Constructor.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Constructor.kt"); } @TestMetadata("ConstructorForGenericType.kt") public void testConstructorForGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorForGenericType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorForGenericType.kt"); } @TestMetadata("ConstructorForGenericType2.kt") public void testConstructorForGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorForGenericType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorForGenericType2.kt"); } @TestMetadata("ConstructorForJavaClass.kt") public void testConstructorForJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorForJavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorForJavaClass.kt"); } @TestMetadata("ConstructorForNullable.kt") public void testConstructorForNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorForNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorForNullable.kt"); } @TestMetadata("ConstructorInsertsImport.kt") public void testConstructorInsertsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorInsertsImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorInsertsImport.kt"); } @TestMetadata("ConstructorInsertsImport2.kt") public void testConstructorInsertsImport2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorInsertsImport2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorInsertsImport2.kt"); } @TestMetadata("ConstructorWithKeywordName.kt") public void testConstructorWithKeywordName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorWithKeywordName.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorWithKeywordName.kt"); } @TestMetadata("ConstructorWithLambdaParameter1.kt") public void testConstructorWithLambdaParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorWithLambdaParameter1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorWithLambdaParameter1.kt"); } @TestMetadata("ConstructorWithLambdaParameter2.kt") public void testConstructorWithLambdaParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorWithLambdaParameter2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorWithLambdaParameter2.kt"); } @TestMetadata("ConstructorWithParameters.kt") public void testConstructorWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ConstructorWithParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ConstructorWithParameters.kt"); } @TestMetadata("DefaultParams.kt") public void testDefaultParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/DefaultParams.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/DefaultParams.kt"); } @TestMetadata("DoNotEraseBraceOnTab.kt") public void testDoNotEraseBraceOnTab() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/DoNotEraseBraceOnTab.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/DoNotEraseBraceOnTab.kt"); } @TestMetadata("DoNotInsertTypeArguments.kt") public void testDoNotInsertTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/DoNotInsertTypeArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/DoNotInsertTypeArguments.kt"); } @TestMetadata("DoNotReplaceOnEnter.kt") public void testDoNotReplaceOnEnter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/DoNotReplaceOnEnter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/DoNotReplaceOnEnter.kt"); } @TestMetadata("EnumMember.kt") public void testEnumMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/EnumMember.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/EnumMember.kt"); } @TestMetadata("ExclChar.kt") public void testExclChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ExclChar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ExclChar.kt"); } @TestMetadata("ExtensionFunctionTypeVariable1.kt") public void testExtensionFunctionTypeVariable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ExtensionFunctionTypeVariable1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ExtensionFunctionTypeVariable1.kt"); } @TestMetadata("ExtensionFunctionTypeVariable2.kt") public void testExtensionFunctionTypeVariable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ExtensionFunctionTypeVariable2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ExtensionFunctionTypeVariable2.kt"); } @TestMetadata("ForLoopRange.kt") public void testForLoopRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ForLoopRange.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ForLoopRange.kt"); } @TestMetadata("ForLoopRange2.kt") public void testForLoopRange2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ForLoopRange2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ForLoopRange2.kt"); } @TestMetadata("FunctionLiteralParamAlreadyExist.kt") public void testFunctionLiteralParamAlreadyExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/FunctionLiteralParamAlreadyExist.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/FunctionLiteralParamAlreadyExist.kt"); } @TestMetadata("GenericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/GenericFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/GenericFunction.kt"); } @TestMetadata("GetWithBrackets.kt") public void testGetWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/GetWithBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/GetWithBrackets.kt"); } @TestMetadata("IfCondition.kt") public void testIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/IfCondition.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/IfCondition.kt"); } @TestMetadata("IfValue1.kt") public void testIfValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/IfValue1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/IfValue1.kt"); } @TestMetadata("IfValue2.kt") public void testIfValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/IfValue2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/IfValue2.kt"); } @TestMetadata("IfValue3.kt") public void testIfValue3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/IfValue3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/IfValue3.kt"); } @TestMetadata("IfValueInBlock.kt") public void testIfValueInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/IfValueInBlock.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/IfValueInBlock.kt"); } @TestMetadata("InElvisOperator.kt") public void testInElvisOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/InElvisOperator.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/InElvisOperator.kt"); } @TestMetadata("InnerClassInstantiation1.kt") public void testInnerClassInstantiation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/InnerClassInstantiation1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/InnerClassInstantiation1.kt"); } @TestMetadata("InnerClassInstantiation2.kt") public void testInnerClassInstantiation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/InnerClassInstantiation2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/InnerClassInstantiation2.kt"); } @TestMetadata("InsertTypeArguments.kt") public void testInsertTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/InsertTypeArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/InsertTypeArguments.kt"); } @TestMetadata("JavaEnumMemberInsertsImport.kt") public void testJavaEnumMemberInsertsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/JavaEnumMemberInsertsImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/JavaEnumMemberInsertsImport.kt"); } @TestMetadata("JavaStaticField.kt") public void testJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/JavaStaticField.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/JavaStaticField.kt"); } @TestMetadata("JavaStaticFieldInsertImport.kt") public void testJavaStaticFieldInsertImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/JavaStaticFieldInsertImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/JavaStaticFieldInsertImport.kt"); } @TestMetadata("JavaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/JavaStaticMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/JavaStaticMethod.kt"); } @TestMetadata("JavaStaticMethod2.kt") public void testJavaStaticMethod2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/JavaStaticMethod2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/JavaStaticMethod2.kt"); } @TestMetadata("JavaStaticMethodInsertsImport.kt") public void testJavaStaticMethodInsertsImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/JavaStaticMethodInsertsImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/JavaStaticMethodInsertsImport.kt"); } @TestMetadata("kt10602.kt") public void testKt10602() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/kt10602.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/kt10602.kt"); } @TestMetadata("kt6179filterTo.kt") public void testKt6179filterTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/kt6179filterTo.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/kt6179filterTo.kt"); } @TestMetadata("LambdaValue1.kt") public void testLambdaValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/LambdaValue1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/LambdaValue1.kt"); } @TestMetadata("LambdaValue2.kt") public void testLambdaValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/LambdaValue2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/LambdaValue2.kt"); } @TestMetadata("LastNonOptionalParamIsFunction.kt") public void testLastNonOptionalParamIsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/LastNonOptionalParamIsFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/LastNonOptionalParamIsFunction.kt"); } @TestMetadata("LastParamIsFunction.kt") public void testLastParamIsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/LastParamIsFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/LastParamIsFunction.kt"); } @TestMetadata("MergeTail1.kt") public void testMergeTail1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MergeTail1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MergeTail1.kt"); } @TestMetadata("MergeTail2.kt") public void testMergeTail2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MergeTail2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MergeTail2.kt"); } @TestMetadata("MergeTail3.kt") public void testMergeTail3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MergeTail3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MergeTail3.kt"); } @TestMetadata("MergeTail4.kt") public void testMergeTail4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MergeTail4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MergeTail4.kt"); } @TestMetadata("MultipleArgsIntoBrackets.kt") public void testMultipleArgsIntoBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MultipleArgsIntoBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MultipleArgsIntoBrackets.kt"); } @TestMetadata("MultipleArgsItem.kt") public void testMultipleArgsItem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MultipleArgsItem.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MultipleArgsItem.kt"); } @TestMetadata("MultipleArgsItemByTab.kt") public void testMultipleArgsItemByTab() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/MultipleArgsItemByTab.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/MultipleArgsItemByTab.kt"); } @TestMetadata("NamedArgument1.kt") public void testNamedArgument1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedArgument1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedArgument1.kt"); } @TestMetadata("NamedArgument2.kt") public void testNamedArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedArgument2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedArgument2.kt"); } @TestMetadata("NamedArgument3.kt") public void testNamedArgument3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedArgument3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedArgument3.kt"); } @TestMetadata("NamedArgumentVararg1.kt") public void testNamedArgumentVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedArgumentVararg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedArgumentVararg1.kt"); } @TestMetadata("NamedArgumentVararg2.kt") public void testNamedArgumentVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedArgumentVararg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedArgumentVararg2.kt"); } @TestMetadata("NamedArgumentVararg3.kt") public void testNamedArgumentVararg3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedArgumentVararg3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedArgumentVararg3.kt"); } @TestMetadata("NamedBooleanArgument.kt") public void testNamedBooleanArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NamedBooleanArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NamedBooleanArgument.kt"); } @TestMetadata("NestedDataClass.kt") public void testNestedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NestedDataClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NestedDataClass.kt"); } @TestMetadata("NestedDataClassComma.kt") public void testNestedDataClassComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NestedDataClassComma.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NestedDataClassComma.kt"); } @TestMetadata("NullableValue1.kt") public void testNullableValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NullableValue1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NullableValue1.kt"); } @TestMetadata("NullableValue2.kt") public void testNullableValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NullableValue2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NullableValue2.kt"); } @TestMetadata("NullableValue3.kt") public void testNullableValue3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NullableValue3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NullableValue3.kt"); } @TestMetadata("NullableValueKeepOldArguments.kt") public void testNullableValueKeepOldArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/NullableValueKeepOldArguments.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/NullableValueKeepOldArguments.kt"); } @TestMetadata("ObjectFromType.kt") public void testObjectFromType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ObjectFromType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ObjectFromType.kt"); } @TestMetadata("QualifiedCallReplacementBug.kt") public void testQualifiedCallReplacementBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/QualifiedCallReplacementBug.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/QualifiedCallReplacementBug.kt"); } @TestMetadata("QualifiedThisKeywordName1.kt") public void testQualifiedThisKeywordName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/QualifiedThisKeywordName1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/QualifiedThisKeywordName1.kt"); } @TestMetadata("QualifiedThisKeywordName2.kt") public void testQualifiedThisKeywordName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/QualifiedThisKeywordName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/QualifiedThisKeywordName2.kt"); } @TestMetadata("ReplaceArgument.kt") public void testReplaceArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/ReplaceArgument.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/ReplaceArgument.kt"); } @TestMetadata("SAMExpected1.kt") public void testSAMExpected1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/SAMExpected1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/SAMExpected1.kt"); } @TestMetadata("SAMExpected2.kt") public void testSAMExpected2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/SAMExpected2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/SAMExpected2.kt"); } @TestMetadata("SecondVararg.kt") public void testSecondVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/SecondVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/SecondVararg.kt"); } @TestMetadata("SetWithBrackets.kt") public void testSetWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/SetWithBrackets.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/SetWithBrackets.kt"); } @TestMetadata("TabReplaceComma1.kt") public void testTabReplaceComma1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceComma1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceComma1.kt"); } @TestMetadata("TabReplaceComma2.kt") public void testTabReplaceComma2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceComma2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceComma2.kt"); } @TestMetadata("TabReplaceExpression.kt") public void testTabReplaceExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceExpression.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceExpression.kt"); } @TestMetadata("TabReplaceExpression2.kt") public void testTabReplaceExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceExpression2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceExpression2.kt"); } @TestMetadata("TabReplaceExpression3.kt") public void testTabReplaceExpression3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceExpression3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceExpression3.kt"); } @TestMetadata("TabReplaceExpression4.kt") public void testTabReplaceExpression4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceExpression4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceExpression4.kt"); } @TestMetadata("TabReplaceFunctionName1.kt") public void testTabReplaceFunctionName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceFunctionName1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceFunctionName1.kt"); } @TestMetadata("TabReplaceFunctionName2.kt") public void testTabReplaceFunctionName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceFunctionName2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceFunctionName2.kt"); } @TestMetadata("TabReplaceFunctionName3.kt") public void testTabReplaceFunctionName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceFunctionName3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceFunctionName3.kt"); } @TestMetadata("TabReplaceIdentifier.kt") public void testTabReplaceIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceIdentifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceIdentifier.kt"); } @TestMetadata("TabReplaceOperand.kt") public void testTabReplaceOperand() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TabReplaceOperand.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TabReplaceOperand.kt"); } @TestMetadata("True.kt") public void testTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/True.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/True.kt"); } @TestMetadata("True2.kt") public void testTrue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/True2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/True2.kt"); } @TestMetadata("TypeParameterAfterAs.kt") public void testTypeParameterAfterAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/TypeParameterAfterAs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/TypeParameterAfterAs.kt"); } @TestMetadata("Vararg1.kt") public void testVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Vararg1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Vararg1.kt"); } @TestMetadata("Vararg2.kt") public void testVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Vararg2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Vararg2.kt"); } @TestMetadata("Vararg3.kt") public void testVararg3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Vararg3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Vararg3.kt"); } @TestMetadata("Vararg4.kt") public void testVararg4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Vararg4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Vararg4.kt"); } @TestMetadata("Vararg5.kt") public void testVararg5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Vararg5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Vararg5.kt"); } @TestMetadata("Vararg6.kt") public void testVararg6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/Vararg6.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/Vararg6.kt"); } @TestMetadata("VarargAfterStar.kt") public void testVarargAfterStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/VarargAfterStar.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/VarargAfterStar.kt"); } @TestMetadata("VarargWithParameterAfter.kt") public void testVarargWithParameterAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/VarargWithParameterAfter.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/VarargWithParameterAfter.kt"); } @TestMetadata("WhenElse.kt") public void testWhenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/WhenElse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/WhenElse.kt"); } @TestMetadata("idea/idea-completion/testData/handlers/smart/lambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lambda extends AbstractSmartCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/4.kt"); } @TestMetadata("5.kt") public void test5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/5.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/5.kt"); } public void testAllFilesPresentInLambda() throws Exception { @@ -899,20 +763,17 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion @TestMetadata("InsertImport.kt") public void testInsertImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/InsertImport.kt"); } @TestMetadata("ParameterNamesSpecified.kt") public void testParameterNamesSpecified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/ParameterNamesSpecified.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/ParameterNamesSpecified.kt"); } @TestMetadata("ParameterNamesSpecified_NullableType.kt") public void testParameterNamesSpecified_NullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambda/ParameterNamesSpecified_NullableType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambda/ParameterNamesSpecified_NullableType.kt"); } } @@ -920,20 +781,22 @@ public class SmartCompletionHandlerTestGenerated extends AbstractSmartCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaSignature extends AbstractSmartCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdaSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/smart/lambdaSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NoAdditionalSpace.kt") public void testNoAdditionalSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambdaSignature/NoAdditionalSpace.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambdaSignature/NoAdditionalSpace.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/smart/lambdaSignature/Simple.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/smart/lambdaSignature/Simple.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java index cc5c90f099c..2c4722455e9 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/BasicCompletionWeigherTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BasicCompletionWeigherTestGenerated extends AbstractBasicCompletionWeigherTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterNullable.kt") public void testAfterNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/AfterNullable.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/AfterNullable.kt"); } public void testAllFilesPresentInBasic() throws Exception { @@ -33,186 +36,160 @@ public class BasicCompletionWeigherTestGenerated extends AbstractBasicCompletion @TestMetadata("CallableReference_NothingLast.kt") public void testCallableReference_NothingLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/CallableReference_NothingLast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/CallableReference_NothingLast.kt"); } @TestMetadata("Callables.kt") public void testCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/Callables.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/Callables.kt"); } @TestMetadata("DelegateToOtherObject.kt") public void testDelegateToOtherObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/DelegateToOtherObject.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/DelegateToOtherObject.kt"); } @TestMetadata("DeprecatedFun.kt") public void testDeprecatedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/DeprecatedFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/DeprecatedFun.kt"); } @TestMetadata("DeprecatedJavaClass.kt") public void testDeprecatedJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/DeprecatedJavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/DeprecatedJavaClass.kt"); } @TestMetadata("DslCallWithExpectedType.kt") public void testDslCallWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/DslCallWithExpectedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/DslCallWithExpectedType.kt"); } @TestMetadata("DslCalls.kt") public void testDslCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/DslCalls.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/DslCalls.kt"); } @TestMetadata("DslCallsWithMultipleReceivers.kt") public void testDslCallsWithMultipleReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/DslCallsWithMultipleReceivers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/DslCallsWithMultipleReceivers.kt"); } @TestMetadata("ExactMatchForKeyword.kt") public void testExactMatchForKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/ExactMatchForKeyword.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/ExactMatchForKeyword.kt"); } @TestMetadata("ImportedFirst.kt") public void testImportedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/ImportedFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/ImportedFirst.kt"); } @TestMetadata("ImportedFirstForJavaClass.kt") public void testImportedFirstForJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/ImportedFirstForJavaClass.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/ImportedFirstForJavaClass.kt"); } @TestMetadata("ImportedOrder.kt") public void testImportedOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/ImportedOrder.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/ImportedOrder.kt"); } @TestMetadata("KeywordsLast.kt") public void testKeywordsLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/KeywordsLast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/KeywordsLast.kt"); } @TestMetadata("LambdaSignature.kt") public void testLambdaSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/LambdaSignature.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/LambdaSignature.kt"); } @TestMetadata("LocalFileBeforeImported.kt") public void testLocalFileBeforeImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/LocalFileBeforeImported.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/LocalFileBeforeImported.kt"); } @TestMetadata("LocalValuesAndParams.kt") public void testLocalValuesAndParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/LocalValuesAndParams.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/LocalValuesAndParams.kt"); } @TestMetadata("LocalsBeforeKeywords.kt") public void testLocalsBeforeKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/LocalsBeforeKeywords.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/LocalsBeforeKeywords.kt"); } @TestMetadata("LocalsPropertiesKeywords.kt") public void testLocalsPropertiesKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/LocalsPropertiesKeywords.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/LocalsPropertiesKeywords.kt"); } @TestMetadata("NamedParameters.kt") public void testNamedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/NamedParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/NamedParameters.kt"); } @TestMetadata("NamedParameters2.kt") public void testNamedParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/NamedParameters2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/NamedParameters2.kt"); } @TestMetadata("NamedParameters3.kt") public void testNamedParameters3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/NamedParameters3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/NamedParameters3.kt"); } @TestMetadata("Packages.kt") public void testPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/Packages.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/Packages.kt"); } @TestMetadata("ParametersBeforeKeywords.kt") public void testParametersBeforeKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/ParametersBeforeKeywords.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/ParametersBeforeKeywords.kt"); } @TestMetadata("PreferFromJdk.kt") public void testPreferFromJdk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/PreferFromJdk.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/PreferFromJdk.kt"); } @TestMetadata("PreferGetMethodToProperty.kt") public void testPreferGetMethodToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/PreferGetMethodToProperty.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/PreferGetMethodToProperty.kt"); } @TestMetadata("Prefix.kt") public void testPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/Prefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/Prefix.kt"); } @TestMetadata("PropertiesBeforeKeywords.kt") public void testPropertiesBeforeKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/PropertiesBeforeKeywords.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/PropertiesBeforeKeywords.kt"); } @TestMetadata("StaticMembers.kt") public void testStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/StaticMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/StaticMembers.kt"); } @TestMetadata("SuperMembers.kt") public void testSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/SuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/SuperMembers.kt"); } @TestMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExpectedInfo extends AbstractBasicCompletionWeigherTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterAs.kt") public void testAfterAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/AfterAs.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/AfterAs.kt"); } public void testAllFilesPresentInExpectedInfo() throws Exception { @@ -221,86 +198,72 @@ public class BasicCompletionWeigherTestGenerated extends AbstractBasicCompletion @TestMetadata("CompanionObjectMethod.kt") public void testCompanionObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/CompanionObjectMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/CompanionObjectMethod.kt"); } @TestMetadata("EnumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/EnumEntries.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/EnumEntries.kt"); } @TestMetadata("ExpectedType.kt") public void testExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/ExpectedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/ExpectedType.kt"); } @TestMetadata("ExpectedType2.kt") public void testExpectedType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/ExpectedType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/ExpectedType2.kt"); } @TestMetadata("LambdaValue.kt") public void testLambdaValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/LambdaValue.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/LambdaValue.kt"); } @TestMetadata("MultiArgsItem.kt") public void testMultiArgsItem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/MultiArgsItem.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/MultiArgsItem.kt"); } @TestMetadata("NameSimilarity.kt") public void testNameSimilarity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/NameSimilarity.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/NameSimilarity.kt"); } @TestMetadata("NameSimilarityAndNoExpectedType.kt") public void testNameSimilarityAndNoExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/NameSimilarityAndNoExpectedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/NameSimilarityAndNoExpectedType.kt"); } @TestMetadata("NameSimilarityAndNoExpectedType2.kt") public void testNameSimilarityAndNoExpectedType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/NameSimilarityAndNoExpectedType2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/NameSimilarityAndNoExpectedType2.kt"); } @TestMetadata("NoStupidComparison.kt") public void testNoStupidComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/NoStupidComparison.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/NoStupidComparison.kt"); } @TestMetadata("Null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/Null.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/Null.kt"); } @TestMetadata("PreferMatchingThis.kt") public void testPreferMatchingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/PreferMatchingThis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/PreferMatchingThis.kt"); } @TestMetadata("TrueFalse.kt") public void testTrueFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/TrueFalse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/TrueFalse.kt"); } @TestMetadata("WhenByEnum.kt") public void testWhenByEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/expectedInfo/WhenByEnum.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/expectedInfo/WhenByEnum.kt"); } } @@ -308,50 +271,47 @@ public class BasicCompletionWeigherTestGenerated extends AbstractBasicCompletion @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterNameAndType extends AbstractBasicCompletionWeigherTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterNameAndType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/weighers/basic/parameterNameAndType"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/Deprecated.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/Deprecated.kt"); } @TestMetadata("FromCurrentFilePriority.kt") public void testFromCurrentFilePriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/FromCurrentFilePriority.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/FromCurrentFilePriority.kt"); } @TestMetadata("ImportedFirst.kt") public void testImportedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/ImportedFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/ImportedFirst.kt"); } @TestMetadata("MoreWordsMatchFirst.kt") public void testMoreWordsMatchFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/MoreWordsMatchFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/MoreWordsMatchFirst.kt"); } @TestMetadata("ShorterFirst.kt") public void testShorterFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/ShorterFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/ShorterFirst.kt"); } @TestMetadata("StartMatchFirst.kt") public void testStartMatchFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/StartMatchFirst.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/StartMatchFirst.kt"); } @TestMetadata("UserPrefix.kt") public void testUserPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/basic/parameterNameAndType/UserPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/basic/parameterNameAndType/UserPrefix.kt"); } } } diff --git a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/SmartCompletionWeigherTestGenerated.java b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/SmartCompletionWeigherTestGenerated.java index 2fbae8e259f..20785d0141a 100644 --- a/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/SmartCompletionWeigherTestGenerated.java +++ b/idea/idea-completion/tests/org/jetbrains/kotlin/idea/completion/test/weighers/SmartCompletionWeigherTestGenerated.java @@ -21,229 +21,196 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SmartCompletionWeigherTestGenerated extends AbstractSmartCompletionWeigherTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmart() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/weighers/smart"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("BooleanExpected.kt") public void testBooleanExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/BooleanExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/BooleanExpected.kt"); } @TestMetadata("CallableReference_NothingLast.kt") public void testCallableReference_NothingLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/CallableReference_NothingLast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/CallableReference_NothingLast.kt"); } @TestMetadata("CallableReference_NothingLast2.kt") public void testCallableReference_NothingLast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/CallableReference_NothingLast2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/CallableReference_NothingLast2.kt"); } @TestMetadata("FunctionExpected.kt") public void testFunctionExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/FunctionExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/FunctionExpected.kt"); } @TestMetadata("It.kt") public void testIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/It.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/It.kt"); } @TestMetadata("MultipleArgsItem.kt") public void testMultipleArgsItem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/MultipleArgsItem.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/MultipleArgsItem.kt"); } @TestMetadata("NameSimilarity1.kt") public void testNameSimilarity1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarity1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarity1.kt"); } @TestMetadata("NameSimilarity2.kt") public void testNameSimilarity2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarity2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarity2.kt"); } @TestMetadata("NameSimilarity3.kt") public void testNameSimilarity3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarity3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarity3.kt"); } @TestMetadata("NameSimilarityAndCompiledParameters.kt") public void testNameSimilarityAndCompiledParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityAndCompiledParameters.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityAndCompiledParameters.kt"); } @TestMetadata("NameSimilarityForAssignment.kt") public void testNameSimilarityForAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForAssignment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForAssignment.kt"); } @TestMetadata("NameSimilarityForBlock.kt") public void testNameSimilarityForBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForBlock.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForBlock.kt"); } @TestMetadata("NameSimilarityForElse.kt") public void testNameSimilarityForElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForElse.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForElse.kt"); } @TestMetadata("NameSimilarityForElvis.kt") public void testNameSimilarityForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForElvis.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForElvis.kt"); } @TestMetadata("NameSimilarityForEq1.kt") public void testNameSimilarityForEq1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq1.kt"); } @TestMetadata("NameSimilarityForEq2.kt") public void testNameSimilarityForEq2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq2.kt"); } @TestMetadata("NameSimilarityForEq3.kt") public void testNameSimilarityForEq3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq3.kt"); } @TestMetadata("NameSimilarityForEq4.kt") public void testNameSimilarityForEq4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq4.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForEq4.kt"); } @TestMetadata("NameSimilarityForExpressionBody.kt") public void testNameSimilarityForExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForExpressionBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForExpressionBody.kt"); } @TestMetadata("NameSimilarityForGetterExpressionBody.kt") public void testNameSimilarityForGetterExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForGetterExpressionBody.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForGetterExpressionBody.kt"); } @TestMetadata("NameSimilarityForGetterReturn.kt") public void testNameSimilarityForGetterReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForGetterReturn.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForGetterReturn.kt"); } @TestMetadata("NameSimilarityForInitializer.kt") public void testNameSimilarityForInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForInitializer.kt"); } @TestMetadata("NameSimilarityForReturn.kt") public void testNameSimilarityForReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForReturn.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForReturn.kt"); } @TestMetadata("NameSimilarityForThen.kt") public void testNameSimilarityForThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForThen.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForThen.kt"); } @TestMetadata("NameSimilarityForVararg.kt") public void testNameSimilarityForVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityForVararg.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityForVararg.kt"); } @TestMetadata("NameSimilarityInImplicitlyTypedVarInitializer.kt") public void testNameSimilarityInImplicitlyTypedVarInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilarityInImplicitlyTypedVarInitializer.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilarityInImplicitlyTypedVarInitializer.kt"); } @TestMetadata("NameSimilaritySorterPlacement.kt") public void testNameSimilaritySorterPlacement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NameSimilaritySorterPlacement.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NameSimilaritySorterPlacement.kt"); } @TestMetadata("NoExpectedType.kt") public void testNoExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NoExpectedType.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NoExpectedType.kt"); } @TestMetadata("NoNameSimilarityForQualifier.kt") public void testNoNameSimilarityForQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NoNameSimilarityForQualifier.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NoNameSimilarityForQualifier.kt"); } @TestMetadata("NullableExpected.kt") public void testNullableExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/NullableExpected.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/NullableExpected.kt"); } @TestMetadata("ReturnValue1.kt") public void testReturnValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/ReturnValue1.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/ReturnValue1.kt"); } @TestMetadata("ReturnValue2.kt") public void testReturnValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/ReturnValue2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/ReturnValue2.kt"); } @TestMetadata("SmartPriority.kt") public void testSmartPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/SmartPriority.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/SmartPriority.kt"); } @TestMetadata("SmartPriority2.kt") public void testSmartPriority2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/SmartPriority2.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/SmartPriority2.kt"); } @TestMetadata("SmartPriority3.kt") public void testSmartPriority3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/SmartPriority3.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/SmartPriority3.kt"); } @TestMetadata("StaticMemberAndPrefix.kt") public void testStaticMemberAndPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/StaticMemberAndPrefix.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/StaticMemberAndPrefix.kt"); } @TestMetadata("SuperMembers.kt") public void testSuperMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/weighers/smart/SuperMembers.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/weighers/smart/SuperMembers.kt"); } } diff --git a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/configuration/GradleConfigureProjectByChangingFileTestGenerated.java b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/configuration/GradleConfigureProjectByChangingFileTestGenerated.java index 5fd69413754..eb7216bc522 100644 --- a/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/configuration/GradleConfigureProjectByChangingFileTestGenerated.java +++ b/idea/idea-gradle/tests/org/jetbrains/kotlin/idea/configuration/GradleConfigureProjectByChangingFileTestGenerated.java @@ -23,62 +23,57 @@ public class GradleConfigureProjectByChangingFileTestGenerated extends AbstractG @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Gradle extends AbstractGradleConfigureProjectByChangingFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestGradle, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGradle() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/gradle"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("default") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/default/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/default/"); } @TestMetadata("eapVersion") public void testEapVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/eapVersion/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/eapVersion/"); } @TestMetadata("jreLib") public void testJreLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/jreLib/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/jreLib/"); } @TestMetadata("js") public void testJs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/js/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/js/"); } @TestMetadata("m04Version") public void testM04Version() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/m04Version/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/m04Version/"); } @TestMetadata("missedLibrary") public void testMissedLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/missedLibrary/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/missedLibrary/"); } @TestMetadata("plugin_present") public void testPlugin_present() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/plugin_present/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/plugin_present/"); } @TestMetadata("rcVersion") public void testRcVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/rcVersion/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/rcVersion/"); } @TestMetadata("withJava9ModuleInfo") public void testWithJava9ModuleInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gradle/withJava9ModuleInfo/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gradle/withJava9ModuleInfo/"); } } @@ -86,38 +81,37 @@ public class GradleConfigureProjectByChangingFileTestGenerated extends AbstractG @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Gsk extends AbstractGradleConfigureProjectByChangingFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestGradle, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGsk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/configuration/gsk"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("eap11Version") public void testEap11Version() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gsk/eap11Version/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gsk/eap11Version/"); } @TestMetadata("eapVersion") public void testEapVersion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gsk/eapVersion/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gsk/eapVersion/"); } @TestMetadata("helloWorld") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gsk/helloWorld/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gsk/helloWorld/"); } @TestMetadata("missedLibrary") public void testMissedLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gsk/missedLibrary/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gsk/missedLibrary/"); } @TestMetadata("pluginPresent") public void testPluginPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/configuration/gsk/pluginPresent/"); - doTestGradle(fileName); + runTest("idea/testData/configuration/gsk/pluginPresent/"); } } } diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java index 5d59488b5bc..675abd1c237 100644 --- a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java +++ b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/KotlinMavenInspectionTestGenerated.java @@ -21,91 +21,81 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinMavenInspectionTestGenerated extends AbstractKotlinMavenInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMaven_inspections() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/idea-maven/testData/maven-inspections"), Pattern.compile("^([\\w\\-]+).xml$"), TargetBackend.ANY); } @TestMetadata("bothCompileAndTestCompileInTheSameExecution.xml") public void testBothCompileAndTestCompileInTheSameExecution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/bothCompileAndTestCompileInTheSameExecution.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/bothCompileAndTestCompileInTheSameExecution.xml"); } @TestMetadata("dependencyWithNoExecution.xml") public void testDependencyWithNoExecution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/dependencyWithNoExecution.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/dependencyWithNoExecution.xml"); } @TestMetadata("deprecatedJre.xml") public void testDeprecatedJre() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/deprecatedJre.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/deprecatedJre.xml"); } @TestMetadata("deprecatedJreWithDependencyManagement.xml") public void testDeprecatedJreWithDependencyManagement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/deprecatedJreWithDependencyManagement.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/deprecatedJreWithDependencyManagement.xml"); } @TestMetadata("ideAndMavenVersions.xml") public void testIdeAndMavenVersions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/ideAndMavenVersions.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/ideAndMavenVersions.xml"); } @TestMetadata("ideAndMavenVersionsSuppression.xml") public void testIdeAndMavenVersionsSuppression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/ideAndMavenVersionsSuppression.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/ideAndMavenVersionsSuppression.xml"); } @TestMetadata("kotlinTestWithJunit.xml") public void testKotlinTestWithJunit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/kotlinTestWithJunit.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/kotlinTestWithJunit.xml"); } @TestMetadata("missingDependencies.xml") public void testMissingDependencies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/missingDependencies.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/missingDependencies.xml"); } @TestMetadata("noExecutions.xml") public void testNoExecutions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/noExecutions.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/noExecutions.xml"); } @TestMetadata("oldVersionWithJre.xml") public void testOldVersionWithJre() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/oldVersionWithJre.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/oldVersionWithJre.xml"); } @TestMetadata("sameVersionPluginLibrary.xml") public void testSameVersionPluginLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrary.xml"); } @TestMetadata("sameVersionPluginLibrarySuppression.xml") public void testSameVersionPluginLibrarySuppression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrarySuppression.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/sameVersionPluginLibrarySuppression.xml"); } @TestMetadata("wrongJsExecution.xml") public void testWrongJsExecution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/wrongJsExecution.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/wrongJsExecution.xml"); } @TestMetadata("wrongPhaseExecution.xml") public void testWrongPhaseExecution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/maven-inspections/wrongPhaseExecution.xml"); - doTest(fileName); + runTest("idea/idea-maven/testData/maven-inspections/wrongPhaseExecution.xml"); } } diff --git a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/configuration/MavenConfigureProjectByChangingFileTestGenerated.java b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/configuration/MavenConfigureProjectByChangingFileTestGenerated.java index 809a249b94c..96b051dd518 100644 --- a/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/configuration/MavenConfigureProjectByChangingFileTestGenerated.java +++ b/idea/idea-maven/test/org/jetbrains/kotlin/idea/maven/configuration/MavenConfigureProjectByChangingFileTestGenerated.java @@ -23,62 +23,57 @@ public class MavenConfigureProjectByChangingFileTestGenerated extends AbstractMa @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm extends AbstractMavenConfigureProjectByChangingFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithMaven, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-maven/testData/configurator/jvm"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("fixExisting") public void testFixExisting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/fixExisting/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/fixExisting/"); } @TestMetadata("jreLib") public void testJreLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/jreLib/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/jreLib/"); } @TestMetadata("libraryMissed") public void testLibraryMissed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/libraryMissed/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/libraryMissed/"); } @TestMetadata("pluginMissed") public void testPluginMissed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/pluginMissed/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/pluginMissed/"); } @TestMetadata("simpleProject") public void testSimpleProject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProject/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/simpleProject/"); } @TestMetadata("simpleProjectEAP") public void testSimpleProjectEAP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProjectEAP/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/simpleProjectEAP/"); } @TestMetadata("simpleProjectRc") public void testSimpleProjectRc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProjectRc/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/simpleProjectRc/"); } @TestMetadata("simpleProjectSnapshot") public void testSimpleProjectSnapshot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/simpleProjectSnapshot/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/simpleProjectSnapshot/"); } @TestMetadata("withJava9ModuleInfo") public void testWithJava9ModuleInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/jvm/withJava9ModuleInfo/"); - doTestWithMaven(fileName); + runTest("idea/idea-maven/testData/configurator/jvm/withJava9ModuleInfo/"); } } @@ -86,32 +81,32 @@ public class MavenConfigureProjectByChangingFileTestGenerated extends AbstractMa @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Js extends AbstractMavenConfigureProjectByChangingFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithJSMaven, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-maven/testData/configurator/js"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("libraryMissed") public void testLibraryMissed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/libraryMissed/"); - doTestWithJSMaven(fileName); + runTest("idea/idea-maven/testData/configurator/js/libraryMissed/"); } @TestMetadata("pluginMissed") public void testPluginMissed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/pluginMissed/"); - doTestWithJSMaven(fileName); + runTest("idea/idea-maven/testData/configurator/js/pluginMissed/"); } @TestMetadata("simpleProject") public void testSimpleProject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/simpleProject/"); - doTestWithJSMaven(fileName); + runTest("idea/idea-maven/testData/configurator/js/simpleProject/"); } @TestMetadata("simpleProjectSnapshot") public void testSimpleProjectSnapshot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-maven/testData/configurator/js/simpleProjectSnapshot/"); - doTestWithJSMaven(fileName); + runTest("idea/idea-maven/testData/configurator/js/simpleProjectSnapshot/"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/DataFlowValueRenderingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/DataFlowValueRenderingTestGenerated.java index 2692b7d3be8..d96b37609b9 100644 --- a/idea/tests/org/jetbrains/kotlin/DataFlowValueRenderingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/DataFlowValueRenderingTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DataFlowValueRenderingTestGenerated extends AbstractDataFlowValueRenderingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataFlowValueRendering() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/dataFlowValueRendering"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/classProperty.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/classProperty.kt"); } @TestMetadata("complexIdentifier.kt") public void testComplexIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/complexIdentifier.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/complexIdentifier.kt"); } @TestMetadata("complexIdentifierWithImplicitReceiver.kt") public void testComplexIdentifierWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/complexIdentifierWithImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/complexIdentifierWithImplicitReceiver.kt"); } @TestMetadata("complexIdentifierWithInitiallyNullableReceiver.kt") public void testComplexIdentifierWithInitiallyNullableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/complexIdentifierWithInitiallyNullableReceiver.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/complexIdentifierWithInitiallyNullableReceiver.kt"); } @TestMetadata("complexIdentifierWithReceiver.kt") public void testComplexIdentifierWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/complexIdentifierWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/complexIdentifierWithReceiver.kt"); } @TestMetadata("multipleVariables.kt") public void testMultipleVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/multipleVariables.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/multipleVariables.kt"); } @TestMetadata("packageProperty.kt") public void testPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/packageProperty.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/packageProperty.kt"); } @TestMetadata("receivers.kt") public void testReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/receivers.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/receivers.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/smartCast.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/smartCast.kt"); } @TestMetadata("smartNotNull.kt") public void testSmartNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dataFlowValueRendering/smartNotNull.kt"); - doTest(fileName); + runTest("idea/testData/dataFlowValueRendering/smartNotNull.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/addImport/AddImportTestGenerated.java b/idea/tests/org/jetbrains/kotlin/addImport/AddImportTestGenerated.java index cb71782b645..872d77f5866 100644 --- a/idea/tests/org/jetbrains/kotlin/addImport/AddImportTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/addImport/AddImportTestGenerated.java @@ -21,259 +21,221 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AddImportTestGenerated extends AbstractAddImportTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddImport() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/addImport"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CannotImportClass1.kt") public void testCannotImportClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/CannotImportClass1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/CannotImportClass1.kt"); } @TestMetadata("CannotImportClass2.kt") public void testCannotImportClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/CannotImportClass2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/CannotImportClass2.kt"); } @TestMetadata("ClassAlreadyImported1.kt") public void testClassAlreadyImported1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ClassAlreadyImported1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ClassAlreadyImported1.kt"); } @TestMetadata("ClassAlreadyImported2.kt") public void testClassAlreadyImported2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ClassAlreadyImported2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ClassAlreadyImported2.kt"); } @TestMetadata("Comments.kt") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/Comments.kt"); - doTest(fileName); + runTest("idea/testData/addImport/Comments.kt"); } @TestMetadata("CommentsNoPackageDirective.kt") public void testCommentsNoPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/CommentsNoPackageDirective.kt"); - doTest(fileName); + runTest("idea/testData/addImport/CommentsNoPackageDirective.kt"); } @TestMetadata("ConflictingNameAppearsAndHasUsage1.kt") public void testConflictingNameAppearsAndHasUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsAndHasUsage1.kt"); } @TestMetadata("ConflictingNameAppearsAndHasUsage2.kt") public void testConflictingNameAppearsAndHasUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsAndHasUsage2.kt"); } @TestMetadata("ConflictingNameAppearsAndHasUsage3.kt") public void testConflictingNameAppearsAndHasUsage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage3.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsAndHasUsage3.kt"); } @TestMetadata("ConflictingNameAppearsAndHasUsage4.kt") public void testConflictingNameAppearsAndHasUsage4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsAndHasUsage4.kt"); } @TestMetadata("ConflictingNameAppearsAndHasUsage5.kt") public void testConflictingNameAppearsAndHasUsage5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage5.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsAndHasUsage5.kt"); } @TestMetadata("ConflictingNameAppearsAndHasUsage6.kt") public void testConflictingNameAppearsAndHasUsage6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsAndHasUsage6.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsAndHasUsage6.kt"); } @TestMetadata("ConflictingNameAppearsButUsageIsQualified.kt") public void testConflictingNameAppearsButUsageIsQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsButUsageIsQualified.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsButUsageIsQualified.kt"); } @TestMetadata("ConflictingNameAppearsFalseUsage.kt") public void testConflictingNameAppearsFalseUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsFalseUsage.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsFalseUsage.kt"); } @TestMetadata("ConflictingNameAppearsFalseUsage2.kt") public void testConflictingNameAppearsFalseUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsFalseUsage2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsFalseUsage2.kt"); } @TestMetadata("ConflictingNameAppearsNoUsage.kt") public void testConflictingNameAppearsNoUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameAppearsNoUsage.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameAppearsNoUsage.kt"); } @TestMetadata("ConflictingNameHasExplicitImportAlready.kt") public void testConflictingNameHasExplicitImportAlready() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameHasExplicitImportAlready.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameHasExplicitImportAlready.kt"); } @TestMetadata("ConflictingNameNoAllUnderImport.kt") public void testConflictingNameNoAllUnderImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameNoAllUnderImport.kt"); } @TestMetadata("ConflictingNameNoAllUnderImport2.kt") public void testConflictingNameNoAllUnderImport2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameNoAllUnderImport2.kt"); } @TestMetadata("ConflictingNameNoAllUnderImport3.kt") public void testConflictingNameNoAllUnderImport3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ConflictingNameNoAllUnderImport3.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ConflictingNameNoAllUnderImport3.kt"); } @TestMetadata("DropExplicitImports.kt") public void testDropExplicitImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/DropExplicitImports.kt"); - doTest(fileName); + runTest("idea/testData/addImport/DropExplicitImports.kt"); } @TestMetadata("DropExplicitImports2.kt") public void testDropExplicitImports2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/DropExplicitImports2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/DropExplicitImports2.kt"); } @TestMetadata("FunctionAlreadyImported1.kt") public void testFunctionAlreadyImported1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/FunctionAlreadyImported1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/FunctionAlreadyImported1.kt"); } @TestMetadata("FunctionAlreadyImported2.kt") public void testFunctionAlreadyImported2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/FunctionAlreadyImported2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/FunctionAlreadyImported2.kt"); } @TestMetadata("ImportClassSimple.kt") public void testImportClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportClassSimple.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportClassSimple.kt"); } @TestMetadata("ImportClassWhenFunctionImported.kt") public void testImportClassWhenFunctionImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportClassWhenFunctionImported.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportClassWhenFunctionImported.kt"); } @TestMetadata("ImportEnumMember1.kt") public void testImportEnumMember1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportEnumMember1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportEnumMember1.kt"); } @TestMetadata("ImportEnumMember2.kt") public void testImportEnumMember2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportEnumMember2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportEnumMember2.kt"); } @TestMetadata("ImportFromObject.kt") public void testImportFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportFromObject.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportFromObject.kt"); } @TestMetadata("ImportFunctionBug.kt") public void testImportFunctionBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportFunctionBug.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportFunctionBug.kt"); } @TestMetadata("ImportNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportNestedClass.kt"); } @TestMetadata("ImportSecondFunction.kt") public void testImportSecondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/ImportSecondFunction.kt"); - doTest(fileName); + runTest("idea/testData/addImport/ImportSecondFunction.kt"); } @TestMetadata("KeywordNames.kt") public void testKeywordNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/KeywordNames.kt"); - doTest(fileName); + runTest("idea/testData/addImport/KeywordNames.kt"); } @TestMetadata("NameCountForStarNotReached.kt") public void testNameCountForStarNotReached() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarNotReached.kt"); - doTest(fileName); + runTest("idea/testData/addImport/NameCountForStarNotReached.kt"); } @TestMetadata("NameCountForStarReached.kt") public void testNameCountForStarReached() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NameCountForStarReached.kt"); - doTest(fileName); + runTest("idea/testData/addImport/NameCountForStarReached.kt"); } @TestMetadata("NoConflictingNameForInaccessibleClass1.kt") public void testNoConflictingNameForInaccessibleClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NoConflictingNameForInaccessibleClass1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/NoConflictingNameForInaccessibleClass1.kt"); } @TestMetadata("NoConflictingNameForInaccessibleClass2.kt") public void testNoConflictingNameForInaccessibleClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NoConflictingNameForInaccessibleClass2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/NoConflictingNameForInaccessibleClass2.kt"); } @TestMetadata("NoNeedToImportStandardClass.kt") public void testNoNeedToImportStandardClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/NoNeedToImportStandardClass.kt"); - doTest(fileName); + runTest("idea/testData/addImport/NoNeedToImportStandardClass.kt"); } @TestMetadata("PackageDoesNotConflictWithClass.kt") public void testPackageDoesNotConflictWithClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/PackageDoesNotConflictWithClass.kt"); - doTest(fileName); + runTest("idea/testData/addImport/PackageDoesNotConflictWithClass.kt"); } @TestMetadata("PropertyAlreadyImported1.kt") public void testPropertyAlreadyImported1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/PropertyAlreadyImported1.kt"); - doTest(fileName); + runTest("idea/testData/addImport/PropertyAlreadyImported1.kt"); } @TestMetadata("PropertyAlreadyImported2.kt") public void testPropertyAlreadyImported2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/PropertyAlreadyImported2.kt"); - doTest(fileName); + runTest("idea/testData/addImport/PropertyAlreadyImported2.kt"); } @TestMetadata("StdlibImportsLast.kt") public void testStdlibImportsLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/addImport/StdlibImportsLast.kt"); - doTest(fileName); + runTest("idea/testData/addImport/StdlibImportsLast.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinBinariesCheckerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinBinariesCheckerTestGenerated.java index 427edffa05f..6080dc8da55 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinBinariesCheckerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinBinariesCheckerTestGenerated.java @@ -21,175 +21,151 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavaAgainstKotlinBinariesCheckerTestGenerated extends AbstractJavaAgainstKotlinBinariesCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAgainstKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AssignKotlinClassToObjectInJava.kt") public void testAssignKotlinClassToObjectInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignKotlinClassToObjectInJava.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignKotlinClassToObjectInJava.kt"); } @TestMetadata("AssignMappedKotlinType.kt") public void testAssignMappedKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignMappedKotlinType.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignMappedKotlinType.kt"); } @TestMetadata("ClassObjects.kt") public void testClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ClassObjects.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ClassObjects.kt"); } @TestMetadata("EnumAutoGeneratedMethods.kt") public void testEnumAutoGeneratedMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumAutoGeneratedMethods.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumAutoGeneratedMethods.kt"); } @TestMetadata("EnumEntriesInSwitch.kt") public void testEnumEntriesInSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumEntriesInSwitch.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumEntriesInSwitch.kt"); } @TestMetadata("EnumStaticImportInJava.kt") public void testEnumStaticImportInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumStaticImportInJava.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumStaticImportInJava.kt"); } @TestMetadata("ExtendClassWithDefaultImplementationComplex.kt") public void testExtendClassWithDefaultImplementationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementationComplex.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementationComplex.kt"); } @TestMetadata("ExtendClassWithDefaultImplementation_1_6.kt") public void testExtendClassWithDefaultImplementation_1_6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_6.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_6.kt"); } @TestMetadata("ExtendClassWithDefaultImplementation_1_8.kt") public void testExtendClassWithDefaultImplementation_1_8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_8.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_8.kt"); } @TestMetadata("ExtendingMutableInterfaces.kt") public void testExtendingMutableInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingMutableInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingMutableInterfaces.kt"); } @TestMetadata("ExtendingReadOnlyInterfaces.kt") public void testExtendingReadOnlyInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingReadOnlyInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingReadOnlyInterfaces.kt"); } @TestMetadata("FunctionInNestedClassInDataFlowInspection.kt") public void testFunctionInNestedClassInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/FunctionInNestedClassInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/FunctionInNestedClassInDataFlowInspection.kt"); } @TestMetadata("ImplementedMethodsFromTraits.kt") public void testImplementedMethodsFromTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ImplementedMethodsFromTraits.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ImplementedMethodsFromTraits.kt"); } @TestMetadata("InferenceReturnType_1_6.kt") public void testInferenceReturnType_1_6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_6.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_6.kt"); } @TestMetadata("InferenceReturnType_1_8.kt") public void testInferenceReturnType_1_8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_8.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_8.kt"); } @TestMetadata("InterfaceDefaultImpls.kt") public void testInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InterfaceDefaultImpls.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InterfaceDefaultImpls.kt"); } @TestMetadata("JvmOverloadsFunctions.kt") public void testJvmOverloadsFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/JvmOverloadsFunctions.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/JvmOverloadsFunctions.kt"); } @TestMetadata("KotlinAnnotations.kt") public void testKotlinAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.kt"); } @TestMetadata("ReturnInnerClasses.kt") public void testReturnInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ReturnInnerClasses.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ReturnInnerClasses.kt"); } @TestMetadata("TopLevelFunctionInDataFlowInspection.kt") public void testTopLevelFunctionInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionInDataFlowInspection.kt"); } @TestMetadata("TopLevelFunctionWithNameSimilarToClassInDataFlowInspection.kt") public void testTopLevelFunctionWithNameSimilarToClassInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToClassInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToClassInDataFlowInspection.kt"); } @TestMetadata("TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection.kt") public void testTopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection.kt"); } @TestMetadata("TopLevelOverloadedFunctionInDataFlowInspection.kt") public void testTopLevelOverloadedFunctionInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelOverloadedFunctionInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelOverloadedFunctionInDataFlowInspection.kt"); } @TestMetadata("UseKotlinConstInSwitch.kt") public void testUseKotlinConstInSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinConstInSwitch.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinConstInSwitch.kt"); } @TestMetadata("UseKotlinSubclassesOfMappedTypes.kt") public void testUseKotlinSubclassesOfMappedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinSubclassesOfMappedTypes.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinSubclassesOfMappedTypes.kt"); } @TestMetadata("UsingKotlinPackageDeclarations.kt") public void testUsingKotlinPackageDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingKotlinPackageDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingKotlinPackageDeclarations.kt"); } @TestMetadata("UsingMutableInterfaces.kt") public void testUsingMutableInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingMutableInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingMutableInterfaces.kt"); } @TestMetadata("UsingReadOnlyInterfaces.kt") public void testUsingReadOnlyInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingReadOnlyInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingReadOnlyInterfaces.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinSourceCheckerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinSourceCheckerTestGenerated.java index 9300a4894cf..8931fc143b6 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinSourceCheckerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/checkers/JavaAgainstKotlinSourceCheckerTestGenerated.java @@ -23,176 +23,152 @@ public class JavaAgainstKotlinSourceCheckerTestGenerated extends AbstractJavaAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAgainstKotlin extends AbstractJavaAgainstKotlinSourceCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAgainstKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AssignKotlinClassToObjectInJava.kt") public void testAssignKotlinClassToObjectInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignKotlinClassToObjectInJava.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignKotlinClassToObjectInJava.kt"); } @TestMetadata("AssignMappedKotlinType.kt") public void testAssignMappedKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignMappedKotlinType.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/AssignMappedKotlinType.kt"); } @TestMetadata("ClassObjects.kt") public void testClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ClassObjects.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ClassObjects.kt"); } @TestMetadata("EnumAutoGeneratedMethods.kt") public void testEnumAutoGeneratedMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumAutoGeneratedMethods.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumAutoGeneratedMethods.kt"); } @TestMetadata("EnumEntriesInSwitch.kt") public void testEnumEntriesInSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumEntriesInSwitch.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumEntriesInSwitch.kt"); } @TestMetadata("EnumStaticImportInJava.kt") public void testEnumStaticImportInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumStaticImportInJava.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/EnumStaticImportInJava.kt"); } @TestMetadata("ExtendClassWithDefaultImplementationComplex.kt") public void testExtendClassWithDefaultImplementationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementationComplex.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementationComplex.kt"); } @TestMetadata("ExtendClassWithDefaultImplementation_1_6.kt") public void testExtendClassWithDefaultImplementation_1_6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_6.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_6.kt"); } @TestMetadata("ExtendClassWithDefaultImplementation_1_8.kt") public void testExtendClassWithDefaultImplementation_1_8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_8.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendClassWithDefaultImplementation_1_8.kt"); } @TestMetadata("ExtendingMutableInterfaces.kt") public void testExtendingMutableInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingMutableInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingMutableInterfaces.kt"); } @TestMetadata("ExtendingReadOnlyInterfaces.kt") public void testExtendingReadOnlyInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingReadOnlyInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ExtendingReadOnlyInterfaces.kt"); } @TestMetadata("FunctionInNestedClassInDataFlowInspection.kt") public void testFunctionInNestedClassInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/FunctionInNestedClassInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/FunctionInNestedClassInDataFlowInspection.kt"); } @TestMetadata("ImplementedMethodsFromTraits.kt") public void testImplementedMethodsFromTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ImplementedMethodsFromTraits.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ImplementedMethodsFromTraits.kt"); } @TestMetadata("InferenceReturnType_1_6.kt") public void testInferenceReturnType_1_6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_6.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_6.kt"); } @TestMetadata("InferenceReturnType_1_8.kt") public void testInferenceReturnType_1_8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_8.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InferenceReturnType_1_8.kt"); } @TestMetadata("InterfaceDefaultImpls.kt") public void testInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InterfaceDefaultImpls.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/InterfaceDefaultImpls.kt"); } @TestMetadata("JvmOverloadsFunctions.kt") public void testJvmOverloadsFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/JvmOverloadsFunctions.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/JvmOverloadsFunctions.kt"); } @TestMetadata("KotlinAnnotations.kt") public void testKotlinAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/KotlinAnnotations.kt"); } @TestMetadata("ReturnInnerClasses.kt") public void testReturnInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ReturnInnerClasses.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/ReturnInnerClasses.kt"); } @TestMetadata("TopLevelFunctionInDataFlowInspection.kt") public void testTopLevelFunctionInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionInDataFlowInspection.kt"); } @TestMetadata("TopLevelFunctionWithNameSimilarToClassInDataFlowInspection.kt") public void testTopLevelFunctionWithNameSimilarToClassInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToClassInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToClassInDataFlowInspection.kt"); } @TestMetadata("TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection.kt") public void testTopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelFunctionWithNameSimilarToPropertyInDataFlowInspection.kt"); } @TestMetadata("TopLevelOverloadedFunctionInDataFlowInspection.kt") public void testTopLevelOverloadedFunctionInDataFlowInspection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelOverloadedFunctionInDataFlowInspection.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/TopLevelOverloadedFunctionInDataFlowInspection.kt"); } @TestMetadata("UseKotlinConstInSwitch.kt") public void testUseKotlinConstInSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinConstInSwitch.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinConstInSwitch.kt"); } @TestMetadata("UseKotlinSubclassesOfMappedTypes.kt") public void testUseKotlinSubclassesOfMappedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinSubclassesOfMappedTypes.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UseKotlinSubclassesOfMappedTypes.kt"); } @TestMetadata("UsingKotlinPackageDeclarations.kt") public void testUsingKotlinPackageDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingKotlinPackageDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingKotlinPackageDeclarations.kt"); } @TestMetadata("UsingMutableInterfaces.kt") public void testUsingMutableInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingMutableInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingMutableInterfaces.kt"); } @TestMetadata("UsingReadOnlyInterfaces.kt") public void testUsingReadOnlyInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingReadOnlyInterfaces.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaAgainstKotlin/UsingReadOnlyInterfaces.kt"); } } @@ -200,26 +176,27 @@ public class JavaAgainstKotlinSourceCheckerTestGenerated extends AbstractJavaAga @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaWithKotlin extends AbstractJavaAgainstKotlinSourceCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaWithKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/kotlinAndJavaChecker/javaWithKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InnerClassWithoutName.kt") public void testInnerClassWithoutName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaWithKotlin/InnerClassWithoutName.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaWithKotlin/InnerClassWithoutName.kt"); } @TestMetadata("JvmPackageNameFileFacade.kt") public void testJvmPackageNameFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaWithKotlin/JvmPackageNameFileFacade.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaWithKotlin/JvmPackageNameFileFacade.kt"); } @TestMetadata("NoNotNullOnParameterInOverride.kt") public void testNoNotNullOnParameterInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kotlinAndJavaChecker/javaWithKotlin/NoNotNullOnParameterInOverride.kt"); - doTest(fileName); + runTest("idea/testData/kotlinAndJavaChecker/javaWithKotlin/NoNotNullOnParameterInOverride.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/checkers/JsCheckerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/checkers/JsCheckerTestGenerated.java index 540392dc376..4de2bf6e22e 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/JsCheckerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/checkers/JsCheckerTestGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JsCheckerTestGenerated extends AbstractJsCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/js"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/js/basic.kt"); - doTest(fileName); + runTest("idea/testData/checker/js/basic.kt"); } @TestMetadata("dynamic.kt") public void testDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/js/dynamic.kt"); - doTest(fileName); + runTest("idea/testData/checker/js/dynamic.kt"); } @TestMetadata("helloWorld.kt") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/js/helloWorld.kt"); - doTest(fileName); + runTest("idea/testData/checker/js/helloWorld.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java index f2343ad0208..b84318af1ad 100644 --- a/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/checkers/PsiCheckerTestGenerated.java @@ -23,10 +23,13 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Checker extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Abstract.kt"); - doTest(fileName); + runTest("idea/testData/checker/Abstract.kt"); } public void testAllFilesPresentInChecker() throws Exception { @@ -35,368 +38,307 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestMetadata("AnnotationOnFile.kt") public void testAnnotationOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/AnnotationOnFile.kt"); - doTest(fileName); + runTest("idea/testData/checker/AnnotationOnFile.kt"); } @TestMetadata("AnonymousInitializers.kt") public void testAnonymousInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/AnonymousInitializers.kt"); - doTest(fileName); + runTest("idea/testData/checker/AnonymousInitializers.kt"); } @TestMetadata("BinaryCallsOnNullableValues.kt") public void testBinaryCallsOnNullableValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/BinaryCallsOnNullableValues.kt"); - doTest(fileName); + runTest("idea/testData/checker/BinaryCallsOnNullableValues.kt"); } @TestMetadata("Bounds.kt") public void testBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Bounds.kt"); - doTest(fileName); + runTest("idea/testData/checker/Bounds.kt"); } @TestMetadata("Bounds2.kt") public void testBounds2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Bounds2.kt"); - doTest(fileName); + runTest("idea/testData/checker/Bounds2.kt"); } @TestMetadata("BoundsWithSubstitutors.kt") public void testBoundsWithSubstitutors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/BoundsWithSubstitutors.kt"); - doTest(fileName); + runTest("idea/testData/checker/BoundsWithSubstitutors.kt"); } @TestMetadata("BreakContinue.kt") public void testBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/BreakContinue.kt"); - doTest(fileName); + runTest("idea/testData/checker/BreakContinue.kt"); } @TestMetadata("Builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Builders.kt"); - doTest(fileName); + runTest("idea/testData/checker/Builders.kt"); } @TestMetadata("Casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Casts.kt"); - doTest(fileName); + runTest("idea/testData/checker/Casts.kt"); } @TestMetadata("ClassObjectInEnum.kt") public void testClassObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ClassObjectInEnum.kt"); - doTest(fileName); + runTest("idea/testData/checker/ClassObjectInEnum.kt"); } @TestMetadata("ClassObjects.kt") public void testClassObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ClassObjects.kt"); - doTest(fileName); + runTest("idea/testData/checker/ClassObjects.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Constants.kt"); - doTest(fileName); + runTest("idea/testData/checker/Constants.kt"); } @TestMetadata("Constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Constructors.kt"); - doTest(fileName); + runTest("idea/testData/checker/Constructors.kt"); } @TestMetadata("CyclicHierarchy.kt") public void testCyclicHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/CyclicHierarchy.kt"); - doTest(fileName); + runTest("idea/testData/checker/CyclicHierarchy.kt"); } @TestMetadata("ExposedContainerType.kt") public void testExposedContainerType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ExposedContainerType.kt"); - doTest(fileName); + runTest("idea/testData/checker/ExposedContainerType.kt"); } @TestMetadata("ExposedInferredType.kt") public void testExposedInferredType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ExposedInferredType.kt"); - doTest(fileName); + runTest("idea/testData/checker/ExposedInferredType.kt"); } @TestMetadata("ExtensionFunctions.kt") public void testExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ExtensionFunctions.kt"); - doTest(fileName); + runTest("idea/testData/checker/ExtensionFunctions.kt"); } @TestMetadata("ForRangeConventions.kt") public void testForRangeConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ForRangeConventions.kt"); - doTest(fileName); + runTest("idea/testData/checker/ForRangeConventions.kt"); } @TestMetadata("FunctionReturnTypes.kt") public void testFunctionReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/FunctionReturnTypes.kt"); - doTest(fileName); + runTest("idea/testData/checker/FunctionReturnTypes.kt"); } @TestMetadata("GenericArgumentConsistency.kt") public void testGenericArgumentConsistency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/GenericArgumentConsistency.kt"); - doTest(fileName); + runTest("idea/testData/checker/GenericArgumentConsistency.kt"); } @TestMetadata("IncDec.kt") public void testIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/IncDec.kt"); - doTest(fileName); + runTest("idea/testData/checker/IncDec.kt"); } @TestMetadata("IsExpressions.kt") public void testIsExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/IsExpressions.kt"); - doTest(fileName); + runTest("idea/testData/checker/IsExpressions.kt"); } @TestMetadata("JvmStaticUsagesRuntime.kt") public void testJvmStaticUsagesRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/JvmStaticUsagesRuntime.kt"); - doTest(fileName); + runTest("idea/testData/checker/JvmStaticUsagesRuntime.kt"); } @TestMetadata("LocalObjects.kt") public void testLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/LocalObjects.kt"); - doTest(fileName); + runTest("idea/testData/checker/LocalObjects.kt"); } @TestMetadata("MultipleBounds.kt") public void testMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/MultipleBounds.kt"); - doTest(fileName); + runTest("idea/testData/checker/MultipleBounds.kt"); } @TestMetadata("MultipleModality.kt") public void testMultipleModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/MultipleModality.kt"); - doTest(fileName); + runTest("idea/testData/checker/MultipleModality.kt"); } @TestMetadata("NestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/NestedObjects.kt"); - doTest(fileName); + runTest("idea/testData/checker/NestedObjects.kt"); } @TestMetadata("NotFinishedGenericDeclaration.kt") public void testNotFinishedGenericDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/NotFinishedGenericDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/checker/NotFinishedGenericDeclaration.kt"); } @TestMetadata("NullAsAnnotationArgument.kt") public void testNullAsAnnotationArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/NullAsAnnotationArgument.kt"); - doTest(fileName); + runTest("idea/testData/checker/NullAsAnnotationArgument.kt"); } @TestMetadata("Nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Nullability.kt"); - doTest(fileName); + runTest("idea/testData/checker/Nullability.kt"); } @TestMetadata("ObjectLiteralInDelegate.kt") public void testObjectLiteralInDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ObjectLiteralInDelegate.kt"); - doTest(fileName); + runTest("idea/testData/checker/ObjectLiteralInDelegate.kt"); } @TestMetadata("Objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Objects.kt"); - doTest(fileName); + runTest("idea/testData/checker/Objects.kt"); } @TestMetadata("Override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Override.kt"); - doTest(fileName); + runTest("idea/testData/checker/Override.kt"); } @TestMetadata("OverridesAndGenerics.kt") public void testOverridesAndGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/OverridesAndGenerics.kt"); - doTest(fileName); + runTest("idea/testData/checker/OverridesAndGenerics.kt"); } @TestMetadata("PackageQualified.kt") public void testPackageQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/PackageQualified.kt"); - doTest(fileName); + runTest("idea/testData/checker/PackageQualified.kt"); } @TestMetadata("PrimaryConstructors.kt") public void testPrimaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/PrimaryConstructors.kt"); - doTest(fileName); + runTest("idea/testData/checker/PrimaryConstructors.kt"); } @TestMetadata("ProjectionsInSupertypes.kt") public void testProjectionsInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ProjectionsInSupertypes.kt"); - doTest(fileName); + runTest("idea/testData/checker/ProjectionsInSupertypes.kt"); } @TestMetadata("Properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Properties.kt"); - doTest(fileName); + runTest("idea/testData/checker/Properties.kt"); } @TestMetadata("QualifiedExpressions.kt") public void testQualifiedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/QualifiedExpressions.kt"); - doTest(fileName); + runTest("idea/testData/checker/QualifiedExpressions.kt"); } @TestMetadata("QualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/QualifiedThis.kt"); - doTest(fileName); + runTest("idea/testData/checker/QualifiedThis.kt"); } @TestMetadata("QualifiedThisInClosures.kt") public void testQualifiedThisInClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/QualifiedThisInClosures.kt"); - doTest(fileName); + runTest("idea/testData/checker/QualifiedThisInClosures.kt"); } @TestMetadata("Redeclaration.kt") public void testRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Redeclaration.kt"); - doTest(fileName); + runTest("idea/testData/checker/Redeclaration.kt"); } @TestMetadata("Redeclarations.kt") public void testRedeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Redeclarations.kt"); - doTest(fileName); + runTest("idea/testData/checker/Redeclarations.kt"); } @TestMetadata("ResolveToJava.kt") public void testResolveToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ResolveToJava.kt"); - doTest(fileName); + runTest("idea/testData/checker/ResolveToJava.kt"); } @TestMetadata("ResolveTypeInAnnotationArgumentRuntime.kt") public void testResolveTypeInAnnotationArgumentRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ResolveTypeInAnnotationArgumentRuntime.kt"); - doTest(fileName); + runTest("idea/testData/checker/ResolveTypeInAnnotationArgumentRuntime.kt"); } @TestMetadata("ReturnTypeMismatchOnOverride.kt") public void testReturnTypeMismatchOnOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/ReturnTypeMismatchOnOverride.kt"); - doTest(fileName); + runTest("idea/testData/checker/ReturnTypeMismatchOnOverride.kt"); } @TestMetadata("SafeInvoke.kt") public void testSafeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/SafeInvoke.kt"); - doTest(fileName); + runTest("idea/testData/checker/SafeInvoke.kt"); } @TestMetadata("Shadowing.kt") public void testShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Shadowing.kt"); - doTest(fileName); + runTest("idea/testData/checker/Shadowing.kt"); } @TestMetadata("StringTemplates.kt") public void testStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/StringTemplates.kt"); - doTest(fileName); + runTest("idea/testData/checker/StringTemplates.kt"); } @TestMetadata("SupertypeListChecks.kt") public void testSupertypeListChecks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/SupertypeListChecks.kt"); - doTest(fileName); + runTest("idea/testData/checker/SupertypeListChecks.kt"); } @TestMetadata("TraitSupertypeList.kt") public void testTraitSupertypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/TraitSupertypeList.kt"); - doTest(fileName); + runTest("idea/testData/checker/TraitSupertypeList.kt"); } @TestMetadata("trivialHierarchyLoop.kt") public void testTrivialHierarchyLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/trivialHierarchyLoop.kt"); - doTest(fileName); + runTest("idea/testData/checker/trivialHierarchyLoop.kt"); } @TestMetadata("TypeArgumentsNotAllowed.kt") public void testTypeArgumentsNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/TypeArgumentsNotAllowed.kt"); - doTest(fileName); + runTest("idea/testData/checker/TypeArgumentsNotAllowed.kt"); } @TestMetadata("TypeParameterBounds.kt") public void testTypeParameterBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/TypeParameterBounds.kt"); - doTest(fileName); + runTest("idea/testData/checker/TypeParameterBounds.kt"); } @TestMetadata("UnreachableCode.kt") public void testUnreachableCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/UnreachableCode.kt"); - doTest(fileName); + runTest("idea/testData/checker/UnreachableCode.kt"); } @TestMetadata("Unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Unresolved.kt"); - doTest(fileName); + runTest("idea/testData/checker/Unresolved.kt"); } @TestMetadata("Unused.kt") public void testUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Unused.kt"); - doTest(fileName); + runTest("idea/testData/checker/Unused.kt"); } @TestMetadata("Variance.kt") public void testVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/Variance.kt"); - doTest(fileName); + runTest("idea/testData/checker/Variance.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/When.kt"); - doTest(fileName); + runTest("idea/testData/checker/When.kt"); } @TestMetadata("WhenInEnumInExtensionProperty.kt") public void testWhenInEnumInExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/WhenInEnumInExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/checker/WhenInEnumInExtensionProperty.kt"); } @TestMetadata("WhenNonExhaustive.kt") public void testWhenNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/WhenNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/checker/WhenNonExhaustive.kt"); } } @@ -404,284 +346,242 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regression extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRegression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/regression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguityOnLazyTypeComputation.kt") public void testAmbiguityOnLazyTypeComputation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AmbiguityOnLazyTypeComputation.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/AmbiguityOnLazyTypeComputation.kt"); } @TestMetadata("AnnotationOnNamedParameterOfFunctionType.kt") public void testAnnotationOnNamedParameterOfFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AnnotationOnNamedParameterOfFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/AnnotationOnNamedParameterOfFunctionType.kt"); } @TestMetadata("AnnotationOnParameterOfFunctionType.kt") public void testAnnotationOnParameterOfFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AnnotationOnParameterOfFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/AnnotationOnParameterOfFunctionType.kt"); } @TestMetadata("AssignmentsUnderOperators.kt") public void testAssignmentsUnderOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AssignmentsUnderOperators.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/AssignmentsUnderOperators.kt"); } @TestMetadata("BadParseForClass.kt") public void testBadParseForClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/BadParseForClass.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/BadParseForClass.kt"); } @TestMetadata("callVariableAsFunctionWithAnonymousObjectArg.kt") public void testCallVariableAsFunctionWithAnonymousObjectArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/callVariableAsFunctionWithAnonymousObjectArg.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/callVariableAsFunctionWithAnonymousObjectArg.kt"); } @TestMetadata("callVariableAsFunctionWithLambdaArg.kt") public void testCallVariableAsFunctionWithLambdaArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/callVariableAsFunctionWithLambdaArg.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/callVariableAsFunctionWithLambdaArg.kt"); } @TestMetadata("ClassDeclarationAfterDot.kt") public void testClassDeclarationAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/ClassDeclarationAfterDot.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/ClassDeclarationAfterDot.kt"); } @TestMetadata("ClassDeclarationAfterDot2.kt") public void testClassDeclarationAfterDot2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/ClassDeclarationAfterDot2.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/ClassDeclarationAfterDot2.kt"); } @TestMetadata("ClassDeclarationAsExpression.kt") public void testClassDeclarationAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/ClassDeclarationAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/ClassDeclarationAsExpression.kt"); } @TestMetadata("ClassDeclarationAsExpression2.kt") public void testClassDeclarationAsExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/ClassDeclarationAsExpression2.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/ClassDeclarationAsExpression2.kt"); } @TestMetadata("ClassDeclarationAsExpression3.kt") public void testClassDeclarationAsExpression3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/ClassDeclarationAsExpression3.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/ClassDeclarationAsExpression3.kt"); } @TestMetadata("CoercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/CoercionToUnit.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/CoercionToUnit.kt"); } @TestMetadata("createInnerInstance.kt") public void testCreateInnerInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/createInnerInstance.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/createInnerInstance.kt"); } @TestMetadata("DescructuringDeclarationInForLoop.kt") public void testDescructuringDeclarationInForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/DescructuringDeclarationInForLoop.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/DescructuringDeclarationInForLoop.kt"); } @TestMetadata("DestructuringDeclarationInLambda.kt") public void testDestructuringDeclarationInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/DestructuringDeclarationInLambda.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/DestructuringDeclarationInLambda.kt"); } @TestMetadata("DollarsInName.kt") public void testDollarsInName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/DollarsInName.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/DollarsInName.kt"); } @TestMetadata("DoubleDefine.kt") public void testDoubleDefine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/DoubleDefine.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/DoubleDefine.kt"); } @TestMetadata("extensionMemberInClassObject.kt") public void testExtensionMemberInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/extensionMemberInClassObject.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/extensionMemberInClassObject.kt"); } @TestMetadata("FunDeclarationAfterDot.kt") public void testFunDeclarationAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/FunDeclarationAfterDot.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/FunDeclarationAfterDot.kt"); } @TestMetadata("FunctionLiteralInsideAnnotation.kt") public void testFunctionLiteralInsideAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/FunctionLiteralInsideAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/FunctionLiteralInsideAnnotation.kt"); } @TestMetadata("FunctionTypes.kt") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/FunctionTypes.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/FunctionTypes.kt"); } @TestMetadata("IncompleteClassDelegation.kt") public void testIncompleteClassDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/IncompleteClassDelegation.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/IncompleteClassDelegation.kt"); } @TestMetadata("InitializerInInterface.kt") public void testInitializerInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/InitializerInInterface.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/InitializerInInterface.kt"); } @TestMetadata("InterfaceDeclarationAsExpression.kt") public void testInterfaceDeclarationAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/InterfaceDeclarationAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/InterfaceDeclarationAsExpression.kt"); } @TestMetadata("javaStyleClassLiteralInAnnotationArguments.kt") public void testJavaStyleClassLiteralInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/javaStyleClassLiteralInAnnotationArguments.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/javaStyleClassLiteralInAnnotationArguments.kt"); } @TestMetadata("Jet11.kt") public void testJet11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet11.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet11.kt"); } @TestMetadata("Jet121.kt") public void testJet121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet121.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet121.kt"); } @TestMetadata("Jet124.kt") public void testJet124() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet124.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet124.kt"); } @TestMetadata("Jet169.kt") public void testJet169() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet169.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet169.kt"); } @TestMetadata("Jet183.kt") public void testJet183() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet183.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet183.kt"); } @TestMetadata("Jet183-1.kt") public void testJet183_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet183-1.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet183-1.kt"); } @TestMetadata("Jet53.kt") public void testJet53() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet53.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet53.kt"); } @TestMetadata("Jet67.kt") public void testJet67() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet67.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet67.kt"); } @TestMetadata("Jet68.kt") public void testJet68() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet68.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet68.kt"); } @TestMetadata("Jet69.kt") public void testJet69() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet69.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet69.kt"); } @TestMetadata("Jet72.kt") public void testJet72() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/Jet72.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/Jet72.kt"); } @TestMetadata("kt251.kt") public void testKt251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/kt251.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/kt251.kt"); } @TestMetadata("kt303.kt") public void testKt303() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/kt303.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/kt303.kt"); } @TestMetadata("kt9887.kt") public void testKt9887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/kt9887.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/kt9887.kt"); } @TestMetadata("objectLiteralInSupertypeList.kt") public void testObjectLiteralInSupertypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/objectLiteralInSupertypeList.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/objectLiteralInSupertypeList.kt"); } @TestMetadata("OverrideResolution.kt") public void testOverrideResolution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/OverrideResolution.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/OverrideResolution.kt"); } @TestMetadata("PropertyDeclarationAsExpression.kt") public void testPropertyDeclarationAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/PropertyDeclarationAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/PropertyDeclarationAsExpression.kt"); } @TestMetadata("ScopeForSecondaryConstructors.kt") public void testScopeForSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/ScopeForSecondaryConstructors.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/ScopeForSecondaryConstructors.kt"); } @TestMetadata("SpecififcityByReceiver.kt") public void testSpecififcityByReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/SpecififcityByReceiver.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/SpecififcityByReceiver.kt"); } @TestMetadata("WrongTraceInCallResolver.kt") public void testWrongTraceInCallResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/WrongTraceInCallResolver.kt"); - doTest(fileName); + runTest("idea/testData/checker/regression/WrongTraceInCallResolver.kt"); } } @@ -689,26 +589,27 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Recovery extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecovery() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/recovery"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("namelessMembers.kt") public void testNamelessMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/recovery/namelessMembers.kt"); - doTest(fileName); + runTest("idea/testData/checker/recovery/namelessMembers.kt"); } @TestMetadata("namelessToplevelDeclarations.kt") public void testNamelessToplevelDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/recovery/namelessToplevelDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/checker/recovery/namelessToplevelDeclarations.kt"); } @TestMetadata("returnInFileAnnotation.kt") public void testReturnInFileAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/recovery/returnInFileAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/checker/recovery/returnInFileAnnotation.kt"); } } @@ -716,14 +617,17 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rendering extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRendering() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/rendering"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("TypeInferenceError.kt") public void testTypeInferenceError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/rendering/TypeInferenceError.kt"); - doTest(fileName); + runTest("idea/testData/checker/rendering/TypeInferenceError.kt"); } } @@ -731,32 +635,32 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Scripts extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScripts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/scripts"), Pattern.compile("^(.+)\\.kts$"), TargetBackend.ANY, true); } @TestMetadata("if.kts") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/scripts/if.kts"); - doTest(fileName); + runTest("idea/testData/checker/scripts/if.kts"); } @TestMetadata("packageStatement.kts") public void testPackageStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/scripts/packageStatement.kts"); - doTest(fileName); + runTest("idea/testData/checker/scripts/packageStatement.kts"); } @TestMetadata("simple.kts") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/scripts/simple.kts"); - doTest(fileName); + runTest("idea/testData/checker/scripts/simple.kts"); } @TestMetadata("uninitializedVariable.kts") public void testUninitializedVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/scripts/uninitializedVariable.kts"); - doTest(fileName); + runTest("idea/testData/checker/scripts/uninitializedVariable.kts"); } } @@ -764,6 +668,10 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DuplicateJvmSignature extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicateJvmSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/duplicateJvmSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -772,14 +680,17 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fields extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/duplicateJvmSignature/fields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectCopiedFieldObject.kt") public void testClassObjectCopiedFieldObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/fields/classObjectCopiedFieldObject.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/fields/classObjectCopiedFieldObject.kt"); } } @@ -787,68 +698,62 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionAndProperty extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionAndProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/duplicateJvmSignature/functionAndProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguous.kt") public void testAmbiguous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/ambiguous.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/ambiguous.kt"); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/class.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/classObject.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/classObject.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/localClass.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/localClass.kt"); } @TestMetadata("nestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/nestedClass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/object.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/object.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/objectExpression.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/topLevel.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/topLevel.kt"); } @TestMetadata("topLevelMultifileRuntime.kt") public void testTopLevelMultifileRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/topLevelMultifileRuntime.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/topLevelMultifileRuntime.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/functionAndProperty/trait.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/functionAndProperty/trait.kt"); } } @@ -856,14 +761,17 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TraitImpl extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTraitImpl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/duplicateJvmSignature/traitImpl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("twoTraits.kt") public void testTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/duplicateJvmSignature/traitImpl/twoTraits.kt"); - doTest(fileName); + runTest("idea/testData/checker/duplicateJvmSignature/traitImpl/twoTraits.kt"); } } } @@ -872,104 +780,92 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Infos extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithInfos, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInfos() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/infos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CapturedConstructorParameter.kt") public void testCapturedConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/CapturedConstructorParameter.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/CapturedConstructorParameter.kt"); } @TestMetadata("CapturedInInlinedClosure.kt") public void testCapturedInInlinedClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/CapturedInInlinedClosure.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/CapturedInInlinedClosure.kt"); } @TestMetadata("multipleResolvedCalls.kt") public void testMultipleResolvedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/multipleResolvedCalls.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/multipleResolvedCalls.kt"); } @TestMetadata("PropertiesWithBackingFields.kt") public void testPropertiesWithBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/PropertiesWithBackingFields.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/PropertiesWithBackingFields.kt"); } @TestMetadata("smartCastOnElvis.kt") public void testSmartCastOnElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/smartCastOnElvis.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/smartCastOnElvis.kt"); } @TestMetadata("SmartCastOnIf.kt") public void testSmartCastOnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/SmartCastOnIf.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/SmartCastOnIf.kt"); } @TestMetadata("SmartCastOnWhen.kt") public void testSmartCastOnWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/SmartCastOnWhen.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/SmartCastOnWhen.kt"); } @TestMetadata("SmartCastTarget.kt") public void testSmartCastTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/SmartCastTarget.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/SmartCastTarget.kt"); } @TestMetadata("SmartCastToEnum.kt") public void testSmartCastToEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/SmartCastToEnum.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/SmartCastToEnum.kt"); } @TestMetadata("SmartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/SmartCasts.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/SmartCasts.kt"); } @TestMetadata("SmartCastsWithSafeAccess.kt") public void testSmartCastsWithSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/SmartCastsWithSafeAccess.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/SmartCastsWithSafeAccess.kt"); } @TestMetadata("threeImplicitReceivers.kt") public void testThreeImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/threeImplicitReceivers.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/threeImplicitReceivers.kt"); } @TestMetadata("twoImplicitReceivers.kt") public void testTwoImplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/twoImplicitReceivers.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/twoImplicitReceivers.kt"); } @TestMetadata("Typos.kt") public void testTypos() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/Typos.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/Typos.kt"); } @TestMetadata("TyposInOverrideParams.kt") public void testTyposInOverrideParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/TyposInOverrideParams.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/TyposInOverrideParams.kt"); } @TestMetadata("WrapIntoRef.kt") public void testWrapIntoRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/infos/WrapIntoRef.kt"); - doTestWithInfos(fileName); + runTest("idea/testData/checker/infos/WrapIntoRef.kt"); } } @@ -977,50 +873,47 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DiagnosticsMessage extends AbstractPsiCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDiagnosticsMessage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/diagnosticsMessage"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fullPackageFQNameOnVisiblityError.kt") public void testFullPackageFQNameOnVisiblityError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/fullPackageFQNameOnVisiblityError.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/fullPackageFQNameOnVisiblityError.kt"); } @TestMetadata("incompleteTypeArgumentList.kt") public void testIncompleteTypeArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/incompleteTypeArgumentList.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/incompleteTypeArgumentList.kt"); } @TestMetadata("instantiationOfInnerClassInQualifiedForm.kt") public void testInstantiationOfInnerClassInQualifiedForm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/instantiationOfInnerClassInQualifiedForm.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/instantiationOfInnerClassInQualifiedForm.kt"); } @TestMetadata("lateinitOfATypeWithNullableUpperBound.kt") public void testLateinitOfATypeWithNullableUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/lateinitOfATypeWithNullableUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/lateinitOfATypeWithNullableUpperBound.kt"); } @TestMetadata("nArgumentsExpectedMessage.kt") public void testNArgumentsExpectedMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/nArgumentsExpectedMessage.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/nArgumentsExpectedMessage.kt"); } @TestMetadata("noSubstitutedTypeParameter.kt") public void testNoSubstitutedTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/noSubstitutedTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/noSubstitutedTypeParameter.kt"); } @TestMetadata("operatorCallDiagnosticsOnInOperator.kt") public void testOperatorCallDiagnosticsOnInOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/operatorCallDiagnosticsOnInOperator.kt"); - doTest(fileName); + runTest("idea/testData/checker/diagnosticsMessage/operatorCallDiagnosticsOnInOperator.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java b/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java index a854bdfce5d..8a01ea9ebf8 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/findUsages/FindUsagesTestGenerated.java @@ -23,6 +23,10 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kotlin extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -31,32 +35,32 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompanionObject extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompanionObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/companionObject"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inContainingClass.0.kt") public void testInContainingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/companionObject/inContainingClass.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/companionObject/inContainingClass.0.kt"); } @TestMetadata("javaUsage.0.kt") public void testJavaUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/companionObject/javaUsage.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/companionObject/javaUsage.0.kt"); } @TestMetadata("named.0.kt") public void testNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/companionObject/named.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/companionObject/named.0.kt"); } @TestMetadata("simple.0.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/companionObject/simple.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/companionObject/simple.0.kt"); } } @@ -64,232 +68,204 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Conventions extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("compareTo.0.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/compareTo.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/compareTo.0.kt"); } @TestMetadata("contains.0.kt") public void testContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/contains.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/contains.0.kt"); } @TestMetadata("equals.0.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/equals.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/equals.0.kt"); } @TestMetadata("equalsNotAny.0.kt") public void testEqualsNotAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/equalsNotAny.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/equalsNotAny.0.kt"); } @TestMetadata("forIteration.0.kt") public void testForIteration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/forIteration.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/forIteration.0.kt"); } @TestMetadata("get.0.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/get.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/get.0.kt"); } @TestMetadata("getAsPropertyDelegate.0.kt") public void testGetAsPropertyDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/getAsPropertyDelegate.0.kt"); } @TestMetadata("inc.0.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/inc.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/inc.0.kt"); } @TestMetadata("invoke.0.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/invoke.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/invoke.0.kt"); } @TestMetadata("invokeExtension.0.kt") public void testInvokeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/invokeExtension.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/invokeExtension.0.kt"); } @TestMetadata("invokeWithVarArg.0.kt") public void testInvokeWithVarArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/invokeWithVarArg.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/invokeWithVarArg.0.kt"); } @TestMetadata("plus.0.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/plus.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/plus.0.kt"); } @TestMetadata("plusAssign.0.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/plusAssign.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/plusAssign.0.kt"); } @TestMetadata("set.0.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/set.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/set.0.kt"); } @TestMetadata("setAsPropertyDelegate.0.kt") public void testSetAsPropertyDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/setAsPropertyDelegate.0.kt"); } @TestMetadata("severalOperators.0.kt") public void testSeveralOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/severalOperators.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/severalOperators.0.kt"); } @TestMetadata("unaryMinus.0.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/unaryMinus.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/unaryMinus.0.kt"); } @TestMetadata("idea/testData/findUsages/kotlin/conventions/components") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Components extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComponents() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/conventions/components"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callableReferences.0.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/callableReferences.0.kt"); } @TestMetadata("companionObjectAccess.0.kt") public void testCompanionObjectAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/companionObjectAccess.0.kt"); } @TestMetadata("componentFunForGenericType1.0.kt") public void testComponentFunForGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType1.0.kt"); } @TestMetadata("componentFunForGenericType2.0.kt") public void testComponentFunForGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/componentFunForGenericType2.0.kt"); } @TestMetadata("dataClass.0.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClass.0.kt"); } @TestMetadata("dataClassComponentByRef.0.kt") public void testDataClassComponentByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassComponentByRef.0.kt"); } @TestMetadata("dataClassFromStdlib.0.kt") public void testDataClassFromStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/dataClassFromStdlib.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassFromStdlib.0.kt"); } @TestMetadata("dataClassInsideDataClass.0.kt") public void testDataClassInsideDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/dataClassInsideDataClass.0.kt"); } @TestMetadata("extensionComponentFun.0.kt") public void testExtensionComponentFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/extensionComponentFun.0.kt"); } @TestMetadata("for.0.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/for.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/for.0.kt"); } @TestMetadata("isAndAs.0.kt") public void testIsAndAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/isAndAs.0.kt"); } @TestMetadata("lambdas.0.kt") public void testLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/lambdas.0.kt"); } @TestMetadata("mayTypeAffectAncestors.0.kt") public void testMayTypeAffectAncestors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/mayTypeAffectAncestors.0.kt"); } @TestMetadata("memberComponentFun.0.kt") public void testMemberComponentFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/memberComponentFun.0.kt"); } @TestMetadata("operators.0.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/operators.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/operators.0.kt"); } @TestMetadata("recursiveDataClass1.0.kt") public void testRecursiveDataClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass1.0.kt"); } @TestMetadata("recursiveDataClass2.0.kt") public void testRecursiveDataClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/recursiveDataClass2.0.kt"); } @TestMetadata("SAM.0.kt") public void testSAM() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/SAM.0.kt"); } @TestMetadata("when.0.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/conventions/components/when.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/conventions/components/when.0.kt"); } } } @@ -298,344 +274,292 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindClassUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindClassUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findClassUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("classUsedInPlainText.0.kt") public void testClassUsedInPlainText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/classUsedInPlainText.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/classUsedInPlainText.0.kt"); } @TestMetadata("classUsedInTextAsRef.0.kt") public void testClassUsedInTextAsRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/classUsedInTextAsRef.0.kt"); } @TestMetadata("javaClassAllUsages.0.kt") public void testJavaClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassAllUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassAllUsages.0.kt"); } @TestMetadata("javaClassConstructorUsages.0.kt") public void testJavaClassConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassConstructorUsages.0.kt"); } @TestMetadata("javaClassFunctionUsages1.0.kt") public void testJavaClassFunctionUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassFunctionUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassFunctionUsages1.0.kt"); } @TestMetadata("javaClassFunctionUsages2.0.kt") public void testJavaClassFunctionUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassFunctionUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassFunctionUsages2.0.kt"); } @TestMetadata("javaClassNonConstructorUsages.0.kt") public void testJavaClassNonConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassNonConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassNonConstructorUsages.0.kt"); } @TestMetadata("javaClassPropertyUsages1.0.kt") public void testJavaClassPropertyUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassPropertyUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassPropertyUsages1.0.kt"); } @TestMetadata("javaClassPropertyUsages2.0.kt") public void testJavaClassPropertyUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassPropertyUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassPropertyUsages2.0.kt"); } @TestMetadata("javaClassSecondaryCtrUsages.0.kt") public void testJavaClassSecondaryCtrUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaClassSecondaryCtrUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaClassSecondaryCtrUsages.0.kt"); } @TestMetadata("javaDerivedClassUsages1.0.kt") public void testJavaDerivedClassUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages1.0.kt"); } @TestMetadata("javaDerivedClassUsages2.0.kt") public void testJavaDerivedClassUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedClassUsages2.0.kt"); } @TestMetadata("javaDerivedInterfaceUsages1.0.kt") public void testJavaDerivedInterfaceUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedInterfaceUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedInterfaceUsages1.0.kt"); } @TestMetadata("javaDerivedInterfaceUsages2.0.kt") public void testJavaDerivedInterfaceUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedInterfaceUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/javaDerivedInterfaceUsages2.0.kt"); } @TestMetadata("kotlinClassAllUsages.0.kt") public void testKotlinClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages.0.kt"); } @TestMetadata("kotlinClassAllUsages2.0.kt") public void testKotlinClassAllUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages2.0.kt"); } @TestMetadata("kotlinClassAllUsages3.0.kt") public void testKotlinClassAllUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsages3.0.kt"); } @TestMetadata("kotlinClassAllUsagesNoImport.0.kt") public void testKotlinClassAllUsagesNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassAllUsagesNoImport.0.kt"); } @TestMetadata("kotlinClassConstructorUsages.0.kt") public void testKotlinClassConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassConstructorUsages.0.kt"); } @TestMetadata("kotlinClassDerivedAnonymousObjects.0.kt") public void testKotlinClassDerivedAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedAnonymousObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedAnonymousObjects.0.kt"); } @TestMetadata("kotlinClassDerivedClasses.0.kt") public void testKotlinClassDerivedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedClasses.0.kt"); } @TestMetadata("kotlinClassDerivedInnerClasses.0.kt") public void testKotlinClassDerivedInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedInnerClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedInnerClasses.0.kt"); } @TestMetadata("kotlinClassDerivedInnerObjects.0.kt") public void testKotlinClassDerivedInnerObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedInnerObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedInnerObjects.0.kt"); } @TestMetadata("kotlinClassDerivedLocalClasses.0.kt") public void testKotlinClassDerivedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalClasses.0.kt"); } @TestMetadata("kotlinClassDerivedLocalObjects.0.kt") public void testKotlinClassDerivedLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalObjects.0.kt"); } @TestMetadata("kotlinClassDerivedLocalTraits.0.kt") public void testKotlinClassDerivedLocalTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalTraits.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedLocalTraits.0.kt"); } @TestMetadata("kotlinClassDerivedObjects.0.kt") public void testKotlinClassDerivedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedObjects.0.kt"); } @TestMetadata("kotlinClassDerivedTraits.0.kt") public void testKotlinClassDerivedTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedTraits.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassDerivedTraits.0.kt"); } @TestMetadata("kotlinClassFunctionUsages1.0.kt") public void testKotlinClassFunctionUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages1.0.kt"); } @TestMetadata("kotlinClassFunctionUsages2.0.kt") public void testKotlinClassFunctionUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassFunctionUsages2.0.kt"); } @TestMetadata("kotlinClassNonConstructorUsages.0.kt") public void testKotlinClassNonConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassNonConstructorUsages.0.kt"); } @TestMetadata("kotlinClassPropertyUsages1.0.kt") public void testKotlinClassPropertyUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages1.0.kt"); } @TestMetadata("kotlinClassPropertyUsages2.0.kt") public void testKotlinClassPropertyUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassPropertyUsages2.0.kt"); } @TestMetadata("kotlinClassSecondaryCtorUsages.0.kt") public void testKotlinClassSecondaryCtorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassSecondaryCtorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinClassSecondaryCtorUsages.0.kt"); } @TestMetadata("kotlinDeeplyNestedClassAllUsages.0.kt") public void testKotlinDeeplyNestedClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.0.kt"); } @TestMetadata("kotlinInnerClassAllUsages.0.kt") public void testKotlinInnerClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.0.kt"); } @TestMetadata("kotlinLocalClassDerivedAnonymousObjects.0.kt") public void testKotlinLocalClassDerivedAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedAnonymousObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedAnonymousObjects.0.kt"); } @TestMetadata("kotlinLocalClassDerivedLocalClasses.0.kt") public void testKotlinLocalClassDerivedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalClasses.0.kt"); } @TestMetadata("kotlinLocalClassDerivedLocalObjects.0.kt") public void testKotlinLocalClassDerivedLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalObjects.0.kt"); } @TestMetadata("kotlinLocalClassDerivedLocalTraits.0.kt") public void testKotlinLocalClassDerivedLocalTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalTraits.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassDerivedLocalTraits.0.kt"); } @TestMetadata("kotlinLocalClassUsages1.0.kt") public void testKotlinLocalClassUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages1.0.kt"); } @TestMetadata("kotlinLocalClassUsages2.0.kt") public void testKotlinLocalClassUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinLocalClassUsages2.0.kt"); } @TestMetadata("kotlinNestedClassAllUsages.0.kt") public void testKotlinNestedClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.0.kt"); } @TestMetadata("kotlinPrivateClassUsages.0.kt") public void testKotlinPrivateClassUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinPrivateClassUsages.0.kt"); } @TestMetadata("kotlinTraitDerivedAnonymousObjects.0.kt") public void testKotlinTraitDerivedAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedAnonymousObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedAnonymousObjects.0.kt"); } @TestMetadata("kotlinTraitDerivedClasses.0.kt") public void testKotlinTraitDerivedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedClasses.0.kt"); } @TestMetadata("kotlinTraitDerivedInnerClasses.0.kt") public void testKotlinTraitDerivedInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedInnerClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedInnerClasses.0.kt"); } @TestMetadata("kotlinTraitDerivedInnerObjects.0.kt") public void testKotlinTraitDerivedInnerObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedInnerObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedInnerObjects.0.kt"); } @TestMetadata("kotlinTraitDerivedLocalClasses.0.kt") public void testKotlinTraitDerivedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalClasses.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalClasses.0.kt"); } @TestMetadata("kotlinTraitDerivedLocalObjects.0.kt") public void testKotlinTraitDerivedLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalObjects.0.kt"); } @TestMetadata("kotlinTraitDerivedLocalTraits.0.kt") public void testKotlinTraitDerivedLocalTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalTraits.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedLocalTraits.0.kt"); } @TestMetadata("kotlinTraitDerivedObjects.0.kt") public void testKotlinTraitDerivedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedObjects.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedObjects.0.kt"); } @TestMetadata("kotlinTraitDerivedTraits.0.kt") public void testKotlinTraitDerivedTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedTraits.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/kotlinTraitDerivedTraits.0.kt"); } @TestMetadata("localAndNonLocalClass.0.kt") public void testLocalAndNonLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/localAndNonLocalClass.0.kt"); } @TestMetadata("primaryConstructorWithDefaultParams.0.kt") public void testPrimaryConstructorWithDefaultParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/primaryConstructorWithDefaultParams.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/primaryConstructorWithDefaultParams.0.kt"); } @TestMetadata("usageInTypeAlias.0.kt") public void testUsageInTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findClassUsages/usageInTypeAlias.0.kt"); } } @@ -643,194 +567,167 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindFunctionUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindFunctionUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumFunctionUsages.0.kt") public void testEnumFunctionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt"); } @TestMetadata("functionUsedInPlainText.0.kt") public void testFunctionUsedInPlainText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/functionUsedInPlainText.0.kt"); } @TestMetadata("highlightingOfSuperUsages.0.kt") public void testHighlightingOfSuperUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/highlightingOfSuperUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/highlightingOfSuperUsages.0.kt"); } @TestMetadata("javaAndKotlinOverrides.0.kt") public void testJavaAndKotlinOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/javaAndKotlinOverrides.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/javaAndKotlinOverrides.0.kt"); } @TestMetadata("javaMethodUsages.0.kt") public void testJavaMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/javaMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/javaMethodUsages.0.kt"); } @TestMetadata("jvmOverloaded.0.kt") public void testJvmOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/jvmOverloaded.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/jvmOverloaded.0.kt"); } @TestMetadata("jvmStaticFun.0.kt") public void testJvmStaticFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/jvmStaticFun.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/jvmStaticFun.0.kt"); } @TestMetadata("jvmStaticJvmOverloadsFun.0.kt") public void testJvmStaticJvmOverloadsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/jvmStaticJvmOverloadsFun.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/jvmStaticJvmOverloadsFun.0.kt"); } @TestMetadata("kotlinInternalMethodUsages.0.kt") public void testKotlinInternalMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinInternalMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinInternalMethodUsages.0.kt"); } @TestMetadata("kotlinLocalMethodUsages1.0.kt") public void testKotlinLocalMethodUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages1.0.kt"); } @TestMetadata("kotlinLocalMethodUsages2.0.kt") public void testKotlinLocalMethodUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinLocalMethodUsages2.0.kt"); } @TestMetadata("kotlinMethodUsages.0.kt") public void testKotlinMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMethodUsages.0.kt"); } @TestMetadata("kotlinMultiRefInImport.0.kt") public void testKotlinMultiRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMultiRefInImport.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinMultiRefInImport.0.kt"); } @TestMetadata("kotlinNestedClassMethodUsages.0.kt") public void testKotlinNestedClassMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinNestedClassMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinNestedClassMethodUsages.0.kt"); } @TestMetadata("kotlinOverloadAndExtensionUsages.0.kt") public void testKotlinOverloadAndExtensionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt"); } @TestMetadata("kotlinOverloadAndExtensionUsages2.0.kt") public void testKotlinOverloadAndExtensionUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinOverloadAndExtensionUsages2.0.kt"); } @TestMetadata("kotlinPrivateMethodUsages.0.kt") public void testKotlinPrivateMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinPrivateMethodUsages.0.kt"); } @TestMetadata("kotlinTopLevelMethodUsages.0.kt") public void testKotlinTopLevelMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt"); } @TestMetadata("kotlinTopLevelMethodUsagesMultifile.0.kt") public void testKotlinTopLevelMethodUsagesMultifile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesMultifile.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesMultifile.0.kt"); } @TestMetadata("kotlinTopLevelMethodUsagesNoImport.0.kt") public void testKotlinTopLevelMethodUsagesNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesNoImport.0.kt"); } @TestMetadata("kotlinTopLevelMethodUsagesWithRenamedFile.0.kt") public void testKotlinTopLevelMethodUsagesWithRenamedFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesWithRenamedFile.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTopLevelMethodUsagesWithRenamedFile.0.kt"); } @TestMetadata("kotlinTraitImplThroughDelegate.0.kt") public void testKotlinTraitImplThroughDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTraitImplThroughDelegate.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTraitImplThroughDelegate.0.kt"); } @TestMetadata("kotlinTraitNoImplThroughDelegate.0.kt") public void testKotlinTraitNoImplThroughDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTraitNoImplThroughDelegate.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/kotlinTraitNoImplThroughDelegate.0.kt"); } @TestMetadata("labeledReturns.0.kt") public void testLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/labeledReturns.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/labeledReturns.0.kt"); } @TestMetadata("localClassMember.0.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/localClassMember.0.kt"); } @TestMetadata("objectExpressionDeepMember.0.kt") public void testObjectExpressionDeepMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionDeepMember.0.kt"); } @TestMetadata("objectExpressionMember.0.kt") public void testObjectExpressionMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember.0.kt"); } @TestMetadata("objectExpressionMember2.0.kt") public void testObjectExpressionMember2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMember2.0.kt"); } @TestMetadata("objectExpressionMemberInClass.0.kt") public void testObjectExpressionMemberInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/objectExpressionMemberInClass.0.kt"); } @TestMetadata("synthesizedFunction.0.kt") public void testSynthesizedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/synthesizedFunction.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/synthesizedFunction.0.kt"); } @TestMetadata("usagesOfBaseForFunction.0.kt") public void testUsagesOfBaseForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findFunctionUsages/usagesOfBaseForFunction.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findFunctionUsages/usagesOfBaseForFunction.0.kt"); } } @@ -838,26 +735,27 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindJavaPropertyUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindJavaPropertyUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findJavaPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("javaPropertyUsagesK.0.kt") public void testJavaPropertyUsagesK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesK.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesK.0.kt"); } @TestMetadata("javaPropertyUsagesKJK.0.kt") public void testJavaPropertyUsagesKJK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesKJK.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesKJK.0.kt"); } @TestMetadata("javaPropertyUsagesKK.0.kt") public void testJavaPropertyUsagesKK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesKK.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findJavaPropertyUsages/javaPropertyUsagesKK.0.kt"); } } @@ -865,50 +763,47 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindObjectUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindObjectUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findObjectUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("javaObjectUsages.0.kt") public void testJavaObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/javaObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/javaObjectUsages.0.kt"); } @TestMetadata("kotlinImportedObjectUsages.0.kt") public void testKotlinImportedObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinImportedObjectUsages.0.kt"); } @TestMetadata("kotlinLocalObjectUsages1.0.kt") public void testKotlinLocalObjectUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/kotlinLocalObjectUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinLocalObjectUsages1.0.kt"); } @TestMetadata("kotlinLocalObjectUsages2.0.kt") public void testKotlinLocalObjectUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/kotlinLocalObjectUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinLocalObjectUsages2.0.kt"); } @TestMetadata("kotlinNestedObjectUsages.0.kt") public void testKotlinNestedObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/kotlinNestedObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinNestedObjectUsages.0.kt"); } @TestMetadata("kotlinObjectUsages.0.kt") public void testKotlinObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinObjectUsages.0.kt"); } @TestMetadata("kotlinPrivateObjectUsages.0.kt") public void testKotlinPrivateObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findObjectUsages/kotlinPrivateObjectUsages.0.kt"); } } @@ -916,14 +811,17 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindPackageUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindPackageUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPackageUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinPackageUsages.0.kt") public void testKotlinPackageUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPackageUsages/kotlinPackageUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPackageUsages/kotlinPackageUsages.0.kt"); } } @@ -931,50 +829,47 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindParameterUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindParameterUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findParameterUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinAnnotationConstructorParameterUsages.0.kt") public void testKotlinAnnotationConstructorParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/kotlinAnnotationConstructorParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinAnnotationConstructorParameterUsages.0.kt"); } @TestMetadata("kotlinComponentFunctionParameterUsages.0.kt") public void testKotlinComponentFunctionParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinComponentFunctionParameterUsages.0.kt"); } @TestMetadata("kotlinConstructorParameterUsages.0.kt") public void testKotlinConstructorParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt"); } @TestMetadata("kotlinDefaultAnnotationParameterUsages.0.kt") public void testKotlinDefaultAnnotationParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/kotlinDefaultAnnotationParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinDefaultAnnotationParameterUsages.0.kt"); } @TestMetadata("kotlinFunctionParameterUsages.0.kt") public void testKotlinFunctionParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/kotlinFunctionParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinFunctionParameterUsages.0.kt"); } @TestMetadata("kotlinHighlightParameterUsages.0.kt") public void testKotlinHighlightParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/kotlinHighlightParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/kotlinHighlightParameterUsages.0.kt"); } @TestMetadata("parameterNameInTextFile.0.kt") public void testParameterNameInTextFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findParameterUsages/parameterNameInTextFile.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findParameterUsages/parameterNameInTextFile.0.kt"); } } @@ -982,50 +877,47 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindPrimaryConstructorUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindPrimaryConstructorUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotationEntry.0.kt") public void testAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/annotationEntry.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/annotationEntry.0.kt"); } @TestMetadata("constructorCall.0.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/constructorCall.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/constructorCall.0.kt"); } @TestMetadata("jvmOverloaded.0.kt") public void testJvmOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/jvmOverloaded.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/jvmOverloaded.0.kt"); } @TestMetadata("missingName.0.kt") public void testMissingName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/missingName.0.kt"); } @TestMetadata("primaryConstructorByRef.0.kt") public void testPrimaryConstructorByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorByRef.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorByRef.0.kt"); } @TestMetadata("primaryConstructorNoKeyword.0.kt") public void testPrimaryConstructorNoKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorNoKeyword.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorNoKeyword.0.kt"); } @TestMetadata("primaryConstructorWithKeyword.0.kt") public void testPrimaryConstructorWithKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorWithKeyword.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPrimaryConstructorUsages/primaryConstructorWithKeyword.0.kt"); } } @@ -1033,176 +925,152 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindPropertyUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindPropertyUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("extensionPropertyUsages.0.kt") public void testExtensionPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/extensionPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/extensionPropertyUsages.0.kt"); } @TestMetadata("javaAndKotlinOverrides.0.kt") public void testJavaAndKotlinOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaAndKotlinOverrides.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaAndKotlinOverrides.0.kt"); } @TestMetadata("javaAndKotlinOverrides2.0.kt") public void testJavaAndKotlinOverrides2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaAndKotlinOverrides2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaAndKotlinOverrides2.0.kt"); } @TestMetadata("javaClassObjectPropertyUsages.0.kt") public void testJavaClassObjectPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaClassObjectPropertyUsages.0.kt"); } @TestMetadata("javaPropertyReadUsages.0.kt") public void testJavaPropertyReadUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyReadUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyReadUsages.0.kt"); } @TestMetadata("javaPropertyReadUsages2.0.kt") public void testJavaPropertyReadUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyReadUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyReadUsages2.0.kt"); } @TestMetadata("javaPropertyUsages.0.kt") public void testJavaPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages.0.kt"); } @TestMetadata("javaPropertyUsages2.0.kt") public void testJavaPropertyUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyUsages2.0.kt"); } @TestMetadata("javaPropertyWriteUsages.0.kt") public void testJavaPropertyWriteUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyWriteUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyWriteUsages.0.kt"); } @TestMetadata("javaPropertyWriteUsages2.0.kt") public void testJavaPropertyWriteUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyWriteUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/javaPropertyWriteUsages2.0.kt"); } @TestMetadata("jvmStaticProperty.0.kt") public void testJvmStaticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/jvmStaticProperty.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/jvmStaticProperty.0.kt"); } @TestMetadata("kotlinClassObjectPropertyUsage.0.kt") public void testKotlinClassObjectPropertyUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt"); } @TestMetadata("kotlinLocalPropertyUsages1.0.kt") public void testKotlinLocalPropertyUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages1.0.kt"); } @TestMetadata("kotlinLocalPropertyUsages2.0.kt") public void testKotlinLocalPropertyUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinLocalPropertyUsages2.0.kt"); } @TestMetadata("kotlinMultiRefInImport.0.kt") public void testKotlinMultiRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinMultiRefInImport.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinMultiRefInImport.0.kt"); } @TestMetadata("kotlinNestedClassPropertyUsages.0.kt") public void testKotlinNestedClassPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinNestedClassPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinNestedClassPropertyUsages.0.kt"); } @TestMetadata("kotlinPrivatePropertyInClassObjectUsages.0.kt") public void testKotlinPrivatePropertyInClassObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyInClassObjectUsages.0.kt"); } @TestMetadata("kotlinPrivatePropertyUsages.0.kt") public void testKotlinPrivatePropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyUsages.0.kt"); } @TestMetadata("kotlinPrivatePropertyUsages2.0.kt") public void testKotlinPrivatePropertyUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPrivatePropertyUsages2.0.kt"); } @TestMetadata("kotlinPropertyReadUsages.0.kt") public void testKotlinPropertyReadUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages.0.kt"); } @TestMetadata("kotlinPropertyReadUsages2.0.kt") public void testKotlinPropertyReadUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyReadUsages2.0.kt"); } @TestMetadata("kotlinPropertySameNameAsMethodUsages.0.kt") public void testKotlinPropertySameNameAsMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertySameNameAsMethodUsages.0.kt"); } @TestMetadata("kotlinPropertyUsages.0.kt") public void testKotlinPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages.0.kt"); } @TestMetadata("kotlinPropertyUsages2.0.kt") public void testKotlinPropertyUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyUsages2.0.kt"); } @TestMetadata("kotlinPropertyWriteUsages.0.kt") public void testKotlinPropertyWriteUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages.0.kt"); } @TestMetadata("kotlinPropertyWriteUsages2.0.kt") public void testKotlinPropertyWriteUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinPropertyWriteUsages2.0.kt"); } @TestMetadata("kotlinTopLevelPropertyUsages.0.kt") public void testKotlinTopLevelPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt"); } @TestMetadata("kt7656.0.kt") public void testKt7656() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findPropertyUsages/kt7656.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findPropertyUsages/kt7656.0.kt"); } } @@ -1210,32 +1078,32 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindSecondaryConstructorUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindSecondaryConstructorUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constructorCall.0.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/constructorCall.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/constructorCall.0.kt"); } @TestMetadata("defaultSecondaryConstructor.0.kt") public void testDefaultSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/defaultSecondaryConstructor.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/defaultSecondaryConstructor.0.kt"); } @TestMetadata("jvmOverloaded.0.kt") public void testJvmOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/jvmOverloaded.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/jvmOverloaded.0.kt"); } @TestMetadata("secondaryConstructor.0.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/secondaryConstructor.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findSecondaryConstructorUsages/secondaryConstructor.0.kt"); } } @@ -1243,14 +1111,17 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindTypeAliasUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindTypeAliasUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeAliasUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("objectAlias.0.kt") public void testObjectAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findTypeAliasUsages/objectAlias.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findTypeAliasUsages/objectAlias.0.kt"); } } @@ -1258,26 +1129,27 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindTypeParameterUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindTypeParameterUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findTypeParameterUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinClassTypeParameterUsages.0.kt") public void testKotlinClassTypeParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt"); } @TestMetadata("kotlinFunctionTypeParameterUsages.0.kt") public void testKotlinFunctionTypeParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinFunctionTypeParameterUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinFunctionTypeParameterUsages.0.kt"); } @TestMetadata("propertyWithTypeParameter.0.kt") public void testPropertyWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findTypeParameterUsages/propertyWithTypeParameter.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findTypeParameterUsages/propertyWithTypeParameter.0.kt"); } } @@ -1285,14 +1157,17 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindWithFilteringImports extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindWithFilteringImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithFilteringImports"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("findWithFilteringImports.0.kt") public void testFindWithFilteringImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findWithFilteringImports/findWithFilteringImports.0.kt"); } } @@ -1300,26 +1175,27 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindWithStructuralGrouping extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindWithStructuralGrouping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/findWithStructuralGrouping"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinClassAllUsages.0.kt") public void testKotlinClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinClassAllUsages.0.kt"); } @TestMetadata("kotlinMethodUsages.0.kt") public void testKotlinMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinMethodUsages.0.kt"); } @TestMetadata("kotlinPropertyUsages.0.kt") public void testKotlinPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/findWithStructuralGrouping/kotlinPropertyUsages.0.kt"); } } @@ -1327,6 +1203,10 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Internal extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -1335,50 +1215,47 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindFunctionUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindFunctionUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findFunctionUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumFunctionUsages.0.kt") public void testEnumFunctionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/enumFunctionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/enumFunctionUsages.0.kt"); } @TestMetadata("kotlinMethodUsages.0.kt") public void testKotlinMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinMethodUsages.0.kt"); } @TestMetadata("kotlinMultiRefInImport.0.kt") public void testKotlinMultiRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinMultiRefInImport.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinMultiRefInImport.0.kt"); } @TestMetadata("kotlinOverloadAndExtensionUsages.0.kt") public void testKotlinOverloadAndExtensionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinOverloadAndExtensionUsages.0.kt"); } @TestMetadata("kotlinTopLevelMethodUsages.0.kt") public void testKotlinTopLevelMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTopLevelMethodUsages.0.kt"); } @TestMetadata("kotlinTraitImplThroughDelegate.0.kt") public void testKotlinTraitImplThroughDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTraitImplThroughDelegate.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/kotlinTraitImplThroughDelegate.0.kt"); } @TestMetadata("usagesOfBaseForFunction.0.kt") public void testUsagesOfBaseForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findFunctionUsages/usagesOfBaseForFunction.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findFunctionUsages/usagesOfBaseForFunction.0.kt"); } } @@ -1386,20 +1263,22 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindPrimaryConstructorUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindPrimaryConstructorUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constructorCall.0.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages/constructorCall.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages/constructorCall.0.kt"); } @TestMetadata("primaryConstructorByRef.0.kt") public void testPrimaryConstructorByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages/primaryConstructorByRef.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findPrimaryConstructorUsages/primaryConstructorByRef.0.kt"); } } @@ -1407,32 +1286,32 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindPropertyUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindPropertyUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findPropertyUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("kotlinClassObjectPropertyUsage.0.kt") public void testKotlinClassObjectPropertyUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinClassObjectPropertyUsage.0.kt"); } @TestMetadata("kotlinMultiRefInImport.0.kt") public void testKotlinMultiRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinMultiRefInImport.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinMultiRefInImport.0.kt"); } @TestMetadata("kotlinPropertyUsages.0.kt") public void testKotlinPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinPropertyUsages.0.kt"); } @TestMetadata("kotlinTopLevelPropertyUsages.0.kt") public void testKotlinTopLevelPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findPropertyUsages/kotlinTopLevelPropertyUsages.0.kt"); } } @@ -1440,26 +1319,27 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindSecondaryConstructorUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindSecondaryConstructorUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constructorCall.0.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/constructorCall.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/constructorCall.0.kt"); } @TestMetadata("defaultSecondaryConstructor.0.kt") public void testDefaultSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/defaultSecondaryConstructor.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/defaultSecondaryConstructor.0.kt"); } @TestMetadata("secondaryConstructor.0.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/secondaryConstructor.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/internal/findSecondaryConstructorUsages/secondaryConstructor.0.kt"); } } } @@ -1468,20 +1348,22 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyFiles extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyFiles() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/propertyFiles"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("propertyFileUsagesByRef.0.kt") public void testPropertyFileUsagesByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/propertyFiles/propertyFileUsagesByRef.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/propertyFiles/propertyFileUsagesByRef.0.kt"); } @TestMetadata("propertyUsagesByRef.0.kt") public void testPropertyUsagesByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/propertyFiles/propertyUsagesByRef.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/propertyFiles/propertyUsagesByRef.0.kt"); } } @@ -1489,14 +1371,17 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/script"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("dummy.0.kts") public void testDummy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/script/dummy.0.kts"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/script/dummy.0.kts"); } } @@ -1504,14 +1389,17 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnresolvedAnnotation extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnresolvedAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/unresolvedAnnotation"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("unresolvedAnnotation.0.kt") public void testUnresolvedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/unresolvedAnnotation/unresolvedAnnotation.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/unresolvedAnnotation/unresolvedAnnotation.0.kt"); } } @@ -1519,32 +1407,32 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variable extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/kotlin/variable"), Pattern.compile("^(.+)\\.0\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("plusAssignFun.0.kt") public void testPlusAssignFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/variable/plusAssignFun.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/variable/plusAssignFun.0.kt"); } @TestMetadata("readAccess.0.kt") public void testReadAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/variable/readAccess.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/variable/readAccess.0.kt"); } @TestMetadata("varInDoWhile.0.kt") public void testVarInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/variable/varInDoWhile.0.kt"); } @TestMetadata("writeAccess.0.kt") public void testWriteAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/kotlin/variable/writeAccess.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/kotlin/variable/writeAccess.0.kt"); } } } @@ -1553,6 +1441,10 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/java"), Pattern.compile("^(.+)\\.0\\.java$"), TargetBackend.ANY, true); } @@ -1561,44 +1453,42 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindConstructorUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindConstructorUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/java/findConstructorUsages"), Pattern.compile("^(.+)\\.0\\.java$"), TargetBackend.ANY, true); } @TestMetadata("javaConstructorInDelegationCall.0.java") public void testJavaConstructorInDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findConstructorUsages/javaConstructorInDelegationCall.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findConstructorUsages/javaConstructorInDelegationCall.0.java"); } @TestMetadata("javaDefaultConstructorInDelegationCall.0.java") public void testJavaDefaultConstructorInDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findConstructorUsages/javaDefaultConstructorInDelegationCall.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findConstructorUsages/javaDefaultConstructorInDelegationCall.0.java"); } @TestMetadata("primaryConstructorByJavaRef.0.java") public void testPrimaryConstructorByJavaRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findConstructorUsages/primaryConstructorByJavaRef.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findConstructorUsages/primaryConstructorByJavaRef.0.java"); } @TestMetadata("primaryConstructorByJavaSuperRef.0.java") public void testPrimaryConstructorByJavaSuperRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findConstructorUsages/primaryConstructorByJavaSuperRef.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findConstructorUsages/primaryConstructorByJavaSuperRef.0.java"); } @TestMetadata("secondaryConstructorByJavaNewExpression.0.java") public void testSecondaryConstructorByJavaNewExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findConstructorUsages/secondaryConstructorByJavaNewExpression.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findConstructorUsages/secondaryConstructorByJavaNewExpression.0.java"); } @TestMetadata("secondaryConstructorByJavaSuperCall.0.java") public void testSecondaryConstructorByJavaSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findConstructorUsages/secondaryConstructorByJavaSuperCall.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findConstructorUsages/secondaryConstructorByJavaSuperCall.0.java"); } } @@ -1606,140 +1496,122 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindJavaClassUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindJavaClassUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/java/findJavaClassUsages"), Pattern.compile("^(.+)\\.0\\.java$"), TargetBackend.ANY, true); } @TestMetadata("JKClassAllUsages.0.java") public void testJKClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.0.java"); } @TestMetadata("JKClassDerivedAnonymousObjects.0.java") public void testJKClassDerivedAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedAnonymousObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedAnonymousObjects.0.java"); } @TestMetadata("JKClassDerivedClasses.0.java") public void testJKClassDerivedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedClasses.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedClasses.0.java"); } @TestMetadata("JKClassDerivedInnerClasses.0.java") public void testJKClassDerivedInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedInnerClasses.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedInnerClasses.0.java"); } @TestMetadata("JKClassDerivedInnerObjects.0.java") public void testJKClassDerivedInnerObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedInnerObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedInnerObjects.0.java"); } @TestMetadata("JKClassDerivedLocalClasses.0.java") public void testJKClassDerivedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedLocalClasses.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedLocalClasses.0.java"); } @TestMetadata("JKClassDerivedLocalObjects.0.java") public void testJKClassDerivedLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedLocalObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedLocalObjects.0.java"); } @TestMetadata("JKClassDerivedObjects.0.java") public void testJKClassDerivedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassDerivedObjects.0.java"); } @TestMetadata("JKClassFieldsUsages.0.java") public void testJKClassFieldsUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.0.java"); } @TestMetadata("JKClassMethodsUsages.0.java") public void testJKClassMethodsUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.0.java"); } @TestMetadata("JKClassWithImplicitConstructorAllUsages.0.java") public void testJKClassWithImplicitConstructorAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.0.java"); } @TestMetadata("JKDerivedInterfaces.0.java") public void testJKDerivedInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKDerivedInterfaces.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKDerivedInterfaces.0.java"); } @TestMetadata("JKInnerClassAllUsages.0.java") public void testJKInnerClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.0.java"); } @TestMetadata("JKInterfaceDerivedAnonymousObjects.0.java") public void testJKInterfaceDerivedAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedAnonymousObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedAnonymousObjects.0.java"); } @TestMetadata("JKInterfaceDerivedClasses.0.java") public void testJKInterfaceDerivedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedClasses.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedClasses.0.java"); } @TestMetadata("JKInterfaceDerivedInnerClasses.0.java") public void testJKInterfaceDerivedInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedInnerClasses.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedInnerClasses.0.java"); } @TestMetadata("JKInterfaceDerivedInnerObjects.0.java") public void testJKInterfaceDerivedInnerObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedInnerObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedInnerObjects.0.java"); } @TestMetadata("JKInterfaceDerivedLocalClasses.0.java") public void testJKInterfaceDerivedLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalClasses.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalClasses.0.java"); } @TestMetadata("JKInterfaceDerivedLocalObjects.0.java") public void testJKInterfaceDerivedLocalObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalObjects.0.java"); } @TestMetadata("JKInterfaceDerivedLocalTraits.0.java") public void testJKInterfaceDerivedLocalTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalTraits.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedLocalTraits.0.java"); } @TestMetadata("JKInterfaceDerivedObjects.0.java") public void testJKInterfaceDerivedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedObjects.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKInterfaceDerivedObjects.0.java"); } @TestMetadata("JKNestedClassAllUsages.0.java") public void testJKNestedClassAllUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.0.java"); } } @@ -1747,14 +1619,17 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindJavaFieldUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindJavaFieldUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/java/findJavaFieldUsages"), Pattern.compile("^(.+)\\.0\\.java$"), TargetBackend.ANY, true); } @TestMetadata("JKFieldUsages.0.java") public void testJKFieldUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaFieldUsages/JKFieldUsages.0.java"); } } @@ -1762,80 +1637,72 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindJavaMethodUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindJavaMethodUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/java/findJavaMethodUsages"), Pattern.compile("^(.+)\\.0\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ConventionUsages.0.java") public void testConventionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/ConventionUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/ConventionUsages.0.java"); } @TestMetadata("defaultJavaAnnotationMethodUsages.0.java") public void testDefaultJavaAnnotationMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/defaultJavaAnnotationMethodUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/defaultJavaAnnotationMethodUsages.0.java"); } @TestMetadata("JKMethodOverrides.0.java") public void testJKMethodOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/JKMethodOverrides.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/JKMethodOverrides.0.java"); } @TestMetadata("JKMethodUsages.0.java") public void testJKMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/JKMethodUsages.0.java"); } @TestMetadata("javaComponentFunctions.0.java") public void testJavaComponentFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/javaComponentFunctions.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/javaComponentFunctions.0.java"); } @TestMetadata("javaInvoke.0.java") public void testJavaInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/javaInvoke.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/javaInvoke.0.java"); } @TestMetadata("javaInvokeWithStaticImport.0.java") public void testJavaInvokeWithStaticImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/javaInvokeWithStaticImport.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/javaInvokeWithStaticImport.0.java"); } @TestMetadata("JavaWithGroovyInvoke.0.java") public void testJavaWithGroovyInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/JavaWithGroovyInvoke.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/JavaWithGroovyInvoke.0.java"); } @TestMetadata("MismatchedAccessor.0.java") public void testMismatchedAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/MismatchedAccessor.0.java"); } @TestMetadata("OverriddenMethodSyntheticAccessor.0.java") public void testOverriddenMethodSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/OverriddenMethodSyntheticAccessor.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/OverriddenMethodSyntheticAccessor.0.java"); } @TestMetadata("SyntheticProperties.0.java") public void testSyntheticProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/SyntheticProperties.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/SyntheticProperties.0.java"); } @TestMetadata("UnaryNot.0.java") public void testUnaryNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaMethodUsages/UnaryNot.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaMethodUsages/UnaryNot.0.java"); } } @@ -1843,20 +1710,22 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FindJavaPropertyUsages extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindJavaPropertyUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/java/findJavaPropertyUsages"), Pattern.compile("^(.+)\\.0\\.java$"), TargetBackend.ANY, true); } @TestMetadata("javaPropertyGetterUsagesKJ.0.java") public void testJavaPropertyGetterUsagesKJ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaPropertyUsages/javaPropertyGetterUsagesKJ.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaPropertyUsages/javaPropertyGetterUsagesKJ.0.java"); } @TestMetadata("javaPropertySetterUsagesKJ.0.java") public void testJavaPropertySetterUsagesKJ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/java/findJavaPropertyUsages/javaPropertySetterUsagesKJ.0.java"); - doTest(fileName); + runTest("idea/testData/findUsages/java/findJavaPropertyUsages/javaPropertySetterUsagesKJ.0.java"); } } } @@ -1865,20 +1734,22 @@ public class FindUsagesTestGenerated extends AbstractFindUsagesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyFiles extends AbstractFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyFiles() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/propertyFiles"), Pattern.compile("^(.+)\\.0\\.properties$"), TargetBackend.ANY, true); } @TestMetadata("propertyFileUsages.0.properties") public void testPropertyFileUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/propertyFiles/propertyFileUsages.0.properties"); - doTest(fileName); + runTest("idea/testData/findUsages/propertyFiles/propertyFileUsages.0.properties"); } @TestMetadata("propertyUsages.0.properties") public void testPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/propertyFiles/propertyUsages.0.properties"); - doTest(fileName); + runTest("idea/testData/findUsages/propertyFiles/propertyUsages.0.properties"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryTestGenerated.java b/idea/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryTestGenerated.java index 44b4cf98adf..b71baf128f9 100644 --- a/idea/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/findUsages/KotlinFindUsagesWithLibraryTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinFindUsagesWithLibraryTestGenerated extends AbstractKotlinFindUsagesWithLibraryTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibraryUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); } @@ -29,44 +33,42 @@ public class KotlinFindUsagesWithLibraryTestGenerated extends AbstractKotlinFind @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaLibrary extends AbstractKotlinFindUsagesWithLibraryTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/javaLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LibraryClassUsages.0.kt") public void testLibraryClassUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryClassUsages.0.kt"); } @TestMetadata("LibraryConstructorUsages.0.kt") public void testLibraryConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryConstructorUsages.0.kt"); } @TestMetadata("LibraryFieldUsages.0.kt") public void testLibraryFieldUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryFieldUsages.0.kt"); } @TestMetadata("LibraryMethodUsages.0.kt") public void testLibraryMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryMethodUsages.0.kt"); } @TestMetadata("LibraryStaticFieldUsages.0.kt") public void testLibraryStaticFieldUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticFieldUsages.0.kt"); } @TestMetadata("LibraryStaticMethodUsages.0.kt") public void testLibraryStaticMethodUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/javaLibrary/LibraryStaticMethodUsages.0.kt"); } } @@ -74,80 +76,72 @@ public class KotlinFindUsagesWithLibraryTestGenerated extends AbstractKotlinFind @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinLibrary extends AbstractKotlinFindUsagesWithLibraryTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/kotlinLibrary"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LibraryClassUsages.0.kt") public void testLibraryClassUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryClassUsages.0.kt"); } @TestMetadata("LibraryCompanionObjectUsages.0.kt") public void testLibraryCompanionObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryCompanionObjectUsages.0.kt"); } @TestMetadata("LibraryEnumEntryUsages.0.kt") public void testLibraryEnumEntryUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryEnumEntryUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryEnumEntryUsages.0.kt"); } @TestMetadata("LibraryFunctionUsages.0.kt") public void testLibraryFunctionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryFunctionUsages.0.kt"); } @TestMetadata("LibraryMemberFunctionUsages.0.kt") public void testLibraryMemberFunctionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryMemberFunctionUsages.0.kt"); } @TestMetadata("LibraryNestedClassMemberFunctionUsages.0.kt") public void testLibraryNestedClassMemberFunctionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassMemberFunctionUsages.0.kt"); } @TestMetadata("LibraryNestedClassPrimaryConstructorUsages.0.kt") public void testLibraryNestedClassPrimaryConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassPrimaryConstructorUsages.0.kt"); } @TestMetadata("LibraryNestedClassSecondaryConstructorUsages.0.kt") public void testLibraryNestedClassSecondaryConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassSecondaryConstructorUsages.0.kt"); } @TestMetadata("LibraryNestedClassUsages.0.kt") public void testLibraryNestedClassUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryNestedClassUsages.0.kt"); } @TestMetadata("LibraryObjectUsages.0.kt") public void testLibraryObjectUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryObjectUsages.0.kt"); } @TestMetadata("LibraryPrimaryConstructorUsages.0.kt") public void testLibraryPrimaryConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibraryPrimaryConstructorUsages.0.kt"); } @TestMetadata("LibrarySecondaryConstructorUsages.0.kt") public void testLibrarySecondaryConstructorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt"); - doTest(fileName); + runTest("idea/testData/findUsages/libraryUsages/kotlinLibrary/LibrarySecondaryConstructorUsages.0.kt"); } } @@ -155,8 +149,25 @@ public class KotlinFindUsagesWithLibraryTestGenerated extends AbstractKotlinFind @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class _library extends AbstractKotlinFindUsagesWithLibraryTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentIn_library() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/findUsages/libraryUsages/_library/library") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Library extends AbstractKotlinFindUsagesWithLibraryTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLibrary() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/findUsages/libraryUsages/_library/library"), Pattern.compile("^(.+)\\.0\\.kt$"), TargetBackend.ANY, true); + } + } } } diff --git a/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java b/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java index bfbefde2fb3..077206318ed 100644 --- a/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/formatter/FormatterTestGenerated.java @@ -23,10 +23,13 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Formatter extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterSemiColonInEnumClass.after.kt") public void testAfterSemiColonInEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/AfterSemiColonInEnumClass.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/AfterSemiColonInEnumClass.after.kt"); } public void testAllFilesPresentInFormatter() throws Exception { @@ -35,964 +38,809 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestMetadata("AnnotationBeforeExpression.after.kt") public void testAnnotationBeforeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/AnnotationBeforeExpression.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/AnnotationBeforeExpression.after.kt"); } @TestMetadata("AnonymousInitializers.after.kt") public void testAnonymousInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/AnonymousInitializers.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/AnonymousInitializers.after.kt"); } @TestMetadata("AnonymousInitializersLineBreak.after.kt") public void testAnonymousInitializersLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/AnonymousInitializersLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/AnonymousInitializersLineBreak.after.kt"); } @TestMetadata("ArrayAccess.after.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ArrayAccess.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ArrayAccess.after.kt"); } @TestMetadata("ArrayLiteral.after.kt") public void testArrayLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ArrayLiteral.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ArrayLiteral.after.kt"); } @TestMetadata("AssignmentWrap.after.kt") public void testAssignmentWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/AssignmentWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/AssignmentWrap.after.kt"); } @TestMetadata("BinaryExpressionAlignmentSpread.after.kt") public void testBinaryExpressionAlignmentSpread() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressionAlignmentSpread.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BinaryExpressionAlignmentSpread.after.kt"); } @TestMetadata("BinaryExpressions.after.kt") public void testBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressions.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BinaryExpressions.after.kt"); } @TestMetadata("BinaryExpressionsBoolean.after.kt") public void testBinaryExpressionsBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressionsBoolean.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BinaryExpressionsBoolean.after.kt"); } @TestMetadata("BinaryExpressionsWithoutAlignment.after.kt") public void testBinaryExpressionsWithoutAlignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressionsWithoutAlignment.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BinaryExpressionsWithoutAlignment.after.kt"); } @TestMetadata("BlankLinesAfterClassHeader.after.kt") public void testBlankLinesAfterClassHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BlankLinesAfterClassHeader.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BlankLinesAfterClassHeader.after.kt"); } @TestMetadata("BlankLinesBeforeRBrace.after.kt") public void testBlankLinesBeforeRBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BlankLinesBeforeRBrace.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BlankLinesBeforeRBrace.after.kt"); } @TestMetadata("BlankLinesBeforeRBrace2.after.kt") public void testBlankLinesBeforeRBrace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BlankLinesBeforeRBrace2.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BlankLinesBeforeRBrace2.after.kt"); } @TestMetadata("BlockFor.after.kt") public void testBlockFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BlockFor.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/BlockFor.after.kt"); } @TestMetadata("By.after.kt") public void testBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/By.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/By.after.kt"); } @TestMetadata("CallLParenthOnNextLine.after.kt") public void testCallLParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallLParenthOnNextLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/CallLParenthOnNextLine.after.kt"); } @TestMetadata("CallRParenthOnNextLine.after.kt") public void testCallRParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallRParenthOnNextLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/CallRParenthOnNextLine.after.kt"); } @TestMetadata("Cast.after.kt") public void testCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Cast.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Cast.after.kt"); } @TestMetadata("CatchFinallyOnNewLine.after.kt") public void testCatchFinallyOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CatchFinallyOnNewLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/CatchFinallyOnNewLine.after.kt"); } @TestMetadata("Class.after.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Class.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Class.after.kt"); } @TestMetadata("ClassAnnotationWrapping.after.kt") public void testClassAnnotationWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ClassAnnotationWrapping.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ClassAnnotationWrapping.after.kt"); } @TestMetadata("ClassInBody.after.kt") public void testClassInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ClassInBody.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ClassInBody.after.kt"); } @TestMetadata("ClassLineBreak.after.kt") public void testClassLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ClassLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ClassLineBreak.after.kt"); } @TestMetadata("ClassTypeParam.after.kt") public void testClassTypeParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ClassTypeParam.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ClassTypeParam.after.kt"); } @TestMetadata("ColonSpaces.after.kt") public void testColonSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ColonSpaces.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ColonSpaces.after.kt"); } @TestMetadata("CommentInFunctionLiteral.after.kt") public void testCommentInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CommentInFunctionLiteral.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/CommentInFunctionLiteral.after.kt"); } @TestMetadata("ContinuationIndentInParameterLists.after.kt") public void testContinuationIndentInParameterLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentInParameterLists.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ContinuationIndentInParameterLists.after.kt"); } @TestMetadata("ContinuationIndentInSupertypeLists.after.kt") public void testContinuationIndentInSupertypeLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentInSupertypeLists.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ContinuationIndentInSupertypeLists.after.kt"); } @TestMetadata("CurlyBraceStringInterpolation.after.kt") public void testCurlyBraceStringInterpolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CurlyBraceStringInterpolation.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/CurlyBraceStringInterpolation.after.kt"); } @TestMetadata("DanglingComments.after.kt") public void testDanglingComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DanglingComments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/DanglingComments.after.kt"); } @TestMetadata("DelegationList.after.kt") public void testDelegationList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DelegationList.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/DelegationList.after.kt"); } @TestMetadata("DoWhileLineBreak.after.kt") public void testDoWhileLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DoWhileLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/DoWhileLineBreak.after.kt"); } @TestMetadata("DoWhileSpacing.after.kt") public void testDoWhileSpacing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DoWhileSpacing.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/DoWhileSpacing.after.kt"); } @TestMetadata("DocComments.after.kt") public void testDocComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DocComments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/DocComments.after.kt"); } @TestMetadata("ElseOnNewLine.after.kt") public void testElseOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ElseOnNewLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ElseOnNewLine.after.kt"); } @TestMetadata("Elvis.after.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Elvis.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Elvis.after.kt"); } @TestMetadata("ElvisIndent.after.kt") public void testElvisIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ElvisIndent.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ElvisIndent.after.kt"); } @TestMetadata("ElvisWrap.after.kt") public void testElvisWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ElvisWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ElvisWrap.after.kt"); } @TestMetadata("EmptyLineAfterObjectDeclaration.after.kt") public void testEmptyLineAfterObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineAfterObjectDeclaration.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineAfterObjectDeclaration.after.kt"); } @TestMetadata("EmptyLineAfterPackage.after.kt") public void testEmptyLineAfterPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineAfterPackage.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineAfterPackage.after.kt"); } @TestMetadata("EmptyLineBetweeAbstractFunctions.after.kt") public void testEmptyLineBetweeAbstractFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweeAbstractFunctions.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweeAbstractFunctions.after.kt"); } @TestMetadata("EmptyLineBetweenClassAndFunction.after.kt") public void testEmptyLineBetweenClassAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenClassAndFunction.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenClassAndFunction.after.kt"); } @TestMetadata("EmptyLineBetweenClasses.after.kt") public void testEmptyLineBetweenClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenClasses.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenClasses.after.kt"); } @TestMetadata("EmptyLineBetweenEnumEntries.after.kt") public void testEmptyLineBetweenEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenEnumEntries.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenEnumEntries.after.kt"); } @TestMetadata("EmptyLineBetweenFunAndProperty.after.kt") public void testEmptyLineBetweenFunAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenFunAndProperty.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenFunAndProperty.after.kt"); } @TestMetadata("EmptyLineBetweenFunctions.after.kt") public void testEmptyLineBetweenFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenFunctions.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenFunctions.after.kt"); } @TestMetadata("EmptyLineBetweenProperties.after.kt") public void testEmptyLineBetweenProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenProperties.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenProperties.after.kt"); } @TestMetadata("EnumArguments.after.kt") public void testEnumArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EnumArguments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EnumArguments.after.kt"); } @TestMetadata("EnumWrapping.after.kt") public void testEnumWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EnumWrapping.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/EnumWrapping.after.kt"); } @TestMetadata("ExpressionBodyWrap.after.kt") public void testExpressionBodyWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ExpressionBodyWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ExpressionBodyWrap.after.kt"); } @TestMetadata("ExtendsListWrap.after.kt") public void testExtendsListWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ExtendsListWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ExtendsListWrap.after.kt"); } @TestMetadata("ForLineBreak.after.kt") public void testForLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ForLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ForLineBreak.after.kt"); } @TestMetadata("ForNoBraces.after.kt") public void testForNoBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ForNoBraces.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ForNoBraces.after.kt"); } @TestMetadata("ForSpacing.after.kt") public void testForSpacing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ForSpacing.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ForSpacing.after.kt"); } @TestMetadata("FormatFirstColumnComments.after.kt") public void testFormatFirstColumnComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FormatFirstColumnComments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FormatFirstColumnComments.after.kt"); } @TestMetadata("FormatFirstColumnCommentsBeforeDeclaration.after.kt") public void testFormatFirstColumnCommentsBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.kt"); } @TestMetadata("FunctionCallParametersAlign.after.kt") public void testFunctionCallParametersAlign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionCallParametersAlign.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionCallParametersAlign.after.kt"); } @TestMetadata("FunctionDefParametersAlign.after.kt") public void testFunctionDefParametersAlign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionDefParametersAlign.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionDefParametersAlign.after.kt"); } @TestMetadata("FunctionExpression.after.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionExpression.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionExpression.after.kt"); } @TestMetadata("FunctionLineBreak.after.kt") public void testFunctionLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionLineBreak.after.kt"); } @TestMetadata("FunctionReferenceOperator.after.kt") public void testFunctionReferenceOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionReferenceOperator.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionReferenceOperator.after.kt"); } @TestMetadata("FunctionWithInference.after.kt") public void testFunctionWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionWithInference.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionWithInference.after.kt"); } @TestMetadata("FunctionalType.after.kt") public void testFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionalType.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/FunctionalType.after.kt"); } @TestMetadata("GetterAndSetter.after.kt") public void testGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/GetterAndSetter.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/GetterAndSetter.after.kt"); } @TestMetadata("If.after.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/If.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/If.after.kt"); } @TestMetadata("IfClosingParen.after.kt") public void testIfClosingParen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfClosingParen.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfClosingParen.after.kt"); } @TestMetadata("IfConditionIndent.after.kt") public void testIfConditionIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfConditionIndent.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfConditionIndent.after.kt"); } @TestMetadata("IfElseRemoveLineBreak.after.kt") public void testIfElseRemoveLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfElseRemoveLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfElseRemoveLineBreak.after.kt"); } @TestMetadata("IfElseWithLineBreak.after.kt") public void testIfElseWithLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfElseWithLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfElseWithLineBreak.after.kt"); } @TestMetadata("IfElseWithTrickyComments.after.kt") public void testIfElseWithTrickyComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfElseWithTrickyComments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfElseWithTrickyComments.after.kt"); } @TestMetadata("IfRParen.after.kt") public void testIfRParen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfRParen.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfRParen.after.kt"); } @TestMetadata("IfSpacing.after.kt") public void testIfSpacing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfSpacing.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/IfSpacing.after.kt"); } @TestMetadata("In.after.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/In.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/In.after.kt"); } @TestMetadata("InfixCall.after.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/InfixCall.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/InfixCall.after.kt"); } @TestMetadata("Is.after.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Is.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Is.after.kt"); } @TestMetadata("KDoc.after.kt") public void testKDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KDoc.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/KDoc.after.kt"); } @TestMetadata("KT22230.after.kt") public void testKT22230() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KT22230.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/KT22230.after.kt"); } @TestMetadata("KeepLineBreak.after.kt") public void testKeepLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KeepLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/KeepLineBreak.after.kt"); } @TestMetadata("LabeledExpression.after.kt") public void testLabeledExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LabeledExpression.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/LabeledExpression.after.kt"); } @TestMetadata("LambdaArrow.after.kt") public void testLambdaArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LambdaArrow.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/LambdaArrow.after.kt"); } @TestMetadata("LineBreakBeforeExtendsColon.after.kt") public void testLineBreakBeforeExtendsColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LineBreakBeforeExtendsColon.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/LineBreakBeforeExtendsColon.after.kt"); } @TestMetadata("LineBreakBeforeExtendsColonWrap.after.kt") public void testLineBreakBeforeExtendsColonWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LineBreakBeforeExtendsColonWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/LineBreakBeforeExtendsColonWrap.after.kt"); } @TestMetadata("LocalVariableAnnotationWrap.after.kt") public void testLocalVariableAnnotationWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LocalVariableAnnotationWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/LocalVariableAnnotationWrap.after.kt"); } @TestMetadata("LoopParameterWithExplicitType.after.kt") public void testLoopParameterWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LoopParameterWithExplicitType.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/LoopParameterWithExplicitType.after.kt"); } @TestMetadata("MethodAnnotationWrapping.after.kt") public void testMethodAnnotationWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MethodAnnotationWrapping.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/MethodAnnotationWrapping.after.kt"); } @TestMetadata("MethodCall.after.kt") public void testMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MethodCall.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/MethodCall.after.kt"); } @TestMetadata("MethodLParenthOnNextLine.after.kt") public void testMethodLParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MethodLParenthOnNextLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/MethodLParenthOnNextLine.after.kt"); } @TestMetadata("MethodRParenthOnNextLine.after.kt") public void testMethodRParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MethodRParenthOnNextLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/MethodRParenthOnNextLine.after.kt"); } @TestMetadata("Multideclaration.after.kt") public void testMultideclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Multideclaration.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Multideclaration.after.kt"); } @TestMetadata("MultilineFunctionLiteral.after.kt") public void testMultilineFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MultilineFunctionLiteral.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/MultilineFunctionLiteral.after.kt"); } @TestMetadata("MultilineFunctionLiteralWithParams.after.kt") public void testMultilineFunctionLiteralWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MultilineFunctionLiteralWithParams.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/MultilineFunctionLiteralWithParams.after.kt"); } @TestMetadata("NewLineForRBrace.after.kt") public void testNewLineForRBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/NewLineForRBrace.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/NewLineForRBrace.after.kt"); } @TestMetadata("NotIn.after.kt") public void testNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/NotIn.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/NotIn.after.kt"); } @TestMetadata("NotIs.after.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/NotIs.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/NotIs.after.kt"); } @TestMetadata("NullableType.after.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/NullableType.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/NullableType.after.kt"); } @TestMetadata("ObjectInBody.after.kt") public void testObjectInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ObjectInBody.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ObjectInBody.after.kt"); } @TestMetadata("ParameterAnnotationWrap.after.kt") public void testParameterAnnotationWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ParameterAnnotationWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ParameterAnnotationWrap.after.kt"); } @TestMetadata("ParameterDocComments.after.kt") public void testParameterDocComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ParameterDocComments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ParameterDocComments.after.kt"); } @TestMetadata("Parameters.after.kt") public void testParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Parameters.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Parameters.after.kt"); } @TestMetadata("PrimaryConstructor.after.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PrimaryConstructor.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PrimaryConstructor.after.kt"); } @TestMetadata("PropertyAccessorLineBreak.after.kt") public void testPropertyAccessorLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PropertyAccessorLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PropertyAccessorLineBreak.after.kt"); } @TestMetadata("PropertyAccessors.after.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PropertyAccessors.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PropertyAccessors.after.kt"); } @TestMetadata("PropertyAnnotationWrap.after.kt") public void testPropertyAnnotationWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PropertyAnnotationWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PropertyAnnotationWrap.after.kt"); } @TestMetadata("PropertyInitializerLineBreak.after.kt") public void testPropertyInitializerLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PropertyInitializerLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PropertyInitializerLineBreak.after.kt"); } @TestMetadata("PropertyTypeParameterList.after.kt") public void testPropertyTypeParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PropertyTypeParameterList.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PropertyTypeParameterList.after.kt"); } @TestMetadata("PropertyWithInference.after.kt") public void testPropertyWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/PropertyWithInference.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/PropertyWithInference.after.kt"); } @TestMetadata("ReferenceExpressionFunctionLiteral.after.kt") public void testReferenceExpressionFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ReferenceExpressionFunctionLiteral.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ReferenceExpressionFunctionLiteral.after.kt"); } @TestMetadata("RemoveSpacesAroundOperations.after.kt") public void testRemoveSpacesAroundOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/RemoveSpacesAroundOperations.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/RemoveSpacesAroundOperations.after.kt"); } @TestMetadata("ReturnExpression.after.kt") public void testReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ReturnExpression.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ReturnExpression.after.kt"); } @TestMetadata("RightBracketOnNewLine.after.kt") public void testRightBracketOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/RightBracketOnNewLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/RightBracketOnNewLine.after.kt"); } @TestMetadata("SaveSpacesInDocComments.after.kt") public void testSaveSpacesInDocComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SaveSpacesInDocComments.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SaveSpacesInDocComments.after.kt"); } @TestMetadata("Script.after.kts") public void testScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Script.after.kts"); - doTest(fileName); + runTest("idea/testData/formatter/Script.after.kts"); } @TestMetadata("SecondaryConstructors.after.kt") public void testSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SecondaryConstructors.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SecondaryConstructors.after.kt"); } @TestMetadata("secondaryCtorLineBreak.after.kt") public void testSecondaryCtorLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/secondaryCtorLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/secondaryCtorLineBreak.after.kt"); } @TestMetadata("Semicolon.after.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Semicolon.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/Semicolon.after.kt"); } @TestMetadata("SingleLineFunctionLiteral.after.kt") public void testSingleLineFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SingleLineFunctionLiteral.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SingleLineFunctionLiteral.after.kt"); } @TestMetadata("SpaceAroundDotInUserReference.after.kt") public void testSpaceAroundDotInUserReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundDotInUserReference.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceAroundDotInUserReference.after.kt"); } @TestMetadata("SpaceAroundExtendColon.after.kt") public void testSpaceAroundExtendColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundExtendColon.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceAroundExtendColon.after.kt"); } @TestMetadata("SpaceAroundExtendColonInObjects.after.kt") public void testSpaceAroundExtendColonInObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundExtendColonInObjects.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceAroundExtendColonInObjects.after.kt"); } @TestMetadata("SpaceAroundExtendColonInSecondaryCtr.after.kt") public void testSpaceAroundExtendColonInSecondaryCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundExtendColonInSecondaryCtr.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceAroundExtendColonInSecondaryCtr.after.kt"); } @TestMetadata("SpaceBeforeCatchParentheses.after.kt") public void testSpaceBeforeCatchParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeCatchParentheses.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeCatchParentheses.after.kt"); } @TestMetadata("SpaceBeforeForParentheses.after.kt") public void testSpaceBeforeForParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeForParentheses.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeForParentheses.after.kt"); } @TestMetadata("SpaceBeforeFunctionLiteral.after.kt") public void testSpaceBeforeFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeFunctionLiteral.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeFunctionLiteral.after.kt"); } @TestMetadata("SpaceBeforeIfParentheses.after.kt") public void testSpaceBeforeIfParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeIfParentheses.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeIfParentheses.after.kt"); } @TestMetadata("SpaceBeforeIndices.after.kt") public void testSpaceBeforeIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeIndices.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeIndices.after.kt"); } @TestMetadata("SpaceBeforeTypeArgumentList.after.kt") public void testSpaceBeforeTypeArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeTypeArgumentList.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeTypeArgumentList.after.kt"); } @TestMetadata("SpaceBeforeWhenParentheses.after.kt") public void testSpaceBeforeWhenParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeWhenParentheses.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeWhenParentheses.after.kt"); } @TestMetadata("SpaceBeforeWhileParentheses.after.kt") public void testSpaceBeforeWhileParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeWhileParentheses.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpaceBeforeWhileParentheses.after.kt"); } @TestMetadata("SpacedInsideParans.after.kt") public void testSpacedInsideParans() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacedInsideParans.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpacedInsideParans.after.kt"); } @TestMetadata("SpacesAroundOperations.after.kt") public void testSpacesAroundOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacesAroundOperations.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpacesAroundOperations.after.kt"); } @TestMetadata("SpacesAroundUnaryOperations.after.kt") public void testSpacesAroundUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacesAroundUnaryOperations.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpacesAroundUnaryOperations.after.kt"); } @TestMetadata("SpacesInDeclarations.after.kt") public void testSpacesInDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacesInDeclarations.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpacesInDeclarations.after.kt"); } @TestMetadata("SpacesInQualifiedExpressions.after.kt") public void testSpacesInQualifiedExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacesInQualifiedExpressions.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SpacesInQualifiedExpressions.after.kt"); } @TestMetadata("SuperListIndent.after.kt") public void testSuperListIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SuperListIndent.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/SuperListIndent.after.kt"); } @TestMetadata("TryCatchLineBreak.after.kt") public void testTryCatchLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/TryCatchLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/TryCatchLineBreak.after.kt"); } @TestMetadata("TypeAliasSpacing.after.kt") public void testTypeAliasSpacing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/TypeAliasSpacing.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/TypeAliasSpacing.after.kt"); } @TestMetadata("UnnecessarySpacesInParametersLists.after.kt") public void testUnnecessarySpacesInParametersLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/UnnecessarySpacesInParametersLists.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/UnnecessarySpacesInParametersLists.after.kt"); } @TestMetadata("ValVarSpaces.after.kt") public void testValVarSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ValVarSpaces.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/ValVarSpaces.after.kt"); } @TestMetadata("When.after.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/When.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/When.after.kt"); } @TestMetadata("WhenArrow.after.kt") public void testWhenArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenArrow.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhenArrow.after.kt"); } @TestMetadata("WhenBlockBlankLines.after.kt") public void testWhenBlockBlankLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenBlockBlankLines.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhenBlockBlankLines.after.kt"); } @TestMetadata("WhenEntryExpr.after.kt") public void testWhenEntryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenEntryExpr.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhenEntryExpr.after.kt"); } @TestMetadata("WhenLineBreak.after.kt") public void testWhenLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhenLineBreak.after.kt"); } @TestMetadata("WhenLinesBeforeLbrace.after.kt") public void testWhenLinesBeforeLbrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenLinesBeforeLbrace.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhenLinesBeforeLbrace.after.kt"); } @TestMetadata("WhereClause.after.kt") public void testWhereClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhereClause.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhereClause.after.kt"); } @TestMetadata("WhileLineBreak.after.kt") public void testWhileLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhileLineBreak.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhileLineBreak.after.kt"); } @TestMetadata("WhileOnNewLine.after.kt") public void testWhileOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhileOnNewLine.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhileOnNewLine.after.kt"); } @TestMetadata("WhileSpacing.after.kt") public void testWhileSpacing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhileSpacing.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/WhileSpacing.after.kt"); } @TestMetadata("idea/testData/formatter/callChain") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallChain extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallChain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/callChain"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("CallChainWrapping.after.kt") public void testCallChainWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/CallChainWrapping.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/CallChainWrapping.after.kt"); } @TestMetadata("ConsecutiveCalls.after.kt") public void testConsecutiveCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ConsecutiveCalls.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/ConsecutiveCalls.after.kt"); } @TestMetadata("ConsecutiveSafeCallsIndent.after.kt") public void testConsecutiveSafeCallsIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.kt"); } @TestMetadata("ContinuationIndentForChainedCalls.after.kt") public void testContinuationIndentForChainedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.kt"); } @TestMetadata("FunctionLiteralsInChainCalls.after.kt") public void testFunctionLiteralsInChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.kt"); } @TestMetadata("KT15099.after.kt") public void testKT15099() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT15099.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/KT15099.after.kt"); } @TestMetadata("KT20362.after.kt") public void testKT20362() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT20362.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/KT20362.after.kt"); } @TestMetadata("KT22071.after.kt") public void testKT22071() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22071.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/KT22071.after.kt"); } @TestMetadata("KT22115.after.kt") public void testKT22115() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22115.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/KT22115.after.kt"); } @TestMetadata("KT22148.after.kt") public void testKT22148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22148.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/KT22148.after.kt"); } @TestMetadata("KT22346.after.kt") public void testKT22346() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/KT22346.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/callChain/KT22346.after.kt"); } } @@ -1000,10 +848,13 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FileAnnotations extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterComment.after.kt") public void testAfterComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/fileAnnotations/afterComment.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/fileAnnotations/afterComment.after.kt"); } public void testAllFilesPresentInFileAnnotations() throws Exception { @@ -1012,32 +863,27 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestMetadata("beforeDeclaration.after.kt") public void testBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/fileAnnotations/beforeDeclaration.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/fileAnnotations/beforeDeclaration.after.kt"); } @TestMetadata("beforeImportList.after.kt") public void testBeforeImportList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/fileAnnotations/beforeImportList.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/fileAnnotations/beforeImportList.after.kt"); } @TestMetadata("beforePackage.after.kt") public void testBeforePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/fileAnnotations/beforePackage.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/fileAnnotations/beforePackage.after.kt"); } @TestMetadata("inEmptyFile.after.kt") public void testInEmptyFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/fileAnnotations/inEmptyFile.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/fileAnnotations/inEmptyFile.after.kt"); } @TestMetadata("manyLinesFromFileBegin.after.kt") public void testManyLinesFromFileBegin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/fileAnnotations/manyLinesFromFileBegin.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/fileAnnotations/manyLinesFromFileBegin.after.kt"); } } @@ -1045,104 +891,92 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ModifierList extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModifierList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/modifierList"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("funAnnotationBeforeAnnotation.after.kt") public void testFunAnnotationBeforeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotation.after.kt"); } @TestMetadata("funAnnotationBeforeAnnotationEntry.after.kt") public void testFunAnnotationBeforeAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funAnnotationBeforeAnnotationEntry.after.kt"); } @TestMetadata("funAnnotationBeforeModifiers.after.kt") public void testFunAnnotationBeforeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funAnnotationBeforeModifiers.after.kt"); } @TestMetadata("funAnnotationEntryBeforeAnnotation.after.kt") public void testFunAnnotationEntryBeforeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotation.after.kt"); } @TestMetadata("funAnnotationEntryBeforeAnnotationEntry.after.kt") public void testFunAnnotationEntryBeforeAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotationEntry.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeAnnotationEntry.after.kt"); } @TestMetadata("funAnnotationEntryBeforeModifiers.after.kt") public void testFunAnnotationEntryBeforeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funAnnotationEntryBeforeModifiers.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funAnnotationEntryBeforeModifiers.after.kt"); } @TestMetadata("funModifierBeforeAnnotation.after.kt") public void testFunModifierBeforeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotation.after.kt"); } @TestMetadata("funModifierBeforeAnnotationEntry.after.kt") public void testFunModifierBeforeAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funModifierBeforeAnnotationEntry.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funModifierBeforeAnnotationEntry.after.kt"); } @TestMetadata("funModifierBeforeModifiers.after.kt") public void testFunModifierBeforeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funModifierBeforeModifiers.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funModifierBeforeModifiers.after.kt"); } @TestMetadata("funTheOnlyModifier.after.kt") public void testFunTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/funTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/funTheOnlyModifier.after.kt"); } @TestMetadata("memberFunTheOnlyModifier.after.kt") public void testMemberFunTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/memberFunTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/memberFunTheOnlyModifier.after.kt"); } @TestMetadata("memberValTheOnlyModifier.after.kt") public void testMemberValTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/memberValTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/memberValTheOnlyModifier.after.kt"); } @TestMetadata("memberVarTheOnlyModifier.after.kt") public void testMemberVarTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/memberVarTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/memberVarTheOnlyModifier.after.kt"); } @TestMetadata("secondMemberFunTheOnlyModifier.after.kt") public void testSecondMemberFunTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/secondMemberFunTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/secondMemberFunTheOnlyModifier.after.kt"); } @TestMetadata("secondMemberValTheOnlyModifier.after.kt") public void testSecondMemberValTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/secondMemberValTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/secondMemberValTheOnlyModifier.after.kt"); } @TestMetadata("secondMemberVarTheOnlyModifier.after.kt") public void testSecondMemberVarTheOnlyModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/modifierList/secondMemberVarTheOnlyModifier.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/modifierList/secondMemberVarTheOnlyModifier.after.kt"); } } @@ -1150,74 +984,67 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterList extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/parameterList"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("ArgumentListChopAsNeeded.after.kt") public void testArgumentListChopAsNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ArgumentListChopAsNeeded.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ArgumentListChopAsNeeded.after.kt"); } @TestMetadata("ArgumentListDoNotWrap.after.kt") public void testArgumentListDoNotWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ArgumentListDoNotWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ArgumentListDoNotWrap.after.kt"); } @TestMetadata("ArgumentListWrapAlways.after.kt") public void testArgumentListWrapAlways() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ArgumentListWrapAlways.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ArgumentListWrapAlways.after.kt"); } @TestMetadata("ArgumentListWrapAsNeeded.after.kt") public void testArgumentListWrapAsNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ArgumentListWrapAsNeeded.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ArgumentListWrapAsNeeded.after.kt"); } @TestMetadata("ArgumentListWrapLParen.after.kt") public void testArgumentListWrapLParen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ArgumentListWrapLParen.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ArgumentListWrapLParen.after.kt"); } @TestMetadata("DefaultParameterValues.after.kt") public void testDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/DefaultParameterValues.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/DefaultParameterValues.after.kt"); } @TestMetadata("KT19727.after.kt") public void testKT19727() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/KT19727.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/KT19727.after.kt"); } @TestMetadata("ParameterListChopAsNeeded.after.kt") public void testParameterListChopAsNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ParameterListChopAsNeeded.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ParameterListChopAsNeeded.after.kt"); } @TestMetadata("ParameterListDoNotWrap.after.kt") public void testParameterListDoNotWrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ParameterListDoNotWrap.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ParameterListDoNotWrap.after.kt"); } @TestMetadata("ParameterListWrapAlways.after.kt") public void testParameterListWrapAlways() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ParameterListWrapAlways.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ParameterListWrapAlways.after.kt"); } @TestMetadata("ParameterListWrapAsNeeded.after.kt") public void testParameterListWrapAsNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/ParameterListWrapAsNeeded.after.kt"); - doTest(fileName); + runTest("idea/testData/formatter/parameterList/ParameterListWrapAsNeeded.after.kt"); } } } @@ -1226,328 +1053,310 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FormatterInverted extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestInverted, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFormatterInverted() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousInitializersLineBreak.after.inv.kt") public void testAnonymousInitializersLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/AnonymousInitializersLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/AnonymousInitializersLineBreak.after.inv.kt"); } @TestMetadata("BinaryExpressions.after.inv.kt") public void testBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressions.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/BinaryExpressions.after.inv.kt"); } @TestMetadata("BinaryExpressionsBoolean.after.inv.kt") public void testBinaryExpressionsBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressionsBoolean.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/BinaryExpressionsBoolean.after.inv.kt"); } @TestMetadata("BinaryExpressionsWithoutAlignment.after.inv.kt") public void testBinaryExpressionsWithoutAlignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/BinaryExpressionsWithoutAlignment.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/BinaryExpressionsWithoutAlignment.after.inv.kt"); } @TestMetadata("CallLParenthOnNextLine.after.inv.kt") public void testCallLParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallLParenthOnNextLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/CallLParenthOnNextLine.after.inv.kt"); } @TestMetadata("CallRParenthOnNextLine.after.inv.kt") public void testCallRParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CallRParenthOnNextLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/CallRParenthOnNextLine.after.inv.kt"); } @TestMetadata("CatchFinallyOnNewLine.after.inv.kt") public void testCatchFinallyOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/CatchFinallyOnNewLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/CatchFinallyOnNewLine.after.inv.kt"); } @TestMetadata("ClassLineBreak.after.inv.kt") public void testClassLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ClassLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/ClassLineBreak.after.inv.kt"); } @TestMetadata("ColonSpaces.after.inv.kt") public void testColonSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ColonSpaces.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/ColonSpaces.after.inv.kt"); } @TestMetadata("ContinuationIndentForExpressionBodies.after.inv.kt") public void testContinuationIndentForExpressionBodies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ContinuationIndentForExpressionBodies.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/ContinuationIndentForExpressionBodies.after.inv.kt"); } @TestMetadata("DelegationList.after.inv.kt") public void testDelegationList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DelegationList.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/DelegationList.after.inv.kt"); } @TestMetadata("DoWhileLineBreak.after.inv.kt") public void testDoWhileLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/DoWhileLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/DoWhileLineBreak.after.inv.kt"); } @TestMetadata("ElseOnNewLine.after.inv.kt") public void testElseOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ElseOnNewLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/ElseOnNewLine.after.inv.kt"); } @TestMetadata("Elvis.after.inv.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Elvis.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/Elvis.after.inv.kt"); } @TestMetadata("EmptyBlocks.after.inv.kt") public void testEmptyBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyBlocks.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/EmptyBlocks.after.inv.kt"); } @TestMetadata("EmptyLineBetweenEnumEntries.after.inv.kt") public void testEmptyLineBetweenEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/EmptyLineBetweenEnumEntries.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/EmptyLineBetweenEnumEntries.after.inv.kt"); } @TestMetadata("ForLineBreak.after.inv.kt") public void testForLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/ForLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/ForLineBreak.after.inv.kt"); } @TestMetadata("FormatFirstColumnComments.after.inv.kt") public void testFormatFirstColumnComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FormatFirstColumnComments.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/FormatFirstColumnComments.after.inv.kt"); } @TestMetadata("FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt") public void testFormatFirstColumnCommentsBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/FormatFirstColumnCommentsBeforeDeclaration.after.inv.kt"); } @TestMetadata("FunctionLineBreak.after.inv.kt") public void testFunctionLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/FunctionLineBreak.after.inv.kt"); } @TestMetadata("FunctionalType.after.inv.kt") public void testFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/FunctionalType.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/FunctionalType.after.inv.kt"); } @TestMetadata("IfConditionIndent.after.inv.kt") public void testIfConditionIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfConditionIndent.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/IfConditionIndent.after.inv.kt"); } @TestMetadata("IfElseWithTrickyComments.after.inv.kt") public void testIfElseWithTrickyComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/IfElseWithTrickyComments.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/IfElseWithTrickyComments.after.inv.kt"); } @TestMetadata("KeepLineBreak.after.inv.kt") public void testKeepLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/KeepLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/KeepLineBreak.after.inv.kt"); } @TestMetadata("LambdaArrow.after.inv.kt") public void testLambdaArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/LambdaArrow.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/LambdaArrow.after.inv.kt"); } @TestMetadata("MethodLParenthOnNextLine.after.inv.kt") public void testMethodLParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MethodLParenthOnNextLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/MethodLParenthOnNextLine.after.inv.kt"); } @TestMetadata("MethodRParenthOnNextLine.after.inv.kt") public void testMethodRParenthOnNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MethodRParenthOnNextLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/MethodRParenthOnNextLine.after.inv.kt"); } @TestMetadata("MultilineFunctionLiteralWithParams.after.inv.kt") public void testMultilineFunctionLiteralWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/MultilineFunctionLiteralWithParams.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/MultilineFunctionLiteralWithParams.after.inv.kt"); } @TestMetadata("Parameters.after.inv.kt") public void testParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/Parameters.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/Parameters.after.inv.kt"); } @TestMetadata("RightBracketOnNewLine.after.inv.kt") public void testRightBracketOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/RightBracketOnNewLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/RightBracketOnNewLine.after.inv.kt"); } @TestMetadata("secondaryCtorLineBreak.after.inv.kt") public void testSecondaryCtorLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/secondaryCtorLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/secondaryCtorLineBreak.after.inv.kt"); } @TestMetadata("SingleLineFunctionLiteral.after.inv.kt") public void testSingleLineFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SingleLineFunctionLiteral.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SingleLineFunctionLiteral.after.inv.kt"); } @TestMetadata("SpaceAroundExtendColon.after.inv.kt") public void testSpaceAroundExtendColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundExtendColon.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceAroundExtendColon.after.inv.kt"); } @TestMetadata("SpaceAroundExtendColonInObjects.after.inv.kt") public void testSpaceAroundExtendColonInObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundExtendColonInObjects.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceAroundExtendColonInObjects.after.inv.kt"); } @TestMetadata("SpaceAroundExtendColonInSecondaryCtr.after.inv.kt") public void testSpaceAroundExtendColonInSecondaryCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceAroundExtendColonInSecondaryCtr.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceAroundExtendColonInSecondaryCtr.after.inv.kt"); } @TestMetadata("SpaceBeforeCatchParentheses.after.inv.kt") public void testSpaceBeforeCatchParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeCatchParentheses.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceBeforeCatchParentheses.after.inv.kt"); } @TestMetadata("SpaceBeforeForParentheses.after.inv.kt") public void testSpaceBeforeForParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeForParentheses.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceBeforeForParentheses.after.inv.kt"); } @TestMetadata("SpaceBeforeIfParentheses.after.inv.kt") public void testSpaceBeforeIfParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeIfParentheses.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceBeforeIfParentheses.after.inv.kt"); } @TestMetadata("SpaceBeforeWhenParentheses.after.inv.kt") public void testSpaceBeforeWhenParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeWhenParentheses.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceBeforeWhenParentheses.after.inv.kt"); } @TestMetadata("SpaceBeforeWhileParentheses.after.inv.kt") public void testSpaceBeforeWhileParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpaceBeforeWhileParentheses.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpaceBeforeWhileParentheses.after.inv.kt"); } @TestMetadata("SpacesAroundOperations.after.inv.kt") public void testSpacesAroundOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacesAroundOperations.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpacesAroundOperations.after.inv.kt"); } @TestMetadata("SpacesAroundUnaryOperations.after.inv.kt") public void testSpacesAroundUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/SpacesAroundUnaryOperations.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/SpacesAroundUnaryOperations.after.inv.kt"); } @TestMetadata("TryCatchLineBreak.after.inv.kt") public void testTryCatchLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/TryCatchLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/TryCatchLineBreak.after.inv.kt"); } @TestMetadata("When.after.inv.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/When.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/When.after.inv.kt"); } @TestMetadata("WhenArrow.after.inv.kt") public void testWhenArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenArrow.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/WhenArrow.after.inv.kt"); } @TestMetadata("WhenLineBreak.after.inv.kt") public void testWhenLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhenLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/WhenLineBreak.after.inv.kt"); } @TestMetadata("WhileLineBreak.after.inv.kt") public void testWhileLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhileLineBreak.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/WhileLineBreak.after.inv.kt"); } @TestMetadata("WhileOnNewLine.after.inv.kt") public void testWhileOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/WhileOnNewLine.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/WhileOnNewLine.after.inv.kt"); } @TestMetadata("idea/testData/formatter/callChain") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallChain extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestInverted, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallChain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/callChain"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("CallChainWrapping.after.inv.kt") public void testCallChainWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/CallChainWrapping.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/callChain/CallChainWrapping.after.inv.kt"); } @TestMetadata("ConsecutiveSafeCallsIndent.after.inv.kt") public void testConsecutiveSafeCallsIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/callChain/ConsecutiveSafeCallsIndent.after.inv.kt"); } @TestMetadata("ContinuationIndentForChainedCalls.after.inv.kt") public void testContinuationIndentForChainedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/callChain/ContinuationIndentForChainedCalls.after.inv.kt"); } @TestMetadata("FunctionLiteralsInChainCalls.after.inv.kt") public void testFunctionLiteralsInChainCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/callChain/FunctionLiteralsInChainCalls.after.inv.kt"); + } + } + + @TestMetadata("idea/testData/formatter/fileAnnotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FileAnnotations extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestInverted, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFileAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/fileAnnotations"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/formatter/modifierList") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ModifierList extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestInverted, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModifierList() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/modifierList"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); } } @@ -1555,14 +1364,17 @@ public class FormatterTestGenerated extends AbstractFormatterTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterList extends AbstractFormatterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestInverted, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/formatter/parameterList"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("DefaultParameterValues.after.inv.kt") public void testDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/formatter/parameterList/DefaultParameterValues.after.inv.kt"); - doTestInverted(fileName); + runTest("idea/testData/formatter/parameterList/DefaultParameterValues.after.inv.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/formatter/TypingIndentationTestBaseGenerated.java b/idea/tests/org/jetbrains/kotlin/formatter/TypingIndentationTestBaseGenerated.java index 1e07c09f4dc..51ea9f46e58 100644 --- a/idea/tests/org/jetbrains/kotlin/formatter/TypingIndentationTestBaseGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/formatter/TypingIndentationTestBaseGenerated.java @@ -23,34 +23,33 @@ public class TypingIndentationTestBaseGenerated extends AbstractTypingIndentatio @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DirectSettings extends AbstractTypingIndentationTestBase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doNewlineTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AfterCatch.after.kt") public void testAfterCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterCatch.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/AfterCatch.after.kt"); } @TestMetadata("AfterClassNameBeforeFun.after.kt") public void testAfterClassNameBeforeFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterClassNameBeforeFun.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/AfterClassNameBeforeFun.after.kt"); } @TestMetadata("AfterFinally.after.kt") public void testAfterFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterFinally.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/AfterFinally.after.kt"); } @TestMetadata("AfterImport.after.kt") public void testAfterImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterImport.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/AfterImport.after.kt"); } @TestMetadata("AfterTry.after.kt") public void testAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AfterTry.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/AfterTry.after.kt"); } public void testAllFilesPresentInDirectSettings() throws Exception { @@ -59,298 +58,254 @@ public class TypingIndentationTestBaseGenerated extends AbstractTypingIndentatio @TestMetadata("Annotation.after.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/Annotation.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/Annotation.after.kt"); } @TestMetadata("ArgumentListNormalIndent.after.kt") public void testArgumentListNormalIndent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ArgumentListNormalIndent.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/ArgumentListNormalIndent.after.kt"); } @TestMetadata("AssignmentAfterEq.after.kt") public void testAssignmentAfterEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AssignmentAfterEq.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/AssignmentAfterEq.after.kt"); } @TestMetadata("BinaryWithTypeExpressions.after.kt") public void testBinaryWithTypeExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.kt"); } @TestMetadata("ConsecutiveCallsAfterDot.after.kt") public void testConsecutiveCallsAfterDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsAfterDot.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/ConsecutiveCallsAfterDot.after.kt"); } @TestMetadata("ConsecutiveCallsInSaeCallsMiddle.after.kt") public void testConsecutiveCallsInSaeCallsMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsInSaeCallsMiddle.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/ConsecutiveCallsInSaeCallsMiddle.after.kt"); } @TestMetadata("ConsecutiveCallsInSafeCallsEnd.after.kt") public void testConsecutiveCallsInSafeCallsEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ConsecutiveCallsInSafeCallsEnd.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/ConsecutiveCallsInSafeCallsEnd.after.kt"); } @TestMetadata("DoInFun.after.kt") public void testDoInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/DoInFun.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/DoInFun.after.kt"); } @TestMetadata("EmptyParameters.after.kt") public void testEmptyParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/EmptyParameters.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/EmptyParameters.after.kt"); } @TestMetadata("For.after.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/For.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/For.after.kt"); } @TestMetadata("FunctionBlock.after.kt") public void testFunctionBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/FunctionBlock.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/FunctionBlock.after.kt"); } @TestMetadata("FunctionWithInference.after.kt") public void testFunctionWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/FunctionWithInference.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/FunctionWithInference.after.kt"); } @TestMetadata("If.after.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/If.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/If.after.kt"); } @TestMetadata("InBinaryExpressionInMiddle.after.kt") public void testInBinaryExpressionInMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.kt"); } @TestMetadata("InBinaryExpressionUnfinished.after.kt") public void testInBinaryExpressionUnfinished() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.kt"); } @TestMetadata("InBinaryExpressionUnfinishedInIf.after.kt") public void testInBinaryExpressionUnfinishedInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinishedInIf.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionUnfinishedInIf.after.kt"); } @TestMetadata("InBinaryExpressionsBeforeCloseParenthesis.after.kt") public void testInBinaryExpressionsBeforeCloseParenthesis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.kt"); } @TestMetadata("InDelegationListAfterColon.after.kt") public void testInDelegationListAfterColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.kt"); } @TestMetadata("InDelegationListAfterComma.after.kt") public void testInDelegationListAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.kt"); } @TestMetadata("InDelegationListNotEmpty.after.kt") public void testInDelegationListNotEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.kt"); } @TestMetadata("InEnumAfterSemicolon.after.kt") public void testInEnumAfterSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.kt"); } @TestMetadata("InEnumInitializerListAfterComma.after.kt") public void testInEnumInitializerListAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.kt"); } @TestMetadata("InEnumInitializerListNotEmpty.after.kt") public void testInEnumInitializerListNotEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.kt"); } @TestMetadata("InExpressionsParentheses.after.kt") public void testInExpressionsParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParentheses.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InExpressionsParentheses.after.kt"); } @TestMetadata("InExpressionsParenthesesBeforeOperand.after.kt") public void testInExpressionsParenthesesBeforeOperand() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.kt"); } @TestMetadata("InLabmdaAfterArrow.after.kt") public void testInLabmdaAfterArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLabmdaAfterArrow.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLabmdaAfterArrow.after.kt"); } @TestMetadata("InLambdaAfterArrowWithSpaces.after.kt") public void testInLambdaAfterArrowWithSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaAfterArrowWithSpaces.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLambdaAfterArrowWithSpaces.after.kt"); } @TestMetadata("InLambdaBeforeParams.after.kt") public void testInLambdaBeforeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaBeforeParams.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLambdaBeforeParams.after.kt"); } @TestMetadata("InLambdaInsideChainCallSameLine.after.kt") public void testInLambdaInsideChainCallSameLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLine.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLine.after.kt"); } @TestMetadata("InLambdaInsideChainCallSameLineWithSpaces.after.kt") public void testInLambdaInsideChainCallSameLineWithSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLineWithSpaces.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLambdaInsideChainCallSameLineWithSpaces.after.kt"); } @TestMetadata("InLambdaInsideChainCallWithNewLine.after.kt") public void testInLambdaInsideChainCallWithNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLine.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLine.after.kt"); } @TestMetadata("InLambdaInsideChainCallWithNewLineWithSpaces.after.kt") public void testInLambdaInsideChainCallWithNewLineWithSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLineWithSpaces.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InLambdaInsideChainCallWithNewLineWithSpaces.after.kt"); } @TestMetadata("InMultilineLambdaAfterArrow.after.kt") public void testInMultilineLambdaAfterArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InMultilineLambdaAfterArrow.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/InMultilineLambdaAfterArrow.after.kt"); } @TestMetadata("IsExpressionAfterIs.after.kt") public void testIsExpressionAfterIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.kt"); } @TestMetadata("KT20783.after.kt") public void testKT20783() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/KT20783.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/KT20783.after.kt"); } @TestMetadata("MultideclarationAfterEq.after.kt") public void testMultideclarationAfterEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/MultideclarationAfterEq.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/MultideclarationAfterEq.after.kt"); } @TestMetadata("MultideclarationBeforeEq.after.kt") public void testMultideclarationBeforeEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/MultideclarationBeforeEq.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/MultideclarationBeforeEq.after.kt"); } @TestMetadata("NotFirstParameter.after.kt") public void testNotFirstParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/NotFirstParameter.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/NotFirstParameter.after.kt"); } @TestMetadata("PropertyWithInference.after.kt") public void testPropertyWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/PropertyWithInference.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/PropertyWithInference.after.kt"); } @TestMetadata("ReturnContinue.after.kt") public void testReturnContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/ReturnContinue.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/ReturnContinue.after.kt"); } @TestMetadata("SettingAlignMultilineParametersInCalls.after.kt") public void testSettingAlignMultilineParametersInCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.kt"); } @TestMetadata("While.after.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/While.after.kt"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/While.after.kt"); } @TestMetadata("idea/testData/indentationOnNewline/script") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractTypingIndentationTestBase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doNewlineTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline/script"), Pattern.compile("^([^\\.]+)\\.after\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("ScriptAfterClosingBrace.after.kts") public void testScriptAfterClosingBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterClosingBrace.after.kts"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/script/ScriptAfterClosingBrace.after.kts"); } @TestMetadata("ScriptAfterExpression.after.kts") public void testScriptAfterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterExpression.after.kts"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/script/ScriptAfterExpression.after.kts"); } @TestMetadata("ScriptAfterFun.after.kts") public void testScriptAfterFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterFun.after.kts"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/script/ScriptAfterFun.after.kts"); } @TestMetadata("ScriptAfterImport.after.kts") public void testScriptAfterImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptAfterImport.after.kts"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/script/ScriptAfterImport.after.kts"); } @TestMetadata("ScriptBetweenFunctionCalls.after.kts") public void testScriptBetweenFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptBetweenFunctionCalls.after.kts"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/script/ScriptBetweenFunctionCalls.after.kts"); } @TestMetadata("ScriptInsideFun.after.kts") public void testScriptInsideFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/script/ScriptInsideFun.after.kts"); - doNewlineTest(fileName); + runTest("idea/testData/indentationOnNewline/script/ScriptInsideFun.after.kts"); } } } @@ -359,104 +314,105 @@ public class TypingIndentationTestBaseGenerated extends AbstractTypingIndentatio @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InvertedSettings extends AbstractTypingIndentationTestBase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doNewlineTestWithInvert, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvertedSettings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); } @TestMetadata("AssignmentAfterEq.after.inv.kt") public void testAssignmentAfterEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/AssignmentAfterEq.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/AssignmentAfterEq.after.inv.kt"); } @TestMetadata("BinaryWithTypeExpressions.after.inv.kt") public void testBinaryWithTypeExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/BinaryWithTypeExpressions.after.inv.kt"); } @TestMetadata("InBinaryExpressionInMiddle.after.inv.kt") public void testInBinaryExpressionInMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionInMiddle.after.inv.kt"); } @TestMetadata("InBinaryExpressionUnfinished.after.inv.kt") public void testInBinaryExpressionUnfinished() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionUnfinished.after.inv.kt"); } @TestMetadata("InBinaryExpressionUnfinishedInIf.after.inv.kt") public void testInBinaryExpressionUnfinishedInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionUnfinishedInIf.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionUnfinishedInIf.after.inv.kt"); } @TestMetadata("InBinaryExpressionsBeforeCloseParenthesis.after.inv.kt") public void testInBinaryExpressionsBeforeCloseParenthesis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InBinaryExpressionsBeforeCloseParenthesis.after.inv.kt"); } @TestMetadata("InDelegationListAfterColon.after.inv.kt") public void testInDelegationListAfterColon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InDelegationListAfterColon.after.inv.kt"); } @TestMetadata("InDelegationListAfterComma.after.inv.kt") public void testInDelegationListAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InDelegationListAfterComma.after.inv.kt"); } @TestMetadata("InDelegationListNotEmpty.after.inv.kt") public void testInDelegationListNotEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InDelegationListNotEmpty.after.inv.kt"); } @TestMetadata("InEnumAfterSemicolon.after.inv.kt") public void testInEnumAfterSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InEnumAfterSemicolon.after.inv.kt"); } @TestMetadata("InEnumInitializerListAfterComma.after.inv.kt") public void testInEnumInitializerListAfterComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InEnumInitializerListAfterComma.after.inv.kt"); } @TestMetadata("InEnumInitializerListNotEmpty.after.inv.kt") public void testInEnumInitializerListNotEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InEnumInitializerListNotEmpty.after.inv.kt"); } @TestMetadata("InExpressionsParentheses.after.inv.kt") public void testInExpressionsParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParentheses.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InExpressionsParentheses.after.inv.kt"); } @TestMetadata("InExpressionsParenthesesBeforeOperand.after.inv.kt") public void testInExpressionsParenthesesBeforeOperand() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/InExpressionsParenthesesBeforeOperand.after.inv.kt"); } @TestMetadata("IsExpressionAfterIs.after.inv.kt") public void testIsExpressionAfterIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/IsExpressionAfterIs.after.inv.kt"); } @TestMetadata("SettingAlignMultilineParametersInCalls.after.inv.kt") public void testSettingAlignMultilineParametersInCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.inv.kt"); - doNewlineTestWithInvert(fileName); + runTest("idea/testData/indentationOnNewline/SettingAlignMultilineParametersInCalls.after.inv.kt"); + } + + @TestMetadata("idea/testData/indentationOnNewline/script") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Script extends AbstractTypingIndentationTestBase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doNewlineTestWithInvert, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInScript() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/indentationOnNewline/script"), Pattern.compile("^([^\\.]+)\\.after\\.inv\\.kt.*$"), TargetBackend.ANY, true); + } } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/ExpressionSelectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/ExpressionSelectionTestGenerated.java index c465219623a..e6989a6856f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/ExpressionSelectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/ExpressionSelectionTestGenerated.java @@ -21,31 +21,31 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ExpressionSelectionTestGenerated extends AbstractExpressionSelectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpressionSelection, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressionSelection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/expressionSelection"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("binaryExpr.kt") public void testBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/expressionSelection/binaryExpr.kt"); - doTestExpressionSelection(fileName); + runTest("idea/testData/expressionSelection/binaryExpr.kt"); } @TestMetadata("labelledStatement.kt") public void testLabelledStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/expressionSelection/labelledStatement.kt"); - doTestExpressionSelection(fileName); + runTest("idea/testData/expressionSelection/labelledStatement.kt"); } @TestMetadata("labelledThis.kt") public void testLabelledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/expressionSelection/labelledThis.kt"); - doTestExpressionSelection(fileName); + runTest("idea/testData/expressionSelection/labelledThis.kt"); } @TestMetadata("noExpression.kt") public void testNoExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/expressionSelection/noExpression.kt"); - doTestExpressionSelection(fileName); + runTest("idea/testData/expressionSelection/noExpression.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/KotlinTypeAliasByExpansionShortNameIndexTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/KotlinTypeAliasByExpansionShortNameIndexTestGenerated.java index e3164d07645..e79a10e4288 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/KotlinTypeAliasByExpansionShortNameIndexTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/KotlinTypeAliasByExpansionShortNameIndexTestGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinTypeAliasByExpansionShortNameIndexTestGenerated extends AbstractKotlinTypeAliasByExpansionShortNameIndexTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealiasExpansionIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/typealiasExpansionIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionalTypes.kt") public void testFunctionalTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/typealiasExpansionIndex/functionalTypes.kt"); - doTest(fileName); + runTest("idea/testData/typealiasExpansionIndex/functionalTypes.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/typealiasExpansionIndex/generics.kt"); - doTest(fileName); + runTest("idea/testData/typealiasExpansionIndex/generics.kt"); } @TestMetadata("simpleType.kt") public void testSimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/typealiasExpansionIndex/simpleType.kt"); - doTest(fileName); + runTest("idea/testData/typealiasExpansionIndex/simpleType.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/SmartSelectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/SmartSelectionTestGenerated.java index 393ec781111..0f492236f32 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/SmartSelectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/SmartSelectionTestGenerated.java @@ -21,97 +21,86 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SmartSelectionTestGenerated extends AbstractSmartSelectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestSmartSelection, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartSelection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/smartSelection"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commentsAndExtraSpaces.kt") public void testCommentsAndExtraSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/commentsAndExtraSpaces.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/commentsAndExtraSpaces.kt"); } @TestMetadata("labelledStatement.kt") public void testLabelledStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/labelledStatement.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/labelledStatement.kt"); } @TestMetadata("labelledThis.kt") public void testLabelledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/labelledThis.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/labelledThis.kt"); } @TestMetadata("lambdaCalls.kt") public void testLambdaCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/lambdaCalls.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/lambdaCalls.kt"); } @TestMetadata("multilineCalls.kt") public void testMultilineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/multilineCalls.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/multilineCalls.kt"); } @TestMetadata("multilineOperations.kt") public void testMultilineOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/multilineOperations.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/multilineOperations.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/objectLiteral.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/objectLiteral.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/parenthesized.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/parenthesized.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/simple.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/simple.kt"); } @TestMetadata("superExpression.kt") public void testSuperExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/superExpression.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/superExpression.kt"); } @TestMetadata("superExpressionWithLabel.kt") public void testSuperExpressionWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/superExpressionWithLabel.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/superExpressionWithLabel.kt"); } @TestMetadata("superExpressionWithLabelAndType.kt") public void testSuperExpressionWithLabelAndType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/superExpressionWithLabelAndType.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/superExpressionWithLabelAndType.kt"); } @TestMetadata("superExpressionWithType.kt") public void testSuperExpressionWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/superExpressionWithType.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/superExpressionWithType.kt"); } @TestMetadata("typeInSuperExpression.kt") public void testTypeInSuperExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/typeInSuperExpression.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/typeInSuperExpression.kt"); } @TestMetadata("typeInSuperExpressionWithLabel.kt") public void testTypeInSuperExpressionWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/smartSelection/typeInSuperExpressionWithLabel.kt"); - doTestSmartSelection(fileName); + runTest("idea/testData/smartSelection/typeInSuperExpressionWithLabel.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/actions/GotoTestOrCodeActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/actions/GotoTestOrCodeActionTestGenerated.java index 70f1c0c3be0..69fc0c388c6 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/actions/GotoTestOrCodeActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/actions/GotoTestOrCodeActionTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GotoTestOrCodeActionTestGenerated extends AbstractGotoTestOrCodeActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGotoTestOrCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoTestOrCode"), Pattern.compile("^(.+)\\.main\\..+$"), TargetBackend.ANY, true); } @TestMetadata("fromJavaClassToTest.main.java") public void testFromJavaClassToTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromJavaClassToTest.main.java"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromJavaClassToTest.main.java"); } @TestMetadata("fromJavaTestToKotlinClass.main.java") public void testFromJavaTestToKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromJavaTestToKotlinClass.main.java"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromJavaTestToKotlinClass.main.java"); } @TestMetadata("fromJavaTestToKotlinFile.main.java") public void testFromJavaTestToKotlinFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromJavaTestToKotlinFile.main.java"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromJavaTestToKotlinFile.main.java"); } @TestMetadata("fromKotlinClassToTest.main.kt") public void testFromKotlinClassToTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromKotlinClassToTest.main.kt"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromKotlinClassToTest.main.kt"); } @TestMetadata("fromKotlinFileToTest.main.kt") public void testFromKotlinFileToTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromKotlinFileToTest.main.kt"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromKotlinFileToTest.main.kt"); } @TestMetadata("fromKotlinTestToJavaClass.main.kt") public void testFromKotlinTestToJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromKotlinTestToJavaClass.main.kt"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromKotlinTestToJavaClass.main.kt"); } @TestMetadata("fromKotlinTestToKotlinClass.main.kt") public void testFromKotlinTestToKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromKotlinTestToKotlinClass.main.kt"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromKotlinTestToKotlinClass.main.kt"); } @TestMetadata("fromKotlinTestToKotlinFile.main.kt") public void testFromKotlinTestToKotlinFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTestOrCode/fromKotlinTestToKotlinFile.main.kt"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTestOrCode/fromKotlinTestToKotlinFile.main.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java index a5deb126e75..8ed672ff995 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeCompiledLightClassTestGenerated.java @@ -21,148 +21,134 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLightClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true, "local", "compilationErrors", "ideRegression"); } @TestMetadata("AnnotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/AnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt"); } @TestMetadata("DataClassWithCustomImplementedMembers.kt") public void testDataClassWithCustomImplementedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt"); } @TestMetadata("DelegatedNested.kt") public void testDelegatedNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DelegatedNested.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DelegatedNested.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/Delegation.kt"); } @TestMetadata("DeprecatedEnumEntry.kt") public void testDeprecatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DeprecatedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DeprecatedEnumEntry.kt"); } @TestMetadata("DeprecatedNotHiddenInClass.kt") public void testDeprecatedNotHiddenInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DeprecatedNotHiddenInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DeprecatedNotHiddenInClass.kt"); } @TestMetadata("DollarsInName.kt") public void testDollarsInName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DollarsInName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DollarsInName.kt"); } @TestMetadata("DollarsInNameNoPackage.kt") public void testDollarsInNameNoPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DollarsInNameNoPackage.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DollarsInNameNoPackage.kt"); } @TestMetadata("ExtendingInterfaceWithDefaultImpls.kt") public void testExtendingInterfaceWithDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ExtendingInterfaceWithDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ExtendingInterfaceWithDefaultImpls.kt"); } @TestMetadata("HiddenDeprecated.kt") public void testHiddenDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/HiddenDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/HiddenDeprecated.kt"); } @TestMetadata("HiddenDeprecatedInClass.kt") public void testHiddenDeprecatedInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/HiddenDeprecatedInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/HiddenDeprecatedInClass.kt"); } @TestMetadata("InheritingInterfaceDefaultImpls.kt") public void testInheritingInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/InheritingInterfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/InheritingInterfaceDefaultImpls.kt"); } @TestMetadata("JvmNameOnMember.kt") public void testJvmNameOnMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/JvmNameOnMember.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/JvmNameOnMember.kt"); } @TestMetadata("JvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/JvmStatic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/JvmStatic.kt"); } @TestMetadata("NestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/NestedObjects.kt"); } @TestMetadata("NonDataClassWithComponentFunctions.kt") public void testNonDataClassWithComponentFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt"); } @TestMetadata("PublishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt"); } @TestMetadata("SpecialAnnotationsOnAnnotationClass.kt") public void testSpecialAnnotationsOnAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); } @TestMetadata("VarArgs.kt") public void testVarArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/VarArgs.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/VarArgs.kt"); } @TestMetadata("compiler/testData/asJava/lightClasses/delegation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/delegation"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Function.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/delegation/Function.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/delegation/Property.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/delegation/Property.kt"); } } @@ -170,32 +156,32 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Facades extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/facades"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AllPrivate.kt") public void testAllPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/AllPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/AllPrivate.kt"); } @TestMetadata("MultiFile.kt") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/MultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/MultiFile.kt"); } @TestMetadata("SingleFile.kt") public void testSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); } @TestMetadata("SingleJvmClassName.kt") public void testSingleJvmClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); } } @@ -203,116 +189,102 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityAnnotations extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/nullabilityAnnotations"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); } @TestMetadata("ClassObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); } @TestMetadata("ClassWithConstructor.kt") public void testClassWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); } @TestMetadata("ClassWithConstructorAndProperties.kt") public void testClassWithConstructorAndProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); } @TestMetadata("FileFacade.kt") public void testFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); } @TestMetadata("IntOverridesAny.kt") public void testIntOverridesAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); } @TestMetadata("JvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); } @TestMetadata("NullableUnitReturn.kt") public void testNullableUnitReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); } @TestMetadata("OverrideAnyWithUnit.kt") public void testOverrideAnyWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); } @TestMetadata("PlatformTypes.kt") public void testPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); } @TestMetadata("Primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); } @TestMetadata("PrivateInClass.kt") public void testPrivateInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); } @TestMetadata("Synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); } @TestMetadata("UnitAsGenericArgument.kt") public void testUnitAsGenericArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); } @TestMetadata("UnitParameter.kt") public void testUnitParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); } @TestMetadata("VoidReturn.kt") public void testVoidReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); } } @@ -320,14 +292,17 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Object extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/object"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("SimpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); } } @@ -335,20 +310,22 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublicField extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublicField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/publicField"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("CompanionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); } } @@ -356,20 +333,22 @@ public class IdeCompiledLightClassTestGenerated extends AbstractIdeCompiledLight @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractIdeCompiledLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/script"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("HelloWorld.kts") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/script/HelloWorld.kts"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/script/HelloWorld.kts"); } @TestMetadata("InnerClasses.kts") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/script/InnerClasses.kts"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/script/InnerClasses.kts"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java index 992a1569640..4b7fe36a89f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/IdeLightClassTestGenerated.java @@ -21,150 +21,135 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLightClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true, "delegation"); } @TestMetadata("AnnotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/AnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/AnnotationClass.kt"); } @TestMetadata("DataClassWithCustomImplementedMembers.kt") public void testDataClassWithCustomImplementedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DataClassWithCustomImplementedMembers.kt"); } @TestMetadata("DelegatedNested.kt") public void testDelegatedNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DelegatedNested.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DelegatedNested.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/Delegation.kt"); } @TestMetadata("DeprecatedEnumEntry.kt") public void testDeprecatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DeprecatedEnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DeprecatedEnumEntry.kt"); } @TestMetadata("DeprecatedNotHiddenInClass.kt") public void testDeprecatedNotHiddenInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DeprecatedNotHiddenInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DeprecatedNotHiddenInClass.kt"); } @TestMetadata("DollarsInName.kt") public void testDollarsInName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DollarsInName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DollarsInName.kt"); } @TestMetadata("DollarsInNameNoPackage.kt") public void testDollarsInNameNoPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/DollarsInNameNoPackage.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/DollarsInNameNoPackage.kt"); } @TestMetadata("ExtendingInterfaceWithDefaultImpls.kt") public void testExtendingInterfaceWithDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ExtendingInterfaceWithDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ExtendingInterfaceWithDefaultImpls.kt"); } @TestMetadata("HiddenDeprecated.kt") public void testHiddenDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/HiddenDeprecated.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/HiddenDeprecated.kt"); } @TestMetadata("HiddenDeprecatedInClass.kt") public void testHiddenDeprecatedInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/HiddenDeprecatedInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/HiddenDeprecatedInClass.kt"); } @TestMetadata("InheritingInterfaceDefaultImpls.kt") public void testInheritingInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/InheritingInterfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/InheritingInterfaceDefaultImpls.kt"); } @TestMetadata("JvmNameOnMember.kt") public void testJvmNameOnMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/JvmNameOnMember.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/JvmNameOnMember.kt"); } @TestMetadata("JvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/JvmStatic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/JvmStatic.kt"); } @TestMetadata("NestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/NestedObjects.kt"); } @TestMetadata("NonDataClassWithComponentFunctions.kt") public void testNonDataClassWithComponentFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/NonDataClassWithComponentFunctions.kt"); } @TestMetadata("PublishedApi.kt") public void testPublishedApi() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/PublishedApi.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/PublishedApi.kt"); } @TestMetadata("SpecialAnnotationsOnAnnotationClass.kt") public void testSpecialAnnotationsOnAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/SpecialAnnotationsOnAnnotationClass.kt"); } @TestMetadata("StubOrderForOverloads.kt") public void testStubOrderForOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/StubOrderForOverloads.kt"); } @TestMetadata("VarArgs.kt") public void testVarArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/VarArgs.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/VarArgs.kt"); } @TestMetadata("compiler/testData/asJava/lightClasses/compilationErrors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompilationErrors extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("ActualClass.kt") public void testActualClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ActualClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ActualClass.kt"); } @TestMetadata("ActualTypeAlias.kt") public void testActualTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAlias.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAlias.kt"); } @TestMetadata("ActualTypeAliasCustomJvmPackageName.kt") public void testActualTypeAliasCustomJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAliasCustomJvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAliasCustomJvmPackageName.kt"); } public void testAllFilesPresentInCompilationErrors() throws Exception { @@ -173,80 +158,67 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestMetadata("AllInlineOnly.kt") public void testAllInlineOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/AllInlineOnly.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/AllInlineOnly.kt"); } @TestMetadata("AnnotationModifiers.kt") public void testAnnotationModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/AnnotationModifiers.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/AnnotationModifiers.kt"); } @TestMetadata("ExpectClass.kt") public void testExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectClass.kt"); } @TestMetadata("ExpectObject.kt") public void testExpectObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectObject.kt"); } @TestMetadata("ExpectedNestedClass.kt") public void testExpectedNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClass.kt"); } @TestMetadata("ExpectedNestedClassInObject.kt") public void testExpectedNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/ExpectedNestedClassInObject.kt"); } @TestMetadata("JvmPackageName.kt") public void testJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/JvmPackageName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/JvmPackageName.kt"); } @TestMetadata("PrivateInTrait.kt") public void testPrivateInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/PrivateInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/PrivateInTrait.kt"); } @TestMetadata("RepetableAnnotations.kt") public void testRepetableAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/RepetableAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/RepetableAnnotations.kt"); } @TestMetadata("SameName.kt") public void testSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/SameName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/SameName.kt"); } @TestMetadata("TopLevelDestructuring.kt") public void testTopLevelDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/TopLevelDestructuring.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/TopLevelDestructuring.kt"); } @TestMetadata("TraitClassObjectField.kt") public void testTraitClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/TraitClassObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/TraitClassObjectField.kt"); } @TestMetadata("WrongAnnotations.kt") public void testWrongAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/compilationErrors/WrongAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/compilationErrors/WrongAnnotations.kt"); } } @@ -254,32 +226,32 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Facades extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/facades"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AllPrivate.kt") public void testAllPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/AllPrivate.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/AllPrivate.kt"); } @TestMetadata("MultiFile.kt") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/MultiFile.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/MultiFile.kt"); } @TestMetadata("SingleFile.kt") public void testSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/SingleFile.kt"); } @TestMetadata("SingleJvmClassName.kt") public void testSingleJvmClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt"); } } @@ -287,56 +259,52 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IdeRegression extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIdeRegression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/ideRegression"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AllOpenAnnotatedClasses.kt") public void testAllOpenAnnotatedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/AllOpenAnnotatedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/AllOpenAnnotatedClasses.kt"); } @TestMetadata("ImplementingCharSequenceAndNumber.kt") public void testImplementingCharSequenceAndNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/ImplementingCharSequenceAndNumber.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/ImplementingCharSequenceAndNumber.kt"); } @TestMetadata("ImplementingMap.kt") public void testImplementingMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/ImplementingMap.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/ImplementingMap.kt"); } @TestMetadata("ImplementingMutableSet.kt") public void testImplementingMutableSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/ImplementingMutableSet.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/ImplementingMutableSet.kt"); } @TestMetadata("InheritingInterfaceDefaultImpls.kt") public void testInheritingInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/InheritingInterfaceDefaultImpls.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/InheritingInterfaceDefaultImpls.kt"); } @TestMetadata("OverridingFinalInternal.kt") public void testOverridingFinalInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/OverridingFinalInternal.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/OverridingFinalInternal.kt"); } @TestMetadata("OverridingInternal.kt") public void testOverridingInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/OverridingInternal.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/OverridingInternal.kt"); } @TestMetadata("OverridingProtected.kt") public void testOverridingProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/ideRegression/OverridingProtected.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/ideRegression/OverridingProtected.kt"); } } @@ -344,14 +312,17 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/local"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("DollarsInNameLocal.kt") public void testDollarsInNameLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/local/DollarsInNameLocal.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/local/DollarsInNameLocal.kt"); } } @@ -359,116 +330,102 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullabilityAnnotations extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullabilityAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/nullabilityAnnotations"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Class.kt"); } @TestMetadata("ClassObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassObjectField.kt"); } @TestMetadata("ClassWithConstructor.kt") public void testClassWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructor.kt"); } @TestMetadata("ClassWithConstructorAndProperties.kt") public void testClassWithConstructorAndProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/ClassWithConstructorAndProperties.kt"); } @TestMetadata("FileFacade.kt") public void testFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/FileFacade.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Generic.kt"); } @TestMetadata("IntOverridesAny.kt") public void testIntOverridesAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/IntOverridesAny.kt"); } @TestMetadata("JvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt"); } @TestMetadata("NullableUnitReturn.kt") public void testNullableUnitReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/NullableUnitReturn.kt"); } @TestMetadata("OverrideAnyWithUnit.kt") public void testOverrideAnyWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/OverrideAnyWithUnit.kt"); } @TestMetadata("PlatformTypes.kt") public void testPlatformTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PlatformTypes.kt"); } @TestMetadata("Primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Primitives.kt"); } @TestMetadata("PrivateInClass.kt") public void testPrivateInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/PrivateInClass.kt"); } @TestMetadata("Synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Synthetic.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/Trait.kt"); } @TestMetadata("UnitAsGenericArgument.kt") public void testUnitAsGenericArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitAsGenericArgument.kt"); } @TestMetadata("UnitParameter.kt") public void testUnitParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/UnitParameter.kt"); } @TestMetadata("VoidReturn.kt") public void testVoidReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/nullabilityAnnotations/VoidReturn.kt"); } } @@ -476,14 +433,17 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Object extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/object"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("SimpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/object/SimpleObject.kt"); } } @@ -491,20 +451,22 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublicField extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublicField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/publicField"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("CompanionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/publicField/CompanionObject.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/publicField/Simple.kt"); } } @@ -512,20 +474,22 @@ public class IdeLightClassTestGenerated extends AbstractIdeLightClassTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractIdeLightClassTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/asJava/lightClasses/script"), Pattern.compile("^([^.]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("HelloWorld.kts") public void testHelloWorld() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/script/HelloWorld.kts"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/script/HelloWorld.kts"); } @TestMetadata("InnerClasses.kts") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/asJava/lightClasses/script/InnerClasses.kts"); - doTest(fileName); + runTest("compiler/testData/asJava/lightClasses/script/InnerClasses.kts"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleLineMarkerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleLineMarkerTestGenerated.java index a4622f2d107..a4bf4c7386c 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleLineMarkerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/caches/resolve/MultiModuleLineMarkerTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiModuleLineMarkerTestGenerated extends AbstractMultiModuleLineMarkerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("actualEnumEntries") public void testActualEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/actualEnumEntries/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/actualEnumEntries/"); } public void testAllFilesPresentInMultiModuleLineMarker() throws Exception { @@ -33,145 +36,121 @@ public class MultiModuleLineMarkerTestGenerated extends AbstractMultiModuleLineM @TestMetadata("expectEnumEntries") public void testExpectEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/expectEnumEntries/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/expectEnumEntries/"); } @TestMetadata("fromActualAnnotation") public void testFromActualAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromActualAnnotation/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromActualAnnotation/"); } @TestMetadata("fromActualPrimaryConstructor") public void testFromActualPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromActualPrimaryConstructor/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromActualPrimaryConstructor/"); } @TestMetadata("fromActualSealedClass") public void testFromActualSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromActualSealedClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromActualSealedClass/"); } @TestMetadata("fromActualSecondaryConstructor") public void testFromActualSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromActualSecondaryConstructor/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromActualSecondaryConstructor/"); } @TestMetadata("fromActualTypeAlias") public void testFromActualTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromActualTypeAlias/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromActualTypeAlias/"); } @TestMetadata("fromClassToAlias") public void testFromClassToAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromClassToAlias/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromClassToAlias/"); } @TestMetadata("fromClassToJavaAliasInTest") public void testFromClassToJavaAliasInTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromClassToJavaAliasInTest/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromClassToJavaAliasInTest/"); } @TestMetadata("fromCommonToJvmHeader") public void testFromCommonToJvmHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromCommonToJvmHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromCommonToJvmHeader/"); } @TestMetadata("fromCommonToJvmImpl") public void testFromCommonToJvmImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromCommonToJvmImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromCommonToJvmImpl/"); } @TestMetadata("fromExpectedAnnotation") public void testFromExpectedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromExpectedAnnotation/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromExpectedAnnotation/"); } @TestMetadata("fromExpectedPrimaryConstructor") public void testFromExpectedPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromExpectedPrimaryConstructor/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromExpectedPrimaryConstructor/"); } @TestMetadata("fromExpectedSealedClass") public void testFromExpectedSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromExpectedSealedClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromExpectedSealedClass/"); } @TestMetadata("fromExpectedSecondaryConstructor") public void testFromExpectedSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromExpectedSecondaryConstructor/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromExpectedSecondaryConstructor/"); } @TestMetadata("fromExpectedTypeAlias") public void testFromExpectedTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/fromExpectedTypeAlias/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/fromExpectedTypeAlias/"); } @TestMetadata("hierarchyWithExpectClassCommonSide") public void testHierarchyWithExpectClassCommonSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/hierarchyWithExpectClassCommonSide/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/hierarchyWithExpectClassCommonSide/"); } @TestMetadata("hierarchyWithExpectClassCommonSideNonJavaIds") public void testHierarchyWithExpectClassCommonSideNonJavaIds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/hierarchyWithExpectClassCommonSideNonJavaIds/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/hierarchyWithExpectClassCommonSideNonJavaIds/"); } @TestMetadata("hierarchyWithExpectClassPlatformSide") public void testHierarchyWithExpectClassPlatformSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/hierarchyWithExpectClassPlatformSide/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/hierarchyWithExpectClassPlatformSide/"); } @TestMetadata("kotlinTestAnnotations") public void testKotlinTestAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/kotlinTestAnnotations/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/kotlinTestAnnotations/"); } @TestMetadata("suspendImplInPlatformModules") public void testSuspendImplInPlatformModules() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/suspendImplInPlatformModules/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/suspendImplInPlatformModules/"); } @TestMetadata("topLevelFunWithKotlinTest") public void testTopLevelFunWithKotlinTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/topLevelFunWithKotlinTest/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/topLevelFunWithKotlinTest/"); } @TestMetadata("transitive") public void testTransitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/transitive/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/transitive/"); } @TestMetadata("transitiveCommon") public void testTransitiveCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/transitiveCommon/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/transitiveCommon/"); } @TestMetadata("withOverloads") public void testWithOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleLineMarker/withOverloads/"); - doTest(fileName); + runTest("idea/testData/multiModuleLineMarker/withOverloads/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/BreadcrumbsTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/BreadcrumbsTestGenerated.java index 2210fe3cccd..53cdafbb6c7 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/BreadcrumbsTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/BreadcrumbsTestGenerated.java @@ -21,91 +21,81 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BreadcrumbsTestGenerated extends AbstractBreadcrumbsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBreadcrumbs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/breadcrumbs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/AnonymousObjects.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/AnonymousObjects.kt"); } @TestMetadata("Declarations.kt") public void testDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/Declarations.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/Declarations.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/For.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/For.kt"); } @TestMetadata("FunctionalType.kt") public void testFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/FunctionalType.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/FunctionalType.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/If.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/If.kt"); } @TestMetadata("LabeledStatements.kt") public void testLabeledStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/LabeledStatements.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/LabeledStatements.kt"); } @TestMetadata("Lambdas.kt") public void testLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/Lambdas.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/Lambdas.kt"); } @TestMetadata("OnIfCondition.kt") public void testOnIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/OnIfCondition.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/OnIfCondition.kt"); } @TestMetadata("OnWhenEntryCondition.kt") public void testOnWhenEntryCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/OnWhenEntryCondition.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/OnWhenEntryCondition.kt"); } @TestMetadata("PropertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/PropertyAccessor.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/PropertyAccessor.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/StarProjection.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/StarProjection.kt"); } @TestMetadata("Try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/Try.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/Try.kt"); } @TestMetadata("When.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/When.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/When.kt"); } @TestMetadata("While.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/breadcrumbs/While.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/breadcrumbs/While.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/ExpressionTypeTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/ExpressionTypeTestGenerated.java index 4b5586daae0..23071374ba6 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/ExpressionTypeTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/ExpressionTypeTestGenerated.java @@ -21,109 +21,96 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ExpressionTypeTestGenerated extends AbstractExpressionTypeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressionType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/expressionType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/AnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/AnonymousObject.kt"); } @TestMetadata("BlockBodyFunction.kt") public void testBlockBodyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/BlockBodyFunction.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/BlockBodyFunction.kt"); } @TestMetadata("IfAsExpression.kt") public void testIfAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/IfAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/IfAsExpression.kt"); } @TestMetadata("IfAsExpressionInsideBlock.kt") public void testIfAsExpressionInsideBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/IfAsExpressionInsideBlock.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/IfAsExpressionInsideBlock.kt"); } @TestMetadata("Kt11601.kt") public void testKt11601() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/Kt11601.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/Kt11601.kt"); } @TestMetadata("Lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/Lambda.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/Lambda.kt"); } @TestMetadata("MethodName.kt") public void testMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/MethodName.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/MethodName.kt"); } @TestMetadata("MethodReference.kt") public void testMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/MethodReference.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/MethodReference.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/MultiDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/MultiDeclaration.kt"); } @TestMetadata("MultiDeclarationInLambda.kt") public void testMultiDeclarationInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/MultiDeclarationInLambda.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/MultiDeclarationInLambda.kt"); } @TestMetadata("MultiDeclarationInLoop.kt") public void testMultiDeclarationInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/MultiDeclarationInLoop.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/MultiDeclarationInLoop.kt"); } @TestMetadata("PropertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/PropertyAccessor.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/PropertyAccessor.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/SmartCast.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/SmartCast.kt"); } @TestMetadata("SoftSmartCast.kt") public void testSoftSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/SoftSmartCast.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/SoftSmartCast.kt"); } @TestMetadata("SoftSmartCastMultipleTypes.kt") public void testSoftSmartCastMultipleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/SoftSmartCastMultipleTypes.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/SoftSmartCastMultipleTypes.kt"); } @TestMetadata("ThisInLambda.kt") public void testThisInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/ThisInLambda.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/ThisInLambda.kt"); } @TestMetadata("VariableDeclaration.kt") public void testVariableDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/expressionType/VariableDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/expressionType/VariableDeclaration.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InsertImportOnPasteTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InsertImportOnPasteTestGenerated.java index f3d54f5f3e6..c8f82595b29 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InsertImportOnPasteTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InsertImportOnPasteTestGenerated.java @@ -23,368 +23,312 @@ public class InsertImportOnPasteTestGenerated extends AbstractInsertImportOnPast @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Copy extends AbstractInsertImportOnPasteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCopy, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCopy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/copyPaste/imports"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("AlreadyImportedExtensions.kt") public void testAlreadyImportedExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/AlreadyImportedExtensions.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/AlreadyImportedExtensions.kt"); } @TestMetadata("AlreadyImportedViaStar.kt") public void testAlreadyImportedViaStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt"); } @TestMetadata("ClassAlreadyImported.kt") public void testClassAlreadyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassAlreadyImported.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassAlreadyImported.kt"); } @TestMetadata("ClassMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassMember.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassMember.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassObject.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassObject.kt"); } @TestMetadata("ClassObjectFunInsideClass.kt") public void testClassObjectFunInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt"); } @TestMetadata("ClassObjectInner.kt") public void testClassObjectInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassObjectInner.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassObjectInner.kt"); } @TestMetadata("ClassResolvedToPackage.kt") public void testClassResolvedToPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassResolvedToPackage.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassResolvedToPackage.kt"); } @TestMetadata("ClassType.kt") public void testClassType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassType.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ClassType.kt"); } @TestMetadata("ConflictForTypeWithTypeParameter.kt") public void testConflictForTypeWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ConflictForTypeWithTypeParameter.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ConflictForTypeWithTypeParameter.kt"); } @TestMetadata("ConflictWithClass.kt") public void testConflictWithClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ConflictWithClass.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ConflictWithClass.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Constructor.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Constructor.kt"); } @TestMetadata("DeepInnerClasses.kt") public void testDeepInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DeepInnerClasses.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DeepInnerClasses.kt"); } @TestMetadata("DefaultPackage.kt") public void testDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DefaultPackage.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DefaultPackage.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DelegatedProperty.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DelegatedProperty.kt"); } @TestMetadata("DependenciesNotAccessibleOnPaste.kt") public void testDependenciesNotAccessibleOnPaste() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependenciesNotAccessibleOnPaste.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DependenciesNotAccessibleOnPaste.kt"); } @TestMetadata("DependencyOnJava.kt") public void testDependencyOnJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependencyOnJava.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DependencyOnJava.kt"); } @TestMetadata("DependencyOnKotlinLibrary.kt") public void testDependencyOnKotlinLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependencyOnKotlinLibrary.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DependencyOnKotlinLibrary.kt"); } @TestMetadata("DependencyOnStdLib.kt") public void testDependencyOnStdLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependencyOnStdLib.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/DependencyOnStdLib.kt"); } @TestMetadata("EnumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/EnumEntries.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/EnumEntries.kt"); } @TestMetadata("Extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Extension.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Extension.kt"); } @TestMetadata("ExtensionAsInfixOrOperator.kt") public void testExtensionAsInfixOrOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ExtensionAsInfixOrOperator.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ExtensionAsInfixOrOperator.kt"); } @TestMetadata("ExtensionCannotBeImportedOrLengthened.kt") public void testExtensionCannotBeImportedOrLengthened() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ExtensionCannotBeImportedOrLengthened.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ExtensionCannotBeImportedOrLengthened.kt"); } @TestMetadata("ExtensionConflict.kt") public void testExtensionConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ExtensionConflict.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ExtensionConflict.kt"); } @TestMetadata("ForLoop.kt") public void testForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ForLoop.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ForLoop.kt"); } @TestMetadata("FullyQualified.kt") public void testFullyQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/FullyQualified.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/FullyQualified.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Function.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Function.kt"); } @TestMetadata("FunctionAlreadyImported.kt") public void testFunctionAlreadyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/FunctionAlreadyImported.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/FunctionAlreadyImported.kt"); } @TestMetadata("FunctionParameter.kt") public void testFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/FunctionParameter.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/FunctionParameter.kt"); } @TestMetadata("GetExpression.kt") public void testGetExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/GetExpression.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/GetExpression.kt"); } @TestMetadata("ImportDependency.kt") public void testImportDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportDependency.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ImportDependency.kt"); } @TestMetadata("ImportDirective.kt") public void testImportDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportDirective.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ImportDirective.kt"); } @TestMetadata("ImportableEntityInExtensionLiteral.kt") public void testImportableEntityInExtensionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportableEntityInExtensionLiteral.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ImportableEntityInExtensionLiteral.kt"); } @TestMetadata("ImportedElementCopied.kt") public void testImportedElementCopied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportedElementCopied.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ImportedElementCopied.kt"); } @TestMetadata("Inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Inner.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Inner.kt"); } @TestMetadata("Invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Invoke.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Invoke.kt"); } @TestMetadata("JavaStaticViaClass.kt") public void testJavaStaticViaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/JavaStaticViaClass.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/JavaStaticViaClass.kt"); } @TestMetadata("KT10433.kt") public void testKT10433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/KT10433.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/KT10433.kt"); } @TestMetadata("KeywordClassName.kt") public void testKeywordClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/KeywordClassName.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/KeywordClassName.kt"); } @TestMetadata("Local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Local.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Local.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/MultiDeclaration.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/MultiDeclaration.kt"); } @TestMetadata("MultiReferencePartiallyCopied.kt") public void testMultiReferencePartiallyCopied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/MultiReferencePartiallyCopied.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/MultiReferencePartiallyCopied.kt"); } @TestMetadata("NoImportForBuiltIns.kt") public void testNoImportForBuiltIns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NoImportForBuiltIns.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/NoImportForBuiltIns.kt"); } @TestMetadata("NoImportForSamePackage.kt") public void testNoImportForSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NoImportForSamePackage.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/NoImportForSamePackage.kt"); } @TestMetadata("NotReferencePosition.kt") public void testNotReferencePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NotReferencePosition.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/NotReferencePosition.kt"); } @TestMetadata("NotReferencePosition2.kt") public void testNotReferencePosition2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NotReferencePosition2.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/NotReferencePosition2.kt"); } @TestMetadata("Object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Object.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Object.kt"); } @TestMetadata("OnlyKDocReferenced.kt") public void testOnlyKDocReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/OnlyKDocReferenced.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/OnlyKDocReferenced.kt"); } @TestMetadata("OverloadedExtensionFunction.kt") public void testOverloadedExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/OverloadedExtensionFunction.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/OverloadedExtensionFunction.kt"); } @TestMetadata("PackageView.kt") public void testPackageView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/PackageView.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/PackageView.kt"); } @TestMetadata("PartiallyQualified.kt") public void testPartiallyQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/PartiallyQualified.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/PartiallyQualified.kt"); } @TestMetadata("QualifiedTypeConflict.kt") public void testQualifiedTypeConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/QualifiedTypeConflict.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/QualifiedTypeConflict.kt"); } @TestMetadata("ReferencedElementAlsoCopied.kt") public void testReferencedElementAlsoCopied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt"); } @TestMetadata("Super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Super.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Super.kt"); } @TestMetadata("ThisReference.kt") public void testThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ThisReference.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/ThisReference.kt"); } @TestMetadata("TopLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/TopLevelProperty.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/TopLevelProperty.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Trait.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/Trait.kt"); } @TestMetadata("TypeArgForUnresolvedCall.kt") public void testTypeArgForUnresolvedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/TypeArgForUnresolvedCall.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/TypeArgForUnresolvedCall.kt"); } @TestMetadata("TypeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/TypeParameter.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/TypeParameter.kt"); } @TestMetadata("UnresolvedOverload.kt") public void testUnresolvedOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/UnresolvedOverload.kt"); - doTestCopy(fileName); + runTest("idea/testData/copyPaste/imports/UnresolvedOverload.kt"); } } @@ -392,368 +336,312 @@ public class InsertImportOnPasteTestGenerated extends AbstractInsertImportOnPast @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cut extends AbstractInsertImportOnPasteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCut, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCut() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/copyPaste/imports"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("AlreadyImportedExtensions.kt") public void testAlreadyImportedExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/AlreadyImportedExtensions.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/AlreadyImportedExtensions.kt"); } @TestMetadata("AlreadyImportedViaStar.kt") public void testAlreadyImportedViaStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/AlreadyImportedViaStar.kt"); } @TestMetadata("ClassAlreadyImported.kt") public void testClassAlreadyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassAlreadyImported.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassAlreadyImported.kt"); } @TestMetadata("ClassMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassMember.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassMember.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassObject.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassObject.kt"); } @TestMetadata("ClassObjectFunInsideClass.kt") public void testClassObjectFunInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassObjectFunInsideClass.kt"); } @TestMetadata("ClassObjectInner.kt") public void testClassObjectInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassObjectInner.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassObjectInner.kt"); } @TestMetadata("ClassResolvedToPackage.kt") public void testClassResolvedToPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassResolvedToPackage.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassResolvedToPackage.kt"); } @TestMetadata("ClassType.kt") public void testClassType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ClassType.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ClassType.kt"); } @TestMetadata("ConflictForTypeWithTypeParameter.kt") public void testConflictForTypeWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ConflictForTypeWithTypeParameter.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ConflictForTypeWithTypeParameter.kt"); } @TestMetadata("ConflictWithClass.kt") public void testConflictWithClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ConflictWithClass.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ConflictWithClass.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Constructor.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Constructor.kt"); } @TestMetadata("DeepInnerClasses.kt") public void testDeepInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DeepInnerClasses.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DeepInnerClasses.kt"); } @TestMetadata("DefaultPackage.kt") public void testDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DefaultPackage.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DefaultPackage.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DelegatedProperty.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DelegatedProperty.kt"); } @TestMetadata("DependenciesNotAccessibleOnPaste.kt") public void testDependenciesNotAccessibleOnPaste() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependenciesNotAccessibleOnPaste.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DependenciesNotAccessibleOnPaste.kt"); } @TestMetadata("DependencyOnJava.kt") public void testDependencyOnJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependencyOnJava.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DependencyOnJava.kt"); } @TestMetadata("DependencyOnKotlinLibrary.kt") public void testDependencyOnKotlinLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependencyOnKotlinLibrary.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DependencyOnKotlinLibrary.kt"); } @TestMetadata("DependencyOnStdLib.kt") public void testDependencyOnStdLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/DependencyOnStdLib.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/DependencyOnStdLib.kt"); } @TestMetadata("EnumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/EnumEntries.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/EnumEntries.kt"); } @TestMetadata("Extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Extension.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Extension.kt"); } @TestMetadata("ExtensionAsInfixOrOperator.kt") public void testExtensionAsInfixOrOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ExtensionAsInfixOrOperator.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ExtensionAsInfixOrOperator.kt"); } @TestMetadata("ExtensionCannotBeImportedOrLengthened.kt") public void testExtensionCannotBeImportedOrLengthened() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ExtensionCannotBeImportedOrLengthened.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ExtensionCannotBeImportedOrLengthened.kt"); } @TestMetadata("ExtensionConflict.kt") public void testExtensionConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ExtensionConflict.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ExtensionConflict.kt"); } @TestMetadata("ForLoop.kt") public void testForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ForLoop.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ForLoop.kt"); } @TestMetadata("FullyQualified.kt") public void testFullyQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/FullyQualified.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/FullyQualified.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Function.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Function.kt"); } @TestMetadata("FunctionAlreadyImported.kt") public void testFunctionAlreadyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/FunctionAlreadyImported.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/FunctionAlreadyImported.kt"); } @TestMetadata("FunctionParameter.kt") public void testFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/FunctionParameter.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/FunctionParameter.kt"); } @TestMetadata("GetExpression.kt") public void testGetExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/GetExpression.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/GetExpression.kt"); } @TestMetadata("ImportDependency.kt") public void testImportDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportDependency.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ImportDependency.kt"); } @TestMetadata("ImportDirective.kt") public void testImportDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportDirective.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ImportDirective.kt"); } @TestMetadata("ImportableEntityInExtensionLiteral.kt") public void testImportableEntityInExtensionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportableEntityInExtensionLiteral.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ImportableEntityInExtensionLiteral.kt"); } @TestMetadata("ImportedElementCopied.kt") public void testImportedElementCopied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ImportedElementCopied.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ImportedElementCopied.kt"); } @TestMetadata("Inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Inner.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Inner.kt"); } @TestMetadata("Invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Invoke.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Invoke.kt"); } @TestMetadata("JavaStaticViaClass.kt") public void testJavaStaticViaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/JavaStaticViaClass.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/JavaStaticViaClass.kt"); } @TestMetadata("KT10433.kt") public void testKT10433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/KT10433.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/KT10433.kt"); } @TestMetadata("KeywordClassName.kt") public void testKeywordClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/KeywordClassName.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/KeywordClassName.kt"); } @TestMetadata("Local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Local.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Local.kt"); } @TestMetadata("MultiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/MultiDeclaration.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/MultiDeclaration.kt"); } @TestMetadata("MultiReferencePartiallyCopied.kt") public void testMultiReferencePartiallyCopied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/MultiReferencePartiallyCopied.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/MultiReferencePartiallyCopied.kt"); } @TestMetadata("NoImportForBuiltIns.kt") public void testNoImportForBuiltIns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NoImportForBuiltIns.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/NoImportForBuiltIns.kt"); } @TestMetadata("NoImportForSamePackage.kt") public void testNoImportForSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NoImportForSamePackage.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/NoImportForSamePackage.kt"); } @TestMetadata("NotReferencePosition.kt") public void testNotReferencePosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NotReferencePosition.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/NotReferencePosition.kt"); } @TestMetadata("NotReferencePosition2.kt") public void testNotReferencePosition2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/NotReferencePosition2.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/NotReferencePosition2.kt"); } @TestMetadata("Object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Object.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Object.kt"); } @TestMetadata("OnlyKDocReferenced.kt") public void testOnlyKDocReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/OnlyKDocReferenced.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/OnlyKDocReferenced.kt"); } @TestMetadata("OverloadedExtensionFunction.kt") public void testOverloadedExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/OverloadedExtensionFunction.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/OverloadedExtensionFunction.kt"); } @TestMetadata("PackageView.kt") public void testPackageView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/PackageView.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/PackageView.kt"); } @TestMetadata("PartiallyQualified.kt") public void testPartiallyQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/PartiallyQualified.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/PartiallyQualified.kt"); } @TestMetadata("QualifiedTypeConflict.kt") public void testQualifiedTypeConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/QualifiedTypeConflict.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/QualifiedTypeConflict.kt"); } @TestMetadata("ReferencedElementAlsoCopied.kt") public void testReferencedElementAlsoCopied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ReferencedElementAlsoCopied.kt"); } @TestMetadata("Super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Super.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Super.kt"); } @TestMetadata("ThisReference.kt") public void testThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/ThisReference.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/ThisReference.kt"); } @TestMetadata("TopLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/TopLevelProperty.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/TopLevelProperty.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/Trait.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/Trait.kt"); } @TestMetadata("TypeArgForUnresolvedCall.kt") public void testTypeArgForUnresolvedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/TypeArgForUnresolvedCall.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/TypeArgForUnresolvedCall.kt"); } @TestMetadata("TypeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/TypeParameter.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/TypeParameter.kt"); } @TestMetadata("UnresolvedOverload.kt") public void testUnresolvedOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/imports/UnresolvedOverload.kt"); - doTestCut(fileName); + runTest("idea/testData/copyPaste/imports/UnresolvedOverload.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InspectionTestGenerated.java index ae6f9a5b4c9..b3e4d54e49b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/InspectionTestGenerated.java @@ -23,50 +23,47 @@ public class InspectionTestGenerated extends AbstractInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intentions extends AbstractInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntentions() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/intentions"), Pattern.compile("^(inspections\\.test)$"), TargetBackend.ANY); } @TestMetadata("branched/ifThenToElvis/inspectionData/inspections.test") public void testBranched_ifThenToElvis_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/inspectionData/inspections.test"); } @TestMetadata("convertToStringTemplate/inspectionData/inspections.test") public void testConvertToStringTemplate_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/inspectionData/inspections.test"); } @TestMetadata("destructuringInLambda/inspectionData/inspections.test") public void testDestructuringInLambda_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/inspectionData/inspections.test"); } @TestMetadata("iterationOverMap/inspectionData/inspections.test") public void testIterationOverMap_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/inspectionData/inspections.test"); } @TestMetadata("objectLiteralToLambda/inspectionData/inspections.test") public void testObjectLiteralToLambda_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/inspectionData/inspections.test"); } @TestMetadata("removeExplicitSuperQualifier/inspectionData/inspections.test") public void testRemoveExplicitSuperQualifier_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/inspectionData/inspections.test"); } @TestMetadata("removeExplicitTypeArguments/inspectionData/inspections.test") public void testRemoveExplicitTypeArguments_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/inspectionData/inspections.test"); } } @@ -74,10 +71,13 @@ public class InspectionTestGenerated extends AbstractInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inspections extends AbstractInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addVarianceModifier/inspectionData/inspections.test") public void testAddVarianceModifier_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/addVarianceModifier/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/addVarianceModifier/inspectionData/inspections.test"); } public void testAllFilesPresentInInspections() throws Exception { @@ -86,404 +86,337 @@ public class InspectionTestGenerated extends AbstractInspectionTest { @TestMetadata("allOpenSimple/inspectionData/inspections.test") public void testAllOpenSimple_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/allOpenSimple/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/allOpenSimple/inspectionData/inspections.test"); } @TestMetadata("androidIllegalIdentifiers/inspectionData/inspections.test") public void testAndroidIllegalIdentifiers_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/androidIllegalIdentifiers/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/androidIllegalIdentifiers/inspectionData/inspections.test"); } @TestMetadata("arrayInDataClass/inspectionData/inspections.test") public void testArrayInDataClass_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/arrayInDataClass/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/arrayInDataClass/inspectionData/inspections.test"); } @TestMetadata("canBeParameter/inspectionData/inspections.test") public void testCanBeParameter_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/canBeParameter/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/canBeParameter/inspectionData/inspections.test"); } @TestMetadata("canBePrimaryConstructorProperty/inspectionData/inspections.test") public void testCanBePrimaryConstructorProperty_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/canBePrimaryConstructorProperty/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/canBePrimaryConstructorProperty/inspectionData/inspections.test"); } @TestMetadata("canBeVal/inspectionData/inspections.test") public void testCanBeVal_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/canBeVal/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/canBeVal/inspectionData/inspections.test"); } @TestMetadata("conflictingExtensionProperty/inspectionData/inspections.test") public void testConflictingExtensionProperty_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/conflictingExtensionProperty/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/conflictingExtensionProperty/inspectionData/inspections.test"); } @TestMetadata("constantConditionIf/inspectionData/inspections.test") public void testConstantConditionIf_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/constantConditionIf/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/constantConditionIf/inspectionData/inspections.test"); } @TestMetadata("convertLambdaToReference/inspectionData/inspections.test") public void testConvertLambdaToReference_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/convertLambdaToReference/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/convertLambdaToReference/inspectionData/inspections.test"); } @TestMetadata("convertSecondaryToPrimary/inspectionData/inspections.test") public void testConvertSecondaryToPrimary_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/convertSecondaryToPrimary/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/convertSecondaryToPrimary/inspectionData/inspections.test"); } @TestMetadata("copyWithoutNamedArguments/inspectionData/inspections.test") public void testCopyWithoutNamedArguments_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/copyWithoutNamedArguments/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/copyWithoutNamedArguments/inspectionData/inspections.test"); } @TestMetadata("dataClassPrivateConstructor/inspectionData/inspections.test") public void testDataClassPrivateConstructor_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/dataClassPrivateConstructor/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/dataClassPrivateConstructor/inspectionData/inspections.test"); } @TestMetadata("destructuringWrongName/inspectionData/inspections.test") public void testDestructuringWrongName_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/destructuringWrongName/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/destructuringWrongName/inspectionData/inspections.test"); } @TestMetadata("dynamic/inspectionData/inspections.test") public void testDynamic_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/dynamic/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/dynamic/inspectionData/inspections.test"); } @TestMetadata("emptyRange/inspectionData/inspections.test") public void testEmptyRange_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/emptyRange/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/emptyRange/inspectionData/inspections.test"); } @TestMetadata("equalsAndHashCode/inspectionData/inspections.test") public void testEqualsAndHashCode_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/equalsAndHashCode/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/equalsAndHashCode/inspectionData/inspections.test"); } @TestMetadata("gradleWrongPluginVersion/inspectionData/inspections.test") public void testGradleWrongPluginVersion_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/gradleWrongPluginVersion/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/gradleWrongPluginVersion/inspectionData/inspections.test"); } @TestMetadata("hasPlatformType/inspectionData/inspections.test") public void testHasPlatformType_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/hasPlatformType/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/hasPlatformType/inspectionData/inspections.test"); } @TestMetadata("javaCollectionsStaticMethodOnImmutableList/inspectionData/inspections.test") public void testJavaCollectionsStaticMethodOnImmutableList_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/javaCollectionsStaticMethodOnImmutableList/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/javaCollectionsStaticMethodOnImmutableList/inspectionData/inspections.test"); } @TestMetadata("kt18195/inspectionData/inspections.test") public void testKt18195_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/kt18195/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/kt18195/inspectionData/inspections.test"); } @TestMetadata("leakingThis/inspectionData/inspections.test") public void testLeakingThis_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/leakingThis/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/leakingThis/inspectionData/inspections.test"); } @TestMetadata("memberVisibilityCanBePrivate/inspectionData/inspections.test") public void testMemberVisibilityCanBePrivate_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/memberVisibilityCanBePrivate/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/memberVisibilityCanBePrivate/inspectionData/inspections.test"); } @TestMetadata("naming/class/inspectionData/inspections.test") public void testNaming_class_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/naming/class/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/naming/class/inspectionData/inspections.test"); } @TestMetadata("naming/enumEntry/inspectionData/inspections.test") public void testNaming_enumEntry_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/naming/enumEntry/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/naming/enumEntry/inspectionData/inspections.test"); } @TestMetadata("naming/function/inspectionData/inspections.test") public void testNaming_function_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/naming/function/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/naming/function/inspectionData/inspections.test"); } @TestMetadata("naming/objectProperty/inspectionData/inspections.test") public void testNaming_objectProperty_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/naming/objectProperty/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/naming/objectProperty/inspectionData/inspections.test"); } @TestMetadata("naming/privateProperty/inspectionData/inspections.test") public void testNaming_privateProperty_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/naming/privateProperty/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/naming/privateProperty/inspectionData/inspections.test"); } @TestMetadata("naming/property/inspectionData/inspections.test") public void testNaming_property_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/naming/property/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/naming/property/inspectionData/inspections.test"); } @TestMetadata("nullableBooleanElvis/inspectionData/inspections.test") public void testNullableBooleanElvis_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/nullableBooleanElvis/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/nullableBooleanElvis/inspectionData/inspections.test"); } @TestMetadata("overridingDeprecatedMember/inspectionData/inspections.test") public void testOverridingDeprecatedMember_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/overridingDeprecatedMember/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/overridingDeprecatedMember/inspectionData/inspections.test"); } @TestMetadata("protectedInFinal/inspectionData/inspections.test") public void testProtectedInFinal_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/protectedInFinal/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/protectedInFinal/inspectionData/inspections.test"); } @TestMetadata("publicApiImplicitType/inspectionData/inspections.test") public void testPublicApiImplicitType_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/publicApiImplicitType/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/publicApiImplicitType/inspectionData/inspections.test"); } @TestMetadata("recursivePropertyAccessor/inspectionData/inspections.test") public void testRecursivePropertyAccessor_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/recursivePropertyAccessor/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/recursivePropertyAccessor/inspectionData/inspections.test"); } @TestMetadata("redundantIf/inspectionData/inspections.test") public void testRedundantIf_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantIf/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantIf/inspectionData/inspections.test"); } @TestMetadata("redundantModalityModifier/inspectionData/inspections.test") public void testRedundantModalityModifier_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantModalityModifier/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantModalityModifier/inspectionData/inspections.test"); } @TestMetadata("redundantNotNullExtensionReceiverOfInline/inspectionData/inspections.test") public void testRedundantNotNullExtensionReceiverOfInline_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantNotNullExtensionReceiverOfInline/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantNotNullExtensionReceiverOfInline/inspectionData/inspections.test"); } @TestMetadata("redundantSamConstructor/inspectionData/inspections.test") public void testRedundantSamConstructor_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantSamConstructor/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantSamConstructor/inspectionData/inspections.test"); } @TestMetadata("redundantSemicolon/inspectionData/inspections.test") public void testRedundantSemicolon_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantSemicolon/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantSemicolon/inspectionData/inspections.test"); } @TestMetadata("redundantSuspendModifier/inspectionData/inspections.test") public void testRedundantSuspendModifier_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantSuspendModifier/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantSuspendModifier/inspectionData/inspections.test"); } @TestMetadata("redundantUnitReturnType/inspectionData/inspections.test") public void testRedundantUnitReturnType_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantUnitReturnType/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantUnitReturnType/inspectionData/inspections.test"); } @TestMetadata("redundantVisibilityModifier/inspectionData/inspections.test") public void testRedundantVisibilityModifier_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/redundantVisibilityModifier/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/redundantVisibilityModifier/inspectionData/inspections.test"); } @TestMetadata("reformat/inspectionData/inspections.test") public void testReformat_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/reformat/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/reformat/inspectionData/inspections.test"); } @TestMetadata("removeSetterParameterType/inspectionData/inspections.test") public void testRemoveSetterParameterType_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/removeSetterParameterType/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/removeSetterParameterType/inspectionData/inspections.test"); } @TestMetadata("removeSingleExpressionStringTemplate/inspectionData/inspections.test") public void testRemoveSingleExpressionStringTemplate_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/removeSingleExpressionStringTemplate/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/removeSingleExpressionStringTemplate/inspectionData/inspections.test"); } @TestMetadata("removeToStringInStringTemplate/inspectionData/inspections.test") public void testRemoveToStringInStringTemplate_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/removeToStringInStringTemplate/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/removeToStringInStringTemplate/inspectionData/inspections.test"); } @TestMetadata("replaceArrayEqualityOpWithArraysEquals/inspectionData/inspections.test") public void testReplaceArrayEqualityOpWithArraysEquals_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/replaceArrayEqualityOpWithArraysEquals/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/replaceArrayEqualityOpWithArraysEquals/inspectionData/inspections.test"); } @TestMetadata("replaceCallWithComparison/inspectionData/inspections.test") public void testReplaceCallWithComparison_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/replaceCallWithComparison/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/replaceCallWithComparison/inspectionData/inspections.test"); } @TestMetadata("replaceRangeToWithUntil/inspectionData/inspections.test") public void testReplaceRangeToWithUntil_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/replaceRangeToWithUntil/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/replaceRangeToWithUntil/inspectionData/inspections.test"); } @TestMetadata("sealedSubClassCanBeObject/inspectionData/inspections.test") public void testSealedSubClassCanBeObject_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/sealedSubClassCanBeObject/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/sealedSubClassCanBeObject/inspectionData/inspections.test"); } @TestMetadata("sortModifiers/inspectionData/inspections.test") public void testSortModifiers_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/sortModifiers/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/sortModifiers/inspectionData/inspections.test"); } @TestMetadata("spelling/inspectionData/inspections.test") public void testSpelling_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/spelling/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/spelling/inspectionData/inspections.test"); } @TestMetadata("suspiciousEqualsCombination/inspectionData/inspections.test") public void testSuspiciousEqualsCombination_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/suspiciousEqualsCombination/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/suspiciousEqualsCombination/inspectionData/inspections.test"); } @TestMetadata("twoSetOfTypeparameters/inspectionData/inspections.test") public void testTwoSetOfTypeparameters_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/twoSetOfTypeparameters/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/twoSetOfTypeparameters/inspectionData/inspections.test"); } @TestMetadata("unusedEquals/inspectionData/inspections.test") public void testUnusedEquals_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedEquals/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedEquals/inspectionData/inspections.test"); } @TestMetadata("unusedImport/inspectionData/inspections.test") public void testUnusedImport_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedImport/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedImport/inspectionData/inspections.test"); } @TestMetadata("unusedLambdaExpressionBody/inspectionData/inspections.test") public void testUnusedLambdaExpressionBody_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedLambdaExpressionBody/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedLambdaExpressionBody/inspectionData/inspections.test"); } @TestMetadata("unusedReceiverParameter/inspectionData/inspections.test") public void testUnusedReceiverParameter_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedReceiverParameter/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedReceiverParameter/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/class/inspectionData/inspections.test") public void testUnusedSymbol_class_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/class/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/class/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/enum/inspectionData/inspections.test") public void testUnusedSymbol_enum_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/enum/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/enum/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/function/inspectionData/inspections.test") public void testUnusedSymbol_function_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/function/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/function/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/js/inspectionData/inspections.test") public void testUnusedSymbol_js_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/js/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/js/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/object/inspectionData/inspections.test") public void testUnusedSymbol_object_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/object/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/object/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/parameter/inspectionData/inspections.test") public void testUnusedSymbol_parameter_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/parameter/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/parameter/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/property/inspectionData/inspections.test") public void testUnusedSymbol_property_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/property/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/property/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/typeAlias/inspectionData/inspections.test") public void testUnusedSymbol_typeAlias_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/typeAlias/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/typeAlias/inspectionData/inspections.test"); } @TestMetadata("unusedSymbol/typeParameter/inspectionData/inspections.test") public void testUnusedSymbol_typeParameter_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/unusedSymbol/typeParameter/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/unusedSymbol/typeParameter/inspectionData/inspections.test"); } @TestMetadata("wrapUnaryOperator/inspectionData/inspections.test") public void testWrapUnaryOperator_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspections/wrapUnaryOperator/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspections/wrapUnaryOperator/inspectionData/inspections.test"); } } @@ -491,32 +424,32 @@ public class InspectionTestGenerated extends AbstractInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InspectionsLocal extends AbstractInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInspectionsLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/inspectionsLocal"), Pattern.compile("^(inspections\\.test)$"), TargetBackend.ANY); } @TestMetadata("branched/ifThenToSafeAccess/inspectionData/inspections.test") public void testBranched_ifThenToSafeAccess_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/inspectionData/inspections.test"); } @TestMetadata("conventionNameCalls/replaceGetOrSet/inspectionData/inspections.test") public void testConventionNameCalls_replaceGetOrSet_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData/inspections.test"); } @TestMetadata("deprecatedCallableAddReplaceWith/inspectionData/inspections.test") public void testDeprecatedCallableAddReplaceWith_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData/inspections.test"); } @TestMetadata("simplifyNegatedBinaryExpression/inspectionData/inspections.test") public void testSimplifyNegatedBinaryExpression_inspectionData_Inspections_test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData/inspections.test"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData/inspections.test"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/LineMarkersTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/LineMarkersTestGenerated.java index c39ab27a5a2..30e19ebec4e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/LineMarkersTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/LineMarkersTestGenerated.java @@ -21,28 +21,34 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LineMarkersTestGenerated extends AbstractLineMarkersTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLineMarker() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MethodSeparators.kt") public void testMethodSeparators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/MethodSeparators.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/MethodSeparators.kt"); } @TestMetadata("idea/testData/codeInsight/lineMarker/dslMarker") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DslMarker extends AbstractLineMarkersTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDslMarker() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker/dslMarker"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("markerAnnotationDeclaration.kt") public void testMarkerAnnotationDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/dslMarker/markerAnnotationDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/dslMarker/markerAnnotationDeclaration.kt"); } } @@ -50,164 +56,142 @@ public class LineMarkersTestGenerated extends AbstractLineMarkersTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OverrideImplement extends AbstractLineMarkersTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverrideImplement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker/overrideImplement"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("BadCodeNoExceptions.kt") public void testBadCodeNoExceptions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/BadCodeNoExceptions.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/BadCodeNoExceptions.kt"); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/Class.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/Class.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/ClassObjectInStaticNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DelegatedFun.kt") public void testDelegatedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/DelegatedFun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/DelegatedFun.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/DelegatedProperty.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/DelegatedProperty.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/EnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/EnumEntry.kt"); } @TestMetadata("FakeOverrideForClasses.kt") public void testFakeOverrideForClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideForClasses.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideForClasses.kt"); } @TestMetadata("FakeOverrideFun.kt") public void testFakeOverrideFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideFun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideFun.kt"); } @TestMetadata("FakeOverrideFunWithMostRelevantImplementation.kt") public void testFakeOverrideFunWithMostRelevantImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideFunWithMostRelevantImplementation.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideFunWithMostRelevantImplementation.kt"); } @TestMetadata("FakeOverrideProperty.kt") public void testFakeOverrideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideProperty.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideProperty.kt"); } @TestMetadata("FakeOverrideToStringInTrait.kt") public void testFakeOverrideToStringInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideToStringInTrait.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverrideToStringInTrait.kt"); } @TestMetadata("FakeOverridesForTraitFunWithImpl.kt") public void testFakeOverridesForTraitFunWithImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverridesForTraitFunWithImpl.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/FakeOverridesForTraitFunWithImpl.kt"); } @TestMetadata("NavigateToSeveralSuperElements.kt") public void testNavigateToSeveralSuperElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/NavigateToSeveralSuperElements.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/NavigateToSeveralSuperElements.kt"); } @TestMetadata("NoOverridingMarkerOnDefaultTraitImpl.kt") public void testNoOverridingMarkerOnDefaultTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/NoOverridingMarkerOnDefaultTraitImpl.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/NoOverridingMarkerOnDefaultTraitImpl.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/Overloads.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/Overloads.kt"); } @TestMetadata("OverrideFunction.kt") public void testOverrideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideFunction.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideFunction.kt"); } @TestMetadata("OverrideIconForOverloadMethodBug.kt") public void testOverrideIconForOverloadMethodBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideIconForOverloadMethodBug.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideIconForOverloadMethodBug.kt"); } @TestMetadata("OverrideMemberOfAbstractClass.kt") public void testOverrideMemberOfAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideMemberOfAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/OverrideMemberOfAbstractClass.kt"); } @TestMetadata("OverridenTraitDeclarations.kt") public void testOverridenTraitDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverridenTraitDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/OverridenTraitDeclarations.kt"); } @TestMetadata("OverridingTooltipOnDefaultTraitImpl.kt") public void testOverridingTooltipOnDefaultTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/OverridingTooltipOnDefaultTraitImpl.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/OverridingTooltipOnDefaultTraitImpl.kt"); } @TestMetadata("PrimaryConstructorOpen.kt") public void testPrimaryConstructorOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/PrimaryConstructorOpen.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/PrimaryConstructorOpen.kt"); } @TestMetadata("PrimaryConstructorOverride.kt") public void testPrimaryConstructorOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/PrimaryConstructorOverride.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/PrimaryConstructorOverride.kt"); } @TestMetadata("PropertyOverride.kt") public void testPropertyOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/PropertyOverride.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/PropertyOverride.kt"); } @TestMetadata("SealedClass.kt") public void testSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/SealedClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/SealedClass.kt"); } @TestMetadata("ToStringInTrait.kt") public void testToStringInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/ToStringInTrait.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/ToStringInTrait.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/overrideImplement/Trait.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/overrideImplement/Trait.kt"); } } @@ -215,116 +199,102 @@ public class LineMarkersTestGenerated extends AbstractLineMarkersTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RecursiveCall extends AbstractLineMarkersTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecursiveCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker/recursiveCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("companionInvoke.kt") public void testCompanionInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/companionInvoke.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/companionInvoke.kt"); } @TestMetadata("conventionCall.kt") public void testConventionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/conventionCall.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/conventionCall.kt"); } @TestMetadata("differentImplicitReceiver.kt") public void testDifferentImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/differentImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/differentImplicitReceiver.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/extension.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/extension.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/generic.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/generic.kt"); } @TestMetadata("inInlinedFunctionExpression.kt") public void testInInlinedFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/inInlinedFunctionExpression.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/inInlinedFunctionExpression.kt"); } @TestMetadata("inInlinedLambda.kt") public void testInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/inInlinedLambda.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/inInlinedLambda.kt"); } @TestMetadata("inLambda.kt") public void testInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/inLambda.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/inLambda.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/localClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/localClass.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/localFun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/localFun.kt"); } @TestMetadata("methodReference.kt") public void testMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/methodReference.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/methodReference.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/nested.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/nested.kt"); } @TestMetadata("otherQualifier.kt") public void testOtherQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/otherQualifier.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/otherQualifier.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/propertyAccessors.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/propertyAccessors.kt"); } @TestMetadata("severalCallsInOneLine.kt") public void testSeveralCallsInOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/severalCallsInOneLine.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/severalCallsInOneLine.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/simple.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/simple.kt"); } @TestMetadata("superQualifier.kt") public void testSuperQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/superQualifier.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/superQualifier.kt"); } @TestMetadata("thisQualifier.kt") public void testThisQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/recursiveCall/thisQualifier.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/recursiveCall/thisQualifier.kt"); } } @@ -332,20 +302,22 @@ public class LineMarkersTestGenerated extends AbstractLineMarkersTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RunMarkers extends AbstractLineMarkersTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRunMarkers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker/runMarkers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jUnitTestClassWithSubclasses.kt") public void testJUnitTestClassWithSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/runMarkers/jUnitTestClassWithSubclasses.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/runMarkers/jUnitTestClassWithSubclasses.kt"); } @TestMetadata("testNGTestClassWithSubclasses.kt") public void testTestNGTestClassWithSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/runMarkers/testNGTestClassWithSubclasses.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/runMarkers/testNGTestClassWithSubclasses.kt"); } } @@ -353,20 +325,22 @@ public class LineMarkersTestGenerated extends AbstractLineMarkersTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendCall extends AbstractLineMarkersTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspendCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/lineMarker/suspendCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("suspendCall.kt") public void testSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/suspendCall/suspendCall.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/suspendCall/suspendCall.kt"); } @TestMetadata("suspendIteration.kt") public void testSuspendIteration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/lineMarker/suspendCall/suspendIteration.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/lineMarker/suspendCall/suspendIteration.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MoveOnCutPasteTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MoveOnCutPasteTestGenerated.java index ddb490b9bb6..f087579cb99 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MoveOnCutPasteTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MoveOnCutPasteTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MoveOnCutPasteTestGenerated extends AbstractMoveOnCutPasteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/copyPaste/moveDeclarations"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangePackage.kt") public void testChangePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/ChangePackage.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/ChangePackage.kt"); } @TestMetadata("Copy.kt") public void testCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/Copy.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/Copy.kt"); } @TestMetadata("FromAnonymousObject.kt") public void testFromAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/FromAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/FromAnonymousObject.kt"); } @TestMetadata("FromCompanionObjectToTopLevel.kt") public void testFromCompanionObjectToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/FromCompanionObjectToTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/FromCompanionObjectToTopLevel.kt"); } @TestMetadata("FromObjectToSameFile.kt") public void testFromObjectToSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/FromObjectToSameFile.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/FromObjectToSameFile.kt"); } @TestMetadata("FromObjectToTopLevel.kt") public void testFromObjectToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/FromObjectToTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/FromObjectToTopLevel.kt"); } @TestMetadata("OptimizeImportsAfterCut.kt") public void testOptimizeImportsAfterCut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/OptimizeImportsAfterCut.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/OptimizeImportsAfterCut.kt"); } @TestMetadata("SamePackage.kt") public void testSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/moveDeclarations/SamePackage.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/moveDeclarations/SamePackage.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MultiFileInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MultiFileInspectionTestGenerated.java index 67153d68f65..a672791c762 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MultiFileInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/MultiFileInspectionTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiFileInspectionTestGenerated extends AbstractMultiFileInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiFileInspections() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/multiFileInspections"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("fakeJvmFieldConstant/fakeJvmFieldConstant.test") public void testFakeJvmFieldConstant_FakeJvmFieldConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileInspections/fakeJvmFieldConstant/fakeJvmFieldConstant.test"); - doTest(fileName); + runTest("idea/testData/multiFileInspections/fakeJvmFieldConstant/fakeJvmFieldConstant.test"); } @TestMetadata("invalidBundleOrProperty/invalidBundleOrProperty.test") public void testInvalidBundleOrProperty_InvalidBundleOrProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileInspections/invalidBundleOrProperty/invalidBundleOrProperty.test"); - doTest(fileName); + runTest("idea/testData/multiFileInspections/invalidBundleOrProperty/invalidBundleOrProperty.test"); } @TestMetadata("kotlinInternalInJava/kotlinInternalInJava.test") public void testKotlinInternalInJava_KotlinInternalInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileInspections/kotlinInternalInJava/kotlinInternalInJava.test"); - doTest(fileName); + runTest("idea/testData/multiFileInspections/kotlinInternalInJava/kotlinInternalInJava.test"); } @TestMetadata("mainInTwoModules/mainInTwoModules.test") public void testMainInTwoModules_MainInTwoModules() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileInspections/mainInTwoModules/mainInTwoModules.test"); - doTest(fileName); + runTest("idea/testData/multiFileInspections/mainInTwoModules/mainInTwoModules.test"); } @TestMetadata("mismatchedProjectAndDirectory/mismatchedProjectAndDirectory.test") public void testMismatchedProjectAndDirectory_MismatchedProjectAndDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileInspections/mismatchedProjectAndDirectory/mismatchedProjectAndDirectory.test"); - doTest(fileName); + runTest("idea/testData/multiFileInspections/mismatchedProjectAndDirectory/mismatchedProjectAndDirectory.test"); } @TestMetadata("platformExtensionReceiverOfInline/platformExtensionReceiverOfInline.test") public void testPlatformExtensionReceiverOfInline_PlatformExtensionReceiverOfInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileInspections/platformExtensionReceiverOfInline/platformExtensionReceiverOfInline.test"); - doTest(fileName); + runTest("idea/testData/multiFileInspections/platformExtensionReceiverOfInline/platformExtensionReceiverOfInline.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java index 3ffc905e879..98cb0119d66 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/OutOfBlockModificationTestGenerated.java @@ -21,247 +21,211 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class OutOfBlockModificationTestGenerated extends AbstractOutOfBlockModificationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOutOfBlock() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/outOfBlock"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class_Class_FunNoType_Block.kt") public void testClass_Class_FunNoType_Block() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/Class_Class_FunNoType_Block.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/Class_Class_FunNoType_Block.kt"); } @TestMetadata("Class_Class_FunNoType_Block_Expression.kt") public void testClass_Class_FunNoType_Block_Expression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/Class_Class_FunNoType_Block_Expression.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/Class_Class_FunNoType_Block_Expression.kt"); } @TestMetadata("FunInFun.kt") public void testFunInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunInFun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunInFun.kt"); } @TestMetadata("FunInInitBlock.kt") public void testFunInInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunInInitBlock.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunInInitBlock.kt"); } @TestMetadata("FunNoBody.kt") public void testFunNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunNoBody.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunNoBody.kt"); } @TestMetadata("FunNoType_Block.kt") public void testFunNoType_Block() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunNoType_Block.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunNoType_Block.kt"); } @TestMetadata("FunNoType_Block_Class.kt") public void testFunNoType_Block_Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunNoType_Block_Class.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunNoType_Block_Class.kt"); } @TestMetadata("FunWithType_Initializer.kt") public void testFunWithType_Initializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunWithType_Initializer.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunWithType_Initializer.kt"); } @TestMetadata("FunWithType_Initializer_Expression.kt") public void testFunWithType_Initializer_Expression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/FunWithType_Initializer_Expression.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/FunWithType_Initializer_Expression.kt"); } @TestMetadata("InAntonymsObjectDeclaration.kt") public void testInAntonymsObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InAntonymsObjectDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InAntonymsObjectDeclaration.kt"); } @TestMetadata("InClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InClass.kt"); } @TestMetadata("InClassInClass.kt") public void testInClassInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InClassInClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InClassInClass.kt"); } @TestMetadata("InClassPropertyAccessor.kt") public void testInClassPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InClassPropertyAccessor.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InClassPropertyAccessor.kt"); } @TestMetadata("InFunInFunWithBody.kt") public void testInFunInFunWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunInFunWithBody.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunInFunWithBody.kt"); } @TestMetadata("InFunInFunctionInitializerInFun.kt") public void testInFunInFunctionInitializerInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunInFunctionInitializerInFun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunInFunctionInitializerInFun.kt"); } @TestMetadata("InFunInMultiDeclaration.kt") public void testInFunInMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunInMultiDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunInMultiDeclaration.kt"); } @TestMetadata("InFunInProperty.kt") public void testInFunInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunInProperty.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunInProperty.kt"); } @TestMetadata("InFunInPropertyInObjectLiteral.kt") public void testInFunInPropertyInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunInPropertyInObjectLiteral.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunInPropertyInObjectLiteral.kt"); } @TestMetadata("InFunObjectLiteral.kt") public void testInFunObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunObjectLiteral.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunObjectLiteral.kt"); } @TestMetadata("InFunWithInference.kt") public void testInFunWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunWithInference.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunWithInference.kt"); } @TestMetadata("InFunctionLiteral.kt") public void testInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InFunctionLiteral.kt"); } @TestMetadata("InGlobalPropertyWithGetter.kt") public void testInGlobalPropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InGlobalPropertyWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InGlobalPropertyWithGetter.kt"); } @TestMetadata("InMethod.kt") public void testInMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InMethod.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InMethod.kt"); } @TestMetadata("InPropertyAccessorWithInference.kt") public void testInPropertyAccessorWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InPropertyAccessorWithInference.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InPropertyAccessorWithInference.kt"); } @TestMetadata("InPropertyAccessorWithInferenceInClass.kt") public void testInPropertyAccessorWithInferenceInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InPropertyAccessorWithInferenceInClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InPropertyAccessorWithInferenceInClass.kt"); } @TestMetadata("InPropertyWithFunctionLiteral.kt") public void testInPropertyWithFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InPropertyWithFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InPropertyWithFunctionLiteral.kt"); } @TestMetadata("InPropertyWithInference.kt") public void testInPropertyWithInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InPropertyWithInference.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InPropertyWithInference.kt"); } @TestMetadata("InSuperTypeCallCallInLambdaInCall.kt") public void testInSuperTypeCallCallInLambdaInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InSuperTypeCallCallInLambdaInCall.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InSuperTypeCallCallInLambdaInCall.kt"); } @TestMetadata("InSuperTypeCallInLambaInBody.kt") public void testInSuperTypeCallInLambaInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InSuperTypeCallInLambaInBody.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InSuperTypeCallInLambaInBody.kt"); } @TestMetadata("InSuperTypeCallInLambdaParameters.kt") public void testInSuperTypeCallInLambdaParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InSuperTypeCallInLambdaParameters.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InSuperTypeCallInLambdaParameters.kt"); } @TestMetadata("InitBlock.kt") public void testInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/InitBlock.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/InitBlock.kt"); } @TestMetadata("Object_FunNoType_Block.kt") public void testObject_FunNoType_Block() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/Object_FunNoType_Block.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/Object_FunNoType_Block.kt"); } @TestMetadata("Object_FunNoType_Block_Expression.kt") public void testObject_FunNoType_Block_Expression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/Object_FunNoType_Block_Expression.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/Object_FunNoType_Block_Expression.kt"); } @TestMetadata("PropNotNullType_Initializer_ObjectLiteral_Fun.kt") public void testPropNotNullType_Initializer_ObjectLiteral_Fun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/PropNotNullType_Initializer_ObjectLiteral_Fun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/PropNotNullType_Initializer_ObjectLiteral_Fun.kt"); } @TestMetadata("PropNullType_Initializer_If_Fun.kt") public void testPropNullType_Initializer_If_Fun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/PropNullType_Initializer_If_Fun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/PropNullType_Initializer_If_Fun.kt"); } @TestMetadata("PropNullType_Initializer_ObjectLiteral_Fun.kt") public void testPropNullType_Initializer_ObjectLiteral_Fun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/PropNullType_Initializer_ObjectLiteral_Fun.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/PropNullType_Initializer_ObjectLiteral_Fun.kt"); } @TestMetadata("PropertyNoType_Initializer_String.kt") public void testPropertyNoType_Initializer_String() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/PropertyNoType_Initializer_String.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/PropertyNoType_Initializer_String.kt"); } @TestMetadata("PropertyWithType_Initializer_String.kt") public void testPropertyWithType_Initializer_String() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/PropertyWithType_Initializer_String.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/PropertyWithType_Initializer_String.kt"); } @TestMetadata("StringInSuperConstroctorCall.kt") public void testStringInSuperConstroctorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/StringInSuperConstroctorCall.kt"); } @TestMetadata("WholeFileChanged.kt") public void testWholeFileChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/outOfBlock/WholeFileChanged.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/outOfBlock/WholeFileChanged.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/CodeInsightActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/CodeInsightActionTestGenerated.java index 771837575d5..ad94e3737ff 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/CodeInsightActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/CodeInsightActionTestGenerated.java @@ -21,79 +21,71 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CodeInsightActionTestGenerated extends AbstractCodeInsightActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSecondaryConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/empty.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/empty.kt"); } @TestMetadata("emptyExists.kt") public void testEmptyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/emptyExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/emptyExists.kt"); } @TestMetadata("javaSupers.kt") public void testJavaSupers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/javaSupers.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/javaSupers.kt"); } @TestMetadata("javaSupersWithGenerics.kt") public void testJavaSupersWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/javaSupersWithGenerics.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/javaSupersWithGenerics.kt"); } @TestMetadata("primaryExists.kt") public void testPrimaryExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/primaryExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/primaryExists.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/properties.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/properties.kt"); } @TestMetadata("propertiesWithSupers.kt") public void testPropertiesWithSupers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/propertiesWithSupers.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/propertiesWithSupers.kt"); } @TestMetadata("supers.kt") public void testSupers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/supers.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/supers.kt"); } @TestMetadata("supersAllExist.kt") public void testSupersAllExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/supersAllExist.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/supersAllExist.kt"); } @TestMetadata("supersSomeExist.kt") public void testSupersSomeExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/supersSomeExist.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/supersSomeExist.kt"); } @TestMetadata("supersWithGenerics.kt") public void testSupersWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/supersWithGenerics.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/supersWithGenerics.kt"); } @TestMetadata("supersWithVarargs.kt") public void testSupersWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/secondaryConstructors/supersWithVarargs.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/secondaryConstructors/supersWithVarargs.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateHashCodeAndEqualsActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateHashCodeAndEqualsActionTestGenerated.java index e99c71ffa54..99a3eccc168 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateHashCodeAndEqualsActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateHashCodeAndEqualsActionTestGenerated.java @@ -21,175 +21,151 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GenerateHashCodeAndEqualsActionTestGenerated extends AbstractGenerateHashCodeAndEqualsActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEqualsWithHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/equalsWithHashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/annotation.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/annotation.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/arrays.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/arrays.kt"); } @TestMetadata("customAccessors.kt") public void testCustomAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/customAccessors.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/customAccessors.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/dataClass.kt"); } @TestMetadata("dataClassHasArrayProperty.kt") public void testDataClassHasArrayProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/dataClassHasArrayProperty.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/dataClassHasArrayProperty.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/enum.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/enum.kt"); } @TestMetadata("explicitDefaultAccessors.kt") public void testExplicitDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/explicitDefaultAccessors.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/explicitDefaultAccessors.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/genericClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/genericClass.kt"); } @TestMetadata("genericClassWithIsCheck.kt") public void testGenericClassWithIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/genericClassWithIsCheck.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/genericClassWithIsCheck.kt"); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/interface.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/interface.kt"); } @TestMetadata("keepQuotes.kt") public void testKeepQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/keepQuotes.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/keepQuotes.kt"); } @TestMetadata("multipleVars.kt") public void testMultipleVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVars.kt"); } @TestMetadata("multipleVarsCommon.kt") public void testMultipleVarsCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsCommon.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsCommon.kt"); } @TestMetadata("multipleVarsJS.kt") public void testMultipleVarsJS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsJS.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsJS.kt"); } @TestMetadata("multipleVarsNullable.kt") public void testMultipleVarsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsNullable.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsNullable.kt"); } @TestMetadata("multipleVarsWithSuperClass.kt") public void testMultipleVarsWithSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsWithSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/multipleVarsWithSuperClass.kt"); } @TestMetadata("nameClash.kt") public void testNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/nameClash.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/nameClash.kt"); } @TestMetadata("noVars.kt") public void testNoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/noVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/noVars.kt"); } @TestMetadata("noVarsCommon.kt") public void testNoVarsCommon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/noVarsCommon.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/noVarsCommon.kt"); } @TestMetadata("noVarsJS.kt") public void testNoVarsJS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/noVarsJS.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/noVarsJS.kt"); } @TestMetadata("noVarsWithSuperClass.kt") public void testNoVarsWithSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/noVarsWithSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/noVarsWithSuperClass.kt"); } @TestMetadata("nullableArrays.kt") public void testNullableArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/nullableArrays.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/nullableArrays.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/object.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/object.kt"); } @TestMetadata("singleVar.kt") public void testSingleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/singleVar.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/singleVar.kt"); } @TestMetadata("singleVarNullable.kt") public void testSingleVarNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarNullable.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarNullable.kt"); } @TestMetadata("singleVarWithIsCheck.kt") public void testSingleVarWithIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarWithIsCheck.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarWithIsCheck.kt"); } @TestMetadata("singleVarWithJavaSuperClass.kt") public void testSingleVarWithJavaSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarWithJavaSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarWithJavaSuperClass.kt"); } @TestMetadata("singleVarWithSuperClass.kt") public void testSingleVarWithSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarWithSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/equalsWithHashCode/singleVarWithSuperClass.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateTestSupportMethodActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateTestSupportMethodActionTestGenerated.java index 868408a4d17..d3a09024caf 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateTestSupportMethodActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateTestSupportMethodActionTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GenerateTestSupportMethodActionTestGenerated extends AbstractGenerateTestSupportMethodActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestFrameworkSupport() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/testFrameworkSupport"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,50 +33,47 @@ public class GenerateTestSupportMethodActionTestGenerated extends AbstractGenera @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JUnit4 extends AbstractGenerateTestSupportMethodActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJUnit4() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dataMethod.kt") public void testDataMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/dataMethod.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/dataMethod.kt"); } @TestMetadata("setUp.kt") public void testSetUp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUp.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUp.kt"); } @TestMetadata("setUpExists.kt") public void testSetUpExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUpExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUpExists.kt"); } @TestMetadata("setUpOverrides.kt") public void testSetUpOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUpOverrides.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/setUpOverrides.kt"); } @TestMetadata("tearDown.kt") public void testTearDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/tearDown.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/tearDown.kt"); } @TestMetadata("tearDownExists.kt") public void testTearDownExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/tearDownExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/tearDownExists.kt"); } @TestMetadata("testMethod.kt") public void testTestMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/testMethod.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/jUnit4/testMethod.kt"); } } @@ -80,38 +81,37 @@ public class GenerateTestSupportMethodActionTestGenerated extends AbstractGenera @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Junit3 extends AbstractGenerateTestSupportMethodActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJunit3() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/testFrameworkSupport/junit3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("setUp.kt") public void testSetUp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/setUp.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/setUp.kt"); } @TestMetadata("setUpExists.kt") public void testSetUpExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/setUpExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/setUpExists.kt"); } @TestMetadata("tearDown.kt") public void testTearDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/tearDown.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/tearDown.kt"); } @TestMetadata("tearDownExists.kt") public void testTearDownExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/tearDownExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/tearDownExists.kt"); } @TestMetadata("testMethod.kt") public void testTestMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/testMethod.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/junit3/testMethod.kt"); } } @@ -119,50 +119,47 @@ public class GenerateTestSupportMethodActionTestGenerated extends AbstractGenera @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TestNG extends AbstractGenerateTestSupportMethodActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTestNG() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/testFrameworkSupport/testNG"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dataMethod.kt") public void testDataMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/dataMethod.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/dataMethod.kt"); } @TestMetadata("setUp.kt") public void testSetUp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/setUp.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/setUp.kt"); } @TestMetadata("setUpExists.kt") public void testSetUpExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/setUpExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/setUpExists.kt"); } @TestMetadata("setUpOverrides.kt") public void testSetUpOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/setUpOverrides.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/setUpOverrides.kt"); } @TestMetadata("tearDown.kt") public void testTearDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/tearDown.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/tearDown.kt"); } @TestMetadata("tearDownExists.kt") public void testTearDownExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/tearDownExists.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/tearDownExists.kt"); } @TestMetadata("testMethod.kt") public void testTestMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/testMethod.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/testFrameworkSupport/testNG/testMethod.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateToStringActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateToStringActionTestGenerated.java index 07f4c686655..59cbec5fc25 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateToStringActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/generate/GenerateToStringActionTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GenerateToStringActionTestGenerated extends AbstractGenerateToStringActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/toString"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,26 +33,27 @@ public class GenerateToStringActionTestGenerated extends AbstractGenerateToStrin @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common extends AbstractGenerateToStringActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommon() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/toString/common"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/common/annotation.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/common/annotation.kt"); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/common/interface.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/common/interface.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/common/object.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/common/object.kt"); } } @@ -56,62 +61,57 @@ public class GenerateToStringActionTestGenerated extends AbstractGenerateToStrin @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultipeTemplates extends AbstractGenerateToStringActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultipeTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/toString/multipeTemplates"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/arrays.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/arrays.kt"); } @TestMetadata("customAccessors.kt") public void testCustomAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/customAccessors.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/customAccessors.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/dataClass.kt"); } @TestMetadata("keepQuotes.kt") public void testKeepQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/keepQuotes.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/keepQuotes.kt"); } @TestMetadata("multipleVars.kt") public void testMultipleVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/multipleVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/multipleVars.kt"); } @TestMetadata("multipleVarsWithSuperClass.kt") public void testMultipleVarsWithSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/multipleVarsWithSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/multipleVarsWithSuperClass.kt"); } @TestMetadata("noVars.kt") public void testNoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/noVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/noVars.kt"); } @TestMetadata("singleVar.kt") public void testSingleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/singleVar.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/singleVar.kt"); } @TestMetadata("superClassNoVars.kt") public void testSuperClassNoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/multipeTemplates/superClassNoVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/multipeTemplates/superClassNoVars.kt"); } } @@ -119,68 +119,62 @@ public class GenerateToStringActionTestGenerated extends AbstractGenerateToStrin @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SingleTemplate extends AbstractGenerateToStringActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSingleTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/generate/toString/singleTemplate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/arrays.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/arrays.kt"); } @TestMetadata("customAccessors.kt") public void testCustomAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/customAccessors.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/customAccessors.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/dataClass.kt"); } @TestMetadata("explicitDefaultAccessors.kt") public void testExplicitDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/explicitDefaultAccessors.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/explicitDefaultAccessors.kt"); } @TestMetadata("keepQuotes.kt") public void testKeepQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/keepQuotes.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/keepQuotes.kt"); } @TestMetadata("multipleVars.kt") public void testMultipleVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/multipleVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/multipleVars.kt"); } @TestMetadata("multipleVarsWithSuperClass.kt") public void testMultipleVarsWithSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/multipleVarsWithSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/multipleVarsWithSuperClass.kt"); } @TestMetadata("noVars.kt") public void testNoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/noVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/noVars.kt"); } @TestMetadata("singleVar.kt") public void testSingleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/singleVar.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/singleVar.kt"); } @TestMetadata("superClassNoVars.kt") public void testSuperClassNoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/generate/toString/singleTemplate/superClassNoVars.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/generate/toString/singleTemplate/superClassNoVars.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveLeftRightTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveLeftRightTestGenerated.java index 90a1852144d..a7e689bac51 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveLeftRightTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveLeftRightTestGenerated.java @@ -21,91 +21,81 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MoveLeftRightTestGenerated extends AbstractMoveLeftRightTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveLeftRight() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveLeftRight"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationParams.kt") public void testAnnotationParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/annotationParams.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/annotationParams.kt"); } @TestMetadata("basesList.kt") public void testBasesList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/basesList.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/basesList.kt"); } @TestMetadata("callArgs1.kt") public void testCallArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/callArgs1.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/callArgs1.kt"); } @TestMetadata("callArgs2.kt") public void testCallArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/callArgs2.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/callArgs2.kt"); } @TestMetadata("callArgs3.kt") public void testCallArgs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/callArgs3.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/callArgs3.kt"); } @TestMetadata("callArgs4.kt") public void testCallArgs4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/callArgs4.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/callArgs4.kt"); } @TestMetadata("callArgs5.kt") public void testCallArgs5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/callArgs5.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/callArgs5.kt"); } @TestMetadata("funParams1.kt") public void testFunParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/funParams1.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/funParams1.kt"); } @TestMetadata("funParams2.kt") public void testFunParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/funParams2.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/funParams2.kt"); } @TestMetadata("funParams3.kt") public void testFunParams3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/funParams3.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/funParams3.kt"); } @TestMetadata("funParams4.kt") public void testFunParams4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/funParams4.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/funParams4.kt"); } @TestMetadata("indexArgs.kt") public void testIndexArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/indexArgs.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/indexArgs.kt"); } @TestMetadata("lambdaParams.kt") public void testLambdaParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/lambdaParams.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/lambdaParams.kt"); } @TestMetadata("typeArgs.kt") public void testTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveLeftRight/typeArgs.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/moveLeftRight/typeArgs.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveStatementTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveStatementTestGenerated.java index 6264416b011..bd0cc3f001c 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveStatementTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/moveUpDown/MoveStatementTestGenerated.java @@ -23,6 +23,10 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassBodyDeclarations extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassBodyDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -31,28 +35,28 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessor1.kt") public void testAccessor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor1.kt"); } @TestMetadata("accessor2.kt") public void testAccessor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor2.kt"); } @TestMetadata("accessor3.kt") public void testAccessor3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor3.kt"); } @TestMetadata("accessor4.kt") public void testAccessor4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor4.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/accessors/accessor4.kt"); } public void testAllFilesPresentInAccessors() throws Exception { @@ -64,128 +68,112 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("classAtBrace1.kt") public void testClassAtBrace1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace1.kt"); } @TestMetadata("classAtBrace2.kt") public void testClassAtBrace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace2.kt"); } @TestMetadata("classAtBrace3.kt") public void testClassAtBrace3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace3.kt"); } @TestMetadata("classAtBrace4.kt") public void testClassAtBrace4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace4.kt"); } @TestMetadata("classAtBrace5.kt") public void testClassAtBrace5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace5.kt"); } @TestMetadata("classAtBrace6.kt") public void testClassAtBrace6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtBrace6.kt"); } @TestMetadata("classAtClass1.kt") public void testClassAtClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass1.kt"); } @TestMetadata("classAtClass2.kt") public void testClassAtClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClass2.kt"); } @TestMetadata("classAtClassInitializer1.kt") public void testClassAtClassInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt"); } @TestMetadata("classAtClassInitializer2.kt") public void testClassAtClassInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt"); } @TestMetadata("classAtEmptyLine1.kt") public void testClassAtEmptyLine1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine1.kt"); } @TestMetadata("classAtEmptyLine2.kt") public void testClassAtEmptyLine2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtEmptyLine2.kt"); } @TestMetadata("classAtFunction1.kt") public void testClassAtFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction1.kt"); } @TestMetadata("classAtFunction2.kt") public void testClassAtFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtFunction2.kt"); } @TestMetadata("classAtProperty1.kt") public void testClassAtProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty1.kt"); } @TestMetadata("classAtProperty2.kt") public void testClassAtProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtProperty2.kt"); } @TestMetadata("classWithoutBody1.kt") public void testClassWithoutBody1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody1.kt"); } @TestMetadata("classWithoutBody2.kt") public void testClassWithoutBody2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody2.kt"); } @TestMetadata("classWithoutBody3.kt") public void testClassWithoutBody3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody3.kt"); } @TestMetadata("classWithoutBody4.kt") public void testClassWithoutBody4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classWithoutBody4.kt"); } } @@ -193,80 +181,72 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassInitializer extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassInitializer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("classInitializerAtBrace1.kt") public void testClassInitializerAtBrace1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace1.kt"); } @TestMetadata("classInitializerAtBrace2.kt") public void testClassInitializerAtBrace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace2.kt"); } @TestMetadata("classInitializerAtClass1.kt") public void testClassInitializerAtClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt"); } @TestMetadata("classInitializerAtClass2.kt") public void testClassInitializerAtClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt"); } @TestMetadata("classInitializerAtClassInitializer1.kt") public void testClassInitializerAtClassInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt"); } @TestMetadata("classInitializerAtClassInitializer2.kt") public void testClassInitializerAtClassInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt"); } @TestMetadata("classInitializerAtEmptyLine1.kt") public void testClassInitializerAtEmptyLine1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt"); } @TestMetadata("classInitializerAtEmptyLine2.kt") public void testClassInitializerAtEmptyLine2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt"); } @TestMetadata("classInitializerAtFunction1.kt") public void testClassInitializerAtFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt"); } @TestMetadata("classInitializerAtFunction2.kt") public void testClassInitializerAtFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt"); } @TestMetadata("classInitializerAtProperty1.kt") public void testClassInitializerAtProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt"); } @TestMetadata("classInitializerAtProperty2.kt") public void testClassInitializerAtProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt"); } } @@ -274,56 +254,52 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enums extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnums() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enum1.kt") public void testEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum1.kt"); } @TestMetadata("enum2.kt") public void testEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum2.kt"); } @TestMetadata("enum3.kt") public void testEnum3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum3.kt"); } @TestMetadata("enum4.kt") public void testEnum4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum4.kt"); } @TestMetadata("enum5.kt") public void testEnum5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum5.kt"); } @TestMetadata("enum6.kt") public void testEnum6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum6.kt"); } @TestMetadata("enum7.kt") public void testEnum7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum7.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum7.kt"); } @TestMetadata("enum8.kt") public void testEnum8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum8.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/enums/enum8.kt"); } } @@ -331,110 +307,97 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("functionAtBrace1.kt") public void testFunctionAtBrace1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace1.kt"); } @TestMetadata("functionAtBrace2.kt") public void testFunctionAtBrace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace2.kt"); } @TestMetadata("functionAtBrace3.kt") public void testFunctionAtBrace3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace3.kt"); } @TestMetadata("functionAtBrace4.kt") public void testFunctionAtBrace4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace4.kt"); } @TestMetadata("functionAtBrace5.kt") public void testFunctionAtBrace5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace5.kt"); } @TestMetadata("functionAtBrace6.kt") public void testFunctionAtBrace6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtBrace6.kt"); } @TestMetadata("functionAtClass1.kt") public void testFunctionAtClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass1.kt"); } @TestMetadata("functionAtClass2.kt") public void testFunctionAtClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClass2.kt"); } @TestMetadata("functionAtClassInitializer1.kt") public void testFunctionAtClassInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt"); } @TestMetadata("functionAtClassInitializer2.kt") public void testFunctionAtClassInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt"); } @TestMetadata("functionAtEmptyLine1.kt") public void testFunctionAtEmptyLine1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine1.kt"); } @TestMetadata("functionAtEmptyLine2.kt") public void testFunctionAtEmptyLine2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtEmptyLine2.kt"); } @TestMetadata("functionAtFunction1.kt") public void testFunctionAtFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction1.kt"); } @TestMetadata("functionAtFunction2.kt") public void testFunctionAtFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtFunction2.kt"); } @TestMetadata("functionAtProperty1.kt") public void testFunctionAtProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty1.kt"); } @TestMetadata("functionAtProperty2.kt") public void testFunctionAtProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtProperty2.kt"); } @TestMetadata("functionAtTheScriptEnd.kts") public void testFunctionAtTheScriptEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtTheScriptEnd.kts"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtTheScriptEnd.kts"); } } @@ -442,44 +405,42 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionAnchors extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionAnchors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("keyword.kt") public void testKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/keyword.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/keyword.kt"); } @TestMetadata("name.kt") public void testName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/name.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/name.kt"); } @TestMetadata("returnType.kt") public void testReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/returnType.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/returnType.kt"); } @TestMetadata("typeParams1.kt") public void testTypeParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/typeParams1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/typeParams1.kt"); } @TestMetadata("typeParams2.kt") public void testTypeParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/typeParams2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/typeParams2.kt"); } @TestMetadata("typeParams3.kt") public void testTypeParams3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/typeParams3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/functionAnchors/typeParams3.kt"); } } @@ -487,104 +448,92 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("propertyAtBrace1.kt") public void testPropertyAtBrace1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace1.kt"); } @TestMetadata("propertyAtBrace2.kt") public void testPropertyAtBrace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace2.kt"); } @TestMetadata("propertyAtBrace3.kt") public void testPropertyAtBrace3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace3.kt"); } @TestMetadata("propertyAtBrace4.kt") public void testPropertyAtBrace4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace4.kt"); } @TestMetadata("propertyAtBrace5.kt") public void testPropertyAtBrace5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace5.kt"); } @TestMetadata("propertyAtBrace6.kt") public void testPropertyAtBrace6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtBrace6.kt"); } @TestMetadata("propertyAtClass1.kt") public void testPropertyAtClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass1.kt"); } @TestMetadata("propertyAtClass2.kt") public void testPropertyAtClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClass2.kt"); } @TestMetadata("propertyAtClassInitializer1.kt") public void testPropertyAtClassInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt"); } @TestMetadata("propertyAtClassInitializer2.kt") public void testPropertyAtClassInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt"); } @TestMetadata("propertyAtEmptyLine1.kt") public void testPropertyAtEmptyLine1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine1.kt"); } @TestMetadata("propertyAtEmptyLine2.kt") public void testPropertyAtEmptyLine2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtEmptyLine2.kt"); } @TestMetadata("propertyAtFunction1.kt") public void testPropertyAtFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction1.kt"); } @TestMetadata("propertyAtFunction2.kt") public void testPropertyAtFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtFunction2.kt"); } @TestMetadata("propertyAtProperty1.kt") public void testPropertyAtProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty1.kt"); } @TestMetadata("propertyAtProperty2.kt") public void testPropertyAtProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtProperty2.kt"); } } @@ -592,26 +541,27 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyAnchors extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestClassBodyDeclaration, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyAnchors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("keyword.kt") public void testKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors/keyword.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors/keyword.kt"); } @TestMetadata("name.kt") public void testName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors/name.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors/name.kt"); } @TestMetadata("returnType.kt") public void testReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors/returnType.kt"); - doTestClassBodyDeclaration(fileName); + runTest("idea/testData/codeInsight/moveUpDown/classBodyDeclarations/propertyAnchors/returnType.kt"); } } } @@ -620,6 +570,10 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClosingBraces extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClosingBraces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -628,20 +582,22 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class For extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces/for"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("for1.kt") public void testFor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/for/for1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/for/for1.kt"); } @TestMetadata("for2.kt") public void testFor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/for/for2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/for/for2.kt"); } } @@ -649,32 +605,32 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("function1.kt") public void testFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/function/function1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/function/function1.kt"); } @TestMetadata("function2.kt") public void testFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/function/function2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/function/function2.kt"); } @TestMetadata("function3.kt") public void testFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/function/function3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/function/function3.kt"); } @TestMetadata("function4.kt") public void testFunction4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/function/function4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/function/function4.kt"); } } @@ -682,32 +638,32 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class If extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces/if"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("if1.kt") public void testIf1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/if/if1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/if/if1.kt"); } @TestMetadata("if2.kt") public void testIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/if/if2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/if/if2.kt"); } @TestMetadata("if3.kt") public void testIf3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/if/if3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/if/if3.kt"); } @TestMetadata("if4.kt") public void testIf4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/if/if4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/if/if4.kt"); } } @@ -715,20 +671,22 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nested1.kt") public void testNested1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/nested/nested1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/nested/nested1.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/nested/nested2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/nested/nested2.kt"); } } @@ -736,44 +694,42 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("when1.kt") public void testWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/when/when1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/when/when1.kt"); } @TestMetadata("when2.kt") public void testWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/when/when2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/when/when2.kt"); } @TestMetadata("whenEntry1.kt") public void testWhenEntry1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry1.kt"); } @TestMetadata("whenEntry2.kt") public void testWhenEntry2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry2.kt"); } @TestMetadata("whenEntry3.kt") public void testWhenEntry3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry3.kt"); } @TestMetadata("whenEntry4.kt") public void testWhenEntry4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/when/whenEntry4.kt"); } } @@ -781,32 +737,32 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class While extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/closingBraces/while"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("while1.kt") public void testWhile1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/while/while1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/while/while1.kt"); } @TestMetadata("while2.kt") public void testWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/while/while2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/while/while2.kt"); } @TestMetadata("while3.kt") public void testWhile3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/while/while3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/while/while3.kt"); } @TestMetadata("while4.kt") public void testWhile4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/closingBraces/while/while4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/closingBraces/while/while4.kt"); } } } @@ -815,476 +771,402 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/expressions"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("binaryExpr1.kt") public void testBinaryExpr1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/binaryExpr1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/binaryExpr1.kt"); } @TestMetadata("binaryExpr2.kt") public void testBinaryExpr2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/binaryExpr2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/binaryExpr2.kt"); } @TestMetadata("closureBlockBoundary1.kt") public void testClosureBlockBoundary1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureBlockBoundary1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureBlockBoundary1.kt"); } @TestMetadata("closureBlockBoundary2.kt") public void testClosureBlockBoundary2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureBlockBoundary2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureBlockBoundary2.kt"); } @TestMetadata("closureInDoWhile1.kt") public void testClosureInDoWhile1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInDoWhile1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInDoWhile1.kt"); } @TestMetadata("closureInDoWhile2.kt") public void testClosureInDoWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInDoWhile2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInDoWhile2.kt"); } @TestMetadata("closureInFor1.kt") public void testClosureInFor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInFor1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInFor1.kt"); } @TestMetadata("closureInFor2.kt") public void testClosureInFor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInFor2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInFor2.kt"); } @TestMetadata("closureInIf1.kt") public void testClosureInIf1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInIf1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInIf1.kt"); } @TestMetadata("closureInIf2.kt") public void testClosureInIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInIf2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInIf2.kt"); } @TestMetadata("closureInWhile1.kt") public void testClosureInWhile1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInWhile1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInWhile1.kt"); } @TestMetadata("closureInWhile2.kt") public void testClosureInWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureInWhile2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureInWhile2.kt"); } @TestMetadata("closureWthoutSpaces1.kt") public void testClosureWthoutSpaces1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureWthoutSpaces1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureWthoutSpaces1.kt"); } @TestMetadata("closureWthoutSpaces2.kt") public void testClosureWthoutSpaces2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/closureWthoutSpaces2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/closureWthoutSpaces2.kt"); } @TestMetadata("declaration1.kt") public void testDeclaration1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/declaration1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/declaration1.kt"); } @TestMetadata("declaration2.kt") public void testDeclaration2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/declaration2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/declaration2.kt"); } @TestMetadata("If1.kt") public void testIf1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/If1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/If1.kt"); } @TestMetadata("if2.kt") public void testIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/if2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/if2.kt"); } @TestMetadata("if3.kt") public void testIf3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/if3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/if3.kt"); } @TestMetadata("if4.kt") public void testIf4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/if4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/if4.kt"); } @TestMetadata("ifExprToBlock1.kt") public void testIfExprToBlock1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/ifExprToBlock1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/ifExprToBlock1.kt"); } @TestMetadata("ifExprToBlock2.kt") public void testIfExprToBlock2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/ifExprToBlock2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/ifExprToBlock2.kt"); } @TestMetadata("ifToBlock1.kt") public void testIfToBlock1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/ifToBlock1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/ifToBlock1.kt"); } @TestMetadata("ifToBlock2.kt") public void testIfToBlock2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/ifToBlock2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/ifToBlock2.kt"); } @TestMetadata("insideExpression1.kt") public void testInsideExpression1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/insideExpression1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/insideExpression1.kt"); } @TestMetadata("insideExpression2.kt") public void testInsideExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/insideExpression2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/insideExpression2.kt"); } @TestMetadata("insideExpression3.kt") public void testInsideExpression3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/insideExpression3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/insideExpression3.kt"); } @TestMetadata("insideExpression4.kt") public void testInsideExpression4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/insideExpression4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/insideExpression4.kt"); } @TestMetadata("intoCatch.kt") public void testIntoCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoCatch.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoCatch.kt"); } @TestMetadata("intoClosure1.kt") public void testIntoClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoClosure1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoClosure1.kt"); } @TestMetadata("intoClosure2.kt") public void testIntoClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoClosure2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoClosure2.kt"); } @TestMetadata("intoClosureWithParams1.kt") public void testIntoClosureWithParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoClosureWithParams1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoClosureWithParams1.kt"); } @TestMetadata("intoElse1.kt") public void testIntoElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoElse1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoElse1.kt"); } @TestMetadata("intoElse2.kt") public void testIntoElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoElse2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoElse2.kt"); } @TestMetadata("intoElse3.kt") public void testIntoElse3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoElse3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoElse3.kt"); } @TestMetadata("intoElse4.kt") public void testIntoElse4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoElse4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoElse4.kt"); } @TestMetadata("intoElseIf.kt") public void testIntoElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoElseIf.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoElseIf.kt"); } @TestMetadata("intoFinally.kt") public void testIntoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoFinally.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoFinally.kt"); } @TestMetadata("intoNestedClosure1.kt") public void testIntoNestedClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoNestedClosure1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoNestedClosure1.kt"); } @TestMetadata("intoNestedClosure2.kt") public void testIntoNestedClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoNestedClosure2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoNestedClosure2.kt"); } @TestMetadata("intoNestedClosureWithParams1.kt") public void testIntoNestedClosureWithParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoNestedClosureWithParams1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoNestedClosureWithParams1.kt"); } @TestMetadata("intoWhenElse.kt") public void testIntoWhenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoWhenElse.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoWhenElse.kt"); } @TestMetadata("intoWhenEntry.kt") public void testIntoWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/intoWhenEntry.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/intoWhenEntry.kt"); } @TestMetadata("lambda1.kt") public void testLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/lambda1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/lambda1.kt"); } @TestMetadata("lambda2.kt") public void testLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/lambda2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/lambda2.kt"); } @TestMetadata("lambda3.kt") public void testLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/lambda3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/lambda3.kt"); } @TestMetadata("multilineComment1.kt") public void testMultilineComment1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineComment1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment1.kt"); } @TestMetadata("multilineComment2.kt") public void testMultilineComment2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineComment2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment2.kt"); } @TestMetadata("multilineComment3.kt") public void testMultilineComment3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineComment3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment3.kt"); } @TestMetadata("multilineComment4.kt") public void testMultilineComment4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineComment4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment4.kt"); } @TestMetadata("multilineComment5.kt") public void testMultilineComment5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineComment5.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment5.kt"); } @TestMetadata("multilineComment6.kt") public void testMultilineComment6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineComment6.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment6.kt"); } @TestMetadata("multilineExpressionWithClosure1.kt") public void testMultilineExpressionWithClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineExpressionWithClosure1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineExpressionWithClosure1.kt"); } @TestMetadata("multilineExpressionWithClosure2.kt") public void testMultilineExpressionWithClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/multilineExpressionWithClosure2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineExpressionWithClosure2.kt"); } @TestMetadata("outOfClosure1.kt") public void testOutOfClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfClosure1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfClosure1.kt"); } @TestMetadata("outOfClosure2.kt") public void testOutOfClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfClosure2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfClosure2.kt"); } @TestMetadata("outOfClosureInScriptsDown.kts") public void testOutOfClosureInScriptsDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfClosureInScriptsDown.kts"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfClosureInScriptsDown.kts"); } @TestMetadata("outOfClosureInScriptsUp.kts") public void testOutOfClosureInScriptsUp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfClosureInScriptsUp.kts"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfClosureInScriptsUp.kts"); } @TestMetadata("outOfClosureWithParams1.kt") public void testOutOfClosureWithParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfClosureWithParams1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfClosureWithParams1.kt"); } @TestMetadata("outOfElse1.kt") public void testOutOfElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfElse1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfElse1.kt"); } @TestMetadata("outOfElse2.kt") public void testOutOfElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfElse2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfElse2.kt"); } @TestMetadata("outOfNestedClosure1.kt") public void testOutOfNestedClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfNestedClosure1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfNestedClosure1.kt"); } @TestMetadata("outOfNestedClosure2.kt") public void testOutOfNestedClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfNestedClosure2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfNestedClosure2.kt"); } @TestMetadata("outOfNestedClosureWithParams1.kt") public void testOutOfNestedClosureWithParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/outOfNestedClosureWithParams1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/outOfNestedClosureWithParams1.kt"); } @TestMetadata("qualifiedCall1.kt") public void testQualifiedCall1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/qualifiedCall1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/qualifiedCall1.kt"); } @TestMetadata("qualifiedCall2.kt") public void testQualifiedCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/qualifiedCall2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/qualifiedCall2.kt"); } @TestMetadata("when1.kt") public void testWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/when1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/when1.kt"); } @TestMetadata("when2.kt") public void testWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/when2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/when2.kt"); } @TestMetadata("whenEntry1.kt") public void testWhenEntry1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whenEntry1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whenEntry1.kt"); } @TestMetadata("whenEntry2.kt") public void testWhenEntry2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whenEntry2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whenEntry2.kt"); } @TestMetadata("whenEntry3.kt") public void testWhenEntry3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whenEntry3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whenEntry3.kt"); } @TestMetadata("whenEntry4.kt") public void testWhenEntry4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whenEntry4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whenEntry4.kt"); } @TestMetadata("whenEntry5.kt") public void testWhenEntry5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whenEntry5.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whenEntry5.kt"); } @TestMetadata("whenEntry6.kt") public void testWhenEntry6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whenEntry6.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whenEntry6.kt"); } @TestMetadata("while1.kt") public void testWhile1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/while1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/while1.kt"); } @TestMetadata("while2.kt") public void testWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/while2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/while2.kt"); } @TestMetadata("whileToBlock1.kt") public void testWhileToBlock1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whileToBlock1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whileToBlock1.kt"); } @TestMetadata("whileToBlock2.kt") public void testWhileToBlock2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/expressions/whileToBlock2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/expressions/whileToBlock2.kt"); } } @@ -1292,116 +1174,102 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParametersAndArguments extends AbstractMoveStatementTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParametersAndArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/moveUpDown/parametersAndArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callArgs1.kt") public void testCallArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs1.kt"); } @TestMetadata("callArgs2.kt") public void testCallArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs2.kt"); } @TestMetadata("callArgs3.kt") public void testCallArgs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs3.kt"); } @TestMetadata("callArgs4.kt") public void testCallArgs4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs4.kt"); } @TestMetadata("callArgs5.kt") public void testCallArgs5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs5.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs5.kt"); } @TestMetadata("callArgs6.kt") public void testCallArgs6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs6.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/callArgs6.kt"); } @TestMetadata("classParams1.kt") public void testClassParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams1.kt"); } @TestMetadata("classParams2.kt") public void testClassParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams2.kt"); } @TestMetadata("classParams3.kt") public void testClassParams3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams3.kt"); } @TestMetadata("classParams4.kt") public void testClassParams4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams4.kt"); } @TestMetadata("classParams5.kt") public void testClassParams5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams5.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams5.kt"); } @TestMetadata("classParams6.kt") public void testClassParams6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams6.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/classParams6.kt"); } @TestMetadata("funParams1.kt") public void testFunParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams1.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams1.kt"); } @TestMetadata("funParams2.kt") public void testFunParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams2.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams2.kt"); } @TestMetadata("funParams3.kt") public void testFunParams3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams3.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams3.kt"); } @TestMetadata("funParams4.kt") public void testFunParams4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams4.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams4.kt"); } @TestMetadata("funParams5.kt") public void testFunParams5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams5.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams5.kt"); } @TestMetadata("funParams6.kt") public void testFunParams6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams6.kt"); - doTestExpression(fileName); + runTest("idea/testData/codeInsight/moveUpDown/parametersAndArguments/funParams6.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/PostfixTemplateProviderTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/PostfixTemplateProviderTestGenerated.java index e60fbb5d232..38175a7b50c 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/PostfixTemplateProviderTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/postfix/PostfixTemplateProviderTestGenerated.java @@ -21,229 +21,196 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class PostfixTemplateProviderTestGenerated extends AbstractPostfixTemplateProviderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPostfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/postfix"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/assert.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/assert.kt"); } @TestMetadata("assertNonTopLevel.kt") public void testAssertNonTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/assertNonTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/assertNonTopLevel.kt"); } @TestMetadata("doNotProposeWrappingIncrement.kt") public void testDoNotProposeWrappingIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/doNotProposeWrappingIncrement.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/doNotProposeWrappingIncrement.kt"); } @TestMetadata("else.kt") public void testElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/else.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/else.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/for.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/for.kt"); } @TestMetadata("forOnMap.kt") public void testForOnMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/forOnMap.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/forOnMap.kt"); } @TestMetadata("forOnString.kt") public void testForOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/forOnString.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/forOnString.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/if.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/if.kt"); } @TestMetadata("iter.kt") public void testIter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/iter.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/iter.kt"); } @TestMetadata("noParOnLoop.kt") public void testNoParOnLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/noParOnLoop.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/noParOnLoop.kt"); } @TestMetadata("noReturnForNonStatement.kt") public void testNoReturnForNonStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/noReturnForNonStatement.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/noReturnForNonStatement.kt"); } @TestMetadata("notBoolean.kt") public void testNotBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/notBoolean.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/notBoolean.kt"); } @TestMetadata("notString.kt") public void testNotString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/notString.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/notString.kt"); } @TestMetadata("notnull.kt") public void testNotnull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/notnull.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/notnull.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/null.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/null.kt"); } @TestMetadata("par.kt") public void testPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/par.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/par.kt"); } @TestMetadata("parAfterUserType.kt") public void testParAfterUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/parAfterUserType.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/parAfterUserType.kt"); } @TestMetadata("parAssignment.kt") public void testParAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/parAssignment.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/parAssignment.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/return.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/return.kt"); } @TestMetadata("returnFromLoop.kt") public void testReturnFromLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/returnFromLoop.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/returnFromLoop.kt"); } @TestMetadata("sout.kt") public void testSout() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/sout.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/sout.kt"); } @TestMetadata("soutInIf.kt") public void testSoutInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/soutInIf.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/soutInIf.kt"); } @TestMetadata("soutInLoop.kt") public void testSoutInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/soutInLoop.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/soutInLoop.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/try.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/try.kt"); } @TestMetadata("tryInLocalClass.kt") public void testTryInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/tryInLocalClass.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/tryInLocalClass.kt"); } @TestMetadata("tryOnFor.kt") public void testTryOnFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/tryOnFor.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/tryOnFor.kt"); } @TestMetadata("tryOnImportStatement.kt") public void testTryOnImportStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/tryOnImportStatement.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/tryOnImportStatement.kt"); } @TestMetadata("tryOnStatement.kt") public void testTryOnStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/tryOnStatement.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/tryOnStatement.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/val.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/val.kt"); } @TestMetadata("valAfterReceiver.kt") public void testValAfterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/valAfterReceiver.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/valAfterReceiver.kt"); } @TestMetadata("valAfterSelector.kt") public void testValAfterSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/valAfterSelector.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/valAfterSelector.kt"); } @TestMetadata("valAtLamba.kt") public void testValAtLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/valAtLamba.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/valAtLamba.kt"); } @TestMetadata("valAtLambaArgumentInCall.kt") public void testValAtLambaArgumentInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/valAtLambaArgumentInCall.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/valAtLambaArgumentInCall.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/var.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/var.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/when.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/when.kt"); } @TestMetadata("whenExpression.kt") public void testWhenExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/whenExpression.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/whenExpression.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/postfix/while.kt"); - doTest(fileName); + runTest("idea/testData/codeInsight/postfix/while.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/surroundWith/SurroundWithTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/surroundWith/SurroundWithTestGenerated.java index 57a10455d95..4d064af1272 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/surroundWith/SurroundWithTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/surroundWith/SurroundWithTestGenerated.java @@ -23,56 +23,57 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class If extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("block.kt") public void testBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/block.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/block.kt"); } @TestMetadata("emptyLine.kt") public void testEmptyLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/emptyLine.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/emptyLine.kt"); } @TestMetadata("severalStatements.kt") public void testSeveralStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/severalStatements.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/severalStatements.kt"); } @TestMetadata("singleStatement.kt") public void testSingleStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/singleStatement.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/singleStatement.kt"); } @TestMetadata("singleStatementAtCaret.kt") public void testSingleStatementAtCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/singleStatementAtCaret.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/singleStatementAtCaret.kt"); } @TestMetadata("usedAsExpression.kt") public void testUsedAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/usedAsExpression.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/usedAsExpression.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/variable.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/variable.kt"); } @TestMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveDeclarationsOut extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveDeclarationsOut() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -81,20 +82,22 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classInType.kt") public void testClassInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/class/classInType.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/class/classInType.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/class/localClass.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/class/localClass.kt"); } } @@ -102,26 +105,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("firstChildLocalFun.kt") public void testFirstChildLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function/firstChildLocalFun.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function/firstChildLocalFun.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function/localFun.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function/localFun.kt"); } @TestMetadata("unusedLocalFun.kt") public void testUnusedLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function/unusedLocalFun.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/function/unusedLocalFun.kt"); } } @@ -129,14 +133,17 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Object extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/object"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/object/localObject.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/object/localObject.kt"); } } @@ -144,26 +151,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Order extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("twoClasses.kt") public void testTwoClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order/twoClasses.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order/twoClasses.kt"); } @TestMetadata("valAndClass.kt") public void testValAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order/valAndClass.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order/valAndClass.kt"); } @TestMetadata("valOrder.kt") public void testValOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order/valOrder.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/order/valOrder.kt"); } } @@ -171,38 +179,37 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Val extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fullQualifiedType.kt") public void testFullQualifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/fullQualifiedType.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/fullQualifiedType.kt"); } @TestMetadata("fullQualifiedTypeWithoutTypeRef.kt") public void testFullQualifiedTypeWithoutTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/fullQualifiedTypeWithoutTypeRef.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/fullQualifiedTypeWithoutTypeRef.kt"); } @TestMetadata("valWithTypeWithInitializer.kt") public void testValWithTypeWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/valWithTypeWithInitializer.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/valWithTypeWithInitializer.kt"); } @TestMetadata("valWithTypeWoInitializer.kt") public void testValWithTypeWoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/valWithTypeWoInitializer.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/valWithTypeWoInitializer.kt"); } @TestMetadata("valWoTypeWithInitializer.kt") public void testValWoTypeWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/valWoTypeWithInitializer.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/val/valWoTypeWithInitializer.kt"); } } @@ -210,52 +217,54 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Var extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVar() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("varWithNotNullableTypeWithInitializer.kt") public void testVarWithNotNullableTypeWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/varWithNotNullableTypeWithInitializer.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/varWithNotNullableTypeWithInitializer.kt"); } @TestMetadata("varWithTypeWoInitializer.kt") public void testVarWithTypeWoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/varWithTypeWoInitializer.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/varWithTypeWoInitializer.kt"); } @TestMetadata("varWoTypeWithInitializer.kt") public void testVarWoTypeWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/varWoTypeWithInitializer.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/varWoTypeWithInitializer.kt"); } @TestMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultValue extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultValue() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue/boolean.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue/boolean.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue/nullable.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue/nullable.kt"); } @TestMetadata("primitiveNumbers.kt") public void testPrimitiveNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue/primitiveNumbers.kt"); - doTestWithIfSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/if/moveDeclarationsOut/var/defaultValue/primitiveNumbers.kt"); } } } @@ -266,56 +275,52 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfElse extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfElseSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfElse() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/ifElse"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("block.kt") public void testBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/block.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/block.kt"); } @TestMetadata("moveDeclarationsOutVal.kt") public void testMoveDeclarationsOutVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/moveDeclarationsOutVal.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/moveDeclarationsOutVal.kt"); } @TestMetadata("moveDeclarationsOutVar.kt") public void testMoveDeclarationsOutVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/moveDeclarationsOutVar.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/moveDeclarationsOutVar.kt"); } @TestMetadata("severalStatements.kt") public void testSeveralStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/severalStatements.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/severalStatements.kt"); } @TestMetadata("singleStatement.kt") public void testSingleStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/singleStatement.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/singleStatement.kt"); } @TestMetadata("singleStatementAtCaret.kt") public void testSingleStatementAtCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/singleStatementAtCaret.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/singleStatementAtCaret.kt"); } @TestMetadata("usedAsExpression.kt") public void testUsedAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/usedAsExpression.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/usedAsExpression.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElse/variable.kt"); - doTestWithIfElseSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElse/variable.kt"); } } @@ -323,26 +328,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfElseExpression extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfElseExpressionSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfElseExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/ifElseExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asStatement.kt") public void testAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElseExpression/asStatement.kt"); - doTestWithIfElseExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElseExpression/asStatement.kt"); } @TestMetadata("paranthesized.kt") public void testParanthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElseExpression/paranthesized.kt"); - doTestWithIfElseExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElseExpression/paranthesized.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElseExpression/singleExpression.kt"); - doTestWithIfElseExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElseExpression/singleExpression.kt"); } } @@ -350,20 +356,22 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfElseExpressionBraces extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithIfElseExpressionBracesSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfElseExpressionBraces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/ifElseExpressionBraces"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asStatement.kt") public void testAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElseExpressionBraces/asStatement.kt"); - doTestWithIfElseExpressionBracesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElseExpressionBraces/asStatement.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/ifElseExpressionBraces/singleExpression.kt"); - doTestWithIfElseExpressionBracesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/ifElseExpressionBraces/singleExpression.kt"); } } @@ -371,50 +379,47 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Not extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithNotSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/not"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("booleanExpr.kt") public void testBooleanExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/booleanExpr.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/booleanExpr.kt"); } @TestMetadata("booleanExprAtCaret.kt") public void testBooleanExprAtCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/booleanExprAtCaret.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/booleanExprAtCaret.kt"); } @TestMetadata("expressionInIf.kt") public void testExpressionInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/expressionInIf.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/expressionInIf.kt"); } @TestMetadata("notExpression.kt") public void testNotExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/notExpression.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/notExpression.kt"); } @TestMetadata("severalExpr.kt") public void testSeveralExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/severalExpr.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/severalExpr.kt"); } @TestMetadata("severalExprAtCaret.kt") public void testSeveralExprAtCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/severalExprAtCaret.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/severalExprAtCaret.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/not/variable.kt"); - doTestWithNotSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/not/variable.kt"); } } @@ -422,88 +427,84 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parentheses extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithParenthesesSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParentheses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/parentheses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("expr.kt") public void testExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/expr.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/expr.kt"); } @TestMetadata("inIf.kt") public void testInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/inIf.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/inIf.kt"); } @TestMetadata("partOfExpr.kt") public void testPartOfExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/partOfExpr.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/partOfExpr.kt"); } @TestMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotApplicable extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithParenthesesSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotApplicable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/parentheses/notApplicable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/if.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/if.kt"); } @TestMetadata("import.kt") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/import.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/import.kt"); } @TestMetadata("importQualifiedFirst.kt") public void testImportQualifiedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/importQualifiedFirst.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/importQualifiedFirst.kt"); } @TestMetadata("importQualifiedSecond.kt") public void testImportQualifiedSecond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/importQualifiedSecond.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/importQualifiedSecond.kt"); } @TestMetadata("packageName.kt") public void testPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/packageName.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/packageName.kt"); } @TestMetadata("parameterName.kt") public void testParameterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/parameterName.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/parameterName.kt"); } @TestMetadata("parameterWithType.kt") public void testParameterWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/parameterWithType.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/parameterWithType.kt"); } @TestMetadata("qualifiedExpressionSecond.kt") public void testQualifiedExpressionSecond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/qualifiedExpressionSecond.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/qualifiedExpressionSecond.kt"); } @TestMetadata("qualifiedExpressionSecondWithBracket.kt") public void testQualifiedExpressionSecondWithBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/qualifiedExpressionSecondWithBracket.kt"); - doTestWithParenthesesSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/parentheses/notApplicable/qualifiedExpressionSecondWithBracket.kt"); } } } @@ -512,32 +513,32 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplate extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithStringTemplateSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/stringTemplate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multiExpression.kt") public void testMultiExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/stringTemplate/multiExpression.kt"); - doTestWithStringTemplateSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/stringTemplate/multiExpression.kt"); } @TestMetadata("multiExpressionConstant.kt") public void testMultiExpressionConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/stringTemplate/multiExpressionConstant.kt"); - doTestWithStringTemplateSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/stringTemplate/multiExpressionConstant.kt"); } @TestMetadata("singleConstant.kt") public void testSingleConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/stringTemplate/singleConstant.kt"); - doTestWithStringTemplateSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/stringTemplate/singleConstant.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/stringTemplate/singleExpression.kt"); - doTestWithStringTemplateSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/stringTemplate/singleExpression.kt"); } } @@ -545,26 +546,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithWhenSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/when/enum.kt"); - doTestWithWhenSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/when/enum.kt"); } @TestMetadata("multiExpression.kt") public void testMultiExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/when/multiExpression.kt"); - doTestWithWhenSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/when/multiExpression.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/when/singleExpression.kt"); - doTestWithWhenSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/when/singleExpression.kt"); } } @@ -572,32 +574,32 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatch extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithTryCatchSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/tryCatch"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("moveDeclarationsOut.kt") public void testMoveDeclarationsOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatch/moveDeclarationsOut.kt"); - doTestWithTryCatchSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatch/moveDeclarationsOut.kt"); } @TestMetadata("multiExpression.kt") public void testMultiExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatch/multiExpression.kt"); - doTestWithTryCatchSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatch/multiExpression.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatch/singleExpression.kt"); - doTestWithTryCatchSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatch/singleExpression.kt"); } @TestMetadata("usedAsExpression.kt") public void testUsedAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatch/usedAsExpression.kt"); - doTestWithTryCatchSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatch/usedAsExpression.kt"); } } @@ -605,20 +607,22 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchExpression extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithTryCatchExpressionSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/tryCatchExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asStatement.kt") public void testAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchExpression/asStatement.kt"); - doTestWithTryCatchExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchExpression/asStatement.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchExpression/singleExpression.kt"); - doTestWithTryCatchExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchExpression/singleExpression.kt"); } } @@ -626,26 +630,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinally extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithTryCatchFinallySurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/tryCatchFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multiExpression.kt") public void testMultiExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchFinally/multiExpression.kt"); - doTestWithTryCatchFinallySurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchFinally/multiExpression.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchFinally/singleExpression.kt"); - doTestWithTryCatchFinallySurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchFinally/singleExpression.kt"); } @TestMetadata("usedAsExpression.kt") public void testUsedAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchFinally/usedAsExpression.kt"); - doTestWithTryCatchFinallySurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchFinally/usedAsExpression.kt"); } } @@ -653,20 +658,22 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchFinallyExpression extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithTryCatchFinallyExpressionSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryCatchFinallyExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/tryCatchFinallyExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asStatement.kt") public void testAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchFinallyExpression/asStatement.kt"); - doTestWithTryCatchFinallyExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchFinallyExpression/asStatement.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryCatchFinallyExpression/singleExpression.kt"); - doTestWithTryCatchFinallyExpressionSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryCatchFinallyExpression/singleExpression.kt"); } } @@ -674,26 +681,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithTryFinallySurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/tryFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multiExpression.kt") public void testMultiExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryFinally/multiExpression.kt"); - doTestWithTryFinallySurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryFinally/multiExpression.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryFinally/singleExpression.kt"); - doTestWithTryFinallySurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryFinally/singleExpression.kt"); } @TestMetadata("usedAsExpression.kt") public void testUsedAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/tryFinally/usedAsExpression.kt"); - doTestWithTryFinallySurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/tryFinally/usedAsExpression.kt"); } } @@ -701,26 +709,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiteral extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithFunctionLiteralSurrounder, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/functionLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("moveDeclarationsOut.kt") public void testMoveDeclarationsOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/functionLiteral/moveDeclarationsOut.kt"); - doTestWithFunctionLiteralSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/functionLiteral/moveDeclarationsOut.kt"); } @TestMetadata("multiStatement.kt") public void testMultiStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/functionLiteral/multiStatement.kt"); - doTestWithFunctionLiteralSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/functionLiteral/multiStatement.kt"); } @TestMetadata("singleStatement.kt") public void testSingleStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/functionLiteral/singleStatement.kt"); - doTestWithFunctionLiteralSurrounder(fileName); + runTest("idea/testData/codeInsight/surroundWith/functionLiteral/singleStatement.kt"); } } @@ -728,20 +737,22 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithIfExpression extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithSurroundWithIfExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithIfExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/withIfExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexBoolean.kt") public void testComplexBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/withIfExpression/complexBoolean.kt"); - doTestWithSurroundWithIfExpression(fileName); + runTest("idea/testData/codeInsight/surroundWith/withIfExpression/complexBoolean.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/withIfExpression/variable.kt"); - doTestWithSurroundWithIfExpression(fileName); + runTest("idea/testData/codeInsight/surroundWith/withIfExpression/variable.kt"); } } @@ -749,26 +760,27 @@ public class SurroundWithTestGenerated extends AbstractSurroundWithTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithIfElseExpression extends AbstractSurroundWithTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithSurroundWithIfElseExpression, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithIfElseExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/surroundWith/withIfElseExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexBoolean.kt") public void testComplexBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/withIfElseExpression/complexBoolean.kt"); - doTestWithSurroundWithIfElseExpression(fileName); + runTest("idea/testData/codeInsight/surroundWith/withIfElseExpression/complexBoolean.kt"); } @TestMetadata("replaceWithParenthesized.kt") public void testReplaceWithParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/withIfElseExpression/replaceWithParenthesized.kt"); - doTestWithSurroundWithIfElseExpression(fileName); + runTest("idea/testData/codeInsight/surroundWith/withIfElseExpression/replaceWithParenthesized.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/surroundWith/withIfElseExpression/variable.kt"); - doTestWithSurroundWithIfElseExpression(fileName); + runTest("idea/testData/codeInsight/surroundWith/withIfElseExpression/variable.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/unwrap/UnwrapRemoveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/unwrap/UnwrapRemoveTestGenerated.java index e7756e86051..f9564d04cfa 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/unwrap/UnwrapRemoveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/unwrap/UnwrapRemoveTestGenerated.java @@ -23,38 +23,37 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExpression extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestExpressionRemover, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/removeExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ifInBlock.kt") public void testIfInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeExpression/ifInBlock.kt"); - doTestExpressionRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeExpression/ifInBlock.kt"); } @TestMetadata("ifInExpressionInReturn.kt") public void testIfInExpressionInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeExpression/ifInExpressionInReturn.kt"); - doTestExpressionRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeExpression/ifInExpressionInReturn.kt"); } @TestMetadata("ifInReturn.kt") public void testIfInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeExpression/ifInReturn.kt"); - doTestExpressionRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeExpression/ifInReturn.kt"); } @TestMetadata("tryInBlock.kt") public void testTryInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeExpression/tryInBlock.kt"); - doTestExpressionRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeExpression/tryInBlock.kt"); } @TestMetadata("tryInReturn.kt") public void testTryInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeExpression/tryInReturn.kt"); - doTestExpressionRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeExpression/tryInReturn.kt"); } } @@ -62,26 +61,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapThen extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestThenUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapThen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapThen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("thenCompoundInBlock.kt") public void testThenCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapThen/thenCompoundInBlock.kt"); - doTestThenUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapThen/thenCompoundInBlock.kt"); } @TestMetadata("thenCompoundInReturn.kt") public void testThenCompoundInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapThen/thenCompoundInReturn.kt"); - doTestThenUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapThen/thenCompoundInReturn.kt"); } @TestMetadata("thenSimpleInReturn.kt") public void testThenSimpleInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapThen/thenSimpleInReturn.kt"); - doTestThenUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapThen/thenSimpleInReturn.kt"); } } @@ -89,26 +89,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapElse extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestElseUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapElse() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapElse"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("elseCompoundInBlock.kt") public void testElseCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapElse/elseCompoundInBlock.kt"); - doTestElseUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapElse/elseCompoundInBlock.kt"); } @TestMetadata("elseCompoundInReturn.kt") public void testElseCompoundInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapElse/elseCompoundInReturn.kt"); - doTestElseUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapElse/elseCompoundInReturn.kt"); } @TestMetadata("elseSimpleInReturn.kt") public void testElseSimpleInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapElse/elseSimpleInReturn.kt"); - doTestElseUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapElse/elseSimpleInReturn.kt"); } } @@ -116,14 +117,17 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveElse extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestElseRemover, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveElse() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/removeElse"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("else.kt") public void testElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeElse/else.kt"); - doTestElseRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeElse/else.kt"); } } @@ -131,26 +135,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapLoop extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestLoopUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapLoop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop/doWhile.kt"); - doTestLoopUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop/doWhile.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop/for.kt"); - doTestLoopUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop/for.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop/while.kt"); - doTestLoopUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLoop/while.kt"); } } @@ -158,26 +163,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapTry extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestTryUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapTry() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapTry"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("tryCompoundInBlock.kt") public void testTryCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapTry/tryCompoundInBlock.kt"); - doTestTryUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapTry/tryCompoundInBlock.kt"); } @TestMetadata("tryCompoundInReturn.kt") public void testTryCompoundInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapTry/tryCompoundInReturn.kt"); - doTestTryUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapTry/tryCompoundInReturn.kt"); } @TestMetadata("trySimpleInReturn.kt") public void testTrySimpleInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapTry/trySimpleInReturn.kt"); - doTestTryUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapTry/trySimpleInReturn.kt"); } } @@ -185,26 +191,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapCatch extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCatchUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapCatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchCompoundInBlock.kt") public void testCatchCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch/catchCompoundInBlock.kt"); - doTestCatchUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch/catchCompoundInBlock.kt"); } @TestMetadata("catchCompoundInReturn.kt") public void testCatchCompoundInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch/catchCompoundInReturn.kt"); - doTestCatchUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch/catchCompoundInReturn.kt"); } @TestMetadata("catchSimpleInReturn.kt") public void testCatchSimpleInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch/catchSimpleInReturn.kt"); - doTestCatchUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapCatch/catchSimpleInReturn.kt"); } } @@ -212,14 +219,17 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveCatch extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCatchRemover, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveCatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/removeCatch"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeCatch/catch.kt"); - doTestCatchRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeCatch/catch.kt"); } } @@ -227,26 +237,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapFinally extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestFinallyUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finallyCompoundInBlock.kt") public void testFinallyCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally/finallyCompoundInBlock.kt"); - doTestFinallyUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally/finallyCompoundInBlock.kt"); } @TestMetadata("finallyCompoundInReturn.kt") public void testFinallyCompoundInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally/finallyCompoundInReturn.kt"); - doTestFinallyUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally/finallyCompoundInReturn.kt"); } @TestMetadata("finallySimpleInReturn.kt") public void testFinallySimpleInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally/finallySimpleInReturn.kt"); - doTestFinallyUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapFinally/finallySimpleInReturn.kt"); } } @@ -254,20 +265,22 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveFinally extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestFinallyRemover, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/removeFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("finallyInBlock.kt") public void testFinallyInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeFinally/finallyInBlock.kt"); - doTestFinallyRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeFinally/finallyInBlock.kt"); } @TestMetadata("finallyInReturn.kt") public void testFinallyInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/removeFinally/finallyInReturn.kt"); - doTestFinallyRemover(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/removeFinally/finallyInReturn.kt"); } } @@ -275,68 +288,62 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapLambda extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestLambdaUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaCallCompoundInBlock.kt") public void testLambdaCallCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallCompoundInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallCompoundInBlock.kt"); } @TestMetadata("lambdaCallCompoundInReturn.kt") public void testLambdaCallCompoundInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallCompoundInReturn.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallCompoundInReturn.kt"); } @TestMetadata("lambdaCallInBlock.kt") public void testLambdaCallInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallInBlock.kt"); } @TestMetadata("lambdaCallInBlock2.kt") public void testLambdaCallInBlock2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallInBlock2.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallInBlock2.kt"); } @TestMetadata("lambdaCallSimpleInReturn.kt") public void testLambdaCallSimpleInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallSimpleInReturn.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaCallSimpleInReturn.kt"); } @TestMetadata("lambdaInBlock.kt") public void testLambdaInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaInBlock.kt"); } @TestMetadata("lambdaNonLocalPropertyCompoundInBlock.kt") public void testLambdaNonLocalPropertyCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaNonLocalPropertyCompoundInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaNonLocalPropertyCompoundInBlock.kt"); } @TestMetadata("lambdaNonLocalPropertyInBlock.kt") public void testLambdaNonLocalPropertyInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaNonLocalPropertyInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaNonLocalPropertyInBlock.kt"); } @TestMetadata("lambdaPropertyCompoundInBlock.kt") public void testLambdaPropertyCompoundInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaPropertyCompoundInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaPropertyCompoundInBlock.kt"); } @TestMetadata("lambdaPropertyInBlock.kt") public void testLambdaPropertyInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaPropertyInBlock.kt"); - doTestLambdaUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapLambda/lambdaPropertyInBlock.kt"); } } @@ -344,26 +351,27 @@ public class UnwrapRemoveTestGenerated extends AbstractUnwrapRemoveTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnwrapFunctionParameter extends AbstractUnwrapRemoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestFunctionParameterUnwrapper, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnwrapFunctionParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionHasMultiParam.kt") public void testFunctionHasMultiParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter/functionHasMultiParam.kt"); - doTestFunctionParameterUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter/functionHasMultiParam.kt"); } @TestMetadata("functionHasSingleParam.kt") public void testFunctionHasSingleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter/functionHasSingleParam.kt"); - doTestFunctionParameterUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter/functionHasSingleParam.kt"); } @TestMetadata("functionWithReceiver.kt") public void testFunctionWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter/functionWithReceiver.kt"); - doTestFunctionParameterUnwrapper(fileName); + runTest("idea/testData/codeInsight/unwrapAndRemove/unwrapFunctionParameter/functionWithReceiver.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/JavaToKotlinCopyPasteConversionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/JavaToKotlinCopyPasteConversionTestGenerated.java index 6cfe186c46e..2dd08e6fdab 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/JavaToKotlinCopyPasteConversionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/JavaToKotlinCopyPasteConversionTestGenerated.java @@ -21,46 +21,43 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavaToKotlinCopyPasteConversionTestGenerated extends AbstractJavaToKotlinCopyPasteConversionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddImports.java") public void testAddImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddImports.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddImports.java"); } @TestMetadata("AddImportsButNoConversion.java") public void testAddImportsButNoConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddImportsButNoConversion.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddImportsButNoConversion.java"); } @TestMetadata("AddImportsButNoConversion2.java") public void testAddImportsButNoConversion2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddImportsButNoConversion2.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddImportsButNoConversion2.java"); } @TestMetadata("AddImportsClassInSamePackage.java") public void testAddImportsClassInSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddImportsClassInSamePackage.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddImportsClassInSamePackage.java"); } @TestMetadata("AddImportsDummyConflict.java") public void testAddImportsDummyConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddImportsDummyConflict.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddImportsDummyConflict.java"); } @TestMetadata("AddImportsWithExplicitImports.java") public void testAddImportsWithExplicitImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddImportsWithExplicitImports.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddImportsWithExplicitImports.java"); } @TestMetadata("AddKClassImport.java") public void testAddKClassImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/AddKClassImport.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/AddKClassImport.java"); } public void testAllFilesPresentInConversion() throws Exception { @@ -69,187 +66,156 @@ public class JavaToKotlinCopyPasteConversionTestGenerated extends AbstractJavaTo @TestMetadata("Arithmetic.java") public void testArithmetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/Arithmetic.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/Arithmetic.java"); } @TestMetadata("ClassWithNoDocComment.java") public void testClassWithNoDocComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/ClassWithNoDocComment.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/ClassWithNoDocComment.java"); } @TestMetadata("ClassWithOverrides.java") public void testClassWithOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/ClassWithOverrides.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/ClassWithOverrides.java"); } @TestMetadata("Constructor.java") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/Constructor.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/Constructor.java"); } @TestMetadata("ConversionInCorrectContext.java") public void testConversionInCorrectContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/ConversionInCorrectContext.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/ConversionInCorrectContext.java"); } @TestMetadata("CopyAnnotation.java") public void testCopyAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/CopyAnnotation.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/CopyAnnotation.java"); } @TestMetadata("ExtendsTypeRef.java") public void testExtendsTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/ExtendsTypeRef.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/ExtendsTypeRef.java"); } @TestMetadata("FieldWithNoEndComment.java") public void testFieldWithNoEndComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/FieldWithNoEndComment.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/FieldWithNoEndComment.java"); } @TestMetadata("FieldWithNoModifierAndNoSemicolon.java") public void testFieldWithNoModifierAndNoSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/FieldWithNoModifierAndNoSemicolon.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/FieldWithNoModifierAndNoSemicolon.java"); } @TestMetadata("FileWithNoPackageStatement.java") public void testFileWithNoPackageStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/FileWithNoPackageStatement.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/FileWithNoPackageStatement.java"); } @TestMetadata("HalfTheWhiteSpace.java") public void testHalfTheWhiteSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/HalfTheWhiteSpace.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/HalfTheWhiteSpace.java"); } @TestMetadata("ImplementsTypeRef.java") public void testImplementsTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/ImplementsTypeRef.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/ImplementsTypeRef.java"); } @TestMetadata("Imports1.java") public void testImports1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/Imports1.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/Imports1.java"); } @TestMetadata("Imports2.java") public void testImports2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/Imports2.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/Imports2.java"); } @TestMetadata("Imports3.java") public void testImports3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/Imports3.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/Imports3.java"); } @TestMetadata("Indentation.java") public void testIndentation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/Indentation.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/Indentation.java"); } @TestMetadata("InsertIntoComment.java") public void testInsertIntoComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/InsertIntoComment.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/InsertIntoComment.java"); } @TestMetadata("InsertIntoString.java") public void testInsertIntoString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/InsertIntoString.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/InsertIntoString.java"); } @TestMetadata("MethodDeclarationWithNoBody.java") public void testMethodDeclarationWithNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/MethodDeclarationWithNoBody.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/MethodDeclarationWithNoBody.java"); } @TestMetadata("MethodReferenceWithoutQualifier.java") public void testMethodReferenceWithoutQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/MethodReferenceWithoutQualifier.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/MethodReferenceWithoutQualifier.java"); } @TestMetadata("MethodWithNoAnnotation.java") public void testMethodWithNoAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/MethodWithNoAnnotation.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/MethodWithNoAnnotation.java"); } @TestMetadata("MethodWithOnlyOneAnnotation.java") public void testMethodWithOnlyOneAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/MethodWithOnlyOneAnnotation.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/MethodWithOnlyOneAnnotation.java"); } @TestMetadata("OnlyClosingBrace.java") public void testOnlyClosingBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/OnlyClosingBrace.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/OnlyClosingBrace.java"); } @TestMetadata("OnlyOneBraceFromBlock.java") public void testOnlyOneBraceFromBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/OnlyOneBraceFromBlock.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/OnlyOneBraceFromBlock.java"); } @TestMetadata("OnlyQualifier.java") public void testOnlyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/OnlyQualifier.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/OnlyQualifier.java"); } @TestMetadata("RawTypeRef.java") public void testRawTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/RawTypeRef.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/RawTypeRef.java"); } @TestMetadata("RedundantTypeCast.java") public void testRedundantTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/RedundantTypeCast.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/RedundantTypeCast.java"); } @TestMetadata("RedundantTypeCast2.java") public void testRedundantTypeCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/RedundantTypeCast2.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/RedundantTypeCast2.java"); } @TestMetadata("SampleBlock.java") public void testSampleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/SampleBlock.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/SampleBlock.java"); } @TestMetadata("SeveralMethodsSample.java") public void testSeveralMethodsSample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/SeveralMethodsSample.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/SeveralMethodsSample.java"); } @TestMetadata("SingleWordFromIdentifier.java") public void testSingleWordFromIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/SingleWordFromIdentifier.java"); - doTest(fileName); + runTest("idea/testData/copyPaste/conversion/SingleWordFromIdentifier.java"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralKotlinToKotlinCopyPasteTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralKotlinToKotlinCopyPasteTestGenerated.java index 89b2a8ce3b0..6d425dae105 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralKotlinToKotlinCopyPasteTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralKotlinToKotlinCopyPasteTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LiteralKotlinToKotlinCopyPasteTestGenerated extends AbstractLiteralKotlinToKotlinCopyPasteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/copyPaste/literal"), Pattern.compile("^([^\\.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CollectionLiteralReference.kt") public void testCollectionLiteralReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/literal/CollectionLiteralReference.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/literal/CollectionLiteralReference.kt"); } @TestMetadata("DontEscapeEntries.kt") public void testDontEscapeEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/literal/DontEscapeEntries.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/literal/DontEscapeEntries.kt"); } @TestMetadata("DontEscapeEntries2.kt") public void testDontEscapeEntries2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/literal/DontEscapeEntries2.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/literal/DontEscapeEntries2.kt"); } @TestMetadata("DontEscapeThis.kt") public void testDontEscapeThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/literal/DontEscapeThis.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/literal/DontEscapeThis.kt"); } @TestMetadata("DontUnescapeLiteralWIthCode.kt") public void testDontUnescapeLiteralWIthCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/literal/DontUnescapeLiteralWIthCode.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/literal/DontUnescapeLiteralWIthCode.kt"); } @TestMetadata("UnescapeFullSelection.kt") public void testUnescapeFullSelection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/literal/UnescapeFullSelection.kt"); - doTest(fileName); + runTest("idea/testData/copyPaste/literal/UnescapeFullSelection.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralTextToKotlinCopyPasteTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralTextToKotlinCopyPasteTestGenerated.java index c6359adfd5a..dc019801f04 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralTextToKotlinCopyPasteTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/LiteralTextToKotlinCopyPasteTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LiteralTextToKotlinCopyPasteTestGenerated extends AbstractLiteralTextToKotlinCopyPasteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlainTextLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/copyPaste/plainTextLiteral"), Pattern.compile("^([^\\.]+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("BrokenEntries.txt") public void testBrokenEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/BrokenEntries.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/BrokenEntries.txt"); } @TestMetadata("MultiLine.txt") public void testMultiLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/MultiLine.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/MultiLine.txt"); } @TestMetadata("MultiLineToTripleQuotes.txt") public void testMultiLineToTripleQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/MultiLineToTripleQuotes.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/MultiLineToTripleQuotes.txt"); } @TestMetadata("MultiQuotesToTripleQuotes.txt") public void testMultiQuotesToTripleQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/MultiQuotesToTripleQuotes.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/MultiQuotesToTripleQuotes.txt"); } @TestMetadata("NoSpecialCharsToSingleQuote.txt") public void testNoSpecialCharsToSingleQuote() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/NoSpecialCharsToSingleQuote.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/NoSpecialCharsToSingleQuote.txt"); } @TestMetadata("TrailingLines.txt") public void testTrailingLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/TrailingLines.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/TrailingLines.txt"); } @TestMetadata("WithBackslashes.txt") public void testWithBackslashes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/WithBackslashes.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/WithBackslashes.txt"); } @TestMetadata("WithDollarSignToTripleQuotes.txt") public void testWithDollarSignToTripleQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/WithDollarSignToTripleQuotes.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/WithDollarSignToTripleQuotes.txt"); } @TestMetadata("WithEntries.txt") public void testWithEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/WithEntries.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/WithEntries.txt"); } @TestMetadata("WithQuotes.txt") public void testWithQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextLiteral/WithQuotes.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextLiteral/WithQuotes.txt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/TextJavaToKotlinCopyPasteConversionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/TextJavaToKotlinCopyPasteConversionTestGenerated.java index 70a92c655e9..d542c300ef9 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/TextJavaToKotlinCopyPasteConversionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/conversion/copy/TextJavaToKotlinCopyPasteConversionTestGenerated.java @@ -21,109 +21,96 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class TextJavaToKotlinCopyPasteConversionTestGenerated extends AbstractTextJavaToKotlinCopyPasteConversionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlainTextConversion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/copyPaste/plainTextConversion"), Pattern.compile("^([^\\.]+)\\.txt$"), TargetBackend.ANY, true); } @TestMetadata("AsExpression.txt") public void testAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/AsExpression.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/AsExpression.txt"); } @TestMetadata("AsExpressionBody.txt") public void testAsExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/AsExpressionBody.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/AsExpressionBody.txt"); } @TestMetadata("ImportFromTarget.txt") public void testImportFromTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/ImportFromTarget.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/ImportFromTarget.txt"); } @TestMetadata("ImportResolve.txt") public void testImportResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/ImportResolve.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/ImportResolve.txt"); } @TestMetadata("InsideIdentifier.txt") public void testInsideIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/InsideIdentifier.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/InsideIdentifier.txt"); } @TestMetadata("IntoComment.txt") public void testIntoComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/IntoComment.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/IntoComment.txt"); } @TestMetadata("IntoRawStringLiteral.txt") public void testIntoRawStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/IntoRawStringLiteral.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/IntoRawStringLiteral.txt"); } @TestMetadata("IntoStringLiteral.txt") public void testIntoStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/IntoStringLiteral.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/IntoStringLiteral.txt"); } @TestMetadata("KT13529.txt") public void testKT13529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/KT13529.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/KT13529.txt"); } @TestMetadata("KT13529_1.txt") public void testKT13529_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/KT13529_1.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/KT13529_1.txt"); } @TestMetadata("MembersIntoClass.txt") public void testMembersIntoClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/MembersIntoClass.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/MembersIntoClass.txt"); } @TestMetadata("MembersToTopLevel.txt") public void testMembersToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/MembersToTopLevel.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/MembersToTopLevel.txt"); } @TestMetadata("Override.txt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/Override.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/Override.txt"); } @TestMetadata("OverrideInterface.txt") public void testOverrideInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/OverrideInterface.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/OverrideInterface.txt"); } @TestMetadata("PostProcessing.txt") public void testPostProcessing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/PostProcessing.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/PostProcessing.txt"); } @TestMetadata("StatementsIntoFunction.txt") public void testStatementsIntoFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/StatementsIntoFunction.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/StatementsIntoFunction.txt"); } @TestMetadata("WholeFile.txt") public void testWholeFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/copyPaste/plainTextConversion/WholeFile.txt"); - doTest(fileName); + runTest("idea/testData/copyPaste/plainTextConversion/WholeFile.txt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/coverage/KotlinCoverageOutputFilesTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/coverage/KotlinCoverageOutputFilesTestGenerated.java index 5192b50e6e2..497873e1bb3 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/coverage/KotlinCoverageOutputFilesTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/coverage/KotlinCoverageOutputFilesTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinCoverageOutputFilesTestGenerated extends AbstractKotlinCoverageOutputFilesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOutputFiles() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/coverage/outputFiles"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotInlinedLambda.kt") public void testNotInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/coverage/outputFiles/NotInlinedLambda.kt"); - doTest(fileName); + runTest("idea/testData/coverage/outputFiles/NotInlinedLambda.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/BeforeExtractFunctionInsertionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/BeforeExtractFunctionInsertionTestGenerated.java index 9627d5679b0..b3fbc40827f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/BeforeExtractFunctionInsertionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/BeforeExtractFunctionInsertionTestGenerated.java @@ -21,37 +21,36 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BeforeExtractFunctionInsertionTestGenerated extends AbstractBeforeExtractFunctionInsertionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInsertBeforeExtractFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/insertBeforeExtractFunction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("emptyImportDirective.kt") public void testEmptyImportDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/insertBeforeExtractFunction/emptyImportDirective.kt"); - doTest(fileName); + runTest("idea/testData/debugger/insertBeforeExtractFunction/emptyImportDirective.kt"); } @TestMetadata("emptyImportDirective2.kt") public void testEmptyImportDirective2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/insertBeforeExtractFunction/emptyImportDirective2.kt"); - doTest(fileName); + runTest("idea/testData/debugger/insertBeforeExtractFunction/emptyImportDirective2.kt"); } @TestMetadata("emptyPackageDirective.kt") public void testEmptyPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/insertBeforeExtractFunction/emptyPackageDirective.kt"); - doTest(fileName); + runTest("idea/testData/debugger/insertBeforeExtractFunction/emptyPackageDirective.kt"); } @TestMetadata("emptyPackageDirective2.kt") public void testEmptyPackageDirective2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/insertBeforeExtractFunction/emptyPackageDirective2.kt"); - doTest(fileName); + runTest("idea/testData/debugger/insertBeforeExtractFunction/emptyPackageDirective2.kt"); } @TestMetadata("manyImports.kt") public void testManyImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/insertBeforeExtractFunction/manyImports.kt"); - doTest(fileName); + runTest("idea/testData/debugger/insertBeforeExtractFunction/manyImports.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java index cc8d2292bfb..92f0e29d444 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinSteppingTestGenerated.java @@ -23,104 +23,92 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StepInto extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doStepIntoTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStepInto() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectFunFromClass.kt") public void testClassObjectFunFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromClass.kt"); } @TestMetadata("classObjectFunFromTopLevel.kt") public void testClassObjectFunFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt"); } @TestMetadata("extFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/extFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/extFun.kt"); } @TestMetadata("javaFun.kt") public void testJavaFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaFun.kt"); } @TestMetadata("javaSamConstructor.kt") public void testJavaSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamConstructor.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamConstructor.kt"); } @TestMetadata("javaSamFunction.kt") public void testJavaSamFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamFunction.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamFunction.kt"); } @TestMetadata("kotlinSamFunction.kt") public void testKotlinSamFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/kotlinSamFunction.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/kotlinSamFunction.kt"); } @TestMetadata("memberFunFromClass.kt") public void testMemberFunFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromClass.kt"); } @TestMetadata("memberFunFromTopLevel.kt") public void testMemberFunFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromTopLevel.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromTopLevel.kt"); } @TestMetadata("memberGetterFromClass.kt") public void testMemberGetterFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromClass.kt"); } @TestMetadata("memberGetterFromTopLevel.kt") public void testMemberGetterFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromTopLevel.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromTopLevel.kt"); } @TestMetadata("objectFun.kt") public void testObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/objectFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/objectFun.kt"); } @TestMetadata("topLevelFunFromClass.kt") public void testTopLevelFunFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromClass.kt"); } @TestMetadata("topLevelFunFromTopLevel.kt") public void testTopLevelFunFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromTopLevel.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromTopLevel.kt"); } @TestMetadata("topLevelGetterFromClass.kt") public void testTopLevelGetterFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromClass.kt"); } @TestMetadata("topLevelGetterFromTopLevel.kt") public void testTopLevelGetterFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromTopLevel.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromTopLevel.kt"); } } @@ -128,104 +116,92 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartStepInto extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSmartStepIntoTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartStepInto() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classObjectFunFromClass.kt") public void testClassObjectFunFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromClass.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromClass.kt"); } @TestMetadata("classObjectFunFromTopLevel.kt") public void testClassObjectFunFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/classObjectFunFromTopLevel.kt"); } @TestMetadata("extFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/extFun.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/extFun.kt"); } @TestMetadata("javaFun.kt") public void testJavaFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaFun.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaFun.kt"); } @TestMetadata("javaSamConstructor.kt") public void testJavaSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamConstructor.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamConstructor.kt"); } @TestMetadata("javaSamFunction.kt") public void testJavaSamFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamFunction.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/javaSamFunction.kt"); } @TestMetadata("kotlinSamFunction.kt") public void testKotlinSamFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/kotlinSamFunction.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/kotlinSamFunction.kt"); } @TestMetadata("memberFunFromClass.kt") public void testMemberFunFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromClass.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromClass.kt"); } @TestMetadata("memberFunFromTopLevel.kt") public void testMemberFunFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromTopLevel.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberFunFromTopLevel.kt"); } @TestMetadata("memberGetterFromClass.kt") public void testMemberGetterFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromClass.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromClass.kt"); } @TestMetadata("memberGetterFromTopLevel.kt") public void testMemberGetterFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromTopLevel.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/memberGetterFromTopLevel.kt"); } @TestMetadata("objectFun.kt") public void testObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/objectFun.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/objectFun.kt"); } @TestMetadata("topLevelFunFromClass.kt") public void testTopLevelFunFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromClass.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromClass.kt"); } @TestMetadata("topLevelFunFromTopLevel.kt") public void testTopLevelFunFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromTopLevel.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelFunFromTopLevel.kt"); } @TestMetadata("topLevelGetterFromClass.kt") public void testTopLevelGetterFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromClass.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromClass.kt"); } @TestMetadata("topLevelGetterFromTopLevel.kt") public void testTopLevelGetterFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromTopLevel.kt"); - doSmartStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepIntoAndSmartStepInto/topLevelGetterFromTopLevel.kt"); } } @@ -233,10 +209,13 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StepIntoOnly extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doStepIntoTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessors.kt") public void testAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/accessors.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/accessors.kt"); } public void testAllFilesPresentInStepIntoOnly() throws Exception { @@ -245,128 +224,107 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestMetadata("continueLabel.kt") public void testContinueLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/continueLabel.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/continueLabel.kt"); } @TestMetadata("defaultAccessors.kt") public void testDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/defaultAccessors.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/defaultAccessors.kt"); } @TestMetadata("forLoop.kt") public void testForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/forLoop.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/forLoop.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/functionReference.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/functionReference.kt"); } @TestMetadata("inlineDex.kt") public void testInlineDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/inlineDex.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/inlineDex.kt"); } @TestMetadata("inlineOnly.kt") public void testInlineOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/inlineOnly.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/inlineOnly.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/propertyReference.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/propertyReference.kt"); } @TestMetadata("returnVoid.kt") public void testReturnVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/returnVoid.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/returnVoid.kt"); } @TestMetadata("samAdapter.kt") public void testSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/samAdapter.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/samAdapter.kt"); } @TestMetadata("siSuspendFun.kt") public void testSiSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/siSuspendFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/siSuspendFun.kt"); } @TestMetadata("skipSimpleGetter.kt") public void testSkipSimpleGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetter.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetter.kt"); } @TestMetadata("skipSimpleGetterLocalVal.kt") public void testSkipSimpleGetterLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetterLocalVal.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetterLocalVal.kt"); } @TestMetadata("skipSimpleGetterMethodWithProperty.kt") public void testSkipSimpleGetterMethodWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetterMethodWithProperty.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetterMethodWithProperty.kt"); } @TestMetadata("stepIntoFromInlineFun.kt") public void testStepIntoFromInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoFromInlineFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoFromInlineFun.kt"); } @TestMetadata("stepIntoInlineFun.kt") public void testStepIntoInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoInlineFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoInlineFun.kt"); } @TestMetadata("stepIntoStdLibInlineFun.kt") public void testStepIntoStdLibInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoStdLibInlineFun.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoStdLibInlineFun.kt"); } @TestMetadata("stepIntoSuspendFunctionSimple.kt") public void testStepIntoSuspendFunctionSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoSuspendFunctionSimple.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoSuspendFunctionSimple.kt"); } @TestMetadata("syntheticMethods.kt") public void testSyntheticMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/syntheticMethods.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/syntheticMethods.kt"); } @TestMetadata("syntheticMethodsSkip.kt") public void testSyntheticMethodsSkip() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/syntheticMethodsSkip.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/syntheticMethodsSkip.kt"); } @TestMetadata("traits.kt") public void testTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/traits.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/traits.kt"); } @TestMetadata("whenExpr.kt") public void testWhenExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/whenExpr.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepInto/whenExpr.kt"); } } @@ -374,62 +332,57 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StepOut extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doStepOutTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStepOut() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/stepOut"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fwBackingField.kt") public void testFwBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/fwBackingField.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/fwBackingField.kt"); } @TestMetadata("inapplicableFieldWatchpoints.kt") public void testInapplicableFieldWatchpoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/inapplicableFieldWatchpoints.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/inapplicableFieldWatchpoints.kt"); } @TestMetadata("souSuspendFun.kt") public void testSouSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/souSuspendFun.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/souSuspendFun.kt"); } @TestMetadata("stepOutInlineFunction.kt") public void testStepOutInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutInlineFunction.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutInlineFunction.kt"); } @TestMetadata("stepOutInlinedLambdaArgument.kt") public void testStepOutInlinedLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutInlinedLambdaArgument.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutInlinedLambdaArgument.kt"); } @TestMetadata("stepOutInlinedLambdaArgumentOneLine.kt") public void testStepOutInlinedLambdaArgumentOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutInlinedLambdaArgumentOneLine.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutInlinedLambdaArgumentOneLine.kt"); } @TestMetadata("stepOutSeveralInlineArgumentDeepest.kt") public void testStepOutSeveralInlineArgumentDeepest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutSeveralInlineArgumentDeepest.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutSeveralInlineArgumentDeepest.kt"); } @TestMetadata("stepOutSeveralInlineFunctions.kt") public void testStepOutSeveralInlineFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutSeveralInlineFunctions.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutSeveralInlineFunctions.kt"); } @TestMetadata("stepOutSeveralInlineFunctionsDeepest.kt") public void testStepOutSeveralInlineFunctionsDeepest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutSeveralInlineFunctionsDeepest.kt"); - doStepOutTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOut/stepOutSeveralInlineFunctionsDeepest.kt"); } } @@ -437,620 +390,522 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StepOver extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doStepOverTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStepOver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/stepOver"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("asIterableInFor.kt") public void testAsIterableInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/asIterableInFor.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/asIterableInFor.kt"); } @TestMetadata("ifCapturedVariableKt9118.kt") public void testIfCapturedVariableKt9118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/ifCapturedVariableKt9118.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/ifCapturedVariableKt9118.kt"); } @TestMetadata("inlineCallInForRangeExpression.kt") public void testInlineCallInForRangeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineCallInForRangeExpression.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineCallInForRangeExpression.kt"); } @TestMetadata("inlineFunctionSameLines.kt") public void testInlineFunctionSameLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineFunctionSameLines.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineFunctionSameLines.kt"); } @TestMetadata("inlineInClassDex.kt") public void testInlineInClassDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInClassDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInClassDex.kt"); } @TestMetadata("inlineInIfFalse.kt") public void testInlineInIfFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfFalse.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfFalse.kt"); } @TestMetadata("inlineInIfFalseDex.kt") public void testInlineInIfFalseDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfFalseDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfFalseDex.kt"); } @TestMetadata("inlineInIfTrue.kt") public void testInlineInIfTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfTrue.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfTrue.kt"); } @TestMetadata("inlineInIfTrueDex.kt") public void testInlineInIfTrueDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfTrueDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInIfTrueDex.kt"); } @TestMetadata("inlineInObjectDex.kt") public void testInlineInObjectDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInObjectDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/inlineInObjectDex.kt"); } @TestMetadata("noParameterLambdaArgumentCallInInline.kt") public void testNoParameterLambdaArgumentCallInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/noParameterLambdaArgumentCallInInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/noParameterLambdaArgumentCallInInline.kt"); } @TestMetadata("noParameterLambdaArgumentCallInLambda.kt") public void testNoParameterLambdaArgumentCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/noParameterLambdaArgumentCallInLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/noParameterLambdaArgumentCallInLambda.kt"); } @TestMetadata("soBreakpointWithInline.kt") public void testSoBreakpointWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soBreakpointWithInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soBreakpointWithInline.kt"); } @TestMetadata("soBreakpointWithOrdinalOnInlineCallsInOneLine.kt") public void testSoBreakpointWithOrdinalOnInlineCallsInOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soBreakpointWithOrdinalOnInlineCallsInOneLine.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soBreakpointWithOrdinalOnInlineCallsInOneLine.kt"); } @TestMetadata("soInlineAnonymousFunctionArgument.kt") public void testSoInlineAnonymousFunctionArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineAnonymousFunctionArgument.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineAnonymousFunctionArgument.kt"); } @TestMetadata("soInlineAnonymousFunctionArgumentDex.kt") public void testSoInlineAnonymousFunctionArgumentDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineAnonymousFunctionArgumentDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineAnonymousFunctionArgumentDex.kt"); } @TestMetadata("soInlineCallInLastStatementInInline.kt") public void testSoInlineCallInLastStatementInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInline.kt"); } @TestMetadata("soInlineCallInLastStatementInInlineDex.kt") public void testSoInlineCallInLastStatementInInlineDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineDex.kt"); } @TestMetadata("soInlineCallInLastStatementInInlineFunctionArgument.kt") public void testSoInlineCallInLastStatementInInlineFunctionArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineFunctionArgument.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineFunctionArgument.kt"); } @TestMetadata("soInlineCallInLastStatementInInlineFunctionArgumentDex.kt") public void testSoInlineCallInLastStatementInInlineFunctionArgumentDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineFunctionArgumentDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineFunctionArgumentDex.kt"); } @TestMetadata("soInlineCallInLastStatementInInlineInInline.kt") public void testSoInlineCallInLastStatementInInlineInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineInInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallInLastStatementInInlineInInline.kt"); } @TestMetadata("soInlineCallsInOneLine.kt") public void testSoInlineCallsInOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallsInOneLine.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineCallsInOneLine.kt"); } @TestMetadata("soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt") public void testSoInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunCallInLastStatementOfInlineWithArgumentFromCalleeAndOwn.kt"); } @TestMetadata("soInlineFunDex.kt") public void testSoInlineFunDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunDex.kt"); } @TestMetadata("soInlineFunOnOneLineFor.kt") public void testSoInlineFunOnOneLineFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunOnOneLineFor.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunOnOneLineFor.kt"); } @TestMetadata("soInlineFunOnOneLineForDex.kt") public void testSoInlineFunOnOneLineForDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunOnOneLineForDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunOnOneLineForDex.kt"); } @TestMetadata("soInlineFunWithFor.kt") public void testSoInlineFunWithFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunWithFor.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunWithFor.kt"); } @TestMetadata("soInlineFunWithLastStatementMultilineArgumentCall.kt") public void testSoInlineFunWithLastStatementMultilineArgumentCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunWithLastStatementMultilineArgumentCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunWithLastStatementMultilineArgumentCall.kt"); } @TestMetadata("soInlineFunWithLastStatementOneLineArgumentCall.kt") public void testSoInlineFunWithLastStatementOneLineArgumentCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunWithLastStatementOneLineArgumentCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineFunWithLastStatementOneLineArgumentCall.kt"); } @TestMetadata("soInlineIfConditionLambdaFalse.kt") public void testSoInlineIfConditionLambdaFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineIfConditionLambdaFalse.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineIfConditionLambdaFalse.kt"); } @TestMetadata("soInlineIfConditionLambdaTrue.kt") public void testSoInlineIfConditionLambdaTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineIfConditionLambdaTrue.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineIfConditionLambdaTrue.kt"); } @TestMetadata("soInlineIterableFunDex.kt") public void testSoInlineIterableFunDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineIterableFunDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineIterableFunDex.kt"); } @TestMetadata("soInlineLibFunDex.kt") public void testSoInlineLibFunDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineLibFunDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineLibFunDex.kt"); } @TestMetadata("soInlineOperatorIterator.kt") public void testSoInlineOperatorIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineOperatorIterator.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineOperatorIterator.kt"); } @TestMetadata("soInlineUnitFunDex.kt") public void testSoInlineUnitFunDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineUnitFunDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineUnitFunDex.kt"); } @TestMetadata("soInlineWhileCondition.kt") public void testSoInlineWhileCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineWhileCondition.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineWhileCondition.kt"); } @TestMetadata("soInlineWhileConditionDex.kt") public void testSoInlineWhileConditionDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineWhileConditionDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soInlineWhileConditionDex.kt"); } @TestMetadata("soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt") public void testSoLastStatementInInlineFunctionArgumenBeforeOtherArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumenBeforeOtherArgument.kt"); } @TestMetadata("soLastStatementInInlineFunctionArgumentAsAnonymous.kt") public void testSoLastStatementInInlineFunctionArgumentAsAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentAsAnonymous.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentAsAnonymous.kt"); } @TestMetadata("soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt") public void testSoLastStatementInInlineFunctionArgumentAsAnonymousParNextLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentAsAnonymousParNextLine.kt"); } @TestMetadata("soLastStatementInInlineFunctionArgumentInGetOperator.kt") public void testSoLastStatementInInlineFunctionArgumentInGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentInGetOperator.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentInGetOperator.kt"); } @TestMetadata("soLastStatementInInlineFunctionArgumentInNonInlineCall.kt") public void testSoLastStatementInInlineFunctionArgumentInNonInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentInNonInlineCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentInNonInlineCall.kt"); } @TestMetadata("soLastStatementInInlineFunctionArgumentInPars.kt") public void testSoLastStatementInInlineFunctionArgumentInPars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentInPars.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soLastStatementInInlineFunctionArgumentInPars.kt"); } @TestMetadata("soNonSuspendableSuspendCall.kt") public void testSoNonSuspendableSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soNonSuspendableSuspendCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soNonSuspendableSuspendCall.kt"); } @TestMetadata("soReifiedInlineIfConditionFalse.kt") public void testSoReifiedInlineIfConditionFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soReifiedInlineIfConditionFalse.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soReifiedInlineIfConditionFalse.kt"); } @TestMetadata("soSimpleInlineIfCondition.kt") public void testSoSimpleInlineIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSimpleInlineIfCondition.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSimpleInlineIfCondition.kt"); } @TestMetadata("soSuspendableCallInEndOfFun.kt") public void testSoSuspendableCallInEndOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInEndOfFun.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInEndOfFun.kt"); } @TestMetadata("soSuspendableCallInEndOfLambda.kt") public void testSoSuspendableCallInEndOfLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInEndOfLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInEndOfLambda.kt"); } @TestMetadata("soSuspendableCallInFun.kt") public void testSoSuspendableCallInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInFun.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInFun.kt"); } @TestMetadata("soSuspendableCallInFunFromOtherStepping.kt") public void testSoSuspendableCallInFunFromOtherStepping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInFunFromOtherStepping.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInFunFromOtherStepping.kt"); } @TestMetadata("soSuspendableCallInLambda.kt") public void testSoSuspendableCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/soSuspendableCallInLambda.kt"); } @TestMetadata("stepOverCatchClause.kt") public void testStepOverCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverCatchClause.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverCatchClause.kt"); } @TestMetadata("stepOverDeclarationInInlineFun.kt") public void testStepOverDeclarationInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverDeclarationInInlineFun.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverDeclarationInInlineFun.kt"); } @TestMetadata("stepOverFalseConditionInLastIfInWhile.kt") public void testStepOverFalseConditionInLastIfInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverFalseConditionInLastIfInWhile.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverFalseConditionInLastIfInWhile.kt"); } @TestMetadata("stepOverForWithInline.kt") public void testStepOverForWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverForWithInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverForWithInline.kt"); } @TestMetadata("stepOverIfWithInline.kt") public void testStepOverIfWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverIfWithInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverIfWithInline.kt"); } @TestMetadata("stepOverInlineFunWithRecursionCall.kt") public void testStepOverInlineFunWithRecursionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunWithRecursionCall.kt"); } @TestMetadata("stepOverInlineFunctionInReturn.kt") public void testStepOverInlineFunctionInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunctionInReturn.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlineFunctionInReturn.kt"); } @TestMetadata("stepOverInlinedLambda.kt") public void testStepOverInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlinedLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlinedLambda.kt"); } @TestMetadata("stepOverInlinedLambdaStdlib.kt") public void testStepOverInlinedLambdaStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlinedLambdaStdlib.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInlinedLambdaStdlib.kt"); } @TestMetadata("stepOverInsideInlineFun.kt") public void testStepOverInsideInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInsideInlineFun.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverInsideInlineFun.kt"); } @TestMetadata("stepOverReifiedParam.kt") public void testStepOverReifiedParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverReifiedParam.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverReifiedParam.kt"); } @TestMetadata("stepOverSimpleFun.kt") public void testStepOverSimpleFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverSimpleFun.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverSimpleFun.kt"); } @TestMetadata("stepOverTryCatchWithInline.kt") public void testStepOverTryCatchWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverTryCatchWithInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverTryCatchWithInline.kt"); } @TestMetadata("stepOverWhenInReturn.kt") public void testStepOverWhenInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverWhenInReturn.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverWhenInReturn.kt"); } @TestMetadata("stepOverWhenWithInline.kt") public void testStepOverWhenWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverWhenWithInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverWhenWithInline.kt"); } @TestMetadata("stepOverWhileWithInline.kt") public void testStepOverWhileWithInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverWhileWithInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stepOverWhileWithInline.kt"); } @TestMetadata("stopInAnonymousFunctionInInlinedCallWithCrossInline.kt") public void testStopInAnonymousFunctionInInlinedCallWithCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInAnonymousFunctionInInlinedCallWithCrossInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInAnonymousFunctionInInlinedCallWithCrossInline.kt"); } @TestMetadata("stopInAnonymousFunctionInInlinedCallWithCrossInlineDex.kt") public void testStopInAnonymousFunctionInInlinedCallWithCrossInlineDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInAnonymousFunctionInInlinedCallWithCrossInlineDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInAnonymousFunctionInInlinedCallWithCrossInlineDex.kt"); } @TestMetadata("stopInCrossinlineInSuspend.kt") public void testStopInCrossinlineInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInCrossinlineInSuspend.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInCrossinlineInSuspend.kt"); } @TestMetadata("stopInExtensionInlineCall.kt") public void testStopInExtensionInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInExtensionInlineCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInExtensionInlineCall.kt"); } @TestMetadata("stopInInlineCallInField.kt") public void testStopInInlineCallInField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInField.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInField.kt"); } @TestMetadata("stopInInlineCallInFieldInClassWithNonDefaultPrimary.kt") public void testStopInInlineCallInFieldInClassWithNonDefaultPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInClassWithNonDefaultPrimary.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInClassWithNonDefaultPrimary.kt"); } @TestMetadata("stopInInlineCallInFieldInDelegate.kt") public void testStopInInlineCallInFieldInDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInDelegate.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInDelegate.kt"); } @TestMetadata("stopInInlineCallInFieldInLocalClass.kt") public void testStopInInlineCallInFieldInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInLocalClass.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallInFieldInLocalClass.kt"); } @TestMetadata("stopInInlineCallLocalFunLambda.kt") public void testStopInInlineCallLocalFunLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallLocalFunLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineCallLocalFunLambda.kt"); } @TestMetadata("stopInInlineFunDex.kt") public void testStopInInlineFunDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineFunDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineFunDex.kt"); } @TestMetadata("stopInInlineInOtherFileDex.kt") public void testStopInInlineInOtherFileDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineInOtherFileDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineInOtherFileDex.kt"); } @TestMetadata("stopInInlineInOtherFileWithLambdaArgumentDex.kt") public void testStopInInlineInOtherFileWithLambdaArgumentDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineInOtherFileWithLambdaArgumentDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineInOtherFileWithLambdaArgumentDex.kt"); } @TestMetadata("stopInInlineUnderOtherCall.kt") public void testStopInInlineUnderOtherCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineUnderOtherCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineUnderOtherCall.kt"); } @TestMetadata("stopInInlineUnderSamConversion.kt") public void testStopInInlineUnderSamConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineUnderSamConversion.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlineUnderSamConversion.kt"); } @TestMetadata("stopInInlinedInSpecialNamedFun.kt") public void testStopInInlinedInSpecialNamedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlinedInSpecialNamedFun.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlinedInSpecialNamedFun.kt"); } @TestMetadata("stopInInlinedInSpecialNamedFunWithGet.kt") public void testStopInInlinedInSpecialNamedFunWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlinedInSpecialNamedFunWithGet.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlinedInSpecialNamedFunWithGet.kt"); } @TestMetadata("stopInInlinedLambdaInSuspendFunctionWithSuspendPointsInObjectLiteral.kt") public void testStopInInlinedLambdaInSuspendFunctionWithSuspendPointsInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlinedLambdaInSuspendFunctionWithSuspendPointsInObjectLiteral.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInInlinedLambdaInSuspendFunctionWithSuspendPointsInObjectLiteral.kt"); } @TestMetadata("stopInLabdaOfCrossinlineCalledInAnonymous.kt") public void testStopInLabdaOfCrossinlineCalledInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLabdaOfCrossinlineCalledInAnonymous.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLabdaOfCrossinlineCalledInAnonymous.kt"); } @TestMetadata("stopInLambdaInInlinedCallWithCrossInline.kt") public void testStopInLambdaInInlinedCallWithCrossInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLambdaInInlinedCallWithCrossInline.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLambdaInInlinedCallWithCrossInline.kt"); } @TestMetadata("stopInLambdaInInlinedCallWithCrossInlineDex.kt") public void testStopInLambdaInInlinedCallWithCrossInlineDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLambdaInInlinedCallWithCrossInlineDex.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLambdaInInlinedCallWithCrossInlineDex.kt"); } @TestMetadata("stopInLambdaInlineCallLambda.kt") public void testStopInLambdaInlineCallLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLambdaInlineCallLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLambdaInlineCallLambda.kt"); } @TestMetadata("stopInLocalFunInSecondaryConstructor.kt") public void testStopInLocalFunInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLocalFunInSecondaryConstructor.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLocalFunInSecondaryConstructor.kt"); } @TestMetadata("stopInLocalFunInlineCallLambda.kt") public void testStopInLocalFunInlineCallLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLocalFunInlineCallLambda.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInLocalFunInlineCallLambda.kt"); } @TestMetadata("stopInNamelessFunInInlineCall.kt") public void testStopInNamelessFunInInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInNamelessFunInInlineCall.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInNamelessFunInInlineCall.kt"); } @TestMetadata("stopInNonInlinedLambdaInInlineCallWithClosure.kt") public void testStopInNonInlinedLambdaInInlineCallWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInNonInlinedLambdaInInlineCallWithClosure.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInNonInlinedLambdaInInlineCallWithClosure.kt"); } @TestMetadata("stopInNonInlinedLambdaInInlineCallWithoutClosure.kt") public void testStopInNonInlinedLambdaInInlineCallWithoutClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInNonInlinedLambdaInInlineCallWithoutClosure.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInNonInlinedLambdaInInlineCallWithoutClosure.kt"); } @TestMetadata("stopInObjectLiteralInInlineCallNoClosure.kt") public void testStopInObjectLiteralInInlineCallNoClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInObjectLiteralInInlineCallNoClosure.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInObjectLiteralInInlineCallNoClosure.kt"); } @TestMetadata("stopInObjectLiteralInInlineCallWithClosure.kt") public void testStopInObjectLiteralInInlineCallWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInObjectLiteralInInlineCallWithClosure.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInObjectLiteralInInlineCallWithClosure.kt"); } @TestMetadata("stopInObjectLiteralInInlineCallWithClosureInAnonymous.kt") public void testStopInObjectLiteralInInlineCallWithClosureInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInObjectLiteralInInlineCallWithClosureInAnonymous.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInObjectLiteralInInlineCallWithClosureInAnonymous.kt"); } @TestMetadata("stopInSuspendFunctionWithSuspendPoints.kt") public void testStopInSuspendFunctionWithSuspendPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithSuspendPoints.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithSuspendPoints.kt"); } @TestMetadata("stopInSuspendFunctionWithSuspendPointsInAnonymousObject.kt") public void testStopInSuspendFunctionWithSuspendPointsInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithSuspendPointsInAnonymousObject.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithSuspendPointsInAnonymousObject.kt"); } @TestMetadata("stopInSuspendFunctionWithSuspendPointsInObjectLiteralInInlineCallWithClosure.kt") public void testStopInSuspendFunctionWithSuspendPointsInObjectLiteralInInlineCallWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithSuspendPointsInObjectLiteralInInlineCallWithClosure.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithSuspendPointsInObjectLiteralInInlineCallWithClosure.kt"); } @TestMetadata("stopInSuspendFunctionWithoutSuspendPoints.kt") public void testStopInSuspendFunctionWithoutSuspendPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithoutSuspendPoints.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInSuspendFunctionWithoutSuspendPoints.kt"); } @TestMetadata("stopInWrongClass.kt") public void testStopInWrongClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInWrongClass.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInWrongClass.kt"); } @TestMetadata("stopInlineCallInLocalFunInSecondaryConstructor.kt") public void testStopInlineCallInLocalFunInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInlineCallInLocalFunInSecondaryConstructor.kt"); - doStepOverTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOver/stopInlineCallInLocalFunInSecondaryConstructor.kt"); } } @@ -1058,14 +913,17 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StepOverForce extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doStepOverForceTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStepOverForce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/stepOverForce"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("sofSuspendableCallInFun.kt") public void testSofSuspendableCallInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepOverForce/sofSuspendableCallInFun.kt"); - doStepOverForceTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/stepOverForce/sofSuspendableCallInFun.kt"); } } @@ -1073,80 +931,72 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Filters extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doStepIntoTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFilters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/filters"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkNotNull.kt") public void testCheckNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/checkNotNull.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/checkNotNull.kt"); } @TestMetadata("doNotSkipClassloader.kt") public void testDoNotSkipClassloader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/doNotSkipClassloader.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/doNotSkipClassloader.kt"); } @TestMetadata("doNotSkipConstructors.kt") public void testDoNotSkipConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/doNotSkipConstructors.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/doNotSkipConstructors.kt"); } @TestMetadata("npe.kt") public void testNpe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/npe.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/npe.kt"); } @TestMetadata("reflectKClass.kt") public void testReflectKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/reflectKClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/reflectKClass.kt"); } @TestMetadata("skipClassloader.kt") public void testSkipClassloader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/skipClassloader.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/skipClassloader.kt"); } @TestMetadata("skipConstructors.kt") public void testSkipConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/skipConstructors.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/skipConstructors.kt"); } @TestMetadata("stdlibStep.kt") public void testStdlibStep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stdlibStep.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/stdlibStep.kt"); } @TestMetadata("stepIntoMultiFileFacade.kt") public void testStepIntoMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoMultiFileFacade.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoMultiFileFacade.kt"); } @TestMetadata("stepIntoSpecificKotlinClasses.kt") public void testStepIntoSpecificKotlinClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoSpecificKotlinClasses.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoSpecificKotlinClasses.kt"); } @TestMetadata("stepIntoStdlib.kt") public void testStepIntoStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoStdlib.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoStdlib.kt"); } @TestMetadata("stepIntoStdlibFacadeClass.kt") public void testStepIntoStdlibFacadeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoStdlibFacadeClass.kt"); - doStepIntoTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/filters/stepIntoStdlibFacadeClass.kt"); } } @@ -1154,260 +1004,222 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Custom extends AbstractKotlinSteppingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doCustomTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCustom() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/stepping/custom"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousFunAsParamDefaultValue.kt") public void testAnonymousFunAsParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/anonymousFunAsParamDefaultValue.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/anonymousFunAsParamDefaultValue.kt"); } @TestMetadata("coroutine.kt") public void testCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/coroutine.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/coroutine.kt"); } @TestMetadata("crossinlineLiteral.kt") public void testCrossinlineLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/crossinlineLiteral.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/crossinlineLiteral.kt"); } @TestMetadata("finallyBlock.kt") public void testFinallyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/finallyBlock.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/finallyBlock.kt"); } @TestMetadata("funLiteral.kt") public void testFunLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/funLiteral.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/funLiteral.kt"); } @TestMetadata("functionCallStoredToVariable.kt") public void testFunctionCallStoredToVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/functionCallStoredToVariable.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/functionCallStoredToVariable.kt"); } @TestMetadata("fwAbstractProperty.kt") public void testFwAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/fwAbstractProperty.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/fwAbstractProperty.kt"); } @TestMetadata("fwInitializer.kt") public void testFwInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/fwInitializer.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/fwInitializer.kt"); } @TestMetadata("fwPropertyInInterface.kt") public void testFwPropertyInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/fwPropertyInInterface.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/fwPropertyInInterface.kt"); } @TestMetadata("inlineInObject.kt") public void testInlineInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/inlineInObject.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/inlineInObject.kt"); } @TestMetadata("inlineInObjectSameFileDex.kt") public void testInlineInObjectSameFileDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/inlineInObjectSameFileDex.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/inlineInObjectSameFileDex.kt"); } @TestMetadata("inlineOnlyLambdas.kt") public void testInlineOnlyLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/inlineOnlyLambdas.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/inlineOnlyLambdas.kt"); } @TestMetadata("inlineOnlyLambdasStepping.kt") public void testInlineOnlyLambdasStepping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/inlineOnlyLambdasStepping.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/inlineOnlyLambdasStepping.kt"); } @TestMetadata("inlineProperties.kt") public void testInlineProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/inlineProperties.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/inlineProperties.kt"); } @TestMetadata("inlinePropertyAccessors.kt") public void testInlinePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/inlinePropertyAccessors.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/inlinePropertyAccessors.kt"); } @TestMetadata("kt15823.kt") public void testKt15823() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/kt15823.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/kt15823.kt"); } @TestMetadata("kt17144.kt") public void testKt17144() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/kt17144.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/kt17144.kt"); } @TestMetadata("kt17295.kt") public void testKt17295() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/kt17295.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/kt17295.kt"); } @TestMetadata("manyFilesWithInlineCalls1Dex.kt") public void testManyFilesWithInlineCalls1Dex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/manyFilesWithInlineCalls1Dex.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/manyFilesWithInlineCalls1Dex.kt"); } @TestMetadata("manyFilesWithInlineCalls2Dex.kt") public void testManyFilesWithInlineCalls2Dex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/manyFilesWithInlineCalls2Dex.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/manyFilesWithInlineCalls2Dex.kt"); } @TestMetadata("severalFunLiterals.kt") public void testSeveralFunLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/severalFunLiterals.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/severalFunLiterals.kt"); } @TestMetadata("severalFunLiteralsInClass.kt") public void testSeveralFunLiteralsInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/severalFunLiteralsInClass.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/severalFunLiteralsInClass.kt"); } @TestMetadata("severalInlineCallsFromOtherFileDex.kt") public void testSeveralInlineCallsFromOtherFileDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/severalInlineCallsFromOtherFileDex.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/severalInlineCallsFromOtherFileDex.kt"); } @TestMetadata("severalInlineFunctionsInOneFileDex.kt") public void testSeveralInlineFunctionsInOneFileDex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/severalInlineFunctionsInOneFileDex.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/severalInlineFunctionsInOneFileDex.kt"); } @TestMetadata("simpleConditionalBreakpoint.kt") public void testSimpleConditionalBreakpoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/simpleConditionalBreakpoint.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/simpleConditionalBreakpoint.kt"); } @TestMetadata("smartStepIntoComponentFunction.kt") public void testSmartStepIntoComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoComponentFunction.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoComponentFunction.kt"); } @TestMetadata("smartStepIntoConstructor.kt") public void testSmartStepIntoConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoConstructor.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoConstructor.kt"); } @TestMetadata("smartStepIntoFunWithDefaultArgs.kt") public void testSmartStepIntoFunWithDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoFunWithDefaultArgs.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoFunWithDefaultArgs.kt"); } @TestMetadata("smartStepIntoInlinedFunLiteral.kt") public void testSmartStepIntoInlinedFunLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInlinedFunLiteral.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInlinedFunLiteral.kt"); } @TestMetadata("smartStepIntoInlinedFunctionalExpression.kt") public void testSmartStepIntoInlinedFunctionalExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInlinedFunctionalExpression.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInlinedFunctionalExpression.kt"); } @TestMetadata("smartStepIntoInsideLambda.kt") public void testSmartStepIntoInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInsideLambda.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInsideLambda.kt"); } @TestMetadata("smartStepIntoInterfaceFun.kt") public void testSmartStepIntoInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInterfaceFun.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInterfaceFun.kt"); } @TestMetadata("smartStepIntoInterfaceImpl.kt") public void testSmartStepIntoInterfaceImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInterfaceImpl.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoInterfaceImpl.kt"); } @TestMetadata("smartStepIntoStoredLambda.kt") public void testSmartStepIntoStoredLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoStoredLambda.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoStoredLambda.kt"); } @TestMetadata("smartStepIntoSubClass.kt") public void testSmartStepIntoSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoSubClass.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoSubClass.kt"); } @TestMetadata("smartStepIntoToLambdaParameter.kt") public void testSmartStepIntoToLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoToLambdaParameter.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoToLambdaParameter.kt"); } @TestMetadata("smartStepIntoWithDelegates.kt") public void testSmartStepIntoWithDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoWithDelegates.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoWithDelegates.kt"); } @TestMetadata("smartStepIntoWithOverrides.kt") public void testSmartStepIntoWithOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoWithOverrides.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/smartStepIntoWithOverrides.kt"); } @TestMetadata("stepIntoStdlibInlineFun2step.kt") public void testStepIntoStdlibInlineFun2step() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/stepIntoStdlibInlineFun2step.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/stepIntoStdlibInlineFun2step.kt"); } @TestMetadata("stepOutInlineFunctionStdlib.kt") public void testStepOutInlineFunctionStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/stepOutInlineFunctionStdlib.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/stepOutInlineFunctionStdlib.kt"); } @TestMetadata("stepOverNonLocalReturnInLambda.kt") public void testStepOverNonLocalReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/stepOverNonLocalReturnInLambda.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/stepOverNonLocalReturnInLambda.kt"); } @TestMetadata("syntheticProvider.kt") public void testSyntheticProvider() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/custom/syntheticProvider.kt"); - doCustomTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/stepping/custom/syntheticProvider.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/PositionManagerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/PositionManagerTestGenerated.java index 881dc535ac2..a0165859aa8 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/PositionManagerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/PositionManagerTestGenerated.java @@ -23,128 +23,112 @@ public class PositionManagerTestGenerated extends AbstractPositionManagerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SingleFile extends AbstractPositionManagerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSingleFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/positionManager"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("anonymousFunction.kt") public void testAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/anonymousFunction.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/anonymousFunction.kt"); } @TestMetadata("anonymousNamedFunction.kt") public void testAnonymousNamedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/anonymousNamedFunction.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/anonymousNamedFunction.kt"); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/class.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/classObject.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/classObject.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/enum.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/enum.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/extensionFunction.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/functionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/functionLiteral.kt"); } @TestMetadata("functionLiteralInVal.kt") public void testFunctionLiteralInVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/functionLiteralInVal.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/functionLiteralInVal.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/innerClass.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/innerClass.kt"); } @TestMetadata("JvmNameAnnotation.kt") public void testJvmNameAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/JvmNameAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/JvmNameAnnotation.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/localFunction.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/localFunction.kt"); } @TestMetadata("objectDeclaration.kt") public void testObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/objectDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/objectDeclaration.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/objectExpression.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/objectExpression.kt"); } @TestMetadata("package.kt") public void testPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/package.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/package.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/propertyAccessor.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/propertyAccessor.kt"); } @TestMetadata("propertyInitializer.kt") public void testPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/propertyInitializer.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/propertyInitializer.kt"); } @TestMetadata("topLevelPropertyInitializer.kt") public void testTopLevelPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/topLevelPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/topLevelPropertyInitializer.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/trait.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/trait.kt"); } @TestMetadata("twoClasses.kt") public void testTwoClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/twoClasses.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/twoClasses.kt"); } @TestMetadata("_DefaultPackage.kt") public void test_DefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/_DefaultPackage.kt"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/_DefaultPackage.kt"); } } @@ -152,20 +136,22 @@ public class PositionManagerTestGenerated extends AbstractPositionManagerTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiFile extends AbstractPositionManagerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/positionManager"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("multiFilePackage") public void testMultiFilePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/multiFilePackage/"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/multiFilePackage/"); } @TestMetadata("multiFileSameName") public void testMultiFileSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/positionManager/multiFileSameName/"); - doTest(fileName); + runTest("idea/testData/debugger/positionManager/multiFileSameName/"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/SmartStepIntoTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/SmartStepIntoTestGenerated.java index cbedb95d151..dd6301152e5 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/SmartStepIntoTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/SmartStepIntoTestGenerated.java @@ -21,193 +21,166 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SmartStepIntoTestGenerated extends AbstractSmartStepIntoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartStepInto() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/smartStepInto"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/annotation.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/annotation.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/arrayAccess.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/arrayAccess.kt"); } @TestMetadata("callChain.kt") public void testCallChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/callChain.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/callChain.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/constructor.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/constructor.kt"); } @TestMetadata("conventionMethod.kt") public void testConventionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/conventionMethod.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/conventionMethod.kt"); } @TestMetadata("delegatedPropertyGetter.kt") public void testDelegatedPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/delegatedPropertyGetter.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/delegatedPropertyGetter.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/doWhile.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/doWhile.kt"); } @TestMetadata("dotQualified.kt") public void testDotQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/dotQualified.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/dotQualified.kt"); } @TestMetadata("dotQualifiedInParam.kt") public void testDotQualifiedInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/dotQualifiedInParam.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/dotQualifiedInParam.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/empty.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/empty.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/for.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/for.kt"); } @TestMetadata("funLiteral.kt") public void testFunLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/funLiteral.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/funLiteral.kt"); } @TestMetadata("funWithExpressionBody.kt") public void testFunWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/funWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/funWithExpressionBody.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/if.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/if.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/infixCall.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/infixCall.kt"); } @TestMetadata("inlinedFunLiteral.kt") public void testInlinedFunLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/inlinedFunLiteral.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/inlinedFunLiteral.kt"); } @TestMetadata("inlinedFunctionalExpression.kt") public void testInlinedFunctionalExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/inlinedFunctionalExpression.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/inlinedFunctionalExpression.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/invoke.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/invoke.kt"); } @TestMetadata("libraryFun.kt") public void testLibraryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/libraryFun.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/libraryFun.kt"); } @TestMetadata("multiline.kt") public void testMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/multiline.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/multiline.kt"); } @TestMetadata("multilineCallChain.kt") public void testMultilineCallChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/multilineCallChain.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/multilineCallChain.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/object.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/object.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/param.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/param.kt"); } @TestMetadata("parantesized.kt") public void testParantesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/parantesized.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/parantesized.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/propertyGetter.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/propertyGetter.kt"); } @TestMetadata("renderer.kt") public void testRenderer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/renderer.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/renderer.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/simple.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/simple.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/stringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/stringTemplate.kt"); } @TestMetadata("unary.kt") public void testUnary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/unary.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/unary.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/when.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/when.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/while.kt"); - doTest(fileName); + runTest("idea/testData/debugger/smartStepInto/while.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentAutoImportTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentAutoImportTestGenerated.java index 063ebb6176d..4742821e310 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentAutoImportTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentAutoImportTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CodeFragmentAutoImportTestGenerated extends AbstractCodeFragmentAutoImportTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCodeFragmentAutoImport() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix.special/codeFragmentAutoImport"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("ExtensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix.special/codeFragmentAutoImport/ExtensionFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix.special/codeFragmentAutoImport/ExtensionFun.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionHandlerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionHandlerTestGenerated.java index 3170c2c5ad7..b3eebb24ebe 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionHandlerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionHandlerTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CodeFragmentCompletionHandlerTestGenerated extends AbstractCodeFragmentCompletionHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRuntimeCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/handlers/runtimeCast"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CastPrivateFun.kt") public void testCastPrivateFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/runtimeCast/CastPrivateFun.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/runtimeCast/CastPrivateFun.kt"); } @TestMetadata("CastPropertyWithSmartCast.kt") public void testCastPropertyWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/runtimeCast/CastPropertyWithSmartCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/runtimeCast/CastPropertyWithSmartCast.kt"); } @TestMetadata("InsertExtFunction.kt") public void testInsertExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/runtimeCast/InsertExtFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/runtimeCast/InsertExtFunction.kt"); } @TestMetadata("InsertFunction.kt") public void testInsertFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/runtimeCast/InsertFunction.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/runtimeCast/InsertFunction.kt"); } @TestMetadata("InsertImport.kt") public void testInsertImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/runtimeCast/InsertImport.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/runtimeCast/InsertImport.kt"); } @TestMetadata("NotImportedExtension.kt") public void testNotImportedExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/handlers/runtimeCast/NotImportedExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/handlers/runtimeCast/NotImportedExtension.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionTestGenerated.java index 49a4a19daaa..84c6b58b65f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentCompletionTestGenerated.java @@ -21,112 +21,104 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CodeFragmentCompletionTestGenerated extends AbstractCodeFragmentCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCodeFragments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/codeFragments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("blockCodeFragment.kt") public void testBlockCodeFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/blockCodeFragment.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/blockCodeFragment.kt"); } @TestMetadata("classHeader.kt") public void testClassHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/classHeader.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/classHeader.kt"); } @TestMetadata("elementAt.kt") public void testElementAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/elementAt.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/elementAt.kt"); } @TestMetadata("elementAtFirstInBlock.kt") public void testElementAtFirstInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/elementAtFirstInBlock.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/elementAtFirstInBlock.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/localVal.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/localVal.kt"); } @TestMetadata("localVariables.kt") public void testLocalVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/localVariables.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/localVariables.kt"); } @TestMetadata("localVariablesOnReturn.kt") public void testLocalVariablesOnReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/localVariablesOnReturn.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/localVariablesOnReturn.kt"); } @TestMetadata("noDuplicatesForSyntheticProperties.kt") public void testNoDuplicatesForSyntheticProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/noDuplicatesForSyntheticProperties.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/noDuplicatesForSyntheticProperties.kt"); } @TestMetadata("privatesInSecondPressCompletion.kt") public void testPrivatesInSecondPressCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/privatesInSecondPressCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/privatesInSecondPressCompletion.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/topLevel.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/topLevel.kt"); } @TestMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RuntimeType extends AbstractCodeFragmentCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRuntimeType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/idea-completion/testData/basic/codeFragments/runtimeType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("castWithGenerics.kt") public void testCastWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType/castWithGenerics.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/runtimeType/castWithGenerics.kt"); } @TestMetadata("complexHierarchy.kt") public void testComplexHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType/complexHierarchy.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/runtimeType/complexHierarchy.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType/extensionMethod.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/runtimeType/extensionMethod.kt"); } @TestMetadata("notImportedExtension.kt") public void testNotImportedExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType/notImportedExtension.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/runtimeType/notImportedExtension.kt"); } @TestMetadata("runtimeCast.kt") public void testRuntimeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType/runtimeCast.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/runtimeType/runtimeCast.kt"); } @TestMetadata("smartCompletion.kt") public void testSmartCompletion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/idea-completion/testData/basic/codeFragments/runtimeType/smartCompletion.kt"); - doTest(fileName); + runTest("idea/idea-completion/testData/basic/codeFragments/runtimeType/smartCompletion.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentHighlightingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentHighlightingTestGenerated.java index c9404622ef2..bffb0dbd887 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentHighlightingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/CodeFragmentHighlightingTestGenerated.java @@ -23,152 +23,132 @@ public class CodeFragmentHighlightingTestGenerated extends AbstractCodeFragmentH @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CodeFragments extends AbstractCodeFragmentHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCodeFragments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/codeFragments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/anonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/anonymousObject.kt"); } @TestMetadata("binaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/binaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/binaryExpression.kt"); } @TestMetadata("blockCodeFragment.kt") public void testBlockCodeFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/blockCodeFragment.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/blockCodeFragment.kt"); } @TestMetadata("callExpression.kt") public void testCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/callExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/callExpression.kt"); } @TestMetadata("classHeader.kt") public void testClassHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/classHeader.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/classHeader.kt"); } @TestMetadata("classHeaderWithTypeArguments.kt") public void testClassHeaderWithTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/classHeaderWithTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/classHeaderWithTypeArguments.kt"); } @TestMetadata("contextElementAsStatement.kt") public void testContextElementAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/contextElementAsStatement.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/contextElementAsStatement.kt"); } @TestMetadata("elementAtIfWithoutBraces.kt") public void testElementAtIfWithoutBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/elementAtIfWithoutBraces.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/elementAtIfWithoutBraces.kt"); } @TestMetadata("elementAtWhenBranch.kt") public void testElementAtWhenBranch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/elementAtWhenBranch.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/elementAtWhenBranch.kt"); } @TestMetadata("localVariables.kt") public void testLocalVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/localVariables.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/localVariables.kt"); } @TestMetadata("localVariablesOnReturn.kt") public void testLocalVariablesOnReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/localVariablesOnReturn.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/localVariablesOnReturn.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/primaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/primaryConstructor.kt"); } @TestMetadata("primaryConstructorLocal.kt") public void testPrimaryConstructorLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/primaryConstructorLocal.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/primaryConstructorLocal.kt"); } @TestMetadata("privateFunArgumentsResolve.kt") public void testPrivateFunArgumentsResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateFunArgumentsResolve.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/privateFunArgumentsResolve.kt"); } @TestMetadata("privateFunTypeArguments.kt") public void testPrivateFunTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateFunTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/privateFunTypeArguments.kt"); } @TestMetadata("privateMember.kt") public void testPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/privateMember.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/privateMember.kt"); } @TestMetadata("protectedMember.kt") public void testProtectedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/protectedMember.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/protectedMember.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/secondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/secondaryConstructor.kt"); } @TestMetadata("secondaryConstructorWithoutBraces.kt") public void testSecondaryConstructorWithoutBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/secondaryConstructorWithoutBraces.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/secondaryConstructorWithoutBraces.kt"); } @TestMetadata("simpleNameExpression.kt") public void testSimpleNameExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/simpleNameExpression.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/simpleNameExpression.kt"); } @TestMetadata("smartCasts.kt") public void testSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/smartCasts.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/smartCasts.kt"); } @TestMetadata("startingFromReturn.kt") public void testStartingFromReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/startingFromReturn.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/startingFromReturn.kt"); } @TestMetadata("withoutBodyFunction.kt") public void testWithoutBodyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/withoutBodyFunction.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/withoutBodyFunction.kt"); } @TestMetadata("withoutBodyProperty.kt") public void testWithoutBodyProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/withoutBodyProperty.kt"); - doTest(fileName); + runTest("idea/testData/checker/codeFragments/withoutBodyProperty.kt"); } } @@ -176,14 +156,17 @@ public class CodeFragmentHighlightingTestGenerated extends AbstractCodeFragmentH @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractCodeFragmentHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithImport, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/checker/codeFragments/imports"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/codeFragments/imports/hashMap.kt"); - doTestWithImport(fileName); + runTest("idea/testData/checker/codeFragments/imports/hashMap.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluateExpressionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluateExpressionTestGenerated.java index b4a28969e1d..41223c13722 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluateExpressionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/KotlinEvaluateExpressionTestGenerated.java @@ -23,16 +23,18 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SingleBreakpoint extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractFunCall.kt") public void testAbstractFunCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/abstractFunCall.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/abstractFunCall.kt"); } @TestMetadata("accessToOverridenPropertyWithBackingField.kt") public void testAccessToOverridenPropertyWithBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/accessToOverridenPropertyWithBackingField.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/accessToOverridenPropertyWithBackingField.kt"); } public void testAllFilesPresentInSingleBreakpoint() throws Exception { @@ -41,430 +43,364 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestMetadata("annotationValue.kt") public void testAnnotationValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/annotationValue.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/annotationValue.kt"); } @TestMetadata("anonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/anonymousObjects.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/anonymousObjects.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/arrays.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/arrays.kt"); } @TestMetadata("boxParam.kt") public void testBoxParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/boxParam.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/boxParam.kt"); } @TestMetadata("boxReturnValue.kt") public void testBoxReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/boxReturnValue.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/boxReturnValue.kt"); } @TestMetadata("breakpointInInlineFun.kt") public void testBreakpointInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/breakpointInInlineFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/breakpointInInlineFun.kt"); } @TestMetadata("callableBug.kt") public void testCallableBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/callableBug.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/callableBug.kt"); } @TestMetadata("classFromAnotherPackage.kt") public void testClassFromAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classFromAnotherPackage.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classFromAnotherPackage.kt"); } @TestMetadata("classObjectVal.kt") public void testClassObjectVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classObjectVal.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/classObjectVal.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/collections.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/collections.kt"); } @TestMetadata("delegatedPropertyInOtherFile.kt") public void testDelegatedPropertyInOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/delegatedPropertyInOtherFile.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/delegatedPropertyInOtherFile.kt"); } @TestMetadata("dependentOnFile.kt") public void testDependentOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/dependentOnFile.kt"); } @TestMetadata("doubles.kt") public void testDoubles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/doubles.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/doubles.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/enums.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/enums.kt"); } @TestMetadata("errors.kt") public void testErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/errors.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/errors.kt"); } @TestMetadata("extractLocalVariables.kt") public void testExtractLocalVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractLocalVariables.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractLocalVariables.kt"); } @TestMetadata("extractThis.kt") public void testExtractThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractThis.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractThis.kt"); } @TestMetadata("extractThisInTrait.kt") public void testExtractThisInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractThisInTrait.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractThisInTrait.kt"); } @TestMetadata("extractVariablesFromCall.kt") public void testExtractVariablesFromCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractVariablesFromCall.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractVariablesFromCall.kt"); } @TestMetadata("fileWithError.kt") public void testFileWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/fileWithError.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/fileWithError.kt"); } @TestMetadata("funFromSuperClass.kt") public void testFunFromSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/funFromSuperClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/funFromSuperClass.kt"); } @TestMetadata("genericCrossinlineArgument.kt") public void testGenericCrossinlineArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/genericCrossinlineArgument.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/genericCrossinlineArgument.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/imports.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/imports.kt"); } @TestMetadata("importsLambdaContext.kt") public void testImportsLambdaContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/importsLambdaContext.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/importsLambdaContext.kt"); } @TestMetadata("inlineFunInMultiFilePackage.kt") public void testInlineFunInMultiFilePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunInMultiFilePackage.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunInMultiFilePackage.kt"); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunction.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunction.kt"); } @TestMetadata("inlineFunctionBreakpointAnotherFile.kt") public void testInlineFunctionBreakpointAnotherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunctionBreakpointAnotherFile.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunctionBreakpointAnotherFile.kt"); } @TestMetadata("inlineFunctionBreakpointVariants.kt") public void testInlineFunctionBreakpointVariants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunctionBreakpointVariants.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/inlineFunctionBreakpointVariants.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/innerClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/innerClass.kt"); } @TestMetadata("insertInBlock.kt") public void testInsertInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/insertInBlock.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/insertInBlock.kt"); } @TestMetadata("internalFunctionEvaluate.kt") public void testInternalFunctionEvaluate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/internalFunctionEvaluate.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/internalFunctionEvaluate.kt"); } @TestMetadata("internalProperty.kt") public void testInternalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/internalProperty.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/internalProperty.kt"); } @TestMetadata("kt12206BasePropertyWithoutBackingField.kt") public void testKt12206BasePropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt12206BasePropertyWithoutBackingField.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt12206BasePropertyWithoutBackingField.kt"); } @TestMetadata("kt17514.kt") public void testKt17514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt17514.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt17514.kt"); } @TestMetadata("kt5554OnlyIntsShouldBeCoerced.kt") public void testKt5554OnlyIntsShouldBeCoerced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt5554OnlyIntsShouldBeCoerced.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt5554OnlyIntsShouldBeCoerced.kt"); } @TestMetadata("kt7046localVarInInline.kt") public void testKt7046localVarInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt7046localVarInInline.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/kt7046localVarInInline.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/localClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/localClass.kt"); } @TestMetadata("localVariables.kt") public void testLocalVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/localVariables.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/localVariables.kt"); } @TestMetadata("methodWithBreakpoint.kt") public void testMethodWithBreakpoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/methodWithBreakpoint.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/methodWithBreakpoint.kt"); } @TestMetadata("multilineExpressionAtBreakpoint.kt") public void testMultilineExpressionAtBreakpoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/multilineExpressionAtBreakpoint.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/multilineExpressionAtBreakpoint.kt"); } @TestMetadata("nestedInlineArguments.kt") public void testNestedInlineArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/nestedInlineArguments.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/nestedInlineArguments.kt"); } @TestMetadata("onClassHeader.kt") public void testOnClassHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/onClassHeader.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/onClassHeader.kt"); } @TestMetadata("onGetter.kt") public void testOnGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/onGetter.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/onGetter.kt"); } @TestMetadata("onObjectHeader.kt") public void testOnObjectHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/onObjectHeader.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/onObjectHeader.kt"); } @TestMetadata("package.kt") public void testPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/package.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/package.kt"); } @TestMetadata("parametersOfInlineFun.kt") public void testParametersOfInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/parametersOfInlineFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/parametersOfInlineFun.kt"); } @TestMetadata("parametersOfInlineFunSeveralOnLine.kt") public void testParametersOfInlineFunSeveralOnLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/parametersOfInlineFunSeveralOnLine.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/parametersOfInlineFunSeveralOnLine.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/privateClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/privateClass.kt"); } @TestMetadata("privateMember.kt") public void testPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/privateMember.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/privateMember.kt"); } @TestMetadata("privatePropertyWithExplicitDefaultGetter.kt") public void testPrivatePropertyWithExplicitDefaultGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/privatePropertyWithExplicitDefaultGetter.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/privatePropertyWithExplicitDefaultGetter.kt"); } @TestMetadata("protectedMember.kt") public void testProtectedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/protectedMember.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/protectedMember.kt"); } @TestMetadata("rawTypeskt11831.kt") public void testRawTypeskt11831() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/rawTypeskt11831.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/rawTypeskt11831.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/simple.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/simple.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/stdlib.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/stdlib.kt"); } @TestMetadata("typeParameterRef.kt") public void testTypeParameterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/typeParameterRef.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/typeParameterRef.kt"); } @TestMetadata("unboxParam.kt") public void testUnboxParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/unboxParam.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/unboxParam.kt"); } @TestMetadata("unsafeCall.kt") public void testUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/unsafeCall.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/unsafeCall.kt"); } @TestMetadata("vars.kt") public void testVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/vars.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/vars.kt"); } @TestMetadata(".kt.kt") public void test_kt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/.kt.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/.kt.kt"); } @TestMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompilingEvaluator extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompilingEvaluator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ceAnonymousObject.kt") public void testCeAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObject.kt"); } @TestMetadata("ceAnonymousObjectCapturedInClosure.kt") public void testCeAnonymousObjectCapturedInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObjectCapturedInClosure.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObjectCapturedInClosure.kt"); } @TestMetadata("ceAnonymousObjectThisAsReceiver.kt") public void testCeAnonymousObjectThisAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObjectThisAsReceiver.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceAnonymousObjectThisAsReceiver.kt"); } @TestMetadata("ceLambda.kt") public void testCeLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLambda.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLambda.kt"); } @TestMetadata("ceLocalClass.kt") public void testCeLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLocalClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLocalClass.kt"); } @TestMetadata("ceLocalClassMembers.kt") public void testCeLocalClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLocalClassMembers.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLocalClassMembers.kt"); } @TestMetadata("ceLocalClassWithSuperClass.kt") public void testCeLocalClassWithSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLocalClassWithSuperClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceLocalClassWithSuperClass.kt"); } @TestMetadata("ceMembers.kt") public void testCeMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceMembers.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceMembers.kt"); } @TestMetadata("ceObject.kt") public void testCeObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceObject.kt"); } @TestMetadata("ceSeveralLambdas.kt") public void testCeSeveralLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceSeveralLambdas.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceSeveralLambdas.kt"); } @TestMetadata("ceSuperAccess.kt") public void testCeSuperAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceSuperAccess.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/compilingEvaluator/ceSuperAccess.kt"); } } @@ -472,26 +408,27 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateExpression extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createExpressionCastToBuiltIn.kt") public void testCreateExpressionCastToBuiltIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionCastToBuiltIn.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionCastToBuiltIn.kt"); } @TestMetadata("createExpressionSimple.kt") public void testCreateExpressionSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionSimple.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionSimple.kt"); } @TestMetadata("createExpressionWithArray.kt") public void testCreateExpressionWithArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionWithArray.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/createExpression/createExpressionWithArray.kt"); } } @@ -499,74 +436,67 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtraVariables extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtraVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("evBreakpointOnPropertyDeclaration.kt") public void testEvBreakpointOnPropertyDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evBreakpointOnPropertyDeclaration.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evBreakpointOnPropertyDeclaration.kt"); } @TestMetadata("evDelegatedProperty.kt") public void testEvDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDelegatedProperty.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDelegatedProperty.kt"); } @TestMetadata("evDuplicateItems.kt") public void testEvDuplicateItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDuplicateItems.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evDuplicateItems.kt"); } @TestMetadata("evFinalProperty.kt") public void testEvFinalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFinalProperty.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFinalProperty.kt"); } @TestMetadata("evFunctionDeclaration.kt") public void testEvFunctionDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFunctionDeclaration.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evFunctionDeclaration.kt"); } @TestMetadata("evLineRange.kt") public void testEvLineRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evLineRange.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evLineRange.kt"); } @TestMetadata("evProperty.kt") public void testEvProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evProperty.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evProperty.kt"); } @TestMetadata("evPropertyRefExpr.kt") public void testEvPropertyRefExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evPropertyRefExpr.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evPropertyRefExpr.kt"); } @TestMetadata("evSkipAnonymousObject.kt") public void testEvSkipAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipAnonymousObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipAnonymousObject.kt"); } @TestMetadata("evSkipLambda.kt") public void testEvSkipLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLambda.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLambda.kt"); } @TestMetadata("evSkipLocalClass.kt") public void testEvSkipLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLocalClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extraVariables/evSkipLocalClass.kt"); } } @@ -574,158 +504,137 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Frame extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFrame() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchVariable.kt") public void testCatchVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/catchVariable.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/catchVariable.kt"); } @TestMetadata("delegatedPropertyInClass.kt") public void testDelegatedPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClass.kt"); } @TestMetadata("delegatedPropertyInClassWithToString.kt") public void testDelegatedPropertyInClassWithToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWithToString.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWithToString.kt"); } @TestMetadata("delegatedPropertyInClassWoRenderer.kt") public void testDelegatedPropertyInClassWoRenderer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/delegatedPropertyInClassWoRenderer.kt"); } @TestMetadata("frameAnonymousObject.kt") public void testFrameAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameAnonymousObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameAnonymousObject.kt"); } @TestMetadata("frameClassObject.kt") public void testFrameClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClassObject.kt"); } @TestMetadata("frameClosingBracket.kt") public void testFrameClosingBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClosingBracket.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameClosingBracket.kt"); } @TestMetadata("frameExtFunExtFun.kt") public void testFrameExtFunExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtFunExtFun.kt"); } @TestMetadata("frameExtensionFun.kt") public void testFrameExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameExtensionFun.kt"); } @TestMetadata("frameInlineArgument.kt") public void testFrameInlineArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgument.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgument.kt"); } @TestMetadata("frameInlineArgumentInsideInlineFun.kt") public void testFrameInlineArgumentInsideInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgumentInsideInlineFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineArgumentInsideInlineFun.kt"); } @TestMetadata("frameInlineFun.kt") public void testFrameInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFun.kt"); } @TestMetadata("frameInlineFunCallInsideInlineFun.kt") public void testFrameInlineFunCallInsideInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFun.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInlineFunCallInsideInlineFun.kt"); } @TestMetadata("frameInnerClass.kt") public void testFrameInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerClass.kt"); } @TestMetadata("frameInnerLambda.kt") public void testFrameInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerLambda.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameInnerLambda.kt"); } @TestMetadata("frameLambda.kt") public void testFrameLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambda.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambda.kt"); } @TestMetadata("frameLambdaNotUsed.kt") public void testFrameLambdaNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambdaNotUsed.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLambdaNotUsed.kt"); } @TestMetadata("frameLocalVariable.kt") public void testFrameLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLocalVariable.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameLocalVariable.kt"); } @TestMetadata("frameObject.kt") public void testFrameObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameObject.kt"); } @TestMetadata("frameSharedVar.kt") public void testFrameSharedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVar.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVar.kt"); } @TestMetadata("frameSharedVarLocalVar.kt") public void testFrameSharedVarLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVarLocalVar.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSharedVarLocalVar.kt"); } @TestMetadata("frameSimple.kt") public void testFrameSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSimple.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameSimple.kt"); } @TestMetadata("frameThis0.kt") public void testFrameThis0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0.kt"); } @TestMetadata("frameThis0Ext.kt") public void testFrameThis0Ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0Ext.kt"); } @TestMetadata("frameThis0This0.kt") public void testFrameThis0This0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/frame/frameThis0This0.kt"); } } @@ -733,44 +642,42 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaContext extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaContext() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jcBlock.kt") public void testJcBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcBlock.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcBlock.kt"); } @TestMetadata("jcImports.kt") public void testJcImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcImports.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcImports.kt"); } @TestMetadata("jcLocalVariable.kt") public void testJcLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcLocalVariable.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcLocalVariable.kt"); } @TestMetadata("jcMarkedObject.kt") public void testJcMarkedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcMarkedObject.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcMarkedObject.kt"); } @TestMetadata("jcProperty.kt") public void testJcProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcProperty.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcProperty.kt"); } @TestMetadata("jcSimple.kt") public void testJcSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcSimple.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/javaContext/jcSimple.kt"); } } @@ -778,38 +685,37 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lCallOnLabeledObj.kt") public void testLCallOnLabeledObj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lCallOnLabeledObj.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lCallOnLabeledObj.kt"); } @TestMetadata("lIdentifier.kt") public void testLIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lIdentifier.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lIdentifier.kt"); } @TestMetadata("lSeveralLabels.kt") public void testLSeveralLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lSeveralLabels.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lSeveralLabels.kt"); } @TestMetadata("lSimple.kt") public void testLSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lSimple.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/lSimple.kt"); } @TestMetadata("ldifferentTypes.kt") public void testLdifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/ldifferentTypes.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/labels/ldifferentTypes.kt"); } } @@ -817,68 +723,62 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lambdas extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdas() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("destructuringParam.kt") public void testDestructuringParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/destructuringParam.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/destructuringParam.kt"); } @TestMetadata("inlineFunctionalExpression.kt") public void testInlineFunctionalExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/inlineFunctionalExpression.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/inlineFunctionalExpression.kt"); } @TestMetadata("inlineLambda.kt") public void testInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/inlineLambda.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/inlineLambda.kt"); } @TestMetadata("lambdaOnReturn.kt") public void testLambdaOnReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/lambdaOnReturn.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/lambdaOnReturn.kt"); } @TestMetadata("lambdaOnSecondLine.kt") public void testLambdaOnSecondLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/lambdaOnSecondLine.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/lambdaOnSecondLine.kt"); } @TestMetadata("oneLineFunctionalExpression.kt") public void testOneLineFunctionalExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/oneLineFunctionalExpression.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/oneLineFunctionalExpression.kt"); } @TestMetadata("oneLineLambda.kt") public void testOneLineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/oneLineLambda.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/oneLineLambda.kt"); } @TestMetadata("twoLambdasOnOneLineFirst.kt") public void testTwoLambdasOnOneLineFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/twoLambdasOnOneLineFirst.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/twoLambdasOnOneLineFirst.kt"); } @TestMetadata("twoLambdasOnOneLineSecond.kt") public void testTwoLambdasOnOneLineSecond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/twoLambdasOnOneLineSecond.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/twoLambdasOnOneLineSecond.kt"); } @TestMetadata("underscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/underscoreNames.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/lambdas/underscoreNames.kt"); } } @@ -886,14 +786,17 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Renderer extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSingleBreakpointTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenderer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("toStringRenderer.kt") public void testToStringRenderer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer/toStringRenderer.kt"); - doSingleBreakpointTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/renderer/toStringRenderer.kt"); } } } @@ -902,148 +805,134 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultipleBreakpoints extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doMultipleBreakpointsTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultipleBreakpoints() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("clearCache.kt") public void testClearCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/clearCache.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/clearCache.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/constructors.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/constructors.kt"); } @TestMetadata("exceptions.kt") public void testExceptions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/exceptions.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/exceptions.kt"); } @TestMetadata("extensionMemberFunction.kt") public void testExtensionMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/extensionMemberFunction.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/extensionMemberFunction.kt"); } @TestMetadata("extensionMemberFunctionInObject.kt") public void testExtensionMemberFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/extensionMemberFunctionInObject.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/extensionMemberFunctionInObject.kt"); } @TestMetadata("extensionMemberProperty.kt") public void testExtensionMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/extensionMemberProperty.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/extensionMemberProperty.kt"); } @TestMetadata("funFromOuterClassInLamdba.kt") public void testFunFromOuterClassInLamdba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/funFromOuterClassInLamdba.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/funFromOuterClassInLamdba.kt"); } @TestMetadata("initializer.kt") public void testInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/initializer.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/initializer.kt"); } @TestMetadata("invisibleDeclarations.kt") public void testInvisibleDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/invisibleDeclarations.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/invisibleDeclarations.kt"); } @TestMetadata("isInsideInlineLambda.kt") public void testIsInsideInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/isInsideInlineLambda.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/isInsideInlineLambda.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/localFun.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/localFun.kt"); } @TestMetadata("multipleBreakpointsAtLine.kt") public void testMultipleBreakpointsAtLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/multipleBreakpointsAtLine.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/multipleBreakpointsAtLine.kt"); } @TestMetadata("privateMembersPriority.kt") public void testPrivateMembersPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/privateMembersPriority.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/privateMembersPriority.kt"); } @TestMetadata("remappedParameterInInline.kt") public void testRemappedParameterInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/remappedParameterInInline.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/remappedParameterInInline.kt"); } @TestMetadata("smartcasts.kt") public void testSmartcasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/smartcasts.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/smartcasts.kt"); } @TestMetadata("whenEntry.kt") public void testWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/whenEntry.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/whenEntry.kt"); } @TestMetadata("withoutBodyFunctions.kt") public void testWithoutBodyFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyFunctions.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyFunctions.kt"); } @TestMetadata("withoutBodyProperties.kt") public void testWithoutBodyProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyProperties.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyProperties.kt"); } @TestMetadata("withoutBodyProperties2.kt") public void testWithoutBodyProperties2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyProperties2.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyProperties2.kt"); } @TestMetadata("withoutBodyTypeParameters.kt") public void testWithoutBodyTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyTypeParameters.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/withoutBodyTypeParameters.kt"); } @TestMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/library") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractKotlinEvaluateExpressionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doMultipleBreakpointsTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customLibClassName.kt") public void testCustomLibClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/library/customLibClassName.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/library/customLibClassName.kt"); } @TestMetadata("localFunInLibrary.kt") public void testLocalFunInLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/library/localFunInLibrary.kt"); - doMultipleBreakpointsTest(fileName); + runTest("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/library/localFunInLibrary.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/SelectExpressionForDebuggerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/SelectExpressionForDebuggerTestGenerated.java index cca2674f7e7..b620f5be8ec 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/SelectExpressionForDebuggerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/SelectExpressionForDebuggerTestGenerated.java @@ -23,230 +23,197 @@ public class SelectExpressionForDebuggerTestGenerated extends AbstractSelectExpr @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SelectExpression extends AbstractSelectExpressionForDebuggerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSelectExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/selectExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/annotation.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/annotation.kt"); } @TestMetadata("binaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/binaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/binaryExpression.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/call.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/call.kt"); } @TestMetadata("companionObjectCall.kt") public void testCompanionObjectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/companionObjectCall.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/companionObjectCall.kt"); } @TestMetadata("companionObjectCall2.kt") public void testCompanionObjectCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/companionObjectCall2.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/companionObjectCall2.kt"); } @TestMetadata("expressionInPropertyInitializer.kt") public void testExpressionInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/expressionInPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/expressionInPropertyInitializer.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/extensionFun.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/extensionFun.kt"); } @TestMetadata("firstCallInChain.kt") public void testFirstCallInChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/firstCallInChain.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/firstCallInChain.kt"); } @TestMetadata("fullyQualified.kt") public void testFullyQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/fullyQualified.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/fullyQualified.kt"); } @TestMetadata("funArgument.kt") public void testFunArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/funArgument.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/funArgument.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/functionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/functionLiteral.kt"); } @TestMetadata("getConvention.kt") public void testGetConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/getConvention.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/getConvention.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/imports.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/imports.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/infixCall.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/infixCall.kt"); } @TestMetadata("infixCallArgument.kt") public void testInfixCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/infixCallArgument.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/infixCallArgument.kt"); } @TestMetadata("isExpression.kt") public void testIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/isExpression.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/isExpression.kt"); } @TestMetadata("javaStaticMehtodCall.kt") public void testJavaStaticMehtodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/javaStaticMehtodCall.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/javaStaticMehtodCall.kt"); } @TestMetadata("keyword.kt") public void testKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/keyword.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/keyword.kt"); } @TestMetadata("modifier.kt") public void testModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/modifier.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/modifier.kt"); } @TestMetadata("nameArgument.kt") public void testNameArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/nameArgument.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/nameArgument.kt"); } @TestMetadata("objectMethodCall.kt") public void testObjectMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/objectMethodCall.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/objectMethodCall.kt"); } @TestMetadata("package.kt") public void testPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/package.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/package.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/param.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/param.kt"); } @TestMetadata("propertyCall.kt") public void testPropertyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/propertyCall.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/propertyCall.kt"); } @TestMetadata("propertyDeclaration.kt") public void testPropertyDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/propertyDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/propertyDeclaration.kt"); } @TestMetadata("qualifiedExpressionProperty.kt") public void testQualifiedExpressionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionProperty.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/qualifiedExpressionProperty.kt"); } @TestMetadata("qualifiedExpressionReceiver.kt") public void testQualifiedExpressionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionReceiver.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/qualifiedExpressionReceiver.kt"); } @TestMetadata("qualifiedExpressionSelector.kt") public void testQualifiedExpressionSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/qualifiedExpressionSelector.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/qualifiedExpressionSelector.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/super.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/super.kt"); } @TestMetadata("superSelector.kt") public void testSuperSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/superSelector.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/superSelector.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/this.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/this.kt"); } @TestMetadata("thisSelector.kt") public void testThisSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/thisSelector.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/thisSelector.kt"); } @TestMetadata("thisWithLabel.kt") public void testThisWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/thisWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/thisWithLabel.kt"); } @TestMetadata("unaryExpression.kt") public void testUnaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/unaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/unaryExpression.kt"); } @TestMetadata("userType.kt") public void testUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userType.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/userType.kt"); } @TestMetadata("userTypeGeneric.kt") public void testUserTypeGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userTypeGeneric.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/userTypeGeneric.kt"); } @TestMetadata("userTypeQualified.kt") public void testUserTypeQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/userTypeQualified.kt"); - doTest(fileName); + runTest("idea/testData/debugger/selectExpression/userTypeQualified.kt"); } } @@ -254,128 +221,112 @@ public class SelectExpressionForDebuggerTestGenerated extends AbstractSelectExpr @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DisallowMethodCalls extends AbstractSelectExpressionForDebuggerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWoMethodCalls, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDisallowMethodCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/selectExpression/disallowMethodCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("binaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/binaryExpression.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/binaryExpression.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/call.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/call.kt"); } @TestMetadata("expressionInPropertyInitializer.kt") public void testExpressionInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/expressionInPropertyInitializer.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/expressionInPropertyInitializer.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/extensionFun.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/extensionFun.kt"); } @TestMetadata("funArgument.kt") public void testFunArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/funArgument.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/funArgument.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/functionLiteral.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/functionLiteral.kt"); } @TestMetadata("getConvention.kt") public void testGetConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/getConvention.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/getConvention.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/infixCall.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/infixCall.kt"); } @TestMetadata("infixCallArgument.kt") public void testInfixCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/infixCallArgument.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/infixCallArgument.kt"); } @TestMetadata("isExpression.kt") public void testIsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/isExpression.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/isExpression.kt"); } @TestMetadata("propertyCall.kt") public void testPropertyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/propertyCall.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/propertyCall.kt"); } @TestMetadata("qualifiedExpressionProperty.kt") public void testQualifiedExpressionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionProperty.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionProperty.kt"); } @TestMetadata("qualifiedExpressionReceiver.kt") public void testQualifiedExpressionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionReceiver.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionReceiver.kt"); } @TestMetadata("qualifiedExpressionSelector.kt") public void testQualifiedExpressionSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionSelector.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/qualifiedExpressionSelector.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/super.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/super.kt"); } @TestMetadata("superSelector.kt") public void testSuperSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/superSelector.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/superSelector.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/this.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/this.kt"); } @TestMetadata("thisSelector.kt") public void testThisSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/thisSelector.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/thisSelector.kt"); } @TestMetadata("thisWithLabel.kt") public void testThisWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/thisWithLabel.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/thisWithLabel.kt"); } @TestMetadata("unaryExpression.kt") public void testUnaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/selectExpression/disallowMethodCalls/unaryExpression.kt"); - doTestWoMethodCalls(fileName); + runTest("idea/testData/debugger/selectExpression/disallowMethodCalls/unaryExpression.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToDecompiledLibraryTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToDecompiledLibraryTestGenerated.java index 524a465b882..014eeda0b84 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToDecompiledLibraryTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToDecompiledLibraryTestGenerated.java @@ -21,97 +21,86 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class NavigateToDecompiledLibraryTestGenerated extends AbstractNavigateToDecompiledLibraryTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUsercode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ClassObject.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Constructor.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt"); } @TestMetadata("Enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Enum.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Enum.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt"); } @TestMetadata("ExtensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt"); } @TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt") public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt"); } @TestMetadata("GenericFunctionWithInferredTypeArguments.kt") public void testGenericFunctionWithInferredTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt"); } @TestMetadata("GlobalFunction.kt") public void testGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt"); } @TestMetadata("GlobalProperty.kt") public void testGlobalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/NamedObject.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt"); } @TestMetadata("OverloadedFunWithTypeParam.kt") public void testOverloadedFunWithTypeParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Property.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Property.kt"); } @TestMetadata("SameNameInDifferentSources.kt") public void testSameNameInDifferentSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/TypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt"); } @TestMetadata("TypeWithSameShortName.kt") public void testTypeWithSameShortName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToLibrarySourceTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToLibrarySourceTestGenerated.java index 288d26abe7f..3c8e3224a98 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToLibrarySourceTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToLibrarySourceTestGenerated.java @@ -23,98 +23,87 @@ public class NavigateToLibrarySourceTestGenerated extends AbstractNavigateToLibr @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Usercode extends AbstractNavigateToLibrarySourceTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUsercode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ClassObject.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Constructor.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt"); } @TestMetadata("Enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Enum.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Enum.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt"); } @TestMetadata("ExtensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt"); } @TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt") public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt"); } @TestMetadata("GenericFunctionWithInferredTypeArguments.kt") public void testGenericFunctionWithInferredTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt"); } @TestMetadata("GlobalFunction.kt") public void testGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt"); } @TestMetadata("GlobalProperty.kt") public void testGlobalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/NamedObject.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt"); } @TestMetadata("OverloadedFunWithTypeParam.kt") public void testOverloadedFunWithTypeParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Property.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Property.kt"); } @TestMetadata("SameNameInDifferentSources.kt") public void testSameNameInDifferentSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/TypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt"); } @TestMetadata("TypeWithSameShortName.kt") public void testTypeWithSameShortName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt"); - doTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt"); } } @@ -122,98 +111,87 @@ public class NavigateToLibrarySourceTestGenerated extends AbstractNavigateToLibr @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UsercodeWithJSModule extends AbstractNavigateToLibrarySourceTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doWithJSModuleTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUsercodeWithJSModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/navigation/usercode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ClassObject.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ClassObject.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Constructor.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Constructor.kt"); } @TestMetadata("Enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Enum.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Enum.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ExtensionFunction.kt"); } @TestMetadata("ExtensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/ExtensionProperty.kt"); } @TestMetadata("GenericFunctionWithExplicitlyDeclaredTypeArguments.kt") public void testGenericFunctionWithExplicitlyDeclaredTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithExplicitlyDeclaredTypeArguments.kt"); } @TestMetadata("GenericFunctionWithInferredTypeArguments.kt") public void testGenericFunctionWithInferredTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GenericFunctionWithInferredTypeArguments.kt"); } @TestMetadata("GlobalFunction.kt") public void testGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GlobalFunction.kt"); } @TestMetadata("GlobalProperty.kt") public void testGlobalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/GlobalProperty.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/NamedObject.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/NamedObject.kt"); } @TestMetadata("OverloadedFunWithTypeParam.kt") public void testOverloadedFunWithTypeParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/OverloadedFunWithTypeParam.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/Property.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/Property.kt"); } @TestMetadata("SameNameInDifferentSources.kt") public void testSameNameInDifferentSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/SameNameInDifferentSources.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/TypeAlias.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/TypeAlias.kt"); } @TestMetadata("TypeWithSameShortName.kt") public void testTypeWithSameShortName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt"); - doWithJSModuleTest(fileName); + runTest("idea/testData/decompiler/navigation/usercode/TypeWithSameShortName.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderTestGenerated.java index a8fe7818bee..109393de8b0 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderTestGenerated.java @@ -21,211 +21,181 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ClsStubBuilderTestGenerated extends AbstractClsStubBuilderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStubBuilder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/stubBuilder"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("AnnotatedFlexibleTypes") public void testAnnotatedFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/AnnotatedFlexibleTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/AnnotatedFlexibleTypes/"); } @TestMetadata("AnnotationClass") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/AnnotationClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/AnnotationClass/"); } @TestMetadata("Annotations") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Annotations/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Annotations/"); } @TestMetadata("AnnotationsOnNullableTypes") public void testAnnotationsOnNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/AnnotationsOnNullableTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/AnnotationsOnNullableTypes/"); } @TestMetadata("AnnotationsOnParenthesizedTypes") public void testAnnotationsOnParenthesizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/AnnotationsOnParenthesizedTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/AnnotationsOnParenthesizedTypes/"); } @TestMetadata("AnonymousReturnWithGenericType") public void testAnonymousReturnWithGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/AnonymousReturnWithGenericType/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/AnonymousReturnWithGenericType/"); } @TestMetadata("ClassMembers") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/ClassMembers/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/ClassMembers/"); } @TestMetadata("ClassObject") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/ClassObject/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/ClassObject/"); } @TestMetadata("Const") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Const/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Const/"); } @TestMetadata("DataClass") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/DataClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/DataClass/"); } @TestMetadata("Delegation") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Delegation/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Delegation/"); } @TestMetadata("DependencyOnNestedClasses") public void testDependencyOnNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/DependencyOnNestedClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/DependencyOnNestedClasses/"); } @TestMetadata("Enum") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Enum/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Enum/"); } @TestMetadata("FlexibleTypes") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/FlexibleTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/FlexibleTypes/"); } @TestMetadata("InheritingClasses") public void testInheritingClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/InheritingClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/InheritingClasses/"); } @TestMetadata("InnerTypes") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/InnerTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/InnerTypes/"); } @TestMetadata("LocalClass") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/LocalClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/LocalClass/"); } @TestMetadata("Modifiers") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Modifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Modifiers/"); } @TestMetadata("MultifileClass") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/MultifileClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/MultifileClass/"); } @TestMetadata("NamedCompanionObject") public void testNamedCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/NamedCompanionObject/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/NamedCompanionObject/"); } @TestMetadata("NestedClasses") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/NestedClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/NestedClasses/"); } @TestMetadata("Objects") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Objects/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Objects/"); } @TestMetadata("PrivateToThis") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/PrivateToThis/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/PrivateToThis/"); } @TestMetadata("Sealed") public void testSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Sealed/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Sealed/"); } @TestMetadata("SecondaryConstructors") public void testSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/SecondaryConstructors/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/SecondaryConstructors/"); } @TestMetadata("SuspendLambda") public void testSuspendLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/SuspendLambda/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/SuspendLambda/"); } @TestMetadata("TopJvmPackageName") public void testTopJvmPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TopJvmPackageName/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TopJvmPackageName/"); } @TestMetadata("TopLevelMembersAnnotatedKt") public void testTopLevelMembersAnnotatedKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedKt/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TopLevelMembersAnnotatedKt/"); } @TestMetadata("TopLevelMembersKt") public void testTopLevelMembersKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TopLevelMembersKt/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TopLevelMembersKt/"); } @TestMetadata("TypeAliases") public void testTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TypeAliases/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TypeAliases/"); } @TestMetadata("TypeBoundsAndDelegationSpecifiers") public void testTypeBoundsAndDelegationSpecifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TypeBoundsAndDelegationSpecifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TypeBoundsAndDelegationSpecifiers/"); } @TestMetadata("TypeModifiers") public void testTypeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TypeModifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TypeModifiers/"); } @TestMetadata("TypeParams") public void testTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/TypeParams/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/TypeParams/"); } @TestMetadata("Types") public void testTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/stubBuilder/Types/"); - doTest(fileName); + runTest("idea/testData/decompiler/stubBuilder/Types/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/LoadJavaClsStubTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/LoadJavaClsStubTestGenerated.java index 505b1105319..4b4f79e8ba4 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/LoadJavaClsStubTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/stubBuilder/LoadJavaClsStubTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,118 +33,109 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.kt") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); } @TestMetadata("AnnotatedMethod.kt") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); } @TestMetadata("AnnotationInAnnotationArguments.kt") public void testAnnotationInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); } @TestMetadata("EnumArgumentWithCustomToString.kt") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); } @TestMetadata("MultiDimensionalArrayMethod.kt") public void testMultiDimensionalArrayMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); } @TestMetadata("PrimitiveArrayArguments.kt") public void testPrimitiveArrayArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); } @TestMetadata("TargetedAnnotation.kt") public void testTargetedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembers extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectPropertyField.kt") public void testClassObjectPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); } } @@ -148,98 +143,87 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInClassObject.kt") public void testAnnotationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); } @TestMetadata("DollarsInAnnotationName.kt") public void testDollarsInAnnotationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); } @TestMetadata("MultipleAnnotations.kt") public void testMultipleAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); } @TestMetadata("NestedAnnotation.kt") public void testNestedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); } @TestMetadata("Retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); } @TestMetadata("WithArgument.kt") public void testWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); } @TestMetadata("WithMultipleArguments.kt") public void testWithMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); } } @@ -247,56 +231,52 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); } @TestMetadata("EnumArrayArgument.kt") public void testEnumArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); } @TestMetadata("StringArrayArgument.kt") public void testStringArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); } } @@ -304,80 +284,72 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); } @TestMetadata("ExtensionFunctionInClass.kt") public void testExtensionFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); } @TestMetadata("ExtensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); } @TestMetadata("FunctionInClass.kt") public void testFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); } @TestMetadata("FunctionInTrait.kt") public void testFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); } @TestMetadata("InnerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); } @TestMetadata("ManyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); } @TestMetadata("PropertySetterInClass.kt") public void testPropertySetterInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); } @TestMetadata("TopLevelPropertySetter.kt") public void testTopLevelPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); } } @@ -385,56 +357,52 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertiesWithoutBackingFields extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); } @TestMetadata("ExtensionsWithSameNameClass.kt") public void testExtensionsWithSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); } @TestMetadata("ExtensionsWithSameNamePackage.kt") public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); } @TestMetadata("NestedTrait.kt") public void testNestedTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); } @TestMetadata("TraitClassObject.kt") public void testTraitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); } } @@ -442,56 +410,52 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassLiteralArgument.kt") public void testClassLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); } @TestMetadata("ReceiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); } @TestMetadata("SimpleTypeAnnotation.kt") public void testSimpleTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); } @TestMetadata("SupertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); } @TestMetadata("TypeAnnotationWithArguments.kt") public void testTypeAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); } @TestMetadata("TypeArgument.kt") public void testTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); } @TestMetadata("TypeParameterAnnotation.kt") public void testTypeParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); } @TestMetadata("TypeParameterAnnotationWithArguments.kt") public void testTypeParameterAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); } } @@ -499,26 +463,27 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateTarget.kt") public void testDelegateTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); } @TestMetadata("FieldTarget.kt") public void testFieldTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); } @TestMetadata("ReceiverTarget.kt") public void testReceiverTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); } } } @@ -527,262 +492,229 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); } @TestMetadata("ClassInParam.kt") public void testClassInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); } @TestMetadata("ClassInnerClass.kt") public void testClassInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); } @TestMetadata("ClassMemberConflict.kt") public void testClassMemberConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); } @TestMetadata("ClassOutParam.kt") public void testClassOutParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); } @TestMetadata("ClassParam.kt") public void testClassParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); } @TestMetadata("ClassParamReferencesParam.kt") public void testClassParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); } @TestMetadata("ClassParamReferencesParam2.kt") public void testClassParamReferencesParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); } @TestMetadata("ClassParamReferencesSelf.kt") public void testClassParamReferencesSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); } @TestMetadata("ClassParamUpperClassBound.kt") public void testClassParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); } @TestMetadata("ClassParamUpperClassInterfaceBound.kt") public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); } @TestMetadata("ClassParamUpperInterfaceBound.kt") public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); } @TestMetadata("ClassTwoParams.kt") public void testClassTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); } @TestMetadata("ClassTwoParams2.kt") public void testClassTwoParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); } @TestMetadata("EnumWithGenericConstructorParameter.kt") public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); } @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); } @TestMetadata("InheritClassSimple.kt") public void testInheritClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); } @TestMetadata("InheritClassWithParam.kt") public void testInheritClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); } @TestMetadata("InheritSubstitutedMethod.kt") public void testInheritSubstitutedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); } @TestMetadata("InheritTraitWithFunctionParam.kt") public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); } @TestMetadata("InheritTraitWithParam.kt") public void testInheritTraitWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); } @TestMetadata("InnerClassExtendInnerClass.kt") public void testInnerClassExtendInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); } @TestMetadata("InnerGenericClass.kt") public void testInnerGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); } @TestMetadata("InnerTypes.kt") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); } @TestMetadata("NamedObjectInClass.kt") public void testNamedObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); } @TestMetadata("NamedObjectInClassObject.kt") public void testNamedObjectInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); } @TestMetadata("NamedObjectInNamedObject.kt") public void testNamedObjectInNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); } @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); } @TestMetadata("NestedClassExtendNestedClass.kt") public void testNestedClassExtendNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); } @TestMetadata("NestedGenericClass.kt") public void testNestedGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); } @TestMetadata("RecursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); } @TestMetadata("SingleAbstractMethod.kt") public void testSingleAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.kt") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); } @TestMetadata("JavaBeanAbstractGetter.kt") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); } @TestMetadata("JavaBeanVal.kt") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); } @TestMetadata("JavaBeanVar.kt") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); } @TestMetadata("JavaBeanVarOfGenericType.kt") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); } @TestMetadata("TwoSetters.kt") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); } } } @@ -791,38 +723,37 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassFun extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassInParamUsedInFun.kt") public void testClassInParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); } @TestMetadata("ClassParamUsedInFun.kt") public void testClassParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); } @TestMetadata("FunDelegationToTraitImpl.kt") public void testFunDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); } @TestMetadata("FunInParamSuper.kt") public void testFunInParamSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); } @TestMetadata("TraitOpenFun.kt") public void testTraitOpenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); } } @@ -830,86 +761,77 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectDeclaresVal.kt") public void testClassObjectDeclaresVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); } @TestMetadata("ClassObjectDeclaresVar.kt") public void testClassObjectDeclaresVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); } @TestMetadata("ClassObjectDefaultVisibility.kt") public void testClassObjectDefaultVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); } @TestMetadata("ClassObjectExplicitVisibility.kt") public void testClassObjectExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); } @TestMetadata("ClassObjectExtendsTrait.kt") public void testClassObjectExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); } @TestMetadata("ClassObjectExtendsTraitWithTP.kt") public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); } @TestMetadata("classObjectInClassStaticFields.kt") public void testClassObjectInClassStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); } @TestMetadata("classObjectInTraitStaticFields.kt") public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); } @TestMetadata("ClassObjectPropertyInClass.kt") public void testClassObjectPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); } @TestMetadata("InnerClassInClassObject.kt") public void testInnerClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); } @TestMetadata("SimpleClassObject.kt") public void testSimpleClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); } } @@ -917,124 +839,114 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); } @TestMetadata("Constructor1.kt") public void testConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); } @TestMetadata("Constructor1WithParamDefaultValue.kt") public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); } @TestMetadata("Constructor2WithOneParamDefaultValue.kt") public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorGenericDeep.kt") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); } @TestMetadata("ConstructorGenericSimple.kt") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); } @TestMetadata("ConstructorGenericUpperBound.kt") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); } @TestMetadata("ConstructorWithTwoDefArgs.kt") public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); } @TestMetadata("ConstructorWithTwoTypeParameters.kt") public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); } @TestMetadata("InnerClassConstructorWithDefArgs.kt") public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); } @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorNonLastVararg.kt") public void testConstructorNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); } @TestMetadata("ConstructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); } } } @@ -1043,14 +955,17 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); } } @@ -1058,32 +973,32 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MixedComponents.kt") public void testMixedComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); } @TestMetadata("OneVal.kt") public void testOneVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); } @TestMetadata("TwoVals.kt") public void testTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); } @TestMetadata("TwoVars.kt") public void testTwoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); } } @@ -1091,44 +1006,42 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumVisibility.kt") public void testEnumVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); } @TestMetadata("enumWithConstuctor.kt") public void testEnumWithConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); } @TestMetadata("enumWithInnerClasses.kt") public void testEnumWithInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); } @TestMetadata("innerEnumExistingClassObject.kt") public void testInnerEnumExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); } } @@ -1136,222 +1049,195 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromLoadJava extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromLoadJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.kt") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); } @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); } @TestMetadata("classObjectAnnotation.kt") public void testClassObjectAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); } @TestMetadata("ClassWithConstVal.kt") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); } @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); } @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); } @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); } @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); } @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); } @TestMetadata("ClassWithTypePRefSelfAndClass.kt") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); } @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); } @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); } @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypes.kt") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); } @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); } @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); } @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); } @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); } @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); } @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); } @TestMetadata("MyException.kt") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); } @TestMetadata("objectMembers.kt") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); } @TestMetadata("packageLevelObject.kt") public void testPackageLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); } @TestMetadata("RemoveRedundantProjectionKind.kt") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); } @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); } @TestMetadata("UnboundWildcard.kt") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.kt") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -1360,102 +1246,90 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestMetadata("ArrayType.kt") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); } @TestMetadata("ConstructorWithNewTypeParams.kt") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); } @TestMetadata("ConstructorWithParentTypeParams.kt") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); } @TestMetadata("ConstructorWithSeveralParams.kt") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); } @TestMetadata("ConstructorWithoutParams.kt") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); } @TestMetadata("CustomProjectionKind.kt") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); } @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); } @TestMetadata("MethodWithGenerics.kt") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); } @TestMetadata("MethodWithMappedClasses.kt") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); } @TestMetadata("MethodWithTypeParameters.kt") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); } @TestMetadata("MethodWithVararg.kt") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); } @TestMetadata("PropertyArrayTypes.kt") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); } @TestMetadata("PropertyComplexTypes.kt") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); } @TestMetadata("PropertySimpleType.kt") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddingNullability.kt") public void testAddingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); } public void testAllFilesPresentInError() throws Exception { @@ -1464,158 +1338,132 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestMetadata("ConflictingProjectionKind.kt") public void testConflictingProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); } @TestMetadata("ExplicitFieldGettersAndSetters.kt") public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); } @TestMetadata("ExtraUpperBound.kt") public void testExtraUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); } @TestMetadata("MissingUpperBound.kt") public void testMissingUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); } @TestMetadata("NoFieldTypeRef.kt") public void testNoFieldTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); } @TestMetadata("NotVarargReplacedWithVararg.kt") public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); } @TestMetadata("RedundantProjectionKind.kt") public void testRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); } @TestMetadata("ReturnTypeMissing.kt") public void testReturnTypeMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); } @TestMetadata("SyntaxErrorInFieldAnnotation.kt") public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); } @TestMetadata("VarargReplacedWithNotVararg.kt") public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); } @TestMetadata("WrongFieldInitializer.kt") public void testWrongFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); } @TestMetadata("WrongFieldMutability.kt") public void testWrongFieldMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); } @TestMetadata("WrongFieldName.kt") public void testWrongFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); } @TestMetadata("WrongMethodName.kt") public void testWrongMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); } @TestMetadata("WrongProjectionKind.kt") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); } @TestMetadata("WrongReturnTypeStructure.kt") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); } @TestMetadata("WrongTypeName1.kt") public void testWrongTypeName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); } @TestMetadata("WrongTypeName2.kt") public void testWrongTypeName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); } @TestMetadata("WrongTypeName3.kt") public void testWrongTypeName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); } @TestMetadata("WrongTypeParameterBoundStructure1.kt") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); } @TestMetadata("WrongTypeParameterBoundStructure2.kt") public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); } @TestMetadata("WrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); } @TestMetadata("WrongValueParameterStructure1.kt") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); } @TestMetadata("WrongValueParameterStructure2.kt") public void testWrongValueParameterStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); } @TestMetadata("WrongValueParametersCount.kt") public void testWrongValueParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); } } @@ -1623,178 +1471,159 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.kt") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.kt") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); } @TestMetadata("ChangeProjectionKind2.kt") public void testChangeProjectionKind2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); } @TestMetadata("InheritNotVararg.kt") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); } @TestMetadata("InheritNotVarargInteger.kt") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); } @TestMetadata("InheritNotVarargNotNull.kt") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); } @TestMetadata("InheritNotVarargPrimitive.kt") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); } @TestMetadata("InheritVararg.kt") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); } @TestMetadata("InheritVarargInteger.kt") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); } @TestMetadata("InheritVarargNotNull.kt") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); } @TestMetadata("InheritVarargPrimitive.kt") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); } @TestMetadata("Kt3302.kt") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); } @TestMetadata("MutableToReadOnly.kt") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); } @TestMetadata("NotNullToNullable.kt") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); } @TestMetadata("NullableToNotNull.kt") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); } @TestMetadata("NullableToNotNullKotlinSignature.kt") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); } @TestMetadata("OverrideWithErasedParameter.kt") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); } @TestMetadata("ReadOnlyToMutable.kt") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); } } @@ -1802,40 +1631,38 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.kt") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); } @TestMetadata("AddNotNullSameJavaType.kt") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); } @TestMetadata("AddNullabilityJavaSubtype.kt") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); } @TestMetadata("AddNullabilitySameGenericType1.kt") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); } @TestMetadata("AddNullabilitySameGenericType2.kt") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); } @TestMetadata("AddNullabilitySameJavaType.kt") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); } public void testAllFilesPresentInReturn() throws Exception { @@ -1844,170 +1671,142 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestMetadata("CantMakeImmutableInSubclass.kt") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("HalfSubstitutedTypeParameters.kt") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); } @TestMetadata("InheritNullabilityJavaSubtype.kt") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); } @TestMetadata("InheritNullabilitySameGenericType.kt") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); } @TestMetadata("InheritNullabilitySameJavaType.kt") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnlinessOfArgument.kt") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); } @TestMetadata("InheritReadOnlinessSameClass.kt") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); } @TestMetadata("InheritReadOnlinessSubclass.kt") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); } @TestMetadata("SameProjectionKind.kt") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubclassOfCollection.kt") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); } @TestMetadata("SubclassOfMapEntry.kt") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); } @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); } @TestMetadata("TwoSuperclassesSupplementNotNull.kt") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); } @TestMetadata("TypeParamOfClass.kt") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); } @TestMetadata("TypeParamOfClassSubstituted.kt") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); } @TestMetadata("TypeParamOfFun.kt") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); } } @@ -2015,62 +1814,57 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); } @TestMetadata("TwoBounds.kt") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); } @TestMetadata("TwoSuperclasses.kt") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); } @TestMetadata("TwoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); } @TestMetadata("UseParameterAsUpperBound.kt") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); } @TestMetadata("UseParameterInUpperBound.kt") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); } } } @@ -2080,26 +1874,27 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); } @TestMetadata("LoadIterator.kt") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); } @TestMetadata("Max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); } } @@ -2107,14 +1902,17 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.kt") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); } } @@ -2122,38 +1920,37 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.kt") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); } @TestMetadata("NotNullIntArray.kt") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); } @TestMetadata("NotNullMethod.kt") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); } @TestMetadata("NotNullObjectArray.kt") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); } @TestMetadata("NotNullParameter.kt") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); } } } @@ -2162,142 +1959,129 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fun extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); } @TestMetadata("DeclaredMemberOverridesDelegated.kt") public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); } @TestMetadata("InfixKeyword.kt") public void testInfixKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); } @TestMetadata("InheritValAndVar.kt") public void testInheritValAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); } @TestMetadata("InheritValsDifferentTypes.kt") public void testInheritValsDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); } @TestMetadata("NoSamAdapter.kt") public void testNoSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); } @TestMetadata("NoSamConstructor.kt") public void testNoSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); } @TestMetadata("OperatorKeyword.kt") public void testOperatorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); } @TestMetadata("PropagateDeepSubclass.kt") public void testPropagateDeepSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); } @TestMetadata("PropagateSubclassOfComparable.kt") public void testPropagateSubclassOfComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithTypeVariables extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunGenericParam.kt") public void testFunGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); } @TestMetadata("FunParamParam.kt") public void testFunParamParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); } @TestMetadata("FunParamParamErased.kt") public void testFunParamParamErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); } @TestMetadata("FunParamReferencesParam.kt") public void testFunParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); } @TestMetadata("FunParamTwoUpperBounds.kt") public void testFunParamTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); } @TestMetadata("FunParamUpperClassBound.kt") public void testFunParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); } @TestMetadata("FunParamUpperClassInterfaceBound.kt") public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); } @TestMetadata("FunParamUpperInterfaceBound.kt") public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); } @TestMetadata("FunParamVaragParam.kt") public void testFunParamVaragParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); } @TestMetadata("FunTwoTypeParams.kt") public void testFunTwoTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); } } @@ -2305,38 +2089,37 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithoutTypeVariables extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunClassParamNotNull.kt") public void testFunClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); } @TestMetadata("FunClassParamNullable.kt") public void testFunClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); } @TestMetadata("FunParamNullable.kt") public void testFunParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); } @TestMetadata("ReturnTypeClassParamNotNull.kt") public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); } @TestMetadata("ReturnTypeClassParamNullable.kt") public void testReturnTypeClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); } } @@ -2344,104 +2127,92 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonGeneric extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassFun.kt") public void testClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); } @TestMetadata("ClassFunGetFoo.kt") public void testClassFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); } @TestMetadata("ClassFunGetFooSetFoo.kt") public void testClassFunGetFooSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); } @TestMetadata("ClassFunSetFoo.kt") public void testClassFunSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); } @TestMetadata("ExtFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); } @TestMetadata("ExtFunInClass.kt") public void testExtFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); } @TestMetadata("FunDefaultArg.kt") public void testFunDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); } @TestMetadata("FunParamNotNull.kt") public void testFunParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); } @TestMetadata("FunVarargInt.kt") public void testFunVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); } @TestMetadata("FunVarargInteger.kt") public void testFunVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); } @TestMetadata("ModifierAbstract.kt") public void testModifierAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); } @TestMetadata("ModifierOpen.kt") public void testModifierOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); } @TestMetadata("NsFun.kt") public void testNsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); } @TestMetadata("NsFunGetFoo.kt") public void testNsFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); } @TestMetadata("ReturnTypeNotNull.kt") public void testReturnTypeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); } @TestMetadata("ReturnTypeNullable.kt") public void testReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); } } @@ -2449,26 +2220,27 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonLastVararg.kt") public void testNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); } @TestMetadata("VarargInt.kt") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); } @TestMetadata("VarargString.kt") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); } } } @@ -2477,14 +2249,17 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); } } @@ -2492,44 +2267,42 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberOrder extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callablesNameClash.kt") public void testCallablesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); } @TestMetadata("extensionMembers.kt") public void testExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); } @TestMetadata("extensionPropertiesNameClash.kt") public void testExtensionPropertiesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); } } @@ -2537,26 +2310,27 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deepInnerGeneric.kt") public void testDeepInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); } @TestMetadata("innerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); } @TestMetadata("membersReferenceOuterTP.kt") public void testMembersReferenceOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); } } @@ -2564,20 +2338,22 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notnullTypeArgument.kt") public void testNotnullTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); } } @@ -2585,274 +2361,239 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Prop extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); } @TestMetadata("ClassValAbstract.kt") public void testClassValAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); } @TestMetadata("CollectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); } @TestMetadata("ExtValClass.kt") public void testExtValClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); } @TestMetadata("ExtValInClass.kt") public void testExtValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); } @TestMetadata("ExtValInt.kt") public void testExtValInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); } @TestMetadata("ExtValIntCharSequence.kt") public void testExtValIntCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); } @TestMetadata("ExtValIntCharSequenceQ.kt") public void testExtValIntCharSequenceQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); } @TestMetadata("ExtValIntListQOfIntInClass.kt") public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); } @TestMetadata("ExtValIntTInClass.kt") public void testExtValIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); } @TestMetadata("ExtValIntTQInClass.kt") public void testExtValIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); } @TestMetadata("ExtValTIntInClass.kt") public void testExtValTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); } @TestMetadata("ExtVarClass.kt") public void testExtVarClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); } @TestMetadata("ExtVarInClass.kt") public void testExtVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); } @TestMetadata("ExtVarInt.kt") public void testExtVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); } @TestMetadata("ExtVarIntTInClass.kt") public void testExtVarIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); } @TestMetadata("ExtVarIntTQInClass.kt") public void testExtVarIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); } @TestMetadata("ExtVarMapPQInt.kt") public void testExtVarMapPQInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); } @TestMetadata("ExtVarTIntInClass.kt") public void testExtVarTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); } @TestMetadata("ExtVarTQIntInClass.kt") public void testExtVarTQIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); } @TestMetadata("ExtVarl.kt") public void testExtVarl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); } @TestMetadata("NsVal.kt") public void testNsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); } @TestMetadata("NsVar.kt") public void testNsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); } @TestMetadata("OverrideClassVal.kt") public void testOverrideClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); } @TestMetadata("OverrideTraitVal.kt") public void testOverrideTraitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); } @TestMetadata("PropFromSuperclass.kt") public void testPropFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); } @TestMetadata("TraitFinalVar.kt") public void testTraitFinalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); } @TestMetadata("TraitOpenVal.kt") public void testTraitOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); } @TestMetadata("VarDelegationToTraitImpl.kt") public void testVarDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); } @TestMetadata("VarWithDelegated.kt") public void testVarWithDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultAccessors extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); } @TestMetadata("ClassValParams.kt") public void testClassValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); } @TestMetadata("ClassValWithGet.kt") public void testClassValWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); } @TestMetadata("ClassVarModality.kt") public void testClassVarModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); } @TestMetadata("ClassVarParams.kt") public void testClassVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); } @TestMetadata("ClassVarWithGet.kt") public void testClassVarWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); } @TestMetadata("ClassVarWithSet.kt") public void testClassVarWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); } @TestMetadata("ExtValLong.kt") public void testExtValLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); } @TestMetadata("ExtVarLong.kt") public void testExtVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); } } } @@ -2861,194 +2602,167 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); } @TestMetadata("AnyQ.kt") public void testAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); } @TestMetadata("ArrayOfInNumber.kt") public void testArrayOfInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); } @TestMetadata("ArrayOfInteger.kt") public void testArrayOfInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); } @TestMetadata("ArrayOfOutNumber.kt") public void testArrayOfOutNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); } @TestMetadata("ArrayOfOutT.kt") public void testArrayOfOutT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); } @TestMetadata("ArrayOfString.kt") public void testArrayOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); } @TestMetadata("Function1IntString.kt") public void testFunction1IntString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); } @TestMetadata("jlInteger.kt") public void testJlInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); } @TestMetadata("jlIntegerQ.kt") public void testJlIntegerQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); } @TestMetadata("jlNumber.kt") public void testJlNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); } @TestMetadata("jlObject.kt") public void testJlObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); } @TestMetadata("jlObjectQ.kt") public void testJlObjectQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); } @TestMetadata("jlStringQ.kt") public void testJlStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); } @TestMetadata("ListOfAny.kt") public void testListOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); } @TestMetadata("ListOfAnyQ.kt") public void testListOfAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); } @TestMetadata("ListOfjlString.kt") public void testListOfjlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); } @TestMetadata("Nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); } @TestMetadata("NothingQ.kt") public void testNothingQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); } @TestMetadata("platform.kt") public void testPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/String.kt"); } @TestMetadata("StringQ.kt") public void testStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); } @TestMetadata("Unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); } } @@ -3056,32 +2770,32 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); } @TestMetadata("TypeAliasToExtension.kt") public void testTypeAliasToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); } } @@ -3089,74 +2803,67 @@ public class LoadJavaClsStubTestGenerated extends AbstractLoadJavaClsStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractLoadJavaClsStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestCompiledKotlin, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InternalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); } @TestMetadata("InternalConstructor.kt") public void testInternalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); } @TestMetadata("InternalTopLevelMembers.kt") public void testInternalTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); } @TestMetadata("PrivateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); } @TestMetadata("PrivateClassMembers.kt") public void testPrivateClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); } @TestMetadata("PrivateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); } @TestMetadata("PrivateTopLevelFun.kt") public void testPrivateTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); } @TestMetadata("PrivateTopLevelVal.kt") public void testPrivateTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); } @TestMetadata("PropertyInConstructorExplicitVisibility.kt") public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); } @TestMetadata("TopLevelVarWithPrivateSetter.kt") public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTestCompiledKotlin(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextFromJsMetadataTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextFromJsMetadataTestGenerated.java index ffb9d85bcc7..e66443f6d02 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextFromJsMetadataTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextFromJsMetadataTestGenerated.java @@ -23,14 +23,16 @@ import java.util.regex.Pattern; public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCommonDecompiledTextFromJsMetadataTest { @TestMetadata("LocalClassAsTypeWithArgument") public void ignoreLocalClassAsTypeWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument/"); } @TestMetadata("SecondaryConstructors") public void ignoreSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/SecondaryConstructors/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/SecondaryConstructors/"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); } public void testAllFilesPresentInDecompiledText() throws Exception { @@ -39,103 +41,346 @@ public class CommonDecompiledTextFromJsMetadataTestGenerated extends AbstractCom @TestMetadata("AnnotatedEnumEntry") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry/"); } @TestMetadata("Annotations") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Annotations/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Annotations/"); } @TestMetadata("AnnotationsOnPrimaryCtr") public void testAnnotationsOnPrimaryCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/"); } @TestMetadata("ClassWithClassObject") public void testClassWithClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/ClassWithClassObject/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/ClassWithClassObject/"); } @TestMetadata("ClassWithNamedClassObject") public void testClassWithNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject/"); } @TestMetadata("Const") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Const/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Const/"); } @TestMetadata("DependencyOnNestedClasses") public void testDependencyOnNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/"); } @TestMetadata("Enum") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Enum/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Enum/"); } @TestMetadata("FunctionTypes") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/FunctionTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/FunctionTypes/"); } @TestMetadata("FunctionalTypeWithNamedArguments") public void testFunctionalTypeWithNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments/"); } @TestMetadata("Inherited") public void testInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Inherited/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Inherited/"); } @TestMetadata("InnerClasses") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/InnerClasses/"); } @TestMetadata("Modifiers") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Modifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Modifiers/"); } @TestMetadata("NestedClasses") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/NestedClasses/"); } @TestMetadata("Object") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Object/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Object/"); } @TestMetadata("SimpleClass") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/SimpleClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/SimpleClass/"); } @TestMetadata("TypeModifiers") public void testTypeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/TypeModifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/TypeModifiers/"); + } + + @TestMetadata("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotatedEnumEntry extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInAnnotatedEnumEntry() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Annotations"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotationsOnPrimaryCtr extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInAnnotationsOnPrimaryCtr() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/ClassWithClassObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithClassObject extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInClassWithClassObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/ClassWithClassObject"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithNamedClassObject extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInClassWithNamedClassObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Const") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Const extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInConst() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Const"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DependencyOnNestedClasses extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInDependencyOnNestedClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Enum") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Enum extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInEnum() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Enum"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/FlexibleTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FlexibleTypes extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInFlexibleTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/FlexibleTypes"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/FunctionTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionTypes extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInFunctionTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/FunctionTypes"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionalTypeWithNamedArguments extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInFunctionalTypeWithNamedArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Inherited") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inherited extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInherited() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Inherited"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/InnerClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClasses extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInInnerClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/InnerClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LocalClassAsTypeWithArgument extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInLocalClassAsTypeWithArgument() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Modifiers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Modifiers extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInModifiers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Modifiers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/NestedClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClasses extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInNestedClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/NestedClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Object") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Object extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Object"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/SecondaryConstructors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SecondaryConstructors extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInSecondaryConstructors() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/SecondaryConstructors"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/SimpleClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleClass extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInSimpleClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/SimpleClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/TypeModifiers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeModifiers extends AbstractCommonDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInTypeModifiers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/TypeModifiers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextTestGenerated.java index e464cd59a6e..5354d7d5126 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/CommonDecompiledTextTestGenerated.java @@ -21,127 +21,371 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CommonDecompiledTextTestGenerated extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDecompiledText() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedEnumEntry") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry/"); } @TestMetadata("Annotations") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Annotations/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Annotations/"); } @TestMetadata("AnnotationsOnPrimaryCtr") public void testAnnotationsOnPrimaryCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr/"); } @TestMetadata("ClassWithClassObject") public void testClassWithClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/ClassWithClassObject/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/ClassWithClassObject/"); } @TestMetadata("ClassWithNamedClassObject") public void testClassWithNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject/"); } @TestMetadata("Const") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Const/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Const/"); } @TestMetadata("DependencyOnNestedClasses") public void testDependencyOnNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses/"); } @TestMetadata("Enum") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Enum/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Enum/"); } @TestMetadata("FlexibleTypes") public void testFlexibleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/FlexibleTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/FlexibleTypes/"); } @TestMetadata("FunctionTypes") public void testFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/FunctionTypes/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/FunctionTypes/"); } @TestMetadata("FunctionalTypeWithNamedArguments") public void testFunctionalTypeWithNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments/"); } @TestMetadata("Inherited") public void testInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Inherited/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Inherited/"); } @TestMetadata("InnerClasses") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/InnerClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/InnerClasses/"); } @TestMetadata("LocalClassAsTypeWithArgument") public void testLocalClassAsTypeWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument/"); } @TestMetadata("Modifiers") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Modifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Modifiers/"); } @TestMetadata("NestedClasses") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/NestedClasses/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/NestedClasses/"); } @TestMetadata("Object") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/Object/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/Object/"); } @TestMetadata("SecondaryConstructors") public void testSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/SecondaryConstructors/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/SecondaryConstructors/"); } @TestMetadata("SimpleClass") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/SimpleClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/SimpleClass/"); } @TestMetadata("TypeModifiers") public void testTypeModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledText/TypeModifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledText/TypeModifiers/"); + } + + @TestMetadata("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotatedEnumEntry extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAnnotatedEnumEntry() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/AnnotatedEnumEntry"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Annotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Annotations extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Annotations"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotationsOnPrimaryCtr extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAnnotationsOnPrimaryCtr() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/AnnotationsOnPrimaryCtr"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/ClassWithClassObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithClassObject extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithClassObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/ClassWithClassObject"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithNamedClassObject extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithNamedClassObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/ClassWithNamedClassObject"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Const") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Const extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConst() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Const"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DependencyOnNestedClasses extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDependencyOnNestedClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/DependencyOnNestedClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Enum") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Enum extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnum() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Enum"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/FlexibleTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FlexibleTypes extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFlexibleTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/FlexibleTypes"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/FunctionTypes") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionTypes extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunctionTypes() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/FunctionTypes"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionalTypeWithNamedArguments extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunctionalTypeWithNamedArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/FunctionalTypeWithNamedArguments"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Inherited") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inherited extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInherited() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Inherited"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/InnerClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClasses extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInnerClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/InnerClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LocalClassAsTypeWithArgument extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLocalClassAsTypeWithArgument() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/LocalClassAsTypeWithArgument"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Modifiers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Modifiers extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModifiers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Modifiers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/NestedClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClasses extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNestedClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/NestedClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/Object") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Object extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/Object"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/SecondaryConstructors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SecondaryConstructors extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSecondaryConstructors() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/SecondaryConstructors"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/SimpleClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleClass extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimpleClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/SimpleClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledText/TypeModifiers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeModifiers extends AbstractCommonDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeModifiers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledText/TypeModifiers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JsDecompiledTextFromJsMetadataTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JsDecompiledTextFromJsMetadataTestGenerated.java index 3784579dc0a..360eb6f8cff 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JsDecompiledTextFromJsMetadataTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JsDecompiledTextFromJsMetadataTestGenerated.java @@ -21,19 +21,47 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JsDecompiledTextFromJsMetadataTestGenerated extends AbstractJsDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDecompiledTextJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJs"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); } @TestMetadata("TestPackage") public void testTestPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledTextJs/TestPackage/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledTextJs/TestPackage/"); } @TestMetadata("TypeAliases") public void testTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledTextJs/TypeAliases/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledTextJs/TypeAliases/"); + } + + @TestMetadata("idea/testData/decompiler/decompiledTextJs/TestPackage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TestPackage extends AbstractJsDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInTestPackage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJs/TestPackage"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledTextJs/TypeAliases") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeAliases extends AbstractJsDecompiledTextFromJsMetadataTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + + public void testAllFilesPresentInTypeAliases() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJs/TypeAliases"), Pattern.compile("^([^\\.]+)$"), TargetBackend.JS, true); + } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JvmDecompiledTextTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JvmDecompiledTextTestGenerated.java index 912d3bedeb5..36ae5feccaf 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JvmDecompiledTextTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/JvmDecompiledTextTestGenerated.java @@ -21,31 +21,83 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JvmDecompiledTextTestGenerated extends AbstractJvmDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDecompiledTextJvm() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJvm"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("Modifiers") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledTextJvm/Modifiers/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledTextJvm/Modifiers/"); } @TestMetadata("MultifileClass") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledTextJvm/MultifileClass/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledTextJvm/MultifileClass/"); } @TestMetadata("TestKt") public void testTestKt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledTextJvm/TestKt/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledTextJvm/TestKt/"); } @TestMetadata("TypeAliases") public void testTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/decompiler/decompiledTextJvm/TypeAliases/"); - doTest(fileName); + runTest("idea/testData/decompiler/decompiledTextJvm/TypeAliases/"); + } + + @TestMetadata("idea/testData/decompiler/decompiledTextJvm/Modifiers") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Modifiers extends AbstractJvmDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModifiers() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJvm/Modifiers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledTextJvm/MultifileClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClass extends AbstractJvmDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJvm/MultifileClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledTextJvm/TestKt") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TestKt extends AbstractJvmDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTestKt() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJvm/TestKt"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/decompiler/decompiledTextJvm/TypeAliases") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeAliases extends AbstractJvmDecompiledTextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeAliases() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/decompiler/decompiledTextJvm/TypeAliases"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/editor/MultiLineStringIndentTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/editor/MultiLineStringIndentTestGenerated.java index 550ff13e43e..ff4dc7ff3be 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/editor/MultiLineStringIndentTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/editor/MultiLineStringIndentTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiLineStringIndentTestGenerated extends AbstractMultiLineStringIndentTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultilineString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/enterHandler/multilineString"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,230 +33,197 @@ public class MultiLineStringIndentTestGenerated extends AbstractMultiLineStringI @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Spaces extends AbstractMultiLineStringIndentTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpaces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/enterHandler/multilineString/spaces"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dontAddMarginCharWhenMultilineWithoutMargins.kt") public void testDontAddMarginCharWhenMultilineWithoutMargins() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontAddMarginCharWhenMultilineWithoutMargins.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontAddMarginCharWhenMultilineWithoutMargins.kt"); } @TestMetadata("dontAddMarginWhenItIsUnused.kt") public void testDontAddMarginWhenItIsUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontAddMarginWhenItIsUnused.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontAddMarginWhenItIsUnused.kt"); } @TestMetadata("dontAddMarginWhenItIsUnusedWithEmptyPrevious.kt") public void testDontAddMarginWhenItIsUnusedWithEmptyPrevious() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontAddMarginWhenItIsUnusedWithEmptyPrevious.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontAddMarginWhenItIsUnusedWithEmptyPrevious.kt"); } @TestMetadata("dontAddTrimCallWhenAlreadyMultiline.kt") public void testDontAddTrimCallWhenAlreadyMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontAddTrimCallWhenAlreadyMultiline.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontAddTrimCallWhenAlreadyMultiline.kt"); } @TestMetadata("dontAddTrimCallWhenAlreadyMultilineFirstLine.kt") public void testDontAddTrimCallWhenAlreadyMultilineFirstLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontAddTrimCallWhenAlreadyMultilineFirstLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontAddTrimCallWhenAlreadyMultilineFirstLine.kt"); } @TestMetadata("dontInsertTrimMargin1.kt") public void testDontInsertTrimMargin1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin1.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin1.kt"); } @TestMetadata("dontInsertTrimMargin2.kt") public void testDontInsertTrimMargin2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin2.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin2.kt"); } @TestMetadata("dontInsertTrimMargin3.kt") public void testDontInsertTrimMargin3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin3.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin3.kt"); } @TestMetadata("dontInsertTrimMargin4.kt") public void testDontInsertTrimMargin4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin4.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/dontInsertTrimMargin4.kt"); } @TestMetadata("enterAfterOpenningBrace.kt") public void testEnterAfterOpenningBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterAfterOpenningBrace.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterAfterOpenningBrace.kt"); } @TestMetadata("enterBeforeLongEntryOneLine.kt") public void testEnterBeforeLongEntryOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterBeforeLongEntryOneLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterBeforeLongEntryOneLine.kt"); } @TestMetadata("enterBeforeMarginChar.kt") public void testEnterBeforeMarginChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterBeforeMarginChar.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterBeforeMarginChar.kt"); } @TestMetadata("enterBeforeShortEntryOneLine.kt") public void testEnterBeforeShortEntryOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterBeforeShortEntryOneLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterBeforeShortEntryOneLine.kt"); } @TestMetadata("enterInInfixMargin.kt") public void testEnterInInfixMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInInfixMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInInfixMargin.kt"); } @TestMetadata("enterInInjectedFragment.kt") public void testEnterInInjectedFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInInjectedFragment.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInInjectedFragment.kt"); } @TestMetadata("enterInLineWithMarginOnNotMargedLine.kt") public void testEnterInLineWithMarginOnNotMargedLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInLineWithMarginOnNotMargedLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInLineWithMarginOnNotMargedLine.kt"); } @TestMetadata("enterInMethodCallMargin.kt") public void testEnterInMethodCallMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInMethodCallMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInMethodCallMargin.kt"); } @TestMetadata("enterInOneLineAfterSpaces.kt") public void testEnterInOneLineAfterSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInOneLineAfterSpaces.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInOneLineAfterSpaces.kt"); } @TestMetadata("enterInTwoLinesNoMarginCall.kt") public void testEnterInTwoLinesNoMarginCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInTwoLinesNoMarginCall.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInTwoLinesNoMarginCall.kt"); } @TestMetadata("enterInsideBraces.kt") public void testEnterInsideBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideBraces.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideBraces.kt"); } @TestMetadata("enterInsideBraces1.kt") public void testEnterInsideBraces1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideBraces1.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideBraces1.kt"); } @TestMetadata("enterInsideBraces2.kt") public void testEnterInsideBraces2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideBraces2.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideBraces2.kt"); } @TestMetadata("enterInsideTextMargin.kt") public void testEnterInsideTextMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideTextMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterInsideTextMargin.kt"); } @TestMetadata("enterMLSimpleMargin.kt") public void testEnterMLSimpleMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterMLSimpleMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterMLSimpleMargin.kt"); } @TestMetadata("enterMLStartOnSameLineMargin.kt") public void testEnterMLStartOnSameLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterMLStartOnSameLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterMLStartOnSameLineMargin.kt"); } @TestMetadata("enterOnFirstLineWithPresentTrimMargin.kt") public void testEnterOnFirstLineWithPresentTrimMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterOnFirstLineWithPresentTrimMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterOnFirstLineWithPresentTrimMargin.kt"); } @TestMetadata("enterOnFirstLineWithPresentTrimMarginAndLine.kt") public void testEnterOnFirstLineWithPresentTrimMarginAndLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterOnFirstLineWithPresentTrimMarginAndLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterOnFirstLineWithPresentTrimMarginAndLine.kt"); } @TestMetadata("enterOnFirstNonEmptyLineWithPresentTrimMargin.kt") public void testEnterOnFirstNonEmptyLineWithPresentTrimMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterOnFirstNonEmptyLineWithPresentTrimMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterOnFirstNonEmptyLineWithPresentTrimMargin.kt"); } @TestMetadata("enterOnNewLine.kt") public void testEnterOnNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterOnNewLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterOnNewLine.kt"); } @TestMetadata("enterSimple.kt") public void testEnterSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterSimple.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterSimple.kt"); } @TestMetadata("enterWithTextMargin.kt") public void testEnterWithTextMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterWithTextMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterWithTextMargin.kt"); } @TestMetadata("enterWithTextOnNewLineMargin.kt") public void testEnterWithTextOnNewLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/enterWithTextOnNewLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/enterWithTextOnNewLineMargin.kt"); } @TestMetadata("insertCustomMargin.kt") public void testInsertCustomMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/insertCustomMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/insertCustomMargin.kt"); } @TestMetadata("insertCustomMarginInLineStart.kt") public void testInsertCustomMarginInLineStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/insertCustomMarginInLineStart.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/insertCustomMarginInLineStart.kt"); } @TestMetadata("insertDefaultMargin.kt") public void testInsertDefaultMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/insertDefaultMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/insertDefaultMargin.kt"); } @TestMetadata("noTrimIndentInAnnotations.kt") public void testNoTrimIndentInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/noTrimIndentInAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/noTrimIndentInAnnotations.kt"); } @TestMetadata("restoreIndentFromEmptyLine.kt") public void testRestoreIndentFromEmptyLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/spaces/restoreIndentFromEmptyLine.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/spaces/restoreIndentFromEmptyLine.kt"); } } @@ -260,6 +231,10 @@ public class MultiLineStringIndentTestGenerated extends AbstractMultiLineStringI @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithTabs extends AbstractMultiLineStringIndentTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithTabs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/enterHandler/multilineString/withTabs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -268,74 +243,67 @@ public class MultiLineStringIndentTestGenerated extends AbstractMultiLineStringI @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tabs2 extends AbstractMultiLineStringIndentTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTabs2() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dontInsertTrimMarginCall.kt") public void testDontInsertTrimMarginCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/dontInsertTrimMarginCall.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/dontInsertTrimMarginCall.kt"); } @TestMetadata("enterInMethodCallMargin.kt") public void testEnterInMethodCallMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInMethodCallMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInMethodCallMargin.kt"); } @TestMetadata("enterInTwoLinesNoMarginCall.kt") public void testEnterInTwoLinesNoMarginCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInTwoLinesNoMarginCall.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInTwoLinesNoMarginCall.kt"); } @TestMetadata("enterInsideBraces.kt") public void testEnterInsideBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInsideBraces.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInsideBraces.kt"); } @TestMetadata("enterInsideText.kt") public void testEnterInsideText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInsideText.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterInsideText.kt"); } @TestMetadata("enterMLSimpleMargin.kt") public void testEnterMLSimpleMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterMLSimpleMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterMLSimpleMargin.kt"); } @TestMetadata("enterMLStartOnSameLineMargin.kt") public void testEnterMLStartOnSameLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterMLStartOnSameLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterMLStartOnSameLineMargin.kt"); } @TestMetadata("enterOnNewLineMargin.kt") public void testEnterOnNewLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterOnNewLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterOnNewLineMargin.kt"); } @TestMetadata("enterSimpleMargin.kt") public void testEnterSimpleMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterSimpleMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterSimpleMargin.kt"); } @TestMetadata("enterWithTextMargin.kt") public void testEnterWithTextMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterWithTextMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterWithTextMargin.kt"); } @TestMetadata("enterWithTextOnNewLineMargin.kt") public void testEnterWithTextOnNewLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterWithTextOnNewLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs2/enterWithTextOnNewLineMargin.kt"); } } @@ -343,74 +311,67 @@ public class MultiLineStringIndentTestGenerated extends AbstractMultiLineStringI @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Tabs4 extends AbstractMultiLineStringIndentTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTabs4() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dontInsertTrimMarginCall.kt") public void testDontInsertTrimMarginCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/dontInsertTrimMarginCall.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/dontInsertTrimMarginCall.kt"); } @TestMetadata("enterInMethodCallMargin.kt") public void testEnterInMethodCallMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterInMethodCallMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterInMethodCallMargin.kt"); } @TestMetadata("enterInsideBraces.kt") public void testEnterInsideBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterInsideBraces.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterInsideBraces.kt"); } @TestMetadata("enterInsideText.kt") public void testEnterInsideText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterInsideText.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterInsideText.kt"); } @TestMetadata("enterMLSimpleMargin.kt") public void testEnterMLSimpleMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterMLSimpleMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterMLSimpleMargin.kt"); } @TestMetadata("enterMLStartOnSameLineMargin.kt") public void testEnterMLStartOnSameLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterMLStartOnSameLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterMLStartOnSameLineMargin.kt"); } @TestMetadata("enterOnNewLineMargin.kt") public void testEnterOnNewLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterOnNewLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterOnNewLineMargin.kt"); } @TestMetadata("enterSimpleMargin.kt") public void testEnterSimpleMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterSimpleMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterSimpleMargin.kt"); } @TestMetadata("enterWithTabsAfterMarginChar.kt") public void testEnterWithTabsAfterMarginChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterWithTabsAfterMarginChar.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterWithTabsAfterMarginChar.kt"); } @TestMetadata("enterWithTextMargin.kt") public void testEnterWithTextMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterWithTextMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterWithTextMargin.kt"); } @TestMetadata("enterWithTextOnNewLineMargin.kt") public void testEnterWithTextOnNewLineMargin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterWithTextOnNewLineMargin.kt"); - doTest(fileName); + runTest("idea/testData/editor/enterHandler/multilineString/withTabs/tabs4/enterWithTextOnNewLineMargin.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/editor/backspaceHandler/BackspaceHandlerTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/editor/backspaceHandler/BackspaceHandlerTestGenerated.java index 68befd7454a..0f58efcd586 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/editor/backspaceHandler/BackspaceHandlerTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/editor/backspaceHandler/BackspaceHandlerTestGenerated.java @@ -21,34 +21,39 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BackspaceHandlerTestGenerated extends AbstractBackspaceHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBackspaceHandler() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/backspaceHandler"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/backspaceHandler/typeArguments.kt"); - doTest(fileName); + runTest("idea/testData/editor/backspaceHandler/typeArguments.kt"); } @TestMetadata("idea/testData/editor/backspaceHandler/stringTemplate") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplate extends AbstractBackspaceHandlerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/backspaceHandler/stringTemplate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("escapedStringTemplate.kt") public void testEscapedStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/backspaceHandler/stringTemplate/escapedStringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/editor/backspaceHandler/stringTemplate/escapedStringTemplate.kt"); } @TestMetadata("stringTemplateBrackets.kt") public void testStringTemplateBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/backspaceHandler/stringTemplate/stringTemplateBrackets.kt"); - doTest(fileName); + runTest("idea/testData/editor/backspaceHandler/stringTemplate/stringTemplateBrackets.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/QuickDocProviderTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/QuickDocProviderTestGenerated.java index 7afbd44251c..ab1ce9bf112 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/QuickDocProviderTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/editor/quickDoc/QuickDocProviderTestGenerated.java @@ -21,283 +21,241 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class QuickDocProviderTestGenerated extends AbstractQuickDocProviderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQuickDoc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/quickDoc"), Pattern.compile("^([^_]+)\\.[^\\.]*$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObjectLocalVariable.kt") public void testAnonymousObjectLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AnonymousObjectLocalVariable.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AnonymousObjectLocalVariable.kt"); } @TestMetadata("AtConstantWithUnderscore.kt") public void testAtConstantWithUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtConstantWithUnderscore.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtConstantWithUnderscore.kt"); } @TestMetadata("AtFunctionParameter.kt") public void testAtFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtFunctionParameter.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtFunctionParameter.kt"); } @TestMetadata("AtImplicitLambdaParametEnd.kt") public void testAtImplicitLambdaParametEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtImplicitLambdaParametEnd.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtImplicitLambdaParametEnd.kt"); } @TestMetadata("AtImplicitLambdaParameter.kt") public void testAtImplicitLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtImplicitLambdaParameter.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtImplicitLambdaParameter.kt"); } @TestMetadata("AtLocalFunction.kt") public void testAtLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtLocalFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtLocalFunction.kt"); } @TestMetadata("AtTypeParameter.kt") public void testAtTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtTypeParameter.kt"); } @TestMetadata("AtVariableDeclaration.kt") public void testAtVariableDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/AtVariableDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/AtVariableDeclaration.kt"); } @TestMetadata("ConstructorVarParameter.kt") public void testConstructorVarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/ConstructorVarParameter.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/ConstructorVarParameter.kt"); } @TestMetadata("DeprecationWithReplaceInfo.kt") public void testDeprecationWithReplaceInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/DeprecationWithReplaceInfo.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/DeprecationWithReplaceInfo.kt"); } @TestMetadata("EscapeHtmlInsideCodeBlocks.kt") public void testEscapeHtmlInsideCodeBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/EscapeHtmlInsideCodeBlocks.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/EscapeHtmlInsideCodeBlocks.kt"); } @TestMetadata("ExtensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/ExtensionReceiver.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/ExtensionReceiver.kt"); } @TestMetadata("ExtensionReceiverEnd.kt") public void testExtensionReceiverEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/ExtensionReceiverEnd.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/ExtensionReceiverEnd.kt"); } @TestMetadata("IndentedCodeBlock.kt") public void testIndentedCodeBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/IndentedCodeBlock.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/IndentedCodeBlock.kt"); } @TestMetadata("JavaClassUsedInKotlin.kt") public void testJavaClassUsedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/JavaClassUsedInKotlin.kt"); } @TestMetadata("JavaDocFromOverridenClass.kt") public void testJavaDocFromOverridenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/JavaDocFromOverridenClass.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/JavaDocFromOverridenClass.kt"); } @TestMetadata("JavaDocFromOverridenInterface.kt") public void testJavaDocFromOverridenInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/JavaDocFromOverridenInterface.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/JavaDocFromOverridenInterface.kt"); } @TestMetadata("JavaMethodUsedInKotlin.kt") public void testJavaMethodUsedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/JavaMethodUsedInKotlin.kt"); } @TestMetadata("KotlinClassUsedFromJava.java") public void testKotlinClassUsedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/KotlinClassUsedFromJava.java"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/KotlinClassUsedFromJava.java"); } @TestMetadata("KotlinPackageClassUsedFromJava.java") public void testKotlinPackageClassUsedFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/KotlinPackageClassUsedFromJava.java"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/KotlinPackageClassUsedFromJava.java"); } @TestMetadata("MethodFromStdLib.kt") public void testMethodFromStdLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/MethodFromStdLib.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/MethodFromStdLib.kt"); } @TestMetadata("OnClassDeclarationWithNoPackage.kt") public void testOnClassDeclarationWithNoPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnClassDeclarationWithNoPackage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnClassDeclarationWithNoPackage.kt"); } @TestMetadata("OnEnumClassReference.kt") public void testOnEnumClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumClassReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumClassReference.kt"); } @TestMetadata("OnEnumDeclaration.kt") public void testOnEnumDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumDeclaration.kt"); } @TestMetadata("OnEnumEntry.kt") public void testOnEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumEntry.kt"); } @TestMetadata("OnEnumEntryUsage.kt") public void testOnEnumEntryUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumEntryUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumEntryUsage.kt"); } @TestMetadata("OnEnumUsage.kt") public void testOnEnumUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumUsage.kt"); } @TestMetadata("OnEnumValueOfFunction.kt") public void testOnEnumValueOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumValueOfFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumValueOfFunction.kt"); } @TestMetadata("OnEnumValuesFunction.kt") public void testOnEnumValuesFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnEnumValuesFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnEnumValuesFunction.kt"); } @TestMetadata("OnFunctionDeclarationWithPackage.kt") public void testOnFunctionDeclarationWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnFunctionDeclarationWithPackage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnFunctionDeclarationWithPackage.kt"); } @TestMetadata("OnInheritedMethodUsage.kt") public void testOnInheritedMethodUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnInheritedMethodUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnInheritedMethodUsage.kt"); } @TestMetadata("OnInheritedPropertyUsage.kt") public void testOnInheritedPropertyUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnInheritedPropertyUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnInheritedPropertyUsage.kt"); } @TestMetadata("OnMethodUsage.kt") public void testOnMethodUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsage.kt"); } @TestMetadata("OnMethodUsageMultiline.kt") public void testOnMethodUsageMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageMultiline.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageMultiline.kt"); } @TestMetadata("OnMethodUsageWithBracketsInParam.kt") public void testOnMethodUsageWithBracketsInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithBracketsInParam.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithBracketsInParam.kt"); } @TestMetadata("OnMethodUsageWithCodeBlock.kt") public void testOnMethodUsageWithCodeBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithCodeBlock.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithCodeBlock.kt"); } @TestMetadata("OnMethodUsageWithMarkdown.kt") public void testOnMethodUsageWithMarkdown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithMarkdown.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithMarkdown.kt"); } @TestMetadata("OnMethodUsageWithMultilineParam.kt") public void testOnMethodUsageWithMultilineParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithMultilineParam.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithMultilineParam.kt"); } @TestMetadata("OnMethodUsageWithReceiver.kt") public void testOnMethodUsageWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithReceiver.kt"); } @TestMetadata("OnMethodUsageWithReturnAndLink.kt") public void testOnMethodUsageWithReturnAndLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndLink.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndLink.kt"); } @TestMetadata("OnMethodUsageWithReturnAndThrows.kt") public void testOnMethodUsageWithReturnAndThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndThrows.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithReturnAndThrows.kt"); } @TestMetadata("OnMethodUsageWithSee.kt") public void testOnMethodUsageWithSee() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithSee.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithSee.kt"); } @TestMetadata("OnMethodUsageWithTypeParameter.kt") public void testOnMethodUsageWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/OnMethodUsageWithTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/OnMethodUsageWithTypeParameter.kt"); } @TestMetadata("Samples.kt") public void testSamples() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/Samples.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/Samples.kt"); } @TestMetadata("TopLevelMethodFromJava.java") public void testTopLevelMethodFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/TopLevelMethodFromJava.java"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/TopLevelMethodFromJava.java"); } @TestMetadata("TypeNamesFromStdLibNavigation.kt") public void testTypeNamesFromStdLibNavigation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/quickDoc/TypeNamesFromStdLibNavigation.kt"); - doTest(fileName); + runTest("idea/testData/editor/quickDoc/TypeNamesFromStdLibNavigation.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/filters/KotlinExceptionFilterTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/filters/KotlinExceptionFilterTestGenerated.java index e666a92e279..b6815178b5b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/filters/KotlinExceptionFilterTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/filters/KotlinExceptionFilterTestGenerated.java @@ -21,115 +21,101 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinExceptionFilterTestGenerated extends AbstractKotlinExceptionFilterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExceptionFilter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/debugger/exceptionFilter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("breakpointReachedAt") public void testBreakpointReachedAt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/breakpointReachedAt/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/breakpointReachedAt/"); } @TestMetadata("inlineFunCallInLibrary") public void testInlineFunCallInLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunCallInLibrary/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunCallInLibrary/"); } @TestMetadata("inlineFunFromLibrary") public void testInlineFunFromLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunFromLibrary/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunFromLibrary/"); } @TestMetadata("inlineFunInnerClassFromLibrary") public void testInlineFunInnerClassFromLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunInnerClassFromLibrary/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunInnerClassFromLibrary/"); } @TestMetadata("inlineFunctionAnotherFile") public void testInlineFunctionAnotherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunctionAnotherFile/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunctionAnotherFile/"); } @TestMetadata("inlineFunctionAnotherFileWithSmapApplied") public void testInlineFunctionAnotherFileWithSmapApplied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunctionAnotherFileWithSmapApplied/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunctionAnotherFileWithSmapApplied/"); } @TestMetadata("inlineFunctionInnerClass") public void testInlineFunctionInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunctionInnerClass/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunctionInnerClass/"); } @TestMetadata("inlineFunctionObjectLiteral") public void testInlineFunctionObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunctionObjectLiteral/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunctionObjectLiteral/"); } @TestMetadata("inlineFunctionSameFile") public void testInlineFunctionSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/inlineFunctionSameFile/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/inlineFunctionSameFile/"); } @TestMetadata("kotlinClass") public void testKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/kotlinClass/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/kotlinClass/"); } @TestMetadata("kt2489") public void testKt2489() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/kt2489/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/kt2489/"); } @TestMetadata("kt2489_2") public void testKt2489_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/kt2489_2/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/kt2489_2/"); } @TestMetadata("librarySources1") public void testLibrarySources1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/librarySources1/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/librarySources1/"); } @TestMetadata("librarySources2") public void testLibrarySources2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/librarySources2/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/librarySources2/"); } @TestMetadata("librarySources3") public void testLibrarySources3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/librarySources3/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/librarySources3/"); } @TestMetadata("librarySources4") public void testLibrarySources4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/librarySources4/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/librarySources4/"); } @TestMetadata("multiSamePackage") public void testMultiSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/multiSamePackage/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/multiSamePackage/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/exceptionFilter/simple/"); - doTest(fileName); + runTest("idea/testData/debugger/exceptionFilter/simple/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/folding/KotlinFoldingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/folding/KotlinFoldingTestGenerated.java index 860bd3366b5..578f241e8e6 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/folding/KotlinFoldingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/folding/KotlinFoldingTestGenerated.java @@ -23,56 +23,52 @@ public class KotlinFoldingTestGenerated extends AbstractKotlinFoldingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoCollapse extends AbstractKotlinFoldingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoCollapse() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/folding/noCollapse"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/class.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/class.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/function.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/function.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/imports.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/imports.kt"); } @TestMetadata("kdocComments.kt") public void testKdocComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/kdocComments.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/kdocComments.kt"); } @TestMetadata("multilineComments.kt") public void testMultilineComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/multilineComments.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/multilineComments.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/object.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/object.kt"); } @TestMetadata("oneImport.kt") public void testOneImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/oneImport.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/oneImport.kt"); } @TestMetadata("singleLineString.kt") public void testSingleLineString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/noCollapse/singleLineString.kt"); - doTest(fileName); + runTest("idea/testData/folding/noCollapse/singleLineString.kt"); } } @@ -80,56 +76,52 @@ public class KotlinFoldingTestGenerated extends AbstractKotlinFoldingTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckCollapse extends AbstractKotlinFoldingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSettingsFoldingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckCollapse() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/folding/checkCollapse"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customRegions.kt") public void testCustomRegions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/customRegions.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/customRegions.kt"); } @TestMetadata("customRegionsNotFullBlock.kt") public void testCustomRegionsNotFullBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/customRegionsNotFullBlock.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/customRegionsNotFullBlock.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/functionLiteral.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/functionLiteral.kt"); } @TestMetadata("headerKDoc.kt") public void testHeaderKDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/headerKDoc.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/headerKDoc.kt"); } @TestMetadata("headerMultilineComment.kt") public void testHeaderMultilineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/headerMultilineComment.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/headerMultilineComment.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/imports.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/imports.kt"); } @TestMetadata("multilineStrings.kt") public void testMultilineStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/multilineStrings.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/multilineStrings.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/folding/checkCollapse/primaryConstructor.kt"); - doSettingsFoldingTest(fileName); + runTest("idea/testData/folding/checkCollapse/primaryConstructor.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyTestGenerated.java index 74c3013e134..ada419e84e9 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyTestGenerated.java @@ -23,182 +23,157 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTypeClassHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/class/type"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("CaretAtAnnotation") public void testCaretAtAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtAnnotation/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtAnnotation/"); } @TestMetadata("CaretAtConstructor") public void testCaretAtConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtConstructor/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtConstructor/"); } @TestMetadata("CaretAtFabricMethod") public void testCaretAtFabricMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtFabricMethod/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtFabricMethod/"); } @TestMetadata("CaretAtImport") public void testCaretAtImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtImport/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtImport/"); } @TestMetadata("CaretAtJavaType") public void testCaretAtJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtJavaType/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtJavaType/"); } @TestMetadata("CaretAtModifierList") public void testCaretAtModifierList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtModifierList/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtModifierList/"); } @TestMetadata("CaretAtReceiverExtFun") public void testCaretAtReceiverExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtReceiverExtFun/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtReceiverExtFun/"); } @TestMetadata("CaretAtSuperCall") public void testCaretAtSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtSuperCall/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtSuperCall/"); } @TestMetadata("CaretAtSuperTypeCallEntry") public void testCaretAtSuperTypeCallEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtSuperTypeCallEntry/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtSuperTypeCallEntry/"); } @TestMetadata("CaretAtSupertypesList") public void testCaretAtSupertypesList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtSupertypesList/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtSupertypesList/"); } @TestMetadata("CaretAtTypeReference") public void testCaretAtTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretAtTypeReference/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretAtTypeReference/"); } @TestMetadata("CaretInClassBody") public void testCaretInClassBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/CaretInClassBody/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/CaretInClassBody/"); } @TestMetadata("ClassFromClass") public void testClassFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/ClassFromClass/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/ClassFromClass/"); } @TestMetadata("ClassFromObject") public void testClassFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/ClassFromObject/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/ClassFromObject/"); } @TestMetadata("ClassInClassObject") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/ClassInClassObject/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/ClassInClassObject/"); } @TestMetadata("ClassInPackage") public void testClassInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/ClassInPackage/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/ClassInPackage/"); } @TestMetadata("InnerClass") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/InnerClass/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/InnerClass/"); } @TestMetadata("JKJHierarchy") public void testJKJHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/JKJHierarchy/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/JKJHierarchy/"); } @TestMetadata("JavaFromKotlin") public void testJavaFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/JavaFromKotlin/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/JavaFromKotlin/"); } @TestMetadata("JavaFromKotlinByRef") public void testJavaFromKotlinByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/JavaFromKotlinByRef/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/JavaFromKotlinByRef/"); } @TestMetadata("JavaFromKotlinForKotlinClass") public void testJavaFromKotlinForKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/JavaFromKotlinForKotlinClass/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/JavaFromKotlinForKotlinClass/"); } @TestMetadata("JavaStyleClassLiteralInvalidCode") public void testJavaStyleClassLiteralInvalidCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/JavaStyleClassLiteralInvalidCode/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/JavaStyleClassLiteralInvalidCode/"); } @TestMetadata("JetInt") public void testJetInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/JetInt/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/JetInt/"); } @TestMetadata("KJKHierarchy") public void testKJKHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/KJKHierarchy/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/KJKHierarchy/"); } @TestMetadata("KotlinFromJava") public void testKotlinFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/KotlinFromJava/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/KotlinFromJava/"); } @TestMetadata("KotlinFromJavaByRef") public void testKotlinFromJavaByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/KotlinFromJavaByRef/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/KotlinFromJavaByRef/"); } @TestMetadata("KotlinFromKotlinByRef") public void testKotlinFromKotlinByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/KotlinFromKotlinByRef/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/KotlinFromKotlinByRef/"); } @TestMetadata("Object") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/Object/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/Object/"); } @TestMetadata("TwoChildren") public void testTwoChildren() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/type/TwoChildren/"); - doTypeClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/type/TwoChildren/"); } } @@ -206,32 +181,32 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSuperClassHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/class/super"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("JetList") public void testJetList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/super/JetList/"); - doSuperClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/super/JetList/"); } @TestMetadata("MultiTypeAlias") public void testMultiTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/super/MultiTypeAlias/"); - doSuperClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/super/MultiTypeAlias/"); } @TestMetadata("TwoTraits") public void testTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/super/TwoTraits/"); - doSuperClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/super/TwoTraits/"); } @TestMetadata("TypeAlias") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/super/TypeAlias/"); - doSuperClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/super/TypeAlias/"); } } @@ -239,92 +214,82 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sub extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSubClassHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSub() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/class/sub"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("AllFromClass") public void testAllFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/AllFromClass/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/AllFromClass/"); } @TestMetadata("AllFromTrait") public void testAllFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/AllFromTrait/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/AllFromTrait/"); } @TestMetadata("ClassFromClass") public void testClassFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/ClassFromClass/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/ClassFromClass/"); } @TestMetadata("ClassFromTrait") public void testClassFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/ClassFromTrait/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/ClassFromTrait/"); } @TestMetadata("ConstructorCallCaretAfter") public void testConstructorCallCaretAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/ConstructorCallCaretAfter/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/ConstructorCallCaretAfter/"); } @TestMetadata("ConstructorCallCaretBefore") public void testConstructorCallCaretBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/ConstructorCallCaretBefore/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/ConstructorCallCaretBefore/"); } @TestMetadata("MultiTypeAlias") public void testMultiTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/MultiTypeAlias/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/MultiTypeAlias/"); } @TestMetadata("ObjectFromClass") public void testObjectFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/ObjectFromClass/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/ObjectFromClass/"); } @TestMetadata("ObjectFromTrait") public void testObjectFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/ObjectFromTrait/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/ObjectFromTrait/"); } @TestMetadata("SecondaryConstructorCallCaretAfter") public void testSecondaryConstructorCallCaretAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/SecondaryConstructorCallCaretAfter/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/SecondaryConstructorCallCaretAfter/"); } @TestMetadata("SecondaryConstructorCallCaretBefore") public void testSecondaryConstructorCallCaretBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/SecondaryConstructorCallCaretBefore/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/SecondaryConstructorCallCaretBefore/"); } @TestMetadata("TraitFromClass") public void testTraitFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/TraitFromClass/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/TraitFromClass/"); } @TestMetadata("TraitFromTrait") public void testTraitFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/TraitFromTrait/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/TraitFromTrait/"); } @TestMetadata("TypeAlias") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/class/sub/TypeAlias/"); - doSubClassHierarchyTest(fileName); + runTest("idea/testData/hierarchy/class/sub/TypeAlias/"); } } @@ -332,134 +297,117 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Callers extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doCallerHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/calls/callers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("callInsideAnonymousFun") public void testCallInsideAnonymousFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/callInsideAnonymousFun/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/callInsideAnonymousFun/"); } @TestMetadata("callInsideLambda") public void testCallInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/callInsideLambda/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/callInsideLambda/"); } @TestMetadata("kotlinClass") public void testKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinClass/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinClass/"); } @TestMetadata("kotlinFunction") public void testKotlinFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinFunction/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinFunction/"); } @TestMetadata("kotlinFunctionNonCallUsages") public void testKotlinFunctionNonCallUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinFunctionNonCallUsages/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinFunctionNonCallUsages/"); } @TestMetadata("kotlinInterface") public void testKotlinInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinInterface/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinInterface/"); } @TestMetadata("kotlinLocalClass") public void testKotlinLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinLocalClass/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinLocalClass/"); } @TestMetadata("kotlinLocalFunction") public void testKotlinLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinLocalFunction/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinLocalFunction/"); } @TestMetadata("kotlinLocalFunctionWithNonLocalCallers") public void testKotlinLocalFunctionWithNonLocalCallers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinLocalFunctionWithNonLocalCallers/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinLocalFunctionWithNonLocalCallers/"); } @TestMetadata("kotlinNestedClass") public void testKotlinNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinNestedClass/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinNestedClass/"); } @TestMetadata("kotlinNestedInnerClass") public void testKotlinNestedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/"); } @TestMetadata("kotlinPackageFunction") public void testKotlinPackageFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinPackageFunction/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinPackageFunction/"); } @TestMetadata("kotlinPackageProperty") public void testKotlinPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinPackageProperty/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinPackageProperty/"); } @TestMetadata("kotlinPrimaryConstructorImplicitCalls") public void testKotlinPrimaryConstructorImplicitCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinPrimaryConstructorImplicitCalls/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinPrimaryConstructorImplicitCalls/"); } @TestMetadata("kotlinPrivateClass") public void testKotlinPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinPrivateClass/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinPrivateClass/"); } @TestMetadata("kotlinPrivateFunction") public void testKotlinPrivateFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinPrivateFunction/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinPrivateFunction/"); } @TestMetadata("kotlinPrivateProperty") public void testKotlinPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinPrivateProperty/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinPrivateProperty/"); } @TestMetadata("kotlinProperty") public void testKotlinProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinProperty/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinProperty/"); } @TestMetadata("kotlinSecondaryConstructor") public void testKotlinSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinSecondaryConstructor/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinSecondaryConstructor/"); } @TestMetadata("kotlinSecondaryConstructorImplicitCalls") public void testKotlinSecondaryConstructorImplicitCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinSecondaryConstructorImplicitCalls/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinSecondaryConstructorImplicitCalls/"); } @TestMetadata("kotlinUnresolvedFunction") public void testKotlinUnresolvedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callers/kotlinUnresolvedFunction/"); - doCallerHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callers/kotlinUnresolvedFunction/"); } } @@ -467,14 +415,17 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallersJava extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doCallerJavaHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallersJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/calls/callersJava"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("javaMethod") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callersJava/javaMethod/"); - doCallerJavaHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callersJava/javaMethod/"); } } @@ -482,86 +433,77 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Callees extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doCalleeHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallees() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/calls/callees"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("kotlinAnonymousObject") public void testKotlinAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinAnonymousObject/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinAnonymousObject/"); } @TestMetadata("kotlinClass") public void testKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinClass/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinClass/"); } @TestMetadata("kotlinClassObject") public void testKotlinClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinClassObject/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinClassObject/"); } @TestMetadata("kotlinEnumClass") public void testKotlinEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinEnumClass/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinEnumClass/"); } @TestMetadata("kotlinFunction") public void testKotlinFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinFunction/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinFunction/"); } @TestMetadata("kotlinInterface") public void testKotlinInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinInterface/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinInterface/"); } @TestMetadata("kotlinLocalClass") public void testKotlinLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinLocalClass/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinLocalClass/"); } @TestMetadata("kotlinLocalFunction") public void testKotlinLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinLocalFunction/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinLocalFunction/"); } @TestMetadata("kotlinNestedClass") public void testKotlinNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinNestedClass/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinNestedClass/"); } @TestMetadata("kotlinObject") public void testKotlinObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinObject/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinObject/"); } @TestMetadata("kotlinPackageFunction") public void testKotlinPackageFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinPackageFunction/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinPackageFunction/"); } @TestMetadata("kotlinPackageProperty") public void testKotlinPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinPackageProperty/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinPackageProperty/"); } @TestMetadata("kotlinProperty") public void testKotlinProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/calls/callees/kotlinProperty/"); - doCalleeHierarchyTest(fileName); + runTest("idea/testData/hierarchy/calls/callees/kotlinProperty/"); } } @@ -569,50 +511,47 @@ public class HierarchyTestGenerated extends AbstractHierarchyTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Overrides extends AbstractHierarchyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doOverrideHierarchyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/overrides"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("kotlinBuiltInMemberFunction") public void testKotlinBuiltInMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinBuiltInMemberFunction/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinBuiltInMemberFunction/"); } @TestMetadata("kotlinFunctionInClass") public void testKotlinFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinFunctionInClass/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinFunctionInClass/"); } @TestMetadata("kotlinFunctionInTrait") public void testKotlinFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinFunctionInTrait/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinFunctionInTrait/"); } @TestMetadata("kotlinPropertyInClass") public void testKotlinPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinPropertyInClass/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinPropertyInClass/"); } @TestMetadata("kotlinPropertyInTrait") public void testKotlinPropertyInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinPropertyInTrait/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinPropertyInTrait/"); } @TestMetadata("kotlinTopLevelFunction") public void testKotlinTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinTopLevelFunction/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinTopLevelFunction/"); } @TestMetadata("kotlinVarParameter") public void testKotlinVarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/overrides/kotlinVarParameter/"); - doOverrideHierarchyTest(fileName); + runTest("idea/testData/hierarchy/overrides/kotlinVarParameter/"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyWithLibTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyWithLibTestGenerated.java index e109b060a91..5fdce21ef8e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyWithLibTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/hierarchy/HierarchyWithLibTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class HierarchyWithLibTestGenerated extends AbstractHierarchyWithLibTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/hierarchy/withLib"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("annotation") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/withLib/annotation/"); - doTest(fileName); + runTest("idea/testData/hierarchy/withLib/annotation/"); } @TestMetadata("enum") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/hierarchy/withLib/enum/"); - doTest(fileName); + runTest("idea/testData/hierarchy/withLib/enum/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageJsTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageJsTestGenerated.java index d6cb5b25cbd..89e4b946f6b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageJsTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageJsTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticMessageJsTestGenerated extends AbstractDiagnosticMessageJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/diagnosticMessage/js"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, false); } @TestMetadata("jsCodeErrorHtml.kt") public void testJsCodeErrorHtml() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/js/jsCodeErrorHtml.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/js/jsCodeErrorHtml.kt"); } @TestMetadata("jsCodeErrorText.kt") public void testJsCodeErrorText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/js/jsCodeErrorText.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/js/jsCodeErrorText.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageTestGenerated.java index d6bc8eac2c0..51054c7a54d 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/DiagnosticMessageTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DiagnosticMessageTestGenerated extends AbstractDiagnosticMessageTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractBaseClassMemberNotImplemented.kt") public void testAbstractBaseClassMemberNotImplemented() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/abstractBaseClassMemberNotImplemented.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/abstractBaseClassMemberNotImplemented.kt"); } public void testAllFilesPresentInDiagnosticMessage() throws Exception { @@ -33,295 +36,246 @@ public class DiagnosticMessageTestGenerated extends AbstractDiagnosticMessageTes @TestMetadata("annotationsForResolve.kt") public void testAnnotationsForResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/annotationsForResolve.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/annotationsForResolve.kt"); } @TestMetadata("assignedButNeverAccessedVariable.kt") public void testAssignedButNeverAccessedVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/assignedButNeverAccessedVariable.kt"); } @TestMetadata("cannotInferVisibility.kt") public void testCannotInferVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/cannotInferVisibility.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/cannotInferVisibility.kt"); } @TestMetadata("cannotOverrideInvisibleMember.kt") public void testCannotOverrideInvisibleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/cannotOverrideInvisibleMember.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/cannotOverrideInvisibleMember.kt"); } @TestMetadata("complexTypeMismatchWithTypeParameters.kt") public void testComplexTypeMismatchWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/complexTypeMismatchWithTypeParameters.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/complexTypeMismatchWithTypeParameters.kt"); } @TestMetadata("complexTypeMismatchWithTypeParametersAndTypeAlias.kt") public void testComplexTypeMismatchWithTypeParametersAndTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/complexTypeMismatchWithTypeParametersAndTypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/complexTypeMismatchWithTypeParametersAndTypeAlias.kt"); } @TestMetadata("conflictingOverloadsClass.kt") public void testConflictingOverloadsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/conflictingOverloadsClass.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/conflictingOverloadsClass.kt"); } @TestMetadata("conflictingOverloadsDefaultPackage.kt") public void testConflictingOverloadsDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/conflictingOverloadsDefaultPackage.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/conflictingOverloadsDefaultPackage.kt"); } @TestMetadata("conflictingSubstitutions.kt") public void testConflictingSubstitutions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/conflictingSubstitutions.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/conflictingSubstitutions.kt"); } @TestMetadata("constructorsRedeclaration.kt") public void testConstructorsRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/constructorsRedeclaration.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/constructorsRedeclaration.kt"); } @TestMetadata("constructorsRedeclarationTopLevel.kt") public void testConstructorsRedeclarationTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/constructorsRedeclarationTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/constructorsRedeclarationTopLevel.kt"); } @TestMetadata("differentNamesForSameParameter.kt") public void testDifferentNamesForSameParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/differentNamesForSameParameter.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/differentNamesForSameParameter.kt"); } @TestMetadata("expectedNothingDueToProjections.kt") public void testExpectedNothingDueToProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/expectedNothingDueToProjections.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/expectedNothingDueToProjections.kt"); } @TestMetadata("extensionInClassReference.kt") public void testExtensionInClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/extensionInClassReference.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/extensionInClassReference.kt"); } @TestMetadata("functionPlaceholder.kt") public void testFunctionPlaceholder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/functionPlaceholder.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/functionPlaceholder.kt"); } @TestMetadata("illegalSuspendCall.kt") public void testIllegalSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/illegalSuspendCall.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/illegalSuspendCall.kt"); } @TestMetadata("invisibleMember.kt") public void testInvisibleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/invisibleMember.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/invisibleMember.kt"); } @TestMetadata("multipleDefaultsFromSupertypes.kt") public void testMultipleDefaultsFromSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/multipleDefaultsFromSupertypes.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/multipleDefaultsFromSupertypes.kt"); } @TestMetadata("nameInConstraintIsNotATypeParameter.kt") public void testNameInConstraintIsNotATypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/nameInConstraintIsNotATypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/nameInConstraintIsNotATypeParameter.kt"); } @TestMetadata("nestedClassAcessedViaInstanceReference.kt") public void testNestedClassAcessedViaInstanceReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/nestedClassAcessedViaInstanceReference.kt"); } @TestMetadata("nestedClassShouldBeQualified.kt") public void testNestedClassShouldBeQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/nestedClassShouldBeQualified.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/nestedClassShouldBeQualified.kt"); } @TestMetadata("noneApplicable.kt") public void testNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/noneApplicable.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/noneApplicable.kt"); } @TestMetadata("noneApplicableCallableReference.kt") public void testNoneApplicableCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/noneApplicableCallableReference.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/noneApplicableCallableReference.kt"); } @TestMetadata("noneApplicableConstructor.kt") public void testNoneApplicableConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/noneApplicableConstructor.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/noneApplicableConstructor.kt"); } @TestMetadata("noneApplicableGeneric.kt") public void testNoneApplicableGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/noneApplicableGeneric.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/noneApplicableGeneric.kt"); } @TestMetadata("noneApplicableHtml.kt") public void testNoneApplicableHtml() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/noneApplicableHtml.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/noneApplicableHtml.kt"); } @TestMetadata("noneApplicableTxt.kt") public void testNoneApplicableTxt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/noneApplicableTxt.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/noneApplicableTxt.kt"); } @TestMetadata("numberValueTypes.kt") public void testNumberValueTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/numberValueTypes.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/numberValueTypes.kt"); } @TestMetadata("overloadResolutionAmbiguityHtml.kt") public void testOverloadResolutionAmbiguityHtml() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/overloadResolutionAmbiguityHtml.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/overloadResolutionAmbiguityHtml.kt"); } @TestMetadata("overloadResolutionAmbiguityTxt.kt") public void testOverloadResolutionAmbiguityTxt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/overloadResolutionAmbiguityTxt.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/overloadResolutionAmbiguityTxt.kt"); } @TestMetadata("renderCollectionOfTypes.kt") public void testRenderCollectionOfTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/renderCollectionOfTypes.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/renderCollectionOfTypes.kt"); } @TestMetadata("returnTypeMismatchOnOverride.kt") public void testReturnTypeMismatchOnOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/returnTypeMismatchOnOverride.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/returnTypeMismatchOnOverride.kt"); } @TestMetadata("typeInferenceCannotCaptureTypes.kt") public void testTypeInferenceCannotCaptureTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeInferenceCannotCaptureTypes.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeInferenceCannotCaptureTypes.kt"); } @TestMetadata("typeInferenceExpectedTypeMismatch.kt") public void testTypeInferenceExpectedTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeInferenceExpectedTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeInferenceExpectedTypeMismatch.kt"); } @TestMetadata("typeMismatchDueToProjections.kt") public void testTypeMismatchDueToProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeMismatchDueToProjections.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeMismatchDueToProjections.kt"); } @TestMetadata("typeMismatchDueToProjectionsIn.kt") public void testTypeMismatchDueToProjectionsIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeMismatchDueToProjectionsIn.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeMismatchDueToProjectionsIn.kt"); } @TestMetadata("typeMismatchDueToProjectionsTxt.kt") public void testTypeMismatchDueToProjectionsTxt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeMismatchDueToProjectionsTxt.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeMismatchDueToProjectionsTxt.kt"); } @TestMetadata("typeMismatchWithFunctionalType.kt") public void testTypeMismatchWithFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeMismatchWithFunctionalType.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeMismatchWithFunctionalType.kt"); } @TestMetadata("typeMismatchWithNothing.kt") public void testTypeMismatchWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeMismatchWithNothing.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeMismatchWithNothing.kt"); } @TestMetadata("typeMismatchWithTypeParameters.kt") public void testTypeMismatchWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeMismatchWithTypeParameters.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeMismatchWithTypeParameters.kt"); } @TestMetadata("typeParameterAsReified.kt") public void testTypeParameterAsReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeParameterAsReified.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeParameterAsReified.kt"); } @TestMetadata("typeVarianceConflictInTypeAliasExpansion.kt") public void testTypeVarianceConflictInTypeAliasExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/typeVarianceConflictInTypeAliasExpansion.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/typeVarianceConflictInTypeAliasExpansion.kt"); } @TestMetadata("unsupportedFeature.kt") public void testUnsupportedFeature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/unsupportedFeature.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/unsupportedFeature.kt"); } @TestMetadata("unusedParameter.kt") public void testUnusedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/unusedParameter.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/unusedParameter.kt"); } @TestMetadata("unusedValue.kt") public void testUnusedValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/unusedValue.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/unusedValue.kt"); } @TestMetadata("unusedVariable.kt") public void testUnusedVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/unusedVariable.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/unusedVariable.kt"); } @TestMetadata("upperBoundViolated.kt") public void testUpperBoundViolated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/upperBoundViolated.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/upperBoundViolated.kt"); } @TestMetadata("upperBoundViolatedInTypeAliasConstructorCall.kt") public void testUpperBoundViolatedInTypeAliasConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/upperBoundViolatedInTypeAliasConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/upperBoundViolatedInTypeAliasConstructorCall.kt"); } @TestMetadata("urlRender.kt") public void testUrlRender() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/diagnosticMessage/urlRender.kt"); - doTest(fileName); + runTest("idea/testData/diagnosticMessage/urlRender.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/DslHighlighterTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/highlighter/DslHighlighterTestGenerated.java index ae384e8db7d..da97fc7860a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/DslHighlighterTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/DslHighlighterTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DslHighlighterTestGenerated extends AbstractDslHighlighterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDslHighlighter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/dslHighlighter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionCalls.kt") public void testFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/dslHighlighter/functionCalls.kt"); - doTest(fileName); + runTest("idea/testData/dslHighlighter/functionCalls.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightExitPointsTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightExitPointsTestGenerated.java index aea1b2cafa6..37085ede89f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightExitPointsTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightExitPointsTestGenerated.java @@ -21,109 +21,96 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class HighlightExitPointsTestGenerated extends AbstractHighlightExitPointsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExitPoints() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/exitPoints"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/getter.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/getter.kt"); } @TestMetadata("inline1.kt") public void testInline1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/inline1.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/inline1.kt"); } @TestMetadata("inline2.kt") public void testInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/inline2.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/inline2.kt"); } @TestMetadata("inline3.kt") public void testInline3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/inline3.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/inline3.kt"); } @TestMetadata("inlineLocalReturn1.kt") public void testInlineLocalReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/inlineLocalReturn1.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/inlineLocalReturn1.kt"); } @TestMetadata("inlineLocalReturn2.kt") public void testInlineLocalReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/inlineLocalReturn2.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/inlineLocalReturn2.kt"); } @TestMetadata("inlineWithNoInlineParam.kt") public void testInlineWithNoInlineParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/inlineWithNoInlineParam.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/inlineWithNoInlineParam.kt"); } @TestMetadata("invalidReturn.kt") public void testInvalidReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/invalidReturn.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/invalidReturn.kt"); } @TestMetadata("invalidThrow.kt") public void testInvalidThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/invalidThrow.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/invalidThrow.kt"); } @TestMetadata("localFunction1.kt") public void testLocalFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/localFunction1.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/localFunction1.kt"); } @TestMetadata("localFunction2.kt") public void testLocalFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/localFunction2.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/localFunction2.kt"); } @TestMetadata("localFunctionThrow.kt") public void testLocalFunctionThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/localFunctionThrow.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/localFunctionThrow.kt"); } @TestMetadata("notInline1.kt") public void testNotInline1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/notInline1.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/notInline1.kt"); } @TestMetadata("notInline2.kt") public void testNotInline2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/notInline2.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/notInline2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/simple.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/simple.kt"); } @TestMetadata("throw1.kt") public void testThrow1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/throw1.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/throw1.kt"); } @TestMetadata("throw2.kt") public void testThrow2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/exitPoints/throw2.kt"); - doTest(fileName); + runTest("idea/testData/exitPoints/throw2.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightingTestGenerated.java index 2d114527985..5fd774d9a75 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/HighlightingTestGenerated.java @@ -21,238 +21,209 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class HighlightingTestGenerated extends AbstractHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHighlighter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/highlighter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Annotations.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Annotations.kt"); } @TestMetadata("Dynamic.kt") public void testDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Dynamic.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Dynamic.kt"); } @TestMetadata("Enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Enums.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Enums.kt"); } @TestMetadata("Field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Field.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Field.kt"); } @TestMetadata("Functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Functions.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Functions.kt"); } @TestMetadata("InvokeCall.kt") public void testInvokeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/InvokeCall.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/InvokeCall.kt"); } @TestMetadata("JavaTypes.kt") public void testJavaTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/JavaTypes.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/JavaTypes.kt"); } @TestMetadata("KDoc.kt") public void testKDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/KDoc.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/KDoc.kt"); } @TestMetadata("KotlinInjection.kt") public void testKotlinInjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/KotlinInjection.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/KotlinInjection.kt"); } @TestMetadata("Labels.kt") public void testLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Labels.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Labels.kt"); } @TestMetadata("NamedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/NamedArguments.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/NamedArguments.kt"); } @TestMetadata("NonNullAssertion.kt") public void testNonNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/NonNullAssertion.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/NonNullAssertion.kt"); } @TestMetadata("Object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Object.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Object.kt"); } @TestMetadata("SmartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/SmartCast.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/SmartCast.kt"); } @TestMetadata("SyntheticExtensionProperty.kt") public void testSyntheticExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/SyntheticExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/SyntheticExtensionProperty.kt"); } @TestMetadata("Todo.kt") public void testTodo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Todo.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Todo.kt"); } @TestMetadata("TopLevelOpenSuspendFun.kt") public void testTopLevelOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/TopLevelOpenSuspendFun.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/TopLevelOpenSuspendFun.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/TypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/TypeAlias.kt"); } @TestMetadata("TypesAndAnnotations.kt") public void testTypesAndAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/TypesAndAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/TypesAndAnnotations.kt"); } @TestMetadata("Variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/Variables.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/Variables.kt"); } @TestMetadata("VariablesAsFunctions.kt") public void testVariablesAsFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/VariablesAsFunctions.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/VariablesAsFunctions.kt"); } @TestMetadata("idea/testData/highlighter/deprecated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deprecated extends AbstractHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/highlighter/deprecated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Class.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/ClassObject.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/ClassObject.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Constructor.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Constructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/ExtensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/ExtensionFunction.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Function.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Function.kt"); } @TestMetadata("Get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Get.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Get.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Getter.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Getter.kt"); } @TestMetadata("Inc.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Inc.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Inc.kt"); } @TestMetadata("Invalid.kt") public void testInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Invalid.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Invalid.kt"); } @TestMetadata("Invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Invoke.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Invoke.kt"); } @TestMetadata("Operation.kt") public void testOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Operation.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Operation.kt"); } @TestMetadata("Property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Property.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Property.kt"); } @TestMetadata("RangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/RangeTo.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/RangeTo.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Setter.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Setter.kt"); } @TestMetadata("SuperCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/SuperCall.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/SuperCall.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/highlighter/deprecated/Trait.kt"); - doTest(fileName); + runTest("idea/testData/highlighter/deprecated/Trait.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/highlighter/UsageHighlightingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/highlighter/UsageHighlightingTestGenerated.java index d543ba9321b..6a6778f8190 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/highlighter/UsageHighlightingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/highlighter/UsageHighlightingTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class UsageHighlightingTestGenerated extends AbstractUsageHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUsageHighlighter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/usageHighlighter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implicitIt.kt") public void testImplicitIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/usageHighlighter/implicitIt.kt"); - doTest(fileName); + runTest("idea/testData/usageHighlighter/implicitIt.kt"); } @TestMetadata("importAlias.kt") public void testImportAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/usageHighlighter/importAlias.kt"); - doTest(fileName); + runTest("idea/testData/usageHighlighter/importAlias.kt"); } @TestMetadata("labeledAnonymousFun.kt") public void testLabeledAnonymousFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/usageHighlighter/labeledAnonymousFun.kt"); - doTest(fileName); + runTest("idea/testData/usageHighlighter/labeledAnonymousFun.kt"); } @TestMetadata("labeledLambda.kt") public void testLabeledLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/usageHighlighter/labeledLambda.kt"); - doTest(fileName); + runTest("idea/testData/usageHighlighter/labeledLambda.kt"); } @TestMetadata("labeledLoop.kt") public void testLabeledLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/usageHighlighter/labeledLoop.kt"); - doTest(fileName); + runTest("idea/testData/usageHighlighter/labeledLoop.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/usageHighlighter/localVal.kt"); - doTest(fileName); + runTest("idea/testData/usageHighlighter/localVal.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/imports/JsOptimizeImportsTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/imports/JsOptimizeImportsTestGenerated.java index 9d7289fda1c..51a7082c241 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/imports/JsOptimizeImportsTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/imports/JsOptimizeImportsTestGenerated.java @@ -23,14 +23,17 @@ public class JsOptimizeImportsTestGenerated extends AbstractJsOptimizeImportsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Js extends AbstractJsOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/js"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultJsImports.kt") public void testDefaultJsImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/js/DefaultJsImports.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/js/DefaultJsImports.kt"); } } @@ -38,190 +41,169 @@ public class JsOptimizeImportsTestGenerated extends AbstractJsOptimizeImportsTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common extends AbstractJsOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommon() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/common"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayAccessExpression.kt") public void testArrayAccessExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ArrayAccessExpression.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ArrayAccessExpression.kt"); } @TestMetadata("ClassMemberImported.kt") public void testClassMemberImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ClassMemberImported.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ClassMemberImported.kt"); } @TestMetadata("ComponentFunction.kt") public void testComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ComponentFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ComponentFunction.kt"); } @TestMetadata("CurrentPackage.kt") public void testCurrentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/CurrentPackage.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/CurrentPackage.kt"); } @TestMetadata("DefaultObjectReference.kt") public void testDefaultObjectReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/DefaultObjectReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/DefaultObjectReference.kt"); } @TestMetadata("Enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Enums.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Enums.kt"); } @TestMetadata("ExtensionFunctionalTypeValFromCompanionObject.kt") public void testExtensionFunctionalTypeValFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObject.kt"); } @TestMetadata("ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt") public void testExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt"); } @TestMetadata("ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt") public void testExtensionFunctionalTypeValFromCompanionObjectNonExtCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt"); } @TestMetadata("InvokeFunction.kt") public void testInvokeFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/InvokeFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/InvokeFunction.kt"); } @TestMetadata("IteratorFunction.kt") public void testIteratorFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/IteratorFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/IteratorFunction.kt"); } @TestMetadata("KT11640.kt") public void testKT11640() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT11640.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT11640.kt"); } @TestMetadata("KT11640_1.kt") public void testKT11640_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT11640_1.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT11640_1.kt"); } @TestMetadata("KT13689.kt") public void testKT13689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT13689.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT13689.kt"); } @TestMetadata("KT9875.kt") public void testKT9875() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT9875.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT9875.kt"); } @TestMetadata("KeywordNames.kt") public void testKeywordNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KeywordNames.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KeywordNames.kt"); } @TestMetadata("Kt2488EnumEntry.kt") public void testKt2488EnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Kt2488EnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Kt2488EnumEntry.kt"); } @TestMetadata("Kt2709.kt") public void testKt2709() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Kt2709.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Kt2709.kt"); } @TestMetadata("MemberImports.kt") public void testMemberImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/MemberImports.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/MemberImports.kt"); } @TestMetadata("MembersInScope.kt") public void testMembersInScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/MembersInScope.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/MembersInScope.kt"); } @TestMetadata("NestedClassReferenceOutsideClassBody.kt") public void testNestedClassReferenceOutsideClassBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/NestedClassReferenceOutsideClassBody.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/NestedClassReferenceOutsideClassBody.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Overloads.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Overloads.kt"); } @TestMetadata("TwoConstructors.kt") public void testTwoConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/TwoConstructors.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/TwoConstructors.kt"); } @TestMetadata("TypeAliasUsage.kt") public void testTypeAliasUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/TypeAliasUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/TypeAliasUsage.kt"); } @TestMetadata("idea/testData/editor/optimizeImports/common/kt21515") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractJsOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/common/kt21515"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferenceOnClass.kt") public void testCallableReferenceOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClass.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClass.kt"); } @TestMetadata("callableReferenceOnClassWithCompanion.kt") public void testCallableReferenceOnClassWithCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClassWithCompanion.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClassWithCompanion.kt"); } @TestMetadata("callableReferenceOnObject.kt") public void testCallableReferenceOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnObject.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnObject.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/constructor.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/constructor.kt"); } @TestMetadata("typeReference.kt") public void testTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/typeReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/typeReference.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java index 3e426a6fd01..76b43ca460a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/imports/JvmOptimizeImportsTestGenerated.java @@ -23,214 +23,189 @@ public class JvmOptimizeImportsTestGenerated extends AbstractJvmOptimizeImportsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jvm extends AbstractJvmOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/jvm"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AlreadyOptimized.kt") public void testAlreadyOptimized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/AlreadyOptimized.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/AlreadyOptimized.kt"); } @TestMetadata("CallableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/CallableReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/CallableReference.kt"); } @TestMetadata("CallableReference2.kt") public void testCallableReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/CallableReference2.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/CallableReference2.kt"); } @TestMetadata("ClassFromSameFileImportAddedBug.kt") public void testClassFromSameFileImportAddedBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/ClassFromSameFileImportAddedBug.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/ClassFromSameFileImportAddedBug.kt"); } @TestMetadata("DoNotTouchIfNoChanges.kt") public void testDoNotTouchIfNoChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/DoNotTouchIfNoChanges.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/DoNotTouchIfNoChanges.kt"); } @TestMetadata("DuplicatedImports.kt") public void testDuplicatedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/DuplicatedImports.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/DuplicatedImports.kt"); } @TestMetadata("FromCompanionObject.kt") public void testFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/FromCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/FromCompanionObject.kt"); } @TestMetadata("FromCompanionObjectGeneric.kt") public void testFromCompanionObjectGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/FromCompanionObjectGeneric.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/FromCompanionObjectGeneric.kt"); } @TestMetadata("JavaStaticField.kt") public void testJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/JavaStaticField.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/JavaStaticField.kt"); } @TestMetadata("KDocReference.kt") public void testKDocReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/KDocReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/KDocReference.kt"); } @TestMetadata("KT10226.kt") public void testKT10226() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/KT10226.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/KT10226.kt"); } @TestMetadata("Kt1850FullQualified.kt") public void testKt1850FullQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/Kt1850FullQualified.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/Kt1850FullQualified.kt"); } @TestMetadata("Kt1850InnerClass.kt") public void testKt1850InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/Kt1850InnerClass.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/Kt1850InnerClass.kt"); } @TestMetadata("NestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/NestedClassInObject.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/NestedClassInObject.kt"); } @TestMetadata("Operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/Operators.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/Operators.kt"); } @TestMetadata("PlusAndPlusAssign.kt") public void testPlusAndPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/PlusAndPlusAssign.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/PlusAndPlusAssign.kt"); } @TestMetadata("RemoveImportsIfGeneral.kt") public void testRemoveImportsIfGeneral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/RemoveImportsIfGeneral.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/RemoveImportsIfGeneral.kt"); } @TestMetadata("RemoveImportsIfGeneralBefore.kt") public void testRemoveImportsIfGeneralBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/RemoveImportsIfGeneralBefore.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/RemoveImportsIfGeneralBefore.kt"); } @TestMetadata("SamConstructor.kt") public void testSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/SamConstructor.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/SamConstructor.kt"); } @TestMetadata("StaticMethodFromSuper.kt") public void testStaticMethodFromSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/StaticMethodFromSuper.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/StaticMethodFromSuper.kt"); } @TestMetadata("ThisAndSuper.kt") public void testThisAndSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/ThisAndSuper.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/ThisAndSuper.kt"); } @TestMetadata("TrivialAlias.kt") public void testTrivialAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/TrivialAlias.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/TrivialAlias.kt"); } @TestMetadata("UnusedImports.kt") public void testUnusedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/UnusedImports.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/UnusedImports.kt"); } @TestMetadata("WithAliases.kt") public void testWithAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/WithAliases.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/WithAliases.kt"); } @TestMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AllUnderImports extends AbstractJvmOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAllUnderImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/jvm/allUnderImports"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassNameConflict.kt") public void testClassNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflict.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflict.kt"); } @TestMetadata("ClassNameConflict2.kt") public void testClassNameConflict2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflict2.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflict2.kt"); } @TestMetadata("ClassNameConflictWithCurrentPackage.kt") public void testClassNameConflictWithCurrentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithCurrentPackage.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithCurrentPackage.kt"); } @TestMetadata("ClassNameConflictWithCurrentPackage2.kt") public void testClassNameConflictWithCurrentPackage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithCurrentPackage2.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithCurrentPackage2.kt"); } @TestMetadata("ClassNameConflictWithDefault.kt") public void testClassNameConflictWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithDefault.kt"); } @TestMetadata("ClassNameConflictWithinDefaultImports.kt") public void testClassNameConflictWithinDefaultImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithinDefaultImports.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/ClassNameConflictWithinDefaultImports.kt"); } @TestMetadata("NameCountSetting.kt") public void testNameCountSetting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/NameCountSetting.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/NameCountSetting.kt"); } @TestMetadata("PackagesToUseStarImport.kt") public void testPackagesToUseStarImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/PackagesToUseStarImport.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/PackagesToUseStarImport.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/jvm/allUnderImports/Simple.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/jvm/allUnderImports/Simple.kt"); } } } @@ -239,190 +214,169 @@ public class JvmOptimizeImportsTestGenerated extends AbstractJvmOptimizeImportsT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common extends AbstractJvmOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommon() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/common"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayAccessExpression.kt") public void testArrayAccessExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ArrayAccessExpression.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ArrayAccessExpression.kt"); } @TestMetadata("ClassMemberImported.kt") public void testClassMemberImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ClassMemberImported.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ClassMemberImported.kt"); } @TestMetadata("ComponentFunction.kt") public void testComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ComponentFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ComponentFunction.kt"); } @TestMetadata("CurrentPackage.kt") public void testCurrentPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/CurrentPackage.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/CurrentPackage.kt"); } @TestMetadata("DefaultObjectReference.kt") public void testDefaultObjectReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/DefaultObjectReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/DefaultObjectReference.kt"); } @TestMetadata("Enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Enums.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Enums.kt"); } @TestMetadata("ExtensionFunctionalTypeValFromCompanionObject.kt") public void testExtensionFunctionalTypeValFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObject.kt"); } @TestMetadata("ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt") public void testExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectCallOnCompanion.kt"); } @TestMetadata("ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt") public void testExtensionFunctionalTypeValFromCompanionObjectNonExtCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/ExtensionFunctionalTypeValFromCompanionObjectNonExtCall.kt"); } @TestMetadata("InvokeFunction.kt") public void testInvokeFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/InvokeFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/InvokeFunction.kt"); } @TestMetadata("IteratorFunction.kt") public void testIteratorFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/IteratorFunction.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/IteratorFunction.kt"); } @TestMetadata("KT11640.kt") public void testKT11640() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT11640.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT11640.kt"); } @TestMetadata("KT11640_1.kt") public void testKT11640_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT11640_1.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT11640_1.kt"); } @TestMetadata("KT13689.kt") public void testKT13689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT13689.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT13689.kt"); } @TestMetadata("KT9875.kt") public void testKT9875() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KT9875.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KT9875.kt"); } @TestMetadata("KeywordNames.kt") public void testKeywordNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/KeywordNames.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/KeywordNames.kt"); } @TestMetadata("Kt2488EnumEntry.kt") public void testKt2488EnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Kt2488EnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Kt2488EnumEntry.kt"); } @TestMetadata("Kt2709.kt") public void testKt2709() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Kt2709.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Kt2709.kt"); } @TestMetadata("MemberImports.kt") public void testMemberImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/MemberImports.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/MemberImports.kt"); } @TestMetadata("MembersInScope.kt") public void testMembersInScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/MembersInScope.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/MembersInScope.kt"); } @TestMetadata("NestedClassReferenceOutsideClassBody.kt") public void testNestedClassReferenceOutsideClassBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/NestedClassReferenceOutsideClassBody.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/NestedClassReferenceOutsideClassBody.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/Overloads.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/Overloads.kt"); } @TestMetadata("TwoConstructors.kt") public void testTwoConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/TwoConstructors.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/TwoConstructors.kt"); } @TestMetadata("TypeAliasUsage.kt") public void testTypeAliasUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/TypeAliasUsage.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/TypeAliasUsage.kt"); } @TestMetadata("idea/testData/editor/optimizeImports/common/kt21515") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractJvmOptimizeImportsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/editor/optimizeImports/common/kt21515"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferenceOnClass.kt") public void testCallableReferenceOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClass.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClass.kt"); } @TestMetadata("callableReferenceOnClassWithCompanion.kt") public void testCallableReferenceOnClassWithCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClassWithCompanion.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnClassWithCompanion.kt"); } @TestMetadata("callableReferenceOnObject.kt") public void testCallableReferenceOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnObject.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/callableReferenceOnObject.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/constructor.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/constructor.kt"); } @TestMetadata("typeReference.kt") public void testTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/editor/optimizeImports/common/kt21515/typeReference.kt"); - doTest(fileName); + runTest("idea/testData/editor/optimizeImports/common/kt21515/typeReference.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java index 9f244a3868a..12586e4dd04 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/inspections/LocalInspectionTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInspectionsLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -29,14 +33,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayInDataClass extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/arrayInDataClass"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("test.kt") public void testTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/arrayInDataClass/test.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/arrayInDataClass/test.kt"); } } @@ -44,6 +51,10 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Branched extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBranched() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/branched"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -52,296 +63,265 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfThenToSafeAccess extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfThenToSafeAccess() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("blockHasMoreThanOneStatement.kt") public void testBlockHasMoreThanOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/blockHasMoreThanOneStatement.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/blockHasMoreThanOneStatement.kt"); } @TestMetadata("blockUsesDifferentVar.kt") public void testBlockUsesDifferentVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/blockUsesDifferentVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/blockUsesDifferentVar.kt"); } @TestMetadata("conditionComparesNullWithNull.kt") public void testConditionComparesNullWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/conditionComparesNullWithNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/conditionComparesNullWithNull.kt"); } @TestMetadata("conditionInvalidBinaryExp.kt") public void testConditionInvalidBinaryExp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/conditionInvalidBinaryExp.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/conditionInvalidBinaryExp.kt"); } @TestMetadata("conditionNotBinaryExpr.kt") public void testConditionNotBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/conditionNotBinaryExpr.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/conditionNotBinaryExpr.kt"); } @TestMetadata("doesNotinlineValueIfUsedMoreThanOnce.kt") public void testDoesNotinlineValueIfUsedMoreThanOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/doesNotinlineValueIfUsedMoreThanOnce.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/doesNotinlineValueIfUsedMoreThanOnce.kt"); } @TestMetadata("doesNotinlineValueOutsideOfScope.kt") public void testDoesNotinlineValueOutsideOfScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/doesNotinlineValueOutsideOfScope.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/doesNotinlineValueOutsideOfScope.kt"); } @TestMetadata("emptyCondition.kt") public void testEmptyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/emptyCondition.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/emptyCondition.kt"); } @TestMetadata("emptyElseBlock.kt") public void testEmptyElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/emptyElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/emptyElseBlock.kt"); } @TestMetadata("emptyThenBlock.kt") public void testEmptyThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/emptyThenBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/emptyThenBlock.kt"); } @TestMetadata("ifAndElseBothInBlocks.kt") public void testIfAndElseBothInBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/ifAndElseBothInBlocks.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/ifAndElseBothInBlocks.kt"); } @TestMetadata("ifAndElseNotInBlocks.kt") public void testIfAndElseNotInBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/ifAndElseNotInBlocks.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/ifAndElseNotInBlocks.kt"); } @TestMetadata("ifAsExpression.kt") public void testIfAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/ifAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/ifAsExpression.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/implicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/implicitReceiver.kt"); } @TestMetadata("implicitReceiverInApply.kt") public void testImplicitReceiverInApply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/implicitReceiverInApply.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/implicitReceiverInApply.kt"); } @TestMetadata("isCheckSimple.kt") public void testIsCheckSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isCheckSimple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isCheckSimple.kt"); } @TestMetadata("isCheckWithSelectorChain.kt") public void testIsCheckWithSelectorChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isCheckWithSelectorChain.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isCheckWithSelectorChain.kt"); } @TestMetadata("isCondition.kt") public void testIsCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isCondition.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isCondition.kt"); } @TestMetadata("isNotCondition.kt") public void testIsNotCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isNotCondition.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isNotCondition.kt"); } @TestMetadata("isNotNullable.kt") public void testIsNotNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isNotNullable.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isNotNullable.kt"); } @TestMetadata("isNullable.kt") public void testIsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isNullable.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/isNullable.kt"); } @TestMetadata("lhsEqualsNull.kt") public void testLhsEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/lhsEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/lhsEqualsNull.kt"); } @TestMetadata("lhsNotEqualsNull.kt") public void testLhsNotEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/lhsNotEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/lhsNotEqualsNull.kt"); } @TestMetadata("missingNecessaryElseClause.kt") public void testMissingNecessaryElseClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/missingNecessaryElseClause.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/missingNecessaryElseClause.kt"); } @TestMetadata("missingNecessaryThenClause.kt") public void testMissingNecessaryThenClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/missingNecessaryThenClause.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/missingNecessaryThenClause.kt"); } @TestMetadata("noCondition.kt") public void testNoCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noCondition.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noCondition.kt"); } @TestMetadata("noElseBlock.kt") public void testNoElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noElseBlock.kt"); } @TestMetadata("noElseBlockAsExpression.kt") public void testNoElseBlockAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noElseBlockAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noElseBlockAsExpression.kt"); } @TestMetadata("noNullInCondition.kt") public void testNoNullInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noNullInCondition.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noNullInCondition.kt"); } @TestMetadata("noNullInCondition2.kt") public void testNoNullInCondition2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noNullInCondition2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noNullInCondition2.kt"); } @TestMetadata("noThenBlock.kt") public void testNoThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noThenBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/noThenBlock.kt"); } @TestMetadata("notApplicableForFunction.kt") public void testNotApplicableForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/notApplicableForFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/notApplicableForFunction.kt"); } @TestMetadata("notApplicableForLocalVar.kt") public void testNotApplicableForLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/notApplicableForLocalVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/notApplicableForLocalVar.kt"); } @TestMetadata("nullCheckSimple.kt") public void testNullCheckSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/nullCheckSimple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/nullCheckSimple.kt"); } @TestMetadata("nullCheckWithSelectorCallChain.kt") public void testNullCheckWithSelectorCallChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/nullCheckWithSelectorCallChain.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/nullCheckWithSelectorCallChain.kt"); } @TestMetadata("otherBlockHasMoreThanOneStatement.kt") public void testOtherBlockHasMoreThanOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/otherBlockHasMoreThanOneStatement.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/otherBlockHasMoreThanOneStatement.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/property.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/property.kt"); } @TestMetadata("propertyNotNull.kt") public void testPropertyNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/propertyNotNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/propertyNotNull.kt"); } @TestMetadata("propertyWithProperty.kt") public void testPropertyWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/propertyWithProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/propertyWithProperty.kt"); } @TestMetadata("rhsEqualsNull.kt") public void testRhsEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/rhsEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/rhsEqualsNull.kt"); } @TestMetadata("rhsNotEqualsNull.kt") public void testRhsNotEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/rhsNotEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/rhsNotEqualsNull.kt"); } @TestMetadata("thenAndElseBothNull.kt") public void testThenAndElseBothNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/thenAndElseBothNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/thenAndElseBothNull.kt"); } @TestMetadata("thenAndElseNotNull.kt") public void testThenAndElseNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/thenAndElseNotNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/thenAndElseNotNull.kt"); } @TestMetadata("unacceptableEmptyElseBlock.kt") public void testUnacceptableEmptyElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableEmptyElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableEmptyElseBlock.kt"); } @TestMetadata("unacceptableEmptyThenBlock.kt") public void testUnacceptableEmptyThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableEmptyThenBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableEmptyThenBlock.kt"); } @TestMetadata("unacceptableNoElseBlock.kt") public void testUnacceptableNoElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableNoElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableNoElseBlock.kt"); } @TestMetadata("unacceptableNoThenBlock.kt") public void testUnacceptableNoThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableNoThenBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableNoThenBlock.kt"); } @TestMetadata("willNotInlineClassProperty.kt") public void testWillNotInlineClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/willNotInlineClassProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/willNotInlineClassProperty.kt"); + } + + @TestMetadata("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -349,74 +329,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceWhenSubject extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceWhenSubject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/branched/introduceWhenSubject"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("lineBreaksAndComments.kt") public void testLineBreaksAndComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/lineBreaksAndComments.kt"); } @TestMetadata("whenWithEqualityTests.kt") public void testWhenWithEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithEqualityTests.kt"); } @TestMetadata("whenWithMultipleConditionTypes.kt") public void testWhenWithMultipleConditionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithMultipleConditionTypes.kt"); } @TestMetadata("whenWithNegativePatterns.kt") public void testWhenWithNegativePatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativePatterns.kt"); } @TestMetadata("whenWithNegativeRangeTests.kt") public void testWhenWithNegativeRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNegativeRangeTests.kt"); } @TestMetadata("whenWithNondivisibleConditions.kt") public void testWhenWithNondivisibleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNondivisibleConditions.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithNondivisibleConditions.kt"); } @TestMetadata("whenWithPatterns.kt") public void testWhenWithPatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithPatterns.kt"); } @TestMetadata("whenWithRangeTests.kt") public void testWhenWithRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithRangeTests.kt"); } @TestMetadata("whenWithSubject.kt") public void testWhenWithSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSubject.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSubject.kt"); } @TestMetadata("whenWithSwappedEqualityTests.kt") public void testWhenWithSwappedEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithSwappedEqualityTests.kt"); } @TestMetadata("whenWithUnmatchedCandidateSubjects.kt") public void testWhenWithUnmatchedCandidateSubjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithUnmatchedCandidateSubjects.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/branched/introduceWhenSubject/whenWithUnmatchedCandidateSubjects.kt"); } } } @@ -425,14 +398,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CanBeVal extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCanBeVal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/canBeVal"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("lateinitVar.kt") public void testLateinitVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/canBeVal/lateinitVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/canBeVal/lateinitVar.kt"); } } @@ -440,74 +416,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CascadeIf extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCascadeIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/cascadeIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/complex.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/complex.kt"); } @TestMetadata("four.kt") public void testFour() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/four.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/four.kt"); } @TestMetadata("ifTree.kt") public void testIfTree() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/ifTree.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/ifTree.kt"); } @TestMetadata("insideOtherIf.kt") public void testInsideOtherIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/insideOtherIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/insideOtherIf.kt"); } @TestMetadata("middleIf.kt") public void testMiddleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/middleIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/middleIf.kt"); } @TestMetadata("noSecondElse.kt") public void testNoSecondElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/noSecondElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/noSecondElse.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/normal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/normal.kt"); } @TestMetadata("oneLiner.kt") public void testOneLiner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/oneLiner.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/oneLiner.kt"); } @TestMetadata("shortIf.kt") public void testShortIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/shortIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/shortIf.kt"); } @TestMetadata("withAnnotation.kt") public void testWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/withAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/withAnnotation.kt"); } @TestMetadata("withBreak.kt") public void testWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/cascadeIf/withBreak.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/cascadeIf/withBreak.kt"); } } @@ -515,6 +484,10 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/collections"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -523,140 +496,122 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SimplifiableCallChain extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimplifiableCallChain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/collections/simplifiableCallChain"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("filterFirst.kt") public void testFilterFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirst.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirst.kt"); } @TestMetadata("filterFirstFake.kt") public void testFilterFirstFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirstFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirstFake.kt"); } @TestMetadata("filterFirstFakeReference.kt") public void testFilterFirstFakeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirstFakeReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirstFakeReference.kt"); } @TestMetadata("filterFirstOrNullReference.kt") public void testFilterFirstOrNullReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirstOrNullReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterFirstOrNullReference.kt"); } @TestMetadata("filterIsEmpty.kt") public void testFilterIsEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterIsEmpty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterIsEmpty.kt"); } @TestMetadata("filterIsNotEmpty.kt") public void testFilterIsNotEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterIsNotEmpty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterIsNotEmpty.kt"); } @TestMetadata("filterLastExplicit.kt") public void testFilterLastExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterLastExplicit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterLastExplicit.kt"); } @TestMetadata("filterTextIsEmpty.kt") public void testFilterTextIsEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterTextIsEmpty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterTextIsEmpty.kt"); } @TestMetadata("filterTextSingleOrNull.kt") public void testFilterTextSingleOrNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterTextSingleOrNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/filterTextSingleOrNull.kt"); } @TestMetadata("joinTo.kt") public void testJoinTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinTo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinTo.kt"); } @TestMetadata("joinToFake.kt") public void testJoinToFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToFake.kt"); } @TestMetadata("joinToFakeWithLambda.kt") public void testJoinToFakeWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToFakeWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToFakeWithLambda.kt"); } @TestMetadata("joinToForHashMap.kt") public void testJoinToForHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToForHashMap.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToForHashMap.kt"); } @TestMetadata("joinToForMap.kt") public void testJoinToForMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToForMap.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToForMap.kt"); } @TestMetadata("joinToString.kt") public void testJoinToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToString.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToString.kt"); } @TestMetadata("joinToStringOnMap.kt") public void testJoinToStringOnMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringOnMap.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringOnMap.kt"); } @TestMetadata("joinToStringViaBuilder.kt") public void testJoinToStringViaBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringViaBuilder.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringViaBuilder.kt"); } @TestMetadata("joinToStringWithReference.kt") public void testJoinToStringWithReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReference.kt"); } @TestMetadata("joinToStringWithReferenceFake.kt") public void testJoinToStringWithReferenceFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReferenceFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/joinToStringWithReferenceFake.kt"); } @TestMetadata("listOfNotNull.kt") public void testListOfNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/listOfNotNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/listOfNotNull.kt"); } @TestMetadata("mapNotNull.kt") public void testMapNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/mapNotNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/mapNotNull.kt"); } @TestMetadata("mapWithReturn.kt") public void testMapWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/simplifiableCallChain/mapWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/simplifiableCallChain/mapWithReturn.kt"); } } @@ -664,86 +619,77 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UselessCallOnCollection extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUselessCallOnCollection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/collections/uselessCallOnCollection"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("FilterIsExactInstance.kt") public void testFilterIsExactInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsExactInstance.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsExactInstance.kt"); } @TestMetadata("FilterIsExactInstanceFake.kt") public void testFilterIsExactInstanceFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsExactInstanceFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsExactInstanceFake.kt"); } @TestMetadata("FilterIsForFlexible.kt") public void testFilterIsForFlexible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsForFlexible.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsForFlexible.kt"); } @TestMetadata("FilterIsSupertypeInstance.kt") public void testFilterIsSupertypeInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsSupertypeInstance.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsSupertypeInstance.kt"); } @TestMetadata("FilterIsSupertypeInstanceFake.kt") public void testFilterIsSupertypeInstanceFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsSupertypeInstanceFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterIsSupertypeInstanceFake.kt"); } @TestMetadata("FilterNotNull.kt") public void testFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/FilterNotNull.kt"); } @TestMetadata("filterNotNullFake.kt") public void testFilterNotNullFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/filterNotNullFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/filterNotNullFake.kt"); } @TestMetadata("MapIndexedNotNullTo.kt") public void testMapIndexedNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapIndexedNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapIndexedNotNullTo.kt"); } @TestMetadata("MapNotNullTo.kt") public void testMapNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullTo.kt"); } @TestMetadata("MapNotNullWithLambda.kt") public void testMapNotNullWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithLambda.kt"); } @TestMetadata("MapNotNullWithLambdaFake.kt") public void testMapNotNullWithLambdaFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithLambdaFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithLambdaFake.kt"); } @TestMetadata("MapNotNullWithReference.kt") public void testMapNotNullWithReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithReference.kt"); } @TestMetadata("MapNotNullWithReferenceFake.kt") public void testMapNotNullWithReferenceFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithReferenceFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnCollection/MapNotNullWithReferenceFake.kt"); } } @@ -751,62 +697,57 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UselessCallOnNotNull extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUselessCallOnNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("NotNullType.kt") public void testNotNullType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NotNullType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NotNullType.kt"); } @TestMetadata("NotNullTypeChain.kt") public void testNotNullTypeChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NotNullTypeChain.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NotNullTypeChain.kt"); } @TestMetadata("NullOrBlankSafe.kt") public void testNullOrBlankSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrBlankSafe.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrBlankSafe.kt"); } @TestMetadata("NullOrEmpty.kt") public void testNullOrEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrEmpty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrEmpty.kt"); } @TestMetadata("NullOrEmptyFake.kt") public void testNullOrEmptyFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrEmptyFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrEmptyFake.kt"); } @TestMetadata("NullOrEmptySafe.kt") public void testNullOrEmptySafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrEmptySafe.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/NullOrEmptySafe.kt"); } @TestMetadata("OrEmptyFake.kt") public void testOrEmptyFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/OrEmptyFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/OrEmptyFake.kt"); } @TestMetadata("SafeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/SafeCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/SafeCall.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/String.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/collections/uselessCallOnNotNull/String.kt"); } } } @@ -815,80 +756,72 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstantConditionIf extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstantConditionIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/constantConditionIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delete.kt") public void testDelete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/delete.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/delete.kt"); } @TestMetadata("endWithElseIf.kt") public void testEndWithElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/endWithElseIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/endWithElseIf.kt"); } @TestMetadata("endWithElseIfNoBraces.kt") public void testEndWithElseIfNoBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/endWithElseIfNoBraces.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/endWithElseIfNoBraces.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/expression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/expression.kt"); } @TestMetadata("expressionElseIfBlock.kt") public void testExpressionElseIfBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/expressionElseIfBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/expressionElseIfBlock.kt"); } @TestMetadata("noStatements.kt") public void testNoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/noStatements.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/noStatements.kt"); } @TestMetadata("noStatementsElseIf.kt") public void testNoStatementsElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/noStatementsElseIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/noStatementsElseIf.kt"); } @TestMetadata("simpleBlock.kt") public void testSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/simpleBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/simpleBlock.kt"); } @TestMetadata("simpleFalse.kt") public void testSimpleFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/simpleFalse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/simpleFalse.kt"); } @TestMetadata("simpleTrue.kt") public void testSimpleTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/simpleTrue.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/simpleTrue.kt"); } @TestMetadata("statement.kt") public void testStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/statement.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/statement.kt"); } @TestMetadata("statementElseIf.kt") public void testStatementElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/constantConditionIf/statementElseIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/constantConditionIf/statementElseIf.kt"); } } @@ -896,6 +829,10 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConventionNameCalls extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConventionNameCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/conventionNameCalls"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -904,164 +841,142 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceCallWithBinaryOperator extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceCallWithBinaryOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("divSanityTest.kt") public void testDivSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/divSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/divSanityTest.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equals.kt"); } @TestMetadata("equalsCompareTo.kt") public void testEqualsCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equalsCompareTo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equalsCompareTo.kt"); } @TestMetadata("equalsExtensionFunction.kt") public void testEqualsExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equalsExtensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/equalsExtensionFunction.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/extensionFunction.kt"); } @TestMetadata("functionLiteralArgument.kt") public void testFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/functionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/functionLiteralArgument.kt"); } @TestMetadata("greater.kt") public void testGreater() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/greater.kt"); } @TestMetadata("lessEquals.kt") public void testLessEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/lessEquals.kt"); } @TestMetadata("minusSanityTest.kt") public void testMinusSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/minusSanityTest.kt"); } @TestMetadata("missingDefaultArgument.kt") public void testMissingDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/missingDefaultArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/missingDefaultArgument.kt"); } @TestMetadata("modSanityTest.kt") public void testModSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt"); } @TestMetadata("multipleArguments.kt") public void testMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/multipleArguments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/multipleArguments.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEquals.kt"); } @TestMetadata("notEqualsBrackets.kt") public void testNotEqualsBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBrackets.kt"); } @TestMetadata("notEqualsBracketsComplex.kt") public void testNotEqualsBracketsComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/notEqualsBracketsComplex.kt"); } @TestMetadata("plusSanityTest.kt") public void testPlusSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/plusSanityTest.kt"); } @TestMetadata("qualifier.kt") public void testQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/qualifier.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/qualifier.kt"); } @TestMetadata("rangeToSanityTest.kt") public void testRangeToSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/rangeToSanityTest.kt"); } @TestMetadata("remSanityTest.kt") public void testRemSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt"); } @TestMetadata("safeCompareTo.kt") public void testSafeCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/safeCompareTo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/safeCompareTo.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/super.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/super.kt"); } @TestMetadata("timesSanityTest.kt") public void testTimesSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/timesSanityTest.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/typeArguments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/typeArguments.kt"); } @TestMetadata("unacceptableVararg1.kt") public void testUnacceptableVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/unacceptableVararg1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/unacceptableVararg1.kt"); } @TestMetadata("unacceptableVararg2.kt") public void testUnacceptableVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/unacceptableVararg2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/unacceptableVararg2.kt"); } @TestMetadata("validNamedArgument.kt") public void testValidNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/validNamedArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceCallWithBinaryOperator/validNamedArgument.kt"); } } @@ -1069,10 +984,13 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceGetOrSet extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("acceptableVararg.kt") public void testAcceptableVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/acceptableVararg.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/acceptableVararg.kt"); } public void testAllFilesPresentInReplaceGetOrSet() throws Exception { @@ -1081,134 +999,125 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestMetadata("argumentAndFunction.kt") public void testArgumentAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/argumentAndFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/argumentAndFunction.kt"); } @TestMetadata("duplicateArguments.kt") public void testDuplicateArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/duplicateArguments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/duplicateArguments.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/extensionFunction.kt"); } @TestMetadata("functionalArgument.kt") public void testFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/functionalArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/functionalArgument.kt"); } @TestMetadata("invalidArgument.kt") public void testInvalidArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/invalidArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/invalidArgument.kt"); } @TestMetadata("missingDefaultArgument.kt") public void testMissingDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/missingDefaultArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/missingDefaultArgument.kt"); } @TestMetadata("multiArgument.kt") public void testMultiArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/multiArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/multiArgument.kt"); } @TestMetadata("noArgument.kt") public void testNoArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/noArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/noArgument.kt"); } @TestMetadata("notOperator.kt") public void testNotOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/notOperator.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/notOperator.kt"); } @TestMetadata("qualifier.kt") public void testQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/qualifier.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/qualifier.kt"); } @TestMetadata("sanityCheck.kt") public void testSanityCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/sanityCheck.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/sanityCheck.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/set.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/set.kt"); } @TestMetadata("set2.kt") public void testSet2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/set2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/set2.kt"); } @TestMetadata("setValueUsed.kt") public void testSetValueUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setValueUsed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setValueUsed.kt"); } @TestMetadata("setWithNoParameters.kt") public void testSetWithNoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setWithNoParameters.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setWithNoParameters.kt"); } @TestMetadata("setWithVararg.kt") public void testSetWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setWithVararg.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/setWithVararg.kt"); } @TestMetadata("singleArgument.kt") public void testSingleArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/singleArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/singleArgument.kt"); } @TestMetadata("staticMethod.kt") public void testStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/staticMethod.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/staticMethod.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/super.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/super.kt"); } @TestMetadata("topLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/topLevelFun.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/topLevelFun.kt"); } @TestMetadata("unacceptableVararg.kt") public void testUnacceptableVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/unacceptableVararg.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/unacceptableVararg.kt"); } @TestMetadata("unnamedAndNamed.kt") public void testUnnamedAndNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/unnamedAndNamed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/unnamedAndNamed.kt"); + } + + @TestMetadata("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/conventionNameCalls/replaceGetOrSet/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } } @@ -1217,20 +1126,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertPairConstructorToToFunction extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertPairConstructorToToFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/convertPairConstructorToToFunction"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("invalidArgs.kt") public void testInvalidArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertPairConstructorToToFunction/invalidArgs.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertPairConstructorToToFunction/invalidArgs.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertPairConstructorToToFunction/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertPairConstructorToToFunction/simple.kt"); } } @@ -1238,56 +1149,52 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertSealedSubClassToObject extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertSealedSubClassToObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/convertSealedSubClassToObject"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("convertSubClassWithModifiers.kt") public void testConvertSubClassWithModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithModifiers.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithModifiers.kt"); } @TestMetadata("convertSubClassWithParentheses.kt") public void testConvertSubClassWithParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithParentheses.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithParentheses.kt"); } @TestMetadata("convertSubClassWithoutParentheses.kt") public void testConvertSubClassWithoutParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithoutParentheses.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/convertSubClassWithoutParentheses.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/generic.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/generic.kt"); } @TestMetadata("nonEmptyConstructor.kt") public void testNonEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/nonEmptyConstructor.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/nonEmptyConstructor.kt"); } @TestMetadata("openSubclass.kt") public void testOpenSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/openSubclass.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/openSubclass.kt"); } @TestMetadata("withCompanion.kt") public void testWithCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/withCompanion.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/withCompanion.kt"); } @TestMetadata("withInner.kt") public void testWithInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/convertSealedSubClassToObject/withInner.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/convertSealedSubClassToObject/withInner.kt"); } } @@ -1295,26 +1202,27 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CopyWithoutNamedArguments extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCopyWithoutNamedArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/copyWithoutNamedArguments"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/copyWithoutNamedArguments/base.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/copyWithoutNamedArguments/base.kt"); } @TestMetadata("notAllNamed.kt") public void testNotAllNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/copyWithoutNamedArguments/notAllNamed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/copyWithoutNamedArguments/notAllNamed.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/copyWithoutNamedArguments/this.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/copyWithoutNamedArguments/this.kt"); } } @@ -1322,152 +1230,145 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedCallableAddReplaceWith extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecatedCallableAddReplaceWith() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AlreadyWithReplaceWith.kt") public void testAlreadyWithReplaceWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/AlreadyWithReplaceWith.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/AlreadyWithReplaceWith.kt"); } @TestMetadata("CommentInBody.kt") public void testCommentInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/CommentInBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/CommentInBody.kt"); } @TestMetadata("DeclarationInside.kt") public void testDeclarationInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeclarationInside.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeclarationInside.kt"); } @TestMetadata("DeprecationLevelHidden.kt") public void testDeprecationLevelHidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/DeprecationLevelHidden.kt"); } @TestMetadata("destructuringWithLambdaInScript.kts") public void testDestructuringWithLambdaInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/destructuringWithLambdaInScript.kts"); } @TestMetadata("ExceptionInPropertyDestructuringEntry.kt") public void testExceptionInPropertyDestructuringEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExceptionInPropertyDestructuringEntry.kt"); } @TestMetadata("ExpressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ExpressionBody.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/If.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/If.kt"); } @TestMetadata("Imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Imports.kt"); } @TestMetadata("justLambdaInScript.kts") public void testJustLambdaInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/justLambdaInScript.kts"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/justLambdaInScript.kts"); } @TestMetadata("NoCompanionObjectImport.kt") public void testNoCompanionObjectImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoCompanionObjectImport.kt"); } @TestMetadata("NoDefaultImport.kt") public void testNoDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoDefaultImport.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoDefaultImport.kt"); } @TestMetadata("NoReturn.kt") public void testNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NoReturn.kt"); } @TestMetadata("NotAvailableOnDocComment.kt") public void testNotAvailableOnDocComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/NotAvailableOnDocComment.kt"); } @TestMetadata("PrivateSymbolUsed.kt") public void testPrivateSymbolUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/PrivateSymbolUsed.kt"); } @TestMetadata("QualifiedCall.kt") public void testQualifiedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/QualifiedCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/QualifiedCall.kt"); } @TestMetadata("Return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Return.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Return.kt"); } @TestMetadata("ReturnInside.kt") public void testReturnInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ReturnInside.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ReturnInside.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/Simple.kt"); } @TestMetadata("StringLiteral.kt") public void testStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringLiteral.kt"); } @TestMetadata("StringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/StringTemplate.kt"); } @TestMetadata("TwoStatements.kt") public void testTwoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/TwoStatements.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/TwoStatements.kt"); } @TestMetadata("ValProperty.kt") public void testValProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValProperty.kt"); } @TestMetadata("ValPropertyWithReturn.kt") public void testValPropertyWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/ValPropertyWithReturn.kt"); + } + + @TestMetadata("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/deprecatedCallableAddReplaceWith/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -1475,32 +1376,32 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DoubleNegation extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDoubleNegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/doubleNegation"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/doubleNegation/function.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/doubleNegation/function.kt"); } @TestMetadata("invalid.kt") public void testInvalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/doubleNegation/invalid.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/doubleNegation/invalid.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/doubleNegation/parenthesized.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/doubleNegation/parenthesized.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/doubleNegation/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/doubleNegation/simple.kt"); } } @@ -1508,14 +1409,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EmptyRange extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEmptyRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/emptyRange"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/emptyRange/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/emptyRange/simple.kt"); } } @@ -1523,104 +1427,92 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitThis extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExplicitThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/explicitThis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("differentReceiverInstance.kt") public void testDifferentReceiverInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/differentReceiverInstance.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/differentReceiverInstance.kt"); } @TestMetadata("differentReceiverInstanceExtension.kt") public void testDifferentReceiverInstanceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/differentReceiverInstanceExtension.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/differentReceiverInstanceExtension.kt"); } @TestMetadata("differentReceiverType.kt") public void testDifferentReceiverType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/differentReceiverType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/differentReceiverType.kt"); } @TestMetadata("differentReceiverTypeExtension.kt") public void testDifferentReceiverTypeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/differentReceiverTypeExtension.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/differentReceiverTypeExtension.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/extension.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/extension.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/function.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/function.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/functionReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/functionReference.kt"); } @TestMetadata("multipleReceivers.kt") public void testMultipleReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/multipleReceivers.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/multipleReceivers.kt"); } @TestMetadata("multipleReceiversExtension.kt") public void testMultipleReceiversExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/multipleReceiversExtension.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/multipleReceiversExtension.kt"); } @TestMetadata("nestedReceivers.kt") public void testNestedReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/nestedReceivers.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/nestedReceivers.kt"); } @TestMetadata("nestedReceiversDifferentParameters.kt") public void testNestedReceiversDifferentParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/nestedReceiversDifferentParameters.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/nestedReceiversDifferentParameters.kt"); } @TestMetadata("nestedReceiversExtension.kt") public void testNestedReceiversExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/nestedReceiversExtension.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/nestedReceiversExtension.kt"); } @TestMetadata("nestedReceiversExtensionDifferentParameters.kt") public void testNestedReceiversExtensionDifferentParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/nestedReceiversExtensionDifferentParameters.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/nestedReceiversExtensionDifferentParameters.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/property.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/property.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/propertyReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/propertyReference.kt"); } @TestMetadata("variableWithSameName.kt") public void testVariableWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/explicitThis/variableWithSameName.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/explicitThis/variableWithSameName.kt"); } } @@ -1628,38 +1520,37 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplicitNullableNothingType extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplicitNullableNothingType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/ImplicitNullableNothingType"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("final.kt") public void testFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/ImplicitNullableNothingType/final.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/ImplicitNullableNothingType/final.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/ImplicitNullableNothingType/function.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/ImplicitNullableNothingType/function.kt"); } @TestMetadata("top.kt") public void testTop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/ImplicitNullableNothingType/top.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/ImplicitNullableNothingType/top.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/ImplicitNullableNothingType/val.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/ImplicitNullableNothingType/val.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/ImplicitNullableNothingType/variable.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/ImplicitNullableNothingType/variable.kt"); } } @@ -1667,80 +1558,72 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplicitThis extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplicitThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/implicitThis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("already.kt") public void testAlready() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/already.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/already.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/function.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/function.kt"); } @TestMetadata("functionPartOfCall.kt") public void testFunctionPartOfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/functionPartOfCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/functionPartOfCall.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/functionReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/functionReference.kt"); } @TestMetadata("functionWithReceiver.kt") public void testFunctionWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/functionWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/functionWithReceiver.kt"); } @TestMetadata("multipleReceivers.kt") public void testMultipleReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/multipleReceivers.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/multipleReceivers.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/nested.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/nested.kt"); } @TestMetadata("nestedCall.kt") public void testNestedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/nestedCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/nestedCall.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/property.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/property.kt"); } @TestMetadata("propertyPartOfCall.kt") public void testPropertyPartOfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/propertyPartOfCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/propertyPartOfCall.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/propertyReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/propertyReference.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/implicitThis/topLevel.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/implicitThis/topLevel.kt"); } } @@ -1748,74 +1631,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaCollectionsStaticMethod extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaCollectionsStaticMethod() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/javaCollectionsStaticMethod"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("fill.kt") public void testFill() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/fill.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/fill.kt"); } @TestMetadata("reverse.kt") public void testReverse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/reverse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/reverse.kt"); } @TestMetadata("reverseImmutableList.kt") public void testReverseImmutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/reverseImmutableList.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/reverseImmutableList.kt"); } @TestMetadata("shuffle.kt") public void testShuffle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/shuffle.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/shuffle.kt"); } @TestMetadata("shuffleRandom.kt") public void testShuffleRandom() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/shuffleRandom.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/shuffleRandom.kt"); } @TestMetadata("sort.kt") public void testSort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sort.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sort.kt"); } @TestMetadata("sortArrayList.kt") public void testSortArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortArrayList.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortArrayList.kt"); } @TestMetadata("sortImmutableList.kt") public void testSortImmutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortImmutableList.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortImmutableList.kt"); } @TestMetadata("sortLinkedList.kt") public void testSortLinkedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortLinkedList.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortLinkedList.kt"); } @TestMetadata("sortVector.kt") public void testSortVector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortVector.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortVector.kt"); } @TestMetadata("sortWith.kt") public void testSortWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortWith.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/javaCollectionsStaticMethod/sortWith.kt"); } } @@ -1823,26 +1699,27 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KdocMissingDocumentation extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKdocMissingDocumentation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/kdocMissingDocumentation"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("primaryConstructorProperty.kt") public void testPrimaryConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/kdocMissingDocumentation/primaryConstructorProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/kdocMissingDocumentation/primaryConstructorProperty.kt"); } @TestMetadata("primaryConstructorPropertyAsParam.kt") public void testPrimaryConstructorPropertyAsParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/kdocMissingDocumentation/primaryConstructorPropertyAsParam.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/kdocMissingDocumentation/primaryConstructorPropertyAsParam.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/kdocMissingDocumentation/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/kdocMissingDocumentation/simple.kt"); } } @@ -1850,14 +1727,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LeakingThis extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLeakingThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/leakingThis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("noOpenForInterface.kt") public void testNoOpenForInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/leakingThis/noOpenForInterface.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/leakingThis/noOpenForInterface.kt"); } } @@ -1865,6 +1745,10 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiftOut extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLiftOut() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -1873,98 +1757,87 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfToAssignment extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfToAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut/ifToAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("cascadeIf.kt") public void testCascadeIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/cascadeIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/cascadeIf.kt"); } @TestMetadata("elseIfOnly.kt") public void testElseIfOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/elseIfOnly.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/elseIfOnly.kt"); } @TestMetadata("ifElseIf.kt") public void testIfElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/ifElseIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/ifElseIf.kt"); } @TestMetadata("ifElseIfElse.kt") public void testIfElseIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/ifElseIfElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/ifElseIfElse.kt"); } @TestMetadata("ifElseifElseInconsistent.kt") public void testIfElseifElseInconsistent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/ifElseifElseInconsistent.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/ifElseifElseInconsistent.kt"); } @TestMetadata("innerIfTransformed.kt") public void testInnerIfTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/innerIfTransformed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/innerIfTransformed.kt"); } @TestMetadata("multipleAssignments.kt") public void testMultipleAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/multipleAssignments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/multipleAssignments.kt"); } @TestMetadata("simpleIf.kt") public void testSimpleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIf.kt"); } @TestMetadata("simpleIfWithAugmentedAssignment.kt") public void testSimpleIfWithAugmentedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithAugmentedAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithAugmentedAssignment.kt"); } @TestMetadata("simpleIfWithBlocks.kt") public void testSimpleIfWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithBlocks.kt"); } @TestMetadata("simpleIfWithShadowedVar.kt") public void testSimpleIfWithShadowedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithShadowedVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithShadowedVar.kt"); } @TestMetadata("simpleIfWithUnmatchedAssignmentOps.kt") public void testSimpleIfWithUnmatchedAssignmentOps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithUnmatchedAssignmentOps.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithUnmatchedAssignmentOps.kt"); } @TestMetadata("simpleIfWithUnmatchedAssignments.kt") public void testSimpleIfWithUnmatchedAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithUnmatchedAssignments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithUnmatchedAssignments.kt"); } @TestMetadata("simpleIfWithoutElse.kt") public void testSimpleIfWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithoutElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithoutElse.kt"); } @TestMetadata("simpleIfWithoutTerminatingAssignment.kt") public void testSimpleIfWithoutTerminatingAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithoutTerminatingAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/simpleIfWithoutTerminatingAssignment.kt"); } } @@ -1972,56 +1845,52 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfToReturn extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfToReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut/ifToReturn"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("cascadeIf.kt") public void testCascadeIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/cascadeIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/cascadeIf.kt"); } @TestMetadata("ifElseIf.kt") public void testIfElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifElseIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifElseIf.kt"); } @TestMetadata("ifElseIfElse.kt") public void testIfElseIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifElseIfElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifElseIfElse.kt"); } @TestMetadata("ifElseIfElseInconsistent.kt") public void testIfElseIfElseInconsistent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifElseIfElseInconsistent.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifElseIfElseInconsistent.kt"); } @TestMetadata("ifVeryLong.kt") public void testIfVeryLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifVeryLong.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/ifVeryLong.kt"); } @TestMetadata("innerIfTransformed.kt") public void testInnerIfTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/innerIfTransformed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/innerIfTransformed.kt"); } @TestMetadata("simpleIf.kt") public void testSimpleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/simpleIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/simpleIf.kt"); } @TestMetadata("simpleIfWithBlocks.kt") public void testSimpleIfWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/ifToReturn/simpleIfWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/ifToReturn/simpleIfWithBlocks.kt"); } } @@ -2029,74 +1898,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryToAssignment extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryToAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut/tryToAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/basic.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/basic.kt"); } @TestMetadata("block.kt") public void testBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/block.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/block.kt"); } @TestMetadata("cascade.kt") public void testCascade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/cascade.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/cascade.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finally.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finally.kt"); } @TestMetadata("finallyWithAssignment.kt") public void testFinallyWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithAssignment.kt"); } @TestMetadata("finallyWithCascadeAssignment.kt") public void testFinallyWithCascadeAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithCascadeAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithCascadeAssignment.kt"); } @TestMetadata("finallyWithCascadeUnmatchedAssignment.kt") public void testFinallyWithCascadeUnmatchedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithCascadeUnmatchedAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithCascadeUnmatchedAssignment.kt"); } @TestMetadata("finallyWithUnmatchedAssignments.kt") public void testFinallyWithUnmatchedAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithUnmatchedAssignments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/finallyWithUnmatchedAssignments.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/inner.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/inner.kt"); } @TestMetadata("withUnmatchedAssignments.kt") public void testWithUnmatchedAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/withUnmatchedAssignments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/withUnmatchedAssignments.kt"); } @TestMetadata("withoutTerminatingAssignment.kt") public void testWithoutTerminatingAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToAssignment/withoutTerminatingAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToAssignment/withoutTerminatingAssignment.kt"); } } @@ -2104,56 +1966,52 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryToReturn extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryToReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut/tryToReturn"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/basic.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/basic.kt"); } @TestMetadata("block.kt") public void testBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/block.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/block.kt"); } @TestMetadata("cascade.kt") public void testCascade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/cascade.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/cascade.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/finally.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/finally.kt"); } @TestMetadata("finallyWithCascadeReturn.kt") public void testFinallyWithCascadeReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/finallyWithCascadeReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/finallyWithCascadeReturn.kt"); } @TestMetadata("finallyWithReturn.kt") public void testFinallyWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/finallyWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/finallyWithReturn.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/inner.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/inner.kt"); } @TestMetadata("withoutReturn.kt") public void testWithoutReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/tryToReturn/withoutReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/tryToReturn/withoutReturn.kt"); } } @@ -2161,74 +2019,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenToAssignment extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhenToAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut/whenToAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("cascadeWhen.kt") public void testCascadeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/cascadeWhen.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/cascadeWhen.kt"); } @TestMetadata("innerWhenTransformed.kt") public void testInnerWhenTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/innerWhenTransformed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/innerWhenTransformed.kt"); } @TestMetadata("insideLoop.kt") public void testInsideLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/insideLoop.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/insideLoop.kt"); } @TestMetadata("simpleWhen.kt") public void testSimpleWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhen.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhen.kt"); } @TestMetadata("simpleWhenWithBlocks.kt") public void testSimpleWhenWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithBlocks.kt"); } @TestMetadata("simpleWhenWithShadowedVar.kt") public void testSimpleWhenWithShadowedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithShadowedVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithShadowedVar.kt"); } @TestMetadata("simpleWhenWithUnmatchedAssignments.kt") public void testSimpleWhenWithUnmatchedAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithUnmatchedAssignments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithUnmatchedAssignments.kt"); } @TestMetadata("simpleWhenWithoutTerminatingAssignment.kt") public void testSimpleWhenWithoutTerminatingAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithoutTerminatingAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/simpleWhenWithoutTerminatingAssignment.kt"); } @TestMetadata("whenHasMissingCase.kt") public void testWhenHasMissingCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/whenHasMissingCase.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/whenHasMissingCase.kt"); } @TestMetadata("whenHasNoMissingCase.kt") public void testWhenHasNoMissingCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/whenHasNoMissingCase.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/whenHasNoMissingCase.kt"); } @TestMetadata("whenHasNoMissingCaseWithElse.kt") public void testWhenHasNoMissingCaseWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToAssignment/whenHasNoMissingCaseWithElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToAssignment/whenHasNoMissingCaseWithElse.kt"); } } @@ -2236,86 +2087,77 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenToReturn extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhenToReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/liftOut/whenToReturn"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("cascadeWhen.kt") public void testCascadeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/cascadeWhen.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/cascadeWhen.kt"); } @TestMetadata("innerWhenTransformed.kt") public void testInnerWhenTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/innerWhenTransformed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/innerWhenTransformed.kt"); } @TestMetadata("insideLoop.kt") public void testInsideLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/insideLoop.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/insideLoop.kt"); } @TestMetadata("localReturns.kt") public void testLocalReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/localReturns.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/localReturns.kt"); } @TestMetadata("otherReturns.kt") public void testOtherReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/otherReturns.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/otherReturns.kt"); } @TestMetadata("simpleWhen.kt") public void testSimpleWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/simpleWhen.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/simpleWhen.kt"); } @TestMetadata("simpleWhenWithBlocks.kt") public void testSimpleWhenWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/simpleWhenWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/simpleWhenWithBlocks.kt"); } @TestMetadata("whenHasMissingCase.kt") public void testWhenHasMissingCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenHasMissingCase.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenHasMissingCase.kt"); } @TestMetadata("whenHasNoMissingCase.kt") public void testWhenHasNoMissingCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenHasNoMissingCase.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenHasNoMissingCase.kt"); } @TestMetadata("whenHasNoMissingCaseWithElse.kt") public void testWhenHasNoMissingCaseWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenHasNoMissingCaseWithElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenHasNoMissingCaseWithElse.kt"); } @TestMetadata("whenOneReturn.kt") public void testWhenOneReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenOneReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenOneReturn.kt"); } @TestMetadata("whenThrowOnly.kt") public void testWhenThrowOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenThrowOnly.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenThrowOnly.kt"); } @TestMetadata("whenWithLambda.kt") public void testWhenWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/liftOut/whenToReturn/whenWithLambda.kt"); } } } @@ -2363,146 +2205,127 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MayBeConstant extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMayBeConstant() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/mayBeConstant"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/array.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/array.kt"); } @TestMetadata("cascadeConst.kt") public void testCascadeConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/cascadeConst.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/cascadeConst.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/companion.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/companion.kt"); } @TestMetadata("const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/const.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/const.kt"); } @TestMetadata("constInExpr.kt") public void testConstInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/constInExpr.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/constInExpr.kt"); } @TestMetadata("ecplicitType.kt") public void testEcplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType.kt"); } @TestMetadata("ecplicitType2.kt") public void testEcplicitType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType2.kt"); } @TestMetadata("ecplicitType3.kt") public void testEcplicitType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType3.kt"); } @TestMetadata("ecplicitType4.kt") public void testEcplicitType4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType4.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType4.kt"); } @TestMetadata("ecplicitType5.kt") public void testEcplicitType5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType5.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/ecplicitType5.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/enum.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/enum.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/getter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/getter.kt"); } @TestMetadata("getterWithInitializer.kt") public void testGetterWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/getterWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/getterWithInitializer.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/inClass.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/inClass.kt"); } @TestMetadata("nonConstInExpr.kt") public void testNonConstInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/nonConstInExpr.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/nonConstInExpr.kt"); } @TestMetadata("nonJvmFieldAnnotated.kt") public void testNonJvmFieldAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/nonJvmFieldAnnotated.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/nonJvmFieldAnnotated.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/null.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/null.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/object.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/object.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/override.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/override.kt"); } @TestMetadata("script.kts") public void testScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/script.kts"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/script.kts"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/simple.kt"); } @TestMetadata("simplest.kt") public void testSimplest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/simplest.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/simplest.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/mayBeConstant/var.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/mayBeConstant/var.kt"); } } @@ -2510,26 +2333,27 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberVisibilityCanBePrivate extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberVisibilityCanBePrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate/annotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate/annotation.kt"); } @TestMetadata("JvmFieldOnParameter.kt") public void testJvmFieldOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate/JvmFieldOnParameter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate/JvmFieldOnParameter.kt"); } @TestMetadata("JvmFieldOnProperty.kt") public void testJvmFieldOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate/JvmFieldOnProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/memberVisibilityCanBePrivate/JvmFieldOnProperty.kt"); } } @@ -2537,26 +2361,27 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MigrateDiagnosticSuppression extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigrateDiagnosticSuppression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/migrateDiagnosticSuppression"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/migrateDiagnosticSuppression/base.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/migrateDiagnosticSuppression/base.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/migrateDiagnosticSuppression/multiple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/migrateDiagnosticSuppression/multiple.kt"); } @TestMetadata("new.kt") public void testNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/migrateDiagnosticSuppression/new.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/migrateDiagnosticSuppression/new.kt"); } } @@ -2564,116 +2389,102 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveLambdaOutsideParentheses extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveLambdaOutsideParentheses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ambigousOverload.kt") public void testAmbigousOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/ambigousOverload.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/ambigousOverload.kt"); } @TestMetadata("functionalValueCall.kt") public void testFunctionalValueCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/functionalValueCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/functionalValueCall.kt"); } @TestMetadata("inapplicable1.kt") public void testInapplicable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicable1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicable1.kt"); } @TestMetadata("inapplicable2.kt") public void testInapplicable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicable2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicable2.kt"); } @TestMetadata("inapplicable3.kt") public void testInapplicable3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicable3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicable3.kt"); } @TestMetadata("inapplicableAlreadyHasFunctionLiteral.kt") public void testInapplicableAlreadyHasFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicableAlreadyHasFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicableAlreadyHasFunctionLiteral.kt"); } @TestMetadata("inapplicableOptionalParametersAfter.kt") public void testInapplicableOptionalParametersAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicableOptionalParametersAfter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/inapplicableOptionalParametersAfter.kt"); } @TestMetadata("labeledLambda.kt") public void testLabeledLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/labeledLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/labeledLambda.kt"); } @TestMetadata("lambdaWithCommas.kt") public void testLambdaWithCommas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/lambdaWithCommas.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/lambdaWithCommas.kt"); } @TestMetadata("lambdaWithCommas2.kt") public void testLambdaWithCommas2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/lambdaWithCommas2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/lambdaWithCommas2.kt"); } @TestMetadata("lambdaWithCommas3.kt") public void testLambdaWithCommas3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/lambdaWithCommas3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/lambdaWithCommas3.kt"); } @TestMetadata("moveLambda1.kt") public void testMoveLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda1.kt"); } @TestMetadata("moveLambda2.kt") public void testMoveLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda2.kt"); } @TestMetadata("moveLambda3.kt") public void testMoveLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda3.kt"); } @TestMetadata("moveLambda4.kt") public void testMoveLambda4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda4.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda4.kt"); } @TestMetadata("moveLambda5.kt") public void testMoveLambda5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda5.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda5.kt"); } @TestMetadata("moveLambda6.kt") public void testMoveLambda6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda6.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/moveLambda6.kt"); } @TestMetadata("noTwoConsequentLambdas.kt") public void testNoTwoConsequentLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/noTwoConsequentLambdas.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveLambdaOutsideParentheses/noTwoConsequentLambdas.kt"); } } @@ -2681,92 +2492,82 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveSuspiciousCallableReferenceIntoParentheses extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveSuspiciousCallableReferenceIntoParentheses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("defaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/defaultParameter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/defaultParameter.kt"); } @TestMetadata("expectedFunction.kt") public void testExpectedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/expectedFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/expectedFunction.kt"); } @TestMetadata("explicitThisReceiver.kt") public void testExplicitThisReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/explicitThisReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/explicitThisReceiver.kt"); } @TestMetadata("implicitThisReceiver.kt") public void testImplicitThisReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/implicitThisReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/implicitThisReceiver.kt"); } @TestMetadata("it.kt") public void testIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/it.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/it.kt"); } @TestMetadata("lambdaWithArg.kt") public void testLambdaWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/lambdaWithArg.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/lambdaWithArg.kt"); } @TestMetadata("multipleLines.kt") public void testMultipleLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/multipleLines.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/multipleLines.kt"); } @TestMetadata("noBody.kt") public void testNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/noBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/noBody.kt"); } @TestMetadata("noneCallableRef.kt") public void testNoneCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/noneCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/noneCallableRef.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/normal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/normal.kt"); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/parameter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/parameter.kt"); } @TestMetadata("parameter2.kt") public void testParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/parameter2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/parameter2.kt"); } @TestMetadata("parameterOuter.kt") public void testParameterOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/parameterOuter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/parameterOuter.kt"); } @TestMetadata("variableReceiver.kt") public void testVariableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/variableReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/variableReceiver.kt"); } } @@ -2774,56 +2575,52 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullChecksToSafeCall extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullChecksToSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/nullChecksToSafeCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("andCase.kt") public void testAndCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/andCase.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/andCase.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/function.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/function.kt"); } @TestMetadata("kotlinType.kt") public void testKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/kotlinType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/kotlinType.kt"); } @TestMetadata("longRightExpression.kt") public void testLongRightExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/longRightExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/longRightExpression.kt"); } @TestMetadata("orCase.kt") public void testOrCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/orCase.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/orCase.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/safeCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/safeCall.kt"); } @TestMetadata("unstableChain.kt") public void testUnstableChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/unstableChain.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/unstableChain.kt"); } @TestMetadata("unstableExtensionInChain.kt") public void testUnstableExtensionInChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullChecksToSafeCall/unstableExtensionInChain.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullChecksToSafeCall/unstableExtensionInChain.kt"); } } @@ -2831,38 +2628,37 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableBooleanElvis extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullableBooleanElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/nullableBooleanElvis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inIf.kt") public void testInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullableBooleanElvis/inIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullableBooleanElvis/inIf.kt"); } @TestMetadata("inIf2.kt") public void testInIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullableBooleanElvis/inIf2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullableBooleanElvis/inIf2.kt"); } @TestMetadata("inIf3.kt") public void testInIf3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullableBooleanElvis/inIf3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullableBooleanElvis/inIf3.kt"); } @TestMetadata("notInIf.kt") public void testNotInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullableBooleanElvis/notInIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullableBooleanElvis/notInIf.kt"); } @TestMetadata("notInIfWithTrue.kt") public void testNotInIfWithTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/nullableBooleanElvis/notInIfWithTrue.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/nullableBooleanElvis/notInIfWithTrue.kt"); } } @@ -2870,68 +2666,62 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RecursiveEqualsCall extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRecursiveEqualsCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/recursiveEqualsCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursive.kt"); } @TestMetadata("recursiveDirect.kt") public void testRecursiveDirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveDirect.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveDirect.kt"); } @TestMetadata("recursiveDirectFake.kt") public void testRecursiveDirectFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveDirectFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveDirectFake.kt"); } @TestMetadata("recursiveDirectSafe.kt") public void testRecursiveDirectSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveDirectSafe.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveDirectSafe.kt"); } @TestMetadata("recursiveFake.kt") public void testRecursiveFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveFake.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveFake.kt"); } @TestMetadata("recursiveFakeNested.kt") public void testRecursiveFakeNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveFakeNested.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveFakeNested.kt"); } @TestMetadata("recursiveFakeNoOther.kt") public void testRecursiveFakeNoOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveFakeNoOther.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveFakeNoOther.kt"); } @TestMetadata("recursiveImplicit.kt") public void testRecursiveImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveImplicit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveImplicit.kt"); } @TestMetadata("recursiveNested.kt") public void testRecursiveNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveNested.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveNested.kt"); } @TestMetadata("recursiveNot.kt") public void testRecursiveNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveNot.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/recursiveEqualsCall/recursiveNot.kt"); } } @@ -2939,74 +2729,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantCompanionReference extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantCompanionReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantCompanionReference"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/basic.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/basic.kt"); } @TestMetadata("companionDoubleNested.kt") public void testCompanionDoubleNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/companionDoubleNested.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/companionDoubleNested.kt"); } @TestMetadata("companionNested.kt") public void testCompanionNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/companionNested.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/companionNested.kt"); } @TestMetadata("companionNestedObject.kt") public void testCompanionNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/companionNestedObject.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/companionNestedObject.kt"); } @TestMetadata("directCompanion.kt") public void testDirectCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/directCompanion.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/directCompanion.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/functionReference.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/functionReference.kt"); } @TestMetadata("import.kt") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/import.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/import.kt"); } @TestMetadata("methodArgument.kt") public void testMethodArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/methodArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/methodArgument.kt"); } @TestMetadata("named.kt") public void testNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/named.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/named.kt"); } @TestMetadata("notCompanion.kt") public void testNotCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/notCompanion.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/notCompanion.kt"); } @TestMetadata("onlyCompanion.kt") public void testOnlyCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantCompanionReference/onlyCompanion.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantCompanionReference/onlyCompanion.kt"); } } @@ -3014,98 +2797,87 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantExplicitType extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantExplicitType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantExplicitType"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/boolean.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/boolean.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/char.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/char.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/constructor.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/constructor.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/double.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/float.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/float.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/int.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/int.kt"); } @TestMetadata("intExpr.kt") public void testIntExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/intExpr.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/intExpr.kt"); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/interface.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/interface.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/long.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/long.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/member.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/member.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/null.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/null.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/object.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/object.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/short.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/short.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/string.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/string.kt"); } @TestMetadata("top.kt") public void testTop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantExplicitType/top.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantExplicitType/top.kt"); } } @@ -3113,62 +2885,57 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantGetter extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantGetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantGetter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/annotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/annotation.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/default.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/default.kt"); } @TestMetadata("fieldExpression.kt") public void testFieldExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/fieldExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/fieldExpression.kt"); } @TestMetadata("hasType.kt") public void testHasType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/hasType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/hasType.kt"); } @TestMetadata("hasTypeWithPropertyExplicitType.kt") public void testHasTypeWithPropertyExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/hasTypeWithPropertyExplicitType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/hasTypeWithPropertyExplicitType.kt"); } @TestMetadata("hasTypeWithPropertyInitializer.kt") public void testHasTypeWithPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/hasTypeWithPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/hasTypeWithPropertyInitializer.kt"); } @TestMetadata("notFieldExpression.kt") public void testNotFieldExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/notFieldExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/notFieldExpression.kt"); } @TestMetadata("notOnlyReturnFieldBody.kt") public void testNotOnlyReturnFieldBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/notOnlyReturnFieldBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/notOnlyReturnFieldBody.kt"); } @TestMetadata("onlyReturnFieldBody.kt") public void testOnlyReturnFieldBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantGetter/onlyReturnFieldBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantGetter/onlyReturnFieldBody.kt"); } } @@ -3176,20 +2943,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantLambdaArrow extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantLambdaArrow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantLambdaArrow"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("hasArguments.kt") public void testHasArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantLambdaArrow/hasArguments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantLambdaArrow/hasArguments.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantLambdaArrow/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantLambdaArrow/simple.kt"); } } @@ -3197,44 +2966,42 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantObjectTypeCheck extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantObjectTypeCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantObjectTypeCheck"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("isClass.kt") public void testIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isClass.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isClass.kt"); } @TestMetadata("isClassWhenEntry.kt") public void testIsClassWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isClassWhenEntry.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isClassWhenEntry.kt"); } @TestMetadata("isNotObject.kt") public void testIsNotObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isNotObject.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isNotObject.kt"); } @TestMetadata("isNotObjectWhenEntry.kt") public void testIsNotObjectWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isNotObjectWhenEntry.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isNotObjectWhenEntry.kt"); } @TestMetadata("isObject.kt") public void testIsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isObject.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isObject.kt"); } @TestMetadata("isObjectWhenEntry.kt") public void testIsObjectWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isObjectWhenEntry.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantObjectTypeCheck/isObjectWhenEntry.kt"); } } @@ -3242,98 +3009,87 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantOverride extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantOverride"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotated.kt") public void testAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/annotated.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/annotated.kt"); } @TestMetadata("arguments.kt") public void testArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/arguments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/arguments.kt"); } @TestMetadata("argumentsReplaced.kt") public void testArgumentsReplaced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/argumentsReplaced.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/argumentsReplaced.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/basic.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/basic.kt"); } @TestMetadata("callDifferentSuperMethod.kt") public void testCallDifferentSuperMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/callDifferentSuperMethod.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/callDifferentSuperMethod.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/dataClass.kt"); } @TestMetadata("delegatedMemberHidesSuperTypeOverride.kt") public void testDelegatedMemberHidesSuperTypeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride.kt"); } @TestMetadata("delegatedMemberHidesSuperTypeOverride2.kt") public void testDelegatedMemberHidesSuperTypeOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride2.kt"); } @TestMetadata("delegatedMemberHidesSuperTypeOverride3.kt") public void testDelegatedMemberHidesSuperTypeOverride3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride3.kt"); } @TestMetadata("delegatedMemberHidesSuperTypeOverride4.kt") public void testDelegatedMemberHidesSuperTypeOverride4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride4.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/delegatedMemberHidesSuperTypeOverride4.kt"); } @TestMetadata("notCallSuper.kt") public void testNotCallSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/notCallSuper.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/notCallSuper.kt"); } @TestMetadata("overrideModifireFinal.kt") public void testOverrideModifireFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/overrideModifireFinal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/overrideModifireFinal.kt"); } @TestMetadata("overrideModifireVisibility.kt") public void testOverrideModifireVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/overrideModifireVisibility.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/overrideModifireVisibility.kt"); } @TestMetadata("singleExpressionFunction.kt") public void testSingleExpressionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/singleExpressionFunction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/singleExpressionFunction.kt"); } @TestMetadata("useGenericsSuper.kt") public void testUseGenericsSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantOverride/useGenericsSuper.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantOverride/useGenericsSuper.kt"); } } @@ -3341,68 +3097,62 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantSemicolon extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantSemicolon() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantSemicolon"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("beforeAnnotationAndLambda.kt") public void testBeforeAnnotationAndLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/beforeAnnotationAndLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/beforeAnnotationAndLambda.kt"); } @TestMetadata("beforeCommentAndLambda.kt") public void testBeforeCommentAndLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/beforeCommentAndLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/beforeCommentAndLambda.kt"); } @TestMetadata("beforeKDocAndLambda.kt") public void testBeforeKDocAndLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/beforeKDocAndLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/beforeKDocAndLambda.kt"); } @TestMetadata("companionBeforeFun.kt") public void testCompanionBeforeFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforeFun.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforeFun.kt"); } @TestMetadata("companionBeforeInit.kt") public void testCompanionBeforeInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforeInit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforeInit.kt"); } @TestMetadata("companionBeforePrivateFun.kt") public void testCompanionBeforePrivateFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforePrivateFun.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforePrivateFun.kt"); } @TestMetadata("companionBeforeVal.kt") public void testCompanionBeforeVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforeVal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionBeforeVal.kt"); } @TestMetadata("companionInLast.kt") public void testCompanionInLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionInLast.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionInLast.kt"); } @TestMetadata("companionWithBody.kt") public void testCompanionWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionWithBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionWithBody.kt"); } @TestMetadata("companionWithName.kt") public void testCompanionWithName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSemicolon/companionWithName.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSemicolon/companionWithName.kt"); } } @@ -3410,98 +3160,87 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantSetter extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantSetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantSetter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/annotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/annotation.kt"); } @TestMetadata("blankBody.kt") public void testBlankBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/blankBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/blankBody.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/default.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/default.kt"); } @TestMetadata("lowerVisibility1.kt") public void testLowerVisibility1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/lowerVisibility1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/lowerVisibility1.kt"); } @TestMetadata("lowerVisibility2.kt") public void testLowerVisibility2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/lowerVisibility2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/lowerVisibility2.kt"); } @TestMetadata("lowerVisibility3.kt") public void testLowerVisibility3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/lowerVisibility3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/lowerVisibility3.kt"); } @TestMetadata("notOnlyFieldSetBody.kt") public void testNotOnlyFieldSetBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/notOnlyFieldSetBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/notOnlyFieldSetBody.kt"); } @TestMetadata("onlyFieldSetBody.kt") public void testOnlyFieldSetBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/onlyFieldSetBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/onlyFieldSetBody.kt"); } @TestMetadata("overrideBlankBody.kt") public void testOverrideBlankBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/overrideBlankBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/overrideBlankBody.kt"); } @TestMetadata("overrideDefault.kt") public void testOverrideDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/overrideDefault.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/overrideDefault.kt"); } @TestMetadata("overrideNotOnlyFieldSetBody.kt") public void testOverrideNotOnlyFieldSetBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/overrideNotOnlyFieldSetBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/overrideNotOnlyFieldSetBody.kt"); } @TestMetadata("overrideOnlyFieldSetBody.kt") public void testOverrideOnlyFieldSetBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/overrideOnlyFieldSetBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/overrideOnlyFieldSetBody.kt"); } @TestMetadata("sameVisibility1.kt") public void testSameVisibility1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/sameVisibility1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/sameVisibility1.kt"); } @TestMetadata("sameVisibility2.kt") public void testSameVisibility2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/sameVisibility2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/sameVisibility2.kt"); } @TestMetadata("sameVisibility3.kt") public void testSameVisibility3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSetter/sameVisibility3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSetter/sameVisibility3.kt"); } } @@ -3509,32 +3248,32 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantSuspend extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantSuspend"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSuspend/coroutineContext.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSuspend/coroutineContext.kt"); } @TestMetadata("getterDelegate.kt") public void testGetterDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSuspend/getterDelegate.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSuspend/getterDelegate.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSuspend/override.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSuspend/override.kt"); } @TestMetadata("setterDelegate.kt") public void testSetterDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSuspend/setterDelegate.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantSuspend/setterDelegate.kt"); } } @@ -3542,104 +3281,92 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantUnitExpression extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantUnitExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantUnitExpression"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("atLastAfterClass.kt") public void testAtLastAfterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterClass.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterClass.kt"); } @TestMetadata("atLastAfterConstant.kt") public void testAtLastAfterConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterConstant.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterConstant.kt"); } @TestMetadata("atLastAfterFunInIf.kt") public void testAtLastAfterFunInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterFunInIf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterFunInIf.kt"); } @TestMetadata("atLastAfterFunInTry.kt") public void testAtLastAfterFunInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterFunInTry.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterFunInTry.kt"); } @TestMetadata("atLastAfterFunInWhen.kt") public void testAtLastAfterFunInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterFunInWhen.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterFunInWhen.kt"); } @TestMetadata("atLastAfterIntFunctionCall.kt") public void testAtLastAfterIntFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterIntFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterIntFunctionCall.kt"); } @TestMetadata("atLastAfterUnit.kt") public void testAtLastAfterUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterUnit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterUnit.kt"); } @TestMetadata("atLastAfterUnitFunctionCall.kt") public void testAtLastAfterUnitFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterUnitFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterUnitFunctionCall.kt"); } @TestMetadata("atLastAfterVal.kt") public void testAtLastAfterVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterVal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/atLastAfterVal.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/lambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/lambda.kt"); } @TestMetadata("notRedundant1.kt") public void testNotRedundant1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant1.kt"); } @TestMetadata("notRedundant2.kt") public void testNotRedundant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant2.kt"); } @TestMetadata("notRedundant3.kt") public void testNotRedundant3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/notRedundant3.kt"); } @TestMetadata("redundant1.kt") public void testRedundant1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/redundant1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/redundant1.kt"); } @TestMetadata("redundant4.kt") public void testRedundant4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/redundant4.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/redundant4.kt"); } @TestMetadata("redundant5.kt") public void testRedundant5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantUnitExpression/redundant5.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/redundantUnitExpression/redundant5.kt"); } } @@ -3647,38 +3374,37 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveRedundantBackticks extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveRedundantBackticks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/removeRedundantBackticks"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("functionArgument.kt") public void testFunctionArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantBackticks/functionArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantBackticks/functionArgument.kt"); } @TestMetadata("functionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantBackticks/functionCall.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantBackticks/functionCall.kt"); } @TestMetadata("identifierContainingSpaces.kt") public void testIdentifierContainingSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantBackticks/identifierContainingSpaces.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantBackticks/identifierContainingSpaces.kt"); } @TestMetadata("keyword.kt") public void testKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantBackticks/keyword.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantBackticks/keyword.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantBackticks/property.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantBackticks/property.kt"); } } @@ -3686,110 +3412,97 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveRedundantSpreadOperator extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveRedundantSpreadOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/removeRedundantSpreadOperator"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/basic.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/basic.kt"); } @TestMetadata("booleanArrayOf.kt") public void testBooleanArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/booleanArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/booleanArrayOf.kt"); } @TestMetadata("byteArrayOf.kt") public void testByteArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/byteArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/byteArrayOf.kt"); } @TestMetadata("charArrayOf.kt") public void testCharArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/charArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/charArrayOf.kt"); } @TestMetadata("doubleArrayOf.kt") public void testDoubleArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/doubleArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/doubleArrayOf.kt"); } @TestMetadata("emptyArray.kt") public void testEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/emptyArray.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/emptyArray.kt"); } @TestMetadata("emptyLiteral.kt") public void testEmptyLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/emptyLiteral.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/emptyLiteral.kt"); } @TestMetadata("floatArrayOf.kt") public void testFloatArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/floatArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/floatArrayOf.kt"); } @TestMetadata("intArrayOf.kt") public void testIntArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/intArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/intArrayOf.kt"); } @TestMetadata("literal.kt") public void testLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/literal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/literal.kt"); } @TestMetadata("longArrayOf.kt") public void testLongArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/longArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/longArrayOf.kt"); } @TestMetadata("multipleValues.kt") public void testMultipleValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/multipleValues.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/multipleValues.kt"); } @TestMetadata("multipleValuesWithOtherValues.kt") public void testMultipleValuesWithOtherValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/multipleValuesWithOtherValues.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/multipleValuesWithOtherValues.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/namedArgument.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/namedArgument.kt"); } @TestMetadata("namedArgumentForArray.kt") public void testNamedArgumentForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/namedArgumentForArray.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/namedArgumentForArray.kt"); } @TestMetadata("noParams.kt") public void testNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/noParams.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/noParams.kt"); } @TestMetadata("shortArrayOf.kt") public void testShortArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/shortArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeRedundantSpreadOperator/shortArrayOf.kt"); } } @@ -3797,14 +3510,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveSetterParameterType extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveSetterParameterType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/removeSetterParameterType"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("emptyType.kt") public void testEmptyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeSetterParameterType/emptyType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeSetterParameterType/emptyType.kt"); } } @@ -3812,20 +3528,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveToStringInStringTemplate extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveToStringInStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/removeToStringInStringTemplate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("caretInReceiver.kt") public void testCaretInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeToStringInStringTemplate/caretInReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeToStringInStringTemplate/caretInReceiver.kt"); } @TestMetadata("caretInSelector.kt") public void testCaretInSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/removeToStringInStringTemplate/caretInSelector.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/removeToStringInStringTemplate/caretInSelector.kt"); } } @@ -3833,32 +3551,32 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceArrayEqualityOpWithArraysEquals extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceArrayEqualityOpWithArraysEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("arrayAndOtherTypeEQEQ.kt") public void testArrayAndOtherTypeEQEQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/arrayAndOtherTypeEQEQ.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/arrayAndOtherTypeEQEQ.kt"); } @TestMetadata("arrayEQEQ.kt") public void testArrayEQEQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/arrayEQEQ.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/arrayEQEQ.kt"); } @TestMetadata("arrayEXCLEQ.kt") public void testArrayEXCLEQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/arrayEXCLEQ.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/arrayEXCLEQ.kt"); } @TestMetadata("primitiveArrayEQEQ.kt") public void testPrimitiveArrayEQEQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/primitiveArrayEQEQ.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayEqualityOpWithArraysEquals/primitiveArrayEQEQ.kt"); } } @@ -3866,68 +3584,62 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceArrayOfWithLiteral extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceArrayOfWithLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/base.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/base.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/default.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/default.kt"); } @TestMetadata("defaultNotAnnotation.kt") public void testDefaultNotAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/defaultNotAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/defaultNotAnnotation.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/empty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/empty.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/intArray.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/intArray.kt"); } @TestMetadata("noAnnotation.kt") public void testNoAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/noAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/noAnnotation.kt"); } @TestMetadata("noArray.kt") public void testNoArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/noArray.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/noArray.kt"); } @TestMetadata("unnamed.kt") public void testUnnamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/unnamed.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/unnamed.kt"); } @TestMetadata("unnamedVararg.kt") public void testUnnamedVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/unnamedVararg.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/unnamedVararg.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/vararg.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceArrayOfWithLiteral/vararg.kt"); } } @@ -3935,20 +3647,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplacePutWithAssignment extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplacePutWithAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replacePutWithAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("nonMap.kt") public void testNonMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replacePutWithAssignment/nonMap.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replacePutWithAssignment/nonMap.kt"); } @TestMetadata("putAsExpression.kt") public void testPutAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replacePutWithAssignment/putAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replacePutWithAssignment/putAsExpression.kt"); } @TestMetadata("putLambdaHasLabeledReturn.kt") @@ -3971,26 +3685,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestMetadata("putOnParameter.kt") public void testPutOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnParameter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnParameter.kt"); } @TestMetadata("putOnThis.kt") public void testPutOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnThis.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnThis.kt"); } @TestMetadata("putOnVal.kt") public void testPutOnVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnVal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnVal.kt"); } @TestMetadata("putOnVar.kt") public void testPutOnVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replacePutWithAssignment/putOnVar.kt"); } } @@ -3998,50 +3708,47 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceRangeToWithUntil extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceRangeToWithUntil() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceRangeToWithUntil"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("closedRange.kt") public void testClosedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/closedRange.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/closedRange.kt"); } @TestMetadata("minusTwo.kt") public void testMinusTwo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/minusTwo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/minusTwo.kt"); } @TestMetadata("notMinusOne.kt") public void testNotMinusOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/notMinusOne.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/notMinusOne.kt"); } @TestMetadata("operator.kt") public void testOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/operator.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/operator.kt"); } @TestMetadata("operatorLong.kt") public void testOperatorLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/operatorLong.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/operatorLong.kt"); } @TestMetadata("plusOne.kt") public void testPlusOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/plusOne.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/plusOne.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceRangeToWithUntil/rangeTo.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceRangeToWithUntil/rangeTo.kt"); } } @@ -4049,20 +3756,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceToWithInfixForm extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceToWithInfixForm() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceToWithInfixForm"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceToWithInfixForm/base.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceToWithInfixForm/base.kt"); } @TestMetadata("nonPair.kt") public void testNonPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceToWithInfixForm/nonPair.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceToWithInfixForm/nonPair.kt"); } } @@ -4070,80 +3779,72 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithOperatorAssignment extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceWithOperatorAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/replaceWithOperatorAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("flexibleTypeBug.kt") public void testFlexibleTypeBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/flexibleTypeBug.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/flexibleTypeBug.kt"); } @TestMetadata("illegalMultipleOperators.kt") public void testIllegalMultipleOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/illegalMultipleOperators.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/illegalMultipleOperators.kt"); } @TestMetadata("illegalMultipleOperatorsMiddle.kt") public void testIllegalMultipleOperatorsMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/illegalMultipleOperatorsMiddle.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/illegalMultipleOperatorsMiddle.kt"); } @TestMetadata("invalidSubtraction.kt") public void testInvalidSubtraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/invalidSubtraction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/invalidSubtraction.kt"); } @TestMetadata("multipleOperators.kt") public void testMultipleOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/multipleOperators.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/multipleOperators.kt"); } @TestMetadata("multipleOperatorsRightSideRepeat.kt") public void testMultipleOperatorsRightSideRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/multipleOperatorsRightSideRepeat.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/multipleOperatorsRightSideRepeat.kt"); } @TestMetadata("nonCommutativeRepeat.kt") public void testNonCommutativeRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/nonCommutativeRepeat.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/nonCommutativeRepeat.kt"); } @TestMetadata("nonRepeatingAssignment.kt") public void testNonRepeatingAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/nonRepeatingAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/nonRepeatingAssignment.kt"); } @TestMetadata("plusAssignConflict.kt") public void testPlusAssignConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/plusAssignConflict.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/plusAssignConflict.kt"); } @TestMetadata("rightSideRepeat.kt") public void testRightSideRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/rightSideRepeat.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/rightSideRepeat.kt"); } @TestMetadata("simpleAssign.kt") public void testSimpleAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/simpleAssign.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/simpleAssign.kt"); } @TestMetadata("validSubtraction.kt") public void testValidSubtraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/validSubtraction.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/replaceWithOperatorAssignment/validSubtraction.kt"); } } @@ -4151,6 +3852,10 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ScopeFunctions extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScopeFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/scopeFunctions"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -4159,14 +3864,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AlsoToApply extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAlsoToApply() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/scopeFunctions/alsoToApply"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/alsoToApply/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/alsoToApply/simple.kt"); } } @@ -4174,62 +3882,57 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ApplyToAlso extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInApplyToAlso() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("arrow.kt") public void testArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/arrow.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/arrow.kt"); } @TestMetadata("doubleNestedLambdas.kt") public void testDoubleNestedLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/doubleNestedLambdas.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/doubleNestedLambdas.kt"); } @TestMetadata("innerLambda.kt") public void testInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/innerLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/innerLambda.kt"); } @TestMetadata("itInNestedLambda.kt") public void testItInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/itInNestedLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/itInNestedLambda.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/method.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/method.kt"); } @TestMetadata("outerLambda.kt") public void testOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/outerLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/outerLambda.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/simple.kt"); } @TestMetadata("thisInOperation.kt") public void testThisInOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/thisInOperation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/thisInOperation.kt"); } @TestMetadata("thisQualifier.kt") public void testThisQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/thisQualifier.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/applyToAlso/thisQualifier.kt"); } } @@ -4237,56 +3940,52 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LetToRun extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLetToRun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/scopeFunctions/letToRun"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/nestedLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/nestedLambda.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/outerThis.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/outerThis.kt"); } @TestMetadata("qualifyThis.kt") public void testQualifyThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThis.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThis.kt"); } @TestMetadata("qualifyThisNoConflict.kt") public void testQualifyThisNoConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThisNoConflict.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThisNoConflict.kt"); } @TestMetadata("qualifyThisWithLambda.kt") public void testQualifyThisWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThisWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThisWithLambda.kt"); } @TestMetadata("qualifyThisWithLambdaNoConflict.kt") public void testQualifyThisWithLambdaNoConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThisWithLambdaNoConflict.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/qualifyThisWithLambdaNoConflict.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/simple.kt"); } @TestMetadata("thisInStringTemplate.kt") public void testThisInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/letToRun/thisInStringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/letToRun/thisInStringTemplate.kt"); } } @@ -4294,14 +3993,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RunToLet extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRunToLet() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/scopeFunctions/runToLet"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/scopeFunctions/runToLet/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/scopeFunctions/runToLet/simple.kt"); } } } @@ -4310,140 +4012,122 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SelfAssignment extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSelfAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/selfAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("applyCorrect.kt") public void testApplyCorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/applyCorrect.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/applyCorrect.kt"); } @TestMetadata("applyIncorrect.kt") public void testApplyIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/applyIncorrect.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/applyIncorrect.kt"); } @TestMetadata("assignToProperty.kt") public void testAssignToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/assignToProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/assignToProperty.kt"); } @TestMetadata("differentThese.kt") public void testDifferentThese() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/differentThese.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/differentThese.kt"); } @TestMetadata("differentThis.kt") public void testDifferentThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/differentThis.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/differentThis.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/list.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/list.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/localVal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/localVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/localVar.kt"); } @TestMetadata("notAssignment.kt") public void testNotAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/notAssignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/notAssignment.kt"); } @TestMetadata("notSelf.kt") public void testNotSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/notSelf.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/notSelf.kt"); } @TestMetadata("openProperty.kt") public void testOpenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/openProperty.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/openProperty.kt"); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/parameter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/parameter.kt"); } @TestMetadata("property1.kt") public void testProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/property1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/property1.kt"); } @TestMetadata("property2.kt") public void testProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/property2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/property2.kt"); } @TestMetadata("property3.kt") public void testProperty3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/property3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/property3.kt"); } @TestMetadata("propertyHasDelegate.kt") public void testPropertyHasDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/propertyHasDelegate.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/propertyHasDelegate.kt"); } @TestMetadata("propertyHasGetter.kt") public void testPropertyHasGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/propertyHasGetter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/propertyHasGetter.kt"); } @TestMetadata("propertyHasSetter.kt") public void testPropertyHasSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/propertyHasSetter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/propertyHasSetter.kt"); } @TestMetadata("sameThese.kt") public void testSameThese() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/sameThese.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/sameThese.kt"); } @TestMetadata("sameThis.kt") public void testSameThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/sameThis.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/sameThis.kt"); } @TestMetadata("shadow.kt") public void testShadow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/shadow.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/shadow.kt"); } @TestMetadata("withReceiver.kt") public void testWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/selfAssignment/withReceiver.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/selfAssignment/withReceiver.kt"); } } @@ -4451,74 +4135,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyAssertNotNull extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimplifyAssertNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/simplifyAssertNotNull"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("comments.kt") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/comments.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/comments.kt"); } @TestMetadata("commentsNoMessage.kt") public void testCommentsNoMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/commentsNoMessage.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/commentsNoMessage.kt"); } @TestMetadata("complicatedMessageLambda.kt") public void testComplicatedMessageLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/complicatedMessageLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/complicatedMessageLambda.kt"); } @TestMetadata("eqNull.kt") public void testEqNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/eqNull.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/eqNull.kt"); } @TestMetadata("errorFunctionInContext.kt") public void testErrorFunctionInContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/errorFunctionInContext.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/errorFunctionInContext.kt"); } @TestMetadata("falseAssert.kt") public void testFalseAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/falseAssert.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/falseAssert.kt"); } @TestMetadata("noMessage.kt") public void testNoMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/noMessage.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/noMessage.kt"); } @TestMetadata("otherVariable.kt") public void testOtherVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/otherVariable.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/otherVariable.kt"); } @TestMetadata("qualifiedAccess.kt") public void testQualifiedAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/qualifiedAccess.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/qualifiedAccess.kt"); } @TestMetadata("withMessage.kt") public void testWithMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/withMessage.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/withMessage.kt"); } @TestMetadata("withMessageLambdaOutside.kt") public void testWithMessageLambdaOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyAssertNotNull/withMessageLambdaOutside.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyAssertNotNull/withMessageLambdaOutside.kt"); } } @@ -4526,80 +4203,85 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyNegatedBinaryExpression extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimplifyNegatedBinaryExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/equals.kt"); } @TestMetadata("greaterThan.kt") public void testGreaterThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThan.kt"); } @TestMetadata("greaterThanOrEquals.kt") public void testGreaterThanOrEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/greaterThanOrEquals.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/in.kt"); } @TestMetadata("inapplicableBinaryOperation.kt") public void testInapplicableBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inapplicableBinaryOperation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inapplicableBinaryOperation.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/is.kt"); } @TestMetadata("lessThan.kt") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThan.kt"); } @TestMetadata("lessThanOrEquals.kt") public void testLessThanOrEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/lessThanOrEquals.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notEquals.kt"); } @TestMetadata("notIn.kt") public void testNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIn.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/notIs.kt"); } @TestMetadata("simpleInvert.kt") public void testSimpleInvert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/simpleInvert.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/simpleInvert.kt"); + } + + @TestMetadata("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/simplifyNegatedBinaryExpression/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -4607,92 +4289,82 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyWhenWithBooleanConstantCondition extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimplifyWhenWithBooleanConstantCondition() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("falseAndElse1.kt") public void testFalseAndElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseAndElse1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseAndElse1.kt"); } @TestMetadata("falseAndElse2.kt") public void testFalseAndElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseAndElse2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseAndElse2.kt"); } @TestMetadata("falseAndElse3.kt") public void testFalseAndElse3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseAndElse3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseAndElse3.kt"); } @TestMetadata("falseOnly1.kt") public void testFalseOnly1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseOnly1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseOnly1.kt"); } @TestMetadata("falseOnly2.kt") public void testFalseOnly2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseOnly2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseOnly2.kt"); } @TestMetadata("falseOnly3.kt") public void testFalseOnly3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseOnly3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/falseOnly3.kt"); } @TestMetadata("hasSubject.kt") public void testHasSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/hasSubject.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/hasSubject.kt"); } @TestMetadata("noBoolean.kt") public void testNoBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/noBoolean.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/noBoolean.kt"); } @TestMetadata("trueIsNotTop1.kt") public void testTrueIsNotTop1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop1.kt"); } @TestMetadata("trueIsNotTop2.kt") public void testTrueIsNotTop2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop2.kt"); } @TestMetadata("trueIsNotTop3.kt") public void testTrueIsNotTop3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsNotTop3.kt"); } @TestMetadata("trueIsTop1.kt") public void testTrueIsTop1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsTop1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsTop1.kt"); } @TestMetadata("trueIsTop2.kt") public void testTrueIsTop2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsTop2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsTop2.kt"); } @TestMetadata("trueIsTop3.kt") public void testTrueIsTop3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsTop3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/simplifyWhenWithBooleanConstantCondition/trueIsTop3.kt"); } } @@ -4700,38 +4372,37 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SortModifiers extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSortModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/sortModifiers"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/sortModifiers/annotation.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/sortModifiers/annotation.kt"); } @TestMetadata("annotationGroup.kt") public void testAnnotationGroup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/sortModifiers/annotationGroup.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/sortModifiers/annotationGroup.kt"); } @TestMetadata("annotationOverrideFinal.kt") public void testAnnotationOverrideFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/sortModifiers/annotationOverrideFinal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/sortModifiers/annotationOverrideFinal.kt"); } @TestMetadata("overrideFinal.kt") public void testOverrideFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/sortModifiers/overrideFinal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/sortModifiers/overrideFinal.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/sortModifiers/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/sortModifiers/simple.kt"); } } @@ -4739,74 +4410,67 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnnecessaryVariable extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnnecessaryVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unnecessaryVariable"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("copyOfVal.kt") public void testCopyOfVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfVal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfVal.kt"); } @TestMetadata("copyOfValUnused.kt") public void testCopyOfValUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfValUnused.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfValUnused.kt"); } @TestMetadata("copyOfValWithExplicitType.kt") public void testCopyOfValWithExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfValWithExplicitType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfValWithExplicitType.kt"); } @TestMetadata("copyOfVar.kt") public void testCopyOfVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfVar.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/copyOfVar.kt"); } @TestMetadata("it.kt") public void testIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/it.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/it.kt"); } @TestMetadata("paramCopy.kt") public void testParamCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/paramCopy.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/paramCopy.kt"); } @TestMetadata("parameterWithSameNameBelow.kt") public void testParameterWithSameNameBelow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/parameterWithSameNameBelow.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/parameterWithSameNameBelow.kt"); } @TestMetadata("propertyCopy.kt") public void testPropertyCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/propertyCopy.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/propertyCopy.kt"); } @TestMetadata("simpleReturn.kt") public void testSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/simpleReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/simpleReturn.kt"); } @TestMetadata("topLevelCopy.kt") public void testTopLevelCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/topLevelCopy.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/topLevelCopy.kt"); } @TestMetadata("varCopy.kt") public void testVarCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unnecessaryVariable/varCopy.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unnecessaryVariable/varCopy.kt"); } } @@ -4814,26 +4478,27 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnsafeCastFromDynamic extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnsafeCastFromDynamic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unsafeCastFromDynamic"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("binaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unsafeCastFromDynamic/binaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unsafeCastFromDynamic/binaryExpression.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unsafeCastFromDynamic/nullable.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unsafeCastFromDynamic/nullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unsafeCastFromDynamic/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unsafeCastFromDynamic/simple.kt"); } } @@ -4841,20 +4506,22 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnusedLambdaExpressionBody extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnusedLambdaExpressionBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unusedLambdaExpressionBody"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inEnumEntry.kt") public void testInEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedLambdaExpressionBody/inEnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedLambdaExpressionBody/inEnumEntry.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedLambdaExpressionBody/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedLambdaExpressionBody/simple.kt"); } } @@ -4862,38 +4529,37 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnusedReceiverParameter extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnusedReceiverParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unusedReceiverParameter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedReceiverParameter/companion.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedReceiverParameter/companion.kt"); } @TestMetadata("companionPure.kt") public void testCompanionPure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedReceiverParameter/companionPure.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedReceiverParameter/companionPure.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedReceiverParameter/infix.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedReceiverParameter/infix.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedReceiverParameter/object.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedReceiverParameter/object.kt"); } @TestMetadata("operator.kt") public void testOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedReceiverParameter/operator.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedReceiverParameter/operator.kt"); } } @@ -4901,50 +4567,47 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnusedSymbol extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnusedSymbol() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/unusedSymbol"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("asDefaultConstructorParameter.kt") public void testAsDefaultConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/asDefaultConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/asDefaultConstructorParameter.kt"); } @TestMetadata("companionViaImport.kt") public void testCompanionViaImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/companionViaImport.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/companionViaImport.kt"); } @TestMetadata("inAnonymous.kt") public void testInAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/inAnonymous.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/inAnonymous.kt"); } @TestMetadata("inAnonymousDeeply.kt") public void testInAnonymousDeeply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/inAnonymousDeeply.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/inAnonymousDeeply.kt"); } @TestMetadata("inAnonymousRunWrapped.kt") public void testInAnonymousRunWrapped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/inAnonymousRunWrapped.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/inAnonymousRunWrapped.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/internal.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/internal.kt"); } @TestMetadata("withJvmNameUsedFromKotlin.kt") public void testWithJvmNameUsedFromKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/unusedSymbol/withJvmNameUsedFromKotlin.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/unusedSymbol/withJvmNameUsedFromKotlin.kt"); } } @@ -4952,326 +4615,287 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UseExpressionBody extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUseExpressionBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/useExpressionBody"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/if.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/if.kt"); } @TestMetadata("leftBrace.kt") public void testLeftBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/leftBrace.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/leftBrace.kt"); } @TestMetadata("multiLine.kt") public void testMultiLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/multiLine.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/multiLine.kt"); } @TestMetadata("oneLine.kt") public void testOneLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/oneLine.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/oneLine.kt"); } @TestMetadata("veryVeryLong.kt") public void testVeryVeryLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/veryVeryLong.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/veryVeryLong.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/when.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/when.kt"); } @TestMetadata("whenWithEarlyReturn.kt") public void testWhenWithEarlyReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/whenWithEarlyReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/whenWithEarlyReturn.kt"); } @TestMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToExpressionBody extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToExpressionBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectExpression.kt") public void testAnonymousObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/anonymousObjectExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/anonymousObjectExpression.kt"); } @TestMetadata("assignPlus.kt") public void testAssignPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/assignPlus.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/assignPlus.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/assignment.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/assignment.kt"); } @TestMetadata("constructorWithEmptyBody.kt") public void testConstructorWithEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/constructorWithEmptyBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/constructorWithEmptyBody.kt"); } @TestMetadata("declaration.kt") public void testDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/declaration.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/declaration.kt"); } @TestMetadata("elvisIfElseUnit.kt") public void testElvisIfElseUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/elvisIfElseUnit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/elvisIfElseUnit.kt"); } @TestMetadata("elvisIfUnit.kt") public void testElvisIfUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/elvisIfUnit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/elvisIfUnit.kt"); } @TestMetadata("elvisWhenUnitNonExhaustive.kt") public void testElvisWhenUnitNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/elvisWhenUnitNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/elvisWhenUnitNonExhaustive.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/emptyList.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/emptyList.kt"); } @TestMetadata("expressionWithReturns1.kt") public void testExpressionWithReturns1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/expressionWithReturns1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/expressionWithReturns1.kt"); } @TestMetadata("expressionWithReturns2.kt") public void testExpressionWithReturns2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/expressionWithReturns2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/expressionWithReturns2.kt"); } @TestMetadata("funWithEmptyBody.kt") public void testFunWithEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithEmptyBody.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithEmptyBody.kt"); } @TestMetadata("funWithEmptyBody2.kt") public void testFunWithEmptyBody2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithEmptyBody2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithEmptyBody2.kt"); } @TestMetadata("funWithImplicitUnitTypeWithThrow.kt") public void testFunWithImplicitUnitTypeWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithImplicitUnitTypeWithThrow.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithImplicitUnitTypeWithThrow.kt"); } @TestMetadata("funWithNoBlock.kt") public void testFunWithNoBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithNoBlock.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithNoBlock.kt"); } @TestMetadata("funWithNothingType.kt") public void testFunWithNothingType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithNothingType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithNothingType.kt"); } @TestMetadata("funWithReturn.kt") public void testFunWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithReturn.kt"); } @TestMetadata("funWithUnitType.kt") public void testFunWithUnitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithUnitType.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithUnitType.kt"); } @TestMetadata("funWithUnitType2.kt") public void testFunWithUnitType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithUnitType2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithUnitType2.kt"); } @TestMetadata("funWithUnitTypeWithThrow.kt") public void testFunWithUnitTypeWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithUnitTypeWithThrow.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/funWithUnitTypeWithThrow.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/functionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/functionLiteral.kt"); } @TestMetadata("getWithReturn.kt") public void testGetWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/getWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/getWithReturn.kt"); } @TestMetadata("ifElseUnit.kt") public void testIfElseUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifElseUnit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifElseUnit.kt"); } @TestMetadata("ifUnit.kt") public void testIfUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifUnit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifUnit.kt"); } @TestMetadata("ifWhenUnitExhaustive.kt") public void testIfWhenUnitExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifWhenUnitExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifWhenUnitExhaustive.kt"); } @TestMetadata("ifWhenUnitNonExhaustive.kt") public void testIfWhenUnitNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifWhenUnitNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/ifWhenUnitNonExhaustive.kt"); } @TestMetadata("lambdaIfUnit.kt") public void testLambdaIfUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/lambdaIfUnit.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/lambdaIfUnit.kt"); } @TestMetadata("lambdaWhenUnitNonExhaustive.kt") public void testLambdaWhenUnitNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/lambdaWhenUnitNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/lambdaWhenUnitNonExhaustive.kt"); } @TestMetadata("multipleStatements.kt") public void testMultipleStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/multipleStatements.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/multipleStatements.kt"); } @TestMetadata("overridePublicFun.kt") public void testOverridePublicFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/overridePublicFun.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/overridePublicFun.kt"); } @TestMetadata("returnFromLambda.kt") public void testReturnFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/returnFromLambda.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/returnFromLambda.kt"); } @TestMetadata("returnFromLambda2.kt") public void testReturnFromLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/returnFromLambda2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/returnFromLambda2.kt"); } @TestMetadata("returnWithNoValue.kt") public void testReturnWithNoValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/returnWithNoValue.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/returnWithNoValue.kt"); } @TestMetadata("whenIfUnitExhaustive.kt") public void testWhenIfUnitExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenIfUnitExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenIfUnitExhaustive.kt"); } @TestMetadata("whenIfUnitNonExhaustive.kt") public void testWhenIfUnitNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenIfUnitNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenIfUnitNonExhaustive.kt"); } @TestMetadata("whenUnitExhaustive.kt") public void testWhenUnitExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenUnitExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenUnitExhaustive.kt"); } @TestMetadata("whenUnitNonExhaustive.kt") public void testWhenUnitNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenUnitNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenUnitNonExhaustive.kt"); } @TestMetadata("whenUnitWithElse.kt") public void testWhenUnitWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenUnitWithElse.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenUnitWithElse.kt"); } @TestMetadata("whenWhenNonExhaustive.kt") public void testWhenWhenNonExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenWhenNonExhaustive.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/whenWhenNonExhaustive.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/while.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/while.kt"); } @TestMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KeepComments extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/1.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/2.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/3.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/4.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/useExpressionBody/convertToExpressionBody/keepComments/4.kt"); } public void testAllFilesPresentInKeepComments() throws Exception { @@ -5285,32 +4909,32 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenWithOnlyElse extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhenWithOnlyElse() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/whenWithOnlyElse"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complexExpression.kt") public void testComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/whenWithOnlyElse/complexExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/whenWithOnlyElse/complexExpression.kt"); } @TestMetadata("hasOtherBranches.kt") public void testHasOtherBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/whenWithOnlyElse/hasOtherBranches.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/whenWithOnlyElse/hasOtherBranches.kt"); } @TestMetadata("notExpression.kt") public void testNotExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/whenWithOnlyElse/notExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/whenWithOnlyElse/notExpression.kt"); } @TestMetadata("simpleExpression.kt") public void testSimpleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/whenWithOnlyElse/simpleExpression.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/whenWithOnlyElse/simpleExpression.kt"); } } @@ -5318,14 +4942,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WrapUnaryOperator extends AbstractLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWrapUnaryOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/wrapUnaryOperator"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/wrapUnaryOperator/simple.kt"); - doTest(fileName); + runTest("idea/testData/inspectionsLocal/wrapUnaryOperator/simple.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/inspections/MultiFileLocalInspectionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/inspections/MultiFileLocalInspectionTestGenerated.java index 24277d292ee..049f7f2f594 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/inspections/MultiFileLocalInspectionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/inspections/MultiFileLocalInspectionTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiFileLocalInspectionTestGenerated extends AbstractMultiFileLocalInspectionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiFileLocalInspections() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/multiFileLocalInspections"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("convertSealedSubClassToObject/convertCallableReferenceUsages/convertCallableReferenceUsages.test") public void testConvertSealedSubClassToObject_convertCallableReferenceUsages_ConvertCallableReferenceUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertCallableReferenceUsages/convertCallableReferenceUsages.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertCallableReferenceUsages/convertCallableReferenceUsages.test"); } @TestMetadata("convertSealedSubClassToObject/convertInOtherFiles/convertInOtherFiles.test") public void testConvertSealedSubClassToObject_convertInOtherFiles_ConvertInOtherFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertInOtherFiles/convertInOtherFiles.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/convertSealedSubClassToObject/convertInOtherFiles/convertInOtherFiles.test"); } @TestMetadata("moveFileToPackageMatchingDirectory/moveToDefaultDirectory/moveToDefaultDirectory.test") public void testMoveFileToPackageMatchingDirectory_moveToDefaultDirectory_MoveToDefaultDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/moveFileToPackageMatchingDirectory/moveToDefaultDirectory/moveToDefaultDirectory.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/moveFileToPackageMatchingDirectory/moveToDefaultDirectory/moveToDefaultDirectory.test"); } @TestMetadata("moveFileToPackageMatchingDirectory/moveToNonDefaultDirectory/moveToNonDefaultDirectory.test") public void testMoveFileToPackageMatchingDirectory_moveToNonDefaultDirectory_MoveToNonDefaultDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/moveFileToPackageMatchingDirectory/moveToNonDefaultDirectory/moveToNonDefaultDirectory.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/moveFileToPackageMatchingDirectory/moveToNonDefaultDirectory/moveToNonDefaultDirectory.test"); } @TestMetadata("moveFileToPackageMatchingDirectory/packageMatchesDirectory/packageMatchesDirectory.test") public void testMoveFileToPackageMatchingDirectory_packageMatchesDirectory_PackageMatchesDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/moveFileToPackageMatchingDirectory/packageMatchesDirectory/packageMatchesDirectory.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/moveFileToPackageMatchingDirectory/packageMatchesDirectory/packageMatchesDirectory.test"); } @TestMetadata("reconcilePackageWithDirectory/addQuotation/addQuotation.test") public void testReconcilePackageWithDirectory_addQuotation_AddQuotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/addQuotation/addQuotation.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/addQuotation/addQuotation.test"); } @TestMetadata("reconcilePackageWithDirectory/changeToDefaultPackage/changeToDefaultPackage.test") public void testReconcilePackageWithDirectory_changeToDefaultPackage_ChangeToDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/changeToDefaultPackage/changeToDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/changeToDefaultPackage/changeToDefaultPackage.test"); } @TestMetadata("reconcilePackageWithDirectory/changeToNonDefaultPackage/changeToNonDefaultPackage.test") public void testReconcilePackageWithDirectory_changeToNonDefaultPackage_ChangeToNonDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/changeToNonDefaultPackage/changeToNonDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/changeToNonDefaultPackage/changeToNonDefaultPackage.test"); } @TestMetadata("reconcilePackageWithDirectory/innerClass/innerClass.test") public void testReconcilePackageWithDirectory_innerClass_InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/innerClass/innerClass.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/innerClass/innerClass.test"); } @TestMetadata("reconcilePackageWithDirectory/packageMatchesDirectory/packageMatchesDirectory.test") public void testReconcilePackageWithDirectory_packageMatchesDirectory_PackageMatchesDirectory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/packageMatchesDirectory/packageMatchesDirectory.test"); - doTest(fileName); + runTest("idea/testData/multiFileLocalInspections/reconcilePackageWithDirectory/packageMatchesDirectory/packageMatchesDirectory.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java index b17a1548ab0..fb01da99f45 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ConcatenatedStringGeneratorTestGenerated extends AbstractConcatenatedStringGeneratorTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConcatenatedStringGenerator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/concatenatedStringGenerator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/constants.kt"); - doTest(fileName); + runTest("idea/testData/concatenatedStringGenerator/constants.kt"); } @TestMetadata("constants2.kt") public void testConstants2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/constants2.kt"); - doTest(fileName); + runTest("idea/testData/concatenatedStringGenerator/constants2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/simple.kt"); - doTest(fileName); + runTest("idea/testData/concatenatedStringGenerator/simple.kt"); } @TestMetadata("stringtemplate.kt") public void testStringtemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/stringtemplate.kt"); - doTest(fileName); + runTest("idea/testData/concatenatedStringGenerator/stringtemplate.kt"); } @TestMetadata("stringtemplateWithConstant.kt") public void testStringtemplateWithConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/stringtemplateWithConstant.kt"); - doTest(fileName); + runTest("idea/testData/concatenatedStringGenerator/stringtemplateWithConstant.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/variables.kt"); - doTest(fileName); + runTest("idea/testData/concatenatedStringGenerator/variables.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTest2Generated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTest2Generated.java index ad210a997f3..a40798bb554 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTest2Generated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTest2Generated.java @@ -21,190 +21,169 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IntentionTest2Generated extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLoopToCallChain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/array.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/array.kt"); } @TestMetadata("asSequenceOnly.kt") public void testAsSequenceOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/asSequenceOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/asSequenceOnly.kt"); } @TestMetadata("customTypeWithIterator.kt") public void testCustomTypeWithIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/customTypeWithIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/customTypeWithIterator.kt"); } @TestMetadata("embeddedBreak1.kt") public void testEmbeddedBreak1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/embeddedBreak1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/embeddedBreak1.kt"); } @TestMetadata("embeddedBreak2.kt") public void testEmbeddedBreak2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/embeddedBreak2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/embeddedBreak2.kt"); } @TestMetadata("embeddedContinue.kt") public void testEmbeddedContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/embeddedContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/embeddedContinue.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/intArray.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/intArray.kt"); } @TestMetadata("itAlreadyUsed.kt") public void testItAlreadyUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/itAlreadyUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/itAlreadyUsed.kt"); } @TestMetadata("KT14191.kt") public void testKT14191() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/KT14191.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/KT14191.kt"); } @TestMetadata("lastOrNull_ifAssign.kt") public void testLastOrNull_ifAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/lastOrNull_ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/lastOrNull_ifAssign.kt"); } @TestMetadata("moveInitializationsCloserToLoop.kt") public void testMoveInitializationsCloserToLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/moveInitializationsCloserToLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/moveInitializationsCloserToLoop.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/range.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/range.kt"); } @TestMetadata("twoInitializationsBeforeLoop.kt") public void testTwoInitializationsBeforeLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/twoInitializationsBeforeLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/twoInitializationsBeforeLoop.kt"); } @TestMetadata("idea/testData/intentions/loopToCallChain/any") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Any extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/any"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anyNotNull.kt") public void testAnyNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/anyNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/anyNotNull.kt"); } @TestMetadata("ifAssign.kt") public void testIfAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign.kt"); } @TestMetadata("ifAssign_moveDeclaration.kt") public void testIfAssign_moveDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_moveDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_moveDeclaration.kt"); } @TestMetadata("ifAssign_moveInitialization.kt") public void testIfAssign_moveInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_moveInitialization.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_moveInitialization.kt"); } @TestMetadata("ifAssign_noBreak.kt") public void testIfAssign_noBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_noBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_noBreak.kt"); } @TestMetadata("ifAssign_nonBooleanResult.kt") public void testIfAssign_nonBooleanResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult.kt"); } @TestMetadata("ifAssign_nonBooleanResult2.kt") public void testIfAssign_nonBooleanResult2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult2.kt"); } @TestMetadata("ifReturn.kt") public void testIfReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifReturn.kt"); } @TestMetadata("ifReturn_nonBooleanResult.kt") public void testIfReturn_nonBooleanResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifReturn_nonBooleanResult.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifReturn_nonBooleanResult.kt"); } @TestMetadata("indexNeeded.kt") public void testIndexNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/indexNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/indexNeeded.kt"); } @TestMetadata("KT13998.kt") public void testKT13998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/KT13998.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/KT13998.kt"); } @TestMetadata("KT13998_1.kt") public void testKT13998_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/KT13998_1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/KT13998_1.kt"); } @TestMetadata("kt17730.kt") public void testKt17730() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/kt17730.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/kt17730.kt"); } @TestMetadata("kt17730_1.kt") public void testKt17730_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/kt17730_1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/kt17730_1.kt"); } @TestMetadata("none.kt") public void testNone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/none.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/none.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/return.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/return.kt"); } } @@ -212,28 +191,28 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contains extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/4.kt"); } public void testAllFilesPresentInContains() throws Exception { @@ -245,16 +224,18 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Count extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/2.kt"); } public void testAllFilesPresentInCount() throws Exception { @@ -263,50 +244,42 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestMetadata("countIsInstance.kt") public void testCountIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/countIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/countIsInstance.kt"); } @TestMetadata("countNotNull.kt") public void testCountNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/countNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/countNotNull.kt"); } @TestMetadata("countSomethingAndNotNull.kt") public void testCountSomethingAndNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/countSomethingAndNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/countSomethingAndNotNull.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/long.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/long.kt"); } @TestMetadata("nonConstantInitial.kt") public void testNonConstantInitial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/nonConstantInitial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/nonConstantInitial.kt"); } @TestMetadata("nonZeroInitial.kt") public void testNonZeroInitial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/nonZeroInitial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/nonZeroInitial.kt"); } @TestMetadata("prefix.kt") public void testPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/prefix.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/prefix.kt"); } @TestMetadata("variableUsedBefore.kt") public void testVariableUsedBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/variableUsedBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/variableUsedBefore.kt"); } } @@ -314,308 +287,262 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Filter extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFilter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/filter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign.kt"); } @TestMetadata("assign2.kt") public void testAssign2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign2.kt"); } @TestMetadata("assignFilterIndexed.kt") public void testAssignFilterIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assignFilterIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assignFilterIndexed.kt"); } @TestMetadata("assignFilterNotNull.kt") public void testAssignFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assignFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assignFilterNotNull.kt"); } @TestMetadata("assign_ArrayListRequired.kt") public void testAssign_ArrayListRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired.kt"); } @TestMetadata("assign_ArrayListRequired2.kt") public void testAssign_ArrayListRequired2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired2.kt"); } @TestMetadata("assign_ArrayListRequired3.kt") public void testAssign_ArrayListRequired3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired3.kt"); } @TestMetadata("assign_MutableListRequired.kt") public void testAssign_MutableListRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_MutableListRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_MutableListRequired.kt"); } @TestMetadata("assign_breakAndContinue.kt") public void testAssign_breakAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_breakAndContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_breakAndContinue.kt"); } @TestMetadata("cannotSplitOutFilterIsInstance.kt") public void testCannotSplitOutFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/cannotSplitOutFilterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/cannotSplitOutFilterIsInstance.kt"); } @TestMetadata("doNotSplitOutFilterIsInstance.kt") public void testDoNotSplitOutFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterIsInstance.kt"); } @TestMetadata("doNotSplitOutFilterNotNull.kt") public void testDoNotSplitOutFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterNotNull.kt"); } @TestMetadata("filterIndexed.kt") public void testFilterIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed.kt"); } @TestMetadata("filterIndexed2.kt") public void testFilterIndexed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed2.kt"); } @TestMetadata("filterIndexedAndFlatMapWithContinue.kt") public void testFilterIndexedAndFlatMapWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexedAndFlatMapWithContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexedAndFlatMapWithContinue.kt"); } @TestMetadata("filterIndexedTo.kt") public void testFilterIndexedTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo.kt"); } @TestMetadata("filterIndexedTo2.kt") public void testFilterIndexedTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo2.kt"); } @TestMetadata("filterIndexed_indexChangedTwice.kt") public void testFilterIndexed_indexChangedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexChangedTwice.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexChangedTwice.kt"); } @TestMetadata("filterIndexed_indexStartNotZero.kt") public void testFilterIndexed_indexStartNotZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexStartNotZero.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexStartNotZero.kt"); } @TestMetadata("filterIndexed_indexUsedAfter.kt") public void testFilterIndexed_indexUsedAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedAfter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedAfter.kt"); } @TestMetadata("filterIndexed_indexUsedEarlierInLoop.kt") public void testFilterIndexed_indexUsedEarlierInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedEarlierInLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedEarlierInLoop.kt"); } @TestMetadata("filterIndexed_merge1.kt") public void testFilterIndexed_merge1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge1.kt"); } @TestMetadata("filterIndexed_merge2.kt") public void testFilterIndexed_merge2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge2.kt"); } @TestMetadata("filterIndexed_merge3.kt") public void testFilterIndexed_merge3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge3.kt"); } @TestMetadata("filterIndexed_merge4.kt") public void testFilterIndexed_merge4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge4.kt"); } @TestMetadata("filterIndexed_twoIndices.kt") public void testFilterIndexed_twoIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndices.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndices.kt"); } @TestMetadata("filterIndexed_twoIndicesUsed.kt") public void testFilterIndexed_twoIndicesUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndicesUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndicesUsed.kt"); } @TestMetadata("filterIsInstance.kt") public void testFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIsInstance.kt"); } @TestMetadata("filterIsInstanceTo.kt") public void testFilterIsInstanceTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIsInstanceTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIsInstanceTo.kt"); } @TestMetadata("filterIsInstance_ifContinue.kt") public void testFilterIsInstance_ifContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIsInstance_ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIsInstance_ifContinue.kt"); } @TestMetadata("filterNotNull.kt") public void testFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNull.kt"); } @TestMetadata("filterNotNullTo.kt") public void testFilterNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo.kt"); } @TestMetadata("filterNotNullTo2.kt") public void testFilterNotNullTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo2.kt"); } @TestMetadata("filterNotNull_ifContinue.kt") public void testFilterNotNull_ifContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNull_ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNull_ifContinue.kt"); } @TestMetadata("filterNotTo.kt") public void testFilterNotTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotTo.kt"); } @TestMetadata("filterNot_ifContinue.kt") public void testFilterNot_ifContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNot_ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNot_ifContinue.kt"); } @TestMetadata("filterTo.kt") public void testFilterTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterTo.kt"); } @TestMetadata("filterTo2.kt") public void testFilterTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterTo2.kt"); } @TestMetadata("glueTogetherFilterNotNull.kt") public void testGlueTogetherFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/glueTogetherFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/glueTogetherFilterNotNull.kt"); } @TestMetadata("ifContinue.kt") public void testIfContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinue.kt"); } @TestMetadata("ifContinue2.kt") public void testIfContinue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinue2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinue2.kt"); } @TestMetadata("ifContinueInBlock.kt") public void testIfContinueInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinueInBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinueInBlock.kt"); } @TestMetadata("ifContinueWithLabel.kt") public void testIfContinueWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinueWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinueWithLabel.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifElse.kt"); } @TestMetadata("inputVarNotUsed.kt") public void testInputVarNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/inputVarNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/inputVarNotUsed.kt"); } @TestMetadata("inputVariableNotUsed.kt") public void testInputVariableNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/inputVariableNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/inputVariableNotUsed.kt"); } @TestMetadata("mergeMultiple.kt") public void testMergeMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/mergeMultiple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/mergeMultiple.kt"); } @TestMetadata("splitOutFilterIsInstance.kt") public void testSplitOutFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/splitOutFilterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/splitOutFilterIsInstance.kt"); } @TestMetadata("splitOutFilterNotNull.kt") public void testSplitOutFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull.kt"); } @TestMetadata("splitOutFilterNotNull2.kt") public void testSplitOutFilterNotNull2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull2.kt"); } } @@ -623,128 +550,112 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FirstOrNull extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFirstOrNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/firstOrNull"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignmentInitialization.kt") public void testAssignmentInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/assignmentInitialization.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/assignmentInitialization.kt"); } @TestMetadata("cannotUseLet.kt") public void testCannotUseLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/cannotUseLet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/cannotUseLet.kt"); } @TestMetadata("ifAssign.kt") public void testIfAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign.kt"); } @TestMetadata("ifAssign_breakWithLabel.kt") public void testIfAssign_breakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_breakWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_breakWithLabel.kt"); } @TestMetadata("ifAssign_cannotBeVal.kt") public void testIfAssign_cannotBeVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_cannotBeVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_cannotBeVal.kt"); } @TestMetadata("ifAssign_preserveComments.kt") public void testIfAssign_preserveComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_preserveComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_preserveComments.kt"); } @TestMetadata("ifAssign_variableUsedBefore.kt") public void testIfAssign_variableUsedBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_variableUsedBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_variableUsedBefore.kt"); } @TestMetadata("ifReturn.kt") public void testIfReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifReturn.kt"); } @TestMetadata("KT14292.kt") public void testKT14292() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/KT14292.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/KT14292.kt"); } @TestMetadata("let.kt") public void testLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/let.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/let.kt"); } @TestMetadata("let2.kt") public void testLet2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/let2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/let2.kt"); } @TestMetadata("letOrNotNull.kt") public void testLetOrNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/letOrNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/letOrNotNull.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/return.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/return.kt"); } @TestMetadata("returnExpression.kt") public void testReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpression.kt"); } @TestMetadata("returnExpressionOrNotNull.kt") public void testReturnExpressionOrNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpressionOrNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpressionOrNotNull.kt"); } @TestMetadata("returnNotNullIfNone.kt") public void testReturnNotNullIfNone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone.kt"); } @TestMetadata("returnNotNullIfNone2.kt") public void testReturnNotNullIfNone2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone2.kt"); } @TestMetadata("return_comment.kt") public void testReturn_comment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/return_comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/return_comment.kt"); } @TestMetadata("safeDotExpression.kt") public void testSafeDotExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/safeDotExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/safeDotExpression.kt"); } @TestMetadata("withMergedFilter.kt") public void testWithMergedFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/withMergedFilter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/withMergedFilter.kt"); } } @@ -752,74 +663,67 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FlatMap extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFlatMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/flatMap"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/break.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/continue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/continue.kt"); } @TestMetadata("flatMapTo.kt") public void testFlatMapTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo.kt"); } @TestMetadata("flatMapTo2.kt") public void testFlatMapTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo2.kt"); } @TestMetadata("flatMapTo3.kt") public void testFlatMapTo3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo3.kt"); } @TestMetadata("indexUsed.kt") public void testIndexUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/indexUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/indexUsed.kt"); } @TestMetadata("inputVarStillNeeded.kt") public void testInputVarStillNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/inputVarStillNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/inputVarStillNeeded.kt"); } @TestMetadata("notIterable.kt") public void testNotIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/notIterable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/notIterable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/simple.kt"); } @TestMetadata("wrongBreak.kt") public void testWrongBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/wrongBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/wrongBreak.kt"); } @TestMetadata("wrongContinue.kt") public void testWrongContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/wrongContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/wrongContinue.kt"); } } @@ -827,50 +731,47 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForEach extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForEach() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/forEach"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("indexed.kt") public void testIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/indexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/indexed.kt"); } @TestMetadata("indexed_nothingElse.kt") public void testIndexed_nothingElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/indexed_nothingElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/indexed_nothingElse.kt"); } @TestMetadata("KT14341.kt") public void testKT14341() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/KT14341.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/KT14341.kt"); } @TestMetadata("KT21083.kt") public void testKT21083() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/KT21083.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/KT21083.kt"); } @TestMetadata("notAvailable.kt") public void testNotAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/notAvailable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/notAvailable.kt"); } @TestMetadata("notIndexed.kt") public void testNotIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/notIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/notIndexed.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/simple.kt"); } } @@ -878,50 +779,47 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IndexOf extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIndexOf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/indexOf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("indexOf.kt") public void testIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOf.kt"); } @TestMetadata("indexOfFirst_ifAssign.kt") public void testIndexOfFirst_ifAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifAssign.kt"); } @TestMetadata("indexOfFirst_ifReturn.kt") public void testIndexOfFirst_ifReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifReturn.kt"); } @TestMetadata("indexOfFirst_mustBeNoIndexInCondition.kt") public void testIndexOfFirst_mustBeNoIndexInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_mustBeNoIndexInCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_mustBeNoIndexInCondition.kt"); } @TestMetadata("indexOfLast_ifAssign.kt") public void testIndexOfLast_ifAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfLast_ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfLast_ifAssign.kt"); } @TestMetadata("KT14303.kt") public void testKT14303() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/KT14303.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/KT14303.kt"); } @TestMetadata("lastIndexOf.kt") public void testLastIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/lastIndexOf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/lastIndexOf.kt"); } } @@ -929,56 +827,52 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceIndex extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/introduceIndex"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("indexPlusPlusInsideExpression.kt") public void testIndexPlusPlusInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression.kt"); } @TestMetadata("indexPlusPlusInsideExpression_indexUsedAfterIncrement.kt") public void testIndexPlusPlusInsideExpression_indexUsedAfterIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedAfterIncrement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedAfterIncrement.kt"); } @TestMetadata("indexPlusPlusInsideExpression_indexUsedBeforeIncrement.kt") public void testIndexPlusPlusInsideExpression_indexUsedBeforeIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement.kt"); } @TestMetadata("indexPlusPlusInsideExpression_indexUsedBeforeIncrement2.kt") public void testIndexPlusPlusInsideExpression_indexUsedBeforeIncrement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement2.kt"); } @TestMetadata("indexPlusPlusIsNotLastStatement.kt") public void testIndexPlusPlusIsNotLastStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement.kt"); } @TestMetadata("indexPlusPlusIsNotLastStatement_indexUsedAfterIncrement.kt") public void testIndexPlusPlusIsNotLastStatement_indexUsedAfterIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement_indexUsedAfterIncrement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement_indexUsedAfterIncrement.kt"); } @TestMetadata("indexWithNestedLoop.kt") public void testIndexWithNestedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexWithNestedLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexWithNestedLoop.kt"); } @TestMetadata("prefixIndexPlusPlusInsideExpression.kt") public void testPrefixIndexPlusPlusInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/prefixIndexPlusPlusInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/prefixIndexPlusPlusInsideExpression.kt"); } } @@ -986,176 +880,152 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Map extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/map"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignMap.kt") public void testAssignMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/assignMap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/assignMap.kt"); } @TestMetadata("assignMap2.kt") public void testAssignMap2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/assignMap2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/assignMap2.kt"); } @TestMetadata("KT18816.kt") public void testKT18816() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/KT18816.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/KT18816.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/map.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/map.kt"); } @TestMetadata("mapAndFilterIndexed.kt") public void testMapAndFilterIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapAndFilterIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapAndFilterIndexed.kt"); } @TestMetadata("mapIndexed.kt") public void testMapIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexed.kt"); } @TestMetadata("mapIndexedNotNull.kt") public void testMapIndexedNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull.kt"); } @TestMetadata("mapIndexedNotNullTo.kt") public void testMapIndexedNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo.kt"); } @TestMetadata("mapIndexedNotNullTo_elvisContinue.kt") public void testMapIndexedNotNullTo_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo_elvisContinue.kt"); } @TestMetadata("mapIndexedNotNull_elvisContinue.kt") public void testMapIndexedNotNull_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull_elvisContinue.kt"); } @TestMetadata("mapIndexedTo.kt") public void testMapIndexedTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedTo.kt"); } @TestMetadata("mapIndexed_afterFilter.kt") public void testMapIndexed_afterFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexed_afterFilter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexed_afterFilter.kt"); } @TestMetadata("mapIndexed_twice.kt") public void testMapIndexed_twice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexed_twice.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexed_twice.kt"); } @TestMetadata("mapNotNull.kt") public void testMapNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull.kt"); } @TestMetadata("mapNotNullTo.kt") public void testMapNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNullTo.kt"); } @TestMetadata("mapNotNullTo_elvisContinue.kt") public void testMapNotNullTo_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNullTo_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNullTo_elvisContinue.kt"); } @TestMetadata("mapNotNull_elvisContinue.kt") public void testMapNotNull_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull_elvisContinue.kt"); } @TestMetadata("mapNotNull_nestedLoopElvisContinue.kt") public void testMapNotNull_nestedLoopElvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull_nestedLoopElvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull_nestedLoopElvisContinue.kt"); } @TestMetadata("mapNotNull_wrongElvisContinue.kt") public void testMapNotNull_wrongElvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull_wrongElvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull_wrongElvisContinue.kt"); } @TestMetadata("mapTo.kt") public void testMapTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo.kt"); } @TestMetadata("mapTo2.kt") public void testMapTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo2.kt"); } @TestMetadata("mapTo3.kt") public void testMapTo3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo3.kt"); } @TestMetadata("mapTo4.kt") public void testMapTo4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo4.kt"); } @TestMetadata("mapTo_inputVarNotUsed.kt") public void testMapTo_inputVarNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo_inputVarNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo_inputVarNotUsed.kt"); } @TestMetadata("mapUsesOldIndexAfterFilter.kt") public void testMapUsesOldIndexAfterFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapUsesOldIndexAfterFilter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapUsesOldIndexAfterFilter.kt"); } @TestMetadata("mapVar.kt") public void testMapVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapVar.kt"); } @TestMetadata("map_var.kt") public void testMap_var() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/map_var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/map_var.kt"); } @TestMetadata("map_variableStillNeeded.kt") public void testMap_variableStillNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/map_variableStillNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/map_variableStillNeeded.kt"); } } @@ -1163,86 +1033,77 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaxMin extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMaxMin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/maxMin"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("KT14210.kt") public void testKT14210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/KT14210.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/KT14210.kt"); } @TestMetadata("max1.kt") public void testMax1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max1.kt"); } @TestMetadata("max2.kt") public void testMax2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max2.kt"); } @TestMetadata("max3.kt") public void testMax3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max3.kt"); } @TestMetadata("max4.kt") public void testMax4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max4.kt"); } @TestMetadata("max5.kt") public void testMax5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max5.kt"); } @TestMetadata("max6.kt") public void testMax6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max6.kt"); } @TestMetadata("max7.kt") public void testMax7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max7.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max7.kt"); } @TestMetadata("min1.kt") public void testMin1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min1.kt"); } @TestMetadata("min2.kt") public void testMin2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min2.kt"); } @TestMetadata("min3.kt") public void testMin3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min3.kt"); } @TestMetadata("min4.kt") public void testMin4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min4.kt"); } @TestMetadata("min5.kt") public void testMin5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min5.kt"); } } @@ -1250,98 +1111,87 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/smartCasts"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("errorOutsideLoop.kt") public void testErrorOutsideLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/errorOutsideLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/errorOutsideLoop.kt"); } @TestMetadata("smartCastNotBroken.kt") public void testSmartCastNotBroken() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken.kt"); } @TestMetadata("smartCastNotBroken2.kt") public void testSmartCastNotBroken2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken2.kt"); } @TestMetadata("smartCastNotBroken3.kt") public void testSmartCastNotBroken3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken3.kt"); } @TestMetadata("smartCastNotBroken4.kt") public void testSmartCastNotBroken4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken4.kt"); } @TestMetadata("smartCastNotBroken5.kt") public void testSmartCastNotBroken5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken5.kt"); } @TestMetadata("smartCastNotNullRequired.kt") public void testSmartCastNotNullRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotNullRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotNullRequired.kt"); } @TestMetadata("smartCastNotRequired.kt") public void testSmartCastNotRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotRequired.kt"); } @TestMetadata("smartCastRequired.kt") public void testSmartCastRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired.kt"); } @TestMetadata("smartCastRequired2.kt") public void testSmartCastRequired2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired2.kt"); } @TestMetadata("smartCastRequired3.kt") public void testSmartCastRequired3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired3.kt"); } @TestMetadata("smartCastRequired4.kt") public void testSmartCastRequired4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired4.kt"); } @TestMetadata("smartCastRequired5.kt") public void testSmartCastRequired5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired5.kt"); } @TestMetadata("smartCastRequired6.kt") public void testSmartCastRequired6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired6.kt"); } @TestMetadata("smartCastThisRequired.kt") public void testSmartCastThisRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastThisRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastThisRequired.kt"); } } @@ -1349,110 +1199,97 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sum extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/sum"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("bytes.kt") public void testBytes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/bytes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/bytes.kt"); } @TestMetadata("doubles.kt") public void testDoubles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/doubles.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/doubles.kt"); } @TestMetadata("floats.kt") public void testFloats() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/floats.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/floats.kt"); } @TestMetadata("floatsIntoDouble.kt") public void testFloatsIntoDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/floatsIntoDouble.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/floatsIntoDouble.kt"); } @TestMetadata("indexUsed.kt") public void testIndexUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/indexUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/indexUsed.kt"); } @TestMetadata("indexUsed2.kt") public void testIndexUsed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/indexUsed2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/indexUsed2.kt"); } @TestMetadata("ints.kt") public void testInts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/ints.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/ints.kt"); } @TestMetadata("longs.kt") public void testLongs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/longs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/longs.kt"); } @TestMetadata("nonNumbers.kt") public void testNonNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/nonNumbers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/nonNumbers.kt"); } @TestMetadata("nonZeroInitial.kt") public void testNonZeroInitial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/nonZeroInitial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/nonZeroInitial.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/short.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/short.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/smartCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/smartCast.kt"); } @TestMetadata("smartCastNotNull.kt") public void testSmartCastNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/smartCastNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/smartCastNotNull.kt"); } @TestMetadata("sumByDouble.kt") public void testSumByDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByDouble.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByDouble.kt"); } @TestMetadata("sumByInts.kt") public void testSumByInts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByInts.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByInts.kt"); } @TestMetadata("sumByIntsIntoLong.kt") public void testSumByIntsIntoLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByIntsIntoLong.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByIntsIntoLong.kt"); } @TestMetadata("sumByShorts.kt") public void testSumByShorts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByShorts.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByShorts.kt"); } } @@ -1460,38 +1297,37 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TakeWhile extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTakeWhile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/takeWhile"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ifElse1.kt") public void testIfElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/ifElse1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/ifElse1.kt"); } @TestMetadata("ifElse2.kt") public void testIfElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/ifElse2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/ifElse2.kt"); } @TestMetadata("nestedLoop.kt") public void testNestedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/nestedLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/nestedLoop.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/simple.kt"); } @TestMetadata("wrongBreak.kt") public void testWrongBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/wrongBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/wrongBreak.kt"); } } @@ -1499,16 +1335,18 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToCollection extends AbstractIntentionTest2 { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAfterLoop.kt") public void testAddAfterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/addAfterLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/addAfterLoop.kt"); } @TestMetadata("addToCollection.kt") public void testAddToCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/addToCollection.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/addToCollection.kt"); } public void testAllFilesPresentInToCollection() throws Exception { @@ -1517,86 +1355,72 @@ public class IntentionTest2Generated extends AbstractIntentionTest2 { @TestMetadata("badReceiver1.kt") public void testBadReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/badReceiver1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/badReceiver1.kt"); } @TestMetadata("badReceiver2.kt") public void testBadReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/badReceiver2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/badReceiver2.kt"); } @TestMetadata("explicitValType.kt") public void testExplicitValType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/explicitValType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/explicitValType.kt"); } @TestMetadata("goodReceiver.kt") public void testGoodReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/goodReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/goodReceiver.kt"); } @TestMetadata("KT18881.kt") public void testKT18881() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/KT18881.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/KT18881.kt"); } @TestMetadata("resultCollectionUsedInsideLoop.kt") public void testResultCollectionUsedInsideLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/resultCollectionUsedInsideLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/resultCollectionUsedInsideLoop.kt"); } @TestMetadata("toList.kt") public void testToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toList.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toList.kt"); } @TestMetadata("toList2.kt") public void testToList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toList2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toList2.kt"); } @TestMetadata("toList3.kt") public void testToList3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toList3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toList3.kt"); } @TestMetadata("toMutableSet.kt") public void testToMutableSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet.kt"); } @TestMetadata("toMutableSet2.kt") public void testToMutableSet2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet2.kt"); } @TestMetadata("toMutableSet3.kt") public void testToMutableSet3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet3.kt"); } @TestMetadata("toSet.kt") public void testToSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toSet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toSet.kt"); } @TestMetadata("toSetWithMap.kt") public void testToSetWithMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toSetWithMap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toSetWithMap.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 269af36862b..c91f3f69b43 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IntentionTestGenerated extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntentions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -29,114 +33,111 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddAnnotationUseSiteTarget extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddAnnotationUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("hasAnnotationArgs.kt") public void testHasAnnotationArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/hasAnnotationArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/hasAnnotationArgs.kt"); } @TestMetadata("hasTarget1.kt") public void testHasTarget1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/hasTarget1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/hasTarget1.kt"); } @TestMetadata("hasTarget2.kt") public void testHasTarget2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/hasTarget2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/hasTarget2.kt"); } @TestMetadata("hasTarget3.kt") public void testHasTarget3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/hasTarget3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/hasTarget3.kt"); } @TestMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/constructor"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/parameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/parameter.kt"); } @TestMetadata("secondary.kt") public void testSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/secondary.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/secondary.kt"); } @TestMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Val extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/val/setparam.kt"); } } @@ -144,62 +145,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Var extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVar() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/constructor/var/setparam.kt"); } } } @@ -208,6 +204,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Extension extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/extension"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -216,62 +216,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/function/setparam.kt"); } } @@ -279,62 +274,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/extension/property/setparam.kt"); } } } @@ -343,76 +333,74 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/property"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/local.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/local.kt"); } @TestMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegate extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/delegate/setparam.kt"); } } @@ -420,62 +408,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Val extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/property/val"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/val/setparam.kt"); } } @@ -483,62 +466,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ValNoBacking extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInValNoBacking() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/valNoBacking/setparam.kt"); } } @@ -546,62 +524,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Var extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVar() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/property/var"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/var/setparam.kt"); } } @@ -609,62 +582,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarNoBacking extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarNoBacking() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/delegate.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/field.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/field.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/file.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/file.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/get.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/param.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/param.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/property.kt"); } @TestMetadata("receiver.kt") public void testReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/receiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/receiver.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/set.kt"); } @TestMetadata("setparam.kt") public void testSetparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/setparam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addAnnotationUseSiteTarget/property/varNoBacking/setparam.kt"); } } } @@ -674,58 +642,53 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddBraces extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addBracesForDoWhile.kt") public void testAddBracesForDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForDoWhile.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForDoWhile.kt"); } @TestMetadata("addBracesForElse.kt") public void testAddBracesForElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForElse.kt"); } @TestMetadata("addBracesForFor.kt") public void testAddBracesForFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForFor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForFor.kt"); } @TestMetadata("addBracesForIf.kt") public void testAddBracesForIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForIf.kt"); } @TestMetadata("addBracesForIfWithNoSpace.kt") public void testAddBracesForIfWithNoSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForIfWithNoSpace.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForIfWithNoSpace.kt"); } @TestMetadata("addBracesForIfWithSemicolon.kt") public void testAddBracesForIfWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForIfWithSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForIfWithSemicolon.kt"); } @TestMetadata("addBracesForIfWithSemicolonAndExpression.kt") public void testAddBracesForIfWithSemicolonAndExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForIfWithSemicolonAndExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForIfWithSemicolonAndExpression.kt"); } @TestMetadata("addBracesForWhile.kt") public void testAddBracesForWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesForWhile.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesForWhile.kt"); } @TestMetadata("addBracesWithBraces.kt") public void testAddBracesWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/addBracesWithBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/addBracesWithBraces.kt"); } public void testAllFilesPresentInAddBraces() throws Exception { @@ -734,62 +697,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("doWhileWithComment.kt") public void testDoWhileWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/doWhileWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/doWhileWithComment.kt"); } @TestMetadata("elseWithComment.kt") public void testElseWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/elseWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/elseWithComment.kt"); } @TestMetadata("forWithComment.kt") public void testForWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/forWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/forWithComment.kt"); } @TestMetadata("ifElseWithComment.kt") public void testIfElseWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/ifElseWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/ifElseWithComment.kt"); } @TestMetadata("ifWithComment.kt") public void testIfWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/ifWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/ifWithComment.kt"); } @TestMetadata("notInsideElseIfBlock.kt") public void testNotInsideElseIfBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/notInsideElseIfBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/notInsideElseIfBlock.kt"); } @TestMetadata("whenHasBraces.kt") public void testWhenHasBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/whenHasBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/whenHasBraces.kt"); } @TestMetadata("whenSimple.kt") public void testWhenSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/whenSimple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/whenSimple.kt"); } @TestMetadata("whenWithComment.kt") public void testWhenWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/whenWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/whenWithComment.kt"); } @TestMetadata("whileWithComment.kt") public void testWhileWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addBraces/whileWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addBraces/whileWithComment.kt"); } } @@ -797,38 +750,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddConstModifier extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddConstModifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addConstModifier"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inapplicableToConst.kt") public void testInapplicableToConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addConstModifier/inapplicableToConst.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addConstModifier/inapplicableToConst.kt"); } @TestMetadata("inapplicableToOverride.kt") public void testInapplicableToOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addConstModifier/inapplicableToOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addConstModifier/inapplicableToOverride.kt"); } @TestMetadata("removeJvmField.kt") public void testRemoveJvmField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addConstModifier/removeJvmField.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addConstModifier/removeJvmField.kt"); } @TestMetadata("removeJvmStatic.kt") public void testRemoveJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addConstModifier/removeJvmStatic.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addConstModifier/removeJvmStatic.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addConstModifier/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addConstModifier/simple.kt"); } } @@ -836,86 +788,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddForLoopIndices extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddForLoopIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addForLoopIndices"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("explicitParamType.kt") public void testExplicitParamType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/explicitParamType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/explicitParamType.kt"); } @TestMetadata("inapplicableExistingIndices.kt") public void testInapplicableExistingIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableExistingIndices.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/inapplicableExistingIndices.kt"); } @TestMetadata("inapplicableInBody.kt") public void testInapplicableInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableInBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/inapplicableInBody.kt"); } @TestMetadata("inapplicableOnMap.kt") public void testInapplicableOnMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableOnMap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/inapplicableOnMap.kt"); } @TestMetadata("inapplicableOverridenFunction.kt") public void testInapplicableOverridenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableOverridenFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/inapplicableOverridenFunction.kt"); } @TestMetadata("inapplicableUnresolved.kt") public void testInapplicableUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/inapplicableUnresolved.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/inapplicableUnresolved.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/intArray.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/intArray.kt"); } @TestMetadata("iterable.kt") public void testIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/iterable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/iterable.kt"); } @TestMetadata("noBody.kt") public void testNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/noBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/noBody.kt"); } @TestMetadata("objectArray.kt") public void testObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/objectArray.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/objectArray.kt"); } @TestMetadata("sequence.kt") public void testSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/sequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/sequence.kt"); } @TestMetadata("simpleIntList.kt") public void testSimpleIntList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/simpleIntList.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/simpleIntList.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addForLoopIndices/string.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addForLoopIndices/string.kt"); } } @@ -923,50 +866,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddJvmOverloads extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addJvmOverloads"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("alreadyHasAnnotation.kt") public void testAlreadyHasAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/alreadyHasAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/alreadyHasAnnotation.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/method.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/method.kt"); } @TestMetadata("noDefaultParams.kt") public void testNoDefaultParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/noDefaultParams.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/noDefaultParams.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/primaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/primaryConstructor.kt"); } @TestMetadata("primaryConstructorOneWithDefault.kt") public void testPrimaryConstructorOneWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/primaryConstructorOneWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/primaryConstructorOneWithDefault.kt"); } @TestMetadata("primaryConstructorWithConstructorKeyword.kt") public void testPrimaryConstructorWithConstructorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/primaryConstructorWithConstructorKeyword.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/primaryConstructorWithConstructorKeyword.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmOverloads/secondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmOverloads/secondaryConstructor.kt"); } } @@ -974,10 +914,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddJvmStatic extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractVal.kt") public void testAbstractVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/abstractVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/abstractVal.kt"); } public void testAllFilesPresentInAddJvmStatic() throws Exception { @@ -986,74 +929,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("constVal.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/constVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/constVal.kt"); } @TestMetadata("funInAnonymousObject.kt") public void testFunInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/funInAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/funInAnonymousObject.kt"); } @TestMetadata("funInClass.kt") public void testFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/funInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/funInClass.kt"); } @TestMetadata("funWithJvmStatic.kt") public void testFunWithJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/funWithJvmStatic.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/funWithJvmStatic.kt"); } @TestMetadata("openVal.kt") public void testOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/openVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/openVal.kt"); } @TestMetadata("overrideVal.kt") public void testOverrideVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/overrideVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/overrideVal.kt"); } @TestMetadata("topLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/topLevelFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/topLevelFun.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/topLevelVal.kt"); } @TestMetadata("valInAnonymousObject.kt") public void testValInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/valInAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/valInAnonymousObject.kt"); } @TestMetadata("valInClass.kt") public void testValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/valInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/valInClass.kt"); } @TestMetadata("valWithJvmField.kt") public void testValWithJvmField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/valWithJvmField.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/valWithJvmField.kt"); } @TestMetadata("valWithJvmStatic.kt") public void testValWithJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addJvmStatic/valWithJvmStatic.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addJvmStatic/valWithJvmStatic.kt"); } } @@ -1061,86 +992,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddLabeledReturnInLambda extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddLabeledReturnInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addLabeledReturnInLambda"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("insideParenthesis.kt") public void testInsideParenthesis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/insideParenthesis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/insideParenthesis.kt"); } @TestMetadata("labeledLambda.kt") public void testLabeledLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/labeledLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/labeledLambda.kt"); } @TestMetadata("loop.kt") public void testLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/loop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/loop.kt"); } @TestMetadata("multipleBlocks.kt") public void testMultipleBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/multipleBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/multipleBlocks.kt"); } @TestMetadata("multipleHighOrderFun.kt") public void testMultipleHighOrderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/multipleHighOrderFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/multipleHighOrderFun.kt"); } @TestMetadata("multipleHighOrderFun2.kt") public void testMultipleHighOrderFun2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/multipleHighOrderFun2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/multipleHighOrderFun2.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/normal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/normal.kt"); } @TestMetadata("notLast.kt") public void testNotLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/notLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/notLast.kt"); } @TestMetadata("returnStatement.kt") public void testReturnStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/returnStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/returnStatement.kt"); } @TestMetadata("suspend.kt") public void testSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/suspend.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/suspend.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/unit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/unit.kt"); } @TestMetadata("withLabeledReturn.kt") public void testWithLabeledReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/withLabeledReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/withLabeledReturn.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addLabeledReturnInLambda/withReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addLabeledReturnInLambda/withReturn.kt"); } } @@ -1148,32 +1070,32 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddMissingDestructuring extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddMissingDestructuring() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addMissingDestructuring"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("notAvailable.kt") public void testNotAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addMissingDestructuring/notAvailable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addMissingDestructuring/notAvailable.kt"); } @TestMetadata("sameName.kt") public void testSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addMissingDestructuring/sameName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addMissingDestructuring/sameName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addMissingDestructuring/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addMissingDestructuring/simple.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addMissingDestructuring/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addMissingDestructuring/var.kt"); } } @@ -1181,128 +1103,112 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddNameToArgument extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddNameToArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addNameToArgument"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("alreadyNamed.kt") public void testAlreadyNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/alreadyNamed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/alreadyNamed.kt"); } @TestMetadata("ambiguousCall.kt") public void testAmbiguousCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/ambiguousCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/ambiguousCall.kt"); } @TestMetadata("beforeOtherNamed.kt") public void testBeforeOtherNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/beforeOtherNamed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/beforeOtherNamed.kt"); } @TestMetadata("functionLiteralArgument.kt") public void testFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/functionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/functionLiteralArgument.kt"); } @TestMetadata("incompleteCall.kt") public void testIncompleteCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/incompleteCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/incompleteCall.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/javaMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/javaMethod.kt"); } @TestMetadata("kt11679.kt") public void testKt11679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/kt11679.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/kt11679.kt"); } @TestMetadata("notInsideIndices.kt") public void testNotInsideIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/notInsideIndices.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/notInsideIndices.kt"); } @TestMetadata("notInsideNestedArgumentList.kt") public void testNotInsideNestedArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/notInsideNestedArgumentList.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/notInsideNestedArgumentList.kt"); } @TestMetadata("notInsideNestedArgumentList2.kt") public void testNotInsideNestedArgumentList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/notInsideNestedArgumentList2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/notInsideNestedArgumentList2.kt"); } @TestMetadata("notLast.kt") public void testNotLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/notLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/notLast.kt"); } @TestMetadata("notResolved.kt") public void testNotResolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/notResolved.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/notResolved.kt"); } @TestMetadata("rangeForLambda1.kt") public void testRangeForLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/rangeForLambda1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/rangeForLambda1.kt"); } @TestMetadata("rangeForLambda2.kt") public void testRangeForLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/rangeForLambda2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/rangeForLambda2.kt"); } @TestMetadata("rangeForLambda3.kt") public void testRangeForLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/rangeForLambda3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/rangeForLambda3.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/simple.kt"); } @TestMetadata("superClassConstructor.kt") public void testSuperClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/superClassConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/superClassConstructor.kt"); } @TestMetadata("vararg1.kt") public void testVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/vararg1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/vararg1.kt"); } @TestMetadata("vararg2.kt") public void testVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/vararg2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/vararg2.kt"); } @TestMetadata("vararg3.kt") public void testVararg3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNameToArgument/vararg3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNameToArgument/vararg3.kt"); } } @@ -1310,80 +1216,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddNamesToCallArguments extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddNamesToCallArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addNamesToCallArguments"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("allNamed.kt") public void testAllNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/allNamed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/allNamed.kt"); } @TestMetadata("ambiguousCall.kt") public void testAmbiguousCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/ambiguousCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/ambiguousCall.kt"); } @TestMetadata("incompleteCall.kt") public void testIncompleteCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/incompleteCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/incompleteCall.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/javaMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/javaMethod.kt"); } @TestMetadata("notOnCallee.kt") public void testNotOnCallee() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/notOnCallee.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/notOnCallee.kt"); } @TestMetadata("notResolved.kt") public void testNotResolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/notResolved.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/notResolved.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/simple.kt"); } @TestMetadata("superClassConstructor.kt") public void testSuperClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/superClassConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/superClassConstructor.kt"); } @TestMetadata("trailingLambda.kt") public void testTrailingLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/trailingLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/trailingLambda.kt"); } @TestMetadata("varargMultiple.kt") public void testVarargMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/varargMultiple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/varargMultiple.kt"); } @TestMetadata("varargSingle.kt") public void testVarargSingle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/varargSingle.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/varargSingle.kt"); } @TestMetadata("varargSingleWithSpread.kt") public void testVarargSingleWithSpread() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addNamesToCallArguments/varargSingleWithSpread.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addNamesToCallArguments/varargSingleWithSpread.kt"); } } @@ -1391,16 +1289,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddOpenModifier extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/abstractClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/abstractClass.kt"); } @TestMetadata("abstractFunction.kt") public void testAbstractFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/abstractFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/abstractFunction.kt"); } public void testAllFilesPresentInAddOpenModifier() throws Exception { @@ -1409,74 +1309,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("alreadyOpen.kt") public void testAlreadyOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/alreadyOpen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/alreadyOpen.kt"); } @TestMetadata("destructuringDeclaration.kt") public void testDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/destructuringDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/destructuringDeclaration.kt"); } @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/enumClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/enumClass.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/function.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/function.kt"); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/interface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/interface.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/localFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/localFunction.kt"); } @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/localProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/localProperty.kt"); } @TestMetadata("notOpen.kt") public void testNotOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/notOpen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/notOpen.kt"); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/parameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/parameter.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/private.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/private.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/property.kt"); } @TestMetadata("sealedClass.kt") public void testSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOpenModifier/sealedClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOpenModifier/sealedClass.kt"); } } @@ -1484,50 +1372,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddOperatorModifier extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddOperatorModifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addOperatorModifier"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("containsBool.kt") public void testContainsBool() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/containsBool.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/containsBool.kt"); } @TestMetadata("containsInt.kt") public void testContainsInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/containsInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/containsInt.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/extension.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/extension.kt"); } @TestMetadata("forOverride.kt") public void testForOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/forOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/forOverride.kt"); } @TestMetadata("overridden.kt") public void testOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/overridden.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/overridden.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/simple.kt"); } @TestMetadata("toplevel.kt") public void testToplevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addOperatorModifier/toplevel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addOperatorModifier/toplevel.kt"); } } @@ -1535,6 +1420,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddPropertyAccessors extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddPropertyAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/addPropertyAccessors"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -1543,10 +1432,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Both extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/abstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/abstract.kt"); } public void testAllFilesPresentInBoth() throws Exception { @@ -1555,56 +1447,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/delegate.kt"); } @TestMetadata("hasAccessor.kt") public void testHasAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/hasAccessor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/hasAccessor.kt"); } @TestMetadata("hasGetter.kt") public void testHasGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/hasGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/hasGetter.kt"); } @TestMetadata("hasSetter.kt") public void testHasSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/hasSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/hasSetter.kt"); } @TestMetadata("lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/lateinit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/lateinit.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/local.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/local.kt"); } @TestMetadata("top.kt") public void testTop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/top.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/top.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/val.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/both/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/both/var.kt"); } } @@ -1612,10 +1495,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Getter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/abstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/abstract.kt"); } public void testAllFilesPresentInGetter() throws Exception { @@ -1624,62 +1510,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/delegate.kt"); } @TestMetadata("hasAccessor.kt") public void testHasAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/hasAccessor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/hasAccessor.kt"); } @TestMetadata("hasGetter.kt") public void testHasGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/hasGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/hasGetter.kt"); } @TestMetadata("hasSetter.kt") public void testHasSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/hasSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/hasSetter.kt"); } @TestMetadata("header.kt") public void testHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/header.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/header.kt"); } @TestMetadata("lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/lateinit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/lateinit.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/local.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/local.kt"); } @TestMetadata("top.kt") public void testTop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/top.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/top.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/val.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/getter/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/getter/var.kt"); } } @@ -1687,10 +1563,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Setter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/abstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/abstract.kt"); } public void testAllFilesPresentInSetter() throws Exception { @@ -1699,56 +1578,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/delegate.kt"); } @TestMetadata("hasAccessor.kt") public void testHasAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/hasAccessor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/hasAccessor.kt"); } @TestMetadata("hasGetter.kt") public void testHasGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/hasGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/hasGetter.kt"); } @TestMetadata("hasSetter.kt") public void testHasSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/hasSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/hasSetter.kt"); } @TestMetadata("lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/lateinit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/lateinit.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/local.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/local.kt"); } @TestMetadata("top.kt") public void testTop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/top.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/top.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/val.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addPropertyAccessors/setter/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addPropertyAccessors/setter/var.kt"); } } } @@ -1757,10 +1627,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddValOrVar extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addVal.kt") public void testAddVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/addVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/addVal.kt"); } public void testAllFilesPresentInAddValOrVar() throws Exception { @@ -1769,38 +1642,32 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/dataClass.kt"); } @TestMetadata("funParameter.kt") public void testFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/funParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/funParameter.kt"); } @TestMetadata("hasVal.kt") public void testHasVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/hasVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/hasVal.kt"); } @TestMetadata("hasVar.kt") public void testHasVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/hasVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/hasVar.kt"); } @TestMetadata("outOfRange.kt") public void testOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/outOfRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/outOfRange.kt"); } @TestMetadata("secondaryConstructorParameter.kt") public void testSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/addValOrVar/secondaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/addValOrVar/secondaryConstructorParameter.kt"); } } @@ -1808,68 +1675,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousFunctionToLambda extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousFunctionToLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/anonymousFunctionToLambda"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callMultiline.kt") public void testCallMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/callMultiline.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/callMultiline.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/constructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/constructor.kt"); } @TestMetadata("emptyBody.kt") public void testEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/emptyBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/emptyBody.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/expressionBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/expressionBody.kt"); } @TestMetadata("fullParam.kt") public void testFullParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/fullParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/fullParam.kt"); } @TestMetadata("moveOut.kt") public void testMoveOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/moveOut.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/moveOut.kt"); } @TestMetadata("paramName.kt") public void testParamName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/paramName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/paramName.kt"); } @TestMetadata("replaceReturnWithExpression.kt") public void testReplaceReturnWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/replaceReturnWithExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/replaceReturnWithExpression.kt"); } @TestMetadata("replaceReturnWithLabel.kt") public void testReplaceReturnWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/replaceReturnWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/replaceReturnWithLabel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/anonymousFunctionToLambda/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/anonymousFunctionToLambda/simple.kt"); } } @@ -1877,6 +1738,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Branched extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBranched() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -1885,86 +1750,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DoubleBangToIfThen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDoubleBangToIfThen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/doubleBangToIfThen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callExpression.kt") public void testCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/callExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/callExpression.kt"); } @TestMetadata("callExpressionParens.kt") public void testCallExpressionParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/callExpressionParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/callExpressionParens.kt"); } @TestMetadata("exceptionTextEscapesQuotes.kt") public void testExceptionTextEscapesQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextEscapesQuotes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextEscapesQuotes.kt"); } @TestMetadata("exceptionTextHandlesMultiline.kt") public void testExceptionTextHandlesMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextHandlesMultiline.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/exceptionTextHandlesMultiline.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/localVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/localVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/localVar.kt"); } @TestMetadata("simpleNameExpressionInParens.kt") public void testSimpleNameExpressionInParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/simpleNameExpressionInParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/simpleNameExpressionInParens.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/topLevelVal.kt"); } @TestMetadata("topLevelValCustomGetter.kt") public void testTopLevelValCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/topLevelValCustomGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/topLevelValCustomGetter.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/topLevelVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/topLevelVar.kt"); } @TestMetadata("topLevelVarCustomGetter.kt") public void testTopLevelVarCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/topLevelVarCustomGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/topLevelVarCustomGetter.kt"); } @TestMetadata("usedInAssignment.kt") public void testUsedInAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/usedInAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/usedInAssignment.kt"); } @TestMetadata("withAnnotation.kt") public void testWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/doubleBangToIfThen/withAnnotation.kt"); } } @@ -1972,104 +1828,92 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ElvisToIfThen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInElvisToIfThen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/elvisToIfThen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callExpression.kt") public void testCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/callExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/callExpression.kt"); } @TestMetadata("callExpressionParens.kt") public void testCallExpressionParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/callExpressionParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/callExpressionParens.kt"); } @TestMetadata("elvisAsExpression.kt") public void testElvisAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/elvisAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/elvisAsExpression.kt"); } @TestMetadata("fakeSafeCast.kt") public void testFakeSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/fakeSafeCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/fakeSafeCast.kt"); } @TestMetadata("localValLhs.kt") public void testLocalValLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/localValLhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/localValLhs.kt"); } @TestMetadata("localVarLhs.kt") public void testLocalVarLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/localVarLhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/localVarLhs.kt"); } @TestMetadata("longSafeCast.kt") public void testLongSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/longSafeCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/longSafeCast.kt"); } @TestMetadata("safeCast.kt") public void testSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/safeCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/safeCast.kt"); } @TestMetadata("safeCastUnstable.kt") public void testSafeCastUnstable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/safeCastUnstable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/safeCastUnstable.kt"); } @TestMetadata("simpleNameExpression.kt") public void testSimpleNameExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/simpleNameExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/simpleNameExpression.kt"); } @TestMetadata("simpleNameExpressionInParens.kt") public void testSimpleNameExpressionInParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/simpleNameExpressionInParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/simpleNameExpressionInParens.kt"); } @TestMetadata("simpleSafeCast.kt") public void testSimpleSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/simpleSafeCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/simpleSafeCast.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/topLevelVal.kt"); } @TestMetadata("topLevelValCustomGetter.kt") public void testTopLevelValCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/topLevelValCustomGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/topLevelValCustomGetter.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/topLevelVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/topLevelVar.kt"); } @TestMetadata("topLevelVarCustomGetter.kt") public void testTopLevelVarCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/elvisToIfThen/topLevelVarCustomGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/elvisToIfThen/topLevelVarCustomGetter.kt"); } } @@ -2077,6 +1921,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Folding extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFolding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -2085,26 +1933,27 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfToReturnAsymmetrically extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfToReturnAsymmetrically() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simpleIf.kt") public void testSimpleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically/simpleIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically/simpleIf.kt"); } @TestMetadata("simpleIfWithBlocks.kt") public void testSimpleIfWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically/simpleIfWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically/simpleIfWithBlocks.kt"); } @TestMetadata("simpleIfWithComments.kt") public void testSimpleIfWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically/simpleIfWithComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/folding/ifToReturnAsymmetrically/simpleIfWithComments.kt"); } } } @@ -2113,28 +1962,28 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfThenToDoubleBang extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("acceptableEmptyElseBlockForStatement.kt") public void testAcceptableEmptyElseBlockForStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableEmptyElseBlockForStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableEmptyElseBlockForStatement.kt"); } @TestMetadata("acceptableEmptyThenBlockForStatement.kt") public void testAcceptableEmptyThenBlockForStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableEmptyThenBlockForStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableEmptyThenBlockForStatement.kt"); } @TestMetadata("acceptableWithoutElseBlockForStatementWithFun.kt") public void testAcceptableWithoutElseBlockForStatementWithFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableWithoutElseBlockForStatementWithFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableWithoutElseBlockForStatementWithFun.kt"); } @TestMetadata("acceptableWithoutElseBlockForStatementWithVal.kt") public void testAcceptableWithoutElseBlockForStatementWithVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableWithoutElseBlockForStatementWithVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/acceptableWithoutElseBlockForStatementWithVal.kt"); } public void testAllFilesPresentInIfThenToDoubleBang() throws Exception { @@ -2143,194 +1992,162 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("applicableForLocalStableVar.kt") public void testApplicableForLocalStableVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/applicableForLocalStableVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/applicableForLocalStableVar.kt"); } @TestMetadata("blockHasMoreThanOneStatement.kt") public void testBlockHasMoreThanOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/blockHasMoreThanOneStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/blockHasMoreThanOneStatement.kt"); } @TestMetadata("blockUsesDifferentVar.kt") public void testBlockUsesDifferentVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/blockUsesDifferentVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/blockUsesDifferentVar.kt"); } @TestMetadata("conditionComparesNullWithNull.kt") public void testConditionComparesNullWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/conditionComparesNullWithNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/conditionComparesNullWithNull.kt"); } @TestMetadata("conditionInvalidBinaryExp.kt") public void testConditionInvalidBinaryExp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/conditionInvalidBinaryExp.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/conditionInvalidBinaryExp.kt"); } @TestMetadata("conditionNotBinaryExpr.kt") public void testConditionNotBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/conditionNotBinaryExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/conditionNotBinaryExpr.kt"); } @TestMetadata("doesNotinlineValueIfUsedMoreThanOnce.kt") public void testDoesNotinlineValueIfUsedMoreThanOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/doesNotinlineValueIfUsedMoreThanOnce.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/doesNotinlineValueIfUsedMoreThanOnce.kt"); } @TestMetadata("doesNotinlineValueOutsideOfScope.kt") public void testDoesNotinlineValueOutsideOfScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/doesNotinlineValueOutsideOfScope.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/doesNotinlineValueOutsideOfScope.kt"); } @TestMetadata("emptyCondition.kt") public void testEmptyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/emptyCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/emptyCondition.kt"); } @TestMetadata("emptyElseBlock.kt") public void testEmptyElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/emptyElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/emptyElseBlock.kt"); } @TestMetadata("emptyThenBlock.kt") public void testEmptyThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/emptyThenBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/emptyThenBlock.kt"); } @TestMetadata("ifAndElseBothInBlocks.kt") public void testIfAndElseBothInBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/ifAndElseBothInBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/ifAndElseBothInBlocks.kt"); } @TestMetadata("ifAndElseNotInBlocks.kt") public void testIfAndElseNotInBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/ifAndElseNotInBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/ifAndElseNotInBlocks.kt"); } @TestMetadata("ifAsExpression.kt") public void testIfAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/ifAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/ifAsExpression.kt"); } @TestMetadata("lhsEqualsNull.kt") public void testLhsEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/lhsEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/lhsEqualsNull.kt"); } @TestMetadata("lhsNotEqualsNull.kt") public void testLhsNotEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/lhsNotEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/lhsNotEqualsNull.kt"); } @TestMetadata("missingElseClause.kt") public void testMissingElseClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/missingElseClause.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/missingElseClause.kt"); } @TestMetadata("missingThenClause.kt") public void testMissingThenClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/missingThenClause.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/missingThenClause.kt"); } @TestMetadata("noCondition.kt") public void testNoCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/noCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/noCondition.kt"); } @TestMetadata("noNullInCondition.kt") public void testNoNullInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/noNullInCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/noNullInCondition.kt"); } @TestMetadata("notApplicableForFunction.kt") public void testNotApplicableForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/notApplicableForFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/notApplicableForFunction.kt"); } @TestMetadata("notApplicableForLocalUnstableVar.kt") public void testNotApplicableForLocalUnstableVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/notApplicableForLocalUnstableVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/notApplicableForLocalUnstableVar.kt"); } @TestMetadata("nullBranchAlsoNull.kt") public void testNullBranchAlsoNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/nullBranchAlsoNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/nullBranchAlsoNull.kt"); } @TestMetadata("otherBlockHasMoreThanOneStatement.kt") public void testOtherBlockHasMoreThanOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/otherBlockHasMoreThanOneStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/otherBlockHasMoreThanOneStatement.kt"); } @TestMetadata("rhsEqualsNull.kt") public void testRhsEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/rhsEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/rhsEqualsNull.kt"); } @TestMetadata("rhsNotEqualsNull.kt") public void testRhsNotEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/rhsNotEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/rhsNotEqualsNull.kt"); } @TestMetadata("thenAndElseBothNull.kt") public void testThenAndElseBothNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/thenAndElseBothNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/thenAndElseBothNull.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/this.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/this.kt"); } @TestMetadata("throwByFqName.kt") public void testThrowByFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/throwByFqName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/throwByFqName.kt"); } @TestMetadata("unacceptableEmptyElseBlockForExpression.kt") public void testUnacceptableEmptyElseBlockForExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/unacceptableEmptyElseBlockForExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/unacceptableEmptyElseBlockForExpression.kt"); } @TestMetadata("unacceptableEmptyThenBlockForExpression.kt") public void testUnacceptableEmptyThenBlockForExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/unacceptableEmptyThenBlockForExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/unacceptableEmptyThenBlockForExpression.kt"); } @TestMetadata("willNotInlineClassProperty.kt") public void testWillNotInlineClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToDoubleBang/willNotInlineClassProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToDoubleBang/willNotInlineClassProperty.kt"); } } @@ -2338,290 +2155,260 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfThenToElvis extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfThenToElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToElvis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("applicableForLocalStableVar.kt") public void testApplicableForLocalStableVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/applicableForLocalStableVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/applicableForLocalStableVar.kt"); } @TestMetadata("blockHasMoreThanOneStatement.kt") public void testBlockHasMoreThanOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/blockHasMoreThanOneStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/blockHasMoreThanOneStatement.kt"); } @TestMetadata("blockUsesDifferentVar.kt") public void testBlockUsesDifferentVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/blockUsesDifferentVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/blockUsesDifferentVar.kt"); } @TestMetadata("comparisonInElse.kt") public void testComparisonInElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/comparisonInElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/comparisonInElse.kt"); } @TestMetadata("conditionComparesNullWithNull.kt") public void testConditionComparesNullWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/conditionComparesNullWithNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/conditionComparesNullWithNull.kt"); } @TestMetadata("conditionInvalidBinaryExp.kt") public void testConditionInvalidBinaryExp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/conditionInvalidBinaryExp.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/conditionInvalidBinaryExp.kt"); } @TestMetadata("conditionNotBinaryExpr.kt") public void testConditionNotBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/conditionNotBinaryExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/conditionNotBinaryExpr.kt"); } @TestMetadata("doesNotInlineVariableInMultiDeclaration.kt") public void testDoesNotInlineVariableInMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/doesNotInlineVariableInMultiDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/doesNotInlineVariableInMultiDeclaration.kt"); } @TestMetadata("doesNotinlineValueIfUsedMoreThanOnce.kt") public void testDoesNotinlineValueIfUsedMoreThanOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/doesNotinlineValueIfUsedMoreThanOnce.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/doesNotinlineValueIfUsedMoreThanOnce.kt"); } @TestMetadata("doesNotinlineValueOutsideOfScope.kt") public void testDoesNotinlineValueOutsideOfScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/doesNotinlineValueOutsideOfScope.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/doesNotinlineValueOutsideOfScope.kt"); } @TestMetadata("emptyCondition.kt") public void testEmptyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/emptyCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/emptyCondition.kt"); } @TestMetadata("emptyElseBlock.kt") public void testEmptyElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/emptyElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/emptyElseBlock.kt"); } @TestMetadata("emptyThenBlock.kt") public void testEmptyThenBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/emptyThenBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/emptyThenBlock.kt"); } @TestMetadata("ifAndElseBothInBlocks.kt") public void testIfAndElseBothInBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/ifAndElseBothInBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/ifAndElseBothInBlocks.kt"); } @TestMetadata("ifAndElseNotInBlocks.kt") public void testIfAndElseNotInBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/ifAndElseNotInBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/ifAndElseNotInBlocks.kt"); } @TestMetadata("ifAsExpression.kt") public void testIfAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/ifAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/ifAsExpression.kt"); } @TestMetadata("ifAsPartOfExpression.kt") public void testIfAsPartOfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/ifAsPartOfExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/ifAsPartOfExpression.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/implicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/implicitReceiver.kt"); } @TestMetadata("isCheck.kt") public void testIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/isCheck.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/isCheck.kt"); } @TestMetadata("isCheckForNullableType.kt") public void testIsCheckForNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/isCheckForNullableType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/isCheckForNullableType.kt"); } @TestMetadata("isCheckForUnrelatedType.kt") public void testIsCheckForUnrelatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/isCheckForUnrelatedType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/isCheckForUnrelatedType.kt"); } @TestMetadata("isCheckWithSelector.kt") public void testIsCheckWithSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/isCheckWithSelector.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/isCheckWithSelector.kt"); } @TestMetadata("isCheckWithSelectorChain.kt") public void testIsCheckWithSelectorChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/isCheckWithSelectorChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/isCheckWithSelectorChain.kt"); } @TestMetadata("kt19666.kt") public void testKt19666() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/kt19666.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/kt19666.kt"); } @TestMetadata("lhsEqualsNull.kt") public void testLhsEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/lhsEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/lhsEqualsNull.kt"); } @TestMetadata("lhsNotEqualsNull.kt") public void testLhsNotEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/lhsNotEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/lhsNotEqualsNull.kt"); } @TestMetadata("missingElseClause.kt") public void testMissingElseClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/missingElseClause.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/missingElseClause.kt"); } @TestMetadata("missingThenClause.kt") public void testMissingThenClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/missingThenClause.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/missingThenClause.kt"); } @TestMetadata("noCondition.kt") public void testNoCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/noCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/noCondition.kt"); } @TestMetadata("noNullInCondition.kt") public void testNoNullInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/noNullInCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/noNullInCondition.kt"); } @TestMetadata("notApplicableForFunction.kt") public void testNotApplicableForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/notApplicableForFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/notApplicableForFunction.kt"); } @TestMetadata("notApplicableForLocalUnstableVar.kt") public void testNotApplicableForLocalUnstableVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/notApplicableForLocalUnstableVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/notApplicableForLocalUnstableVar.kt"); } @TestMetadata("notApplicableForSimpleKotlinNPE.kt") public void testNotApplicableForSimpleKotlinNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/notApplicableForSimpleKotlinNPE.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/notApplicableForSimpleKotlinNPE.kt"); } @TestMetadata("notApplicableForSimpleNPE.kt") public void testNotApplicableForSimpleNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/notApplicableForSimpleNPE.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/notApplicableForSimpleNPE.kt"); } @TestMetadata("notIsCheck.kt") public void testNotIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/notIsCheck.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/notIsCheck.kt"); } @TestMetadata("nullBranchAlsoNull.kt") public void testNullBranchAlsoNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/nullBranchAlsoNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/nullBranchAlsoNull.kt"); } @TestMetadata("nullCheckWithSelector.kt") public void testNullCheckWithSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/nullCheckWithSelector.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/nullCheckWithSelector.kt"); } @TestMetadata("nullCheckWithSelectorCall.kt") public void testNullCheckWithSelectorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/nullCheckWithSelectorCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/nullCheckWithSelectorCall.kt"); } @TestMetadata("nullCheckWithSelectorCallChain.kt") public void testNullCheckWithSelectorCallChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/nullCheckWithSelectorCallChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/nullCheckWithSelectorCallChain.kt"); } @TestMetadata("nullableThen.kt") public void testNullableThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/nullableThen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/nullableThen.kt"); } @TestMetadata("otherBlockHasMoreThanOneStatement.kt") public void testOtherBlockHasMoreThanOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/otherBlockHasMoreThanOneStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/otherBlockHasMoreThanOneStatement.kt"); } @TestMetadata("rhsEqualsNull.kt") public void testRhsEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/rhsEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/rhsEqualsNull.kt"); } @TestMetadata("rhsNotEqualsNull.kt") public void testRhsNotEqualsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/rhsNotEqualsNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/rhsNotEqualsNull.kt"); } @TestMetadata("thenAndElseBothNull.kt") public void testThenAndElseBothNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/thenAndElseBothNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/thenAndElseBothNull.kt"); } @TestMetadata("throwsNPEwithArgument.kt") public void testThrowsNPEwithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/throwsNPEwithArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/throwsNPEwithArgument.kt"); } @TestMetadata("unitResult.kt") public void testUnitResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/unitResult.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/unitResult.kt"); } @TestMetadata("willNotInlineClassProperty.kt") public void testWillNotInlineClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifThenToElvis/willNotInlineClassProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifThenToElvis/willNotInlineClassProperty.kt"); + } + + @TestMetadata("idea/testData/intentions/branched/ifThenToElvis/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifThenToElvis/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -2629,6 +2416,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfWhen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -2637,134 +2428,117 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfToWhen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfToWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen/ifToWhen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("combinedIf.kt") public void testCombinedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/combinedIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/combinedIf.kt"); } @TestMetadata("comment.kt") public void testComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/comment.kt"); } @TestMetadata("ifElseSwallowComments.kt") public void testIfElseSwallowComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifElseSwallowComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifElseSwallowComments.kt"); } @TestMetadata("ifElseSwallowReturnComment.kt") public void testIfElseSwallowReturnComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifElseSwallowReturnComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifElseSwallowReturnComment.kt"); } @TestMetadata("ifElseSwallowTail.kt") public void testIfElseSwallowTail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifElseSwallowTail.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifElseSwallowTail.kt"); } @TestMetadata("ifWithEqualityTests.kt") public void testIfWithEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithEqualityTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithEqualityTests.kt"); } @TestMetadata("ifWithIs.kt") public void testIfWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithIs.kt"); } @TestMetadata("ifWithMultiConditions.kt") public void testIfWithMultiConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithMultiConditions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithMultiConditions.kt"); } @TestMetadata("ifWithNegativeIs.kt") public void testIfWithNegativeIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithNegativeIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithNegativeIs.kt"); } @TestMetadata("ifWithNegativeRangeTests.kt") public void testIfWithNegativeRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithNegativeRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithNegativeRangeTests.kt"); } @TestMetadata("ifWithRangeTests.kt") public void testIfWithRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithRangeTests.kt"); } @TestMetadata("ifWithRangeTestsAndMultiConditions.kt") public void testIfWithRangeTestsAndMultiConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithRangeTestsAndMultiConditions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithRangeTestsAndMultiConditions.kt"); } @TestMetadata("ifWithRangeTestsAndUnparenthesizedMultiConditions.kt") public void testIfWithRangeTestsAndUnparenthesizedMultiConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithRangeTestsAndUnparenthesizedMultiConditions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithRangeTestsAndUnparenthesizedMultiConditions.kt"); } @TestMetadata("ifWithoutElse.kt") public void testIfWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithoutElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/ifWithoutElse.kt"); } @TestMetadata("multipleIfFake.kt") public void testMultipleIfFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfFake.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfFake.kt"); } @TestMetadata("multipleIfWithLongBranches.kt") public void testMultipleIfWithLongBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfWithLongBranches.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfWithLongBranches.kt"); } @TestMetadata("multipleIfWithReturns.kt") public void testMultipleIfWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfWithReturns.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfWithReturns.kt"); } @TestMetadata("multipleIfWithSingleReturns.kt") public void testMultipleIfWithSingleReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfWithSingleReturns.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/multipleIfWithSingleReturns.kt"); } @TestMetadata("secondIfNoThen.kt") public void testSecondIfNoThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/secondIfNoThen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/secondIfNoThen.kt"); } @TestMetadata("whenWithMultipleConditionTypes.kt") public void testWhenWithMultipleConditionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/whenWithMultipleConditionTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/whenWithMultipleConditionTypes.kt"); } @TestMetadata("withAnnotation.kt") public void testWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/ifToWhen/withAnnotation.kt"); } } @@ -2772,110 +2546,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhenToIf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhenToIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/ifWhen/whenToIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("comment.kt") public void testComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/comment.kt"); } @TestMetadata("kt12040.kt") public void testKt12040() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/kt12040.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/kt12040.kt"); } @TestMetadata("kt13884.kt") public void testKt13884() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/kt13884.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/kt13884.kt"); } @TestMetadata("whenWithDotQualifiedExpression.kt") public void testWhenWithDotQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithDotQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithDotQualifiedExpression.kt"); } @TestMetadata("whenWithEqualityTests.kt") public void testWhenWithEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithEqualityTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithEqualityTests.kt"); } @TestMetadata("whenWithIf.kt") public void testWhenWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithIf.kt"); } @TestMetadata("whenWithMultiConditions.kt") public void testWhenWithMultiConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithMultiConditions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithMultiConditions.kt"); } @TestMetadata("whenWithMultipleConditionTypes.kt") public void testWhenWithMultipleConditionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithMultipleConditionTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithMultipleConditionTypes.kt"); } @TestMetadata("whenWithNegativePatterns.kt") public void testWhenWithNegativePatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithNegativePatterns.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithNegativePatterns.kt"); } @TestMetadata("whenWithNegativeRangeTests.kt") public void testWhenWithNegativeRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithNegativeRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithNegativeRangeTests.kt"); } @TestMetadata("whenWithPatterns.kt") public void testWhenWithPatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithPatterns.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithPatterns.kt"); } @TestMetadata("whenWithRangeTests.kt") public void testWhenWithRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithRangeTests.kt"); } @TestMetadata("whenWithRangeTestsAndMultiConditions.kt") public void testWhenWithRangeTestsAndMultiConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithRangeTestsAndMultiConditions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithRangeTestsAndMultiConditions.kt"); } @TestMetadata("whenWithoutElse.kt") public void testWhenWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithoutElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithoutElse.kt"); } @TestMetadata("whenWithoutSubject.kt") public void testWhenWithoutSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithoutSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/whenWithoutSubject.kt"); } @TestMetadata("wrongIsAndInNoEnd.kt") public void testWrongIsAndInNoEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/wrongIsAndInNoEnd.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/wrongIsAndInNoEnd.kt"); } @TestMetadata("wrongIsAndInNoSubject.kt") public void testWrongIsAndInNoSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/ifWhen/whenToIf/wrongIsAndInNoSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/ifWhen/whenToIf/wrongIsAndInNoSubject.kt"); } } } @@ -2884,164 +2645,142 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeAccessToIfThen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSafeAccessToIfThen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/safeAccessToIfThen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/assignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/assignment.kt"); } @TestMetadata("assignment2.kt") public void testAssignment2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/assignment2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/assignment2.kt"); } @TestMetadata("assignment3.kt") public void testAssignment3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/assignment3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/assignment3.kt"); } @TestMetadata("binaryExpressionLhs.kt") public void testBinaryExpressionLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/binaryExpressionLhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/binaryExpressionLhs.kt"); } @TestMetadata("callExpression.kt") public void testCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/callExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/callExpression.kt"); } @TestMetadata("callExpressionParens.kt") public void testCallExpressionParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/callExpressionParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/callExpressionParens.kt"); } @TestMetadata("customGetterAsReceiver.kt") public void testCustomGetterAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/customGetterAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/customGetterAsReceiver.kt"); } @TestMetadata("equality.kt") public void testEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/equality.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/equality.kt"); } @TestMetadata("localValAsReceiver.kt") public void testLocalValAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/localValAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/localValAsReceiver.kt"); } @TestMetadata("localValLhs.kt") public void testLocalValLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/localValLhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/localValLhs.kt"); } @TestMetadata("localVarLhs.kt") public void testLocalVarLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/localVarLhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/localVarLhs.kt"); } @TestMetadata("resultAssignedToLocalVal.kt") public void testResultAssignedToLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/resultAssignedToLocalVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/resultAssignedToLocalVal.kt"); } @TestMetadata("safeAccessAsFunctionArgument.kt") public void testSafeAccessAsFunctionArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/safeAccessAsFunctionArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/safeAccessAsFunctionArgument.kt"); } @TestMetadata("simpleNameExpression.kt") public void testSimpleNameExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/simpleNameExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/simpleNameExpression.kt"); } @TestMetadata("simpleNameExpressionInParens.kt") public void testSimpleNameExpressionInParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/simpleNameExpressionInParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/simpleNameExpressionInParens.kt"); } @TestMetadata("simplePropertyAsReceiver.kt") public void testSimplePropertyAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver.kt"); } @TestMetadata("simplePropertyAsReceiver2.kt") public void testSimplePropertyAsReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver2.kt"); } @TestMetadata("simplePropertyAsReceiver3.kt") public void testSimplePropertyAsReceiver3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/simplePropertyAsReceiver3.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVal.kt"); } @TestMetadata("topLevelValCustomGetter.kt") public void testTopLevelValCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/topLevelValCustomGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/topLevelValCustomGetter.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVar.kt"); } @TestMetadata("topLevelVarCustomGetter.kt") public void testTopLevelVarCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVarCustomGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/topLevelVarCustomGetter.kt"); } @TestMetadata("usedAsFunctionRhs.kt") public void testUsedAsFunctionRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/usedAsFunctionRhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/usedAsFunctionRhs.kt"); } @TestMetadata("usedAsResultOfCheckedIf.kt") public void testUsedAsResultOfCheckedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/usedAsResultOfCheckedIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/usedAsResultOfCheckedIf.kt"); } @TestMetadata("usedAsReturnValue.kt") public void testUsedAsReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/usedAsReturnValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/usedAsReturnValue.kt"); } @TestMetadata("usedInUncheckedIfExpression.kt") public void testUsedInUncheckedIfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/safeAccessToIfThen/usedInUncheckedIfExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/safeAccessToIfThen/usedInUncheckedIfExpression.kt"); } } @@ -3049,6 +2788,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unfolding extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnfolding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -3057,50 +2800,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssignmentToIf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignmentToIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/assignmentToIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("innerIfTransformed.kt") public void testInnerIfTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/innerIfTransformed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/innerIfTransformed.kt"); } @TestMetadata("nestedIfs.kt") public void testNestedIfs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/nestedIfs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/nestedIfs.kt"); } @TestMetadata("simpleIf.kt") public void testSimpleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIf.kt"); } @TestMetadata("simpleIfWithAugmentedAssignment.kt") public void testSimpleIfWithAugmentedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithAugmentedAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithAugmentedAssignment.kt"); } @TestMetadata("simpleIfWithBlocks.kt") public void testSimpleIfWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithBlocks.kt"); } @TestMetadata("simpleIfWithComplexAssignmentLHS.kt") public void testSimpleIfWithComplexAssignmentLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithComplexAssignmentLHS.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithComplexAssignmentLHS.kt"); } @TestMetadata("simpleIfWithoutAssignment.kt") public void testSimpleIfWithoutAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithoutAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToIf/simpleIfWithoutAssignment.kt"); } } @@ -3108,32 +2848,32 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssignmentToWhen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignmentToWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/assignmentToWhen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("innerWhenTransformed.kt") public void testInnerWhenTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToWhen/innerWhenTransformed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToWhen/innerWhenTransformed.kt"); } @TestMetadata("simpleWhen.kt") public void testSimpleWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToWhen/simpleWhen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToWhen/simpleWhen.kt"); } @TestMetadata("simpleWhenWithBlocks.kt") public void testSimpleWhenWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToWhen/simpleWhenWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToWhen/simpleWhenWithBlocks.kt"); } @TestMetadata("simpleWhenWithComplexAssignmentLHS.kt") public void testSimpleWhenWithComplexAssignmentLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/assignmentToWhen/simpleWhenWithComplexAssignmentLHS.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/assignmentToWhen/simpleWhenWithComplexAssignmentLHS.kt"); } } @@ -3141,62 +2881,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyToIf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyToIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/propertyToIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("nestedIfs.kt") public void testNestedIfs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/nestedIfs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/nestedIfs.kt"); } @TestMetadata("nestedIfs2.kt") public void testNestedIfs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/nestedIfs2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/nestedIfs2.kt"); } @TestMetadata("nonLocalProperty.kt") public void testNonLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/nonLocalProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/nonLocalProperty.kt"); } @TestMetadata("nonLocalProperty2.kt") public void testNonLocalProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/nonLocalProperty2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/nonLocalProperty2.kt"); } @TestMetadata("simpleIf.kt") public void testSimpleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIf.kt"); } @TestMetadata("simpleIf2.kt") public void testSimpleIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIf2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIf2.kt"); } @TestMetadata("simpleIfWithBlocks.kt") public void testSimpleIfWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIfWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIfWithBlocks.kt"); } @TestMetadata("simpleIfWithBlocks2.kt") public void testSimpleIfWithBlocks2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIfWithBlocks2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIfWithBlocks2.kt"); } @TestMetadata("simpleIfWithType.kt") public void testSimpleIfWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIfWithType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToIf/simpleIfWithType.kt"); } } @@ -3204,50 +2939,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyToWhen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyToWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/propertyToWhen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("nonLocalProperty.kt") public void testNonLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/nonLocalProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/nonLocalProperty.kt"); } @TestMetadata("nonLocalProperty2.kt") public void testNonLocalProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/nonLocalProperty2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/nonLocalProperty2.kt"); } @TestMetadata("simpleWhen.kt") public void testSimpleWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhen.kt"); } @TestMetadata("simpleWhen2.kt") public void testSimpleWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhen2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhen2.kt"); } @TestMetadata("simpleWhenWithBlocks.kt") public void testSimpleWhenWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhenWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhenWithBlocks.kt"); } @TestMetadata("simpleWhenWithBlocks2.kt") public void testSimpleWhenWithBlocks2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhenWithBlocks2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhenWithBlocks2.kt"); } @TestMetadata("simpleWhenWithType.kt") public void testSimpleWhenWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhenWithType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/propertyToWhen/simpleWhenWithType.kt"); } } @@ -3255,56 +2987,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnToIf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturnToIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/returnToIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ifWithBreak.kt") public void testIfWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/ifWithBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/ifWithBreak.kt"); } @TestMetadata("ifWithContinue.kt") public void testIfWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/ifWithContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/ifWithContinue.kt"); } @TestMetadata("ifWithInnerReturn.kt") public void testIfWithInnerReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/ifWithInnerReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/ifWithInnerReturn.kt"); } @TestMetadata("ifWithNothing.kt") public void testIfWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/ifWithNothing.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/ifWithNothing.kt"); } @TestMetadata("ifWithThrow.kt") public void testIfWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/ifWithThrow.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/ifWithThrow.kt"); } @TestMetadata("innerIfTransformed.kt") public void testInnerIfTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/innerIfTransformed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/innerIfTransformed.kt"); } @TestMetadata("simpleIf.kt") public void testSimpleIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/simpleIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/simpleIf.kt"); } @TestMetadata("simpleIfWithBlocks.kt") public void testSimpleIfWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToIf/simpleIfWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToIf/simpleIfWithBlocks.kt"); } } @@ -3312,56 +3040,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnToWhen extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturnToWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/unfolding/returnToWhen"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("innerWhenTransformed.kt") public void testInnerWhenTransformed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/innerWhenTransformed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/innerWhenTransformed.kt"); } @TestMetadata("simpleWhen.kt") public void testSimpleWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/simpleWhen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/simpleWhen.kt"); } @TestMetadata("simpleWhenWithBlocks.kt") public void testSimpleWhenWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/simpleWhenWithBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/simpleWhenWithBlocks.kt"); } @TestMetadata("whenWithBreak.kt") public void testWhenWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithBreak.kt"); } @TestMetadata("whenWithContinue.kt") public void testWhenWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithContinue.kt"); } @TestMetadata("whenWithInnerReturn.kt") public void testWhenWithInnerReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithInnerReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithInnerReturn.kt"); } @TestMetadata("whenWithNothing.kt") public void testWhenWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithNothing.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithNothing.kt"); } @TestMetadata("whenWithThrow.kt") public void testWhenWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithThrow.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/unfolding/returnToWhen/whenWithThrow.kt"); } } } @@ -3370,6 +3094,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -3378,62 +3106,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EliminateSubject extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEliminateSubject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/eliminateSubject"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("lineBreaksAndComments.kt") public void testLineBreaksAndComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/lineBreaksAndComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/lineBreaksAndComments.kt"); } @TestMetadata("whenWithEqualityTests.kt") public void testWhenWithEqualityTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithEqualityTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithEqualityTests.kt"); } @TestMetadata("whenWithMultipleConditionTypes.kt") public void testWhenWithMultipleConditionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithMultipleConditionTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithMultipleConditionTypes.kt"); } @TestMetadata("whenWithNegativePatterns.kt") public void testWhenWithNegativePatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithNegativePatterns.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithNegativePatterns.kt"); } @TestMetadata("whenWithNegativeRangeTests.kt") public void testWhenWithNegativeRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithNegativeRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithNegativeRangeTests.kt"); } @TestMetadata("whenWithPatterns.kt") public void testWhenWithPatterns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithPatterns.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithPatterns.kt"); } @TestMetadata("whenWithRangeTests.kt") public void testWhenWithRangeTests() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithRangeTests.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithRangeTests.kt"); } @TestMetadata("whenWithRangeTestsAndMultiConditions.kt") public void testWhenWithRangeTestsAndMultiConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithRangeTestsAndMultiConditions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithRangeTestsAndMultiConditions.kt"); } @TestMetadata("whenWithoutSubject.kt") public void testWhenWithoutSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/eliminateSubject/whenWithoutSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithoutSubject.kt"); } } @@ -3441,26 +3164,27 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Flatten extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFlatten() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/flatten"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("flattenWithSubject.kt") public void testFlattenWithSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/flatten/flattenWithSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/flatten/flattenWithSubject.kt"); } @TestMetadata("flattenWithUnmatchedSubjects.kt") public void testFlattenWithUnmatchedSubjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/flatten/flattenWithUnmatchedSubjects.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/flatten/flattenWithUnmatchedSubjects.kt"); } @TestMetadata("flattenWithoutSubject.kt") public void testFlattenWithoutSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/flatten/flattenWithoutSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/flatten/flattenWithoutSubject.kt"); } } @@ -3468,116 +3192,102 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Merge extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMerge() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/branched/when/merge"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("mergeBlockWithBlock.kt") public void testMergeBlockWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeBlockWithBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeBlockWithBlock.kt"); } @TestMetadata("mergeBlockWithSingle.kt") public void testMergeBlockWithSingle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeBlockWithSingle.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeBlockWithSingle.kt"); } @TestMetadata("mergeWithConflictingDeclarations.kt") public void testMergeWithConflictingDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithConflictingDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithConflictingDeclarations.kt"); } @TestMetadata("mergeWithDeclarations.kt") public void testMergeWithDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithDeclarations.kt"); } @TestMetadata("mergeWithReturnAfter.kt") public void testMergeWithReturnAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithReturnAfter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithReturnAfter.kt"); } @TestMetadata("mergeWithReturnBefore.kt") public void testMergeWithReturnBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithReturnBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithReturnBefore.kt"); } @TestMetadata("mergeWithSubject.kt") public void testMergeWithSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithSubject.kt"); } @TestMetadata("mergeWithUnmatchedConditions1.kt") public void testMergeWithUnmatchedConditions1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions1.kt"); } @TestMetadata("mergeWithUnmatchedConditions2.kt") public void testMergeWithUnmatchedConditions2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions2.kt"); } @TestMetadata("mergeWithUnmatchedConditions3.kt") public void testMergeWithUnmatchedConditions3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions3.kt"); } @TestMetadata("mergeWithUnmatchedConditions4.kt") public void testMergeWithUnmatchedConditions4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions4.kt"); } @TestMetadata("mergeWithUnmatchedConditions5.kt") public void testMergeWithUnmatchedConditions5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions5.kt"); } @TestMetadata("mergeWithUnmatchedConditions6.kt") public void testMergeWithUnmatchedConditions6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions6.kt"); } @TestMetadata("mergeWithUnmatchedConditions7.kt") public void testMergeWithUnmatchedConditions7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions7.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedConditions7.kt"); } @TestMetadata("mergeWithUnmatchedSubjects1.kt") public void testMergeWithUnmatchedSubjects1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedSubjects1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedSubjects1.kt"); } @TestMetadata("mergeWithUnmatchedSubjects2.kt") public void testMergeWithUnmatchedSubjects2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedSubjects2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithUnmatchedSubjects2.kt"); } @TestMetadata("mergeWithVarSubject.kt") public void testMergeWithVarSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithVarSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithVarSubject.kt"); } @TestMetadata("mergeWithoutSubject.kt") public void testMergeWithoutSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/branched/when/merge/mergeWithoutSubject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/branched/when/merge/mergeWithoutSubject.kt"); } } } @@ -3587,6 +3297,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeVisibility extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -3595,38 +3309,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Internal extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/internal"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("notForAnnotationClassPrimaryConstructor.kt") public void testNotForAnnotationClassPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/internal/notForAnnotationClassPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/internal/notForAnnotationClassPrimaryConstructor.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/internal/propertySetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/internal/propertySetter.kt"); } @TestMetadata("propertySetterForPrivateProperty.kt") public void testPropertySetterForPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/internal/propertySetterForPrivateProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/internal/propertySetterForPrivateProperty.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/internal/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/internal/simple.kt"); } @TestMetadata("valParameter.kt") public void testValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/internal/valParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/internal/valParameter.kt"); } } @@ -3634,188 +3347,162 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/private"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("hasModifier1.kt") public void testHasModifier1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/hasModifier1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/hasModifier1.kt"); } @TestMetadata("hasModifier2.kt") public void testHasModifier2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/hasModifier2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/hasModifier2.kt"); } @TestMetadata("hasModifier3.kt") public void testHasModifier3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/hasModifier3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/hasModifier3.kt"); } @TestMetadata("hasModifier4.kt") public void testHasModifier4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/hasModifier4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/hasModifier4.kt"); } @TestMetadata("noModifierListAnnotation.kt") public void testNoModifierListAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListAnnotation.kt"); } @TestMetadata("noModifierListClass.kt") public void testNoModifierListClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListClass.kt"); } @TestMetadata("noModifierListConst.kt") public void testNoModifierListConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListConst.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListConst.kt"); } @TestMetadata("noModifierListFun.kt") public void testNoModifierListFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListFun.kt"); } @TestMetadata("noModifierListInterface.kt") public void testNoModifierListInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListInterface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListInterface.kt"); } @TestMetadata("noModifierListObject.kt") public void testNoModifierListObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListObject.kt"); } @TestMetadata("noModifierListPrimaryConstructor.kt") public void testNoModifierListPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListPrimaryConstructor.kt"); } @TestMetadata("noModifierListSealed.kt") public void testNoModifierListSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListSealed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListSealed.kt"); } @TestMetadata("noModifierListSecondaryConstructor.kt") public void testNoModifierListSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListSecondaryConstructor.kt"); } @TestMetadata("noModifierListVal.kt") public void testNoModifierListVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListVal.kt"); } @TestMetadata("noModifierListValParam.kt") public void testNoModifierListValParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierListValParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierListValParam.kt"); } @TestMetadata("noModifierTypeAlias.kt") public void testNoModifierTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/noModifierTypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/noModifierTypeAlias.kt"); } @TestMetadata("notForAbstract.kt") public void testNotForAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/notForAbstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/notForAbstract.kt"); } @TestMetadata("notForAnnotationClassPrimaryConstructor.kt") public void testNotForAnnotationClassPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/notForAnnotationClassPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/notForAnnotationClassPrimaryConstructor.kt"); } @TestMetadata("notForLocal.kt") public void testNotForLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/notForLocal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/notForLocal.kt"); } @TestMetadata("notForParameter.kt") public void testNotForParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/notForParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/notForParameter.kt"); } @TestMetadata("onAnnotation.kt") public void testOnAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/onAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/onAnnotation.kt"); } @TestMetadata("onAnnotationParameter.kt") public void testOnAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/onAnnotationParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/onAnnotationParameter.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/propertyGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/propertyGetter.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/propertySetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/propertySetter.kt"); } @TestMetadata("propertySetterForInternalProperty.kt") public void testPropertySetterForInternalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/propertySetterForInternalProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/propertySetterForInternalProperty.kt"); } @TestMetadata("propertySetterForPrivateProperty.kt") public void testPropertySetterForPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/propertySetterForPrivateProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/propertySetterForPrivateProperty.kt"); } @TestMetadata("propertySetterForProtectedProperty.kt") public void testPropertySetterForProtectedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/propertySetterForProtectedProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/propertySetterForProtectedProperty.kt"); } @TestMetadata("propertySetterInLocalClass.kt") public void testPropertySetterInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/propertySetterInLocalClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/propertySetterInLocalClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/simple.kt"); } @TestMetadata("withAnnotations.kt") public void testWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/private/withAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/private/withAnnotations.kt"); } } @@ -3823,68 +3510,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Protected extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtected() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/protected"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("caretAfter.kt") public void testCaretAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/caretAfter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/caretAfter.kt"); } @TestMetadata("constructorParameter.kt") public void testConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/constructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/constructorParameter.kt"); } @TestMetadata("noModifier.kt") public void testNoModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/noModifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/noModifier.kt"); } @TestMetadata("notForNonValParameter.kt") public void testNotForNonValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/notForNonValParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/notForNonValParameter.kt"); } @TestMetadata("notForObjectMember.kt") public void testNotForObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/notForObjectMember.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/notForObjectMember.kt"); } @TestMetadata("notForOverride.kt") public void testNotForOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/notForOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/notForOverride.kt"); } @TestMetadata("notForTopLevel.kt") public void testNotForTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/notForTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/notForTopLevel.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/propertySetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/propertySetter.kt"); } @TestMetadata("propertySetterForPrivateProperty.kt") public void testPropertySetterForPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/propertySetterForPrivateProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/propertySetterForPrivateProperty.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/protected/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/protected/simple.kt"); } } @@ -3892,74 +3573,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Public extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/changeVisibility/public"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("alreadyPublic.kt") public void testAlreadyPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/alreadyPublic.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/alreadyPublic.kt"); } @TestMetadata("destructuringPropertyException.kt") public void testDestructuringPropertyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/destructuringPropertyException.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/destructuringPropertyException.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/primaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/primaryConstructor.kt"); } @TestMetadata("primaryConstructorPublicByDefault.kt") public void testPrimaryConstructorPublicByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/primaryConstructorPublicByDefault.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/primaryConstructorPublicByDefault.kt"); } @TestMetadata("propertyPrivateSetter.kt") public void testPropertyPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/propertyPrivateSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/propertyPrivateSetter.kt"); } @TestMetadata("propertyPrivateSetterForPrivateProperty.kt") public void testPropertyPrivateSetterForPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/propertyPrivateSetterForPrivateProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/propertyPrivateSetterForPrivateProperty.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/propertySetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/propertySetter.kt"); } @TestMetadata("propertySetterForPrivateProperty.kt") public void testPropertySetterForPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/propertySetterForPrivateProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/propertySetterForPrivateProperty.kt"); } @TestMetadata("publicByDefault.kt") public void testPublicByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/publicByDefault.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/publicByDefault.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/simple.kt"); } @TestMetadata("typeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/changeVisibility/public/typeAlias.kt"); - doTest(fileName); + runTest("idea/testData/intentions/changeVisibility/public/typeAlias.kt"); } } } @@ -3968,6 +3642,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Chop extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/chop"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -3976,14 +3654,17 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentList extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/chop/argumentList"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("threeArgs.kt") public void testThreeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/argumentList/threeArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/argumentList/threeArgs.kt"); } } @@ -3991,44 +3672,42 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterList extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/chop/parameterList"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("hasAllLineBreaks.kt") public void testHasAllLineBreaks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/parameterList/hasAllLineBreaks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/parameterList/hasAllLineBreaks.kt"); } @TestMetadata("hasSomeLineBreaks1.kt") public void testHasSomeLineBreaks1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/parameterList/hasSomeLineBreaks1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/parameterList/hasSomeLineBreaks1.kt"); } @TestMetadata("hasSomeLineBreaks2.kt") public void testHasSomeLineBreaks2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/parameterList/hasSomeLineBreaks2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/parameterList/hasSomeLineBreaks2.kt"); } @TestMetadata("oneParameter.kt") public void testOneParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/parameterList/oneParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/parameterList/oneParameter.kt"); } @TestMetadata("threeParameters.kt") public void testThreeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/parameterList/threeParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/parameterList/threeParameters.kt"); } @TestMetadata("twoParameters.kt") public void testTwoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/chop/parameterList/twoParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/chop/parameterList/twoParameters.kt"); } } } @@ -4037,6 +3716,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConventionNameCalls extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConventionNameCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -4045,86 +3728,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceCallWithUnaryOperator extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceCallWithUnaryOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complexPlus.kt") public void testComplexPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/complexPlus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/complexPlus.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/extensionFunction.kt"); } @TestMetadata("functionLiteralArgument.kt") public void testFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/functionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/functionLiteralArgument.kt"); } @TestMetadata("minusSanityTest.kt") public void testMinusSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/minusSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/minusSanityTest.kt"); } @TestMetadata("namedValueArgument.kt") public void testNamedValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/namedValueArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/namedValueArgument.kt"); } @TestMetadata("notSanityTest.kt") public void testNotSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/notSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/notSanityTest.kt"); } @TestMetadata("plusPlus.kt") public void testPlusPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/plusPlus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/plusPlus.kt"); } @TestMetadata("plusSanityTest.kt") public void testPlusSanityTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/plusSanityTest.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/plusSanityTest.kt"); } @TestMetadata("qualifier.kt") public void testQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/qualifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/qualifier.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/super.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/super.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/typeArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/typeArguments.kt"); } @TestMetadata("unacceptableVararg.kt") public void testUnacceptableVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/unacceptableVararg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/unacceptableVararg.kt"); } @TestMetadata("valueArgument.kt") public void testValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/valueArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceCallWithUnaryOperator/valueArgument.kt"); } } @@ -4132,134 +3806,117 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceContains extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceContains() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceContains"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("containsFromJava.kt") public void testContainsFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/containsFromJava.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/containsFromJava.kt"); } @TestMetadata("containsInExpression.kt") public void testContainsInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/containsInExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/containsInExpression.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/extensionFunction.kt"); } @TestMetadata("functionLiteralArgument.kt") public void testFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgument.kt"); } @TestMetadata("functionLiteralArgumentAfterSemicolon.kt") public void testFunctionLiteralArgumentAfterSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgumentAfterSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgumentAfterSemicolon.kt"); } @TestMetadata("functionLiteralArgumentAtStartOfBlock.kt") public void testFunctionLiteralArgumentAtStartOfBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgumentAtStartOfBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgumentAtStartOfBlock.kt"); } @TestMetadata("functionLiteralArgumentInExpression.kt") public void testFunctionLiteralArgumentInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgumentInExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/functionLiteralArgumentInExpression.kt"); } @TestMetadata("invalidArgument.kt") public void testInvalidArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/invalidArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/invalidArgument.kt"); } @TestMetadata("missingArgument.kt") public void testMissingArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/missingArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/missingArgument.kt"); } @TestMetadata("missingDefaultArgument.kt") public void testMissingDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/missingDefaultArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/missingDefaultArgument.kt"); } @TestMetadata("multipleArguments.kt") public void testMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/multipleArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/multipleArguments.kt"); } @TestMetadata("notContains.kt") public void testNotContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/notContains.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/notContains.kt"); } @TestMetadata("qualifier.kt") public void testQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/qualifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/qualifier.kt"); } @TestMetadata("simpleArgument.kt") public void testSimpleArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/simpleArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/simpleArgument.kt"); } @TestMetadata("simpleStringLiteral.kt") public void testSimpleStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/simpleStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/simpleStringLiteral.kt"); } @TestMetadata("super.kt") public void testSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/super.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/super.kt"); } @TestMetadata("twoArgsContainsFromJava.kt") public void testTwoArgsContainsFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/twoArgsContainsFromJava.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/twoArgsContainsFromJava.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/typeArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/typeArguments.kt"); } @TestMetadata("unacceptableVararg1.kt") public void testUnacceptableVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/unacceptableVararg1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/unacceptableVararg1.kt"); } @TestMetadata("unacceptableVararg2.kt") public void testUnacceptableVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/unacceptableVararg2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/unacceptableVararg2.kt"); } @TestMetadata("withoutOperatorModifier.kt") public void testWithoutOperatorModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceContains/withoutOperatorModifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceContains/withoutOperatorModifier.kt"); } } @@ -4267,74 +3924,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceInvoke extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/conventionNameCalls/replaceInvoke"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("expressionReceiver.kt") public void testExpressionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/expressionReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/expressionReceiver.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/extensionFunction.kt"); } @TestMetadata("functionLiteralInvoke.kt") public void testFunctionLiteralInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/functionLiteralInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/functionLiteralInvoke.kt"); } @TestMetadata("invokeInExpression.kt") public void testInvokeInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/invokeInExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/invokeInExpression.kt"); } @TestMetadata("namedArgumentInvoke.kt") public void testNamedArgumentInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/namedArgumentInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/namedArgumentInvoke.kt"); } @TestMetadata("noArgumentInvoke.kt") public void testNoArgumentInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/noArgumentInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/noArgumentInvoke.kt"); } @TestMetadata("typeAndValueArgument.kt") public void testTypeAndValueArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/typeAndValueArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/typeAndValueArgument.kt"); } @TestMetadata("typeArgumentAndFunctionLiteral.kt") public void testTypeArgumentAndFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/typeArgumentAndFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/typeArgumentAndFunctionLiteral.kt"); } @TestMetadata("valueAndFunctionLiteralInvoke.kt") public void testValueAndFunctionLiteralInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/valueAndFunctionLiteralInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/valueAndFunctionLiteralInvoke.kt"); } @TestMetadata("valueArgumentInvoke.kt") public void testValueArgumentInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/valueArgumentInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/valueArgumentInvoke.kt"); } @TestMetadata("varargInvoke.kt") public void testVarargInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceInvoke/varargInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/conventionNameCalls/replaceInvoke/varargInvoke.kt"); } } } @@ -4343,134 +3993,117 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertAssertToIf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertAssertToIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertAssertToIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assertErrorOverloaded.kt") public void testAssertErrorOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/assertErrorOverloaded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/assertErrorOverloaded.kt"); } @TestMetadata("booleanCondition.kt") public void testBooleanCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/booleanCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/booleanCondition.kt"); } @TestMetadata("booleanConditionSimplified.kt") public void testBooleanConditionSimplified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/booleanConditionSimplified.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/booleanConditionSimplified.kt"); } @TestMetadata("booleanConditionSimplified2.kt") public void testBooleanConditionSimplified2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/booleanConditionSimplified2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/booleanConditionSimplified2.kt"); } @TestMetadata("booleanConditionWithVariables.kt") public void testBooleanConditionWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/booleanConditionWithVariables.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/booleanConditionWithVariables.kt"); } @TestMetadata("doNotShortenReferenceInsideMessage.kt") public void testDoNotShortenReferenceInsideMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/doNotShortenReferenceInsideMessage.kt"); } @TestMetadata("dotQualifiedCall.kt") public void testDotQualifiedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/dotQualifiedCall.kt"); } @TestMetadata("functionCallCondition.kt") public void testFunctionCallCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/functionCallCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/functionCallCondition.kt"); } @TestMetadata("functionMessageInsideParentheses.kt") public void testFunctionMessageInsideParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/functionMessageInsideParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/functionMessageInsideParentheses.kt"); } @TestMetadata("inapplicableAssertOverloaded.kt") public void testInapplicableAssertOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/inapplicableAssertOverloaded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/inapplicableAssertOverloaded.kt"); } @TestMetadata("inapplicableAssertOverloadedWithPackage.kt") public void testInapplicableAssertOverloadedWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/inapplicableAssertOverloadedWithPackage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/inapplicableAssertOverloadedWithPackage.kt"); } @TestMetadata("inapplicableNoCondition.kt") public void testInapplicableNoCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/inapplicableNoCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/inapplicableNoCondition.kt"); } @TestMetadata("lambdaMessageInsideParentheses.kt") public void testLambdaMessageInsideParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/lambdaMessageInsideParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/lambdaMessageInsideParentheses.kt"); } @TestMetadata("lambdaMessageOutsideParentheses.kt") public void testLambdaMessageOutsideParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/lambdaMessageOutsideParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/lambdaMessageOutsideParentheses.kt"); } @TestMetadata("lambdaMultiStatementMessageInsideParentheses.kt") public void testLambdaMultiStatementMessageInsideParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/lambdaMultiStatementMessageInsideParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/lambdaMultiStatementMessageInsideParentheses.kt"); } @TestMetadata("lambdaMultiStatementMessageOutsideParentheses.kt") public void testLambdaMultiStatementMessageOutsideParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/lambdaMultiStatementMessageOutsideParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/lambdaMultiStatementMessageOutsideParentheses.kt"); } @TestMetadata("lambdaVariable.kt") public void testLambdaVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/lambdaVariable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/lambdaVariable.kt"); } @TestMetadata("noMessage.kt") public void testNoMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/noMessage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/noMessage.kt"); } @TestMetadata("parenthesizedCondition.kt") public void testParenthesizedCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/parenthesizedCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/parenthesizedCondition.kt"); } @TestMetadata("simpleConvert.kt") public void testSimpleConvert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/simpleConvert.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/simpleConvert.kt"); } @TestMetadata("stringVariable.kt") public void testStringVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertAssertToIf/stringVariable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertAssertToIf/stringVariable.kt"); } } @@ -4478,116 +4111,102 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertBinaryExpressionWithDemorgansLaw extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertBinaryExpressionWithDemorgansLaw() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complexNegation1.kt") public void testComplexNegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/complexNegation1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/complexNegation1.kt"); } @TestMetadata("complexNegation2.kt") public void testComplexNegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/complexNegation2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/complexNegation2.kt"); } @TestMetadata("conjunctionNegation1.kt") public void testConjunctionNegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/conjunctionNegation1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/conjunctionNegation1.kt"); } @TestMetadata("conjunctionNegation2.kt") public void testConjunctionNegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/conjunctionNegation2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/conjunctionNegation2.kt"); } @TestMetadata("disjunctionNegation1.kt") public void testDisjunctionNegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/disjunctionNegation1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/disjunctionNegation1.kt"); } @TestMetadata("disjunctionNegation2.kt") public void testDisjunctionNegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/disjunctionNegation2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/disjunctionNegation2.kt"); } @TestMetadata("dontAddRedundantParenthesis.kt") public void testDontAddRedundantParenthesis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/dontAddRedundantParenthesis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/dontAddRedundantParenthesis.kt"); } @TestMetadata("doubleNegation.kt") public void testDoubleNegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/doubleNegation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/doubleNegation.kt"); } @TestMetadata("inapplicableOperator.kt") public void testInapplicableOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/inapplicableOperator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/inapplicableOperator.kt"); } @TestMetadata("inapplicableTriple.kt") public void testInapplicableTriple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/inapplicableTriple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/inapplicableTriple.kt"); } @TestMetadata("longMixedExpression.kt") public void testLongMixedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/longMixedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/longMixedExpression.kt"); } @TestMetadata("mixedExpression.kt") public void testMixedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/mixedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/mixedExpression.kt"); } @TestMetadata("noNegationPrefix1.kt") public void testNoNegationPrefix1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix1.kt"); } @TestMetadata("noNegationPrefix2.kt") public void testNoNegationPrefix2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix2.kt"); } @TestMetadata("noNegationPrefix3.kt") public void testNoNegationPrefix3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix3.kt"); } @TestMetadata("noNegationPrefix4.kt") public void testNoNegationPrefix4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/noNegationPrefix4.kt"); } @TestMetadata("nonstandardPrefixOperator.kt") public void testNonstandardPrefixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/nonstandardPrefixOperator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/nonstandardPrefixOperator.kt"); } @TestMetadata("retainedParens.kt") public void testRetainedParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/retainedParens.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertBinaryExpressionWithDemorgansLaw/retainedParens.kt"); } } @@ -4595,44 +4214,42 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertCamelCaseTestFunctionToSpaced extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertCamelCaseTestFunctionToSpaced() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("letters.kt") public void testLetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/letters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/letters.kt"); } @TestMetadata("nonFunction.kt") public void testNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/nonFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/nonFunction.kt"); } @TestMetadata("nonLetters.kt") public void testNonLetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/nonLetters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/nonLetters.kt"); } @TestMetadata("notAtIdentifier.kt") public void testNotAtIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/notAtIdentifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/notAtIdentifier.kt"); } @TestMetadata("notTestFunction.kt") public void testNotTestFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/notTestFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/notTestFunction.kt"); } @TestMetadata("unchanged.kt") public void testUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/unchanged.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertCamelCaseTestFunctionToSpaced/unchanged.kt"); } } @@ -4640,10 +4257,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertClassToSealedClass extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/abstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/abstract.kt"); } public void testAllFilesPresentInConvertClassToSealedClass() throws Exception { @@ -4652,62 +4272,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("noConstructor.kt") public void testNoConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/noConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/noConstructor.kt"); } @TestMetadata("notOpenAndAbstract.kt") public void testNotOpenAndAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/notOpenAndAbstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/notOpenAndAbstract.kt"); } @TestMetadata("notPrivatePrimaryConstructor.kt") public void testNotPrivatePrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/notPrivatePrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/notPrivatePrimaryConstructor.kt"); } @TestMetadata("notPrivateSecondaryConstructor.kt") public void testNotPrivateSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/notPrivateSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/notPrivateSecondaryConstructor.kt"); } @TestMetadata("onlySecondaryConstructor.kt") public void testOnlySecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/onlySecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/onlySecondaryConstructor.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/primaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/primaryConstructor.kt"); } @TestMetadata("primaryConstructorWithAnnotation.kt") public void testPrimaryConstructorWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/primaryConstructorWithAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/primaryConstructorWithAnnotation.kt"); } @TestMetadata("primaryConstructorWithValueParameter.kt") public void testPrimaryConstructorWithValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/primaryConstructorWithValueParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/primaryConstructorWithValueParameter.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/secondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/secondaryConstructor.kt"); } @TestMetadata("secondaryConstructorWithAnnotation.kt") public void testSecondaryConstructorWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertClassToSealedClass/secondaryConstructorWithAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertClassToSealedClass/secondaryConstructorWithAnnotation.kt"); } } @@ -4715,38 +4325,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertEnumToSealedClass extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertEnumToSealedClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertEnumToSealedClass"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("entriesAndMembers.kt") public void testEntriesAndMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertEnumToSealedClass/entriesAndMembers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertEnumToSealedClass/entriesAndMembers.kt"); } @TestMetadata("entriesOnly.kt") public void testEntriesOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertEnumToSealedClass/entriesOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertEnumToSealedClass/entriesOnly.kt"); } @TestMetadata("membersOnly.kt") public void testMembersOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertEnumToSealedClass/membersOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertEnumToSealedClass/membersOnly.kt"); } @TestMetadata("notEnum.kt") public void testNotEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertEnumToSealedClass/notEnum.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertEnumToSealedClass/notEnum.kt"); } @TestMetadata("outOfRange.kt") public void testOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertEnumToSealedClass/outOfRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertEnumToSealedClass/outOfRange.kt"); } } @@ -4754,104 +4363,92 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertForEachToForLoop extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertForEachToForLoop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertForEachToForLoop"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complexReceiver.kt") public void testComplexReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/complexReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/complexReceiver.kt"); } @TestMetadata("explicitFunctionLiteral.kt") public void testExplicitFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/explicitFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/explicitFunctionLiteral.kt"); } @TestMetadata("extraArguments.kt") public void testExtraArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/extraArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/extraArguments.kt"); } @TestMetadata("implicitFunctionLiteralParameter.kt") public void testImplicitFunctionLiteralParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/implicitFunctionLiteralParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/implicitFunctionLiteralParameter.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/infixCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/infixCall.kt"); } @TestMetadata("infixCallNotAvailable.kt") public void testInfixCallNotAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/infixCallNotAvailable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/infixCallNotAvailable.kt"); } @TestMetadata("keepComments.kt") public void testKeepComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/keepComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/keepComments.kt"); } @TestMetadata("parenthesizedExpression.kt") public void testParenthesizedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/parenthesizedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/parenthesizedExpression.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/simple.kt"); } @TestMetadata("simpleCharSequence.kt") public void testSimpleCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/simpleCharSequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/simpleCharSequence.kt"); } @TestMetadata("simpleSequence.kt") public void testSimpleSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/simpleSequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/simpleSequence.kt"); } @TestMetadata("typeArgumentPresent.kt") public void testTypeArgumentPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/typeArgumentPresent.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/typeArgumentPresent.kt"); } @TestMetadata("userDefined.kt") public void testUserDefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/userDefined.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/userDefined.kt"); } @TestMetadata("withNestedReturn.kt") public void testWithNestedReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/withNestedReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/withNestedReturn.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/withReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/withReturn.kt"); } @TestMetadata("zeroArguments.kt") public void testZeroArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertForEachToForLoop/zeroArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertForEachToForLoop/zeroArguments.kt"); } } @@ -4859,22 +4456,23 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertFunctionToProperty extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addExplicitAnonymousType.kt") public void testAddExplicitAnonymousType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/addExplicitAnonymousType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/addExplicitAnonymousType.kt"); } @TestMetadata("addExplicitLocalType.kt") public void testAddExplicitLocalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/addExplicitLocalType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/addExplicitLocalType.kt"); } @TestMetadata("addExplicitType.kt") public void testAddExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/addExplicitType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/addExplicitType.kt"); } public void testAllFilesPresentInConvertFunctionToProperty() throws Exception { @@ -4883,152 +4481,127 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("annotationLineBreak.kt") public void testAnnotationLineBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/annotationLineBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/annotationLineBreak.kt"); } @TestMetadata("blockBody.kt") public void testBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/blockBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/blockBody.kt"); } @TestMetadata("comments.kt") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/comments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/comments.kt"); } @TestMetadata("existingPropertyConflict.kt") public void testExistingPropertyConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/existingPropertyConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/existingPropertyConflict.kt"); } @TestMetadata("existingPropertyJavaConflict.kt") public void testExistingPropertyJavaConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/existingPropertyJavaConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/existingPropertyJavaConflict.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/expressionBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/expressionBody.kt"); } @TestMetadata("extraArgumentsConflict.kt") public void testExtraArgumentsConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/extraArgumentsConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/extraArgumentsConflict.kt"); } @TestMetadata("funWithParameters.kt") public void testFunWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/funWithParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/funWithParameters.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/invoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/invoke.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/iterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/iterator.kt"); } @TestMetadata("javaUsages.kt") public void testJavaUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/javaUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/javaUsages.kt"); } @TestMetadata("javaUsagesGet.kt") public void testJavaUsagesGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/javaUsagesGet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/javaUsagesGet.kt"); } @TestMetadata("javaUsagesIs.kt") public void testJavaUsagesIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/javaUsagesIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/javaUsagesIs.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/localFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/localFun.kt"); } @TestMetadata("noExplicitType.kt") public void testNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/noExplicitType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/noExplicitType.kt"); } @TestMetadata("nothingFun.kt") public void testNothingFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/nothingFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/nothingFun.kt"); } @TestMetadata("otherRefs.kt") public void testOtherRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/otherRefs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/otherRefs.kt"); } @TestMetadata("otherRefsGet.kt") public void testOtherRefsGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/otherRefsGet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/otherRefsGet.kt"); } @TestMetadata("otherRefsIs.kt") public void testOtherRefsIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/otherRefsIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/otherRefsIs.kt"); } @TestMetadata("overrides.kt") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/overrides.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/overrides.kt"); } @TestMetadata("recursiveFunction.kt") public void testRecursiveFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/recursiveFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/recursiveFunction.kt"); } @TestMetadata("typeArgumentsConflict.kt") public void testTypeArgumentsConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/typeArgumentsConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/typeArgumentsConflict.kt"); } @TestMetadata("unaryOp.kt") public void testUnaryOp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/unaryOp.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/unaryOp.kt"); } @TestMetadata("unchangedElements.kt") public void testUnchangedElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/unchangedElements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/unchangedElements.kt"); } @TestMetadata("unitFun.kt") public void testUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionToProperty/unitFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionToProperty/unitFun.kt"); } } @@ -5036,110 +4609,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertFunctionTypeParameterToReceiver extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertFunctionTypeParameterToReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertFunctionTypeParameterToReceiver"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("alreadyHasReceiver.kt") public void testAlreadyHasReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/alreadyHasReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/alreadyHasReceiver.kt"); } @TestMetadata("cantReplaceWithThis.kt") public void testCantReplaceWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/cantReplaceWithThis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/cantReplaceWithThis.kt"); } @TestMetadata("firstParameter.kt") public void testFirstParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameter.kt"); } @TestMetadata("firstParameterPrimaryConstructor.kt") public void testFirstParameterPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameterPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameterPrimaryConstructor.kt"); } @TestMetadata("firstParameterSecondaryConstructor.kt") public void testFirstParameterSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameterSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameterSecondaryConstructor.kt"); } @TestMetadata("firstParameterWithJavaUsages.kt") public void testFirstParameterWithJavaUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameterWithJavaUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/firstParameterWithJavaUsages.kt"); } @TestMetadata("nonFirstParameter.kt") public void testNonFirstParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameter.kt"); } @TestMetadata("nonFirstParameterCallableReferenceUsage.kt") public void testNonFirstParameterCallableReferenceUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterCallableReferenceUsage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterCallableReferenceUsage.kt"); } @TestMetadata("nonFirstParameterPrimaryConstructor.kt") public void testNonFirstParameterPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterPrimaryConstructor.kt"); } @TestMetadata("nonFirstParameterSecondaryConstructor.kt") public void testNonFirstParameterSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterSecondaryConstructor.kt"); } @TestMetadata("nonFirstParameterSuperDelegationCall.kt") public void testNonFirstParameterSuperDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterSuperDelegationCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterSuperDelegationCall.kt"); } @TestMetadata("nonFirstParameterThisDelegationCall.kt") public void testNonFirstParameterThisDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterThisDelegationCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterThisDelegationCall.kt"); } @TestMetadata("nonFirstParameterWithJavaUsages.kt") public void testNonFirstParameterWithJavaUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterWithJavaUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/nonFirstParameterWithJavaUsages.kt"); } @TestMetadata("notInFunctionParameter.kt") public void testNotInFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/notInFunctionParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/notInFunctionParameter.kt"); } @TestMetadata("notOnFunctionTypeParameter.kt") public void testNotOnFunctionTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/notOnFunctionTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/notOnFunctionTypeParameter.kt"); } @TestMetadata("overrides.kt") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/overrides.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/overrides.kt"); } @TestMetadata("singleExplicitParameter.kt") public void testSingleExplicitParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeParameterToReceiver/singleExplicitParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeParameterToReceiver/singleExplicitParameter.kt"); } } @@ -5147,50 +4707,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertFunctionTypeReceiverToParameter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertFunctionTypeReceiverToParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertFunctionTypeReceiverToParameter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/function.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/function.kt"); } @TestMetadata("notInFunctionParameter.kt") public void testNotInFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/notInFunctionParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/notInFunctionParameter.kt"); } @TestMetadata("notOnReceiver.kt") public void testNotOnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/notOnReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/notOnReceiver.kt"); } @TestMetadata("onlyLambdaArgument.kt") public void testOnlyLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/onlyLambdaArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/onlyLambdaArgument.kt"); } @TestMetadata("parameterlessFunction.kt") public void testParameterlessFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/parameterlessFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/parameterlessFunction.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/primaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/primaryConstructor.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertFunctionTypeReceiverToParameter/secondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertFunctionTypeReceiverToParameter/secondaryConstructor.kt"); } } @@ -5198,86 +4755,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertIfWithThrowToAssert extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertIfWithThrowToAssert() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertIfWithThrowToAssert"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assertOverloaded.kt") public void testAssertOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/assertOverloaded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/assertOverloaded.kt"); } @TestMetadata("assertOverloaded2.kt") public void testAssertOverloaded2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/assertOverloaded2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/assertOverloaded2.kt"); } @TestMetadata("booleanCondition.kt") public void testBooleanCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/booleanCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/booleanCondition.kt"); } @TestMetadata("dotQualifiedThrow.kt") public void testDotQualifiedThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/dotQualifiedThrow.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/dotQualifiedThrow.kt"); } @TestMetadata("inapplicableAssertionErrorOverloaded.kt") public void testInapplicableAssertionErrorOverloaded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableAssertionErrorOverloaded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableAssertionErrorOverloaded.kt"); } @TestMetadata("inapplicableCauseSent.kt") public void testInapplicableCauseSent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableCauseSent.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableCauseSent.kt"); } @TestMetadata("inapplicableHasElse.kt") public void testInapplicableHasElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableHasElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableHasElse.kt"); } @TestMetadata("inapplicableMoreThanSingleExpression.kt") public void testInapplicableMoreThanSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableMoreThanSingleExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableMoreThanSingleExpression.kt"); } @TestMetadata("inapplicableMoreThanSingleExpression2.kt") public void testInapplicableMoreThanSingleExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableMoreThanSingleExpression2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/inapplicableMoreThanSingleExpression2.kt"); } @TestMetadata("noMessageSent.kt") public void testNoMessageSent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/noMessageSent.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/noMessageSent.kt"); } @TestMetadata("nullSent.kt") public void testNullSent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/nullSent.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/nullSent.kt"); } @TestMetadata("simpleConvert.kt") public void testSimpleConvert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/simpleConvert.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/simpleConvert.kt"); } @TestMetadata("simplifiedCondition.kt") public void testSimplifiedCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertIfWithThrowToAssert/simplifiedCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertIfWithThrowToAssert/simplifiedCondition.kt"); } } @@ -5285,350 +4833,297 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertLambdaToReference extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertLambdaToReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertLambdaToReference"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("argumentWithReceiver.kt") public void testArgumentWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/argumentWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/argumentWithReceiver.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/companion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/companion.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/constructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/constructor.kt"); } @TestMetadata("conversion.kt") public void testConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/conversion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/conversion.kt"); } @TestMetadata("defaultArgument.kt") public void testDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultArgument.kt"); } @TestMetadata("defaultBeforeLambda.kt") public void testDefaultBeforeLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultBeforeLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultBeforeLambda.kt"); } @TestMetadata("defaultConstructor.kt") public void testDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultConstructor.kt"); } @TestMetadata("defaultNamed.kt") public void testDefaultNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultNamed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultNamed.kt"); } @TestMetadata("defaultNamed2.kt") public void testDefaultNamed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultNamed2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultNamed2.kt"); } @TestMetadata("defaultNamed3.kt") public void testDefaultNamed3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultNamed3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultNamed3.kt"); } @TestMetadata("defaultOverridden.kt") public void testDefaultOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultOverridden.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultOverridden.kt"); } @TestMetadata("defaultUnnamed.kt") public void testDefaultUnnamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultUnnamed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultUnnamed.kt"); } @TestMetadata("defaultUnnamed2.kt") public void testDefaultUnnamed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultUnnamed2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultUnnamed2.kt"); } @TestMetadata("defaultUnnamed3.kt") public void testDefaultUnnamed3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/defaultUnnamed3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/defaultUnnamed3.kt"); } @TestMetadata("doubleChained.kt") public void testDoubleChained() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/doubleChained.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/doubleChained.kt"); } @TestMetadata("emptyBrackets.kt") public void testEmptyBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/emptyBrackets.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/emptyBrackets.kt"); } @TestMetadata("erasedReceiver.kt") public void testErasedReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/erasedReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/erasedReceiver.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/extension.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/extension.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/extensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/extensionProperty.kt"); } @TestMetadata("extentionOuterScope.kt") public void testExtentionOuterScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/extentionOuterScope.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/extentionOuterScope.kt"); } @TestMetadata("fqNameForReceiver.kt") public void testFqNameForReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/fqNameForReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/fqNameForReceiver.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/generic.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/generic.kt"); } @TestMetadata("globalProperty.kt") public void testGlobalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/globalProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/globalProperty.kt"); } @TestMetadata("globalPropertyNoArgs.kt") public void testGlobalPropertyNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/globalPropertyNoArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/globalPropertyNoArgs.kt"); } @TestMetadata("goodNamedOrder.kt") public void testGoodNamedOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/goodNamedOrder.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/goodNamedOrder.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/inner.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/inner.kt"); } @TestMetadata("mapTo.kt") public void testMapTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/mapTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/mapTo.kt"); } @TestMetadata("mapToFqName.kt") public void testMapToFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/mapToFqName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/mapToFqName.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/member.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/member.kt"); } @TestMetadata("memberExplicit.kt") public void testMemberExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/memberExplicit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/memberExplicit.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/memberExtension.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/memberExtension.kt"); } @TestMetadata("memberExternalParameter.kt") public void testMemberExternalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/memberExternalParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/memberExternalParameter.kt"); } @TestMetadata("memberInLambdaArgument.kt") public void testMemberInLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/memberInLambdaArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/memberInLambdaArgument.kt"); } @TestMetadata("memberOuterScope.kt") public void testMemberOuterScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/memberOuterScope.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/memberOuterScope.kt"); } @TestMetadata("memberViaThis.kt") public void testMemberViaThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/memberViaThis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/memberViaThis.kt"); } @TestMetadata("name.kt") public void testName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/name.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/name.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/nestedLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/nestedLambda.kt"); } @TestMetadata("nestedLambdaWithReceiver.kt") public void testNestedLambdaWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/nestedLambdaWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/nestedLambdaWithReceiver.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/nullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/nullable.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/object.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/object.kt"); } @TestMetadata("platformType.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/platformType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/platformType.kt"); } @TestMetadata("receiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/receiverParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/receiverParameter.kt"); } @TestMetadata("receiverParameterReversed.kt") public void testReceiverParameterReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/receiverParameterReversed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/receiverParameterReversed.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/simple.kt"); } @TestMetadata("suspendFun.kt") public void testSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/suspendFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/suspendFun.kt"); } @TestMetadata("syntheticProperty.kt") public void testSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/syntheticProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/syntheticProperty.kt"); } @TestMetadata("threeParameters.kt") public void testThreeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/threeParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/threeParameters.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/toString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/toString.kt"); } @TestMetadata("typeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/typeAlias.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/typeAlias.kt"); } @TestMetadata("typeAliasGenericInstance.kt") public void testTypeAliasGenericInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/typeAliasGenericInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/typeAliasGenericInstance.kt"); } @TestMetadata("typeFromJava.kt") public void testTypeFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/typeFromJava.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/typeFromJava.kt"); } @TestMetadata("typeFromJavaFlexibleRecursive.kt") public void testTypeFromJavaFlexibleRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/typeFromJavaFlexibleRecursive.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/typeFromJavaFlexibleRecursive.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/unit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/unit.kt"); } @TestMetadata("unwrap.kt") public void testUnwrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/unwrap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/unwrap.kt"); } @TestMetadata("wrongNamedOrder.kt") public void testWrongNamedOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/wrongNamedOrder.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/wrongNamedOrder.kt"); } @TestMetadata("wrongParameterNumber.kt") public void testWrongParameterNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/wrongParameterNumber.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/wrongParameterNumber.kt"); } @TestMetadata("wrongParameterOrder.kt") public void testWrongParameterOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertLambdaToReference/wrongParameterOrder.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertLambdaToReference/wrongParameterOrder.kt"); } } @@ -5636,68 +5131,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertNegatedBooleanSequence extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertNegatedBooleanSequence() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertNegatedBooleanSequence"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complexNegatedSequence.kt") public void testComplexNegatedSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/complexNegatedSequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/complexNegatedSequence.kt"); } @TestMetadata("conjunctionOfThreeNegations.kt") public void testConjunctionOfThreeNegations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/conjunctionOfThreeNegations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/conjunctionOfThreeNegations.kt"); } @TestMetadata("conjunctionOfTwoNegations.kt") public void testConjunctionOfTwoNegations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/conjunctionOfTwoNegations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/conjunctionOfTwoNegations.kt"); } @TestMetadata("disjunctionOfTwoNegations.kt") public void testDisjunctionOfTwoNegations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/disjunctionOfTwoNegations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/disjunctionOfTwoNegations.kt"); } @TestMetadata("doubleParenthesizedExpression.kt") public void testDoubleParenthesizedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/doubleParenthesizedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/doubleParenthesizedExpression.kt"); } @TestMetadata("inapplicableMixedOperators.kt") public void testInapplicableMixedOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/inapplicableMixedOperators.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/inapplicableMixedOperators.kt"); } @TestMetadata("inapplicableMixedSequence.kt") public void testInapplicableMixedSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/inapplicableMixedSequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/inapplicableMixedSequence.kt"); } @TestMetadata("inapplicableSingleExpression.kt") public void testInapplicableSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/inapplicableSingleExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/inapplicableSingleExpression.kt"); } @TestMetadata("negatedFunction.kt") public void testNegatedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/negatedFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/negatedFunction.kt"); } @TestMetadata("parenthesizedConjunctionOfTwoNegations.kt") public void testParenthesizedConjunctionOfTwoNegations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertNegatedBooleanSequence/parenthesizedConjunctionOfTwoNegations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertNegatedBooleanSequence/parenthesizedConjunctionOfTwoNegations.kt"); } } @@ -5705,50 +5194,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertObjectLiteralToClass extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertObjectLiteralToClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertObjectLiteralToClass"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/inClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/inClass.kt"); } @TestMetadata("inClassHasMethodReference.kt") public void testInClassHasMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/inClassHasMethodReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/inClassHasMethodReference.kt"); } @TestMetadata("inClassHasPropertyReference.kt") public void testInClassHasPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/inClassHasPropertyReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/inClassHasPropertyReference.kt"); } @TestMetadata("inFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/inFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/inFunction.kt"); } @TestMetadata("objectLiteralNoCapture.kt") public void testObjectLiteralNoCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/objectLiteralNoCapture.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/objectLiteralNoCapture.kt"); } @TestMetadata("objectLiteralNoSupers.kt") public void testObjectLiteralNoSupers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/objectLiteralNoSupers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/objectLiteralNoSupers.kt"); } @TestMetadata("objectLiteralWithCapture.kt") public void testObjectLiteralWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertObjectLiteralToClass/objectLiteralWithCapture.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertObjectLiteralToClass/objectLiteralWithCapture.kt"); } } @@ -5756,86 +5242,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertParameterToReceiver extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertParameterToReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertParameterToReceiver"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("classParameter.kt") public void testClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/classParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/classParameter.kt"); } @TestMetadata("companionAsReceiver.kt") public void testCompanionAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/companionAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/companionAsReceiver.kt"); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/functionExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/functionExpression.kt"); } @TestMetadata("functionExpressionWithThisConflict.kt") public void testFunctionExpressionWithThisConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/functionExpressionWithThisConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/functionExpressionWithThisConflict.kt"); } @TestMetadata("lambdaParameter.kt") public void testLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/lambdaParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/lambdaParameter.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/localFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/localFun.kt"); } @TestMetadata("localObject.kt") public void testLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/localObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/localObject.kt"); } @TestMetadata("localObjectWithFunctionNameConflict.kt") public void testLocalObjectWithFunctionNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/localObjectWithFunctionNameConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/localObjectWithFunctionNameConflict.kt"); } @TestMetadata("memberFun.kt") public void testMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/memberFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/memberFun.kt"); } @TestMetadata("noParameterUnderCaret.kt") public void testNoParameterUnderCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/noParameterUnderCaret.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/noParameterUnderCaret.kt"); } @TestMetadata("topLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/topLevelFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/topLevelFun.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/vararg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/vararg.kt"); } @TestMetadata("withExtensionReceiver.kt") public void testWithExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertParameterToReceiver/withExtensionReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertParameterToReceiver/withExtensionReceiver.kt"); } } @@ -5843,194 +5320,167 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertPrimaryConstructorToSecondary extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertPrimaryConstructorToSecondary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertPrimaryConstructorToSecondary"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotatedConstructor.kt") public void testAnnotatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotatedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotatedConstructor.kt"); } @TestMetadata("annotatedParam.kt") public void testAnnotatedParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotatedParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotatedParam.kt"); } @TestMetadata("annotatedProperty.kt") public void testAnnotatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotatedProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotatedProperty.kt"); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotationClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/annotationClass.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/dataClass.kt"); } @TestMetadata("defaultValueChain.kt") public void testDefaultValueChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/defaultValueChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/defaultValueChain.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/enum.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/enum.kt"); } @TestMetadata("enumWIthFunction.kt") public void testEnumWIthFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWIthFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWIthFunction.kt"); } @TestMetadata("enumWithParams.kt") public void testEnumWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWithParams.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWithParams.kt"); } @TestMetadata("enumWithoutEntries.kt") public void testEnumWithoutEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWithoutEntries.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWithoutEntries.kt"); } @TestMetadata("enumWithoutSemicolon.kt") public void testEnumWithoutSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWithoutSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/enumWithoutSemicolon.kt"); } @TestMetadata("errorType.kt") public void testErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/errorType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/errorType.kt"); } @TestMetadata("genericParamWithDefaultValue.kt") public void testGenericParamWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/genericParamWithDefaultValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/genericParamWithDefaultValue.kt"); } @TestMetadata("independentProperty.kt") public void testIndependentProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/independentProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/independentProperty.kt"); } @TestMetadata("independentProperty2.kt") public void testIndependentProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/independentProperty2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/independentProperty2.kt"); } @TestMetadata("independentProperty3.kt") public void testIndependentProperty3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/independentProperty3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/independentProperty3.kt"); } @TestMetadata("initAndParams.kt") public void testInitAndParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/initAndParams.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/initAndParams.kt"); } @TestMetadata("initWithoutAssignments.kt") public void testInitWithoutAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/initWithoutAssignments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/initWithoutAssignments.kt"); } @TestMetadata("noArgName.kt") public void testNoArgName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/noArgName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/noArgName.kt"); } @TestMetadata("noArgType.kt") public void testNoArgType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/noArgType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/noArgType.kt"); } @TestMetadata("paramsAndProperties.kt") public void testParamsAndProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/paramsAndProperties.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/paramsAndProperties.kt"); } @TestMetadata("protectedConstructor.kt") public void testProtectedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/protectedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/protectedConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/simple.kt"); } @TestMetadata("useParam.kt") public void testUseParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/useParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/useParam.kt"); } @TestMetadata("useParamChain.kt") public void testUseParamChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/useParamChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/useParamChain.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/vararg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/vararg.kt"); } @TestMetadata("varargVal.kt") public void testVarargVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/varargVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/varargVal.kt"); } @TestMetadata("withBaseClass.kt") public void testWithBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/withBaseClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/withBaseClass.kt"); } @TestMetadata("withComments.kt") public void testWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/withComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/withComments.kt"); } @TestMetadata("withMultipleInheritance.kt") public void testWithMultipleInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/withMultipleInheritance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/withMultipleInheritance.kt"); } @TestMetadata("withProperties.kt") public void testWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPrimaryConstructorToSecondary/withProperties.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPrimaryConstructorToSecondary/withProperties.kt"); } } @@ -6038,68 +5488,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertPropertyInitializerToGetter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertPropertyInitializerToGetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertPropertyInitializerToGetter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("errorType.kt") public void testErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/errorType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/errorType.kt"); } @TestMetadata("inapplicableIfExtensionProperty.kt") public void testInapplicableIfExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfExtensionProperty.kt"); } @TestMetadata("inapplicableIfLocalVariableInFun.kt") public void testInapplicableIfLocalVariableInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfLocalVariableInFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfLocalVariableInFun.kt"); } @TestMetadata("inapplicableIfLocalVariableInInitBlock.kt") public void testInapplicableIfLocalVariableInInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfLocalVariableInInitBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfLocalVariableInInitBlock.kt"); } @TestMetadata("inapplicableIfNoInitializer.kt") public void testInapplicableIfNoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfNoInitializer.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/inapplicableIfNoInitializer.kt"); } @TestMetadata("notInLambda.kt") public void testNotInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/notInLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/notInLambda.kt"); } @TestMetadata("propertyWithInitializerWithSetter.kt") public void testPropertyWithInitializerWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/propertyWithInitializerWithSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/propertyWithInitializerWithSetter.kt"); } @TestMetadata("propertyWithInitializerWithoutAccessors.kt") public void testPropertyWithInitializerWithoutAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/propertyWithInitializerWithoutAccessors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/propertyWithInitializerWithoutAccessors.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/semicolon.kt"); } @TestMetadata("topLevelDeclaration.kt") public void testTopLevelDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyInitializerToGetter/topLevelDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyInitializerToGetter/topLevelDeclaration.kt"); } } @@ -6107,10 +5551,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertPropertyToFunction extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessorCallGroovy.kt") public void testAccessorCallGroovy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/accessorCallGroovy.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/accessorCallGroovy.kt"); } public void testAllFilesPresentInConvertPropertyToFunction() throws Exception { @@ -6119,92 +5566,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("blockBody.kt") public void testBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/blockBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/blockBody.kt"); } @TestMetadata("delegatingProperty.kt") public void testDelegatingProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/delegatingProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/delegatingProperty.kt"); } @TestMetadata("existingFunConflict.kt") public void testExistingFunConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/existingFunConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/existingFunConflict.kt"); } @TestMetadata("existingFunJavaConflict.kt") public void testExistingFunJavaConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/existingFunJavaConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/existingFunJavaConflict.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/expressionBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/expressionBody.kt"); } @TestMetadata("initializer.kt") public void testInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/initializer.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/initializer.kt"); } @TestMetadata("initializerWithGetter.kt") public void testInitializerWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/initializerWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/initializerWithGetter.kt"); } @TestMetadata("javaUsageAsField.kt") public void testJavaUsageAsField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/javaUsageAsField.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/javaUsageAsField.kt"); } @TestMetadata("javaUsages.kt") public void testJavaUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/javaUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/javaUsages.kt"); } @TestMetadata("otherRefs.kt") public void testOtherRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/otherRefs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/otherRefs.kt"); } @TestMetadata("overrides.kt") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/overrides.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/overrides.kt"); } @TestMetadata("propertyCallGroovy.kt") public void testPropertyCallGroovy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/propertyCallGroovy.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/propertyCallGroovy.kt"); } @TestMetadata("recursiveAccessor.kt") public void testRecursiveAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/recursiveAccessor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/recursiveAccessor.kt"); } @TestMetadata("unchangedElements.kt") public void testUnchangedElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/unchangedElements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/unchangedElements.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertPropertyToFunction/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertPropertyToFunction/var.kt"); } } @@ -6212,56 +5644,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertRangeCheckToTwoComparisons extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertRangeCheckToTwoComparisons() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertRangeCheckToTwoComparisons"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/double.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/double.kt"); } @TestMetadata("forLoop.kt") public void testForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/forLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/forLoop.kt"); } @TestMetadata("insideForLoop.kt") public void testInsideForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/insideForLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/insideForLoop.kt"); } @TestMetadata("insideForLoop2.kt") public void testInsideForLoop2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/insideForLoop2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/insideForLoop2.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/int.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/int.kt"); } @TestMetadata("nonConstants.kt") public void testNonConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/nonConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/nonConstants.kt"); } @TestMetadata("otherOp.kt") public void testOtherOp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/otherOp.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/otherOp.kt"); } @TestMetadata("withSideEffects.kt") public void testWithSideEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertRangeCheckToTwoComparisons/withSideEffects.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertRangeCheckToTwoComparisons/withSideEffects.kt"); } } @@ -6269,74 +5697,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertReceiverToParameter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertReceiverToParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertReceiverToParameter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("autoSuggestedName.kt") public void testAutoSuggestedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/autoSuggestedName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/autoSuggestedName.kt"); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/functionExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/functionExpression.kt"); } @TestMetadata("genericReceiver.kt") public void testGenericReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/genericReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/genericReceiver.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/localFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/localFun.kt"); } @TestMetadata("memberFun.kt") public void testMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/memberFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/memberFun.kt"); } @TestMetadata("noReceiverUnderCaret.kt") public void testNoReceiverUnderCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/noReceiverUnderCaret.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/noReceiverUnderCaret.kt"); } @TestMetadata("notExtension.kt") public void testNotExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/notExtension.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/notExtension.kt"); } @TestMetadata("replaceThis.kt") public void testReplaceThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/replaceThis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/replaceThis.kt"); } @TestMetadata("topLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/topLevelFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/topLevelFun.kt"); } @TestMetadata("validOverload.kt") public void testValidOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/validOverload.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/validOverload.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReceiverToParameter/varargs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReceiverToParameter/varargs.kt"); } } @@ -6344,218 +5765,187 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertReferenceToLambda extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertReferenceToLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertReferenceToLambda"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("apply.kt") public void testApply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/apply.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/apply.kt"); } @TestMetadata("boundReference.kt") public void testBoundReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/boundReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/boundReference.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/companion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/companion.kt"); } @TestMetadata("companionNoImport.kt") public void testCompanionNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/companionNoImport.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/companionNoImport.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/constructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/constructor.kt"); } @TestMetadata("conversion.kt") public void testConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/conversion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/conversion.kt"); } @TestMetadata("extensionFunctionalType.kt") public void testExtensionFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/extensionFunctionalType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/extensionFunctionalType.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/extensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/extensionProperty.kt"); } @TestMetadata("fqNameForReceiver.kt") public void testFqNameForReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/fqNameForReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/fqNameForReceiver.kt"); } @TestMetadata("if1.kt") public void testIf1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/if1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/if1.kt"); } @TestMetadata("if2.kt") public void testIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/if2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/if2.kt"); } @TestMetadata("if3.kt") public void testIf3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/if3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/if3.kt"); } @TestMetadata("if4.kt") public void testIf4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/if4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/if4.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/inner.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/inner.kt"); } @TestMetadata("itClash.kt") public void testItClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/itClash.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/itClash.kt"); } @TestMetadata("kfunction.kt") public void testKfunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/kfunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/kfunction.kt"); } @TestMetadata("kproperty.kt") public void testKproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/kproperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/kproperty.kt"); } @TestMetadata("kproperty0.kt") public void testKproperty0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/kproperty0.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/kproperty0.kt"); } @TestMetadata("length.kt") public void testLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/length.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/length.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/member.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/member.kt"); } @TestMetadata("name.kt") public void testName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/name.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/name.kt"); } @TestMetadata("nestedLambdaWithReceiver.kt") public void testNestedLambdaWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/nestedLambdaWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/nestedLambdaWithReceiver.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/nullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/nullable.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/object.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/object.kt"); } @TestMetadata("receiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/receiverParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/receiverParameter.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/simple.kt"); } @TestMetadata("static.kt") public void testStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/static.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/static.kt"); } @TestMetadata("staticTwoParameters.kt") public void testStaticTwoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/staticTwoParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/staticTwoParameters.kt"); } @TestMetadata("threeParameters.kt") public void testThreeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/threeParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/threeParameters.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/toString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/toString.kt"); } @TestMetadata("unwrap.kt") public void testUnwrap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/unwrap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/unwrap.kt"); } @TestMetadata("when1.kt") public void testWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/when1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/when1.kt"); } @TestMetadata("when2.kt") public void testWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/when2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/when2.kt"); } @TestMetadata("when3.kt") public void testWhen3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/when3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/when3.kt"); } @TestMetadata("when4.kt") public void testWhen4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertReferenceToLambda/when4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertReferenceToLambda/when4.kt"); } } @@ -6563,68 +5953,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertSealedClassToEnum extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertSealedClassToEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertSealedClassToEnum"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("dropDefaultConstructorCall.kt") public void testDropDefaultConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/dropDefaultConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/dropDefaultConstructorCall.kt"); } @TestMetadata("inheritorsWithMultipleSupertypes.kt") public void testInheritorsWithMultipleSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/inheritorsWithMultipleSupertypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/inheritorsWithMultipleSupertypes.kt"); } @TestMetadata("instancesAndMembers.kt") public void testInstancesAndMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/instancesAndMembers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/instancesAndMembers.kt"); } @TestMetadata("instancesOnly.kt") public void testInstancesOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/instancesOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/instancesOnly.kt"); } @TestMetadata("membersOnly.kt") public void testMembersOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/membersOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/membersOnly.kt"); } @TestMetadata("nonNestedInheritors.kt") public void testNonNestedInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/nonNestedInheritors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/nonNestedInheritors.kt"); } @TestMetadata("notSealedClass.kt") public void testNotSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/notSealedClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/notSealedClass.kt"); } @TestMetadata("outOfRange.kt") public void testOutOfRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/outOfRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/outOfRange.kt"); } @TestMetadata("withNonObjectInheritors.kt") public void testWithNonObjectInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/withNonObjectInheritors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/withNonObjectInheritors.kt"); } @TestMetadata("withSuperclass.kt") public void testWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSealedClassToEnum/withSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSealedClassToEnum/withSuperclass.kt"); } } @@ -6632,158 +6016,137 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertSecondaryConstructorToPrimary extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertSecondaryConstructorToPrimary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertSecondaryConstructorToPrimary"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("defaultValueChain.kt") public void testDefaultValueChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/defaultValueChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/defaultValueChain.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/init.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/init.kt"); } @TestMetadata("initAndParams.kt") public void testInitAndParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/initAndParams.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/initAndParams.kt"); } @TestMetadata("nonReachable.kt") public void testNonReachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/nonReachable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/nonReachable.kt"); } @TestMetadata("nonReachableLoop.kt") public void testNonReachableLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/nonReachableLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/nonReachableLoop.kt"); } @TestMetadata("propertyWithGetter.kt") public void testPropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/propertyWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/propertyWithGetter.kt"); } @TestMetadata("propertyWithSetter.kt") public void testPropertyWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/propertyWithSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/propertyWithSetter.kt"); } @TestMetadata("protectedConstructor.kt") public void testProtectedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/protectedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/protectedConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/simple.kt"); } @TestMetadata("useParam.kt") public void testUseParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/useParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/useParam.kt"); } @TestMetadata("varArg.kt") public void testVarArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/varArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/varArg.kt"); } @TestMetadata("varargVal.kt") public void testVarargVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/varargVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/varargVal.kt"); } @TestMetadata("withBaseAliasImplicit.kt") public void testWithBaseAliasImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseAliasImplicit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseAliasImplicit.kt"); } @TestMetadata("withBaseClass.kt") public void testWithBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseClass.kt"); } @TestMetadata("withBaseClassImplicit.kt") public void testWithBaseClassImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseClassImplicit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseClassImplicit.kt"); } @TestMetadata("withBaseClassNoArgs.kt") public void testWithBaseClassNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseClassNoArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withBaseClassNoArgs.kt"); } @TestMetadata("withComments.kt") public void testWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withComments.kt"); } @TestMetadata("withComposedModifiers.kt") public void testWithComposedModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withComposedModifiers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withComposedModifiers.kt"); } @TestMetadata("withDelegation.kt") public void testWithDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withDelegation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withDelegation.kt"); } @TestMetadata("withDifferentTypeProperty.kt") public void testWithDifferentTypeProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withDifferentTypeProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withDifferentTypeProperty.kt"); } @TestMetadata("withInterfaceAlias.kt") public void testWithInterfaceAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withInterfaceAlias.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withInterfaceAlias.kt"); } @TestMetadata("withModifiers.kt") public void testWithModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withModifiers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withModifiers.kt"); } @TestMetadata("withParameters.kt") public void testWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withParameters.kt"); } @TestMetadata("withPrimary.kt") public void testWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withPrimary.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withPrimary.kt"); } @TestMetadata("withProperties.kt") public void testWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertSecondaryConstructorToPrimary/withProperties.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertSecondaryConstructorToPrimary/withProperties.kt"); } } @@ -6791,74 +6154,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToApply extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToApply() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToApply"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("methodChain.kt") public void testMethodChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/methodChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/methodChain.kt"); } @TestMetadata("methodChainWithItParameter.kt") public void testMethodChainWithItParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/methodChainWithItParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/methodChainWithItParameter.kt"); } @TestMetadata("methodChainWithThisParameter.kt") public void testMethodChainWithThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/methodChainWithThisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/methodChainWithThisParameter.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/normal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/normal.kt"); } @TestMetadata("normal2.kt") public void testNormal2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/normal2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/normal2.kt"); } @TestMetadata("normal3.kt") public void testNormal3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/normal3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/normal3.kt"); } @TestMetadata("thisParameter.kt") public void testThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/thisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/thisParameter.kt"); } @TestMetadata("thisParameter2.kt") public void testThisParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/thisParameter2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/thisParameter2.kt"); } @TestMetadata("untilThisParameter.kt") public void testUntilThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/untilThisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/untilThisParameter.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/var.kt"); } @TestMetadata("withCommentAndSpaces.kt") public void testWithCommentAndSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToApply/withCommentAndSpaces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToApply/withCommentAndSpaces.kt"); } } @@ -6866,10 +6222,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToBlockBody extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addSpace.kt") public void testAddSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/addSpace.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/addSpace.kt"); } public void testAllFilesPresentInConvertToBlockBody() throws Exception { @@ -6878,146 +6237,122 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("annotatedExpr.kt") public void testAnnotatedExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/annotatedExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/annotatedExpr.kt"); } @TestMetadata("explicitlyNonUnitFun.kt") public void testExplicitlyNonUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/explicitlyNonUnitFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/explicitlyNonUnitFun.kt"); } @TestMetadata("explicitlyTypedFunWithUnresolvedExpression.kt") public void testExplicitlyTypedFunWithUnresolvedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/explicitlyTypedFunWithUnresolvedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/explicitlyTypedFunWithUnresolvedExpression.kt"); } @TestMetadata("explicitlyTypedFunWithUnresolvedType.kt") public void testExplicitlyTypedFunWithUnresolvedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/explicitlyTypedFunWithUnresolvedType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/explicitlyTypedFunWithUnresolvedType.kt"); } @TestMetadata("explicitlyUnitFun.kt") public void testExplicitlyUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/explicitlyUnitFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/explicitlyUnitFun.kt"); } @TestMetadata("explicitlyUnitFunWithUnresolvedExpression.kt") public void testExplicitlyUnitFunWithUnresolvedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/explicitlyUnitFunWithUnresolvedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/explicitlyUnitFunWithUnresolvedExpression.kt"); } @TestMetadata("funWithCustomUnitClass.kt") public void testFunWithCustomUnitClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/funWithCustomUnitClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/funWithCustomUnitClass.kt"); } @TestMetadata("funWithThrow.kt") public void testFunWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/funWithThrow.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/funWithThrow.kt"); } @TestMetadata("funWithUnit.kt") public void testFunWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/funWithUnit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/funWithUnit.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/getter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/getter.kt"); } @TestMetadata("getterTypeInferred.kt") public void testGetterTypeInferred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/getterTypeInferred.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/getterTypeInferred.kt"); } @TestMetadata("getterWithThrow.kt") public void testGetterWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/getterWithThrow.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/getterWithThrow.kt"); } @TestMetadata("ifWhenUnit.kt") public void testIfWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/ifWhenUnit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/ifWhenUnit.kt"); } @TestMetadata("implicitlyNonUnitFun.kt") public void testImplicitlyNonUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/implicitlyNonUnitFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/implicitlyNonUnitFun.kt"); } @TestMetadata("implicitlyTypedFunWithUnresolvedType.kt") public void testImplicitlyTypedFunWithUnresolvedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/implicitlyTypedFunWithUnresolvedType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/implicitlyTypedFunWithUnresolvedType.kt"); } @TestMetadata("implicitlyUnitFun.kt") public void testImplicitlyUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/implicitlyUnitFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/implicitlyUnitFun.kt"); } @TestMetadata("labeledExpr.kt") public void testLabeledExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/labeledExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/labeledExpr.kt"); } @TestMetadata("nothingFun.kt") public void testNothingFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/nothingFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/nothingFun.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/setter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/setter.kt"); } @TestMetadata("valueIsAnonymousObject.kt") public void testValueIsAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject.kt"); } @TestMetadata("valueIsAnonymousObject2.kt") public void testValueIsAnonymousObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject2.kt"); } @TestMetadata("valueIsAnonymousObject3.kt") public void testValueIsAnonymousObject3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject3.kt"); } @TestMetadata("valueIsAnonymousObject4.kt") public void testValueIsAnonymousObject4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject4.kt"); } @TestMetadata("whenUnit.kt") public void testWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/whenUnit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToBlockBody/whenUnit.kt"); } } @@ -7025,158 +6360,137 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToConcatenatedString extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToConcatenatedString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToConcatenatedString"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("embeddedIf.kt") public void testEmbeddedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/embeddedIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/embeddedIf.kt"); } @TestMetadata("embeddedIfBraces.kt") public void testEmbeddedIfBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/embeddedIfBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/embeddedIfBraces.kt"); } @TestMetadata("emptyBraces.kt") public void testEmptyBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/emptyBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/emptyBraces.kt"); } @TestMetadata("handlesEscapeString.kt") public void testHandlesEscapeString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/handlesEscapeString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/handlesEscapeString.kt"); } @TestMetadata("interpolate2StringConstants.kt") public void testInterpolate2StringConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolate2StringConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolate2StringConstants.kt"); } @TestMetadata("interpolate3.kt") public void testInterpolate3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolate3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolate3.kt"); } @TestMetadata("interpolateChar.kt") public void testInterpolateChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateChar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateChar.kt"); } @TestMetadata("interpolateConstants.kt") public void testInterpolateConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateConstants.kt"); } @TestMetadata("interpolateMapAccess.kt") public void testInterpolateMapAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateMapAccess.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateMapAccess.kt"); } @TestMetadata("interpolateMethodInvoke.kt") public void testInterpolateMethodInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateMethodInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateMethodInvoke.kt"); } @TestMetadata("interpolateSimpleWithBraces.kt") public void testInterpolateSimpleWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateSimpleWithBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateSimpleWithBraces.kt"); } @TestMetadata("interpolateStringWithFloat.kt") public void testInterpolateStringWithFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateStringWithFloat.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateStringWithFloat.kt"); } @TestMetadata("interpolateStringWithInt.kt") public void testInterpolateStringWithInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/interpolateStringWithInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/interpolateStringWithInt.kt"); } @TestMetadata("lastExprIsNamedExpression.kt") public void testLastExprIsNamedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/lastExprIsNamedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/lastExprIsNamedExpression.kt"); } @TestMetadata("multilineString.kt") public void testMultilineString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/multilineString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/multilineString.kt"); } @TestMetadata("multilineWhenExpr.kt") public void testMultilineWhenExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/multilineWhenExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/multilineWhenExpr.kt"); } @TestMetadata("namedExprBetweenConstants.kt") public void testNamedExprBetweenConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/namedExprBetweenConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/namedExprBetweenConstants.kt"); } @TestMetadata("notApplicableForErrorElement.kt") public void testNotApplicableForErrorElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/notApplicableForErrorElement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/notApplicableForErrorElement.kt"); } @TestMetadata("notApplicableForSimple.kt") public void testNotApplicableForSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/notApplicableForSimple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/notApplicableForSimple.kt"); } @TestMetadata("notAvailableForDollarSignLiteral.kt") public void testNotAvailableForDollarSignLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/notAvailableForDollarSignLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/notAvailableForDollarSignLiteral.kt"); } @TestMetadata("singleVar.kt") public void testSingleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/singleVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/singleVar.kt"); } @TestMetadata("startsWithInt.kt") public void testStartsWithInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/startsWithInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/startsWithInt.kt"); } @TestMetadata("startsWithStringExpression.kt") public void testStartsWithStringExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/startsWithStringExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/startsWithStringExpression.kt"); } @TestMetadata("tricky.kt") public void testTricky() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/tricky.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/tricky.kt"); } @TestMetadata("withAndWithoutBraces.kt") public void testWithAndWithoutBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToConcatenatedString/withAndWithoutBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToConcatenatedString/withAndWithoutBraces.kt"); } } @@ -7184,110 +6498,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToForEachFunctionCall extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToForEachFunctionCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToForEachFunctionCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("binaryExpressionLoopRange.kt") public void testBinaryExpressionLoopRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/binaryExpressionLoopRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/binaryExpressionLoopRange.kt"); } @TestMetadata("blockBodyExpression.kt") public void testBlockBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/blockBodyExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/blockBodyExpression.kt"); } @TestMetadata("blockCommentOnly.kt") public void testBlockCommentOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/blockCommentOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/blockCommentOnly.kt"); } @TestMetadata("commentsInBody.kt") public void testCommentsInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/commentsInBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/commentsInBody.kt"); } @TestMetadata("commentsInBody2.kt") public void testCommentsInBody2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/commentsInBody2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/commentsInBody2.kt"); } @TestMetadata("commentsOutsideBody.kt") public void testCommentsOutsideBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/commentsOutsideBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/commentsOutsideBody.kt"); } @TestMetadata("continueToReturnWithLabel.kt") public void testContinueToReturnWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/continueToReturnWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/continueToReturnWithLabel.kt"); } @TestMetadata("continueToReturnWithoutLabel.kt") public void testContinueToReturnWithoutLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/continueToReturnWithoutLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/continueToReturnWithoutLabel.kt"); } @TestMetadata("emptyBody.kt") public void testEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/emptyBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/emptyBody.kt"); } @TestMetadata("endOfLineComment1.kt") public void testEndOfLineComment1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/endOfLineComment1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/endOfLineComment1.kt"); } @TestMetadata("endOfLineComment2.kt") public void testEndOfLineComment2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/endOfLineComment2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/endOfLineComment2.kt"); } @TestMetadata("endOfLineComment3.kt") public void testEndOfLineComment3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/endOfLineComment3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/endOfLineComment3.kt"); } @TestMetadata("iterativeElementTypeSpecified.kt") public void testIterativeElementTypeSpecified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/iterativeElementTypeSpecified.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/iterativeElementTypeSpecified.kt"); } @TestMetadata("noCurlyBraces.kt") public void testNoCurlyBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/noCurlyBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/noCurlyBraces.kt"); } @TestMetadata("noStatements.kt") public void testNoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/noStatements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/noStatements.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/simple.kt"); } @TestMetadata("typeAnnotatedWithNonBlockBody.kt") public void testTypeAnnotatedWithNonBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToForEachFunctionCall/typeAnnotatedWithNonBlockBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToForEachFunctionCall/typeAnnotatedWithNonBlockBody.kt"); } } @@ -7295,14 +6596,17 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToRawStringTemplate extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToRawStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToRawStringTemplate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRawStringTemplate/basic.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRawStringTemplate/basic.kt"); } } @@ -7310,74 +6614,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToRun extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToRun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToRun"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("itReceiver.kt") public void testItReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/itReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/itReceiver.kt"); } @TestMetadata("methodChain.kt") public void testMethodChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/methodChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/methodChain.kt"); } @TestMetadata("methodChainWithItParameter.kt") public void testMethodChainWithItParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/methodChainWithItParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/methodChainWithItParameter.kt"); } @TestMetadata("methodChainWithThisParameter.kt") public void testMethodChainWithThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/methodChainWithThisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/methodChainWithThisParameter.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/normal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/normal.kt"); } @TestMetadata("normal2.kt") public void testNormal2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/normal2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/normal2.kt"); } @TestMetadata("normal3.kt") public void testNormal3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/normal3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/normal3.kt"); } @TestMetadata("thisParameter.kt") public void testThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/thisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/thisParameter.kt"); } @TestMetadata("thisReceiver.kt") public void testThisReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/thisReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/thisReceiver.kt"); } @TestMetadata("untilThisParameter.kt") public void testUntilThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/untilThisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/untilThisParameter.kt"); } @TestMetadata("withCommentAndSpaces.kt") public void testWithCommentAndSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToRun/withCommentAndSpaces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToRun/withCommentAndSpaces.kt"); } } @@ -7385,266 +6682,240 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToStringTemplate extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToStringTemplate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("backslashNMultilineString.kt") public void testBackslashNMultilineString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/backslashNMultilineString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/backslashNMultilineString.kt"); } @TestMetadata("combineEmptyStrings.kt") public void testCombineEmptyStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/combineEmptyStrings.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/combineEmptyStrings.kt"); } @TestMetadata("combinesNonStringsAsStrings.kt") public void testCombinesNonStringsAsStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/combinesNonStringsAsStrings.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/combinesNonStringsAsStrings.kt"); } @TestMetadata("combinesNonStringsAsStrings2.kt") public void testCombinesNonStringsAsStrings2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/combinesNonStringsAsStrings2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/combinesNonStringsAsStrings2.kt"); } @TestMetadata("comment.kt") public void testComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/comment.kt"); } @TestMetadata("consecutiveNewlines.kt") public void testConsecutiveNewlines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/consecutiveNewlines.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/consecutiveNewlines.kt"); } @TestMetadata("doesNotCorruptExistingTemplate.kt") public void testDoesNotCorruptExistingTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/doesNotCorruptExistingTemplate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/doesNotCorruptExistingTemplate.kt"); } @TestMetadata("doesNotCorruptExistingTemplateWithBraces.kt") public void testDoesNotCorruptExistingTemplateWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/doesNotCorruptExistingTemplateWithBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/doesNotCorruptExistingTemplateWithBraces.kt"); } @TestMetadata("dollarSignChar.kt") public void testDollarSignChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/dollarSignChar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/dollarSignChar.kt"); } @TestMetadata("endOfLineComment.kt") public void testEndOfLineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/endOfLineComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/endOfLineComment.kt"); } @TestMetadata("escapedQuote.kt") public void testEscapedQuote() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/escapedQuote.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/escapedQuote.kt"); } @TestMetadata("escapedQuote2.kt") public void testEscapedQuote2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/escapedQuote2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/escapedQuote2.kt"); } @TestMetadata("insertBracesForSimpleNamedExpression.kt") public void testInsertBracesForSimpleNamedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/insertBracesForSimpleNamedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/insertBracesForSimpleNamedExpression.kt"); } @TestMetadata("interpolate2StringConstants.kt") public void testInterpolate2StringConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolate2StringConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolate2StringConstants.kt"); } @TestMetadata("interpolate2Vals.kt") public void testInterpolate2Vals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolate2Vals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolate2Vals.kt"); } @TestMetadata("interpolate3Left.kt") public void testInterpolate3Left() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolate3Left.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolate3Left.kt"); } @TestMetadata("interpolate3Right.kt") public void testInterpolate3Right() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolate3Right.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolate3Right.kt"); } @TestMetadata("interpolateChar.kt") public void testInterpolateChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateChar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateChar.kt"); } @TestMetadata("interpolateDollarSign.kt") public void testInterpolateDollarSign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateDollarSign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateDollarSign.kt"); } @TestMetadata("interpolateMapAccess.kt") public void testInterpolateMapAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateMapAccess.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateMapAccess.kt"); } @TestMetadata("interpolateMethodInvoke.kt") public void testInterpolateMethodInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateMethodInvoke.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateMethodInvoke.kt"); } @TestMetadata("interpolateMultiline.kt") public void testInterpolateMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateMultiline.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateMultiline.kt"); } @TestMetadata("interpolateStringWithFloat.kt") public void testInterpolateStringWithFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateStringWithFloat.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateStringWithFloat.kt"); } @TestMetadata("interpolateStringWithInt.kt") public void testInterpolateStringWithInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/interpolateStringWithInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/interpolateStringWithInt.kt"); } @TestMetadata("invalidChar.kt") public void testInvalidChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/invalidChar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/invalidChar.kt"); } @TestMetadata("kt11295.kt") public void testKt11295() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/kt11295.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/kt11295.kt"); } @TestMetadata("longTemplatePlusStringLiteral.kt") public void testLongTemplatePlusStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/longTemplatePlusStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/longTemplatePlusStringLiteral.kt"); } @TestMetadata("multilineString.kt") public void testMultilineString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/multilineString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/multilineString.kt"); } @TestMetadata("newLine.kt") public void testNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/newLine.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/newLine.kt"); } @TestMetadata("noBracesForLastSimpleExpression.kt") public void testNoBracesForLastSimpleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/noBracesForLastSimpleExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/noBracesForLastSimpleExpression.kt"); } @TestMetadata("noBracesSimpleFollowedByDot.kt") public void testNoBracesSimpleFollowedByDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/noBracesSimpleFollowedByDot.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/noBracesSimpleFollowedByDot.kt"); } @TestMetadata("notApplicableForErrorElement.kt") public void testNotApplicableForErrorElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/notApplicableForErrorElement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/notApplicableForErrorElement.kt"); } @TestMetadata("numberLiterals.kt") public void testNumberLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/numberLiterals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/numberLiterals.kt"); } @TestMetadata("onMultipleLines.kt") public void testOnMultipleLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/onMultipleLines.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/onMultipleLines.kt"); } @TestMetadata("onlyForConcat.kt") public void testOnlyForConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/onlyForConcat.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/onlyForConcat.kt"); } @TestMetadata("onlyForStrings.kt") public void testOnlyForStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/onlyForStrings.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/onlyForStrings.kt"); } @TestMetadata("requiresPlusOperator.kt") public void testRequiresPlusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/requiresPlusOperator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/requiresPlusOperator.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/simple.kt"); } @TestMetadata("specialCharsInCharLiteral.kt") public void testSpecialCharsInCharLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/specialCharsInCharLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/specialCharsInCharLiteral.kt"); } @TestMetadata("stringPlusStringLiteral.kt") public void testStringPlusStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/stringPlusStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/stringPlusStringLiteral.kt"); } @TestMetadata("templatePlusStringLiteral.kt") public void testTemplatePlusStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/templatePlusStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/templatePlusStringLiteral.kt"); } @TestMetadata("tricky.kt") public void testTricky() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/tricky.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/tricky.kt"); } @TestMetadata("unescapeSingleQuote.kt") public void testUnescapeSingleQuote() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToStringTemplate/unescapeSingleQuote.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToStringTemplate/unescapeSingleQuote.kt"); + } + + @TestMetadata("idea/testData/intentions/convertToStringTemplate/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToStringTemplate/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -7652,74 +6923,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertToWith extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertToWith() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertToWith"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("itReceiver.kt") public void testItReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/itReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/itReceiver.kt"); } @TestMetadata("methodChain.kt") public void testMethodChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/methodChain.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/methodChain.kt"); } @TestMetadata("methodChainWithItParameter.kt") public void testMethodChainWithItParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/methodChainWithItParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/methodChainWithItParameter.kt"); } @TestMetadata("methodChainWithThisParameter.kt") public void testMethodChainWithThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/methodChainWithThisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/methodChainWithThisParameter.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/normal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/normal.kt"); } @TestMetadata("normal2.kt") public void testNormal2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/normal2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/normal2.kt"); } @TestMetadata("normal3.kt") public void testNormal3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/normal3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/normal3.kt"); } @TestMetadata("thisParameter.kt") public void testThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/thisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/thisParameter.kt"); } @TestMetadata("thisReceiver.kt") public void testThisReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/thisReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/thisReceiver.kt"); } @TestMetadata("untilThisParameter.kt") public void testUntilThisParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/untilThisParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/untilThisParameter.kt"); } @TestMetadata("withCommentAndSpaces.kt") public void testWithCommentAndSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToWith/withCommentAndSpaces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertToWith/withCommentAndSpaces.kt"); } } @@ -7727,80 +6991,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertTryFinallyToUseCall extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertTryFinallyToUseCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertTryFinallyToUseCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/catch.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/catch.kt"); } @TestMetadata("example.kt") public void testExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/example.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/example.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/implicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/implicitReceiver.kt"); } @TestMetadata("notClose.kt") public void testNotClose() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/notClose.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/notClose.kt"); } @TestMetadata("notOnlyClose.kt") public void testNotOnlyClose() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/notOnlyClose.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/notOnlyClose.kt"); } @TestMetadata("parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/parameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/parameter.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/safeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/safeCall.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/simple.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/this.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/this.kt"); } @TestMetadata("thisLabeled.kt") public void testThisLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/thisLabeled.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/thisLabeled.kt"); } @TestMetadata("triple.kt") public void testTriple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/triple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/triple.kt"); } @TestMetadata("wrongCaret.kt") public void testWrongCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTryFinallyToUseCall/wrongCaret.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTryFinallyToUseCall/wrongCaret.kt"); } } @@ -7808,188 +7064,162 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertTwoComparisonsToRangeCheck extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertTwoComparisonsToRangeCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertTwoComparisonsToRangeCheck"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/char.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/char.kt"); } @TestMetadata("charInclusive.kt") public void testCharInclusive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/charInclusive.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/charInclusive.kt"); } @TestMetadata("charInt.kt") public void testCharInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/charInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/charInt.kt"); } @TestMetadata("compareToComparableSameType.kt") public void testCompareToComparableSameType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/compareToComparableSameType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/compareToComparableSameType.kt"); } @TestMetadata("compareToDifferentTypes.kt") public void testCompareToDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/compareToDifferentTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/compareToDifferentTypes.kt"); } @TestMetadata("compareToSameType.kt") public void testCompareToSameType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/compareToSameType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/compareToSameType.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/double.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/double.kt"); } @TestMetadata("doubleToInt1.kt") public void testDoubleToInt1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/doubleToInt1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/doubleToInt1.kt"); } @TestMetadata("doubleToInt2.kt") public void testDoubleToInt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/doubleToInt2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/doubleToInt2.kt"); } @TestMetadata("flipped.kt") public void testFlipped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/flipped.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/flipped.kt"); } @TestMetadata("flippedSideEffect.kt") public void testFlippedSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/flippedSideEffect.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/flippedSideEffect.kt"); } @TestMetadata("gtDouble.kt") public void testGtDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtDouble.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtDouble.kt"); } @TestMetadata("gtDouble2.kt") public void testGtDouble2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtDouble2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtDouble2.kt"); } @TestMetadata("gteqgt.kt") public void testGteqgt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqgt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqgt.kt"); } @TestMetadata("gteqgteq.kt") public void testGteqgteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqgteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqgteq.kt"); } @TestMetadata("gteqlt.kt") public void testGteqlt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqlt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqlt.kt"); } @TestMetadata("gteqlteq.kt") public void testGteqlteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqlteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gteqlteq.kt"); } @TestMetadata("gtgt.kt") public void testGtgt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtgt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtgt.kt"); } @TestMetadata("gtgteq.kt") public void testGtgteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtgteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtgteq.kt"); } @TestMetadata("gtlt.kt") public void testGtlt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtlt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtlt.kt"); } @TestMetadata("gtlteq.kt") public void testGtlteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtlteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/gtlteq.kt"); } @TestMetadata("lteqgt.kt") public void testLteqgt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqgt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqgt.kt"); } @TestMetadata("lteqgteq.kt") public void testLteqgteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqgteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqgteq.kt"); } @TestMetadata("lteqlt.kt") public void testLteqlt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqlt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqlt.kt"); } @TestMetadata("lteqlteq.kt") public void testLteqlteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqlteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/lteqlteq.kt"); } @TestMetadata("ltgt.kt") public void testLtgt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltgt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltgt.kt"); } @TestMetadata("ltgteq.kt") public void testLtgteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltgteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltgteq.kt"); } @TestMetadata("ltlt.kt") public void testLtlt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltlt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltlt.kt"); } @TestMetadata("ltlteq.kt") public void testLtlteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltlteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/ltlteq.kt"); } @TestMetadata("nonConstants.kt") public void testNonConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertTwoComparisonsToRangeCheck/nonConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertTwoComparisonsToRangeCheck/nonConstants.kt"); } } @@ -7997,20 +7227,22 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertUnsafeCastCallToUnsafeCast extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertUnsafeCastCallToUnsafeCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertUnsafeCastCallToUnsafeCast"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertUnsafeCastCallToUnsafeCast/call.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertUnsafeCastCallToUnsafeCast/call.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertUnsafeCastCallToUnsafeCast/safeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertUnsafeCastCallToUnsafeCast/safeCall.kt"); } } @@ -8018,20 +7250,22 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertUnsafeCastToUnsafeCastCall extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertUnsafeCastToUnsafeCastCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertUnsafeCastToUnsafeCastCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("cast.kt") public void testCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertUnsafeCastToUnsafeCastCall/cast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertUnsafeCastToUnsafeCastCall/cast.kt"); } @TestMetadata("safeCast.kt") public void testSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertUnsafeCastToUnsafeCastCall/safeCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/convertUnsafeCastToUnsafeCastCall/safeCast.kt"); } } @@ -8039,38 +7273,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CopyConcatenatedStringToClipboard extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCopyConcatenatedStringToClipboard() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/copyConcatenatedStringToClipboard"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt"); } @TestMetadata("numbers.kt") public void testNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt"); } @TestMetadata("simpleString.kt") public void testSimpleString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt"); - doTest(fileName); + runTest("idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt"); } } @@ -8078,6 +7311,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -8086,16 +7323,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertMemberToExtension extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/abstract.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/abstract.kt"); } @TestMetadata("abstractProperty.kt") public void testAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/abstractProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/abstractProperty.kt"); } public void testAllFilesPresentInConvertMemberToExtension() throws Exception { @@ -8104,224 +7343,187 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("explicitUnit.kt") public void testExplicitUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/explicitUnit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/explicitUnit.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/extension.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/extension.kt"); } @TestMetadata("final.kt") public void testFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/final.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/final.kt"); } @TestMetadata("funcitonNoName.kt") public void testFuncitonNoName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/funcitonNoName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/funcitonNoName.kt"); } @TestMetadata("functionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/functionType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/functionType.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/genericClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/genericClass.kt"); } @TestMetadata("genericFun.kt") public void testGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/genericFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/genericFun.kt"); } @TestMetadata("genericFunInGenericClass.kt") public void testGenericFunInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/genericFunInGenericClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/genericFunInGenericClass.kt"); } @TestMetadata("genericFunInGenericClassWithUpperBounds.kt") public void testGenericFunInGenericClassWithUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/genericFunInGenericClassWithUpperBounds.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/genericFunInGenericClassWithUpperBounds.kt"); } @TestMetadata("genericFunParamAfterName.kt") public void testGenericFunParamAfterName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/genericFunParamAfterName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/genericFunParamAfterName.kt"); } @TestMetadata("inFunctionBody.kt") public void testInFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/inFunctionBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/inFunctionBody.kt"); } @TestMetadata("inObject.kt") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/inObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/inObject.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/internal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/internal.kt"); } @TestMetadata("KDoc.kt") public void testKDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/KDoc.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/KDoc.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/localFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/localFunction.kt"); } @TestMetadata("nonBlockBodyNoType.kt") public void testNonBlockBodyNoType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/nonBlockBodyNoType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/nonBlockBodyNoType.kt"); } @TestMetadata("nonBlockBodyWithType.kt") public void testNonBlockBodyWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/nonBlockBodyWithType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/nonBlockBodyWithType.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/open.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/open.kt"); } @TestMetadata("outsideFunction.kt") public void testOutsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/outsideFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/outsideFunction.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/override.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/override.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/private.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/private.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/protected.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/protected.kt"); } @TestMetadata("public.kt") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/public.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/public.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/secondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/simple.kt"); } @TestMetadata("topLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/topLevelFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/topLevelFunction.kt"); } @TestMetadata("typeFqName.kt") public void testTypeFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/typeFqName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/typeFqName.kt"); } @TestMetadata("unknownType.kt") public void testUnknownType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/unknownType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/unknownType.kt"); } @TestMetadata("valWithDefaultGetter.kt") public void testValWithDefaultGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/valWithDefaultGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/valWithDefaultGetter.kt"); } @TestMetadata("valWithGetter.kt") public void testValWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/valWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/valWithGetter.kt"); } @TestMetadata("valWithGetterBlockBody.kt") public void testValWithGetterBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/valWithGetterBlockBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/valWithGetterBlockBody.kt"); } @TestMetadata("varWithDefaultGetterAndSetter.kt") public void testVarWithDefaultGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/varWithDefaultGetterAndSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/varWithDefaultGetterAndSetter.kt"); } @TestMetadata("varWithDefaultSetter.kt") public void testVarWithDefaultSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/varWithDefaultSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/varWithDefaultSetter.kt"); } @TestMetadata("varWithGetter.kt") public void testVarWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/varWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/varWithGetter.kt"); } @TestMetadata("varWithGetterAndSetter.kt") public void testVarWithGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/varWithGetterAndSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/varWithGetterAndSetter.kt"); } @TestMetadata("varWithSetter.kt") public void testVarWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/varWithSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/varWithSetter.kt"); } @TestMetadata("withType.kt") public void testWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/convertMemberToExtension/withType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/convertMemberToExtension/withType.kt"); } } @@ -8329,80 +7531,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Split extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSplit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/declarations/split"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("longInit.kt") public void testLongInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/longInit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/longInit.kt"); } @TestMetadata("longInit2.kt") public void testLongInit2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/longInit2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/longInit2.kt"); } @TestMetadata("noInitializer.kt") public void testNoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/noInitializer.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/noInitializer.kt"); } @TestMetadata("noInitializer2.kt") public void testNoInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/noInitializer2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/noInitializer2.kt"); } @TestMetadata("nonLocalProperty.kt") public void testNonLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/nonLocalProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/nonLocalProperty.kt"); } @TestMetadata("nonLocalProperty2.kt") public void testNonLocalProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/nonLocalProperty2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/nonLocalProperty2.kt"); } @TestMetadata("simpleInit.kt") public void testSimpleInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/simpleInit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/simpleInit.kt"); } @TestMetadata("simpleInit2.kt") public void testSimpleInit2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/simpleInit2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/simpleInit2.kt"); } @TestMetadata("simpleInitWithErrorType.kt") public void testSimpleInitWithErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/simpleInitWithErrorType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/simpleInitWithErrorType.kt"); } @TestMetadata("simpleInitWithErrorType2.kt") public void testSimpleInitWithErrorType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/simpleInitWithErrorType2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/simpleInitWithErrorType2.kt"); } @TestMetadata("simpleInitWithType.kt") public void testSimpleInitWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/simpleInitWithType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/simpleInitWithType.kt"); } @TestMetadata("simpleInitWithType2.kt") public void testSimpleInitWithType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/declarations/split/simpleInitWithType2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/declarations/split/simpleInitWithType2.kt"); } } } @@ -8411,116 +7605,115 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringInLambda extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDestructuringInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/destructuringInLambda"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("caret.kt") public void testCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/caret.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/caret.kt"); } @TestMetadata("dependentLocal.kt") public void testDependentLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/dependentLocal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/dependentLocal.kt"); } @TestMetadata("firstProperties.kt") public void testFirstProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/firstProperties.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/firstProperties.kt"); } @TestMetadata("fold.kt") public void testFold() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/fold.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/fold.kt"); } @TestMetadata("invisible.kt") public void testInvisible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/invisible.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/invisible.kt"); } @TestMetadata("last.kt") public void testLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/last.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/last.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/list.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/list.kt"); } @TestMetadata("mapIndexedExceptFirst.kt") public void testMapIndexedExceptFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/mapIndexedExceptFirst.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/mapIndexedExceptFirst.kt"); } @TestMetadata("mapIndexedLast.kt") public void testMapIndexedLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/mapIndexedLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/mapIndexedLast.kt"); } @TestMetadata("noIt.kt") public void testNoIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/noIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/noIt.kt"); } @TestMetadata("noItVariables.kt") public void testNoItVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/noItVariables.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/noItVariables.kt"); } @TestMetadata("noItWithDestructuring.kt") public void testNoItWithDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/noItWithDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/noItWithDestructuring.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/nullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/nullable.kt"); } @TestMetadata("pair.kt") public void testPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/pair.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/pair.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/simple.kt"); } @TestMetadata("twoOfThree.kt") public void testTwoOfThree() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/twoOfThree.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/twoOfThree.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/variables.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/variables.kt"); } @TestMetadata("visible.kt") public void testVisible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringInLambda/visible.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringInLambda/visible.kt"); + } + + @TestMetadata("idea/testData/intentions/destructuringInLambda/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/destructuringInLambda/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -8528,56 +7721,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringVariables extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDestructuringVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/destructuringVariables"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("caret.kt") public void testCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/caret.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/caret.kt"); } @TestMetadata("changingVar.kt") public void testChangingVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/changingVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/changingVar.kt"); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/classProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/classProperty.kt"); } @TestMetadata("noInitializer.kt") public void testNoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/noInitializer.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/noInitializer.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/simple.kt"); } @TestMetadata("toplevel.kt") public void testToplevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/toplevel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/toplevel.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/var.kt"); } @TestMetadata("withModifiers.kt") public void testWithModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/destructuringVariables/withModifiers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/destructuringVariables/withModifiers.kt"); } } @@ -8585,122 +7774,107 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FoldInitializerAndIfToElvis extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFoldInitializerAndIfToElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/foldInitializerAndIfToElvis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("Break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/Break.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/Break.kt"); } @TestMetadata("CommentInBlock.kt") public void testCommentInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/CommentInBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/CommentInBlock.kt"); } @TestMetadata("Comments.kt") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/Comments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/Comments.kt"); } @TestMetadata("Comments2.kt") public void testComments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/Comments2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/Comments2.kt"); } @TestMetadata("Continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/Continue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/Continue.kt"); } @TestMetadata("ExplicitValType.kt") public void testExplicitValType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/ExplicitValType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/ExplicitValType.kt"); } @TestMetadata("ExplicitVarType.kt") public void testExplicitVarType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/ExplicitVarType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/ExplicitVarType.kt"); } @TestMetadata("IfNotNull.kt") public void testIfNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/IfNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/IfNotNull.kt"); } @TestMetadata("ifStatementPriority.kt") public void testIfStatementPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/ifStatementPriority.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/ifStatementPriority.kt"); } @TestMetadata("MultiStatementBlock.kt") public void testMultiStatementBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/MultiStatementBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/MultiStatementBlock.kt"); } @TestMetadata("NotExit.kt") public void testNotExit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/NotExit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/NotExit.kt"); } @TestMetadata("NotIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/NotIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/NotIs.kt"); } @TestMetadata("OtherVar1.kt") public void testOtherVar1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/OtherVar1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/OtherVar1.kt"); } @TestMetadata("OtherVar2.kt") public void testOtherVar2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/OtherVar2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/OtherVar2.kt"); } @TestMetadata("Return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/Return.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/Return.kt"); } @TestMetadata("ThrowInBlock.kt") public void testThrowInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/ThrowInBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/ThrowInBlock.kt"); } @TestMetadata("UsedInside.kt") public void testUsedInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/UsedInside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/UsedInside.kt"); } @TestMetadata("UsedInsideInTemplate.kt") public void testUsedInsideInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/UsedInsideInTemplate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/UsedInsideInTemplate.kt"); } @TestMetadata("Var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/foldInitializerAndIfToElvis/Var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/foldInitializerAndIfToElvis/Var.kt"); } } @@ -8708,6 +7882,10 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplementAbstractMember extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplementAbstractMember() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/implementAbstractMember"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -8716,86 +7894,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/implementAbstractMember/function"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/enumClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/enumClass.kt"); } @TestMetadata("enumClassWithSemicolon.kt") public void testEnumClassWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/enumClassWithSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/enumClassWithSemicolon.kt"); } @TestMetadata("enumClassWithSemicolonAndMembers.kt") public void testEnumClassWithSemicolonAndMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/enumClassWithSemicolonAndMembers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/enumClassWithSemicolonAndMembers.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/enumEntries.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/enumEntries.kt"); } @TestMetadata("enumEntriesWithArgs.kt") public void testEnumEntriesWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/enumEntriesWithArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/enumEntriesWithArgs.kt"); } @TestMetadata("implementAll.kt") public void testImplementAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/implementAll.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/implementAll.kt"); } @TestMetadata("inFinalClass.kt") public void testInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/inFinalClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/inFinalClass.kt"); } @TestMetadata("inObject.kt") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/inObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/inObject.kt"); } @TestMetadata("noDirectOverridesNeeded.kt") public void testNoDirectOverridesNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/noDirectOverridesNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/noDirectOverridesNeeded.kt"); } @TestMetadata("noInheritors.kt") public void testNoInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/noInheritors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/noInheritors.kt"); } @TestMetadata("notAbstractInClass.kt") public void testNotAbstractInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/notAbstractInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/notAbstractInClass.kt"); } @TestMetadata("notAbstractInInterface.kt") public void testNotAbstractInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/notAbstractInInterface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/notAbstractInInterface.kt"); } @TestMetadata("notAbstractNoBodyInClass.kt") public void testNotAbstractNoBodyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/function/notAbstractNoBodyInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/function/notAbstractNoBodyInClass.kt"); } } @@ -8803,86 +7972,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/implementAbstractMember/property"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/enumClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/enumClass.kt"); } @TestMetadata("enumClassWithSemicolon.kt") public void testEnumClassWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/enumClassWithSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/enumClassWithSemicolon.kt"); } @TestMetadata("enumClassWithSemicolonAndMembers.kt") public void testEnumClassWithSemicolonAndMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/enumClassWithSemicolonAndMembers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/enumClassWithSemicolonAndMembers.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/enumEntries.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/enumEntries.kt"); } @TestMetadata("enumEntriesWithArgs.kt") public void testEnumEntriesWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/enumEntriesWithArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/enumEntriesWithArgs.kt"); } @TestMetadata("implementAll.kt") public void testImplementAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/implementAll.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/implementAll.kt"); } @TestMetadata("inFinalClass.kt") public void testInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/inFinalClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/inFinalClass.kt"); } @TestMetadata("inObject.kt") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/inObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/inObject.kt"); } @TestMetadata("noDirectOverridesNeeded.kt") public void testNoDirectOverridesNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/noDirectOverridesNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/noDirectOverridesNeeded.kt"); } @TestMetadata("noInheritors.kt") public void testNoInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/noInheritors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/noInheritors.kt"); } @TestMetadata("notAbstractInClass.kt") public void testNotAbstractInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/notAbstractInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/notAbstractInClass.kt"); } @TestMetadata("notAbstractNoBodyInClass.kt") public void testNotAbstractNoBodyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/notAbstractNoBodyInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/notAbstractNoBodyInClass.kt"); } @TestMetadata("notAbstractWithGetterInInterface.kt") public void testNotAbstractWithGetterInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAbstractMember/property/notAbstractWithGetterInInterface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAbstractMember/property/notAbstractWithGetterInInterface.kt"); } } } @@ -8891,74 +8051,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImplementAsConstructorParameter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImplementAsConstructorParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/implementAsConstructorParameter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("enumClass.kt") public void testEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/enumClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/enumClass.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/function.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/function.kt"); } @TestMetadata("implementAll.kt") public void testImplementAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/implementAll.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/implementAll.kt"); } @TestMetadata("inEnumClass.kt") public void testInEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/inEnumClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/inEnumClass.kt"); } @TestMetadata("inFinalClass.kt") public void testInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/inFinalClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/inFinalClass.kt"); } @TestMetadata("inObject.kt") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/inObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/inObject.kt"); } @TestMetadata("noDirectOverridesNeeded.kt") public void testNoDirectOverridesNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/noDirectOverridesNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/noDirectOverridesNeeded.kt"); } @TestMetadata("noInheritors.kt") public void testNoInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/noInheritors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/noInheritors.kt"); } @TestMetadata("notAbstractInClass.kt") public void testNotAbstractInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/notAbstractInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/notAbstractInClass.kt"); } @TestMetadata("notAbstractNoBodyInClass.kt") public void testNotAbstractNoBodyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/notAbstractNoBodyInClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/notAbstractNoBodyInClass.kt"); } @TestMetadata("notAbstractWithGetterInInterface.kt") public void testNotAbstractWithGetterInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/implementAsConstructorParameter/notAbstractWithGetterInInterface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/implementAsConstructorParameter/notAbstractWithGetterInInterface.kt"); } } @@ -8966,80 +8119,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportAllMembers extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportAllMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/importAllMembers"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AlreadyImported.kt") public void testAlreadyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/AlreadyImported.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/AlreadyImported.kt"); } @TestMetadata("AlreadyImportedWithStar.kt") public void testAlreadyImportedWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/AlreadyImportedWithStar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/AlreadyImportedWithStar.kt"); } @TestMetadata("AmbiguousCalls.kt") public void testAmbiguousCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/AmbiguousCalls.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/AmbiguousCalls.kt"); } @TestMetadata("EnumMembers.kt") public void testEnumMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/EnumMembers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/EnumMembers.kt"); } @TestMetadata("ImportAllMembersInImport.kt") public void testImportAllMembersInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/ImportAllMembersInImport.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/ImportAllMembersInImport.kt"); } @TestMetadata("NotFromCompanionObject.kt") public void testNotFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/NotFromCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/NotFromCompanionObject.kt"); } @TestMetadata("NotFromObject.kt") public void testNotFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/NotFromObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/NotFromObject.kt"); } @TestMetadata("QualifiedName.kt") public void testQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/QualifiedName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/QualifiedName.kt"); } @TestMetadata("QualifiedName2.kt") public void testQualifiedName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/QualifiedName2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/QualifiedName2.kt"); } @TestMetadata("RemoveSingleImports.kt") public void testRemoveSingleImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/RemoveSingleImports.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/RemoveSingleImports.kt"); } @TestMetadata("StaticJavaMembers.kt") public void testStaticJavaMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/StaticJavaMembers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/StaticJavaMembers.kt"); } @TestMetadata("UnresolvedMember.kt") public void testUnresolvedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importAllMembers/UnresolvedMember.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importAllMembers/UnresolvedMember.kt"); } } @@ -9047,104 +8192,92 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportMember extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportMember() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/importMember"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("EnumMember.kt") public void testEnumMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/EnumMember.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/EnumMember.kt"); } @TestMetadata("FqReference.kt") public void testFqReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/FqReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/FqReference.kt"); } @TestMetadata("FqReferenceCall.kt") public void testFqReferenceCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/FqReferenceCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/FqReferenceCall.kt"); } @TestMetadata("FqReferenceForNestedMember.kt") public void testFqReferenceForNestedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/FqReferenceForNestedMember.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/FqReferenceForNestedMember.kt"); } @TestMetadata("FqReferenceForNestedMember2.kt") public void testFqReferenceForNestedMember2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/FqReferenceForNestedMember2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/FqReferenceForNestedMember2.kt"); } @TestMetadata("FromCompanionObject.kt") public void testFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/FromCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/FromCompanionObject.kt"); } @TestMetadata("ImportMemberInImport.kt") public void testImportMemberInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/ImportMemberInImport.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/ImportMemberInImport.kt"); } @TestMetadata("ImportMemberInMiddleOfImport.kt") public void testImportMemberInMiddleOfImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/ImportMemberInMiddleOfImport.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/ImportMemberInMiddleOfImport.kt"); } @TestMetadata("NestedClass1.kt") public void testNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/NestedClass1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/NestedClass1.kt"); } @TestMetadata("NestedClass2.kt") public void testNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/NestedClass2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/NestedClass2.kt"); } @TestMetadata("NoTarget.kt") public void testNoTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/NoTarget.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/NoTarget.kt"); } @TestMetadata("NotForQualifier.kt") public void testNotForQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/NotForQualifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/NotForQualifier.kt"); } @TestMetadata("ObjectMethod.kt") public void testObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/ObjectMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/ObjectMethod.kt"); } @TestMetadata("StaticJavaField.kt") public void testStaticJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/StaticJavaField.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/StaticJavaField.kt"); } @TestMetadata("StaticJavaMethod.kt") public void testStaticJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/StaticJavaMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/StaticJavaMethod.kt"); } @TestMetadata("TopLevelFun.kt") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/importMember/TopLevelFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/importMember/TopLevelFun.kt"); } } @@ -9152,44 +8285,42 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InfixCallToOrdinary extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInfixCallToOrdinary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/infixCallToOrdinary"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("functionCallAfterInfixCall.kt") public void testFunctionCallAfterInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/functionCallAfterInfixCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/infixCallToOrdinary/functionCallAfterInfixCall.kt"); } @TestMetadata("functionLiteralArgument.kt") public void testFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/functionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/infixCallToOrdinary/functionLiteralArgument.kt"); } @TestMetadata("nonApplicableBinaryOperation.kt") public void testNonApplicableBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/nonApplicableBinaryOperation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/infixCallToOrdinary/nonApplicableBinaryOperation.kt"); } @TestMetadata("nullAssertedCall.kt") public void testNullAssertedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/nullAssertedCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/infixCallToOrdinary/nullAssertedCall.kt"); } @TestMetadata("parenthesesAroundRightHandArgument.kt") public void testParenthesesAroundRightHandArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/parenthesesAroundRightHandArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/infixCallToOrdinary/parenthesesAroundRightHandArgument.kt"); } @TestMetadata("simpleInfixFunctionCall.kt") public void testSimpleInfixFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/infixCallToOrdinary/simpleInfixFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/infixCallToOrdinary/simpleInfixFunctionCall.kt"); } } @@ -9197,44 +8328,42 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InsertCurlyBracesToTemplate extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInsertCurlyBracesToTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/insertCurlyBracesToTemplate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("dontInsertBrackets1.kt") public void testDontInsertBrackets1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertCurlyBracesToTemplate/dontInsertBrackets1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertCurlyBracesToTemplate/dontInsertBrackets1.kt"); } @TestMetadata("insertBrackets1.kt") public void testInsertBrackets1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets1.kt"); } @TestMetadata("insertBrackets2.kt") public void testInsertBrackets2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets2.kt"); } @TestMetadata("insertBrackets3.kt") public void testInsertBrackets3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets3.kt"); } @TestMetadata("insertBrackets4.kt") public void testInsertBrackets4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets4.kt"); } @TestMetadata("insertBrackets5.kt") public void testInsertBrackets5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertCurlyBracesToTemplate/insertBrackets5.kt"); } } @@ -9242,122 +8371,107 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InsertExplicitTypeArguments extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInsertExplicitTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/insertExplicitTypeArguments"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inapplicableAlreadyTyped.kt") public void testInapplicableAlreadyTyped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/inapplicableAlreadyTyped.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/inapplicableAlreadyTyped.kt"); } @TestMetadata("inapplicableNotGeneric.kt") public void testInapplicableNotGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/inapplicableNotGeneric.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/inapplicableNotGeneric.kt"); } @TestMetadata("inapplicableNotInCallable.kt") public void testInapplicableNotInCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/inapplicableNotInCallable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/inapplicableNotInCallable.kt"); } @TestMetadata("inapplicableNotInCallable2.kt") public void testInapplicableNotInCallable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/inapplicableNotInCallable2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/inapplicableNotInCallable2.kt"); } @TestMetadata("inapplicableTypeNotInferred.kt") public void testInapplicableTypeNotInferred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/inapplicableTypeNotInferred.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/inapplicableTypeNotInferred.kt"); } @TestMetadata("insertImportForArg.kt") public void testInsertImportForArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertImportForArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertImportForArg.kt"); } @TestMetadata("insertManyTypes.kt") public void testInsertManyTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertManyTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertManyTypes.kt"); } @TestMetadata("insertManyTypesInDifferentOrder.kt") public void testInsertManyTypesInDifferentOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertManyTypesInDifferentOrder.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertManyTypesInDifferentOrder.kt"); } @TestMetadata("insertMultipleSomeWithClashingName.kt") public void testInsertMultipleSomeWithClashingName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertMultipleSomeWithClashingName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertMultipleSomeWithClashingName.kt"); } @TestMetadata("insertTwoTypesFun.kt") public void testInsertTwoTypesFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTwoTypesFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTwoTypesFun.kt"); } @TestMetadata("insertTypeAny.kt") public void testInsertTypeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeAny.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeAny.kt"); } @TestMetadata("insertTypeThatIsAFunction.kt") public void testInsertTypeThatIsAFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeThatIsAFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeThatIsAFunction.kt"); } @TestMetadata("insertTypeThatIsATypeArg.kt") public void testInsertTypeThatIsATypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeThatIsATypeArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeThatIsATypeArg.kt"); } @TestMetadata("insertTypeWithClashingName.kt") public void testInsertTypeWithClashingName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithClashingName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithClashingName.kt"); } @TestMetadata("insertTypeWithLambda.kt") public void testInsertTypeWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithLambda.kt"); } @TestMetadata("insertTypeWithTypeArguments.kt") public void testInsertTypeWithTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithTypeArguments.kt"); } @TestMetadata("insertTypeWithVarargs.kt") public void testInsertTypeWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithVarargs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/insertTypeWithVarargs.kt"); } @TestMetadata("simpleInsertTypeClass.kt") public void testSimpleInsertTypeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/simpleInsertTypeClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/simpleInsertTypeClass.kt"); } @TestMetadata("simpleInsertTypeFun.kt") public void testSimpleInsertTypeFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/insertExplicitTypeArguments/simpleInsertTypeFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/insertExplicitTypeArguments/simpleInsertTypeFun.kt"); } } @@ -9365,62 +8479,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceBackingProperty extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceBackingProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/introduceBackingProperty"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("backingFieldRef.kt") public void testBackingFieldRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/backingFieldRef.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/backingFieldRef.kt"); } @TestMetadata("inapplicableAbstractProperty.kt") public void testInapplicableAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/inapplicableAbstractProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/inapplicableAbstractProperty.kt"); } @TestMetadata("inapplicableNoBackingField.kt") public void testInapplicableNoBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/inapplicableNoBackingField.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/inapplicableNoBackingField.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/semicolon.kt"); } @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/simpleVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/simpleVal.kt"); } @TestMetadata("simpleValWithType.kt") public void testSimpleValWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/simpleValWithType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/simpleValWithType.kt"); } @TestMetadata("simpleVar.kt") public void testSimpleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/simpleVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/simpleVar.kt"); } @TestMetadata("valWithAccessor.kt") public void testValWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/valWithAccessor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/valWithAccessor.kt"); } @TestMetadata("varWithAccessor.kt") public void testVarWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceBackingProperty/varWithAccessor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceBackingProperty/varWithAccessor.kt"); } } @@ -9428,10 +8537,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceVariable extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterExpression.kt") public void testAfterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/afterExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/afterExpression.kt"); } public void testAllFilesPresentInIntroduceVariable() throws Exception { @@ -9440,44 +8552,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("atExpressionEnd.kt") public void testAtExpressionEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/atExpressionEnd.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/atExpressionEnd.kt"); } @TestMetadata("atExpressionStart.kt") public void testAtExpressionStart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/atExpressionStart.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/atExpressionStart.kt"); } @TestMetadata("atNestedExpression.kt") public void testAtNestedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/atNestedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/atNestedExpression.kt"); } @TestMetadata("beforeExpression.kt") public void testBeforeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/beforeExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/beforeExpression.kt"); } @TestMetadata("noType.kt") public void testNoType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/noType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/noType.kt"); } @TestMetadata("nothingType.kt") public void testNothingType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/nothingType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/nothingType.kt"); } @TestMetadata("unitType.kt") public void testUnitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/introduceVariable/unitType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/introduceVariable/unitType.kt"); } } @@ -9485,10 +8590,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InvertIfCondition extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addSurroundingBlock_preserveComments.kt") public void testAddSurroundingBlock_preserveComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/addSurroundingBlock_preserveComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/addSurroundingBlock_preserveComments.kt"); } public void testAllFilesPresentInInvertIfCondition() throws Exception { @@ -9497,194 +8605,162 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("assignedToValue.kt") public void testAssignedToValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/assignedToValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/assignedToValue.kt"); } @TestMetadata("binaryExpression.kt") public void testBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/binaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/binaryExpression.kt"); } @TestMetadata("booleanLiteral.kt") public void testBooleanLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/booleanLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/booleanLiteral.kt"); } @TestMetadata("branchingIfStatements.kt") public void testBranchingIfStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/branchingIfStatements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/branchingIfStatements.kt"); } @TestMetadata("endOfLineCommentBug.kt") public void testEndOfLineCommentBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/endOfLineCommentBug.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/endOfLineCommentBug.kt"); } @TestMetadata("forLoopWithMultipleExpressions.kt") public void testForLoopWithMultipleExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/forLoopWithMultipleExpressions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/forLoopWithMultipleExpressions.kt"); } @TestMetadata("functionWithReturnExpression.kt") public void testFunctionWithReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/functionWithReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/functionWithReturnExpression.kt"); } @TestMetadata("ifExpressionInsideForLoop.kt") public void testIfExpressionInsideForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifExpressionInsideForLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifExpressionInsideForLoop.kt"); } @TestMetadata("ifExpressionWithReturn.kt") public void testIfExpressionWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifExpressionWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifExpressionWithReturn.kt"); } @TestMetadata("ifThenReturn.kt") public void testIfThenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifThenReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifThenReturn.kt"); } @TestMetadata("ifThenReturn2.kt") public void testIfThenReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifThenReturn2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifThenReturn2.kt"); } @TestMetadata("ifThenReturn3.kt") public void testIfThenReturn3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifThenReturn3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifThenReturn3.kt"); } @TestMetadata("ifThenReturn4.kt") public void testIfThenReturn4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifThenReturn4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifThenReturn4.kt"); } @TestMetadata("ifWithBothBranchesReturn.kt") public void testIfWithBothBranchesReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifWithBothBranchesReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifWithBothBranchesReturn.kt"); } @TestMetadata("ifWithBothBranchesSetter.kt") public void testIfWithBothBranchesSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/ifWithBothBranchesSetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/ifWithBothBranchesSetter.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/in.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/in.kt"); } @TestMetadata("invertableOperator.kt") public void testInvertableOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/invertableOperator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/invertableOperator.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/is.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/is.kt"); } @TestMetadata("lambdaNonLocalAndLocalReturn.kt") public void testLambdaNonLocalAndLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lambdaNonLocalAndLocalReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lambdaNonLocalAndLocalReturn.kt"); } @TestMetadata("lambdaNonLocalReturn.kt") public void testLambdaNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lambdaNonLocalReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lambdaNonLocalReturn.kt"); } @TestMetadata("lastStatement1.kt") public void testLastStatement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatement1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatement1.kt"); } @TestMetadata("lastStatement2.kt") public void testLastStatement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatement2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatement2.kt"); } @TestMetadata("lastStatement3.kt") public void testLastStatement3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatement3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatement3.kt"); } @TestMetadata("lastStatementBeforeBreak.kt") public void testLastStatementBeforeBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementBeforeBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementBeforeBreak.kt"); } @TestMetadata("lastStatementBeforeContinue.kt") public void testLastStatementBeforeContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementBeforeContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementBeforeContinue.kt"); } @TestMetadata("lastStatementBeforeReturn.kt") public void testLastStatementBeforeReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementBeforeReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementBeforeReturn.kt"); } @TestMetadata("lastStatementInLambda.kt") public void testLastStatementInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementInLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementInLambda.kt"); } @TestMetadata("lastStatementInLoop.kt") public void testLastStatementInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementInLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementInLoop.kt"); } @TestMetadata("lastStatementInLoop2.kt") public void testLastStatementInLoop2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementInLoop2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementInLoop2.kt"); } @TestMetadata("lastStatementNonUnitMethod.kt") public void testLastStatementNonUnitMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/lastStatementNonUnitMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/lastStatementNonUnitMethod.kt"); } @TestMetadata("negatedExpression.kt") public void testNegatedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/negatedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/negatedExpression.kt"); } @TestMetadata("nestedIfWithReturn.kt") public void testNestedIfWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/nestedIfWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/nestedIfWithReturn.kt"); } @TestMetadata("notBlock.kt") @@ -9707,32 +8783,27 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("notIn.kt") public void testNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/notIn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/notIn.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/notIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/notIs.kt"); } @TestMetadata("returnIfExpression.kt") public void testReturnIfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/returnIfExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/returnIfExpression.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/simple.kt"); } @TestMetadata("valueAndReturnBranches.kt") public void testValueAndReturnBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/invertIfCondition/valueAndReturnBranches.kt"); - doTest(fileName); + runTest("idea/testData/intentions/invertIfCondition/valueAndReturnBranches.kt"); } } @@ -9740,80 +8811,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IterateExpression extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIterateExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/iterateExpression"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("collectionIteratorWithComponents.kt") public void testCollectionIteratorWithComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/collectionIteratorWithComponents.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/collectionIteratorWithComponents.kt"); } @TestMetadata("dataClassCollectionIterator.kt") public void testDataClassCollectionIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/dataClassCollectionIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/dataClassCollectionIterator.kt"); } @TestMetadata("extensionIterator.kt") public void testExtensionIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/extensionIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/extensionIterator.kt"); } @TestMetadata("extensionIteratorWithPartialSubstitution1.kt") public void testExtensionIteratorWithPartialSubstitution1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/extensionIteratorWithPartialSubstitution1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/extensionIteratorWithPartialSubstitution1.kt"); } @TestMetadata("extensionIteratorWithPartialSubstitution2.kt") public void testExtensionIteratorWithPartialSubstitution2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/extensionIteratorWithPartialSubstitution2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/extensionIteratorWithPartialSubstitution2.kt"); } @TestMetadata("functionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/functionCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/functionCall.kt"); } @TestMetadata("mapIterator.kt") public void testMapIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/mapIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/mapIterator.kt"); } @TestMetadata("nameSuggestion.kt") public void testNameSuggestion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/nameSuggestion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/nameSuggestion.kt"); } @TestMetadata("noNameConflict.kt") public void testNoNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/noNameConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/noNameConflict.kt"); } @TestMetadata("nonOperatorIterator.kt") public void testNonOperatorIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/nonOperatorIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/nonOperatorIterator.kt"); } @TestMetadata("nonOperatotExtensionIterator.kt") public void testNonOperatotExtensionIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/nonOperatotExtensionIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/nonOperatotExtensionIterator.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterateExpression/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterateExpression/simple.kt"); } } @@ -9821,248 +8884,225 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IterationOverMap extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIterationOverMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/iterationOverMap"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AlreadyDestructing.kt") public void testAlreadyDestructing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/AlreadyDestructing.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/AlreadyDestructing.kt"); } @TestMetadata("CaretOffset.kt") public void testCaretOffset() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/CaretOffset.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/CaretOffset.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClass.kt"); } @TestMetadata("DataClassDependentLocal.kt") public void testDataClassDependentLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassDependentLocal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassDependentLocal.kt"); } @TestMetadata("DataClassFirstNPropertiesUsed.kt") public void testDataClassFirstNPropertiesUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassFirstNPropertiesUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassFirstNPropertiesUsed.kt"); } @TestMetadata("DataClassFirstVariable.kt") public void testDataClassFirstVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassFirstVariable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassFirstVariable.kt"); } @TestMetadata("DataClassLast.kt") public void testDataClassLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassLast.kt"); } @TestMetadata("DataClassNameConflict.kt") public void testDataClassNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassNameConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassNameConflict.kt"); } @TestMetadata("DataClassNoVariablesInside.kt") public void testDataClassNoVariablesInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassNoVariablesInside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassNoVariablesInside.kt"); } @TestMetadata("DataClassNoVariablesMultiUsages.kt") public void testDataClassNoVariablesMultiUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassNoVariablesMultiUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassNoVariablesMultiUsages.kt"); } @TestMetadata("DataClassNotAllPropertiesUsed.kt") public void testDataClassNotAllPropertiesUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassNotAllPropertiesUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassNotAllPropertiesUsed.kt"); } @TestMetadata("DataClassNullable.kt") public void testDataClassNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassNullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassNullable.kt"); } @TestMetadata("DataClassParametersOrder.kt") public void testDataClassParametersOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassParametersOrder.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassParametersOrder.kt"); } @TestMetadata("DataClassPropertyBetweenUsages.kt") public void testDataClassPropertyBetweenUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassPropertyBetweenUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassPropertyBetweenUsages.kt"); } @TestMetadata("DataClassSecondVariable.kt") public void testDataClassSecondVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassSecondVariable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassSecondVariable.kt"); } @TestMetadata("DataClassTwoDifferentLocals.kt") public void testDataClassTwoDifferentLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassTwoDifferentLocals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassTwoDifferentLocals.kt"); } @TestMetadata("DataClassUnused.kt") public void testDataClassUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassUnused.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassUnused.kt"); } @TestMetadata("DataClassWithAssignmentInside.kt") public void testDataClassWithAssignmentInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithAssignmentInside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithAssignmentInside.kt"); } @TestMetadata("DataClassWithDestructuring.kt") public void testDataClassWithDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithDestructuring.kt"); } @TestMetadata("DataClassWithDestructuringConflict.kt") public void testDataClassWithDestructuringConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithDestructuringConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithDestructuringConflict.kt"); } @TestMetadata("DataClassWithDestructuringFakeConflict.kt") public void testDataClassWithDestructuringFakeConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithDestructuringFakeConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithDestructuringFakeConflict.kt"); } @TestMetadata("DataClassWithDestructuringPartial.kt") public void testDataClassWithDestructuringPartial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithDestructuringPartial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithDestructuringPartial.kt"); } @TestMetadata("DataClassWithExternalUsage.kt") public void testDataClassWithExternalUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithExternalUsage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithExternalUsage.kt"); } @TestMetadata("DataClassWithIncrementInside.kt") public void testDataClassWithIncrementInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithIncrementInside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithIncrementInside.kt"); } @TestMetadata("DataClassWithLocalPropertyModified.kt") public void testDataClassWithLocalPropertyModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/DataClassWithLocalPropertyModified.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/DataClassWithLocalPropertyModified.kt"); } @TestMetadata("EntriesCallIsMissing.kt") public void testEntriesCallIsMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/EntriesCallIsMissing.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/EntriesCallIsMissing.kt"); } @TestMetadata("FakeEntries.kt") public void testFakeEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/FakeEntries.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/FakeEntries.kt"); } @TestMetadata("Getters.kt") public void testGetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/Getters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/Getters.kt"); } @TestMetadata("KeyOnly.kt") public void testKeyOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/KeyOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/KeyOnly.kt"); } @TestMetadata("KeyOnlyWithDestructuring.kt") public void testKeyOnlyWithDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/KeyOnlyWithDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/KeyOnlyWithDestructuring.kt"); } @TestMetadata("KeyValueWithDestructuring.kt") public void testKeyValueWithDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/KeyValueWithDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/KeyValueWithDestructuring.kt"); } @TestMetadata("MapNoProperties.kt") public void testMapNoProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/MapNoProperties.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/MapNoProperties.kt"); } @TestMetadata("NoKeyOrValue.kt") public void testNoKeyOrValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/NoKeyOrValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/NoKeyOrValue.kt"); } @TestMetadata("OnlyKeyUsed.kt") public void testOnlyKeyUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/OnlyKeyUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/OnlyKeyUsed.kt"); } @TestMetadata("OtherUsages.kt") public void testOtherUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/OtherUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/OtherUsages.kt"); } @TestMetadata("OtherUsages2.kt") public void testOtherUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/OtherUsages2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/OtherUsages2.kt"); } @TestMetadata("PropertiesNames.kt") public void testPropertiesNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/PropertiesNames.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/PropertiesNames.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/Simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/Simple.kt"); } @TestMetadata("SomeQualifiedExpressionInRange.kt") public void testSomeQualifiedExpressionInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/SomeQualifiedExpressionInRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/SomeQualifiedExpressionInRange.kt"); } @TestMetadata("ValueOnly.kt") public void testValueOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/iterationOverMap/ValueOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/iterationOverMap/ValueOnly.kt"); + } + + @TestMetadata("idea/testData/intentions/iterationOverMap/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/iterationOverMap/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -10109,152 +9149,132 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JoinDeclarationAndAssignment extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJoinDeclarationAndAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/joinDeclarationAndAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assignmentForFlexible.kt") public void testAssignmentForFlexible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/assignmentForFlexible.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/assignmentForFlexible.kt"); } @TestMetadata("assignmentForSmartCast.kt") public void testAssignmentForSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/assignmentForSmartCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/assignmentForSmartCast.kt"); } @TestMetadata("assignmentInIf.kt") public void testAssignmentInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/assignmentInIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/assignmentInIf.kt"); } @TestMetadata("cannotRemoveType.kt") public void testCannotRemoveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/cannotRemoveType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/cannotRemoveType.kt"); } @TestMetadata("cannotRemoveType2.kt") public void testCannotRemoveType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/cannotRemoveType2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/cannotRemoveType2.kt"); } @TestMetadata("capturedInitialization.kt") public void testCapturedInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/capturedInitialization.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/capturedInitialization.kt"); } @TestMetadata("caretOnHeadComment.kt") public void testCaretOnHeadComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/caretOnHeadComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/caretOnHeadComment.kt"); } @TestMetadata("caretOnTailComment.kt") public void testCaretOnTailComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/caretOnTailComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/caretOnTailComment.kt"); } @TestMetadata("comment.kt") public void testComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/comment.kt"); } @TestMetadata("correctConditionalAssignment.kt") public void testCorrectConditionalAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/correctConditionalAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/correctConditionalAssignment.kt"); } @TestMetadata("deleteInitBlock.kt") public void testDeleteInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/deleteInitBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/deleteInitBlock.kt"); } @TestMetadata("hasLateinit.kt") public void testHasLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/hasLateinit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/hasLateinit.kt"); } @TestMetadata("incorrectConditionalAssignment.kt") public void testIncorrectConditionalAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/incorrectConditionalAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/incorrectConditionalAssignment.kt"); } @TestMetadata("multipleConstructors.kt") public void testMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/multipleConstructors.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/multipleConstructors.kt"); } @TestMetadata("multipleConstructorsWithThis.kt") public void testMultipleConstructorsWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/multipleConstructorsWithThis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/multipleConstructorsWithThis.kt"); } @TestMetadata("notFirstInitLine.kt") public void testNotFirstInitLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/notFirstInitLine.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/notFirstInitLine.kt"); } @TestMetadata("notFirstSecondaryConstructorLine.kt") public void testNotFirstSecondaryConstructorLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/notFirstSecondaryConstructorLine.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/notFirstSecondaryConstructorLine.kt"); } @TestMetadata("propertyReassignment.kt") public void testPropertyReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/propertyReassignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/propertyReassignment.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/simple.kt"); } @TestMetadata("simpleLocal.kt") public void testSimpleLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/simpleLocal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/simpleLocal.kt"); } @TestMetadata("singleConstructor.kt") public void testSingleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/singleConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/singleConstructor.kt"); } @TestMetadata("usedLocal.kt") public void testUsedLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/usedLocal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/usedLocal.kt"); } @TestMetadata("usedLocal2.kt") public void testUsedLocal2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/usedLocal2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/usedLocal2.kt"); } @TestMetadata("varReassignment.kt") public void testVarReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/joinDeclarationAndAssignment/varReassignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/joinDeclarationAndAssignment/varReassignment.kt"); } } @@ -10301,190 +9321,169 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LoopToCallChain extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLoopToCallChain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/array.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/array.kt"); } @TestMetadata("asSequenceOnly.kt") public void testAsSequenceOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/asSequenceOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/asSequenceOnly.kt"); } @TestMetadata("customTypeWithIterator.kt") public void testCustomTypeWithIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/customTypeWithIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/customTypeWithIterator.kt"); } @TestMetadata("embeddedBreak1.kt") public void testEmbeddedBreak1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/embeddedBreak1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/embeddedBreak1.kt"); } @TestMetadata("embeddedBreak2.kt") public void testEmbeddedBreak2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/embeddedBreak2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/embeddedBreak2.kt"); } @TestMetadata("embeddedContinue.kt") public void testEmbeddedContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/embeddedContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/embeddedContinue.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/intArray.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/intArray.kt"); } @TestMetadata("itAlreadyUsed.kt") public void testItAlreadyUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/itAlreadyUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/itAlreadyUsed.kt"); } @TestMetadata("KT14191.kt") public void testKT14191() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/KT14191.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/KT14191.kt"); } @TestMetadata("lastOrNull_ifAssign.kt") public void testLastOrNull_ifAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/lastOrNull_ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/lastOrNull_ifAssign.kt"); } @TestMetadata("moveInitializationsCloserToLoop.kt") public void testMoveInitializationsCloserToLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/moveInitializationsCloserToLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/moveInitializationsCloserToLoop.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/range.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/range.kt"); } @TestMetadata("twoInitializationsBeforeLoop.kt") public void testTwoInitializationsBeforeLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/twoInitializationsBeforeLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/twoInitializationsBeforeLoop.kt"); } @TestMetadata("idea/testData/intentions/loopToCallChain/any") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Any extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/any"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anyNotNull.kt") public void testAnyNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/anyNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/anyNotNull.kt"); } @TestMetadata("ifAssign.kt") public void testIfAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign.kt"); } @TestMetadata("ifAssign_moveDeclaration.kt") public void testIfAssign_moveDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_moveDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_moveDeclaration.kt"); } @TestMetadata("ifAssign_moveInitialization.kt") public void testIfAssign_moveInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_moveInitialization.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_moveInitialization.kt"); } @TestMetadata("ifAssign_noBreak.kt") public void testIfAssign_noBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_noBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_noBreak.kt"); } @TestMetadata("ifAssign_nonBooleanResult.kt") public void testIfAssign_nonBooleanResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult.kt"); } @TestMetadata("ifAssign_nonBooleanResult2.kt") public void testIfAssign_nonBooleanResult2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifAssign_nonBooleanResult2.kt"); } @TestMetadata("ifReturn.kt") public void testIfReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifReturn.kt"); } @TestMetadata("ifReturn_nonBooleanResult.kt") public void testIfReturn_nonBooleanResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/ifReturn_nonBooleanResult.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/ifReturn_nonBooleanResult.kt"); } @TestMetadata("indexNeeded.kt") public void testIndexNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/indexNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/indexNeeded.kt"); } @TestMetadata("KT13998.kt") public void testKT13998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/KT13998.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/KT13998.kt"); } @TestMetadata("KT13998_1.kt") public void testKT13998_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/KT13998_1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/KT13998_1.kt"); } @TestMetadata("kt17730.kt") public void testKt17730() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/kt17730.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/kt17730.kt"); } @TestMetadata("kt17730_1.kt") public void testKt17730_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/kt17730_1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/kt17730_1.kt"); } @TestMetadata("none.kt") public void testNone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/none.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/none.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/any/return.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/any/return.kt"); } } @@ -10492,28 +9491,28 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contains extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/2.kt"); } @TestMetadata("3.kt") public void test3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/3.kt"); } @TestMetadata("4.kt") public void test4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/contains/4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/contains/4.kt"); } public void testAllFilesPresentInContains() throws Exception { @@ -10525,16 +9524,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Count extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("1.kt") public void test1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/1.kt"); } @TestMetadata("2.kt") public void test2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/2.kt"); } public void testAllFilesPresentInCount() throws Exception { @@ -10543,50 +9544,42 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("countIsInstance.kt") public void testCountIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/countIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/countIsInstance.kt"); } @TestMetadata("countNotNull.kt") public void testCountNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/countNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/countNotNull.kt"); } @TestMetadata("countSomethingAndNotNull.kt") public void testCountSomethingAndNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/countSomethingAndNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/countSomethingAndNotNull.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/long.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/long.kt"); } @TestMetadata("nonConstantInitial.kt") public void testNonConstantInitial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/nonConstantInitial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/nonConstantInitial.kt"); } @TestMetadata("nonZeroInitial.kt") public void testNonZeroInitial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/nonZeroInitial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/nonZeroInitial.kt"); } @TestMetadata("prefix.kt") public void testPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/prefix.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/prefix.kt"); } @TestMetadata("variableUsedBefore.kt") public void testVariableUsedBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/count/variableUsedBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/count/variableUsedBefore.kt"); } } @@ -10594,308 +9587,262 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Filter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFilter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/filter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign.kt"); } @TestMetadata("assign2.kt") public void testAssign2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign2.kt"); } @TestMetadata("assignFilterIndexed.kt") public void testAssignFilterIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assignFilterIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assignFilterIndexed.kt"); } @TestMetadata("assignFilterNotNull.kt") public void testAssignFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assignFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assignFilterNotNull.kt"); } @TestMetadata("assign_ArrayListRequired.kt") public void testAssign_ArrayListRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired.kt"); } @TestMetadata("assign_ArrayListRequired2.kt") public void testAssign_ArrayListRequired2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired2.kt"); } @TestMetadata("assign_ArrayListRequired3.kt") public void testAssign_ArrayListRequired3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_ArrayListRequired3.kt"); } @TestMetadata("assign_MutableListRequired.kt") public void testAssign_MutableListRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_MutableListRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_MutableListRequired.kt"); } @TestMetadata("assign_breakAndContinue.kt") public void testAssign_breakAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/assign_breakAndContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/assign_breakAndContinue.kt"); } @TestMetadata("cannotSplitOutFilterIsInstance.kt") public void testCannotSplitOutFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/cannotSplitOutFilterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/cannotSplitOutFilterIsInstance.kt"); } @TestMetadata("doNotSplitOutFilterIsInstance.kt") public void testDoNotSplitOutFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterIsInstance.kt"); } @TestMetadata("doNotSplitOutFilterNotNull.kt") public void testDoNotSplitOutFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/doNotSplitOutFilterNotNull.kt"); } @TestMetadata("filterIndexed.kt") public void testFilterIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed.kt"); } @TestMetadata("filterIndexed2.kt") public void testFilterIndexed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed2.kt"); } @TestMetadata("filterIndexedAndFlatMapWithContinue.kt") public void testFilterIndexedAndFlatMapWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexedAndFlatMapWithContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexedAndFlatMapWithContinue.kt"); } @TestMetadata("filterIndexedTo.kt") public void testFilterIndexedTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo.kt"); } @TestMetadata("filterIndexedTo2.kt") public void testFilterIndexedTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexedTo2.kt"); } @TestMetadata("filterIndexed_indexChangedTwice.kt") public void testFilterIndexed_indexChangedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexChangedTwice.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexChangedTwice.kt"); } @TestMetadata("filterIndexed_indexStartNotZero.kt") public void testFilterIndexed_indexStartNotZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexStartNotZero.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexStartNotZero.kt"); } @TestMetadata("filterIndexed_indexUsedAfter.kt") public void testFilterIndexed_indexUsedAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedAfter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedAfter.kt"); } @TestMetadata("filterIndexed_indexUsedEarlierInLoop.kt") public void testFilterIndexed_indexUsedEarlierInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedEarlierInLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_indexUsedEarlierInLoop.kt"); } @TestMetadata("filterIndexed_merge1.kt") public void testFilterIndexed_merge1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge1.kt"); } @TestMetadata("filterIndexed_merge2.kt") public void testFilterIndexed_merge2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge2.kt"); } @TestMetadata("filterIndexed_merge3.kt") public void testFilterIndexed_merge3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge3.kt"); } @TestMetadata("filterIndexed_merge4.kt") public void testFilterIndexed_merge4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_merge4.kt"); } @TestMetadata("filterIndexed_twoIndices.kt") public void testFilterIndexed_twoIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndices.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndices.kt"); } @TestMetadata("filterIndexed_twoIndicesUsed.kt") public void testFilterIndexed_twoIndicesUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndicesUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIndexed_twoIndicesUsed.kt"); } @TestMetadata("filterIsInstance.kt") public void testFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIsInstance.kt"); } @TestMetadata("filterIsInstanceTo.kt") public void testFilterIsInstanceTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIsInstanceTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIsInstanceTo.kt"); } @TestMetadata("filterIsInstance_ifContinue.kt") public void testFilterIsInstance_ifContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterIsInstance_ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterIsInstance_ifContinue.kt"); } @TestMetadata("filterNotNull.kt") public void testFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNull.kt"); } @TestMetadata("filterNotNullTo.kt") public void testFilterNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo.kt"); } @TestMetadata("filterNotNullTo2.kt") public void testFilterNotNullTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNullTo2.kt"); } @TestMetadata("filterNotNull_ifContinue.kt") public void testFilterNotNull_ifContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotNull_ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotNull_ifContinue.kt"); } @TestMetadata("filterNotTo.kt") public void testFilterNotTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNotTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNotTo.kt"); } @TestMetadata("filterNot_ifContinue.kt") public void testFilterNot_ifContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterNot_ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterNot_ifContinue.kt"); } @TestMetadata("filterTo.kt") public void testFilterTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterTo.kt"); } @TestMetadata("filterTo2.kt") public void testFilterTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/filterTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/filterTo2.kt"); } @TestMetadata("glueTogetherFilterNotNull.kt") public void testGlueTogetherFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/glueTogetherFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/glueTogetherFilterNotNull.kt"); } @TestMetadata("ifContinue.kt") public void testIfContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinue.kt"); } @TestMetadata("ifContinue2.kt") public void testIfContinue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinue2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinue2.kt"); } @TestMetadata("ifContinueInBlock.kt") public void testIfContinueInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinueInBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinueInBlock.kt"); } @TestMetadata("ifContinueWithLabel.kt") public void testIfContinueWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifContinueWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifContinueWithLabel.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/ifElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/ifElse.kt"); } @TestMetadata("inputVarNotUsed.kt") public void testInputVarNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/inputVarNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/inputVarNotUsed.kt"); } @TestMetadata("inputVariableNotUsed.kt") public void testInputVariableNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/inputVariableNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/inputVariableNotUsed.kt"); } @TestMetadata("mergeMultiple.kt") public void testMergeMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/mergeMultiple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/mergeMultiple.kt"); } @TestMetadata("splitOutFilterIsInstance.kt") public void testSplitOutFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/splitOutFilterIsInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/splitOutFilterIsInstance.kt"); } @TestMetadata("splitOutFilterNotNull.kt") public void testSplitOutFilterNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull.kt"); } @TestMetadata("splitOutFilterNotNull2.kt") public void testSplitOutFilterNotNull2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/filter/splitOutFilterNotNull2.kt"); } } @@ -10903,128 +9850,112 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FirstOrNull extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFirstOrNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/firstOrNull"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assignmentInitialization.kt") public void testAssignmentInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/assignmentInitialization.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/assignmentInitialization.kt"); } @TestMetadata("cannotUseLet.kt") public void testCannotUseLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/cannotUseLet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/cannotUseLet.kt"); } @TestMetadata("ifAssign.kt") public void testIfAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign.kt"); } @TestMetadata("ifAssign_breakWithLabel.kt") public void testIfAssign_breakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_breakWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_breakWithLabel.kt"); } @TestMetadata("ifAssign_cannotBeVal.kt") public void testIfAssign_cannotBeVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_cannotBeVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_cannotBeVal.kt"); } @TestMetadata("ifAssign_preserveComments.kt") public void testIfAssign_preserveComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_preserveComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_preserveComments.kt"); } @TestMetadata("ifAssign_variableUsedBefore.kt") public void testIfAssign_variableUsedBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_variableUsedBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifAssign_variableUsedBefore.kt"); } @TestMetadata("ifReturn.kt") public void testIfReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/ifReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/ifReturn.kt"); } @TestMetadata("KT14292.kt") public void testKT14292() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/KT14292.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/KT14292.kt"); } @TestMetadata("let.kt") public void testLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/let.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/let.kt"); } @TestMetadata("let2.kt") public void testLet2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/let2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/let2.kt"); } @TestMetadata("letOrNotNull.kt") public void testLetOrNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/letOrNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/letOrNotNull.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/return.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/return.kt"); } @TestMetadata("returnExpression.kt") public void testReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpression.kt"); } @TestMetadata("returnExpressionOrNotNull.kt") public void testReturnExpressionOrNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpressionOrNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnExpressionOrNotNull.kt"); } @TestMetadata("returnNotNullIfNone.kt") public void testReturnNotNullIfNone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone.kt"); } @TestMetadata("returnNotNullIfNone2.kt") public void testReturnNotNullIfNone2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/returnNotNullIfNone2.kt"); } @TestMetadata("return_comment.kt") public void testReturn_comment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/return_comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/return_comment.kt"); } @TestMetadata("safeDotExpression.kt") public void testSafeDotExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/safeDotExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/safeDotExpression.kt"); } @TestMetadata("withMergedFilter.kt") public void testWithMergedFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/firstOrNull/withMergedFilter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/firstOrNull/withMergedFilter.kt"); } } @@ -11032,74 +9963,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FlatMap extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFlatMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/flatMap"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/break.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/continue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/continue.kt"); } @TestMetadata("flatMapTo.kt") public void testFlatMapTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo.kt"); } @TestMetadata("flatMapTo2.kt") public void testFlatMapTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo2.kt"); } @TestMetadata("flatMapTo3.kt") public void testFlatMapTo3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/flatMapTo3.kt"); } @TestMetadata("indexUsed.kt") public void testIndexUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/indexUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/indexUsed.kt"); } @TestMetadata("inputVarStillNeeded.kt") public void testInputVarStillNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/inputVarStillNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/inputVarStillNeeded.kt"); } @TestMetadata("notIterable.kt") public void testNotIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/notIterable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/notIterable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/simple.kt"); } @TestMetadata("wrongBreak.kt") public void testWrongBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/wrongBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/wrongBreak.kt"); } @TestMetadata("wrongContinue.kt") public void testWrongContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/flatMap/wrongContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/flatMap/wrongContinue.kt"); } } @@ -11107,50 +10031,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForEach extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForEach() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/forEach"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("indexed.kt") public void testIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/indexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/indexed.kt"); } @TestMetadata("indexed_nothingElse.kt") public void testIndexed_nothingElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/indexed_nothingElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/indexed_nothingElse.kt"); } @TestMetadata("KT14341.kt") public void testKT14341() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/KT14341.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/KT14341.kt"); } @TestMetadata("KT21083.kt") public void testKT21083() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/KT21083.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/KT21083.kt"); } @TestMetadata("notAvailable.kt") public void testNotAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/notAvailable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/notAvailable.kt"); } @TestMetadata("notIndexed.kt") public void testNotIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/notIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/notIndexed.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/forEach/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/forEach/simple.kt"); } } @@ -11158,50 +10079,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IndexOf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIndexOf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/indexOf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("indexOf.kt") public void testIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOf.kt"); } @TestMetadata("indexOfFirst_ifAssign.kt") public void testIndexOfFirst_ifAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifAssign.kt"); } @TestMetadata("indexOfFirst_ifReturn.kt") public void testIndexOfFirst_ifReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_ifReturn.kt"); } @TestMetadata("indexOfFirst_mustBeNoIndexInCondition.kt") public void testIndexOfFirst_mustBeNoIndexInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_mustBeNoIndexInCondition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfFirst_mustBeNoIndexInCondition.kt"); } @TestMetadata("indexOfLast_ifAssign.kt") public void testIndexOfLast_ifAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/indexOfLast_ifAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/indexOfLast_ifAssign.kt"); } @TestMetadata("KT14303.kt") public void testKT14303() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/KT14303.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/KT14303.kt"); } @TestMetadata("lastIndexOf.kt") public void testLastIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/indexOf/lastIndexOf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/indexOf/lastIndexOf.kt"); } } @@ -11209,56 +10127,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceIndex extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/introduceIndex"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("indexPlusPlusInsideExpression.kt") public void testIndexPlusPlusInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression.kt"); } @TestMetadata("indexPlusPlusInsideExpression_indexUsedAfterIncrement.kt") public void testIndexPlusPlusInsideExpression_indexUsedAfterIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedAfterIncrement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedAfterIncrement.kt"); } @TestMetadata("indexPlusPlusInsideExpression_indexUsedBeforeIncrement.kt") public void testIndexPlusPlusInsideExpression_indexUsedBeforeIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement.kt"); } @TestMetadata("indexPlusPlusInsideExpression_indexUsedBeforeIncrement2.kt") public void testIndexPlusPlusInsideExpression_indexUsedBeforeIncrement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusInsideExpression_indexUsedBeforeIncrement2.kt"); } @TestMetadata("indexPlusPlusIsNotLastStatement.kt") public void testIndexPlusPlusIsNotLastStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement.kt"); } @TestMetadata("indexPlusPlusIsNotLastStatement_indexUsedAfterIncrement.kt") public void testIndexPlusPlusIsNotLastStatement_indexUsedAfterIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement_indexUsedAfterIncrement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexPlusPlusIsNotLastStatement_indexUsedAfterIncrement.kt"); } @TestMetadata("indexWithNestedLoop.kt") public void testIndexWithNestedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/indexWithNestedLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/indexWithNestedLoop.kt"); } @TestMetadata("prefixIndexPlusPlusInsideExpression.kt") public void testPrefixIndexPlusPlusInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/introduceIndex/prefixIndexPlusPlusInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/introduceIndex/prefixIndexPlusPlusInsideExpression.kt"); } } @@ -11266,176 +10180,152 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Map extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/map"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assignMap.kt") public void testAssignMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/assignMap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/assignMap.kt"); } @TestMetadata("assignMap2.kt") public void testAssignMap2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/assignMap2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/assignMap2.kt"); } @TestMetadata("KT18816.kt") public void testKT18816() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/KT18816.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/KT18816.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/map.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/map.kt"); } @TestMetadata("mapAndFilterIndexed.kt") public void testMapAndFilterIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapAndFilterIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapAndFilterIndexed.kt"); } @TestMetadata("mapIndexed.kt") public void testMapIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexed.kt"); } @TestMetadata("mapIndexedNotNull.kt") public void testMapIndexedNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull.kt"); } @TestMetadata("mapIndexedNotNullTo.kt") public void testMapIndexedNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo.kt"); } @TestMetadata("mapIndexedNotNullTo_elvisContinue.kt") public void testMapIndexedNotNullTo_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNullTo_elvisContinue.kt"); } @TestMetadata("mapIndexedNotNull_elvisContinue.kt") public void testMapIndexedNotNull_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedNotNull_elvisContinue.kt"); } @TestMetadata("mapIndexedTo.kt") public void testMapIndexedTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexedTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexedTo.kt"); } @TestMetadata("mapIndexed_afterFilter.kt") public void testMapIndexed_afterFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexed_afterFilter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexed_afterFilter.kt"); } @TestMetadata("mapIndexed_twice.kt") public void testMapIndexed_twice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapIndexed_twice.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapIndexed_twice.kt"); } @TestMetadata("mapNotNull.kt") public void testMapNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull.kt"); } @TestMetadata("mapNotNullTo.kt") public void testMapNotNullTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNullTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNullTo.kt"); } @TestMetadata("mapNotNullTo_elvisContinue.kt") public void testMapNotNullTo_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNullTo_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNullTo_elvisContinue.kt"); } @TestMetadata("mapNotNull_elvisContinue.kt") public void testMapNotNull_elvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull_elvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull_elvisContinue.kt"); } @TestMetadata("mapNotNull_nestedLoopElvisContinue.kt") public void testMapNotNull_nestedLoopElvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull_nestedLoopElvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull_nestedLoopElvisContinue.kt"); } @TestMetadata("mapNotNull_wrongElvisContinue.kt") public void testMapNotNull_wrongElvisContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapNotNull_wrongElvisContinue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapNotNull_wrongElvisContinue.kt"); } @TestMetadata("mapTo.kt") public void testMapTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo.kt"); } @TestMetadata("mapTo2.kt") public void testMapTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo2.kt"); } @TestMetadata("mapTo3.kt") public void testMapTo3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo3.kt"); } @TestMetadata("mapTo4.kt") public void testMapTo4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo4.kt"); } @TestMetadata("mapTo_inputVarNotUsed.kt") public void testMapTo_inputVarNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapTo_inputVarNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapTo_inputVarNotUsed.kt"); } @TestMetadata("mapUsesOldIndexAfterFilter.kt") public void testMapUsesOldIndexAfterFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapUsesOldIndexAfterFilter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapUsesOldIndexAfterFilter.kt"); } @TestMetadata("mapVar.kt") public void testMapVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/mapVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/mapVar.kt"); } @TestMetadata("map_var.kt") public void testMap_var() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/map_var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/map_var.kt"); } @TestMetadata("map_variableStillNeeded.kt") public void testMap_variableStillNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/map/map_variableStillNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/map/map_variableStillNeeded.kt"); } } @@ -11443,86 +10333,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaxMin extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMaxMin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/maxMin"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("KT14210.kt") public void testKT14210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/KT14210.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/KT14210.kt"); } @TestMetadata("max1.kt") public void testMax1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max1.kt"); } @TestMetadata("max2.kt") public void testMax2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max2.kt"); } @TestMetadata("max3.kt") public void testMax3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max3.kt"); } @TestMetadata("max4.kt") public void testMax4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max4.kt"); } @TestMetadata("max5.kt") public void testMax5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max5.kt"); } @TestMetadata("max6.kt") public void testMax6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max6.kt"); } @TestMetadata("max7.kt") public void testMax7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/max7.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/max7.kt"); } @TestMetadata("min1.kt") public void testMin1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min1.kt"); } @TestMetadata("min2.kt") public void testMin2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min2.kt"); } @TestMetadata("min3.kt") public void testMin3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min3.kt"); } @TestMetadata("min4.kt") public void testMin4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min4.kt"); } @TestMetadata("min5.kt") public void testMin5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/maxMin/min5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/maxMin/min5.kt"); } } @@ -11530,98 +10411,87 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/smartCasts"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("errorOutsideLoop.kt") public void testErrorOutsideLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/errorOutsideLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/errorOutsideLoop.kt"); } @TestMetadata("smartCastNotBroken.kt") public void testSmartCastNotBroken() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken.kt"); } @TestMetadata("smartCastNotBroken2.kt") public void testSmartCastNotBroken2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken2.kt"); } @TestMetadata("smartCastNotBroken3.kt") public void testSmartCastNotBroken3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken3.kt"); } @TestMetadata("smartCastNotBroken4.kt") public void testSmartCastNotBroken4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken4.kt"); } @TestMetadata("smartCastNotBroken5.kt") public void testSmartCastNotBroken5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotBroken5.kt"); } @TestMetadata("smartCastNotNullRequired.kt") public void testSmartCastNotNullRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotNullRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotNullRequired.kt"); } @TestMetadata("smartCastNotRequired.kt") public void testSmartCastNotRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastNotRequired.kt"); } @TestMetadata("smartCastRequired.kt") public void testSmartCastRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired.kt"); } @TestMetadata("smartCastRequired2.kt") public void testSmartCastRequired2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired2.kt"); } @TestMetadata("smartCastRequired3.kt") public void testSmartCastRequired3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired3.kt"); } @TestMetadata("smartCastRequired4.kt") public void testSmartCastRequired4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired4.kt"); } @TestMetadata("smartCastRequired5.kt") public void testSmartCastRequired5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired5.kt"); } @TestMetadata("smartCastRequired6.kt") public void testSmartCastRequired6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastRequired6.kt"); } @TestMetadata("smartCastThisRequired.kt") public void testSmartCastThisRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/smartCasts/smartCastThisRequired.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/smartCasts/smartCastThisRequired.kt"); } } @@ -11629,110 +10499,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sum extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/sum"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("bytes.kt") public void testBytes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/bytes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/bytes.kt"); } @TestMetadata("doubles.kt") public void testDoubles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/doubles.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/doubles.kt"); } @TestMetadata("floats.kt") public void testFloats() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/floats.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/floats.kt"); } @TestMetadata("floatsIntoDouble.kt") public void testFloatsIntoDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/floatsIntoDouble.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/floatsIntoDouble.kt"); } @TestMetadata("indexUsed.kt") public void testIndexUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/indexUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/indexUsed.kt"); } @TestMetadata("indexUsed2.kt") public void testIndexUsed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/indexUsed2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/indexUsed2.kt"); } @TestMetadata("ints.kt") public void testInts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/ints.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/ints.kt"); } @TestMetadata("longs.kt") public void testLongs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/longs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/longs.kt"); } @TestMetadata("nonNumbers.kt") public void testNonNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/nonNumbers.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/nonNumbers.kt"); } @TestMetadata("nonZeroInitial.kt") public void testNonZeroInitial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/nonZeroInitial.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/nonZeroInitial.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/short.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/short.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/smartCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/smartCast.kt"); } @TestMetadata("smartCastNotNull.kt") public void testSmartCastNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/smartCastNotNull.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/smartCastNotNull.kt"); } @TestMetadata("sumByDouble.kt") public void testSumByDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByDouble.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByDouble.kt"); } @TestMetadata("sumByInts.kt") public void testSumByInts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByInts.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByInts.kt"); } @TestMetadata("sumByIntsIntoLong.kt") public void testSumByIntsIntoLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByIntsIntoLong.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByIntsIntoLong.kt"); } @TestMetadata("sumByShorts.kt") public void testSumByShorts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/sum/sumByShorts.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/sum/sumByShorts.kt"); } } @@ -11740,38 +10597,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TakeWhile extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTakeWhile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/loopToCallChain/takeWhile"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ifElse1.kt") public void testIfElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/ifElse1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/ifElse1.kt"); } @TestMetadata("ifElse2.kt") public void testIfElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/ifElse2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/ifElse2.kt"); } @TestMetadata("nestedLoop.kt") public void testNestedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/nestedLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/nestedLoop.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/simple.kt"); } @TestMetadata("wrongBreak.kt") public void testWrongBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/takeWhile/wrongBreak.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/takeWhile/wrongBreak.kt"); } } @@ -11779,16 +10635,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToCollection extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addAfterLoop.kt") public void testAddAfterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/addAfterLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/addAfterLoop.kt"); } @TestMetadata("addToCollection.kt") public void testAddToCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/addToCollection.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/addToCollection.kt"); } public void testAllFilesPresentInToCollection() throws Exception { @@ -11797,86 +10655,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("badReceiver1.kt") public void testBadReceiver1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/badReceiver1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/badReceiver1.kt"); } @TestMetadata("badReceiver2.kt") public void testBadReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/badReceiver2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/badReceiver2.kt"); } @TestMetadata("explicitValType.kt") public void testExplicitValType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/explicitValType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/explicitValType.kt"); } @TestMetadata("goodReceiver.kt") public void testGoodReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/goodReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/goodReceiver.kt"); } @TestMetadata("KT18881.kt") public void testKT18881() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/KT18881.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/KT18881.kt"); } @TestMetadata("resultCollectionUsedInsideLoop.kt") public void testResultCollectionUsedInsideLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/resultCollectionUsedInsideLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/resultCollectionUsedInsideLoop.kt"); } @TestMetadata("toList.kt") public void testToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toList.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toList.kt"); } @TestMetadata("toList2.kt") public void testToList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toList2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toList2.kt"); } @TestMetadata("toList3.kt") public void testToList3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toList3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toList3.kt"); } @TestMetadata("toMutableSet.kt") public void testToMutableSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet.kt"); } @TestMetadata("toMutableSet2.kt") public void testToMutableSet2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet2.kt"); } @TestMetadata("toMutableSet3.kt") public void testToMutableSet3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toMutableSet3.kt"); } @TestMetadata("toSet.kt") public void testToSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toSet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toSet.kt"); } @TestMetadata("toSetWithMap.kt") public void testToSetWithMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/loopToCallChain/toCollection/toSetWithMap.kt"); - doTest(fileName); + runTest("idea/testData/intentions/loopToCallChain/toCollection/toSetWithMap.kt"); } } } @@ -11885,38 +10729,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MergeIfs extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMergeIfs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/mergeIfs"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("comments.kt") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/mergeIfs/comments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/mergeIfs/comments.kt"); } @TestMetadata("else1.kt") public void testElse1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/mergeIfs/else1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/mergeIfs/else1.kt"); } @TestMetadata("else2.kt") public void testElse2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/mergeIfs/else2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/mergeIfs/else2.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/mergeIfs/expression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/mergeIfs/expression.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/mergeIfs/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/mergeIfs/simple.kt"); } } @@ -11945,116 +10788,102 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveLambdaInsideParentheses extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveLambdaInsideParentheses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/moveLambdaInsideParentheses"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inapplicable1.kt") public void testInapplicable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/inapplicable1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/inapplicable1.kt"); } @TestMetadata("inapplicable2.kt") public void testInapplicable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/inapplicable2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/inapplicable2.kt"); } @TestMetadata("moveLabeledLambda1.kt") public void testMoveLabeledLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLabeledLambda1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLabeledLambda1.kt"); } @TestMetadata("moveLabeledLambda2.kt") public void testMoveLabeledLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLabeledLambda2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLabeledLambda2.kt"); } @TestMetadata("moveLambda1.kt") public void testMoveLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda1.kt"); } @TestMetadata("moveLambda10.kt") public void testMoveLambda10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda10.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda10.kt"); } @TestMetadata("moveLambda11.kt") public void testMoveLambda11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda11.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda11.kt"); } @TestMetadata("moveLambda12.kt") public void testMoveLambda12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda12.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda12.kt"); } @TestMetadata("moveLambda13.kt") public void testMoveLambda13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda13.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda13.kt"); } @TestMetadata("moveLambda14.kt") public void testMoveLambda14() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda14.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda14.kt"); } @TestMetadata("moveLambda2.kt") public void testMoveLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda2.kt"); } @TestMetadata("moveLambda3.kt") public void testMoveLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda3.kt"); } @TestMetadata("moveLambda4.kt") public void testMoveLambda4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda4.kt"); } @TestMetadata("moveLambda5.kt") public void testMoveLambda5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda5.kt"); } @TestMetadata("moveLambda6.kt") public void testMoveLambda6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda6.kt"); } @TestMetadata("moveLambda7.kt") public void testMoveLambda7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda7.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda7.kt"); } @TestMetadata("moveLambda8.kt") public void testMoveLambda8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda8.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda8.kt"); } @TestMetadata("moveLambda9.kt") public void testMoveLambda9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda9.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveLambdaInsideParentheses/moveLambda9.kt"); } } @@ -12062,16 +10891,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveMemberToTopLevel extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractFunction.kt") public void testAbstractFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/abstractFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/abstractFunction.kt"); } @TestMetadata("abstractProperty.kt") public void testAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/abstractProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/abstractProperty.kt"); } public void testAllFilesPresentInMoveMemberToTopLevel() throws Exception { @@ -12080,44 +10911,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/function.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/function.kt"); } @TestMetadata("functionInCompanion.kt") public void testFunctionInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/functionInCompanion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/functionInCompanion.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/property.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/property.kt"); } @TestMetadata("propertyInCompanion.kt") public void testPropertyInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/propertyInCompanion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/propertyInCompanion.kt"); } @TestMetadata("redeclarationConflict.kt") public void testRedeclarationConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/redeclarationConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/redeclarationConflict.kt"); } @TestMetadata("redeclarationConflictWithPackage.kt") public void testRedeclarationConflictWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/redeclarationConflictWithPackage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/redeclarationConflictWithPackage.kt"); } @TestMetadata("redeclarationPropertyConflict.kt") public void testRedeclarationPropertyConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveMemberToTopLevel/redeclarationPropertyConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveMemberToTopLevel/redeclarationPropertyConflict.kt"); } } @@ -12125,62 +10949,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveOutOfCompanion extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveOutOfCompanion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/moveOutOfCompanion"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("companionAsImplicitReceiver.kt") public void testCompanionAsImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/companionAsImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/companionAsImplicitReceiver.kt"); } @TestMetadata("moveAndDropCompanion.kt") public void testMoveAndDropCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/moveAndDropCompanion.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/moveAndDropCompanion.kt"); } @TestMetadata("moveFunction.kt") public void testMoveFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/moveFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/moveFunction.kt"); } @TestMetadata("moveFunctionWithExternalRefs.kt") public void testMoveFunctionWithExternalRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/moveFunctionWithExternalRefs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/moveFunctionWithExternalRefs.kt"); } @TestMetadata("moveProperty.kt") public void testMoveProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/moveProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/moveProperty.kt"); } @TestMetadata("movePropertyWithExternalRefs.kt") public void testMovePropertyWithExternalRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/movePropertyWithExternalRefs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/movePropertyWithExternalRefs.kt"); } @TestMetadata("notCompanion1.kt") public void testNotCompanion1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/notCompanion1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/notCompanion1.kt"); } @TestMetadata("notCompanion2.kt") public void testNotCompanion2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/notCompanion2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/notCompanion2.kt"); } @TestMetadata("redeclarationConflict.kt") public void testRedeclarationConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveOutOfCompanion/redeclarationConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveOutOfCompanion/redeclarationConflict.kt"); } } @@ -12188,56 +11007,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MovePropertyToClassBody extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMovePropertyToClassBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/movePropertyToClassBody"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotationWithUseSite.kt") public void testAnnotationWithUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/annotationWithUseSite.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/annotationWithUseSite.kt"); } @TestMetadata("location1.kt") public void testLocation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/location1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/location1.kt"); } @TestMetadata("location2.kt") public void testLocation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/location2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/location2.kt"); } @TestMetadata("parameterAnnotation.kt") public void testParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/parameterAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/parameterAnnotation.kt"); } @TestMetadata("propertyAnnotation.kt") public void testPropertyAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/propertyAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/propertyAnnotation.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/simple.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/vararg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/vararg.kt"); } @TestMetadata("varargWithAnnotation.kt") public void testVarargWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToClassBody/varargWithAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToClassBody/varargWithAnnotation.kt"); } } @@ -12245,92 +11060,82 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MovePropertyToConstructor extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMovePropertyToConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/movePropertyToConstructor"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotationWithUseSite.kt") public void testAnnotationWithUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/annotationWithUseSite.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/annotationWithUseSite.kt"); } @TestMetadata("declaredInInterface.kt") public void testDeclaredInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/declaredInInterface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/declaredInInterface.kt"); } @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/delegated.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/delegated.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/functionReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/functionReference.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/getter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/getter.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/lambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/lambda.kt"); } @TestMetadata("lambdaWithoutParameters.kt") public void testLambdaWithoutParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/lambdaWithoutParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/lambdaWithoutParameters.kt"); } @TestMetadata("lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/lateinit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/lateinit.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/local.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/local.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/map.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/map.kt"); } @TestMetadata("methodReference.kt") public void testMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/methodReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/methodReference.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/simple.kt"); } @TestMetadata("simpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/simpleAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/simpleAnnotation.kt"); } @TestMetadata("withoutMatchingParameter.kt") public void testWithoutMatchingParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/movePropertyToConstructor/withoutMatchingParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/movePropertyToConstructor/withoutMatchingParameter.kt"); } } @@ -12338,16 +11143,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveToCompanion extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractFunction.kt") public void testAbstractFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/abstractFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/abstractFunction.kt"); } @TestMetadata("abstractProperty.kt") public void testAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/abstractProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/abstractProperty.kt"); } public void testAllFilesPresentInMoveToCompanion() throws Exception { @@ -12356,116 +11163,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("doNotQualifyThisLabel.kt") public void testDoNotQualifyThisLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/doNotQualifyThisLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/doNotQualifyThisLabel.kt"); } @TestMetadata("dropFinal.kt") public void testDropFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/dropFinal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/dropFinal.kt"); } @TestMetadata("dropOpen.kt") public void testDropOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/dropOpen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/dropOpen.kt"); } @TestMetadata("enumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/enumEntry.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/enumEntry.kt"); } @TestMetadata("functionWithOverride.kt") public void testFunctionWithOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/functionWithOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/functionWithOverride.kt"); } @TestMetadata("functionWithoutBody.kt") public void testFunctionWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/functionWithoutBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/functionWithoutBody.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/genericFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/genericFunction.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/genericProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/genericProperty.kt"); } @TestMetadata("implicitDispatchReceiver.kt") public void testImplicitDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/implicitDispatchReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/implicitDispatchReceiver.kt"); } @TestMetadata("inInnerClass.kt") public void testInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/inInnerClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/inInnerClass.kt"); } @TestMetadata("inLocalClass.kt") public void testInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/inLocalClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/inLocalClass.kt"); } @TestMetadata("inObject.kt") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/inObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/inObject.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/localFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/localFunction.kt"); } @TestMetadata("overriddenFunction.kt") public void testOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/overriddenFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/overriddenFunction.kt"); } @TestMetadata("overriddenProperty.kt") public void testOverriddenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/overriddenProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/overriddenProperty.kt"); } @TestMetadata("propertyUsingClassInstance.kt") public void testPropertyUsingClassInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/propertyUsingClassInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/propertyUsingClassInstance.kt"); } @TestMetadata("propertyWithOverride.kt") public void testPropertyWithOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/propertyWithOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/propertyWithOverride.kt"); } @TestMetadata("redeclarationConflict.kt") public void testRedeclarationConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/redeclarationConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/redeclarationConflict.kt"); } @TestMetadata("topLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/moveToCompanion/topLevelFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/moveToCompanion/topLevelFunction.kt"); } } @@ -12473,38 +11261,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableBooleanEqualityCheckToElvis extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullableBooleanEqualityCheckToElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/nullableBooleanEqualityCheckToElvis"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("eqFalse.kt") public void testEqFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/eqFalse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/eqFalse.kt"); } @TestMetadata("eqTrue.kt") public void testEqTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/eqTrue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/eqTrue.kt"); } @TestMetadata("flexible.kt") public void testFlexible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/flexible.kt"); - doTest(fileName); + runTest("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/flexible.kt"); } @TestMetadata("notEqFalse.kt") public void testNotEqFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/notEqFalse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/notEqFalse.kt"); } @TestMetadata("notEqTrue.kt") public void testNotEqTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/notEqTrue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/nullableBooleanEqualityCheckToElvis/notEqTrue.kt"); } } @@ -12512,176 +11299,165 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectLiteralToLambda extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjectLiteralToLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/objectLiteralToLambda"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("EmptyBody.kt") public void testEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/EmptyBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/EmptyBody.kt"); } @TestMetadata("ExplicitThis.kt") public void testExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ExplicitThis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ExplicitThis.kt"); } @TestMetadata("ExpressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ExpressionBody.kt"); } @TestMetadata("HasData.kt") public void testHasData() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/HasData.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/HasData.kt"); } @TestMetadata("ImplicitThis.kt") public void testImplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ImplicitThis.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ImplicitThis.kt"); } @TestMetadata("MultipleBases.kt") public void testMultipleBases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/MultipleBases.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/MultipleBases.kt"); } @TestMetadata("MultipleParameters.kt") public void testMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/MultipleParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/MultipleParameters.kt"); } @TestMetadata("NoSamAdapterNeeded.kt") public void testNoSamAdapterNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/NoSamAdapterNeeded.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/NoSamAdapterNeeded.kt"); } @TestMetadata("NotInRange1.kt") public void testNotInRange1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/NotInRange1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/NotInRange1.kt"); } @TestMetadata("NotInRange2.kt") public void testNotInRange2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/NotInRange2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/NotInRange2.kt"); } @TestMetadata("NotJavaSAM.kt") public void testNotJavaSAM() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/NotJavaSAM.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/NotJavaSAM.kt"); } @TestMetadata("ParametersNotUsed.kt") public void testParametersNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ParametersNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ParametersNotUsed.kt"); } @TestMetadata("ParametersNotUsedMoreThanOne.kt") public void testParametersNotUsedMoreThanOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ParametersNotUsedMoreThanOne.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ParametersNotUsedMoreThanOne.kt"); } @TestMetadata("QualifiedReturn.kt") public void testQualifiedReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/QualifiedReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/QualifiedReturn.kt"); } @TestMetadata("Recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/Recursive.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/Recursive.kt"); } @TestMetadata("ReturnNoValue.kt") public void testReturnNoValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ReturnNoValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ReturnNoValue.kt"); } @TestMetadata("ReturnNotLast.kt") public void testReturnNotLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ReturnNotLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ReturnNotLast.kt"); } @TestMetadata("ReturnsInIf.kt") public void testReturnsInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ReturnsInIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ReturnsInIf.kt"); } @TestMetadata("ReturnsInWhen.kt") public void testReturnsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ReturnsInWhen.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ReturnsInWhen.kt"); } @TestMetadata("SamAdapterNeededBecauseOfLabeledReturn.kt") public void testSamAdapterNeededBecauseOfLabeledReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/SamAdapterNeededBecauseOfLabeledReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/SamAdapterNeededBecauseOfLabeledReturn.kt"); } @TestMetadata("ShortGenericArgument.kt") public void testShortGenericArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ShortGenericArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ShortGenericArgument.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/Simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/Simple.kt"); } @TestMetadata("SingleReturn.kt") public void testSingleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/SingleReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/SingleReturn.kt"); } @TestMetadata("StatementAndReturn.kt") public void testStatementAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/StatementAndReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/StatementAndReturn.kt"); } @TestMetadata("ThisReference.kt") public void testThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/ThisReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/ThisReference.kt"); } @TestMetadata("TwoFunctions.kt") public void testTwoFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/TwoFunctions.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/TwoFunctions.kt"); } @TestMetadata("WithComment.kt") public void testWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/WithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/WithComment.kt"); } @TestMetadata("WithCommentAfterExpression.kt") public void testWithCommentAfterExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/objectLiteralToLambda/WithCommentAfterExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/objectLiteralToLambda/WithCommentAfterExpression.kt"); + } + + @TestMetadata("idea/testData/intentions/objectLiteralToLambda/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/objectLiteralToLambda/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -12689,200 +11465,172 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorToFunction extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorToFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/operatorToFunction"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("arrayAccessMultipleIndex.kt") public void testArrayAccessMultipleIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/arrayAccessMultipleIndex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/arrayAccessMultipleIndex.kt"); } @TestMetadata("arrayAccessOneIndex.kt") public void testArrayAccessOneIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/arrayAccessOneIndex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/arrayAccessOneIndex.kt"); } @TestMetadata("arrayAssignmentMultipleIndex.kt") public void testArrayAssignmentMultipleIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/arrayAssignmentMultipleIndex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/arrayAssignmentMultipleIndex.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/assignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/assignment.kt"); } @TestMetadata("binarayNotEqNullable.kt") public void testBinarayNotEqNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binarayNotEqNullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binarayNotEqNullable.kt"); } @TestMetadata("binaryEqEqNonNullable.kt") public void testBinaryEqEqNonNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqEqNonNullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryEqEqNonNullable.kt"); } @TestMetadata("binaryEqEqNotNullInLeftSide.kt") public void testBinaryEqEqNotNullInLeftSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqEqNotNullInLeftSide.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryEqEqNotNullInLeftSide.kt"); } @TestMetadata("binaryEqEqNotNullInRightSide.kt") public void testBinaryEqEqNotNullInRightSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqEqNotNullInRightSide.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryEqEqNotNullInRightSide.kt"); } @TestMetadata("binaryEqEqNullInLeftSide.kt") public void testBinaryEqEqNullInLeftSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqEqNullInLeftSide.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryEqEqNullInLeftSide.kt"); } @TestMetadata("binaryEqEqNullInRightSide.kt") public void testBinaryEqEqNullInRightSide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqEqNullInRightSide.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryEqEqNullInRightSide.kt"); } @TestMetadata("binaryEqEqNullable.kt") public void testBinaryEqEqNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqEqNullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryEqEqNullable.kt"); } @TestMetadata("binaryNotEqNonNullable.kt") public void testBinaryNotEqNonNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryNotEqNonNullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryNotEqNonNullable.kt"); } @TestMetadata("binaryNotIn.kt") public void testBinaryNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryNotIn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryNotIn.kt"); } @TestMetadata("binaryPlus.kt") public void testBinaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryPlus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryPlus.kt"); } @TestMetadata("binaryPlusEquals.kt") public void testBinaryPlusEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryPlusEquals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryPlusEquals.kt"); } @TestMetadata("binaryPlusEqualsNotResolved.kt") public void testBinaryPlusEqualsNotResolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryPlusEqualsNotResolved.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryPlusEqualsNotResolved.kt"); } @TestMetadata("binaryRangeTo.kt") public void testBinaryRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryRangeTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/binaryRangeTo.kt"); } @TestMetadata("compoundAssignment.kt") public void testCompoundAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/compoundAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/compoundAssignment.kt"); } @TestMetadata("compoundAssignment2.kt") public void testCompoundAssignment2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/compoundAssignment2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/compoundAssignment2.kt"); } @TestMetadata("functionCallMultipleArgument.kt") public void testFunctionCallMultipleArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/functionCallMultipleArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/functionCallMultipleArgument.kt"); } @TestMetadata("functionCallWithMultipleArgumentsAndSingleLambda.kt") public void testFunctionCallWithMultipleArgumentsAndSingleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/functionCallWithMultipleArgumentsAndSingleLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/functionCallWithMultipleArgumentsAndSingleLambda.kt"); } @TestMetadata("functionCallWithSingleLambda.kt") public void testFunctionCallWithSingleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/functionCallWithSingleLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/functionCallWithSingleLambda.kt"); } @TestMetadata("inRightSideOfAssignment.kt") public void testInRightSideOfAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/inRightSideOfAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/inRightSideOfAssignment.kt"); } @TestMetadata("keepComments.kt") public void testKeepComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/keepComments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/keepComments.kt"); } @TestMetadata("notApplicableAssignment.kt") public void testNotApplicableAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/notApplicableAssignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/notApplicableAssignment.kt"); } @TestMetadata("notApplicableCallWithInvokeMethod.kt") public void testNotApplicableCallWithInvokeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/notApplicableCallWithInvokeMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/notApplicableCallWithInvokeMethod.kt"); } @TestMetadata("notApplicableFunctionCallWithCallableReference.kt") public void testNotApplicableFunctionCallWithCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/notApplicableFunctionCallWithCallableReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/notApplicableFunctionCallWithCallableReference.kt"); } @TestMetadata("notApplicableNewClassObject.kt") public void testNotApplicableNewClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/notApplicableNewClassObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/notApplicableNewClassObject.kt"); } @TestMetadata("pluPlus.kt") public void testPluPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/pluPlus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/pluPlus.kt"); } @TestMetadata("postfixMinusMinus.kt") public void testPostfixMinusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/postfixMinusMinus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/postfixMinusMinus.kt"); } @TestMetadata("prefixPlus.kt") public void testPrefixPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/prefixPlus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/prefixPlus.kt"); } @TestMetadata("prefixPlusPlus.kt") public void testPrefixPlusPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/prefixPlusPlus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/operatorToFunction/prefixPlusPlus.kt"); } } @@ -12890,38 +11638,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReconstructTypeInCastOrIs extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReconstructTypeInCastOrIs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/reconstructTypeInCastOrIs"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("completeGenericType.kt") public void testCompleteGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/reconstructTypeInCastOrIs/completeGenericType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/reconstructTypeInCastOrIs/completeGenericType.kt"); } @TestMetadata("completeType.kt") public void testCompleteType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/reconstructTypeInCastOrIs/completeType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/reconstructTypeInCastOrIs/completeType.kt"); } @TestMetadata("errorType.kt") public void testErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/reconstructTypeInCastOrIs/errorType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/reconstructTypeInCastOrIs/errorType.kt"); } @TestMetadata("reconstructableType.kt") public void testReconstructableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/reconstructTypeInCastOrIs/reconstructableType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/reconstructTypeInCastOrIs/reconstructableType.kt"); } @TestMetadata("typeInDeclaration.kt") public void testTypeInDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/reconstructTypeInCastOrIs/typeInDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/reconstructTypeInCastOrIs/typeInDeclaration.kt"); } } @@ -12929,68 +11676,62 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveArgumentName extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveArgumentName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeArgumentName"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("namedArgumentBefore.kt") public void testNamedArgumentBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/namedArgumentBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/namedArgumentBefore.kt"); } @TestMetadata("noExpression.kt") public void testNoExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/noExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/noExpression.kt"); } @TestMetadata("notInPosition.kt") public void testNotInPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/notInPosition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/notInPosition.kt"); } @TestMetadata("notInRange.kt") public void testNotInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/notInRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/notInRange.kt"); } @TestMetadata("notNamed.kt") public void testNotNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/notNamed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/notNamed.kt"); } @TestMetadata("notResolved.kt") public void testNotResolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/notResolved.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/notResolved.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/range.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/range.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/simple.kt"); } @TestMetadata("star.kt") public void testStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/star.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/star.kt"); } @TestMetadata("superClassConstructor.kt") public void testSuperClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeArgumentName/superClassConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeArgumentName/superClassConstructor.kt"); } } @@ -12998,194 +11739,167 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveBraces extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveBraces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeBraces"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/doWhile.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/doWhile.kt"); } @TestMetadata("doWhileWithTwoStatements.kt") public void testDoWhileWithTwoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/doWhileWithTwoStatements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/doWhileWithTwoStatements.kt"); } @TestMetadata("else.kt") public void testElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/else.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/else.kt"); } @TestMetadata("elseInDotQualifiedExpression.kt") public void testElseInDotQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/elseInDotQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/elseInDotQualifiedExpression.kt"); } @TestMetadata("elseInPlusAssignExpression.kt") public void testElseInPlusAssignExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/elseInPlusAssignExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/elseInPlusAssignExpression.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/for.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/for.kt"); } @TestMetadata("forWithLocalVariable.kt") public void testForWithLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/forWithLocalVariable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/forWithLocalVariable.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/if.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/if.kt"); } @TestMetadata("ifInDotQualifiedExpression.kt") public void testIfInDotQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInDotQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInDotQualifiedExpression.kt"); } @TestMetadata("ifInsideIf.kt") public void testIfInsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf.kt"); } @TestMetadata("ifInsideIf2.kt") public void testIfInsideIf2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf2.kt"); } @TestMetadata("ifInsideIf3.kt") public void testIfInsideIf3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf3.kt"); } @TestMetadata("ifInsideIf4.kt") public void testIfInsideIf4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf4.kt"); } @TestMetadata("ifInsideIf5.kt") public void testIfInsideIf5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf5.kt"); } @TestMetadata("ifInsideIf6.kt") public void testIfInsideIf6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf6.kt"); } @TestMetadata("ifInsideIf7.kt") public void testIfInsideIf7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifInsideIf7.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifInsideIf7.kt"); } @TestMetadata("ifWithComment.kt") public void testIfWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifWithComment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifWithComment.kt"); } @TestMetadata("ifWithNoStatement.kt") public void testIfWithNoStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifWithNoStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifWithNoStatement.kt"); } @TestMetadata("ifWithSemicolon.kt") public void testIfWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifWithSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifWithSemicolon.kt"); } @TestMetadata("ifWithTwoStatements.kt") public void testIfWithTwoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/ifWithTwoStatements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/ifWithTwoStatements.kt"); } @TestMetadata("removeBracesFromIfWithCommentedCode.kt") public void testRemoveBracesFromIfWithCommentedCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/removeBracesFromIfWithCommentedCode.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/removeBracesFromIfWithCommentedCode.kt"); } @TestMetadata("whenInDotQualifiedExpression.kt") public void testWhenInDotQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenInDotQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenInDotQualifiedExpression.kt"); } @TestMetadata("whenLambda.kt") public void testWhenLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenLambda.kt"); } @TestMetadata("whenMultiple.kt") public void testWhenMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenMultiple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenMultiple.kt"); } @TestMetadata("whenNoBraces.kt") public void testWhenNoBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenNoBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenNoBraces.kt"); } @TestMetadata("whenSimple.kt") public void testWhenSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenSimple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenSimple.kt"); } @TestMetadata("whenSimpleOutsideBlock.kt") public void testWhenSimpleOutsideBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenSimpleOutsideBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenSimpleOutsideBlock.kt"); } @TestMetadata("whenStatement.kt") public void testWhenStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whenStatement.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whenStatement.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/while.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/while.kt"); } @TestMetadata("whileOutsideBlock.kt") public void testWhileOutsideBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whileOutsideBlock.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whileOutsideBlock.kt"); } @TestMetadata("whileWithTwoStatements.kt") public void testWhileWithTwoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeBraces/whileWithTwoStatements.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeBraces/whileWithTwoStatements.kt"); } } @@ -13193,80 +11907,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveCurlyBracesFromTemplate extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveCurlyBracesFromTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeCurlyBracesFromTemplate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("necessaryBrackets1.kt") public void testNecessaryBrackets1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets1.kt"); } @TestMetadata("necessaryBrackets2.kt") public void testNecessaryBrackets2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets2.kt"); } @TestMetadata("necessaryBrackets3.kt") public void testNecessaryBrackets3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets3.kt"); } @TestMetadata("necessaryBrackets4.kt") public void testNecessaryBrackets4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets4.kt"); } @TestMetadata("necessaryBrackets5.kt") public void testNecessaryBrackets5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets5.kt"); } @TestMetadata("necessaryBrackets6.kt") public void testNecessaryBrackets6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/necessaryBrackets6.kt"); } @TestMetadata("unnecessaryBrackets1.kt") public void testUnnecessaryBrackets1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets1.kt"); } @TestMetadata("unnecessaryBrackets2.kt") public void testUnnecessaryBrackets2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets2.kt"); } @TestMetadata("unnecessaryBrackets3.kt") public void testUnnecessaryBrackets3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets3.kt"); } @TestMetadata("unnecessaryBrackets4.kt") public void testUnnecessaryBrackets4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets4.kt"); } @TestMetadata("unnecessaryBrackets5.kt") public void testUnnecessaryBrackets5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets5.kt"); } @TestMetadata("unnecessaryBrackets6.kt") public void testUnnecessaryBrackets6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeCurlyBracesFromTemplate/unnecessaryBrackets6.kt"); } } @@ -13274,128 +11980,112 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveEmptyClassBody extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveEmptyClassBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeEmptyClassBody"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymousInterfaceObject.kt") public void testAnonymousInterfaceObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/anonymousInterfaceObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/anonymousInterfaceObject.kt"); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/anonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/anonymousObject.kt"); } @TestMetadata("companionBeforeFun.kt") public void testCompanionBeforeFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionBeforeFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionBeforeFun.kt"); } @TestMetadata("companionBeforeInit.kt") public void testCompanionBeforeInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionBeforeInit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionBeforeInit.kt"); } @TestMetadata("companionBeforePrivateFun.kt") public void testCompanionBeforePrivateFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionBeforePrivateFun.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionBeforePrivateFun.kt"); } @TestMetadata("companionBeforeVal.kt") public void testCompanionBeforeVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionBeforeVal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionBeforeVal.kt"); } @TestMetadata("companionInLast.kt") public void testCompanionInLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionInLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionInLast.kt"); } @TestMetadata("companionWithName.kt") public void testCompanionWithName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionWithName.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionWithName.kt"); } @TestMetadata("companionWithSemicolon.kt") public void testCompanionWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/companionWithSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/companionWithSemicolon.kt"); } @TestMetadata("emptyClass.kt") public void testEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/emptyClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/emptyClass.kt"); } @TestMetadata("emptyDataClass.kt") public void testEmptyDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/emptyDataClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/emptyDataClass.kt"); } @TestMetadata("emptyInterface.kt") public void testEmptyInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/emptyInterface.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/emptyInterface.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/innerClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/innerClass.kt"); } @TestMetadata("nestedAnonymous.kt") public void testNestedAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/nestedAnonymous.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/nestedAnonymous.kt"); } @TestMetadata("nestedClassFollowedByFunction.kt") public void testNestedClassFollowedByFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedByFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedByFunction.kt"); } @TestMetadata("nestedClassFollowedByMember.kt") public void testNestedClassFollowedByMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedByMember.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedByMember.kt"); } @TestMetadata("nestedClassFollowedBySecondaryConstructor.kt") public void testNestedClassFollowedBySecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedBySecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedBySecondaryConstructor.kt"); } @TestMetadata("nestedClassFollowedBySecondaryConstructor2.kt") public void testNestedClassFollowedBySecondaryConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedBySecondaryConstructor2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/nestedClassFollowedBySecondaryConstructor2.kt"); } @TestMetadata("noneEmptyClass.kt") public void testNoneEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/noneEmptyClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/noneEmptyClass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyClassBody/object.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyClassBody/object.kt"); } } @@ -13403,14 +12093,17 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveEmptyParenthesesFromLambdaCall extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveEmptyParenthesesFromLambdaCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeEmptyParenthesesFromLambdaCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyParenthesesFromLambdaCall/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyParenthesesFromLambdaCall/simple.kt"); } } @@ -13418,56 +12111,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveEmptyPrimaryConstructor extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveEmptyPrimaryConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeEmptyPrimaryConstructor"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/annotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/annotation.kt"); } @TestMetadata("expectClassExplicitConstructor.kt") public void testExpectClassExplicitConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/expectClassExplicitConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/expectClassExplicitConstructor.kt"); } @TestMetadata("expectClassPrimaryConstructor.kt") public void testExpectClassPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/expectClassPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/expectClassPrimaryConstructor.kt"); } @TestMetadata("keyword.kt") public void testKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/keyword.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/keyword.kt"); } @TestMetadata("modifier.kt") public void testModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/modifier.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/modifier.kt"); } @TestMetadata("nestedExpectClassPrimaryConstructor.kt") public void testNestedExpectClassPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/nestedExpectClassPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/nestedExpectClassPrimaryConstructor.kt"); } @TestMetadata("secondary.kt") public void testSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/secondary.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/secondary.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptyPrimaryConstructor/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptyPrimaryConstructor/simple.kt"); } } @@ -13475,20 +12164,22 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveEmptySecondaryConstructorBody extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveEmptySecondaryConstructorBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeEmptySecondaryConstructorBody"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("comment.kt") public void testComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptySecondaryConstructorBody/comment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptySecondaryConstructorBody/comment.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeEmptySecondaryConstructorBody/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeEmptySecondaryConstructorBody/simple.kt"); } } @@ -13496,62 +12187,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitLambdaParameterTypes extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveExplicitLambdaParameterTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitLambdaParameterTypes"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("invalidCursorPosition.kt") public void testInvalidCursorPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/invalidCursorPosition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/invalidCursorPosition.kt"); } @TestMetadata("lambdaWithLambdaAsParam.kt") public void testLambdaWithLambdaAsParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/lambdaWithLambdaAsParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/lambdaWithLambdaAsParam.kt"); } @TestMetadata("multipleExplicitParams.kt") public void testMultipleExplicitParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/multipleExplicitParams.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/multipleExplicitParams.kt"); } @TestMetadata("paramTypeDeclared.kt") public void testParamTypeDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/paramTypeDeclared.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/paramTypeDeclared.kt"); } @TestMetadata("singleExplicitParam.kt") public void testSingleExplicitParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/singleExplicitParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/singleExplicitParam.kt"); } @TestMetadata("typesAlreadyImplicit.kt") public void testTypesAlreadyImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/typesAlreadyImplicit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/typesAlreadyImplicit.kt"); } @TestMetadata("withDestructuring.kt") public void testWithDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/withDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/withDestructuring.kt"); } @TestMetadata("withDestructuringAndSimple.kt") public void testWithDestructuringAndSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/withDestructuringAndSimple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/withDestructuringAndSimple.kt"); } @TestMetadata("withDestructuringInMiddle.kt") public void testWithDestructuringInMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitLambdaParameterTypes/withDestructuringInMiddle.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitLambdaParameterTypes/withDestructuringInMiddle.kt"); } } @@ -13559,74 +12245,80 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitSuperQualifier extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveExplicitSuperQualifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitSuperQualifier"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousSuperMethod.kt") public void testAmbiguousSuperMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperMethod.kt"); } @TestMetadata("AmbiguousSuperProperty.kt") public void testAmbiguousSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/AmbiguousSuperProperty.kt"); } @TestMetadata("DataFlowInfoUsed.kt") public void testDataFlowInfoUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/DataFlowInfoUsed.kt"); } @TestMetadata("IncompleteCall.kt") public void testIncompleteCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCall.kt"); } @TestMetadata("IncompleteCallAmbiguous.kt") public void testIncompleteCallAmbiguous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCallAmbiguous.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/IncompleteCallAmbiguous.kt"); } @TestMetadata("SingleSuper.kt") public void testSingleSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/SingleSuper.kt"); } @TestMetadata("SuperWithLabel.kt") public void testSuperWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/SuperWithLabel.kt"); } @TestMetadata("UnambiguousSuperMethod.kt") public void testUnambiguousSuperMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperMethod.kt"); } @TestMetadata("UnambiguousSuperProperty.kt") public void testUnambiguousSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/UnambiguousSuperProperty.kt"); } @TestMetadata("WrongOffset1.kt") public void testWrongOffset1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset1.kt"); } @TestMetadata("WrongOffset2.kt") public void testWrongOffset2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitSuperQualifier/WrongOffset2.kt"); + } + + @TestMetadata("idea/testData/intentions/removeExplicitSuperQualifier/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitSuperQualifier/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -13634,74 +12326,67 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitType extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveExplicitType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitType"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("funNoBody.kt") public void testFunNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/funNoBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/funNoBody.kt"); } @TestMetadata("funWithBody.kt") public void testFunWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/funWithBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/funWithBody.kt"); } @TestMetadata("hasAnnotation.kt") public void testHasAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/hasAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/hasAnnotation.kt"); } @TestMetadata("notOnParameterOfFunctionType.kt") public void testNotOnParameterOfFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/notOnParameterOfFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/notOnParameterOfFunctionType.kt"); } @TestMetadata("notOnSetterParameter.kt") public void testNotOnSetterParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/notOnSetterParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/notOnSetterParameter.kt"); } @TestMetadata("onOverride.kt") public void testOnOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/onOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/onOverride.kt"); } @TestMetadata("onOverrideInTrait.kt") public void testOnOverrideInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/onOverrideInTrait.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/onOverrideInTrait.kt"); } @TestMetadata("onSetterParameter.kt") public void testOnSetterParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/onSetterParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/onSetterParameter.kt"); } @TestMetadata("onType.kt") public void testOnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/onType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/onType.kt"); } @TestMetadata("propertyTypeFromGetter.kt") public void testPropertyTypeFromGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/propertyTypeFromGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/propertyTypeFromGetter.kt"); } @TestMetadata("removeUnresolvedType.kt") public void testRemoveUnresolvedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/removeUnresolvedType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitType/removeUnresolvedType.kt"); } } @@ -13709,194 +12394,180 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveExplicitTypeArguments extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveExplicitTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitTypeArguments"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("blockValue.kt") public void testBlockValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/blockValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/blockValue.kt"); } @TestMetadata("defaultParamValue.kt") public void testDefaultParamValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/defaultParamValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/defaultParamValue.kt"); } @TestMetadata("fourLiterals.kt") public void testFourLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/fourLiterals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/fourLiterals.kt"); } @TestMetadata("functionBodyIsCallWithUnnecessaryTypeArgs.kt") public void testFunctionBodyIsCallWithUnnecessaryTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/functionBodyIsCallWithUnnecessaryTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/functionBodyIsCallWithUnnecessaryTypeArgs.kt"); } @TestMetadata("getterBody.kt") public void testGetterBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/getterBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/getterBody.kt"); } @TestMetadata("inapplicableTypeThatIsAFunItCannotBeInferred.kt") public void testInapplicableTypeThatIsAFunItCannotBeInferred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/inapplicableTypeThatIsAFunItCannotBeInferred.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/inapplicableTypeThatIsAFunItCannotBeInferred.kt"); } @TestMetadata("insideDeepOtherCall.kt") public void testInsideDeepOtherCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/insideDeepOtherCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/insideDeepOtherCall.kt"); } @TestMetadata("insideGenericCall.kt") public void testInsideGenericCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/insideGenericCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/insideGenericCall.kt"); } @TestMetadata("insideOtherCall.kt") public void testInsideOtherCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/insideOtherCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/insideOtherCall.kt"); } @TestMetadata("lambdaType.kt") public void testLambdaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/lambdaType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/lambdaType.kt"); } @TestMetadata("lambdaValue.kt") public void testLambdaValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/lambdaValue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/lambdaValue.kt"); } @TestMetadata("literalAny.kt") public void testLiteralAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/literalAny.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/literalAny.kt"); } @TestMetadata("literalString.kt") public void testLiteralString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/literalString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/literalString.kt"); } @TestMetadata("literalStringWithClass.kt") public void testLiteralStringWithClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/literalStringWithClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/literalStringWithClass.kt"); } @TestMetadata("literalsWhenTypeArgHasTypeArg.kt") public void testLiteralsWhenTypeArgHasTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/literalsWhenTypeArgHasTypeArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/literalsWhenTypeArgHasTypeArg.kt"); } @TestMetadata("mapGet.kt") public void testMapGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/mapGet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/mapGet.kt"); } @TestMetadata("nestedCall-KT-5028.kt") public void testNestedCall_KT_5028() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/nestedCall-KT-5028.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/nestedCall-KT-5028.kt"); } @TestMetadata("notApplicableNotEnoughtInfo.kt") public void testNotApplicableNotEnoughtInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/notApplicableNotEnoughtInfo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/notApplicableNotEnoughtInfo.kt"); } @TestMetadata("notApplicableSupertypeOfInferred.kt") public void testNotApplicableSupertypeOfInferred() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/notApplicableSupertypeOfInferred.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/notApplicableSupertypeOfInferred.kt"); } @TestMetadata("notApplicableSupertypeOfInferredClass.kt") public void testNotApplicableSupertypeOfInferredClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/notApplicableSupertypeOfInferredClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/notApplicableSupertypeOfInferredClass.kt"); } @TestMetadata("platforrmType1.kt") public void testPlatforrmType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/platforrmType1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/platforrmType1.kt"); } @TestMetadata("platforrmType2.kt") public void testPlatforrmType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/platforrmType2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/platforrmType2.kt"); } @TestMetadata("propertyInitializerIsCallWithUnnecessaryTypeArgs.kt") public void testPropertyInitializerIsCallWithUnnecessaryTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/propertyInitializerIsCallWithUnnecessaryTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/propertyInitializerIsCallWithUnnecessaryTypeArgs.kt"); } @TestMetadata("qualified.kt") public void testQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/qualified.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/qualified.kt"); } @TestMetadata("returnCallWithUnnecessaryTypeArgs.kt") public void testReturnCallWithUnnecessaryTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/returnCallWithUnnecessaryTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/returnCallWithUnnecessaryTypeArgs.kt"); } @TestMetadata("twoArguments.kt") public void testTwoArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/twoArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/twoArguments.kt"); } @TestMetadata("twoLiteralValues.kt") public void testTwoLiteralValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/twoLiteralValues.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/twoLiteralValues.kt"); } @TestMetadata("variableString.kt") public void testVariableString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/variableString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/variableString.kt"); } @TestMetadata("variableString2.kt") public void testVariableString2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/variableString2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/variableString2.kt"); } @TestMetadata("variableStringFartherScope.kt") public void testVariableStringFartherScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/variableStringFartherScope.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/variableStringFartherScope.kt"); } @TestMetadata("variablesAndLiterals.kt") public void testVariablesAndLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitTypeArguments/variablesAndLiterals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeExplicitTypeArguments/variablesAndLiterals.kt"); + } + + @TestMetadata("idea/testData/intentions/removeExplicitTypeArguments/inspectionData") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InspectionData extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspectionData() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeExplicitTypeArguments/inspectionData"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); + } } } @@ -13904,50 +12575,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveForLoopIndices extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveForLoopIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeForLoopIndices"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("inapplicableForLoop.kt") public void testInapplicableForLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/inapplicableForLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/inapplicableForLoop.kt"); } @TestMetadata("inapplicableIndexUse.kt") public void testInapplicableIndexUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/inapplicableIndexUse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/inapplicableIndexUse.kt"); } @TestMetadata("inapplicableOverridenFunction.kt") public void testInapplicableOverridenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/inapplicableOverridenFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/inapplicableOverridenFunction.kt"); } @TestMetadata("loopWithType.kt") public void testLoopWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/loopWithType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/loopWithType.kt"); } @TestMetadata("simpleLoopWithIndices.kt") public void testSimpleLoopWithIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/simpleLoopWithIndices.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/simpleLoopWithIndices.kt"); } @TestMetadata("simpleLoopWithIndicesOverCharSequence.kt") public void testSimpleLoopWithIndicesOverCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/simpleLoopWithIndicesOverCharSequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/simpleLoopWithIndicesOverCharSequence.kt"); } @TestMetadata("simpleLoopWithIndicesOverSequence.kt") public void testSimpleLoopWithIndicesOverSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeForLoopIndices/simpleLoopWithIndicesOverSequence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeForLoopIndices/simpleLoopWithIndicesOverSequence.kt"); } } @@ -13955,56 +12623,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveLabeledReturnInLambda extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveLabeledReturnInLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeLabeledReturnInLambda"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("labeledLambda.kt") public void testLabeledLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/labeledLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/labeledLambda.kt"); } @TestMetadata("multipleBlocks.kt") public void testMultipleBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/multipleBlocks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/multipleBlocks.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/normal.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/normal.kt"); } @TestMetadata("notInsideLabeled.kt") public void testNotInsideLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/notInsideLabeled.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/notInsideLabeled.kt"); } @TestMetadata("notLabeled.kt") public void testNotLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/notLabeled.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/notLabeled.kt"); } @TestMetadata("notLastLine.kt") public void testNotLastLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/notLastLine.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/notLastLine.kt"); } @TestMetadata("outerLambda.kt") public void testOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/outerLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/outerLambda.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeLabeledReturnInLambda/unit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeLabeledReturnInLambda/unit.kt"); } } @@ -14012,86 +12676,77 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveRedundantCallsOfConversionMethods extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveRedundantCallsOfConversionMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeRedundantCallsOfConversionMethods"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("booleanToInt.kt") public void testBooleanToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/booleanToInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/booleanToInt.kt"); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/byte.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/char.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/char.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/double.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/float.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/float.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/int.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/long.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/long.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/nullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/nullable.kt"); } @TestMetadata("safeString.kt") public void testSafeString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/safeString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/safeString.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/short.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/short.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/string.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/string.kt"); } @TestMetadata("toOtherType.kt") public void testToOtherType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/toOtherType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/toOtherType.kt"); } @TestMetadata("variable.kt") public void testVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeRedundantCallsOfConversionMethods/variable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeRedundantCallsOfConversionMethods/variable.kt"); } } @@ -14099,50 +12754,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveSingleExpressionStringTemplate extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveSingleExpressionStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeSingleExpressionStringTemplate"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("emptyString.kt") public void testEmptyString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/emptyString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/emptyString.kt"); } @TestMetadata("justString.kt") public void testJustString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/justString.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/justString.kt"); } @TestMetadata("multipleStringTemplate.kt") public void testMultipleStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/multipleStringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/multipleStringTemplate.kt"); } @TestMetadata("singleExpressionStringTemplate.kt") public void testSingleExpressionStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/singleExpressionStringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/singleExpressionStringTemplate.kt"); } @TestMetadata("singleExpressionStringTemplateWithMethodCall.kt") public void testSingleExpressionStringTemplateWithMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/singleExpressionStringTemplateWithMethodCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/singleExpressionStringTemplateWithMethodCall.kt"); } @TestMetadata("singleExpressionStringTemplateWithNonStringType.kt") public void testSingleExpressionStringTemplateWithNonStringType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/singleExpressionStringTemplateWithNonStringType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/singleExpressionStringTemplateWithNonStringType.kt"); } @TestMetadata("stringTemplateWithText.kt") public void testStringTemplateWithText() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeSingleExpressionStringTemplate/stringTemplateWithText.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeSingleExpressionStringTemplate/stringTemplateWithText.kt"); } } @@ -14150,104 +12802,92 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnnecessaryParentheses extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveUnnecessaryParentheses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/removeUnnecessaryParentheses"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callInsideCallWithLambdaOnly.kt") public void testCallInsideCallWithLambdaOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/callInsideCallWithLambdaOnly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/callInsideCallWithLambdaOnly.kt"); } @TestMetadata("elvisRhs.kt") public void testElvisRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/elvisRhs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/elvisRhs.kt"); } @TestMetadata("elvisRhsEmptyReturn.kt") public void testElvisRhsEmptyReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/elvisRhsEmptyReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/elvisRhsEmptyReturn.kt"); } @TestMetadata("necessaryParentheses1.kt") public void testNecessaryParentheses1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses1.kt"); } @TestMetadata("necessaryParentheses2.kt") public void testNecessaryParentheses2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses2.kt"); } @TestMetadata("necessaryParentheses3.kt") public void testNecessaryParentheses3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses3.kt"); } @TestMetadata("necessaryParentheses4.kt") public void testNecessaryParentheses4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses4.kt"); } @TestMetadata("necessaryParentheses5.kt") public void testNecessaryParentheses5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/necessaryParentheses5.kt"); } @TestMetadata("unnecessaryParentheses1.kt") public void testUnnecessaryParentheses1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses1.kt"); } @TestMetadata("unnecessaryParentheses2.kt") public void testUnnecessaryParentheses2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses2.kt"); } @TestMetadata("unnecessaryParentheses3.kt") public void testUnnecessaryParentheses3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses3.kt"); } @TestMetadata("unnecessaryParentheses4.kt") public void testUnnecessaryParentheses4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses4.kt"); } @TestMetadata("unnecessaryParentheses5.kt") public void testUnnecessaryParentheses5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses5.kt"); } @TestMetadata("unnecessaryParentheses6.kt") public void testUnnecessaryParentheses6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses6.kt"); } @TestMetadata("unnecessaryParentheses7.kt") public void testUnnecessaryParentheses7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses7.kt"); } @TestMetadata("unnecessaryParentheses8.kt") public void testUnnecessaryParentheses8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses8.kt"); - doTest(fileName); + runTest("idea/testData/intentions/removeUnnecessaryParentheses/unnecessaryParentheses8.kt"); } } @@ -14255,46 +12895,43 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceAddWithPlusAssign extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("add.kt") public void testAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/add.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/add.kt"); } @TestMetadata("addAll.kt") public void testAddAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/addAll.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/addAll.kt"); } @TestMetadata("addAllAtIndex.kt") public void testAddAllAtIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/addAllAtIndex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/addAllAtIndex.kt"); } @TestMetadata("addAllToVar.kt") public void testAddAllToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/addAllToVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/addAllToVar.kt"); } @TestMetadata("addAtIndex.kt") public void testAddAtIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/addAtIndex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/addAtIndex.kt"); } @TestMetadata("addGeneric.kt") public void testAddGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/addGeneric.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/addGeneric.kt"); } @TestMetadata("addToVar.kt") public void testAddToVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/addToVar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/addToVar.kt"); } public void testAllFilesPresentInReplaceAddWithPlusAssign() throws Exception { @@ -14303,8 +12940,7 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("nonCollection.kt") public void testNonCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceAddWithPlusAssign/nonCollection.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceAddWithPlusAssign/nonCollection.kt"); } } @@ -14312,92 +12948,82 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceExplicitFunctionLiteralParamWithIt extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceExplicitFunctionLiteralParamWithIt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("applicable_cursofOverParamInInnerLiteral.kt") public void testApplicable_cursofOverParamInInnerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_cursofOverParamInInnerLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_cursofOverParamInInnerLiteral.kt"); } @TestMetadata("applicable_cursorOverParameterDeclaration.kt") public void testApplicable_cursorOverParameterDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_cursorOverParameterDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_cursorOverParameterDeclaration.kt"); } @TestMetadata("applicable_cursorOverParameterUse.kt") public void testApplicable_cursorOverParameterUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_cursorOverParameterUse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_cursorOverParameterUse.kt"); } @TestMetadata("applicable_formatsProperly.kt") public void testApplicable_formatsProperly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_formatsProperly.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_formatsProperly.kt"); } @TestMetadata("applicable_nestedLiteralsNoUseInside.kt") public void testApplicable_nestedLiteralsNoUseInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_nestedLiteralsNoUseInside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/applicable_nestedLiteralsNoUseInside.kt"); } @TestMetadata("notApplicable_alreadyUsesImplicitIt.kt") public void testNotApplicable_alreadyUsesImplicitIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_alreadyUsesImplicitIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_alreadyUsesImplicitIt.kt"); } @TestMetadata("notApplicable_hasDestructuringDeclaration.kt") public void testNotApplicable_hasDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_hasDestructuringDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_hasDestructuringDeclaration.kt"); } @TestMetadata("notApplicable_hasMultipleParameters.kt") public void testNotApplicable_hasMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_hasMultipleParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_hasMultipleParameters.kt"); } @TestMetadata("notApplicable_itFromOuterLambda.kt") public void testNotApplicable_itFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_itFromOuterLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_itFromOuterLambda.kt"); } @TestMetadata("notApplicable_nestedLiterals.kt") public void testNotApplicable_nestedLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_nestedLiterals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_nestedLiterals.kt"); } @TestMetadata("notApplicable_nestedLiteralsNoIt.kt") public void testNotApplicable_nestedLiteralsNoIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_nestedLiteralsNoIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_nestedLiteralsNoIt.kt"); } @TestMetadata("notApplicable_notFunctionLiteralParameter.kt") public void testNotApplicable_notFunctionLiteralParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_notFunctionLiteralParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_notFunctionLiteralParameter.kt"); } @TestMetadata("notApplicable_parameterHasExplicitType.kt") public void testNotApplicable_parameterHasExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_parameterHasExplicitType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_parameterHasExplicitType.kt"); } @TestMetadata("notApplicable_wrongPosition.kt") public void testNotApplicable_wrongPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_wrongPosition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceExplicitFunctionLiteralParamWithIt/notApplicable_wrongPosition.kt"); } } @@ -14405,38 +13031,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceItWithExplicitFunctionLiteralParam extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceItWithExplicitFunctionLiteralParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("applicable.kt") public void testApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/applicable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/applicable.kt"); } @TestMetadata("applicable_nestedFunctionLiterals.kt") public void testApplicable_nestedFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/applicable_nestedFunctionLiterals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/applicable_nestedFunctionLiterals.kt"); } @TestMetadata("applicable_nestedFunctionWithIt.kt") public void testApplicable_nestedFunctionWithIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/applicable_nestedFunctionWithIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/applicable_nestedFunctionWithIt.kt"); } @TestMetadata("notApplicable_localVariableIt.kt") public void testNotApplicable_localVariableIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/notApplicable_localVariableIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/notApplicable_localVariableIt.kt"); } @TestMetadata("notApplicable_parameterExplicitlyNamedIt.kt") public void testNotApplicable_parameterExplicitlyNamedIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/notApplicable_parameterExplicitlyNamedIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceItWithExplicitFunctionLiteralParam/notApplicable_parameterExplicitlyNamedIt.kt"); } } @@ -14444,62 +13069,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceMathMaxWithCoerceAtLeast extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceMathMaxWithCoerceAtLeast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("customMaxMethod.kt") public void testCustomMaxMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/customMaxMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/customMaxMethod.kt"); } @TestMetadata("doubles.kt") public void testDoubles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/doubles.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/doubles.kt"); } @TestMetadata("KT-19232-1.kt") public void testKT_19232_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/KT-19232-1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/KT-19232-1.kt"); } @TestMetadata("KT-19232-2.kt") public void testKT_19232_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/KT-19232-2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/KT-19232-2.kt"); } @TestMetadata("maxInMax.kt") public void testMaxInMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/maxInMax.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/maxInMax.kt"); } @TestMetadata("moreThan2ValueArg.kt") public void testMoreThan2ValueArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/moreThan2ValueArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/moreThan2ValueArg.kt"); } @TestMetadata("noImport.kt") public void testNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/noImport.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/noImport.kt"); } @TestMetadata("oneValueArg.kt") public void testOneValueArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/oneValueArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/oneValueArg.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMaxWithCoerceAtLeast/simple.kt"); } } @@ -14507,56 +13127,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceMathMinWithCoerceAtMost extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceMathMinWithCoerceAtMost() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceMathMinWithCoerceAtMost"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("customMinMethod.kt") public void testCustomMinMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/customMinMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/customMinMethod.kt"); } @TestMetadata("doubles.kt") public void testDoubles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/doubles.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/doubles.kt"); } @TestMetadata("KT-19232-1.kt") public void testKT_19232_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/KT-19232-1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/KT-19232-1.kt"); } @TestMetadata("KT-19232-2.kt") public void testKT_19232_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/KT-19232-2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/KT-19232-2.kt"); } @TestMetadata("moreThan2ValueArg.kt") public void testMoreThan2ValueArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/moreThan2ValueArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/moreThan2ValueArg.kt"); } @TestMetadata("noImport.kt") public void testNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/noImport.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/noImport.kt"); } @TestMetadata("oneValueArg.kt") public void testOneValueArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/oneValueArg.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/oneValueArg.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceMathMinWithCoerceAtMost/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceMathMinWithCoerceAtMost/simple.kt"); } } @@ -14564,260 +13180,222 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSingleLineLetIntention extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSingleLineLetIntention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSingleLineLetIntention"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/assignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/assignment.kt"); } @TestMetadata("binarySafeCall.kt") public void testBinarySafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/binarySafeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/binarySafeCall.kt"); } @TestMetadata("comparisons.kt") public void testComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/comparisons.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/comparisons.kt"); } @TestMetadata("dotWithComparison.kt") public void testDotWithComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/dotWithComparison.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/dotWithComparison.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/in.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/in.kt"); } @TestMetadata("inWithMultipleParam.kt") public void testInWithMultipleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/inWithMultipleParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/inWithMultipleParam.kt"); } @TestMetadata("inWithRange.kt") public void testInWithRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/inWithRange.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/inWithRange.kt"); } @TestMetadata("inWithRangeMultipleParam.kt") public void testInWithRangeMultipleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/inWithRangeMultipleParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/inWithRangeMultipleParam.kt"); } @TestMetadata("lambdaWithBinaryExpression.kt") public void testLambdaWithBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/lambdaWithBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/lambdaWithBinaryExpression.kt"); } @TestMetadata("lambdaWithBinaryExpression2.kt") public void testLambdaWithBinaryExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/lambdaWithBinaryExpression2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/lambdaWithBinaryExpression2.kt"); } @TestMetadata("let.kt") public void testLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/let.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/let.kt"); } @TestMetadata("letMultipleLines.kt") public void testLetMultipleLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letMultipleLines.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letMultipleLines.kt"); } @TestMetadata("letNoSafeCall.kt") public void testLetNoSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letNoSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letNoSafeCall.kt"); } @TestMetadata("letNotUseParameterReceiver.kt") public void testLetNotUseParameterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letNotUseParameterReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letNotUseParameterReceiver.kt"); } @TestMetadata("letNotUseReceiver.kt") public void testLetNotUseReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letNotUseReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letNotUseReceiver.kt"); } @TestMetadata("letUseIt.kt") public void testLetUseIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseIt.kt"); } @TestMetadata("letUseItAsParamWithBinaryExpression.kt") public void testLetUseItAsParamWithBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseItAsParamWithBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseItAsParamWithBinaryExpression.kt"); } @TestMetadata("letUseItWithBinaryExpression.kt") public void testLetUseItWithBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithBinaryExpression.kt"); } @TestMetadata("letUseItWithBinaryExpression2.kt") public void testLetUseItWithBinaryExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithBinaryExpression2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithBinaryExpression2.kt"); } @TestMetadata("letUseItWithMultipleMethodCall1.kt") public void testLetUseItWithMultipleMethodCall1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithMultipleMethodCall1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithMultipleMethodCall1.kt"); } @TestMetadata("letUseItWithMultipleMethodCall2.kt") public void testLetUseItWithMultipleMethodCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithMultipleMethodCall2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithMultipleMethodCall2.kt"); } @TestMetadata("letUseItWithMultipleMethodCall3.kt") public void testLetUseItWithMultipleMethodCall3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithMultipleMethodCall3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseItWithMultipleMethodCall3.kt"); } @TestMetadata("letUseParameter.kt") public void testLetUseParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letUseParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letUseParameter.kt"); } @TestMetadata("letWithBinaryExpression.kt") public void testLetWithBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithBinaryExpression.kt"); } @TestMetadata("letWithMethodCall.kt") public void testLetWithMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithMethodCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithMethodCall.kt"); } @TestMetadata("letWithMultipleMethodCall.kt") public void testLetWithMultipleMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithMultipleMethodCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithMultipleMethodCall.kt"); } @TestMetadata("letWithParameter.kt") public void testLetWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithParameter.kt"); } @TestMetadata("letWithSimpleBinaryExpression.kt") public void testLetWithSimpleBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithSimpleBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithSimpleBinaryExpression.kt"); } @TestMetadata("letWithThisBinaryExpression.kt") public void testLetWithThisBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithThisBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithThisBinaryExpression.kt"); } @TestMetadata("letWithThisShortBinaryExpression.kt") public void testLetWithThisShortBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/letWithThisShortBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/letWithThisShortBinaryExpression.kt"); } @TestMetadata("multipleReceiver.kt") public void testMultipleReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/multipleReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/multipleReceiver.kt"); } @TestMetadata("multipleReceiver2.kt") public void testMultipleReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/multipleReceiver2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/multipleReceiver2.kt"); } @TestMetadata("multipleReceiver3.kt") public void testMultipleReceiver3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/multipleReceiver3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/multipleReceiver3.kt"); } @TestMetadata("multipleUsages.kt") public void testMultipleUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/multipleUsages.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/multipleUsages.kt"); } @TestMetadata("plusNullable.kt") public void testPlusNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/plusNullable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/plusNullable.kt"); } @TestMetadata("receiverWithLambda.kt") public void testReceiverWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/receiverWithLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/receiverWithLambda.kt"); } @TestMetadata("receiverWithLambda2.kt") public void testReceiverWithLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/receiverWithLambda2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/receiverWithLambda2.kt"); } @TestMetadata("sameLets.kt") public void testSameLets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/sameLets.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/sameLets.kt"); } @TestMetadata("smartCastInBody.kt") public void testSmartCastInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/smartCastInBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/smartCastInBody.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/this.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/this.kt"); } @TestMetadata("thisShort.kt") public void testThisShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/thisShort.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/thisShort.kt"); } @TestMetadata("typeChecks.kt") public void testTypeChecks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSingleLineLetIntention/typeChecks.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSingleLineLetIntention/typeChecks.kt"); } } @@ -14825,110 +13403,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSizeCheckWithIsNotEmpty extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSizeCheckWithIsNotEmpty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/array.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/array.kt"); } @TestMetadata("array2.kt") public void testArray2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/array2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/array2.kt"); } @TestMetadata("collection.kt") public void testCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/collection.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/collection.kt"); } @TestMetadata("gt.kt") public void testGt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/gt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/gt.kt"); } @TestMetadata("gteq.kt") public void testGteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/gteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/gteq.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/list.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/list.kt"); } @TestMetadata("list2.kt") public void testList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/list2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/list2.kt"); } @TestMetadata("lt.kt") public void testLt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/lt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/lt.kt"); } @TestMetadata("lteq.kt") public void testLteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/lteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/lteq.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/map.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/map.kt"); } @TestMetadata("oppositeSign.kt") public void testOppositeSign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/oppositeSign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/oppositeSign.kt"); } @TestMetadata("oppositeSign2.kt") public void testOppositeSign2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/oppositeSign2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/oppositeSign2.kt"); } @TestMetadata("primitiveArray.kt") public void testPrimitiveArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/primitiveArray.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/primitiveArray.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/set.kt"); } @TestMetadata("sizeCheck.kt") public void testSizeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/sizeCheck.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/sizeCheck.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/string.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/string.kt"); } @TestMetadata("string2.kt") public void testString2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/string2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeCheckWithIsNotEmpty/string2.kt"); } } @@ -14936,80 +13501,72 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSizeZeroCheckWithIsEmpty extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSizeZeroCheckWithIsEmpty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/array.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/array.kt"); } @TestMetadata("array2.kt") public void testArray2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/array2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/array2.kt"); } @TestMetadata("gt.kt") public void testGt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/gt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/gt.kt"); } @TestMetadata("gteq.kt") public void testGteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/gteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/gteq.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/list.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/list.kt"); } @TestMetadata("list2.kt") public void testList2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/list2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/list2.kt"); } @TestMetadata("lt.kt") public void testLt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/lt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/lt.kt"); } @TestMetadata("lteq.kt") public void testLteq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/lteq.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/lteq.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/set.kt"); } @TestMetadata("sizeCheck.kt") public void testSizeCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/sizeCheck.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/sizeCheck.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/string.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/string.kt"); } @TestMetadata("string2.kt") public void testString2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/string2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSizeZeroCheckWithIsEmpty/string2.kt"); } } @@ -15017,38 +13574,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSubstringWithDropLast extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSubstringWithDropLast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSubstringWithDropLast"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("immutableProperty.kt") public void testImmutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithDropLast/immutableProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithDropLast/immutableProperty.kt"); } @TestMetadata("methodCallReceiver.kt") public void testMethodCallReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithDropLast/methodCallReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithDropLast/methodCallReceiver.kt"); } @TestMetadata("nonZeroFirstArgument.kt") public void testNonZeroFirstArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithDropLast/nonZeroFirstArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithDropLast/nonZeroFirstArgument.kt"); } @TestMetadata("replaceWithDropLast.kt") public void testReplaceWithDropLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithDropLast/replaceWithDropLast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithDropLast/replaceWithDropLast.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithDropLast/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithDropLast/semicolon.kt"); } } @@ -15056,26 +13612,27 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSubstringWithIndexingOperation extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSubstringWithIndexingOperation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSubstringWithIndexingOperation"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("oneFirstTwoSecondArgument.kt") public void testOneFirstTwoSecondArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithIndexingOperation/oneFirstTwoSecondArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithIndexingOperation/oneFirstTwoSecondArgument.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithIndexingOperation/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithIndexingOperation/simple.kt"); } @TestMetadata("zeroFirstTenSecondArgument.kt") public void testZeroFirstTenSecondArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithIndexingOperation/zeroFirstTenSecondArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithIndexingOperation/zeroFirstTenSecondArgument.kt"); } } @@ -15083,32 +13640,32 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSubstringWithSubstringAfter extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSubstringWithSubstringAfter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSubstringWithSubstringAfter"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("immutableProperty.kt") public void testImmutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringAfter/immutableProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringAfter/immutableProperty.kt"); } @TestMetadata("methodCallReceiver.kt") public void testMethodCallReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringAfter/methodCallReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringAfter/methodCallReceiver.kt"); } @TestMetadata("replaceWithSubstringAfter.kt") public void testReplaceWithSubstringAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringAfter/replaceWithSubstringAfter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringAfter/replaceWithSubstringAfter.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringAfter/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringAfter/semicolon.kt"); } } @@ -15116,38 +13673,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSubstringWithSubstringBefore extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSubstringWithSubstringBefore() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSubstringWithSubstringBefore"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("immutableProperty.kt") public void testImmutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringBefore/immutableProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringBefore/immutableProperty.kt"); } @TestMetadata("methodCallReceiver.kt") public void testMethodCallReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringBefore/methodCallReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringBefore/methodCallReceiver.kt"); } @TestMetadata("nonZeroFirstArgument.kt") public void testNonZeroFirstArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringBefore/nonZeroFirstArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringBefore/nonZeroFirstArgument.kt"); } @TestMetadata("replaceWithSubstringBefore.kt") public void testReplaceWithSubstringBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringBefore/replaceWithSubstringBefore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringBefore/replaceWithSubstringBefore.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithSubstringBefore/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithSubstringBefore/semicolon.kt"); } } @@ -15155,38 +13711,37 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceSubstringWithTake extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceSubstringWithTake() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceSubstringWithTake"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("constantAsFirstArgument.kt") public void testConstantAsFirstArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithTake/constantAsFirstArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithTake/constantAsFirstArgument.kt"); } @TestMetadata("expressionAsFirstArgument.kt") public void testExpressionAsFirstArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithTake/expressionAsFirstArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithTake/expressionAsFirstArgument.kt"); } @TestMetadata("nonZeroFirstArgument.kt") public void testNonZeroFirstArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithTake/nonZeroFirstArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithTake/nonZeroFirstArgument.kt"); } @TestMetadata("replaceWithTake.kt") public void testReplaceWithTake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithTake/replaceWithTake.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithTake/replaceWithTake.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceSubstringWithTake/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceSubstringWithTake/semicolon.kt"); } } @@ -15194,62 +13749,57 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceUnderscoreWithParameterName extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceUnderscoreWithParameterName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceUnderscoreWithParameterName"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymous.kt") public void testAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/anonymous.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/anonymous.kt"); } @TestMetadata("conflict.kt") public void testConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/conflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/conflict.kt"); } @TestMetadata("destructuringDeclaration.kt") public void testDestructuringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/destructuringDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/destructuringDeclaration.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/for.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/for.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/lambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/lambda.kt"); } @TestMetadata("lambdaConflict.kt") public void testLambdaConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/lambdaConflict.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/lambdaConflict.kt"); } @TestMetadata("lambdaNoNames.kt") public void testLambdaNoNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/lambdaNoNames.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/lambdaNoNames.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/map.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/map.kt"); } @TestMetadata("triple.kt") public void testTriple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUnderscoreWithParameterName/triple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUnderscoreWithParameterName/triple.kt"); } } @@ -15257,14 +13807,17 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceUntilWithRangeTo extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceUntilWithRangeTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceUntilWithRangeTo"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceUntilWithRangeTo/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceUntilWithRangeTo/simple.kt"); } } @@ -15272,32 +13825,32 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithOrdinaryAssignment extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceWithOrdinaryAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/replaceWithOrdinaryAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("complexRightExpression.kt") public void testComplexRightExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceWithOrdinaryAssignment/complexRightExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceWithOrdinaryAssignment/complexRightExpression.kt"); } @TestMetadata("nonAssignmentExpression.kt") public void testNonAssignmentExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceWithOrdinaryAssignment/nonAssignmentExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceWithOrdinaryAssignment/nonAssignmentExpression.kt"); } @TestMetadata("nonAugmentedAssign.kt") public void testNonAugmentedAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceWithOrdinaryAssignment/nonAugmentedAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceWithOrdinaryAssignment/nonAugmentedAssign.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/replaceWithOrdinaryAssignment/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/replaceWithOrdinaryAssignment/simple.kt"); } } @@ -15305,206 +13858,177 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyBooleanWithConstants extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimplifyBooleanWithConstants() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/simplifyBooleanWithConstants"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/assert.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/assert.kt"); } @TestMetadata("deeplyParenthesized.kt") public void testDeeplyParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/deeplyParenthesized.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/deeplyParenthesized.kt"); } @TestMetadata("equalsConjunction.kt") public void testEqualsConjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/equalsConjunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/equalsConjunction.kt"); } @TestMetadata("equalsDisjunction.kt") public void testEqualsDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/equalsDisjunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/equalsDisjunction.kt"); } @TestMetadata("equalsFalse.kt") public void testEqualsFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/equalsFalse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/equalsFalse.kt"); } @TestMetadata("equalsTrue.kt") public void testEqualsTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/equalsTrue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/equalsTrue.kt"); } @TestMetadata("equalsTrueOrFalse.kt") public void testEqualsTrueOrFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/equalsTrueOrFalse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/equalsTrueOrFalse.kt"); } @TestMetadata("flexibleBoolean.kt") public void testFlexibleBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/flexibleBoolean.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/flexibleBoolean.kt"); } @TestMetadata("inapplicableNoConstants.kt") public void testInapplicableNoConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableNoConstants.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableNoConstants.kt"); } @TestMetadata("inapplicableNotBinary.kt") public void testInapplicableNotBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableNotBinary.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableNotBinary.kt"); } @TestMetadata("inapplicableUsesVals.kt") public void testInapplicableUsesVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableUsesVals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableUsesVals.kt"); } @TestMetadata("inapplicableUsesVals2.kt") public void testInapplicableUsesVals2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableUsesVals2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableUsesVals2.kt"); } @TestMetadata("inapplicableUsesVals3.kt") public void testInapplicableUsesVals3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableUsesVals3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/inapplicableUsesVals3.kt"); } @TestMetadata("notEqualsFalse.kt") public void testNotEqualsFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/notEqualsFalse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/notEqualsFalse.kt"); } @TestMetadata("notEqualsTrue.kt") public void testNotEqualsTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/notEqualsTrue.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/notEqualsTrue.kt"); } @TestMetadata("nullableBoolean.kt") public void testNullableBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/nullableBoolean.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/nullableBoolean.kt"); } @TestMetadata("nullableComplex.kt") public void testNullableComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/nullableComplex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/nullableComplex.kt"); } @TestMetadata("nullableComplex2.kt") public void testNullableComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/nullableComplex2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/nullableComplex2.kt"); } @TestMetadata("reduceableBinary.kt") public void testReduceableBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinary.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinary.kt"); } @TestMetadata("reduceableBinary2.kt") public void testReduceableBinary2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinary2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinary2.kt"); } @TestMetadata("reduceableBinary3.kt") public void testReduceableBinary3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinary3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinary3.kt"); } @TestMetadata("reduceableBinaryWithParenthese.kt") public void testReduceableBinaryWithParenthese() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinaryWithParenthese.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/reduceableBinaryWithParenthese.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simple.kt"); } @TestMetadata("simpleWithMoreBinaries.kt") public void testSimpleWithMoreBinaries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinaries.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinaries.kt"); } @TestMetadata("simpleWithMoreBinaries2.kt") public void testSimpleWithMoreBinaries2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinaries2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinaries2.kt"); } @TestMetadata("simpleWithMoreBinaries3.kt") public void testSimpleWithMoreBinaries3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinaries3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinaries3.kt"); } @TestMetadata("simpleWithMoreBinariesAndParentheses.kt") public void testSimpleWithMoreBinariesAndParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinariesAndParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinariesAndParentheses.kt"); } @TestMetadata("simpleWithMoreBinariesAndParentheses2.kt") public void testSimpleWithMoreBinariesAndParentheses2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinariesAndParentheses2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinariesAndParentheses2.kt"); } @TestMetadata("simpleWithMoreBinariesAndParentheses3.kt") public void testSimpleWithMoreBinariesAndParentheses3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinariesAndParentheses3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithMoreBinariesAndParentheses3.kt"); } @TestMetadata("simpleWithNonsensical2.kt") public void testSimpleWithNonsensical2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithNonsensical2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithNonsensical2.kt"); } @TestMetadata("simpleWithParentheses.kt") public void testSimpleWithParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithParentheses.kt"); } @TestMetadata("simpleWithParentheses2.kt") public void testSimpleWithParentheses2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithParentheses2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/simpleWithParentheses2.kt"); } @TestMetadata("withAnnotation.kt") public void testWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/simplifyBooleanWithConstants/withAnnotation.kt"); } } @@ -15512,110 +14036,97 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecifyExplicitLambdaSignature extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecifyExplicitLambdaSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyExplicitLambdaSignature"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymous.kt") public void testAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/anonymous.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/anonymous.kt"); } @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/coercionToUnit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/coercionToUnit.kt"); } @TestMetadata("cursorOnRightBrace.kt") public void testCursorOnRightBrace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/cursorOnRightBrace.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/cursorOnRightBrace.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/delegate.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/delegate.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/destructuring.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/destructuring.kt"); } @TestMetadata("emptyParamListWithBrackets.kt") public void testEmptyParamListWithBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithBrackets.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithBrackets.kt"); } @TestMetadata("emptyParamListWithIt.kt") public void testEmptyParamListWithIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithIt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithIt.kt"); } @TestMetadata("emptyParamListWithWhiteSpace.kt") public void testEmptyParamListWithWhiteSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithWhiteSpace.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithWhiteSpace.kt"); } @TestMetadata("emptyParamListWithoutItWithArrow.kt") public void testEmptyParamListWithoutItWithArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithoutItWithArrow.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/emptyParamListWithoutItWithArrow.kt"); } @TestMetadata("lambdaWithLambdaAsParam.kt") public void testLambdaWithLambdaAsParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/lambdaWithLambdaAsParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/lambdaWithLambdaAsParam.kt"); } @TestMetadata("manyNewlines.kt") public void testManyNewlines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/manyNewlines.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/manyNewlines.kt"); } @TestMetadata("multipleParam.kt") public void testMultipleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/multipleParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/multipleParam.kt"); } @TestMetadata("noParameters.kt") public void testNoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/noParameters.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/noParameters.kt"); } @TestMetadata("shortenReferencesForParams.kt") public void testShortenReferencesForParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/shortenReferencesForParams.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/shortenReferencesForParams.kt"); } @TestMetadata("singleParam.kt") public void testSingleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/singleParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/singleParam.kt"); } @TestMetadata("typesAlreadyExplicit.kt") public void testTypesAlreadyExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/typesAlreadyExplicit.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/typesAlreadyExplicit.kt"); } @TestMetadata("typesNotInferable.kt") public void testTypesNotInferable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyExplicitLambdaSignature/typesNotInferable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyExplicitLambdaSignature/typesNotInferable.kt"); } } @@ -15623,140 +14134,122 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecifyTypeExplicitly extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecifyTypeExplicitly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyTypeExplicitly"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/anonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/anonymousObject.kt"); } @TestMetadata("badCaretPosition.kt") public void testBadCaretPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/badCaretPosition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/badCaretPosition.kt"); } @TestMetadata("classNameClashing.kt") public void testClassNameClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/classNameClashing.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/classNameClashing.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/constructor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/constructor.kt"); } @TestMetadata("destructuringInLambda.kt") public void testDestructuringInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/destructuringInLambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/destructuringInLambda.kt"); } @TestMetadata("enumType.kt") public void testEnumType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/enumType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/enumType.kt"); } @TestMetadata("forAsExpression.kt") public void testForAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/forAsExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/forAsExpression.kt"); } @TestMetadata("functionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/functionType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/functionType.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/genericClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/genericClass.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/genericFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/genericFunction.kt"); } @TestMetadata("lambdaParam.kt") public void testLambdaParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/lambdaParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/lambdaParam.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/localClass.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/localClass.kt"); } @TestMetadata("loopParameter.kt") public void testLoopParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/loopParameter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/loopParameter.kt"); } @TestMetadata("overrideNotNullFunction.kt") public void testOverrideNotNullFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/overrideNotNullFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/overrideNotNullFunction.kt"); } @TestMetadata("overrideNotNullProperty.kt") public void testOverrideNotNullProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/overrideNotNullProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/overrideNotNullProperty.kt"); } @TestMetadata("overrideNullableFunction.kt") public void testOverrideNullableFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/overrideNullableFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/overrideNullableFunction.kt"); } @TestMetadata("overrideNullableProperty.kt") public void testOverrideNullableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/overrideNullableProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/overrideNullableProperty.kt"); } @TestMetadata("propertyTypeFromGetter.kt") public void testPropertyTypeFromGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/propertyTypeFromGetter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/propertyTypeFromGetter.kt"); } @TestMetadata("publicMember.kt") public void testPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/publicMember.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/publicMember.kt"); } @TestMetadata("stringRedefined.kt") public void testStringRedefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/stringRedefined.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/stringRedefined.kt"); } @TestMetadata("typeAlreadyProvided.kt") public void testTypeAlreadyProvided() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/typeAlreadyProvided.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/typeAlreadyProvided.kt"); } @TestMetadata("unitType.kt") public void testUnitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitly/unitType.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitly/unitType.kt"); } } @@ -15764,50 +14257,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecifyTypeExplicitlyInDestructuringAssignment extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecifyTypeExplicitlyInDestructuringAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/in.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/in.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/lambda.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/lambda.kt"); } @TestMetadata("lambdaHasSignature.kt") public void testLambdaHasSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/lambdaHasSignature.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/lambdaHasSignature.kt"); } @TestMetadata("variableHasAllTypes.kt") public void testVariableHasAllTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasAllTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasAllTypes.kt"); } @TestMetadata("variableHasNoTypes.kt") public void testVariableHasNoTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasNoTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasNoTypes.kt"); } @TestMetadata("variableHasTypes.kt") public void testVariableHasTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasTypes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasTypes.kt"); } @TestMetadata("variableHasUnderscore.kt") public void testVariableHasUnderscore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasUnderscore.kt"); - doTest(fileName); + runTest("idea/testData/intentions/specifyTypeExplicitlyInDestructuringAssignment/variableHasUnderscore.kt"); } } @@ -15815,190 +14305,169 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SplitIf extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSplitIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/splitIf"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("and.kt") public void testAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/and.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/and.kt"); } @TestMetadata("caretOnIf.kt") public void testCaretOnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/caretOnIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/caretOnIf.kt"); } @TestMetadata("ifAndOr.kt") public void testIfAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/ifAndOr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/ifAndOr.kt"); } @TestMetadata("ifAndOrWithBraces.kt") public void testIfAndOrWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/ifAndOrWithBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/ifAndOrWithBraces.kt"); } @TestMetadata("ifAndWithBraces.kt") public void testIfAndWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/ifAndWithBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/ifAndWithBraces.kt"); } @TestMetadata("ifOrReturn.kt") public void testIfOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/ifOrReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/ifOrReturn.kt"); } @TestMetadata("ifWithElse.kt") public void testIfWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/ifWithElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/ifWithElse.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/localFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/localFunction.kt"); } @TestMetadata("nestedIf.kt") public void testNestedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/nestedIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/nestedIf.kt"); } @TestMetadata("nestedIfNotApplicable.kt") public void testNestedIfNotApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/nestedIfNotApplicable.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/nestedIfNotApplicable.kt"); } @TestMetadata("nestedIfOutside.kt") public void testNestedIfOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/nestedIfOutside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/nestedIfOutside.kt"); } @TestMetadata("nestedInside.kt") public void testNestedInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/nestedInside.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/nestedInside.kt"); } @TestMetadata("notIf.kt") public void testNotIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/notIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/notIf.kt"); } @TestMetadata("onIfWithOr.kt") public void testOnIfWithOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/onIfWithOr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/onIfWithOr.kt"); } @TestMetadata("operatorAsFunctionParam.kt") public void testOperatorAsFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/operatorAsFunctionParam.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/operatorAsFunctionParam.kt"); } @TestMetadata("operatorOutsideIf.kt") public void testOperatorOutsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/operatorOutsideIf.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/operatorOutsideIf.kt"); } @TestMetadata("orAnd.kt") public void testOrAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/orAnd.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/orAnd.kt"); } @TestMetadata("orWithBraces.kt") public void testOrWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/orWithBraces.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/orWithBraces.kt"); } @TestMetadata("twoOperatorsFirst.kt") public void testTwoOperatorsFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/twoOperatorsFirst.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/twoOperatorsFirst.kt"); } @TestMetadata("twoOperatorsSecond.kt") public void testTwoOperatorsSecond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/twoOperatorsSecond.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/twoOperatorsSecond.kt"); } @TestMetadata("withNotOperator.kt") public void testWithNotOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/withNotOperator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/withNotOperator.kt"); } @TestMetadata("withNotOperatorGood.kt") public void testWithNotOperatorGood() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/withNotOperatorGood.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/withNotOperatorGood.kt"); } @TestMetadata("withOR.kt") public void testWithOR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/withOR.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/withOR.kt"); } @TestMetadata("withORElse.kt") public void testWithORElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/withORElse.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/withORElse.kt"); } @TestMetadata("wrongCaretLocation.kt") public void testWrongCaretLocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/wrongCaretLocation.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/wrongCaretLocation.kt"); } @TestMetadata("idea/testData/intentions/splitIf/keepComments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KeepComments extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKeepComments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/splitIf/keepComments"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ifOrReturn.kt") public void testIfOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/keepComments/ifOrReturn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/keepComments/ifOrReturn.kt"); } @TestMetadata("twoOperators.kt") public void testTwoOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/keepComments/twoOperators.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/keepComments/twoOperators.kt"); } @TestMetadata("withAnd.kt") public void testWithAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/keepComments/withAnd.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/keepComments/withAnd.kt"); } @TestMetadata("withOR.kt") public void testWithOR() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/splitIf/keepComments/withOR.kt"); - doTest(fileName); + runTest("idea/testData/intentions/splitIf/keepComments/withOR.kt"); } } } @@ -16007,266 +14476,227 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SwapBinaryExpression extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSwapBinaryExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/swapBinaryExpression"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/assignment.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/assignment.kt"); } @TestMetadata("conjunction.kt") public void testConjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/conjunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/conjunction.kt"); } @TestMetadata("conjunctionLiteral.kt") public void testConjunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/conjunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/conjunctionLiteral.kt"); } @TestMetadata("disjunction.kt") public void testDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/disjunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/disjunction.kt"); } @TestMetadata("disjunctionLiteral.kt") public void testDisjunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/disjunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/disjunctionLiteral.kt"); } @TestMetadata("divide.kt") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/divide.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/divide.kt"); } @TestMetadata("divideAssign.kt") public void testDivideAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/divideAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/divideAssign.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/equals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/equals.kt"); } @TestMetadata("greaterThan.kt") public void testGreaterThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/greaterThan.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/greaterThan.kt"); } @TestMetadata("greaterThanEquals.kt") public void testGreaterThanEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/greaterThanEquals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/greaterThanEquals.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/identityEquals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/identityEquals.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/in.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/in.kt"); } @TestMetadata("infixFunction.kt") public void testInfixFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/infixFunction.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/infixFunction.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/is.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/is.kt"); } @TestMetadata("lessThan.kt") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/lessThan.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/lessThan.kt"); } @TestMetadata("lessThanEquals.kt") public void testLessThanEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/lessThanEquals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/lessThanEquals.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/minus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/minus.kt"); } @TestMetadata("minusAssign.kt") public void testMinusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/minusAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/minusAssign.kt"); } @TestMetadata("multipleOperands.kt") public void testMultipleOperands() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperands.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperands.kt"); } @TestMetadata("multipleOperandsWithDifferentPrecedence.kt") public void testMultipleOperandsWithDifferentPrecedence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence.kt"); } @TestMetadata("multipleOperandsWithDifferentPrecedence2.kt") public void testMultipleOperandsWithDifferentPrecedence2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence2.kt"); } @TestMetadata("multipleOperandsWithDifferentPrecedence3.kt") public void testMultipleOperandsWithDifferentPrecedence3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence3.kt"); } @TestMetadata("multipleOperandsWithDifferentPrecedence4.kt") public void testMultipleOperandsWithDifferentPrecedence4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence4.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence4.kt"); } @TestMetadata("multipleOperandsWithDifferentPrecedence5.kt") public void testMultipleOperandsWithDifferentPrecedence5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence5.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence5.kt"); } @TestMetadata("multipleOperandsWithDifferentPrecedence6.kt") public void testMultipleOperandsWithDifferentPrecedence6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence6.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multipleOperandsWithDifferentPrecedence6.kt"); } @TestMetadata("multiply.kt") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multiply.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multiply.kt"); } @TestMetadata("multiplyAssign.kt") public void testMultiplyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/multiplyAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/multiplyAssign.kt"); } @TestMetadata("nonBinaryExpr.kt") public void testNonBinaryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/nonBinaryExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/nonBinaryExpr.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/notEquals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/notEquals.kt"); } @TestMetadata("notIdentityEquals.kt") public void testNotIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/notIdentityEquals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/notIdentityEquals.kt"); } @TestMetadata("notIn.kt") public void testNotIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/notIn.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/notIn.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/notIs.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/notIs.kt"); } @TestMetadata("nullOperand.kt") public void testNullOperand() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/nullOperand.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/nullOperand.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/plus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/plus.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/plusAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/plusAssign.kt"); } @TestMetadata("plusInt.kt") public void testPlusInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/plusInt.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/plusInt.kt"); } @TestMetadata("plusMinus.kt") public void testPlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/plusMinus.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/plusMinus.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/rangeTo.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/rangeTo.kt"); } @TestMetadata("remainder.kt") public void testRemainder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/remainder.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/remainder.kt"); } @TestMetadata("remainderAssign.kt") public void testRemainderAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/remainderAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/remainderAssign.kt"); } @TestMetadata("times.kt") public void testTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/times.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/times.kt"); } @TestMetadata("timesAssign.kt") public void testTimesAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/timesAssign.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/timesAssign.kt"); } @TestMetadata("xor.kt") public void testXor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapBinaryExpression/xor.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapBinaryExpression/xor.kt"); } } @@ -16274,20 +14704,22 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SwapStringEqualsIgnoreCase extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSwapStringEqualsIgnoreCase() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/swapStringEqualsIgnoreCase"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapStringEqualsIgnoreCase/equals.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapStringEqualsIgnoreCase/equals.kt"); } @TestMetadata("equalsIgnoreCase.kt") public void testEqualsIgnoreCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/swapStringEqualsIgnoreCase/equalsIgnoreCase.kt"); - doTest(fileName); + runTest("idea/testData/intentions/swapStringEqualsIgnoreCase/equalsIgnoreCase.kt"); } } @@ -16295,128 +14727,112 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToInfixCall extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToInfixCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/toInfixCall"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("binaryExpressionArgument.kt") public void testBinaryExpressionArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/binaryExpressionArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/binaryExpressionArgument.kt"); } @TestMetadata("caretInsideCalleeExpr.kt") public void testCaretInsideCalleeExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/caretInsideCalleeExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/caretInsideCalleeExpr.kt"); } @TestMetadata("caretInsideReceiverExpr.kt") public void testCaretInsideReceiverExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/caretInsideReceiverExpr.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/caretInsideReceiverExpr.kt"); } @TestMetadata("doubleFunctionCall.kt") public void testDoubleFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/doubleFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/doubleFunctionCall.kt"); } @TestMetadata("doubleFunctionCallWithoutParentheses.kt") public void testDoubleFunctionCallWithoutParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/doubleFunctionCallWithoutParentheses.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/doubleFunctionCallWithoutParentheses.kt"); } @TestMetadata("functionLiteralArgument.kt") public void testFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/functionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/functionLiteralArgument.kt"); } @TestMetadata("functionSafeCall.kt") public void testFunctionSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/functionSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/functionSafeCall.kt"); } @TestMetadata("inapplicableCaretPosition.kt") public void testInapplicableCaretPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/inapplicableCaretPosition.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/inapplicableCaretPosition.kt"); } @TestMetadata("multipleArguments.kt") public void testMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/multipleArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/multipleArguments.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/namedArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/namedArgument.kt"); } @TestMetadata("noExplicitReceiver.kt") public void testNoExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/noExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/noExplicitReceiver.kt"); } @TestMetadata("notInfix.kt") public void testNotInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/notInfix.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/notInfix.kt"); } @TestMetadata("nullAssertedReceiver.kt") public void testNullAssertedReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/nullAssertedReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/nullAssertedReceiver.kt"); } @TestMetadata("packageFunctionCall.kt") public void testPackageFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/packageFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/packageFunctionCall.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/propertyAccess.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/propertyAccess.kt"); } @TestMetadata("secondParameterLabeled.kt") public void testSecondParameterLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/secondParameterLabeled.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/secondParameterLabeled.kt"); } @TestMetadata("simpleArgumentAndFunctionLiteralArgument.kt") public void testSimpleArgumentAndFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/simpleArgumentAndFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/simpleArgumentAndFunctionLiteralArgument.kt"); } @TestMetadata("simpleMethodCall.kt") public void testSimpleMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/simpleMethodCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/simpleMethodCall.kt"); } @TestMetadata("singlePackageFunctionCall.kt") public void testSinglePackageFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/singlePackageFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/singlePackageFunctionCall.kt"); } @TestMetadata("zeroArguments.kt") public void testZeroArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toInfixCall/zeroArguments.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toInfixCall/zeroArguments.kt"); } } @@ -16424,26 +14840,27 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToOrdinaryStringLiteral extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToOrdinaryStringLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/toOrdinaryStringLiteral"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("lineBreakInExpression.kt") public void testLineBreakInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toOrdinaryStringLiteral/lineBreakInExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toOrdinaryStringLiteral/lineBreakInExpression.kt"); } @TestMetadata("quotesAndSlashes.kt") public void testQuotesAndSlashes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toOrdinaryStringLiteral/quotesAndSlashes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toOrdinaryStringLiteral/quotesAndSlashes.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toOrdinaryStringLiteral/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toOrdinaryStringLiteral/simple.kt"); } } @@ -16451,10 +14868,13 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToRawStringLiteral extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("3quotes.kt") public void test3quotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/3quotes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/3quotes.kt"); } public void testAllFilesPresentInToRawStringLiteral() throws Exception { @@ -16463,62 +14883,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("alreadyRaw.kt") public void testAlreadyRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/alreadyRaw.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/alreadyRaw.kt"); } @TestMetadata("dollar.kt") public void testDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/dollar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/dollar.kt"); } @TestMetadata("dollar2.kt") public void testDollar2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/dollar2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/dollar2.kt"); } @TestMetadata("quotesAndSlashes.kt") public void testQuotesAndSlashes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/quotesAndSlashes.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/quotesAndSlashes.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/simple.kt"); } @TestMetadata("specialChar.kt") public void testSpecialChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/specialChar.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/specialChar.kt"); } @TestMetadata("tabCharacter.kt") public void testTabCharacter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/tabCharacter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/tabCharacter.kt"); } @TestMetadata("trailingSpace.kt") public void testTrailingSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/trailingSpace.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/trailingSpace.kt"); } @TestMetadata("trailingSpace2.kt") public void testTrailingSpace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/trailingSpace2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/trailingSpace2.kt"); } @TestMetadata("trailingSpace3.kt") public void testTrailingSpace3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/toRawStringLiteral/trailingSpace3.kt"); - doTest(fileName); + runTest("idea/testData/intentions/toRawStringLiteral/trailingSpace3.kt"); } } @@ -16526,16 +14936,18 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UsePropertyAccessSyntax extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessThroughKotlinClassInstance.kt") public void testAccessThroughKotlinClassInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/accessThroughKotlinClassInstance.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/accessThroughKotlinClassInstance.kt"); } @TestMetadata("accessThroughKotlinClassInstanceWithOverride.kt") public void testAccessThroughKotlinClassInstanceWithOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/accessThroughKotlinClassInstanceWithOverride.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/accessThroughKotlinClassInstanceWithOverride.kt"); } public void testAllFilesPresentInUsePropertyAccessSyntax() throws Exception { @@ -16544,134 +14956,112 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestMetadata("conflict1.kt") public void testConflict1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/conflict1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/conflict1.kt"); } @TestMetadata("conflict2.kt") public void testConflict2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/conflict2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/conflict2.kt"); } @TestMetadata("genericClassMethod.kt") public void testGenericClassMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/genericClassMethod.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/genericClassMethod.kt"); } @TestMetadata("get.kt") public void testGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/get.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/get.kt"); } @TestMetadata("getImplicitReceiver.kt") public void testGetImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/getImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/getImplicitReceiver.kt"); } @TestMetadata("getSafeCall.kt") public void testGetSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/getSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/getSafeCall.kt"); } @TestMetadata("isGet.kt") public void testIsGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/isGet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/isGet.kt"); } @TestMetadata("isSet.kt") public void testIsSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/isSet.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/isSet.kt"); } @TestMetadata("nonVoidSetter1.kt") public void testNonVoidSetter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/nonVoidSetter1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/nonVoidSetter1.kt"); } @TestMetadata("nonVoidSetter2.kt") public void testNonVoidSetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/nonVoidSetter2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/nonVoidSetter2.kt"); } @TestMetadata("propertyTypeIsMoreSpecific1.kt") public void testPropertyTypeIsMoreSpecific1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/propertyTypeIsMoreSpecific1.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/propertyTypeIsMoreSpecific1.kt"); } @TestMetadata("propertyTypeIsMoreSpecific2.kt") public void testPropertyTypeIsMoreSpecific2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/propertyTypeIsMoreSpecific2.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/propertyTypeIsMoreSpecific2.kt"); } @TestMetadata("set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/set.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/set.kt"); } @TestMetadata("setAsExpressionBody.kt") public void testSetAsExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/setAsExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/setAsExpressionBody.kt"); } @TestMetadata("setAsExpressionBodyProperty.kt") public void testSetAsExpressionBodyProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/setAsExpressionBodyProperty.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/setAsExpressionBodyProperty.kt"); } @TestMetadata("setAsExpressionBodyUnqualified.kt") public void testSetAsExpressionBodyUnqualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/setAsExpressionBodyUnqualified.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/setAsExpressionBodyUnqualified.kt"); } @TestMetadata("setImplicitReceiver.kt") public void testSetImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/setImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/setImplicitReceiver.kt"); } @TestMetadata("setSafeCall.kt") public void testSetSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/setSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/setSafeCall.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/smartCast.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/smartCast.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/superCall.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/superCall.kt"); } @TestMetadata("suppressedByNotPropertyList.kt") public void testSuppressedByNotPropertyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/suppressedByNotPropertyList.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/suppressedByNotPropertyList.kt"); } @TestMetadata("typeParameterReceiver.kt") public void testTypeParameterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/usePropertyAccessSyntax/typeParameterReceiver.kt"); - doTest(fileName); + runTest("idea/testData/intentions/usePropertyAccessSyntax/typeParameterReceiver.kt"); } } @@ -16679,50 +15069,47 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UseWithIndex extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUseWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/useWithIndex"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("alreadyWithIndex.kt") public void testAlreadyWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/alreadyWithIndex.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/alreadyWithIndex.kt"); } @TestMetadata("customTypeWithIterator.kt") public void testCustomTypeWithIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/customTypeWithIterator.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/customTypeWithIterator.kt"); } @TestMetadata("indexIncrementTwice.kt") public void testIndexIncrementTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/indexIncrementTwice.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/indexIncrementTwice.kt"); } @TestMetadata("indexPlusPlusInsideExpression.kt") public void testIndexPlusPlusInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/indexPlusPlusInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/indexPlusPlusInsideExpression.kt"); } @TestMetadata("indexUsedAfterLoop.kt") public void testIndexUsedAfterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/indexUsedAfterLoop.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/indexUsedAfterLoop.kt"); } @TestMetadata("prefixPlusPlusInsideExpression.kt") public void testPrefixPlusPlusInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/prefixPlusPlusInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/prefixPlusPlusInsideExpression.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/useWithIndex/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/useWithIndex/simple.kt"); } } @@ -16730,56 +15117,52 @@ public class IntentionTestGenerated extends AbstractIntentionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ValToObject extends AbstractIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInValToObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/valToObject"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/annotations.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/annotations.kt"); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/callableReference.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/callableReference.kt"); } @TestMetadata("expected.kt") public void testExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/expected.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/expected.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/getter.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/getter.kt"); } @TestMetadata("nonTopLevel.kt") public void testNonTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/nonTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/nonTopLevel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/simple.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/simple.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/var.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/var.kt"); } @TestMetadata("withJavaUsage.kt") public void testWithJavaUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/valToObject/withJavaUsage.kt"); - doTest(fileName); + runTest("idea/testData/intentions/valToObject/withJavaUsage.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/MultiFileIntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/MultiFileIntentionTestGenerated.java index 9301edba2e8..c0188b58532 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/MultiFileIntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/MultiFileIntentionTestGenerated.java @@ -21,40 +21,38 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiFileIntentionTestGenerated extends AbstractMultiFileIntentionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addJvmStaticToCompanionObjectFun/addJvmStaticToCompanionObjectFun.test") public void testAddJvmStaticToCompanionObjectFun_AddJvmStaticToCompanionObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/addJvmStaticToCompanionObjectFun/addJvmStaticToCompanionObjectFun.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/addJvmStaticToCompanionObjectFun/addJvmStaticToCompanionObjectFun.test"); } @TestMetadata("addJvmStaticToCompanionObjectProperty/addJvmStaticToCompanionObjectProperty.test") public void testAddJvmStaticToCompanionObjectProperty_AddJvmStaticToCompanionObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/addJvmStaticToCompanionObjectProperty/addJvmStaticToCompanionObjectProperty.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/addJvmStaticToCompanionObjectProperty/addJvmStaticToCompanionObjectProperty.test"); } @TestMetadata("addJvmStaticToNamedCompanionObjectFun/addJvmStaticToNamedCompanionObjectFun.test") public void testAddJvmStaticToNamedCompanionObjectFun_AddJvmStaticToNamedCompanionObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/addJvmStaticToNamedCompanionObjectFun/addJvmStaticToNamedCompanionObjectFun.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/addJvmStaticToNamedCompanionObjectFun/addJvmStaticToNamedCompanionObjectFun.test"); } @TestMetadata("addJvmStaticToNamedCompanionObjectProperty/addJvmStaticToNamedCompanionObjectProperty.test") public void testAddJvmStaticToNamedCompanionObjectProperty_AddJvmStaticToNamedCompanionObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/addJvmStaticToNamedCompanionObjectProperty/addJvmStaticToNamedCompanionObjectProperty.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/addJvmStaticToNamedCompanionObjectProperty/addJvmStaticToNamedCompanionObjectProperty.test"); } @TestMetadata("addJvmStaticToObjectFun/addJvmStaticToObjectFun.test") public void testAddJvmStaticToObjectFun_AddJvmStaticToObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/addJvmStaticToObjectFun/addJvmStaticToObjectFun.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/addJvmStaticToObjectFun/addJvmStaticToObjectFun.test"); } @TestMetadata("addJvmStaticToObjectProperty/addJvmStaticToObjectProperty.test") public void testAddJvmStaticToObjectProperty_AddJvmStaticToObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/addJvmStaticToObjectProperty/addJvmStaticToObjectProperty.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/addJvmStaticToObjectProperty/addJvmStaticToObjectProperty.test"); } public void testAllFilesPresentInMultiFileIntentions() throws Exception { @@ -63,97 +61,81 @@ public class MultiFileIntentionTestGenerated extends AbstractMultiFileIntentionT @TestMetadata("convertMemberToExtension/addImports/addImports.test") public void testConvertMemberToExtension_addImports_AddImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/convertMemberToExtension/addImports/addImports.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/convertMemberToExtension/addImports/addImports.test"); } @TestMetadata("implementAbstractMember/implementFunctionInJava/implementAllInJava.test") public void testImplementAbstractMember_implementFunctionInJava_ImplementAllInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/implementAbstractMember/implementFunctionInJava/implementAllInJava.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/implementAbstractMember/implementFunctionInJava/implementAllInJava.test"); } @TestMetadata("implementAbstractMember/implementValInJava/implementAllInJava.test") public void testImplementAbstractMember_implementValInJava_ImplementAllInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/implementAbstractMember/implementValInJava/implementAllInJava.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/implementAbstractMember/implementValInJava/implementAllInJava.test"); } @TestMetadata("implementAbstractMember/implementVarInJava/implementAllInJava.test") public void testImplementAbstractMember_implementVarInJava_ImplementAllInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/implementAbstractMember/implementVarInJava/implementAllInJava.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/implementAbstractMember/implementVarInJava/implementAllInJava.test"); } @TestMetadata("implementAsConstructorParameter/implementValInJava/implementAllInJava.test") public void testImplementAsConstructorParameter_implementValInJava_ImplementAllInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/implementAsConstructorParameter/implementValInJava/implementAllInJava.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/implementAsConstructorParameter/implementValInJava/implementAllInJava.test"); } @TestMetadata("moveDeclarationToSeparateFile/moveClassToExistingFile/moveClassToExistingFile.test") public void testMoveDeclarationToSeparateFile_moveClassToExistingFile_MoveClassToExistingFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveClassToExistingFile/moveClassToExistingFile.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveClassToExistingFile/moveClassToExistingFile.test"); } @TestMetadata("moveDeclarationToSeparateFile/moveClassToFile/moveClassToFile.test") public void testMoveDeclarationToSeparateFile_moveClassToFile_MoveClassToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveClassToFile/moveClassToFile.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveClassToFile/moveClassToFile.test"); } @TestMetadata("moveDeclarationToSeparateFile/moveClassToFileInDefaultPackage/moveClassToFileInDefaultPackage.test") public void testMoveDeclarationToSeparateFile_moveClassToFileInDefaultPackage_MoveClassToFileInDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveClassToFileInDefaultPackage/moveClassToFileInDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveClassToFileInDefaultPackage/moveClassToFileInDefaultPackage.test"); } @TestMetadata("moveDeclarationToSeparateFile/moveSingleToFile/moveSingleToFile.test") public void testMoveDeclarationToSeparateFile_moveSingleToFile_MoveSingleToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveSingleToFile/moveSingleToFile.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/moveSingleToFile/moveSingleToFile.test"); } @TestMetadata("moveDeclarationToSeparateFile/optimizeImports/optimizeImports.test") public void testMoveDeclarationToSeparateFile_optimizeImports_OptimizeImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/optimizeImports/optimizeImports.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveDeclarationToSeparateFile/optimizeImports/optimizeImports.test"); } @TestMetadata("moveOutOfCompanion/moveClass/moveClass.test") public void testMoveOutOfCompanion_moveClass_MoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveOutOfCompanion/moveClass/moveClass.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveOutOfCompanion/moveClass/moveClass.test"); } @TestMetadata("moveToCompanion/moveFunction/moveFunction.test") public void testMoveToCompanion_moveFunction_MoveFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveToCompanion/moveFunction/moveFunction.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveToCompanion/moveFunction/moveFunction.test"); } @TestMetadata("moveToCompanion/moveInnerClass/moveInnerClass.test") public void testMoveToCompanion_moveInnerClass_MoveInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveToCompanion/moveInnerClass/moveInnerClass.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveToCompanion/moveInnerClass/moveInnerClass.test"); } @TestMetadata("moveToCompanion/moveNonInnerClass/moveNonInnerClass.test") public void testMoveToCompanion_moveNonInnerClass_MoveNonInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveToCompanion/moveNonInnerClass/moveNonInnerClass.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveToCompanion/moveNonInnerClass/moveNonInnerClass.test"); } @TestMetadata("moveToCompanion/moveProperty/moveProperty.test") public void testMoveToCompanion_moveProperty_MoveProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/moveToCompanion/moveProperty/moveProperty.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/moveToCompanion/moveProperty/moveProperty.test"); } @TestMetadata("objectLiteralToLambda/objectLiteralToLambda.test") public void testObjectLiteralToLambda_ObjectLiteralToLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileIntentions/objectLiteralToLambda/objectLiteralToLambda.test"); - doTest(fileName); + runTest("idea/testData/multiFileIntentions/objectLiteralToLambda/objectLiteralToLambda.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java index 59a23164877..c3f2aed70df 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JoinLinesTestGenerated extends AbstractJoinLinesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJoinLines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,110 +33,97 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddSemicolon extends AbstractJoinLinesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddSemicolon() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines/addSemicolon"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassDeclarations.kt") public void testClassDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/ClassDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/ClassDeclarations.kt"); } @TestMetadata("FunctionCalls.kt") public void testFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/FunctionCalls.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/FunctionCalls.kt"); } @TestMetadata("FunctionCallsAndAComment.kt") public void testFunctionCallsAndAComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/FunctionCallsAndAComment.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/FunctionCallsAndAComment.kt"); } @TestMetadata("FunctionCallsAndAMultilineComment.kt") public void testFunctionCallsAndAMultilineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/FunctionCallsAndAMultilineComment.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/FunctionCallsAndAMultilineComment.kt"); } @TestMetadata("FunctionCallsAndSeveralComments.kt") public void testFunctionCallsAndSeveralComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/FunctionCallsAndSeveralComments.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/FunctionCallsAndSeveralComments.kt"); } @TestMetadata("FunctionCallsWithMutlineSeparator.kt") public void testFunctionCallsWithMutlineSeparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/FunctionCallsWithMutlineSeparator.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/FunctionCallsWithMutlineSeparator.kt"); } @TestMetadata("FunctionDeclarations.kt") public void testFunctionDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/FunctionDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/FunctionDeclarations.kt"); } @TestMetadata("InsideBraces.kt") public void testInsideBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/InsideBraces.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/InsideBraces.kt"); } @TestMetadata("InsideIfBlock.kt") public void testInsideIfBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/InsideIfBlock.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/InsideIfBlock.kt"); } @TestMetadata("LocalAssingments.kt") public void testLocalAssingments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/LocalAssingments.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/LocalAssingments.kt"); } @TestMetadata("LocalAssingmentsWithSemicolon.kt") public void testLocalAssingmentsWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/LocalAssingmentsWithSemicolon.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/LocalAssingmentsWithSemicolon.kt"); } @TestMetadata("LocalClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/LocalClasses.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/LocalClasses.kt"); } @TestMetadata("LocalFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/LocalFunctions.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/LocalFunctions.kt"); } @TestMetadata("MemberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/MemberFunctions.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/MemberFunctions.kt"); } @TestMetadata("WhileAndACall.kt") public void testWhileAndACall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/WhileAndACall.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/WhileAndACall.kt"); } @TestMetadata("WhileBlockAndACall.kt") public void testWhileBlockAndACall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/WhileBlockAndACall.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/WhileBlockAndACall.kt"); } @TestMetadata("WhileBlockAndACall2.kt") public void testWhileBlockAndACall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/addSemicolon/WhileBlockAndACall2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/addSemicolon/WhileBlockAndACall2.kt"); } } @@ -140,110 +131,97 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationAndAssignment extends AbstractJoinLinesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationAndAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines/declarationAndAssignment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("blankLineBetween.kt") public void testBlankLineBetween() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/blankLineBetween.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/blankLineBetween.kt"); } @TestMetadata("commentBetween.kt") public void testCommentBetween() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/commentBetween.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/commentBetween.kt"); } @TestMetadata("longInit.kt") public void testLongInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/longInit.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/longInit.kt"); } @TestMetadata("longInit2.kt") public void testLongInit2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/longInit2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/longInit2.kt"); } @TestMetadata("propertyWithAnnotation.kt") public void testPropertyWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/propertyWithAnnotation.kt"); } @TestMetadata("simpleInit.kt") public void testSimpleInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInit.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInit.kt"); } @TestMetadata("simpleInit2.kt") public void testSimpleInit2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInit2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInit2.kt"); } @TestMetadata("simpleInitWithBackticks.kt") public void testSimpleInitWithBackticks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithBackticks.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithBackticks.kt"); } @TestMetadata("simpleInitWithBackticks2.kt") public void testSimpleInitWithBackticks2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithBackticks2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithBackticks2.kt"); } @TestMetadata("simpleInitWithBackticks3.kt") public void testSimpleInitWithBackticks3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithBackticks3.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithBackticks3.kt"); } @TestMetadata("simpleInitWithComments.kt") public void testSimpleInitWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithComments.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithComments.kt"); } @TestMetadata("simpleInitWithComments2.kt") public void testSimpleInitWithComments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithComments2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithComments2.kt"); } @TestMetadata("simpleInitWithSemicolons.kt") public void testSimpleInitWithSemicolons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithSemicolons.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithSemicolons.kt"); } @TestMetadata("simpleInitWithSemicolons2.kt") public void testSimpleInitWithSemicolons2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithSemicolons2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithSemicolons2.kt"); } @TestMetadata("simpleInitWithSemicolons3.kt") public void testSimpleInitWithSemicolons3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithSemicolons3.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithSemicolons3.kt"); } @TestMetadata("simpleInitWithType.kt") public void testSimpleInitWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithType.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithType.kt"); } @TestMetadata("simpleInitWithType2.kt") public void testSimpleInitWithType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/declarationAndAssignment/simpleInitWithType2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/declarationAndAssignment/simpleInitWithType2.kt"); } } @@ -251,44 +229,42 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedIfs extends AbstractJoinLinesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNestedIfs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines/nestedIfs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("BlockBody.kt") public void testBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/nestedIfs/BlockBody.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/nestedIfs/BlockBody.kt"); } @TestMetadata("ComplexCondition1.kt") public void testComplexCondition1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/nestedIfs/ComplexCondition1.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/nestedIfs/ComplexCondition1.kt"); } @TestMetadata("ComplexCondition2.kt") public void testComplexCondition2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/nestedIfs/ComplexCondition2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/nestedIfs/ComplexCondition2.kt"); } @TestMetadata("InnerWithElse.kt") public void testInnerWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/nestedIfs/InnerWithElse.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/nestedIfs/InnerWithElse.kt"); } @TestMetadata("OuterWithElse.kt") public void testOuterWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/nestedIfs/OuterWithElse.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/nestedIfs/OuterWithElse.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/nestedIfs/Simple.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/nestedIfs/Simple.kt"); } } @@ -296,122 +272,107 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveBraces extends AbstractJoinLinesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveBraces() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines/removeBraces"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("CommentAfterStatement.kt") public void testCommentAfterStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/CommentAfterStatement.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/CommentAfterStatement.kt"); } @TestMetadata("CommentAfterStatement2.kt") public void testCommentAfterStatement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/CommentAfterStatement2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/CommentAfterStatement2.kt"); } @TestMetadata("CommentBeforeStatement.kt") public void testCommentBeforeStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/CommentBeforeStatement.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/CommentBeforeStatement.kt"); } @TestMetadata("CommentBeforeStatement2.kt") public void testCommentBeforeStatement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/CommentBeforeStatement2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/CommentBeforeStatement2.kt"); } @TestMetadata("DoWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/DoWhile.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/DoWhile.kt"); } @TestMetadata("Else.kt") public void testElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/Else.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/Else.kt"); } @TestMetadata("For.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/For.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/For.kt"); } @TestMetadata("FunctionBody.kt") public void testFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/FunctionBody.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/FunctionBody.kt"); } @TestMetadata("FunctionWithOneLineReturn.kt") public void testFunctionWithOneLineReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/FunctionWithOneLineReturn.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/FunctionWithOneLineReturn.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/If.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/If.kt"); } @TestMetadata("IfWithElse.kt") public void testIfWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/IfWithElse.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/IfWithElse.kt"); } @TestMetadata("IfWithElseBlockInAssignment.kt") public void testIfWithElseBlockInAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/IfWithElseBlockInAssignment.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/IfWithElseBlockInAssignment.kt"); } @TestMetadata("IfWithPostfixAfterElseBlock.kt") public void testIfWithPostfixAfterElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/IfWithPostfixAfterElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/IfWithPostfixAfterElseBlock.kt"); } @TestMetadata("IfWithQualifiedAfterElseBlock.kt") public void testIfWithQualifiedAfterElseBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/IfWithQualifiedAfterElseBlock.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/IfWithQualifiedAfterElseBlock.kt"); } @TestMetadata("LambdaBody.kt") public void testLambdaBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/LambdaBody.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/LambdaBody.kt"); } @TestMetadata("NotSingleLineStatement.kt") public void testNotSingleLineStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/NotSingleLineStatement.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/NotSingleLineStatement.kt"); } @TestMetadata("TwoStatements.kt") public void testTwoStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/TwoStatements.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/TwoStatements.kt"); } @TestMetadata("WhenEntry.kt") public void testWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/WhenEntry.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/WhenEntry.kt"); } @TestMetadata("While.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/removeBraces/While.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/removeBraces/While.kt"); } } @@ -419,50 +380,47 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplate extends AbstractJoinLinesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines/stringTemplate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("firstLineVariable.kt") public void testFirstLineVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/firstLineVariable.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/firstLineVariable.kt"); } @TestMetadata("lineWithMultiStringLiteral.kt") public void testLineWithMultiStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/lineWithMultiStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/lineWithMultiStringLiteral.kt"); } @TestMetadata("lineWithMultiStringLiteralAndVariable.kt") public void testLineWithMultiStringLiteralAndVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/lineWithMultiStringLiteralAndVariable.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/lineWithMultiStringLiteralAndVariable.kt"); } @TestMetadata("secondLineVariable.kt") public void testSecondLineVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/secondLineVariable.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/secondLineVariable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/simple.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/simple.kt"); } @TestMetadata("threeLines.kt") public void testThreeLines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/threeLines.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/threeLines.kt"); } @TestMetadata("threeLines2.kt") public void testThreeLines2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/threeLines2.kt"); - doTest(fileName); + runTest("idea/testData/joinLines/stringTemplate/threeLines2.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/internal/BytecodeToolWindowTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/internal/BytecodeToolWindowTestGenerated.java index 0761c5fa896..fdbc728c99a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/internal/BytecodeToolWindowTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/internal/BytecodeToolWindowTestGenerated.java @@ -21,61 +21,56 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BytecodeToolWindowTestGenerated extends AbstractBytecodeToolWindowTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToolWindow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/internal/toolWindow"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("componentInlineFun") public void testComponentInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/componentInlineFun/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/componentInlineFun/"); } @TestMetadata("inlineFunctionBodyResolve") public void testInlineFunctionBodyResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/inlineFunctionBodyResolve/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/inlineFunctionBodyResolve/"); } @TestMetadata("inlineFunctionDeep1") public void testInlineFunctionDeep1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/inlineFunctionDeep1/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/inlineFunctionDeep1/"); } @TestMetadata("inlineFunctionDeep2") public void testInlineFunctionDeep2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/inlineFunctionDeep2/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/inlineFunctionDeep2/"); } @TestMetadata("inlineFunctionInfixCall") public void testInlineFunctionInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/inlineFunctionInfixCall/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/inlineFunctionInfixCall/"); } @TestMetadata("inlineFunctionReifiedParam") public void testInlineFunctionReifiedParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/inlineFunctionReifiedParam/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/inlineFunctionReifiedParam/"); } @TestMetadata("iteratorFun") public void testIteratorFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/iteratorFun/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/iteratorFun/"); } @TestMetadata("multipleInlineFunctionCalls") public void testMultipleInlineFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/multipleInlineFunctionCalls/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/multipleInlineFunctionCalls/"); } @TestMetadata("objectInInlineFun") public void testObjectInInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/internal/toolWindow/objectInInlineFun/"); - doTest(fileName); + runTest("idea/testData/internal/toolWindow/objectInInlineFun/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocHighlightingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocHighlightingTestGenerated.java index 0a86cbe2004..fdff0d8f327 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocHighlightingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocHighlightingTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KDocHighlightingTestGenerated extends AbstractKDocHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHighlighting() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/kdoc/highlighting"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MissingDocumentation.kt") public void testMissingDocumentation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/highlighting/MissingDocumentation.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/highlighting/MissingDocumentation.kt"); } @TestMetadata("UnresolvedReference.kt") public void testUnresolvedReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/highlighting/UnresolvedReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/highlighting/UnresolvedReference.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocTypingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocTypingTestGenerated.java index 1d8b31aec8b..656e15592be 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocTypingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/kdoc/KDocTypingTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KDocTypingTestGenerated extends AbstractKDocTypingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/kdoc/typing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("closingBracketNotInLink.kt") public void testClosingBracketNotInLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/closingBracketNotInLink.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/closingBracketNotInLink.kt"); } @TestMetadata("closingBracketOvertype.kt") public void testClosingBracketOvertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/closingBracketOvertype.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/closingBracketOvertype.kt"); } @TestMetadata("closingBracketOvertypeEmpty.kt") public void testClosingBracketOvertypeEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/closingBracketOvertypeEmpty.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/closingBracketOvertypeEmpty.kt"); } @TestMetadata("closingBracketRefLinkOvertype.kt") public void testClosingBracketRefLinkOvertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/closingBracketRefLinkOvertype.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/closingBracketRefLinkOvertype.kt"); } @TestMetadata("closingParenOvertype.kt") public void testClosingParenOvertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/closingParenOvertype.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/closingParenOvertype.kt"); } @TestMetadata("openingBracket.kt") public void testOpeningBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/openingBracket.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/openingBracket.kt"); } @TestMetadata("openingBracketRefLink.kt") public void testOpeningBracketRefLink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/openingBracketRefLink.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/openingBracketRefLink.kt"); } @TestMetadata("openingParen.kt") public void testOpeningParen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/typing/openingParen.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/typing/openingParen.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/kdoc/KdocResolveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/kdoc/KdocResolveTestGenerated.java index 00a52ac6f46..a9034f1d2ca 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/kdoc/KdocResolveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/kdoc/KdocResolveTestGenerated.java @@ -22,151 +22,131 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KdocResolveTestGenerated extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/kdoc/resolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AmbiguousReference.kt") public void testAmbiguousReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/AmbiguousReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/AmbiguousReference.kt"); } @TestMetadata("AmbiguousReferenceTypeParameter.kt") public void testAmbiguousReferenceTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/AmbiguousReferenceTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/AmbiguousReferenceTypeParameter.kt"); } @TestMetadata("CheckExtensionReceiver.kt") public void testCheckExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/CheckExtensionReceiver.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/CheckExtensionReceiver.kt"); } @TestMetadata("ClassSelfReference.kt") public void testClassSelfReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ClassSelfReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ClassSelfReference.kt"); } @TestMetadata("CodeReference.kt") public void testCodeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/CodeReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/CodeReference.kt"); } @TestMetadata("CompanionObjectMember.kt") public void testCompanionObjectMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/CompanionObjectMember.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/CompanionObjectMember.kt"); } @TestMetadata("ConstructorParamReference.kt") public void testConstructorParamReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ConstructorParamReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ConstructorParamReference.kt"); } @TestMetadata("ExtensionFromImports.kt") public void testExtensionFromImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ExtensionFromImports.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ExtensionFromImports.kt"); } @TestMetadata("ExtensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ExtensionFun.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ExtensionFun.kt"); } @TestMetadata("ExtensionNonQualified.kt") public void testExtensionNonQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ExtensionNonQualified.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ExtensionNonQualified.kt"); } @TestMetadata("ExtensionVal.kt") public void testExtensionVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ExtensionVal.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ExtensionVal.kt"); } @TestMetadata("ImportAliasClass.kt") public void testImportAliasClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ImportAliasClass.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ImportAliasClass.kt"); } @TestMetadata("ImportedClassReference.kt") public void testImportedClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ImportedClassReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ImportedClassReference.kt"); } @TestMetadata("OnlyMembersFromClass.kt") public void testOnlyMembersFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/OnlyMembersFromClass.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/OnlyMembersFromClass.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/Overloads.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/Overloads.kt"); } @TestMetadata("ParamReference.kt") public void testParamReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ParamReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ParamReference.kt"); } @TestMetadata("PropertyTypeParamReference.kt") public void testPropertyTypeParamReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/PropertyTypeParamReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/PropertyTypeParamReference.kt"); } @TestMetadata("QualifiedCodeReference.kt") public void testQualifiedCodeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/QualifiedCodeReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/QualifiedCodeReference.kt"); } @TestMetadata("QualifiedNameFunctionReference.kt") public void testQualifiedNameFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/QualifiedNameFunctionReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/QualifiedNameFunctionReference.kt"); } @TestMetadata("QualifiedNameReference.kt") public void testQualifiedNameReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/QualifiedNameReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/QualifiedNameReference.kt"); } @TestMetadata("ReceiverReference.kt") public void testReceiverReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/ReceiverReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/ReceiverReference.kt"); } @TestMetadata("SeeReference.kt") public void testSeeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/SeeReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/SeeReference.kt"); } @TestMetadata("StaticMember.kt") public void testStaticMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/StaticMember.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/StaticMember.kt"); } @TestMetadata("TypeParamReference.kt") public void testTypeParamReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/kdoc/resolve/TypeParamReference.kt"); - doTest(fileName); + runTest("idea/testData/kdoc/resolve/TypeParamReference.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoDeclarationTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoDeclarationTestGenerated.java index 2e42f4c711a..69473f7b78d 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoDeclarationTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoDeclarationTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GotoDeclarationTestGenerated extends AbstractGotoDeclarationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGotoDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoDeclaration"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY, true); } @TestMetadata("itExtensionLambda.test") public void testItExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/itExtensionLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/itExtensionLambda.test"); } @TestMetadata("itExtensionLambdaInBrackets.test") public void testItExtensionLambdaInBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/itExtensionLambdaInBrackets.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/itExtensionLambdaInBrackets.test"); } @TestMetadata("itInLambdaAsDefaultArgument.test") public void testItInLambdaAsDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/itInLambdaAsDefaultArgument.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/itInLambdaAsDefaultArgument.test"); } @TestMetadata("itInLambdaWithoutCall.test") public void testItInLambdaWithoutCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/itInLambdaWithoutCall.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/itInLambdaWithoutCall.test"); } @TestMetadata("itParameterInLambda.test") public void testItParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/itParameterInLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/itParameterInLambda.test"); } @TestMetadata("labeledThisToClass.test") public void testLabeledThisToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/labeledThisToClass.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/labeledThisToClass.test"); } @TestMetadata("labeledThisToMemberExtension.test") public void testLabeledThisToMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/labeledThisToMemberExtension.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/labeledThisToMemberExtension.test"); } @TestMetadata("thisExtensionFunction.test") public void testThisExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/thisExtensionFunction.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/thisExtensionFunction.test"); } @TestMetadata("thisExtensionLambda.test") public void testThisExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/thisExtensionLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/thisExtensionLambda.test"); } @TestMetadata("thisInExtensionPropertyAccessor.test") public void testThisInExtensionPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoDeclaration/thisInExtensionPropertyAccessor.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoDeclaration/thisInExtensionPropertyAccessor.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoSuperTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoSuperTestGenerated.java index a73fc87d721..955b34ee050 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoSuperTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoSuperTestGenerated.java @@ -21,85 +21,76 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GotoSuperTestGenerated extends AbstractGotoSuperTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGotoSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoSuper"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY, false); } @TestMetadata("BadPositionLambdaParameter.test") public void testBadPositionLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/BadPositionLambdaParameter.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/BadPositionLambdaParameter.test"); } @TestMetadata("ClassSimple.test") public void testClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/ClassSimple.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/ClassSimple.test"); } @TestMetadata("DelegatedFun.test") public void testDelegatedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/DelegatedFun.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/DelegatedFun.test"); } @TestMetadata("DelegatedProperty.test") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/DelegatedProperty.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/DelegatedProperty.test"); } @TestMetadata("FakeOverrideFun.test") public void testFakeOverrideFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/FakeOverrideFun.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/FakeOverrideFun.test"); } @TestMetadata("FakeOverrideFunWithMostRelevantImplementation.test") public void testFakeOverrideFunWithMostRelevantImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/FakeOverrideFunWithMostRelevantImplementation.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/FakeOverrideFunWithMostRelevantImplementation.test"); } @TestMetadata("FakeOverrideProperty.test") public void testFakeOverrideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/FakeOverrideProperty.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/FakeOverrideProperty.test"); } @TestMetadata("FunctionSimple.test") public void testFunctionSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/FunctionSimple.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/FunctionSimple.test"); } @TestMetadata("ObjectSimple.test") public void testObjectSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/ObjectSimple.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/ObjectSimple.test"); } @TestMetadata("PropertySimple.test") public void testPropertySimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/PropertySimple.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/PropertySimple.test"); } @TestMetadata("SuperWithNativeToGenericMapping.test") public void testSuperWithNativeToGenericMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/SuperWithNativeToGenericMapping.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/SuperWithNativeToGenericMapping.test"); } @TestMetadata("TraitSimple.test") public void testTraitSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/TraitSimple.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/TraitSimple.test"); } @TestMetadata("TypeAliasInSuperType.test") public void testTypeAliasInSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/TypeAliasInSuperType.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/TypeAliasInSuperType.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoTypeDeclarationTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoTypeDeclarationTestGenerated.java index 3f33591ec7f..a500adc7e3b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoTypeDeclarationTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/GotoTypeDeclarationTestGenerated.java @@ -21,97 +21,86 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class GotoTypeDeclarationTestGenerated extends AbstractGotoTypeDeclarationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGotoTypeDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoTypeDeclaration"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY, true); } @TestMetadata("builtinTypeStdlib.test") public void testBuiltinTypeStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/builtinTypeStdlib.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/builtinTypeStdlib.test"); } @TestMetadata("explicitParameterInLambda.test") public void testExplicitParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/explicitParameterInLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/explicitParameterInLambda.test"); } @TestMetadata("fromFunctionDeclarationName.test") public void testFromFunctionDeclarationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/fromFunctionDeclarationName.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/fromFunctionDeclarationName.test"); } @TestMetadata("fromFunctionDeclarationReturn.test") public void testFromFunctionDeclarationReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/fromFunctionDeclarationReturn.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/fromFunctionDeclarationReturn.test"); } @TestMetadata("fromFunctionDeclrationExtension.test") public void testFromFunctionDeclrationExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/fromFunctionDeclrationExtension.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/fromFunctionDeclrationExtension.test"); } @TestMetadata("functionCall.test") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/functionCall.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/functionCall.test"); } @TestMetadata("itExtensionLambda.test") public void testItExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/itExtensionLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/itExtensionLambda.test"); } @TestMetadata("itParameterInLambda.test") public void testItParameterInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/itParameterInLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/itParameterInLambda.test"); } @TestMetadata("noParametersLambda.test") public void testNoParametersLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/noParametersLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/noParametersLambda.test"); } @TestMetadata("thisExtensionFunction.test") public void testThisExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/thisExtensionFunction.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/thisExtensionFunction.test"); } @TestMetadata("thisExtensionFunctionWithAnnotationOnReceiver.test") public void testThisExtensionFunctionWithAnnotationOnReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/thisExtensionFunctionWithAnnotationOnReceiver.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/thisExtensionFunctionWithAnnotationOnReceiver.test"); } @TestMetadata("thisExtensionFunctionWithGenericReceiver.test") public void testThisExtensionFunctionWithGenericReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/thisExtensionFunctionWithGenericReceiver.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/thisExtensionFunctionWithGenericReceiver.test"); } @TestMetadata("thisExtensionLambda.test") public void testThisExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/thisExtensionLambda.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/thisExtensionLambda.test"); } @TestMetadata("thisInExtensionPropertyAccessor.test") public void testThisInExtensionPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/thisInExtensionPropertyAccessor.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/thisInExtensionPropertyAccessor.test"); } @TestMetadata("variableType.test") public void testVariableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoTypeDeclaration/variableType.test"); - doTest(fileName); + runTest("idea/testData/navigation/gotoTypeDeclaration/variableType.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationMultiModuleTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationMultiModuleTestGenerated.java index 56bac805575..3db25aa3640 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationMultiModuleTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationMultiModuleTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinGotoImplementationMultiModuleTestGenerated extends AbstractKotlinGotoImplementationMultiModuleTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/implementations/multiModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("expectClass") public void testExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/expectClass/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/expectClass/"); } @TestMetadata("expectClassFun") public void testExpectClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/expectClassFun/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/expectClassFun/"); } @TestMetadata("expectClassProperty") public void testExpectClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/expectClassProperty/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/expectClassProperty/"); } @TestMetadata("expectClassSuperclass") public void testExpectClassSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/expectClassSuperclass/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/expectClassSuperclass/"); } @TestMetadata("expectClassSuperclassFun") public void testExpectClassSuperclassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/expectClassSuperclassFun/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/expectClassSuperclassFun/"); } @TestMetadata("expectClassSuperclassProperty") public void testExpectClassSuperclassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/expectClassSuperclassProperty/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/expectClassSuperclassProperty/"); } @TestMetadata("suspendFunImpl") public void testSuspendFunImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/multiModule/suspendFunImpl/"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/multiModule/suspendFunImpl/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationTestGenerated.java index 8a3e9e53ccf..99521a68833 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoImplementationTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinGotoImplementationTestGenerated extends AbstractKotlinGotoImplementationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractClassImplementorsWithDeclaration.kt") public void testAbstractClassImplementorsWithDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/AbstractClassImplementorsWithDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/AbstractClassImplementorsWithDeclaration.kt"); } public void testAllFilesPresentInImplementations() throws Exception { @@ -33,109 +36,91 @@ public class KotlinGotoImplementationTestGenerated extends AbstractKotlinGotoImp @TestMetadata("ClassImplementorsWithDeclaration.kt") public void testClassImplementorsWithDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/ClassImplementorsWithDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/ClassImplementorsWithDeclaration.kt"); } @TestMetadata("ClassNavigation.kt") public void testClassNavigation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/ClassNavigation.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/ClassNavigation.kt"); } @TestMetadata("ConstructorPropertyOverriddenNavigation.kt") public void testConstructorPropertyOverriddenNavigation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/ConstructorPropertyOverriddenNavigation.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/ConstructorPropertyOverriddenNavigation.kt"); } @TestMetadata("DefaultImplFunction.kt") public void testDefaultImplFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/DefaultImplFunction.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/DefaultImplFunction.kt"); } @TestMetadata("DefaultImplProperty.kt") public void testDefaultImplProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/DefaultImplProperty.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/DefaultImplProperty.kt"); } @TestMetadata("DelegatedAndDefaultImplFunction.kt") public void testDelegatedAndDefaultImplFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/DelegatedAndDefaultImplFunction.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/DelegatedAndDefaultImplFunction.kt"); } @TestMetadata("DelegatedFunction.kt") public void testDelegatedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/DelegatedFunction.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/DelegatedFunction.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/DelegatedProperty.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/DelegatedProperty.kt"); } @TestMetadata("EnumEntriesInheritance.kt") public void testEnumEntriesInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/EnumEntriesInheritance.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/EnumEntriesInheritance.kt"); } @TestMetadata("FakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/FakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/FakeOverride.kt"); } @TestMetadata("FunctionOverrideNavigation.kt") public void testFunctionOverrideNavigation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/FunctionOverrideNavigation.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/FunctionOverrideNavigation.kt"); } @TestMetadata("GenericDelegatedAndDefaultImplFunction.kt") public void testGenericDelegatedAndDefaultImplFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/GenericDelegatedAndDefaultImplFunction.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/GenericDelegatedAndDefaultImplFunction.kt"); } @TestMetadata("GenericFakeOverride.kt") public void testGenericFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/GenericFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/GenericFakeOverride.kt"); } @TestMetadata("ImplementGenericWithPrimitives.kt") public void testImplementGenericWithPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/ImplementGenericWithPrimitives.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/ImplementGenericWithPrimitives.kt"); } @TestMetadata("ObjectImported.kt") public void testObjectImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/ObjectImported.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/ObjectImported.kt"); } @TestMetadata("OverridesInEnumEntries.kt") public void testOverridesInEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/OverridesInEnumEntries.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/OverridesInEnumEntries.kt"); } @TestMetadata("PropertyOverriddenNavigation.kt") public void testPropertyOverriddenNavigation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/PropertyOverriddenNavigation.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/PropertyOverriddenNavigation.kt"); } @TestMetadata("TraitImplementorsWithDeclaration.kt") public void testTraitImplementorsWithDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/implementations/TraitImplementorsWithDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/navigation/implementations/TraitImplementorsWithDeclaration.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoRelatedSymbolMultiModuleTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoRelatedSymbolMultiModuleTestGenerated.java index 957638c2d96..6fcebf8c40a 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoRelatedSymbolMultiModuleTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoRelatedSymbolMultiModuleTestGenerated.java @@ -21,79 +21,71 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinGotoRelatedSymbolMultiModuleTestGenerated extends AbstractKotlinGotoRelatedSymbolMultiModuleTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/relatedSymbols/multiModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("fromActualMemberFunToExpect") public void testFromActualMemberFunToExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromActualMemberFunToExpect/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromActualMemberFunToExpect/"); } @TestMetadata("fromActualMemberValToExpect") public void testFromActualMemberValToExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromActualMemberValToExpect/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromActualMemberValToExpect/"); } @TestMetadata("fromExpectMemberFunToActuals") public void testFromExpectMemberFunToActuals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromExpectMemberFunToActuals/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromExpectMemberFunToActuals/"); } @TestMetadata("fromExpectMemberValToActuals") public void testFromExpectMemberValToActuals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromExpectMemberValToActuals/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromExpectMemberValToActuals/"); } @TestMetadata("fromNestedActualClassToExpect") public void testFromNestedActualClassToExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromNestedActualClassToExpect/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromNestedActualClassToExpect/"); } @TestMetadata("fromNestedExpectClassToActuals") public void testFromNestedExpectClassToActuals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromNestedExpectClassToActuals/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromNestedExpectClassToActuals/"); } @TestMetadata("fromTopLevelActualClassToExpect") public void testFromTopLevelActualClassToExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelActualClassToExpect/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelActualClassToExpect/"); } @TestMetadata("fromTopLevelActualFunToExpect") public void testFromTopLevelActualFunToExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelActualFunToExpect/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelActualFunToExpect/"); } @TestMetadata("fromTopLevelActualValToExpect") public void testFromTopLevelActualValToExpect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelActualValToExpect/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelActualValToExpect/"); } @TestMetadata("fromTopLevelExpectClassToActuals") public void testFromTopLevelExpectClassToActuals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelExpectClassToActuals/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelExpectClassToActuals/"); } @TestMetadata("fromTopLevelExpectFunToActuals") public void testFromTopLevelExpectFunToActuals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelExpectFunToActuals/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelExpectFunToActuals/"); } @TestMetadata("fromTopLevelExpectValToActuals") public void testFromTopLevelExpectValToActuals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelExpectValToActuals/"); - doTest(fileName); + runTest("idea/testData/navigation/relatedSymbols/multiModule/fromTopLevelExpectValToActuals/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoSuperMultiModuleTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoSuperMultiModuleTestGenerated.java index bf87b31a6f0..22ab21596f7 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoSuperMultiModuleTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoSuperMultiModuleTestGenerated.java @@ -21,22 +21,23 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinGotoSuperMultiModuleTestGenerated extends AbstractKotlinGotoSuperMultiModuleTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("actualClass") public void testActualClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/multiModule/actualClass/"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/multiModule/actualClass/"); } @TestMetadata("actualFunction") public void testActualFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/multiModule/actualFunction/"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/multiModule/actualFunction/"); } @TestMetadata("actualProperty") public void testActualProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSuper/multiModule/actualProperty/"); - doTest(fileName); + runTest("idea/testData/navigation/gotoSuper/multiModule/actualProperty/"); } public void testAllFilesPresentInMultiModule() throws Exception { diff --git a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoTestGenerated.java index d6a5cf46566..fe3c908eb8b 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/navigation/KotlinGotoTestGenerated.java @@ -23,74 +23,67 @@ public class KotlinGotoTestGenerated extends AbstractKotlinGotoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GotoClass extends AbstractKotlinGotoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doClassTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGotoClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builtInAny.kt") public void testBuiltInAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/builtInAny.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/builtInAny.kt"); } @TestMetadata("builtInInt.kt") public void testBuiltInInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/builtInInt.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/builtInInt.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/enumEntries.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/enumEntries.kt"); } @TestMetadata("inClassObject.kt") public void testInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/inClassObject.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/inClassObject.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/innerClass.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/innerClass.kt"); } @TestMetadata("localDeclarations.kt") public void testLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/localDeclarations.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/localDeclarations.kt"); } @TestMetadata("noImplementationTrait.kt") public void testNoImplementationTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/noImplementationTrait.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/noImplementationTrait.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/simpleClass.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/simpleClass.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/simpleObject.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/simpleObject.kt"); } @TestMetadata("traitWithFunImplement.kt") public void testTraitWithFunImplement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/traitWithFunImplement.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/traitWithFunImplement.kt"); } @TestMetadata("typealias.kt") public void testTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/typealias.kt"); - doClassTest(fileName); + runTest("idea/testData/navigation/gotoClass/typealias.kt"); } } @@ -98,80 +91,72 @@ public class KotlinGotoTestGenerated extends AbstractKotlinGotoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GotoSymbol extends AbstractKotlinGotoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doSymbolTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGotoSymbol() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoSymbol"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builtInArrayOfNulls.kt") public void testBuiltInArrayOfNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/builtInArrayOfNulls.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/builtInArrayOfNulls.kt"); } @TestMetadata("builtInInt.kt") public void testBuiltInInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/builtInInt.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/builtInInt.kt"); } @TestMetadata("enumConstants.kt") public void testEnumConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/enumConstants.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/enumConstants.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/functions.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/functions.kt"); } @TestMetadata("javaMethods.kt") public void testJavaMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/javaMethods.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/javaMethods.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/localFunction.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/localFunction.kt"); } @TestMetadata("privateTopLevelDeclarations.kt") public void testPrivateTopLevelDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/privateTopLevelDeclarations.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/privateTopLevelDeclarations.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/properties.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/properties.kt"); } @TestMetadata("stdLibArrayListOf.kt") public void testStdLibArrayListOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/stdLibArrayListOf.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/stdLibArrayListOf.kt"); } @TestMetadata("stdLibArrayListOfNoSources.kt") public void testStdLibArrayListOfNoSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/stdLibArrayListOfNoSources.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/stdLibArrayListOfNoSources.kt"); } @TestMetadata("stdLibJoinToString.kt") public void testStdLibJoinToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/stdLibJoinToString.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/stdLibJoinToString.kt"); } @TestMetadata("typealias.kt") public void testTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/typealias.kt"); - doSymbolTest(fileName); + runTest("idea/testData/navigation/gotoSymbol/typealias.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java index 00bed147003..7e5624df047 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/parameterInfo/ParameterInfoTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "withLib1/sharedLib", "withLib2/sharedLib", "withLib3/sharedLib"); } @@ -29,26 +33,27 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorCall.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/annotations/ConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/annotations/ConstructorCall.kt"); } @TestMetadata("ConstructorCallWithUseSite.kt") public void testConstructorCallWithUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/annotations/ConstructorCallWithUseSite.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/annotations/ConstructorCallWithUseSite.kt"); } @TestMetadata("FunctionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/annotations/FunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/annotations/FunctionCall.kt"); } } @@ -56,38 +61,37 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayAccess extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayAccess() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/arrayAccess"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/arrayAccess/Overloads.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/arrayAccess/Overloads.kt"); } @TestMetadata("Overloads2.kt") public void testOverloads2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/arrayAccess/Overloads2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/arrayAccess/Overloads2.kt"); } @TestMetadata("Set.kt") public void testSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/arrayAccess/Set.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/arrayAccess/Set.kt"); } @TestMetadata("SetTooManyArgs.kt") public void testSetTooManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/arrayAccess/SetTooManyArgs.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/arrayAccess/SetTooManyArgs.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/arrayAccess/Simple.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/arrayAccess/Simple.kt"); } } @@ -95,290 +99,247 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionCall extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/functionCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DefaultValuesFromLib.kt") public void testDefaultValuesFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/DefaultValuesFromLib.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/DefaultValuesFromLib.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/Deprecated.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/Deprecated.kt"); } @TestMetadata("ExtensionOnCapturedScopeChange.kt") public void testExtensionOnCapturedScopeChange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/ExtensionOnCapturedScopeChange.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/ExtensionOnCapturedScopeChange.kt"); } @TestMetadata("ExtensionOnClassObject.kt") public void testExtensionOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/ExtensionOnClassObject.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/ExtensionOnClassObject.kt"); } @TestMetadata("FunctionalValue1.kt") public void testFunctionalValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/FunctionalValue1.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/FunctionalValue1.kt"); } @TestMetadata("FunctionalValue2.kt") public void testFunctionalValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/FunctionalValue2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/FunctionalValue2.kt"); } @TestMetadata("FunctionalValueAndTypeAlias.kt") public void testFunctionalValueAndTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/FunctionalValueAndTypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/FunctionalValueAndTypeAlias.kt"); } @TestMetadata("FunctionalValueGeneric1.kt") public void testFunctionalValueGeneric1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/FunctionalValueGeneric1.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/FunctionalValueGeneric1.kt"); } @TestMetadata("FunctionalValueGeneric2.kt") public void testFunctionalValueGeneric2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/FunctionalValueGeneric2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/FunctionalValueGeneric2.kt"); } @TestMetadata("InheritedFunctions.kt") public void testInheritedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/InheritedFunctions.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/InheritedFunctions.kt"); } @TestMetadata("InheritedWithCurrentFunctions.kt") public void testInheritedWithCurrentFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/InheritedWithCurrentFunctions.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/InheritedWithCurrentFunctions.kt"); } @TestMetadata("Invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/Invoke.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/Invoke.kt"); } @TestMetadata("LocalFunctionBug.kt") public void testLocalFunctionBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/LocalFunctionBug.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/LocalFunctionBug.kt"); } @TestMetadata("NamedAndDefaultParameter.kt") public void testNamedAndDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NamedAndDefaultParameter.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NamedAndDefaultParameter.kt"); } @TestMetadata("NamedParameter.kt") public void testNamedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NamedParameter.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NamedParameter.kt"); } @TestMetadata("NamedParameter2.kt") public void testNamedParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NamedParameter2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NamedParameter2.kt"); } @TestMetadata("NoAnnotations.kt") public void testNoAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NoAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NoAnnotations.kt"); } @TestMetadata("NoShadowedDeclarations.kt") public void testNoShadowedDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NoShadowedDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NoShadowedDeclarations.kt"); } @TestMetadata("NoShadowedDeclarations2.kt") public void testNoShadowedDeclarations2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NoShadowedDeclarations2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NoShadowedDeclarations2.kt"); } @TestMetadata("NoSynthesizedParameterNames.kt") public void testNoSynthesizedParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NoSynthesizedParameterNames.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NoSynthesizedParameterNames.kt"); } @TestMetadata("NotAccessible.kt") public void testNotAccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NotAccessible.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NotAccessible.kt"); } @TestMetadata("NotGreen.kt") public void testNotGreen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NotGreen.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NotGreen.kt"); } @TestMetadata("Nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/Nullability.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/Nullability.kt"); } @TestMetadata("NullableTypeCall.kt") public void testNullableTypeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/NullableTypeCall.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/NullableTypeCall.kt"); } @TestMetadata("OtherConstructorFromSecondary.kt") public void testOtherConstructorFromSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/OtherConstructorFromSecondary.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/OtherConstructorFromSecondary.kt"); } @TestMetadata("Println.kt") public void testPrintln() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/Println.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/Println.kt"); } @TestMetadata("PrivateConstructor.kt") public void testPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/PrivateConstructor.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/PrivateConstructor.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/Simple.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/Simple.kt"); } @TestMetadata("SimpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SimpleConstructor.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SimpleConstructor.kt"); } @TestMetadata("SmartCastReceiver.kt") public void testSmartCastReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SmartCastReceiver.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SmartCastReceiver.kt"); } @TestMetadata("SmartCastReceiver2.kt") public void testSmartCastReceiver2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SmartCastReceiver2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SmartCastReceiver2.kt"); } @TestMetadata("SubstituteExpectedType.kt") public void testSubstituteExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteExpectedType.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteExpectedType.kt"); } @TestMetadata("SubstituteExplicitTypeArgs.kt") public void testSubstituteExplicitTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteExplicitTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteExplicitTypeArgs.kt"); } @TestMetadata("SubstituteFromArguments1.kt") public void testSubstituteFromArguments1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteFromArguments1.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteFromArguments1.kt"); } @TestMetadata("SubstituteFromArguments2.kt") public void testSubstituteFromArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteFromArguments2.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteFromArguments2.kt"); } @TestMetadata("SubstituteFromArguments3.kt") public void testSubstituteFromArguments3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteFromArguments3.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteFromArguments3.kt"); } @TestMetadata("SubstituteFromArguments4.kt") public void testSubstituteFromArguments4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteFromArguments4.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteFromArguments4.kt"); } @TestMetadata("SubstituteFromArgumentsOnTyping.kt") public void testSubstituteFromArgumentsOnTyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SubstituteFromArgumentsOnTyping.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SubstituteFromArgumentsOnTyping.kt"); } @TestMetadata("SuperConstructorCall.kt") public void testSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SuperConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SuperConstructorCall.kt"); } @TestMetadata("SuperConstructorFromSecondary.kt") public void testSuperConstructorFromSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/SuperConstructorFromSecondary.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/SuperConstructorFromSecondary.kt"); } @TestMetadata("TooManyArgs.kt") public void testTooManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/TooManyArgs.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/TooManyArgs.kt"); } @TestMetadata("TwoFunctions.kt") public void testTwoFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/TwoFunctions.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/TwoFunctions.kt"); } @TestMetadata("TwoFunctionsGrey.kt") public void testTwoFunctionsGrey() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/TwoFunctionsGrey.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/TwoFunctionsGrey.kt"); } @TestMetadata("TwoSmartCasts.kt") public void testTwoSmartCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/TwoSmartCasts.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/TwoSmartCasts.kt"); } @TestMetadata("TypeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/TypeAliasConstructor.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/TypeAliasConstructor.kt"); } @TestMetadata("TypeInference.kt") public void testTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/TypeInference.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/TypeInference.kt"); } @TestMetadata("UpdateOnTyping.kt") public void testUpdateOnTyping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/functionCall/UpdateOnTyping.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/functionCall/UpdateOnTyping.kt"); } } @@ -386,56 +347,52 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/typeArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("BaseClass.kt") public void testBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/BaseClass.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/BaseClass.kt"); } @TestMetadata("Constraints.kt") public void testConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/Constraints.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/Constraints.kt"); } @TestMetadata("ConstructorCall.kt") public void testConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/ConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/ConstructorCall.kt"); } @TestMetadata("FunctionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/FunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/FunctionCall.kt"); } @TestMetadata("JavaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/JavaClass.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/JavaClass.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/Overloads.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/Overloads.kt"); } @TestMetadata("Reified.kt") public void testReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/Reified.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/Reified.kt"); } @TestMetadata("VariableType.kt") public void testVariableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/typeArguments/VariableType.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/typeArguments/VariableType.kt"); } } @@ -443,14 +400,17 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithLib1 extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithLib1() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); } @TestMetadata("useJavaFromLib.kt") public void testUseJavaFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/withLib1/useJavaFromLib.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/withLib1/useJavaFromLib.kt"); } } @@ -458,14 +418,17 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithLib2 extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithLib2() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); } @TestMetadata("useJavaSAMFromLib.kt") public void testUseJavaSAMFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/withLib2/useJavaSAMFromLib.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/withLib2/useJavaSAMFromLib.kt"); } } @@ -473,14 +436,17 @@ public class ParameterInfoTestGenerated extends AbstractParameterInfoTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithLib3 extends AbstractParameterInfoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithLib3() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/parameterInfo/withLib3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "sharedLib"); } @TestMetadata("useJavaSAMFromLib.kt") public void testUseJavaSAMFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/parameterInfo/withLib3/useJavaSAMFromLib.kt"); - doTest(fileName); + runTest("idea/testData/parameterInfo/withLib3/useJavaSAMFromLib.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java index b82894017f8..ee242dcd0f5 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java @@ -21,22 +21,133 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQuickfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + @TestMetadata("idea/testData/quickfix/abstract") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Abstract extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAbstract() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/abstract"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/addAnnotationTarget") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddAnnotationTarget extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddAnnotationTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addAnnotationTarget"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("withJava.before.Main.kt") public void testWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/withJava.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/withJava.before.Main.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/addCrossinline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddCrossinline extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddCrossinline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addCrossinline"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addDataModifier") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddDataModifier extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddDataModifier() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addDataModifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addExclExclCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddExclExclCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddExclExclCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addExclExclCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addGenericUpperBound") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddGenericUpperBound extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddGenericUpperBound() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addGenericUpperBound"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addInitializer") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddInitializer extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddInitializer() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addInitializer"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addInline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddInline extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddInline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addInline"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addInlineToReifiedFunctionFix") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddInlineToReifiedFunctionFix extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddInlineToReifiedFunctionFix() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addInlineToReifiedFunctionFix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -44,14 +155,69 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddJvmDefault extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddJvmDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addJvmDefault"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaDefaultOverride.before.Main.kt") public void testJavaDefaultOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addJvmDefault/javaDefaultOverride.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/addJvmDefault/javaDefaultOverride.before.Main.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/addNewLineAfterAnnotations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddNewLineAfterAnnotations extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddNewLineAfterAnnotations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addNewLineAfterAnnotations"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addNoinline") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddNoinline extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddNoinline() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addNoinline"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddReifiedToTypeParameterOfFunctionFix extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddReifiedToTypeParameterOfFunctionFix() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addRunBeforeLambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddRunBeforeLambda extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddRunBeforeLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addRunBeforeLambda"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -59,733 +225,788 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddStarProjections extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddStarProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/addStarProjections/cast") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Cast extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCast() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/cast"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addStarProjections/checkType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CheckType extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCheckType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/checkType"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addStarProjections/inner") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inner extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInner() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/inner"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addStarProjections/when") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class When extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWhen() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/when"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/addSuspend") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddSuspend extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddSuspend() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addSuspend"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddTypeAnnotationToValueParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddTypeAnnotationToValueParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addTypeAnnotationToValueParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addValVar") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddValVar extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddValVar() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addValVar"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/addVarianceModifier") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddVarianceModifier extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddVarianceModifier() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addVarianceModifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/assignToProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AssignToProperty extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAssignToProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/assignToProperty"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/autoImports") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AutoImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAutoImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousNamePreferFromJdk.before.Main.kt") public void testAmbiguousNamePreferFromJdk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/ambiguousNamePreferFromJdk.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/ambiguousNamePreferFromJdk.before.Main.kt"); } @TestMetadata("ambiguousNamePreferWithImportsFromPackage.before.Main.kt") public void testAmbiguousNamePreferWithImportsFromPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt"); } @TestMetadata("callableReferenceExtension.before.Main.kt") public void testCallableReferenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/callableReferenceExtension.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/callableReferenceExtension.before.Main.kt"); } @TestMetadata("callableReferenceExtension2.before.Main.kt") public void testCallableReferenceExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/callableReferenceExtension2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/callableReferenceExtension2.before.Main.kt"); } @TestMetadata("callableReferenceTopLevel.before.Main.kt") public void testCallableReferenceTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/callableReferenceTopLevel.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/callableReferenceTopLevel.before.Main.kt"); } @TestMetadata("classImport.before.Main.kt") public void testClassImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/classImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/classImport.before.Main.kt"); } @TestMetadata("constructorParameterAnnotation.test") public void testConstructorParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/constructorParameterAnnotation.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/constructorParameterAnnotation.test"); } @TestMetadata("constructorReference.before.Main.kt") public void testConstructorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/constructorReference.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/constructorReference.before.Main.kt"); } @TestMetadata("delegateExtensionBoth.test") public void testDelegateExtensionBoth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateExtensionBoth.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateExtensionBoth.test"); } @TestMetadata("delegateExtensionGet.test") public void testDelegateExtensionGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateExtensionGet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateExtensionGet.test"); } @TestMetadata("delegateExtensionSet.test") public void testDelegateExtensionSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateExtensionSet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateExtensionSet.test"); } @TestMetadata("delegateNoOperator.test") public void testDelegateNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateNoOperator.test"); } @TestMetadata("divOperator.before.Main.kt") public void testDivOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/divOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/divOperator.before.Main.kt"); } @TestMetadata("dslMarkers.before.Main.kt") public void testDslMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/dslMarkers.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/dslMarkers.before.Main.kt"); } @TestMetadata("extensionFunctionImport.before.Main.kt") public void testExtensionFunctionImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionFunctionImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionFunctionImport.before.Main.kt"); } @TestMetadata("extensionFunctionImportImplicitReceiver.before.Main.kt") public void testExtensionFunctionImportImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionFunctionImportImplicitReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionFunctionImportImplicitReceiver.before.Main.kt"); } @TestMetadata("extensionPropertyImport.before.Main.kt") public void testExtensionPropertyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionPropertyImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionPropertyImport.before.Main.kt"); } @TestMetadata("extensionPropertyOnTypeAliasFromExpansion.before.Main.kt") public void testExtensionPropertyOnTypeAliasFromExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromExpansion.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromExpansion.before.Main.kt"); } @TestMetadata("extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt") public void testExtensionPropertyOnTypeAliasFromOtherTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt"); } @TestMetadata("factoryFunctionFromLambda.before.Main.kt") public void testFactoryFunctionFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/factoryFunctionFromLambda.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/factoryFunctionFromLambda.before.Main.kt"); } @TestMetadata("falsePostfixOperator.before.Main.kt") public void testFalsePostfixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt"); } @TestMetadata("functionImport.before.Main.kt") public void testFunctionImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/functionImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/functionImport.before.Main.kt"); } @TestMetadata("importInFirstPartInQualifiedExpression.before.Main.kt") public void testImportInFirstPartInQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.Main.kt"); } @TestMetadata("importInFirstPartInUserType.test") public void testImportInFirstPartInUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importInFirstPartInUserType.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importInFirstPartInUserType.test"); } @TestMetadata("importKotlinCompanionPropertyAsFieldFromJava.test") public void testImportKotlinCompanionPropertyAsFieldFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionPropertyAsFieldFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionPropertyAsFieldFromJava.test"); } @TestMetadata("importKotlinCompanionStaticFunctionFromJava.test") public void testImportKotlinCompanionStaticFunctionFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticFunctionFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticFunctionFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyDefaultGetterFromJava.test") public void testImportKotlinCompanionStaticPropertyDefaultGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultGetterFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyDefaultSetterFromJava.test") public void testImportKotlinCompanionStaticPropertyDefaultSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultSetterFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test") public void testImportKotlinCompanionStaticPropertyOverloadedGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test") public void testImportKotlinCompanionStaticPropertyOverloadedSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test"); } @TestMetadata("importKotlinPropertyAsFieldFromJava.test") public void testImportKotlinPropertyAsFieldFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinPropertyAsFieldFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinPropertyAsFieldFromJava.test"); } @TestMetadata("importKotlinStaticFunctionFromJava.test") public void testImportKotlinStaticFunctionFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticFunctionFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticFunctionFromJava.test"); } @TestMetadata("importKotlinStaticPropertyDefaultGetterFromJava.test") public void testImportKotlinStaticPropertyDefaultGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultGetterFromJava.test"); } @TestMetadata("importKotlinStaticPropertyDefaultSetterFromJava.test") public void testImportKotlinStaticPropertyDefaultSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultSetterFromJava.test"); } @TestMetadata("importKotlinStaticPropertyOverloadedGetterFromJava.test") public void testImportKotlinStaticPropertyOverloadedGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedGetterFromJava.test"); } @TestMetadata("importKotlinStaticPropertyOverloadedSetterFromJava.test") public void testImportKotlinStaticPropertyOverloadedSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedSetterFromJava.test"); } @TestMetadata("importTrait.before.Main.kt") public void testImportTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importTrait.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importTrait.before.Main.kt"); } @TestMetadata("indexCallExtensionGet.test") public void testIndexCallExtensionGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionGet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionGet.test"); } @TestMetadata("indexCallExtensionGetNoOperator.test") public void testIndexCallExtensionGetNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test"); } @TestMetadata("indexCallExtensionImportGetOnNoOperatorWarning.test") public void testIndexCallExtensionImportGetOnNoOperatorWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test"); } @TestMetadata("indexCallExtensionImportSetOnNoOperatorWarning.test") public void testIndexCallExtensionImportSetOnNoOperatorWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test"); } @TestMetadata("indexCallExtensionSet.test") public void testIndexCallExtensionSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionSet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionSet.test"); } @TestMetadata("indexCallNoImportWhenGetNeededButSetAvailable.test") public void testIndexCallNoImportWhenGetNeededButSetAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test"); } @TestMetadata("indexCallNoImportWhenSetNeededButGetAvailable.test") public void testIndexCallNoImportWhenSetNeededButGetAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test"); } @TestMetadata("infixCall.before.Main.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/infixCall.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/infixCall.before.Main.kt"); } @TestMetadata("infixCall2.before.Main.kt") public void testInfixCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/infixCall2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/infixCall2.before.Main.kt"); } @TestMetadata("invokeExtension.test") public void testInvokeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/invokeExtension.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/invokeExtension.test"); } @TestMetadata("invokeExtensionNoOperator.test") public void testInvokeExtensionNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/invokeExtensionNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/invokeExtensionNoOperator.test"); } @TestMetadata("memberImportFunction.test") public void testMemberImportFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportFunction.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportFunction.test"); } @TestMetadata("memberImportJavaField.test") public void testMemberImportJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportJavaField.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportJavaField.test"); } @TestMetadata("memberImportJavaMethod.test") public void testMemberImportJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportJavaMethod.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportJavaMethod.test"); } @TestMetadata("memberImportNotForClassFunction.test") public void testMemberImportNotForClassFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForClassFunction.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForClassFunction.test"); } @TestMetadata("memberImportNotForClassProperty.test") public void testMemberImportNotForClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForClassProperty.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForClassProperty.test"); } @TestMetadata("memberImportNotForJavaNonStaticField.test") public void testMemberImportNotForJavaNonStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test"); } @TestMetadata("memberImportNotForJavaNonStaticMethod.test") public void testMemberImportNotForJavaNonStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test"); } @TestMetadata("memberImportNotForTopLevelFunction.test") public void testMemberImportNotForTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test"); } @TestMetadata("memberImportProperty.test") public void testMemberImportProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportProperty.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportProperty.test"); } @TestMetadata("memberWithTopLevelConflict.before.Main.kt") public void testMemberWithTopLevelConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberWithTopLevelConflict.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberWithTopLevelConflict.before.Main.kt"); } @TestMetadata("minusOperator.before.Main.kt") public void testMinusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/minusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/minusOperator.before.Main.kt"); } @TestMetadata("multiDeclarationExtensionAllComponents.test") public void testMultiDeclarationExtensionAllComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponents.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponents.test"); } @TestMetadata("multiDeclarationExtensionAllComponentsMany.test") public void testMultiDeclarationExtensionAllComponentsMany() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsMany.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsMany.test"); } @TestMetadata("multiDeclarationExtensionAllComponentsPrefereFull.test") public void testMultiDeclarationExtensionAllComponentsPrefereFull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereFull.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereFull.test"); } @TestMetadata("multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test") public void testMultiDeclarationExtensionAllComponentsPrefereNotDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test"); } @TestMetadata("multiDeclarationExtensionComponent1.test") public void testMultiDeclarationExtensionComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent1.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent1.test"); } @TestMetadata("multiDeclarationExtensionComponent2.test") public void testMultiDeclarationExtensionComponent2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent2.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent2.test"); } @TestMetadata("multiDeclarationExtensionComponentNoOperator.test") public void testMultiDeclarationExtensionComponentNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test"); } @TestMetadata("nestedClass.before.Main.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/nestedClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/nestedClass.before.Main.kt"); } @TestMetadata("noFunctionImportOnSimpleName.test") public void testNoFunctionImportOnSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test"); } @TestMetadata("noImportForFunInQualifiedNotFirst.before.Main.kt") public void testNoImportForFunInQualifiedNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt"); } @TestMetadata("noImportForNestedInPrivate.before.Main.kt") public void testNoImportForNestedInPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt"); } @TestMetadata("noImportForPrivateClass.before.Main.kt") public void testNoImportForPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt"); } @TestMetadata("noImportInImports.before.Main.kt") public void testNoImportInImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInImports.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInImports.before.Main.kt"); } @TestMetadata("noImportInQualifiedExpressionNotFirst.before.Main.kt") public void testNoImportInQualifiedExpressionNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt"); } @TestMetadata("noImportInQualifiedUserTypeNotFirst.before.Main.kt") public void testNoImportInQualifiedUserTypeNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInQualifiedUserTypeNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInQualifiedUserTypeNotFirst.before.Main.kt"); } @TestMetadata("noImportInSafeQualifiedExpressionNotFirst.before.Main.kt") public void testNoImportInSafeQualifiedExpressionNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt"); } @TestMetadata("noImportInterfaceRefAsConstructor.before.Main.kt") public void testNoImportInterfaceRefAsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInterfaceRefAsConstructor.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInterfaceRefAsConstructor.before.Main.kt"); } @TestMetadata("noImportsForClassInExcludedPackage.before.Main.kt") public void testNoImportsForClassInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportsForClassInExcludedPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportsForClassInExcludedPackage.before.Main.kt"); } @TestMetadata("noImportsForExcludedClass.before.Main.kt") public void testNoImportsForExcludedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportsForExcludedClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportsForExcludedClass.before.Main.kt"); } @TestMetadata("noImportsForFunctionInExcludedPackage.before.Main.kt") public void testNoImportsForFunctionInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportsForFunctionInExcludedPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportsForFunctionInExcludedPackage.before.Main.kt"); } @TestMetadata("noMemberFunctionImportOnSimpleName.test") public void testNoMemberFunctionImportOnSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test"); } @TestMetadata("noneApplicableFromInstanceButExtension.before.Main.kt") public void testNoneApplicableFromInstanceButExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noneApplicableFromInstanceButExtension.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noneApplicableFromInstanceButExtension.before.Main.kt"); } @TestMetadata("notExcludedClass.before.Main.kt") public void testNotExcludedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/notExcludedClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/notExcludedClass.before.Main.kt"); } @TestMetadata("objectImport.before.Main.kt") public void testObjectImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/objectImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/objectImport.before.Main.kt"); } @TestMetadata("objectMemberFunctionImportWhenReceiverPresent.before.Main.kt") public void testObjectMemberFunctionImportWhenReceiverPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/objectMemberFunctionImportWhenReceiverPresent.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/objectMemberFunctionImportWhenReceiverPresent.before.Main.kt"); } @TestMetadata("operatorAssignPlus.test") public void testOperatorAssignPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/operatorAssignPlus.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/operatorAssignPlus.test"); } @TestMetadata("operatorAssignPlusAssign.test") public void testOperatorAssignPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/operatorAssignPlusAssign.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/operatorAssignPlusAssign.test"); } @TestMetadata("operatorAssignPlusTwoVariantsDifferentPackages.test") public void testOperatorAssignPlusTwoVariantsDifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/operatorAssignPlusTwoVariantsDifferentPackages.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/operatorAssignPlusTwoVariantsDifferentPackages.test"); } @TestMetadata("packageClass.before.Main.kt") public void testPackageClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/packageClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/packageClass.before.Main.kt"); } @TestMetadata("plusOperator.before.Main.kt") public void testPlusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/plusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/plusOperator.before.Main.kt"); } @TestMetadata("plusOperatorWithTypeMismatch.before.Main.kt") public void testPlusOperatorWithTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt"); } @TestMetadata("postfixOperator.before.Main.kt") public void testPostfixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/postfixOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/postfixOperator.before.Main.kt"); } @TestMetadata("propertyImport.before.Main.kt") public void testPropertyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/propertyImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/propertyImport.before.Main.kt"); } @TestMetadata("sameModuleImportPriority.before.Main.kt") public void testSameModuleImportPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/sameModuleImportPriority.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/sameModuleImportPriority.before.Main.kt"); } @TestMetadata("timesAssign.before.Main.kt") public void testTimesAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/timesAssign.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/timesAssign.before.Main.kt"); } @TestMetadata("typeAliasExtensionFunction.before.Main.kt") public void testTypeAliasExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasExtensionFunction.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasExtensionFunction.before.Main.kt"); } @TestMetadata("typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt") public void testTypeAliasExtensionFunctionInTypeAliasChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt"); } @TestMetadata("typeAliasExtensionProperty.before.Main.kt") public void testTypeAliasExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasExtensionProperty.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasExtensionProperty.before.Main.kt"); } @TestMetadata("typeAliasImport.before.Main.kt") public void testTypeAliasImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasImport.before.Main.kt"); } @TestMetadata("unaryMinusOperator.before.Main.kt") public void testUnaryMinusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/unaryMinusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/unaryMinusOperator.before.Main.kt"); } @TestMetadata("unaryPlusOperator.before.Main.kt") public void testUnaryPlusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/unaryPlusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/unaryPlusOperator.before.Main.kt"); } @TestMetadata("withSmartCastQualifier.before.Main.kt") public void testWithSmartCastQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/withSmartCastQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/withSmartCastQualifier.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/autoImports/kt21515") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Kt21515 extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKt21515() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports/kt21515"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/autoImports/mismatchingArgs") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MismatchingArgs extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMismatchingArgs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports/mismatchingArgs"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("checkArgumentTypes.test") public void testCheckArgumentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test"); } @TestMetadata("constantExpectedTypeMismatch.test") public void testConstantExpectedTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/constantExpectedTypeMismatch.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/constantExpectedTypeMismatch.test"); } @TestMetadata("expectedTypeRequired.test") public void testExpectedTypeRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/expectedTypeRequired.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/expectedTypeRequired.test"); } @TestMetadata("extensionExplicitReceiver.test") public void testExtensionExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/extensionExplicitReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/extensionExplicitReceiver.test"); } @TestMetadata("extensionImplicitReceiver.test") public void testExtensionImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/extensionImplicitReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/extensionImplicitReceiver.test"); } @TestMetadata("extensionWrongReceiver.test") public void testExtensionWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/extensionWrongReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/extensionWrongReceiver.test"); } @TestMetadata("ignoreErrorsOutsideCall.test") public void testIgnoreErrorsOutsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/ignoreErrorsOutsideCall.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/ignoreErrorsOutsideCall.test"); } @TestMetadata("lambdaArgument.test") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test"); } @TestMetadata("namedArgument.test") public void testNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test"); } @TestMetadata("notForIncompleteCall.test") public void testNotForIncompleteCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/notForIncompleteCall.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/notForIncompleteCall.test"); } @TestMetadata("smartCast.test") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/smartCast.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/smartCast.test"); } @TestMetadata("topLevelFun.test") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun.test"); } @TestMetadata("topLevelFun_notWithReceiver.test") public void testTopLevelFun_notWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun_notWithReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun_notWithReceiver.test"); } @TestMetadata("typeMismatch.test") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/typeMismatch.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/typeMismatch.test"); } } } + @TestMetadata("idea/testData/quickfix/canBeParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CanBeParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCanBeParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/canBeParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/canBePrimaryConstructorProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CanBePrimaryConstructorProperty extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCanBePrimaryConstructorProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/canBePrimaryConstructorProperty"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/changeSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeSignature extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addJavaMethodParameter.before.Main.kt") public void testAddJavaMethodParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addJavaMethodParameter.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/addJavaMethodParameter.before.Main.kt"); } @TestMetadata("addParameterWithImport.before.Main.kt") public void testAddParameterWithImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt"); } public void testAllFilesPresentInChangeSignature() throws Exception { @@ -794,125 +1015,186 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("matchFunctionLiteralWithSAMType.before.Main.kt") public void testMatchFunctionLiteralWithSAMType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/matchFunctionLiteralWithSAMType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/matchFunctionLiteralWithSAMType.before.Main.kt"); } @TestMetadata("removeJavaMethodParameter.before.Main.kt") public void testRemoveJavaMethodParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeJavaMethodParameter.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/removeJavaMethodParameter.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/changeSignature/jk") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jk extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature/jk"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("jkAddFunctionParameter.before.Main.java") public void testJkAddFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddFunctionParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddFunctionParameter.before.Main.java"); } @TestMetadata("jkAddImplicitPrimaryConstructorParameter.before.Main.java") public void testJkAddImplicitPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddImplicitPrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddImplicitPrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkAddPrimaryConstructorParameter.before.Main.java") public void testJkAddPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddPrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddPrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkAddSecondaryConstructorParameter.before.Main.java") public void testJkAddSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddSecondaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddSecondaryConstructorParameter.before.Main.java"); } @TestMetadata("jkChangeFunctionParameter.before.Main.java") public void testJkChangeFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkChangeFunctionParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkChangeFunctionParameter.before.Main.java"); } @TestMetadata("jkChangePrimaryConstructorParameter.before.Main.java") public void testJkChangePrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkChangePrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkChangePrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkChangeSecondaryConstructorParameter.before.Main.java") public void testJkChangeSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkChangeSecondaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkChangeSecondaryConstructorParameter.before.Main.java"); } @TestMetadata("jkKeepValOnAddingParameter1.before.Main.java") public void testJkKeepValOnAddingParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter1.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter1.before.Main.java"); } @TestMetadata("jkKeepValOnAddingParameter2.before.Main.java") public void testJkKeepValOnAddingParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter2.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter2.before.Main.java"); } @TestMetadata("jkKeepValOnParameterTypeChange.before.Main.java") public void testJkKeepValOnParameterTypeChange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkKeepValOnParameterTypeChange.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkKeepValOnParameterTypeChange.before.Main.java"); } @TestMetadata("jkRemoveFunctionParameter.before.Main.java") public void testJkRemoveFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkRemoveFunctionParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkRemoveFunctionParameter.before.Main.java"); } @TestMetadata("jkRemovePrimaryConstructorParameter.before.Main.java") public void testJkRemovePrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkRemovePrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkRemovePrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkRemoveSecondaryConstructorParameter.before.Main.java") public void testJkRemoveSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkRemoveSecondaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkRemoveSecondaryConstructorParameter.before.Main.java"); } } } + @TestMetadata("idea/testData/quickfix/changeToLabeledReturn") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeToLabeledReturn extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeToLabeledReturn() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeToLabeledReturn"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/changeToUseSpreadOperator") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeToUseSpreadOperator extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeToUseSpreadOperator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeToUseSpreadOperator"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/checkArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/checkArguments/addNameToArgument") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddNameToArgument extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddNameToArgument() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments/addNameToArgument"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/conflictingImports") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConflictingImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConflictingImports() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/conflictingImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/convertJavaInterfaceToClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertJavaInterfaceToClass extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertJavaInterfaceToClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/convertJavaInterfaceToClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("kotlinInheritor.before.Main.java") public void testKotlinInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/convertJavaInterfaceToClass/kotlinInheritor.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/convertJavaInterfaceToClass/kotlinInheritor.before.Main.java"); + } + } + + @TestMetadata("idea/testData/quickfix/convertPropertyInitializerToGetter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConvertPropertyInitializerToGetter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConvertPropertyInitializerToGetter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/convertPropertyInitializerToGetter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -920,6 +1202,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateFromUsage extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateFromUsage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -928,6 +1214,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateClass extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -936,26 +1226,27 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationEntry extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationEntry() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("nestedGroovyAnnotation.before.Main.kt") public void testNestedGroovyAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedGroovyAnnotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedGroovyAnnotation.before.Main.kt"); } @TestMetadata("nestedJavaAnnotation.before.Main.kt") public void testNestedJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotation.before.Main.kt"); } @TestMetadata("nestedJavaAnnotationWithNamedArgs.before.Main.kt") public void testNestedJavaAnnotationWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotationWithNamedArgs.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotationWithNamedArgs.before.Main.kt"); } } @@ -963,112 +1254,104 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallExpression extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("callInAnnotationEntryWithJavaQualifier.before.Main.kt") public void testCallInAnnotationEntryWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt"); } @TestMetadata("callWithExplicitParamNamesAndJavaQualifier.before.Main.kt") public void testCallWithExplicitParamNamesAndJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExplicitParamNamesAndJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExplicitParamNamesAndJavaQualifier.before.Main.kt"); } @TestMetadata("callWithFinalJavaSupertype.before.Main.kt") public void testCallWithFinalJavaSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt"); } @TestMetadata("callWithGenericJavaReceiver.before.Main.kt") public void testCallWithGenericJavaReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGenericJavaReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGenericJavaReceiver.before.Main.kt"); } @TestMetadata("callWithGroovyClassQualifier.before.Main.kt") public void testCallWithGroovyClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt"); } @TestMetadata("callWithJavaClassQualifier.before.Main.kt") public void testCallWithJavaClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassQualifier.before.Main.kt"); } @TestMetadata("callWithJavaClassReceiver.before.Main.kt") public void testCallWithJavaClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassReceiver.before.Main.kt"); } @TestMetadata("callWithJavaQualifierInMemberValDelegate.before.Main.kt") public void testCallWithJavaQualifierInMemberValDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.before.Main.kt"); } @TestMetadata("callWithSuperclassAndJavaReceiverNoConstructorParams.before.Main.kt") public void testCallWithSuperclassAndJavaReceiverNoConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassAndJavaReceiverNoConstructorParams.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassAndJavaReceiverNoConstructorParams.before.Main.kt"); } @TestMetadata("callWithSuperclassConstructorParamsAndJavaReceiver.before.Main.kt") public void testCallWithSuperclassConstructorParamsAndJavaReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassConstructorParamsAndJavaReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassConstructorParamsAndJavaReceiver.before.Main.kt"); } @TestMetadata("callWithSupertraitAndJavaReceiver.before.Main.kt") public void testCallWithSupertraitAndJavaReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSupertraitAndJavaReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSupertraitAndJavaReceiver.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaClassMember.before.Main.kt") public void testJavaClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMember.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMember.before.Main.kt"); } @TestMetadata("javaClassMemberInner.before.Main.kt") public void testJavaClassMemberInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInner.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInner.before.Main.kt"); } @TestMetadata("javaClassMemberInnerPartialSubstitution.before.Main.kt") public void testJavaClassMemberInnerPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerPartialSubstitution.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerPartialSubstitution.before.Main.kt"); } @TestMetadata("javaClassMemberInnerWithReceiverArg.before.Main.kt") public void testJavaClassMemberInnerWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerWithReceiverArg.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerWithReceiverArg.before.Main.kt"); } @TestMetadata("javaClassMemberPartialSubstitution.before.Main.kt") public void testJavaClassMemberPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); } } } @@ -1077,32 +1360,32 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegationSpecifier extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegationSpecifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("delegatorToNestedJavaSupercall.before.Main.kt") public void testDelegatorToNestedJavaSupercall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercall.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercall.before.Main.kt"); } @TestMetadata("delegatorToNestedJavaSupercallWithParamNames.before.Main.kt") public void testDelegatorToNestedJavaSupercallWithParamNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercallWithParamNames.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercallWithParamNames.before.Main.kt"); } @TestMetadata("traitDelegatorToNestedGroovySuperclass.before.Main.kt") public void testTraitDelegatorToNestedGroovySuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedGroovySuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedGroovySuperclass.before.Main.kt"); } @TestMetadata("traitDelegatorToNestedJavaSuperclass.before.Main.kt") public void testTraitDelegatorToNestedJavaSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedJavaSuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedJavaSuperclass.before.Main.kt"); } } @@ -1110,50 +1393,60 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportDirective extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportDirective() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("annotationWithJavaQualifier.before.Main.kt") public void testAnnotationWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationWithJavaQualifier.before.Main.kt"); } @TestMetadata("classWithGroovyQualifier.before.Main.kt") public void testClassWithGroovyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt"); } @TestMetadata("classWithJavaQualifier.before.Main.kt") public void testClassWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithJavaQualifier.before.Main.kt"); } @TestMetadata("enumEntryInJavaEnum.before.Main.kt") public void testEnumEntryInJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt"); } @TestMetadata("enumWithJavaQualifier.before.Main.kt") public void testEnumWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumWithJavaQualifier.before.Main.kt"); } @TestMetadata("objectWithJavaQualifier.before.Main.kt") public void testObjectWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt"); } @TestMetadata("traitWithJavaQualifier.before.Main.kt") public void testTraitWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitWithJavaQualifier.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Kt21515 extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKt21515() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } } @@ -1161,62 +1454,57 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReferenceExpression extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferenceExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("classByNestedGroovyQualifier.before.Main.kt") public void testClassByNestedGroovyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt"); } @TestMetadata("classByNestedJavaQualifier.before.Main.kt") public void testClassByNestedJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedJavaQualifier.before.Main.kt"); } @TestMetadata("enumByNestedJavaQualifier.before.Main.kt") public void testEnumByNestedJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByNestedJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByNestedJavaQualifier.before.Main.kt"); } @TestMetadata("enumEntryWithJavaEnumQualifier.before.Main.kt") public void testEnumEntryWithJavaEnumQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt"); } @TestMetadata("enumEntryWithJavaEnumSuperclass.before.Main.kt") public void testEnumEntryWithJavaEnumSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt"); } @TestMetadata("enumEntryWithJavaNonEnumQualifier.before.Main.kt") public void testEnumEntryWithJavaNonEnumQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt"); } @TestMetadata("enumEntryWithJavaNonEnumSuperclass.before.Main.kt") public void testEnumEntryWithJavaNonEnumSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt"); } @TestMetadata("objectWithJavaQualifier.before.Main.kt") public void testObjectWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt"); } @TestMetadata("traitByNestedJavaQualifier.before.Main.kt") public void testTraitByNestedJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitByNestedJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitByNestedJavaQualifier.before.Main.kt"); } } @@ -1224,44 +1512,42 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("annotationJavaTypeReceiver.before.Main.kt") public void testAnnotationJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationJavaTypeReceiver.before.Main.kt"); } @TestMetadata("classGroovyTypeReceiver.before.Main.kt") public void testClassGroovyTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classGroovyTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classGroovyTypeReceiver.before.Main.kt"); } @TestMetadata("classJavaTypeReceiver.before.Main.kt") public void testClassJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classJavaTypeReceiver.before.Main.kt"); } @TestMetadata("enumEntryJavaEnumReceiver.before.Main.kt") public void testEnumEntryJavaEnumReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryJavaEnumReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryJavaEnumReceiver.before.Main.kt"); } @TestMetadata("enumJavaTypeReceiver.before.Main.kt") public void testEnumJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumJavaTypeReceiver.before.Main.kt"); } @TestMetadata("traitJavaTypeReceiver.before.Main.kt") public void testTraitJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/traitJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/traitJavaTypeReceiver.before.Main.kt"); } } } @@ -1270,130 +1556,299 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateFunction extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BinaryOperations extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInBinaryOperations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("extensionFunOnGroovyType.before.Main.kt") public void testExtensionFunOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnGroovyType.before.Main.kt"); } @TestMetadata("extensionFunOnJavaType.before.Main.kt") public void testExtensionFunOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnJavaType.before.Main.kt"); } @TestMetadata("extensionFunOnTypeFromAnotherPackage.before.Main.kt") public void testExtensionFunOnTypeFromAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnTypeFromAnotherPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnTypeFromAnotherPackage.before.Main.kt"); } @TestMetadata("funOnGroovyType.before.Main.kt") public void testFunOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt"); } @TestMetadata("funOnJavaInterface.before.Main.kt") public void testFunOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaInterface.before.Main.kt"); } @TestMetadata("funOnJavaType.before.Main.kt") public void testFunOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaType.before.Main.kt"); } @TestMetadata("genericFunOnJavaType.before.Main.kt") public void testGenericFunOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/genericFunOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/genericFunOnJavaType.before.Main.kt"); } @TestMetadata("staticExtensionFunOnJavaClass.before.Main.kt") public void testStaticExtensionFunOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt"); } @TestMetadata("staticFunOnJavaClass.before.Main.kt") public void testStaticFunOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaClass.before.Main.kt"); } @TestMetadata("staticFunOnJavaInterface.before.Main.kt") public void testStaticFunOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Abstract extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAbstract() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/abstract"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExtensionByExtensionReceiver extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExtensionByExtensionReceiver() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaClassMember.before.Main.kt") public void testJavaClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMember.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMember.before.Main.kt"); } @TestMetadata("javaClassMemberPartialSubstitution.before.Main.kt") public void testJavaClassMemberPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); } @TestMetadata("javaClassMemberWithReceiverArg.before.Main.kt") public void testJavaClassMemberWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberWithReceiverArg.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberWithReceiverArg.before.Main.kt"); } } } + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CallableReferences extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCallableReferences() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/callableReferences"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/component") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Component extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInComponent() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/component"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DelegateAccessors extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDelegateAccessors() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/fromJava") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromJava extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/fromJava"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("classMember.before.Main.java") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/fromJava/classMember.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/fromJava/classMember.before.Main.java"); } @TestMetadata("companionMember.before.Main.java") public void testCompanionMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/fromJava/companionMember.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/fromJava/companionMember.before.Main.java"); } @TestMetadata("topLevel.before.Main.java") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/fromJava/topLevel.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/fromJava/topLevel.before.Main.java"); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/get") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Get extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInGet() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/get"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/hasNext") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class HasNext extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInHasNext() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/hasNext"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/invoke") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Invoke extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInvoke() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/invoke"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/iterator") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Iterator extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIterator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/iterator"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/next") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Next extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNext() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/next"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/set") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Set extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSet() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/set"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnaryOperations extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnaryOperations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } } @@ -1402,32 +1857,32 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateSecondaryConstructor extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateSecondaryConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("delegatorToSuperCallJavaClass.before.Main.kt") public void testDelegatorToSuperCallJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCallJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCallJavaClass.before.Main.kt"); } @TestMetadata("groovyConstructor.before.Main.kt") public void testGroovyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt"); } @TestMetadata("javaConstructor.before.Main.kt") public void testJavaConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/javaConstructor.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/javaConstructor.before.Main.kt"); } @TestMetadata("superCallJavaClass.before.Main.kt") public void testSuperCallJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallJavaClass.before.Main.kt"); } } @@ -1435,6 +1890,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateTypeAlias extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeAlias"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1443,14 +1902,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaUserTypeReceiver.test") public void testJavaUserTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/javaUserTypeReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/javaUserTypeReceiver.test"); } } } @@ -1459,31 +1921,81 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateTypeParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InContainingDeclaration extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInContainingDeclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InReferencedDeclaration extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInReferencedDeclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } } @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateVariable extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LocalVariable extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLocalVariable() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/localVariable"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("platformType.before.Main.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt"); } } @@ -1491,20 +2003,22 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimaryParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimaryParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("staticValOnJavaClass.before.Main.kt") public void testStaticValOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt"); } @TestMetadata("valOnJavaType.before.Main.kt") public void testValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt"); } } @@ -1512,140 +2026,190 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("extensionPropertyOnTypeFromAnotherPackage.before.Main.kt") public void testExtensionPropertyOnTypeFromAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionPropertyOnTypeFromAnotherPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionPropertyOnTypeFromAnotherPackage.before.Main.kt"); } @TestMetadata("extensionValOnGroovyType.before.Main.kt") public void testExtensionValOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnGroovyType.before.Main.kt"); } @TestMetadata("extensionValOnJavaType.before.Main.kt") public void testExtensionValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnJavaType.before.Main.kt"); } @TestMetadata("staticExtensionValOnJavaType.before.Main.kt") public void testStaticExtensionValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt"); } @TestMetadata("staticValOnJavaClass.before.Main.kt") public void testStaticValOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaClass.before.Main.kt"); } @TestMetadata("staticValOnJavaInterface.before.Main.kt") public void testStaticValOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaInterface.before.Main.kt"); } @TestMetadata("staticVarOnJavaInterface.before.Main.kt") public void testStaticVarOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt"); } @TestMetadata("valOnGroovyType.before.Main.kt") public void testValOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt"); } @TestMetadata("valOnJavaInterface.before.Main.kt") public void testValOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt"); } @TestMetadata("valOnJavaType.before.Main.kt") public void testValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaType.before.Main.kt"); } @TestMetadata("varOnJavaType.before.Main.kt") public void testVarOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/varOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/varOnJavaType.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Abstract extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAbstract() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property/abstract"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FieldFromJava extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFieldFromJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("classMemberLateinitVar.before.Main.java") public void testClassMemberLateinitVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/classMemberLateinitVar.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/classMemberLateinitVar.before.Main.java"); } @TestMetadata("classMemberVar.before.Main.java") public void testClassMemberVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/classMemberVar.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/classMemberVar.before.Main.java"); } @TestMetadata("companionMemberVar.before.Main.java") public void testCompanionMemberVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/companionMemberVar.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/companionMemberVar.before.Main.java"); } @TestMetadata("topLevelVar.before.Main.java") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/topLevelVar.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava/topLevelVar.before.Main.java"); } } } } } + @TestMetadata("idea/testData/quickfix/createLabel") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CreateLabel extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCreateLabel() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createLabel"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/decreaseVisibility") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DecreaseVisibility extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDecreaseVisibility() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/decreaseVisibility"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedSymbolUsage extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaDeprecated.before.Main.kt") public void testJavaDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt"); } @TestMetadata("toMethodFromCompanionObject.before.Main.kt") public void testToMethodFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/toMethodFromCompanionObject.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/toMethodFromCompanionObject.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ArgumentSideEffects extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInArgumentSideEffects() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassUsages extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addImportFromSamePackage.before.Main.kt") public void testAddImportFromSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/addImportFromSamePackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/addImportFromSamePackage.before.Main.kt"); } public void testAllFilesPresentInClassUsages() throws Exception { @@ -1656,50 +2220,65 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("annotation.before.Main.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/annotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/annotation.before.Main.kt"); } } } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunctionLiteralArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunctionLiteralArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addImportForOperator.before.Main.kt") public void testAddImportForOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportForOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportForOperator.before.Main.kt"); } @TestMetadata("addImportFromSamePackage.before.Main.kt") public void testAddImportFromSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage.before.Main.kt"); } @TestMetadata("addImportFromSamePackage2.before.Main.kt") public void testAddImportFromSamePackage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage2.before.Main.kt"); } @TestMetadata("addImportFromSamePackage3.before.Main.kt") public void testAddImportFromSamePackage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage3.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage3.before.Main.kt"); } @TestMetadata("addImports.before.Main.kt") public void testAddImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImports.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImports.before.Main.kt"); } public void testAllFilesPresentInImports() throws Exception { @@ -1708,8 +2287,85 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("rootPackage.before.Main.kt") public void testRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/rootPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/rootPackage.before.Main.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KeepComments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKeepComments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/keepComments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KeepLineBreaks extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKeepLineBreaks() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OperatorCalls extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOperatorCalls() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OptionalParameters extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOptionalParameters() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PublishedApi extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPublishedApi() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SafeCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSafeCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/safeCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -1717,6 +2373,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeAliases extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeAliases() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1725,14 +2385,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("typealias.before.Main.kt") public void testTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject/typealias.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject/typealias.before.Main.kt"); } } } @@ -1741,14 +2404,30 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("platformType.before.Main.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/platformType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/platformType.before.Main.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Vararg extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInVararg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/vararg"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -1756,60 +2435,230 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("function.before.Main.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/function.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/function.before.Main.kt"); } @TestMetadata("property.before.Main.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/property.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/property.before.Main.kt"); } } } + @TestMetadata("idea/testData/quickfix/expressions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Expressions extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExpressions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/expressions"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/foldTryCatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FoldTryCatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFoldTryCatch() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/foldTryCatch"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/implement") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Implement extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInImplement() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/implement"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/increaseVisibility") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IncreaseVisibility extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIncreaseVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/increaseVisibility"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("privateMemberToInternalMultiFile.before.Main.kt") public void testPrivateMemberToInternalMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateMemberToInternalMultiFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateMemberToInternalMultiFile.before.Main.kt"); } @TestMetadata("privateTopLevelFunInFile.before.Main.kt") public void testPrivateTopLevelFunInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelFunInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelFunInFile.before.Main.kt"); } @TestMetadata("privateTopLevelValInFile.before.Main.kt") public void testPrivateTopLevelValInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelValInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelValInFile.before.Main.kt"); } @TestMetadata("privateTopLevelVarInFile.before.Main.kt") public void testPrivateTopLevelVarInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelVarInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelVarInFile.before.Main.kt"); } @TestMetadata("privateTopLevelVarWithSetterInFile.before.Main.kt") public void testPrivateTopLevelVarWithSetterInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelVarWithSetterInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelVarWithSetterInFile.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InvisibleFake extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInvisibleFake() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/increaseVisibility/invisibleFake"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/initializeWithConstructorParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InitializeWithConstructorParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInitializeWithConstructorParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/initializeWithConstructorParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/inlineTypeParameterFix") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineTypeParameterFix extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineTypeParameterFix() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/inlineTypeParameterFix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/insertDelegationCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InsertDelegationCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInsertDelegationCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/insertDelegationCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/kdocMissingDocumentation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KdocMissingDocumentation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKdocMissingDocumentation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/kdocMissingDocumentation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/lateinit") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lateinit extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLateinit() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/lateinit"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/leakingThis") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LeakingThis extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLeakingThis() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/leakingThis"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/libraries") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Libraries extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLibraries() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/libraries"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/makeConstructorParameterProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MakeConstructorParameterProperty extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMakeConstructorParameterProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/makeConstructorParameterProperty"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/makeTypeParameterReified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MakeTypeParameterReified extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMakeTypeParameterReified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/makeTypeParameterReified"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -1817,14 +2666,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberVisibilityCanBePrivate extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberVisibilityCanBePrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/memberVisibilityCanBePrivate"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("getter.before.Main.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt"); } } @@ -1832,28 +2684,47 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + @TestMetadata("idea/testData/quickfix/migration/commasInWhenWithoutArgument") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CommasInWhenWithoutArgument extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCommasInWhenWithoutArgument() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/commasInWhenWithoutArgument"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/migration/conflictingExtension") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConflictingExtension extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConflictingExtension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/conflictingExtension"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("removeImports.before.Main.kt") public void testRemoveImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/removeImports.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/removeImports.before.Main.kt"); } @TestMetadata("removeImportsOverloads.before.Main.kt") public void testRemoveImportsOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/removeImportsOverloads.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/removeImportsOverloads.before.Main.kt"); } } @@ -1861,87 +2732,230 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAnnotationPositionedArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAnnotationPositionedArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/javaAnnotationPositionedArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("basicMultiple.before.Main.kt") public void testBasicMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/basicMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/basicMultiple.before.Main.kt"); } @TestMetadata("noValueForArgumentMultiple.before.Main.kt") public void testNoValueForArgumentMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/noValueForArgumentMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/noValueForArgumentMultiple.before.Main.kt"); } @TestMetadata("wrongTypeMultiple.before.Main.kt") public void testWrongTypeMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt"); } } + + @TestMetadata("idea/testData/quickfix/migration/jsExternal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JsExternal extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJsExternal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/jsExternal"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/migration/missingConstructorKeyword") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MissingConstructorKeyword extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMissingConstructorKeyword() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/missingConstructorKeyword"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/migration/obsoleteLabelSyntax") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ObsoleteLabelSyntax extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInObsoleteLabelSyntax() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/obsoleteLabelSyntax"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/migration/removeNameFromFunctionExpression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveNameFromFunctionExpression extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveNameFromFunctionExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/removeNameFromFunctionExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/migration/typeParameterList") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeParameterList extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeParameterList() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/typeParameterList"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/missingConstructorBrackets") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MissingConstructorBrackets extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMissingConstructorBrackets() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/missingConstructorBrackets"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/modifiers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("constVal.before.Main.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/constVal.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/modifiers/constVal.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddOpenToClassDeclaration extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddOpenToClassDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("finalJavaSupertype.before.Main.kt") public void testFinalJavaSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt"); } @TestMetadata("finalJavaUpperBound.before.Main.kt") public void testFinalJavaUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt"); } } + + @TestMetadata("idea/testData/quickfix/modifiers/suspend") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Suspend extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSuspend() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/suspend"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/moveReceiverAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MoveReceiverAnnotation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMoveReceiverAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/moveReceiverAnnotation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/moveToConstructorParameters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MoveToConstructorParameters extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMoveToConstructorParameters() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/moveToConstructorParameters"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/nullables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullables extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/nullables/unsafeInfixCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnsafeInfixCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnsafeInfixCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables/unsafeInfixCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } } @TestMetadata("idea/testData/quickfix/optimizeImports") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OptimizeImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizeImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/optimizeImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("notRemoveImportsForTypeAliases.before.Main.kt") public void testNotRemoveImportsForTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/optimizeImports/notRemoveImportsForTypeAliases.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/optimizeImports/notRemoveImportsForTypeAliases.before.Main.kt"); } } @@ -1949,6 +2963,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1957,93 +2975,549 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NothingToOverride extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNothingToOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/nothingToOverride"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("import.before.Main.kt") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/import.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/import.before.Main.kt"); } @TestMetadata("overrideJavaMethodWithAnnotation.test") public void testOverrideJavaMethodWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/overrideJavaMethodWithAnnotation.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/overrideJavaMethodWithAnnotation.test"); } @TestMetadata("twoPackages.before.Main.kt") public void testTwoPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/twoPackages.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/twoPackages.before.Main.kt"); } } + + @TestMetadata("idea/testData/quickfix/override/typeMismatchOnOverride") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeMismatchOnOverride extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeMismatchOnOverride() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/typeMismatchOnOverride"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/platformClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PlatformClasses extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPlatformClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/platformClasses"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/platformTypesInspection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PlatformTypesInspection extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPlatformTypesInspection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/platformTypesInspection"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/primitiveCastToConversion") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrimitiveCastToConversion extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPrimitiveCastToConversion() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/primitiveCastToConversion"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/properties") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/properties"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExtensionPropertyInitializerToGetter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExtensionPropertyInitializerToGetter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/protectedInFinal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ProtectedInFinal extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInProtectedInFinal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/protectedInFinal"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/redundantIf") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RedundantIf extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRedundantIf() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantIf"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/redundantModalityModifier") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RedundantModalityModifier extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRedundantModalityModifier() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantModalityModifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/redundantSemicolon") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RedundantSemicolon extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRedundantSemicolon() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantSemicolon"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/redundantSuspend") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RedundantSuspend extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRedundantSuspend() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantSuspend"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/redundantVisibilityModifier") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RedundantVisibilityModifier extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRedundantVisibilityModifier() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantVisibilityModifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAnnotation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeAnnotation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeAtFromAnnotationArgument") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveAtFromAnnotationArgument extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveAtFromAnnotationArgument() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeAtFromAnnotationArgument"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeFinalUpperBound") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveFinalUpperBound extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveFinalUpperBound() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeFinalUpperBound"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeNoConstructor") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveNoConstructor extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveNoConstructor() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeNoConstructor"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeRedundantAssignment") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveRedundantAssignment extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveRedundantAssignment() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeRedundantAssignment"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeRedundantInitializer") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveRedundantInitializer extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveRedundantInitializer() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeRedundantInitializer"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeSingleLambdaParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveSingleLambdaParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveSingleLambdaParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeSingleLambdaParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeSuspend") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveSuspend extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveSuspend() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeSuspend"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/removeToStringInStringTemplate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveToStringInStringTemplate extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveToStringInStringTemplate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeToStringInStringTemplate"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/removeUnused") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnused extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveUnused() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnused"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaTriangle.before.Main.kt") public void testJavaTriangle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangle.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangle.before.Main.kt"); } @TestMetadata("javaTriangle2.before.Main.kt") public void testJavaTriangle2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt"); } @TestMetadata("javaTriangle3.before.Main.kt") public void testJavaTriangle3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt"); } @TestMetadata("javaTriangleUnused.before.Main.kt") public void testJavaTriangleUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangleUnused.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangleUnused.before.Main.kt"); } @TestMetadata("javaTriangleUnused2.before.Main.kt") public void testJavaTriangleUnused2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangleUnused2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangleUnused2.before.Main.kt"); } @TestMetadata("secondaryConstructorFromJava.before.Main.kt") public void testSecondaryConstructorFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/secondaryConstructorFromJava.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/secondaryConstructorFromJava.before.Main.kt"); } @TestMetadata("secondaryConstructorFromJavaDelegate.before.Main.kt") public void testSecondaryConstructorFromJavaDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/secondaryConstructorFromJavaDelegate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/secondaryConstructorFromJavaDelegate.before.Main.kt"); } @TestMetadata("usedObjectAsAliasMulti.before.Main.kt") public void testUsedObjectAsAliasMulti() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/removeUnusedReceiver") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveUnusedReceiver extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveUnusedReceiver() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnusedReceiver"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/renameToRem") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RenameToRem extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRenameToRem() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/renameToRem"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/renameToUnderscore") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RenameToUnderscore extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRenameToUnderscore() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/renameToUnderscore"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/renameUnresolvedReference") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RenameUnresolvedReference extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRenameUnresolvedReference() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/renameUnresolvedReference"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ReplaceInfixOrOperatorCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReplaceInfixOrOperatorCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceInfixOrOperatorCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/replaceJvmFieldWithConst") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ReplaceJvmFieldWithConst extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReplaceJvmFieldWithConst() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceJvmFieldWithConst"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/replaceWithArrayCallInAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ReplaceWithArrayCallInAnnotation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReplaceWithArrayCallInAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithArrayCallInAnnotation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/replaceWithDotCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ReplaceWithDotCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReplaceWithDotCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithDotCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/replaceWithSafeCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ReplaceWithSafeCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReplaceWithSafeCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithSafeCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ReplaceWithSafeCallForScopeFunction extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReplaceWithSafeCallForScopeFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithSafeCallForScopeFunction"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/simplifyComparison") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimplifyComparison extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimplifyComparison() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/simplifyComparison"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/specifyOverrideExplicitly") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SpecifyOverrideExplicitly extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSpecifyOverrideExplicitly() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/specifyOverrideExplicitly"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/superTypeIsExtensionType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SuperTypeIsExtensionType extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSuperTypeIsExtensionType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/superTypeIsExtensionType"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/supercalls") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Supercalls extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSupercalls() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supercalls"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/supertypeInitialization") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SupertypeInitialization extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSupertypeInitialization() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supertypeInitialization"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -2051,17 +3525,168 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuppress() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + @TestMetadata("idea/testData/quickfix/suppress/annotationPosition") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotationPosition extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAnnotationPosition() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/annotationPosition"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/suppress/availability") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Availability extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAvailability() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/availability"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/suppress/declarationKinds") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DeclarationKinds extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDeclarationKinds() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/declarationKinds"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/suppress/errorRecovery") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ErrorRecovery extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInErrorRecovery() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/errorRecovery"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + @TestMetadata("idea/testData/quickfix/suppress/forStatement") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForStatement extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/suppress/forStatement/unavailable") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Unavailable extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnavailable() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement/unavailable"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/suppress/inspections") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Inspections extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInspections() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/inspections"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SurroundWithArrayOfForNamedArgumentsToVarargs extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSurroundWithArrayOfForNamedArgumentsToVarargs() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/surroundWithNullCheck") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SurroundWithNullCheck extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSurroundWithNullCheck() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/surroundWithNullCheck"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/toString") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ToString extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInToString() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/toString"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/tooLongCharLiteralToString") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TooLongCharLiteralToString extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTooLongCharLiteralToString() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/tooLongCharLiteralToString"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeAddition") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeAddition extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeAddition() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeAddition"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -2069,14 +3694,30 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("importFromAnotherFile.before.Main.kt") public void testImportFromAnotherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/importFromAnotherFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeImports/importFromAnotherFile.before.Main.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/typeInferenceExpectedTypeMismatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeInferenceExpectedTypeMismatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeInferenceExpectedTypeMismatch() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeInferenceExpectedTypeMismatch"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } @@ -2084,10 +3725,13 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addArrayOfTypeForJavaAnnotation.before.Main.kt") public void testAddArrayOfTypeForJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addArrayOfTypeForJavaAnnotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeMismatch/addArrayOfTypeForJavaAnnotation.before.Main.kt"); } public void testAllFilesPresentInTypeMismatch() throws Exception { @@ -2096,30 +3740,205 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("paramTypeInOverrides.before.Main.kt") public void testParamTypeInOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/paramTypeInOverrides.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeMismatch/paramTypeInOverrides.before.Main.kt"); + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/casts") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Casts extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCasts() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/casts"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ComponentFunctionReturnTypeMismatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInComponentFunctionReturnTypeMismatch() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/convertCollection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConvertCollection extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConvertCollection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/convertCollection"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/fixOverloadedOperator") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FixOverloadedOperator extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFixOverloadedOperator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/fixOverloadedOperator"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/typeMismatch/genericVarianceViolation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericVarianceViolation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericVarianceViolation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/genericVarianceViolation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("basicMultiple.before.Main.kt") public void testBasicMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/genericVarianceViolation/basicMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeMismatch/genericVarianceViolation/basicMultiple.before.Main.kt"); } } + + @TestMetadata("idea/testData/quickfix/typeMismatch/numberConversion") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NumberConversion extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNumberConversion() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/numberConversion"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParameterTypeMismatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInParameterTypeMismatch() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/parameterTypeMismatch"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeMismatchOnReturnedExpression extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeMismatchOnReturnedExpression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WrongPrimitive extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWrongPrimitive() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/wrongPrimitive"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/typeOfAnnotationMember") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeOfAnnotationMember extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeOfAnnotationMember() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeOfAnnotationMember"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeParameters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeParameters extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeParameters() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeParameters"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/typeProjection") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeProjection extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeProjection() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeProjection"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/unnecessaryLateinit") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnnecessaryLateinit extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnnecessaryLateinit() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/unnecessaryLateinit"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/unusedSuppressAnnotation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnusedSuppressAnnotation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnusedSuppressAnnotation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/unusedSuppressAnnotation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } } @TestMetadata("idea/testData/quickfix/variables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -2128,9 +3947,117 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeMutability extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } + + @TestMetadata("idea/testData/quickfix/variables/changeMutability/canBeVal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CanBeVal extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCanBeVal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability/canBeVal"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/variables/changeToFunctionInvocation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeToFunctionInvocation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeToFunctionInvocation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToFunctionInvocation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/variables/changeToPropertyAccess") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeToPropertyAccess extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeToPropertyAccess() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToPropertyAccess"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/variables/removeValVarFromParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class RemoveValVarFromParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInRemoveValVarFromParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/removeValVarFromParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("idea/testData/quickfix/when") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class When extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWhen() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/when"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/wrapWithSafeLetCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WrapWithSafeLetCall extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWrapWithSafeLetCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/wrapWithSafeLetCall"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/wrongLongSuffix") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WrongLongSuffix extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWrongLongSuffix() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/wrongLongSuffix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("idea/testData/quickfix/yieldUnsupported") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class YieldUnsupported extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInYieldUnsupported() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/yieldUnsupported"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java.172 b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java.172 index 7109afef05f..0cf1b7a6dbc 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java.172 +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java.172 @@ -15,12 +15,17 @@ import org.junit.runner.RunWith; import java.io.File; import java.util.regex.Pattern; +// TODO /** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ @SuppressWarnings("all") @TestMetadata("idea/testData/quickfix") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQuickfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -29,14 +34,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddAnnotationTarget extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddAnnotationTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addAnnotationTarget"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("withJava.before.Main.kt") public void testWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/withJava.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/withJava.before.Main.kt"); } } @@ -44,14 +52,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddJvmDefault extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddJvmDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addJvmDefault"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaDefaultOverride.before.Main.kt") public void testJavaDefaultOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addJvmDefault/javaDefaultOverride.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/addJvmDefault/javaDefaultOverride.before.Main.kt"); } } @@ -59,6 +70,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddStarProjections extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddStarProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -68,706 +83,599 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AutoImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAutoImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousNamePreferFromJdk.before.Main.kt") public void testAmbiguousNamePreferFromJdk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/ambiguousNamePreferFromJdk.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/ambiguousNamePreferFromJdk.before.Main.kt"); } @TestMetadata("ambiguousNamePreferWithImportsFromPackage.before.Main.kt") public void testAmbiguousNamePreferWithImportsFromPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/ambiguousNamePreferWithImportsFromPackage.before.Main.kt"); } @TestMetadata("callableReferenceExtension.before.Main.kt") public void testCallableReferenceExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/callableReferenceExtension.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/callableReferenceExtension.before.Main.kt"); } @TestMetadata("callableReferenceExtension2.before.Main.kt") public void testCallableReferenceExtension2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/callableReferenceExtension2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/callableReferenceExtension2.before.Main.kt"); } @TestMetadata("callableReferenceTopLevel.before.Main.kt") public void testCallableReferenceTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/callableReferenceTopLevel.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/callableReferenceTopLevel.before.Main.kt"); } @TestMetadata("classImport.before.Main.kt") public void testClassImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/classImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/classImport.before.Main.kt"); } @TestMetadata("constructorParameterAnnotation.test") public void testConstructorParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/constructorParameterAnnotation.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/constructorParameterAnnotation.test"); } @TestMetadata("constructorReference.before.Main.kt") public void testConstructorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/constructorReference.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/constructorReference.before.Main.kt"); } @TestMetadata("delegateExtensionBoth.test") public void testDelegateExtensionBoth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateExtensionBoth.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateExtensionBoth.test"); } @TestMetadata("delegateExtensionGet.test") public void testDelegateExtensionGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateExtensionGet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateExtensionGet.test"); } @TestMetadata("delegateExtensionSet.test") public void testDelegateExtensionSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateExtensionSet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateExtensionSet.test"); } @TestMetadata("delegateNoOperator.test") public void testDelegateNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/delegateNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/delegateNoOperator.test"); } @TestMetadata("divOperator.before.Main.kt") public void testDivOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/divOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/divOperator.before.Main.kt"); } @TestMetadata("dslMarkers.before.Main.kt") public void testDslMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/dslMarkers.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/dslMarkers.before.Main.kt"); } @TestMetadata("extensionFunctionImport.before.Main.kt") public void testExtensionFunctionImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionFunctionImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionFunctionImport.before.Main.kt"); } @TestMetadata("extensionFunctionImportImplicitReceiver.before.Main.kt") public void testExtensionFunctionImportImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionFunctionImportImplicitReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionFunctionImportImplicitReceiver.before.Main.kt"); } @TestMetadata("extensionPropertyImport.before.Main.kt") public void testExtensionPropertyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionPropertyImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionPropertyImport.before.Main.kt"); } @TestMetadata("extensionPropertyOnTypeAliasFromExpansion.before.Main.kt") public void testExtensionPropertyOnTypeAliasFromExpansion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromExpansion.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromExpansion.before.Main.kt"); } @TestMetadata("extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt") public void testExtensionPropertyOnTypeAliasFromOtherTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/extensionPropertyOnTypeAliasFromOtherTypeAlias.before.Main.kt"); } @TestMetadata("factoryFunctionFromLambda.before.Main.kt") public void testFactoryFunctionFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/factoryFunctionFromLambda.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/factoryFunctionFromLambda.before.Main.kt"); } @TestMetadata("falsePostfixOperator.before.Main.kt") public void testFalsePostfixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/falsePostfixOperator.before.Main.kt"); } @TestMetadata("functionImport.before.Main.kt") public void testFunctionImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/functionImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/functionImport.before.Main.kt"); } @TestMetadata("importInFirstPartInQualifiedExpression.before.Main.kt") public void testImportInFirstPartInQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importInFirstPartInQualifiedExpression.before.Main.kt"); } @TestMetadata("importInFirstPartInUserType.test") public void testImportInFirstPartInUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importInFirstPartInUserType.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importInFirstPartInUserType.test"); } @TestMetadata("importKotlinCompanionPropertyAsFieldFromJava.test") public void testImportKotlinCompanionPropertyAsFieldFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionPropertyAsFieldFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionPropertyAsFieldFromJava.test"); } @TestMetadata("importKotlinCompanionStaticFunctionFromJava.test") public void testImportKotlinCompanionStaticFunctionFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticFunctionFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticFunctionFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyDefaultGetterFromJava.test") public void testImportKotlinCompanionStaticPropertyDefaultGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultGetterFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyDefaultSetterFromJava.test") public void testImportKotlinCompanionStaticPropertyDefaultSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyDefaultSetterFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test") public void testImportKotlinCompanionStaticPropertyOverloadedGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedGetterFromJava.test"); } @TestMetadata("importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test") public void testImportKotlinCompanionStaticPropertyOverloadedSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinCompanionStaticPropertyOverloadedSetterFromJava.test"); } @TestMetadata("importKotlinPropertyAsFieldFromJava.test") public void testImportKotlinPropertyAsFieldFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinPropertyAsFieldFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinPropertyAsFieldFromJava.test"); } @TestMetadata("importKotlinStaticFunctionFromJava.test") public void testImportKotlinStaticFunctionFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticFunctionFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticFunctionFromJava.test"); } @TestMetadata("importKotlinStaticPropertyDefaultGetterFromJava.test") public void testImportKotlinStaticPropertyDefaultGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultGetterFromJava.test"); } @TestMetadata("importKotlinStaticPropertyDefaultSetterFromJava.test") public void testImportKotlinStaticPropertyDefaultSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyDefaultSetterFromJava.test"); } @TestMetadata("importKotlinStaticPropertyOverloadedGetterFromJava.test") public void testImportKotlinStaticPropertyOverloadedGetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedGetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedGetterFromJava.test"); } @TestMetadata("importKotlinStaticPropertyOverloadedSetterFromJava.test") public void testImportKotlinStaticPropertyOverloadedSetterFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedSetterFromJava.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importKotlinStaticPropertyOverloadedSetterFromJava.test"); } @TestMetadata("importTrait.before.Main.kt") public void testImportTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/importTrait.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/importTrait.before.Main.kt"); } @TestMetadata("indexCallExtensionGet.test") public void testIndexCallExtensionGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionGet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionGet.test"); } @TestMetadata("indexCallExtensionGetNoOperator.test") public void testIndexCallExtensionGetNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionGetNoOperator.test"); } @TestMetadata("indexCallExtensionImportGetOnNoOperatorWarning.test") public void testIndexCallExtensionImportGetOnNoOperatorWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test"); } @TestMetadata("indexCallExtensionImportSetOnNoOperatorWarning.test") public void testIndexCallExtensionImportSetOnNoOperatorWarning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test"); } @TestMetadata("indexCallExtensionSet.test") public void testIndexCallExtensionSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallExtensionSet.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallExtensionSet.test"); } @TestMetadata("indexCallNoImportWhenGetNeededButSetAvailable.test") public void testIndexCallNoImportWhenGetNeededButSetAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallNoImportWhenGetNeededButSetAvailable.test"); } @TestMetadata("indexCallNoImportWhenSetNeededButGetAvailable.test") public void testIndexCallNoImportWhenSetNeededButGetAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/indexCallNoImportWhenSetNeededButGetAvailable.test"); } @TestMetadata("infixCall.before.Main.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/infixCall.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/infixCall.before.Main.kt"); } @TestMetadata("infixCall2.before.Main.kt") public void testInfixCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/infixCall2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/infixCall2.before.Main.kt"); } @TestMetadata("invokeExtension.test") public void testInvokeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/invokeExtension.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/invokeExtension.test"); } @TestMetadata("invokeExtensionNoOperator.test") public void testInvokeExtensionNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/invokeExtensionNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/invokeExtensionNoOperator.test"); } @TestMetadata("memberImportFunction.test") public void testMemberImportFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportFunction.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportFunction.test"); } @TestMetadata("memberImportJavaField.test") public void testMemberImportJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportJavaField.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportJavaField.test"); } @TestMetadata("memberImportJavaMethod.test") public void testMemberImportJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportJavaMethod.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportJavaMethod.test"); } @TestMetadata("memberImportNotForClassFunction.test") public void testMemberImportNotForClassFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForClassFunction.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForClassFunction.test"); } @TestMetadata("memberImportNotForClassProperty.test") public void testMemberImportNotForClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForClassProperty.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForClassProperty.test"); } @TestMetadata("memberImportNotForJavaNonStaticField.test") public void testMemberImportNotForJavaNonStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticField.test"); } @TestMetadata("memberImportNotForJavaNonStaticMethod.test") public void testMemberImportNotForJavaNonStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForJavaNonStaticMethod.test"); } @TestMetadata("memberImportNotForTopLevelFunction.test") public void testMemberImportNotForTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportNotForTopLevelFunction.test"); } @TestMetadata("memberImportProperty.test") public void testMemberImportProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberImportProperty.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberImportProperty.test"); } @TestMetadata("memberWithTopLevelConflict.before.Main.kt") public void testMemberWithTopLevelConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/memberWithTopLevelConflict.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/memberWithTopLevelConflict.before.Main.kt"); } @TestMetadata("minusOperator.before.Main.kt") public void testMinusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/minusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/minusOperator.before.Main.kt"); } @TestMetadata("multiDeclarationExtensionAllComponents.test") public void testMultiDeclarationExtensionAllComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponents.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponents.test"); } @TestMetadata("multiDeclarationExtensionAllComponentsMany.test") public void testMultiDeclarationExtensionAllComponentsMany() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsMany.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsMany.test"); } @TestMetadata("multiDeclarationExtensionAllComponentsPrefereFull.test") public void testMultiDeclarationExtensionAllComponentsPrefereFull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereFull.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereFull.test"); } @TestMetadata("multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test") public void testMultiDeclarationExtensionAllComponentsPrefereNotDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionAllComponentsPrefereNotDeprecated.test"); } @TestMetadata("multiDeclarationExtensionComponent1.test") public void testMultiDeclarationExtensionComponent1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent1.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent1.test"); } @TestMetadata("multiDeclarationExtensionComponent2.test") public void testMultiDeclarationExtensionComponent2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent2.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponent2.test"); } @TestMetadata("multiDeclarationExtensionComponentNoOperator.test") public void testMultiDeclarationExtensionComponentNoOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/multiDeclarationExtensionComponentNoOperator.test"); } @TestMetadata("nestedClass.before.Main.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/nestedClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/nestedClass.before.Main.kt"); } @TestMetadata("noFunctionImportOnSimpleName.test") public void testNoFunctionImportOnSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noFunctionImportOnSimpleName.test"); } @TestMetadata("noImportForFunInQualifiedNotFirst.before.Main.kt") public void testNoImportForFunInQualifiedNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForFunInQualifiedNotFirst.before.Main.kt"); } @TestMetadata("noImportForNestedInPrivate.before.Main.kt") public void testNoImportForNestedInPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForNestedInPrivate.before.Main.kt"); } @TestMetadata("noImportForPrivateClass.before.Main.kt") public void testNoImportForPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForPrivateClass.before.Main.kt"); } @TestMetadata("noImportInImports.before.Main.kt") public void testNoImportInImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInImports.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInImports.before.Main.kt"); } @TestMetadata("noImportInQualifiedExpressionNotFirst.before.Main.kt") public void testNoImportInQualifiedExpressionNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInQualifiedExpressionNotFirst.before.Main.kt"); } @TestMetadata("noImportInQualifiedUserTypeNotFirst.before.Main.kt") public void testNoImportInQualifiedUserTypeNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInQualifiedUserTypeNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInQualifiedUserTypeNotFirst.before.Main.kt"); } @TestMetadata("noImportInSafeQualifiedExpressionNotFirst.before.Main.kt") public void testNoImportInSafeQualifiedExpressionNotFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInSafeQualifiedExpressionNotFirst.before.Main.kt"); } @TestMetadata("noImportInterfaceRefAsConstructor.before.Main.kt") public void testNoImportInterfaceRefAsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportInterfaceRefAsConstructor.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportInterfaceRefAsConstructor.before.Main.kt"); } @TestMetadata("noImportsForClassInExcludedPackage.before.Main.kt") public void testNoImportsForClassInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportsForClassInExcludedPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportsForClassInExcludedPackage.before.Main.kt"); } @TestMetadata("noImportsForExcludedClass.before.Main.kt") public void testNoImportsForExcludedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportsForExcludedClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportsForExcludedClass.before.Main.kt"); } @TestMetadata("noImportsForFunctionInExcludedPackage.before.Main.kt") public void testNoImportsForFunctionInExcludedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportsForFunctionInExcludedPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noImportsForFunctionInExcludedPackage.before.Main.kt"); } @TestMetadata("noMemberFunctionImportOnSimpleName.test") public void testNoMemberFunctionImportOnSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noMemberFunctionImportOnSimpleName.test"); } @TestMetadata("noneApplicableFromInstanceButExtension.before.Main.kt") public void testNoneApplicableFromInstanceButExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noneApplicableFromInstanceButExtension.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/noneApplicableFromInstanceButExtension.before.Main.kt"); } @TestMetadata("notExcludedClass.before.Main.kt") public void testNotExcludedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/notExcludedClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/notExcludedClass.before.Main.kt"); } @TestMetadata("objectImport.before.Main.kt") public void testObjectImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/objectImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/objectImport.before.Main.kt"); } @TestMetadata("objectMemberFunctionImportWhenReceiverPresent.before.Main.kt") public void testObjectMemberFunctionImportWhenReceiverPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/objectMemberFunctionImportWhenReceiverPresent.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/objectMemberFunctionImportWhenReceiverPresent.before.Main.kt"); } @TestMetadata("operatorAssignPlus.test") public void testOperatorAssignPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/operatorAssignPlus.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/operatorAssignPlus.test"); } @TestMetadata("operatorAssignPlusAssign.test") public void testOperatorAssignPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/operatorAssignPlusAssign.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/operatorAssignPlusAssign.test"); } @TestMetadata("operatorAssignPlusTwoVariantsDifferentPackages.test") public void testOperatorAssignPlusTwoVariantsDifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/operatorAssignPlusTwoVariantsDifferentPackages.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/operatorAssignPlusTwoVariantsDifferentPackages.test"); } @TestMetadata("packageClass.before.Main.kt") public void testPackageClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/packageClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/packageClass.before.Main.kt"); } @TestMetadata("plusOperator.before.Main.kt") public void testPlusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/plusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/plusOperator.before.Main.kt"); } @TestMetadata("plusOperatorWithTypeMismatch.before.Main.kt") public void testPlusOperatorWithTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt"); } @TestMetadata("postfixOperator.before.Main.kt") public void testPostfixOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/postfixOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/postfixOperator.before.Main.kt"); } @TestMetadata("propertyImport.before.Main.kt") public void testPropertyImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/propertyImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/propertyImport.before.Main.kt"); } @TestMetadata("sameModuleImportPriority.before.Main.kt") public void testSameModuleImportPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/sameModuleImportPriority.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/sameModuleImportPriority.before.Main.kt"); } @TestMetadata("timesAssign.before.Main.kt") public void testTimesAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/timesAssign.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/timesAssign.before.Main.kt"); } @TestMetadata("typeAliasExtensionFunction.before.Main.kt") public void testTypeAliasExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasExtensionFunction.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasExtensionFunction.before.Main.kt"); } @TestMetadata("typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt") public void testTypeAliasExtensionFunctionInTypeAliasChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasExtensionFunctionInTypeAliasChain.before.Main.kt"); } @TestMetadata("typeAliasExtensionProperty.before.Main.kt") public void testTypeAliasExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasExtensionProperty.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasExtensionProperty.before.Main.kt"); } @TestMetadata("typeAliasImport.before.Main.kt") public void testTypeAliasImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/typeAliasImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/typeAliasImport.before.Main.kt"); } @TestMetadata("unaryMinusOperator.before.Main.kt") public void testUnaryMinusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/unaryMinusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/unaryMinusOperator.before.Main.kt"); } @TestMetadata("unaryPlusOperator.before.Main.kt") public void testUnaryPlusOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/unaryPlusOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/unaryPlusOperator.before.Main.kt"); } @TestMetadata("withSmartCastQualifier.before.Main.kt") public void testWithSmartCastQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/withSmartCastQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/withSmartCastQualifier.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/autoImports/mismatchingArgs") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MismatchingArgs extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMismatchingArgs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports/mismatchingArgs"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("checkArgumentTypes.test") public void testCheckArgumentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test"); } @TestMetadata("constantExpectedTypeMismatch.test") public void testConstantExpectedTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/constantExpectedTypeMismatch.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/constantExpectedTypeMismatch.test"); } @TestMetadata("expectedTypeRequired.test") public void testExpectedTypeRequired() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/expectedTypeRequired.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/expectedTypeRequired.test"); } @TestMetadata("extensionExplicitReceiver.test") public void testExtensionExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/extensionExplicitReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/extensionExplicitReceiver.test"); } @TestMetadata("extensionImplicitReceiver.test") public void testExtensionImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/extensionImplicitReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/extensionImplicitReceiver.test"); } @TestMetadata("extensionWrongReceiver.test") public void testExtensionWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/extensionWrongReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/extensionWrongReceiver.test"); } @TestMetadata("ignoreErrorsOutsideCall.test") public void testIgnoreErrorsOutsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/ignoreErrorsOutsideCall.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/ignoreErrorsOutsideCall.test"); } @TestMetadata("lambdaArgument.test") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test"); } @TestMetadata("namedArgument.test") public void testNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/namedArgument.test"); } @TestMetadata("notForIncompleteCall.test") public void testNotForIncompleteCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/notForIncompleteCall.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/notForIncompleteCall.test"); } @TestMetadata("smartCast.test") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/smartCast.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/smartCast.test"); } @TestMetadata("topLevelFun.test") public void testTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun.test"); } @TestMetadata("topLevelFun_notWithReceiver.test") public void testTopLevelFun_notWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun_notWithReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/topLevelFun_notWithReceiver.test"); } @TestMetadata("typeMismatch.test") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/mismatchingArgs/typeMismatch.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/autoImports/mismatchingArgs/typeMismatch.test"); } } } @@ -776,16 +684,18 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeSignature extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addJavaMethodParameter.before.Main.kt") public void testAddJavaMethodParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addJavaMethodParameter.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/addJavaMethodParameter.before.Main.kt"); } @TestMetadata("addParameterWithImport.before.Main.kt") public void testAddParameterWithImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt"); } public void testAllFilesPresentInChangeSignature() throws Exception { @@ -794,100 +704,89 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("matchFunctionLiteralWithSAMType.before.Main.kt") public void testMatchFunctionLiteralWithSAMType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/matchFunctionLiteralWithSAMType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/matchFunctionLiteralWithSAMType.before.Main.kt"); } @TestMetadata("removeJavaMethodParameter.before.Main.kt") public void testRemoveJavaMethodParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeJavaMethodParameter.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/removeJavaMethodParameter.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/changeSignature/jk") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jk extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature/jk"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("jkAddFunctionParameter.before.Main.java") public void testJkAddFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddFunctionParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddFunctionParameter.before.Main.java"); } @TestMetadata("jkAddImplicitPrimaryConstructorParameter.before.Main.java") public void testJkAddImplicitPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddImplicitPrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddImplicitPrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkAddPrimaryConstructorParameter.before.Main.java") public void testJkAddPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddPrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddPrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkAddSecondaryConstructorParameter.before.Main.java") public void testJkAddSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkAddSecondaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkAddSecondaryConstructorParameter.before.Main.java"); } @TestMetadata("jkChangeFunctionParameter.before.Main.java") public void testJkChangeFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkChangeFunctionParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkChangeFunctionParameter.before.Main.java"); } @TestMetadata("jkChangePrimaryConstructorParameter.before.Main.java") public void testJkChangePrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkChangePrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkChangePrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkChangeSecondaryConstructorParameter.before.Main.java") public void testJkChangeSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkChangeSecondaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkChangeSecondaryConstructorParameter.before.Main.java"); } @TestMetadata("jkKeepValOnAddingParameter1.before.Main.java") public void testJkKeepValOnAddingParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter1.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter1.before.Main.java"); } @TestMetadata("jkKeepValOnAddingParameter2.before.Main.java") public void testJkKeepValOnAddingParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter2.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkKeepValOnAddingParameter2.before.Main.java"); } @TestMetadata("jkKeepValOnParameterTypeChange.before.Main.java") public void testJkKeepValOnParameterTypeChange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkKeepValOnParameterTypeChange.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkKeepValOnParameterTypeChange.before.Main.java"); } @TestMetadata("jkRemoveFunctionParameter.before.Main.java") public void testJkRemoveFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkRemoveFunctionParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkRemoveFunctionParameter.before.Main.java"); } @TestMetadata("jkRemovePrimaryConstructorParameter.before.Main.java") public void testJkRemovePrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkRemovePrimaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkRemovePrimaryConstructorParameter.before.Main.java"); } @TestMetadata("jkRemoveSecondaryConstructorParameter.before.Main.java") public void testJkRemoveSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/jk/jkRemoveSecondaryConstructorParameter.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/changeSignature/jk/jkRemoveSecondaryConstructorParameter.before.Main.java"); } } } @@ -896,6 +795,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -905,14 +808,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertJavaInterfaceToClass extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertJavaInterfaceToClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/convertJavaInterfaceToClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("kotlinInheritor.before.Main.java") public void testKotlinInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/convertJavaInterfaceToClass/kotlinInheritor.before.Main.java"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/convertJavaInterfaceToClass/kotlinInheritor.before.Main.java"); } } @@ -920,6 +826,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateFromUsage extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateFromUsage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -928,6 +838,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateClass extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -936,26 +850,27 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationEntry extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationEntry() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("nestedGroovyAnnotation.before.Main.kt") public void testNestedGroovyAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedGroovyAnnotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedGroovyAnnotation.before.Main.kt"); } @TestMetadata("nestedJavaAnnotation.before.Main.kt") public void testNestedJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotation.before.Main.kt"); } @TestMetadata("nestedJavaAnnotationWithNamedArgs.before.Main.kt") public void testNestedJavaAnnotationWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotationWithNamedArgs.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/nestedJavaAnnotationWithNamedArgs.before.Main.kt"); } } @@ -963,112 +878,104 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallExpression extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("callInAnnotationEntryWithJavaQualifier.before.Main.kt") public void testCallInAnnotationEntryWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntryWithJavaQualifier.before.Main.kt"); } @TestMetadata("callWithExplicitParamNamesAndJavaQualifier.before.Main.kt") public void testCallWithExplicitParamNamesAndJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExplicitParamNamesAndJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExplicitParamNamesAndJavaQualifier.before.Main.kt"); } @TestMetadata("callWithFinalJavaSupertype.before.Main.kt") public void testCallWithFinalJavaSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalJavaSupertype.before.Main.kt"); } @TestMetadata("callWithGenericJavaReceiver.before.Main.kt") public void testCallWithGenericJavaReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGenericJavaReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGenericJavaReceiver.before.Main.kt"); } @TestMetadata("callWithGroovyClassQualifier.before.Main.kt") public void testCallWithGroovyClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGroovyClassQualifier.before.Main.kt"); } @TestMetadata("callWithJavaClassQualifier.before.Main.kt") public void testCallWithJavaClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassQualifier.before.Main.kt"); } @TestMetadata("callWithJavaClassReceiver.before.Main.kt") public void testCallWithJavaClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaClassReceiver.before.Main.kt"); } @TestMetadata("callWithJavaQualifierInMemberValDelegate.before.Main.kt") public void testCallWithJavaQualifierInMemberValDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.before.Main.kt"); } @TestMetadata("callWithSuperclassAndJavaReceiverNoConstructorParams.before.Main.kt") public void testCallWithSuperclassAndJavaReceiverNoConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassAndJavaReceiverNoConstructorParams.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassAndJavaReceiverNoConstructorParams.before.Main.kt"); } @TestMetadata("callWithSuperclassConstructorParamsAndJavaReceiver.before.Main.kt") public void testCallWithSuperclassConstructorParamsAndJavaReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassConstructorParamsAndJavaReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassConstructorParamsAndJavaReceiver.before.Main.kt"); } @TestMetadata("callWithSupertraitAndJavaReceiver.before.Main.kt") public void testCallWithSupertraitAndJavaReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSupertraitAndJavaReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSupertraitAndJavaReceiver.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaClassMember.before.Main.kt") public void testJavaClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMember.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMember.before.Main.kt"); } @TestMetadata("javaClassMemberInner.before.Main.kt") public void testJavaClassMemberInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInner.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInner.before.Main.kt"); } @TestMetadata("javaClassMemberInnerPartialSubstitution.before.Main.kt") public void testJavaClassMemberInnerPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerPartialSubstitution.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerPartialSubstitution.before.Main.kt"); } @TestMetadata("javaClassMemberInnerWithReceiverArg.before.Main.kt") public void testJavaClassMemberInnerWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerWithReceiverArg.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberInnerWithReceiverArg.before.Main.kt"); } @TestMetadata("javaClassMemberPartialSubstitution.before.Main.kt") public void testJavaClassMemberPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); } } } @@ -1077,32 +984,32 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegationSpecifier extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegationSpecifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("delegatorToNestedJavaSupercall.before.Main.kt") public void testDelegatorToNestedJavaSupercall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercall.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercall.before.Main.kt"); } @TestMetadata("delegatorToNestedJavaSupercallWithParamNames.before.Main.kt") public void testDelegatorToNestedJavaSupercallWithParamNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercallWithParamNames.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToNestedJavaSupercallWithParamNames.before.Main.kt"); } @TestMetadata("traitDelegatorToNestedGroovySuperclass.before.Main.kt") public void testTraitDelegatorToNestedGroovySuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedGroovySuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedGroovySuperclass.before.Main.kt"); } @TestMetadata("traitDelegatorToNestedJavaSuperclass.before.Main.kt") public void testTraitDelegatorToNestedJavaSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedJavaSuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToNestedJavaSuperclass.before.Main.kt"); } } @@ -1110,50 +1017,47 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportDirective extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportDirective() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("annotationWithJavaQualifier.before.Main.kt") public void testAnnotationWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationWithJavaQualifier.before.Main.kt"); } @TestMetadata("classWithGroovyQualifier.before.Main.kt") public void testClassWithGroovyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithGroovyQualifier.before.Main.kt"); } @TestMetadata("classWithJavaQualifier.before.Main.kt") public void testClassWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithJavaQualifier.before.Main.kt"); } @TestMetadata("enumEntryInJavaEnum.before.Main.kt") public void testEnumEntryInJavaEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInJavaEnum.before.Main.kt"); } @TestMetadata("enumWithJavaQualifier.before.Main.kt") public void testEnumWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumWithJavaQualifier.before.Main.kt"); } @TestMetadata("objectWithJavaQualifier.before.Main.kt") public void testObjectWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectWithJavaQualifier.before.Main.kt"); } @TestMetadata("traitWithJavaQualifier.before.Main.kt") public void testTraitWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitWithJavaQualifier.before.Main.kt"); } } @@ -1161,62 +1065,57 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReferenceExpression extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferenceExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("classByNestedGroovyQualifier.before.Main.kt") public void testClassByNestedGroovyQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedGroovyQualifier.before.Main.kt"); } @TestMetadata("classByNestedJavaQualifier.before.Main.kt") public void testClassByNestedJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedJavaQualifier.before.Main.kt"); } @TestMetadata("enumByNestedJavaQualifier.before.Main.kt") public void testEnumByNestedJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByNestedJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByNestedJavaQualifier.before.Main.kt"); } @TestMetadata("enumEntryWithJavaEnumQualifier.before.Main.kt") public void testEnumEntryWithJavaEnumQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumQualifier.before.Main.kt"); } @TestMetadata("enumEntryWithJavaEnumSuperclass.before.Main.kt") public void testEnumEntryWithJavaEnumSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaEnumSuperclass.before.Main.kt"); } @TestMetadata("enumEntryWithJavaNonEnumQualifier.before.Main.kt") public void testEnumEntryWithJavaNonEnumQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumQualifier.before.Main.kt"); } @TestMetadata("enumEntryWithJavaNonEnumSuperclass.before.Main.kt") public void testEnumEntryWithJavaNonEnumSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithJavaNonEnumSuperclass.before.Main.kt"); } @TestMetadata("objectWithJavaQualifier.before.Main.kt") public void testObjectWithJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithJavaQualifier.before.Main.kt"); } @TestMetadata("traitByNestedJavaQualifier.before.Main.kt") public void testTraitByNestedJavaQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitByNestedJavaQualifier.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitByNestedJavaQualifier.before.Main.kt"); } } @@ -1224,44 +1123,42 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("annotationJavaTypeReceiver.before.Main.kt") public void testAnnotationJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationJavaTypeReceiver.before.Main.kt"); } @TestMetadata("classGroovyTypeReceiver.before.Main.kt") public void testClassGroovyTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classGroovyTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classGroovyTypeReceiver.before.Main.kt"); } @TestMetadata("classJavaTypeReceiver.before.Main.kt") public void testClassJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classJavaTypeReceiver.before.Main.kt"); } @TestMetadata("enumEntryJavaEnumReceiver.before.Main.kt") public void testEnumEntryJavaEnumReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryJavaEnumReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryJavaEnumReceiver.before.Main.kt"); } @TestMetadata("enumJavaTypeReceiver.before.Main.kt") public void testEnumJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumJavaTypeReceiver.before.Main.kt"); } @TestMetadata("traitJavaTypeReceiver.before.Main.kt") public void testTraitJavaTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/traitJavaTypeReceiver.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/traitJavaTypeReceiver.before.Main.kt"); } } } @@ -1270,6 +1167,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateFunction extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1278,94 +1179,89 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("extensionFunOnGroovyType.before.Main.kt") public void testExtensionFunOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnGroovyType.before.Main.kt"); } @TestMetadata("extensionFunOnJavaType.before.Main.kt") public void testExtensionFunOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnJavaType.before.Main.kt"); } @TestMetadata("extensionFunOnTypeFromAnotherPackage.before.Main.kt") public void testExtensionFunOnTypeFromAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnTypeFromAnotherPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnTypeFromAnotherPackage.before.Main.kt"); } @TestMetadata("funOnGroovyType.before.Main.kt") public void testFunOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnGroovyType.before.Main.kt"); } @TestMetadata("funOnJavaInterface.before.Main.kt") public void testFunOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaInterface.before.Main.kt"); } @TestMetadata("funOnJavaType.before.Main.kt") public void testFunOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnJavaType.before.Main.kt"); } @TestMetadata("genericFunOnJavaType.before.Main.kt") public void testGenericFunOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/genericFunOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/genericFunOnJavaType.before.Main.kt"); } @TestMetadata("staticExtensionFunOnJavaClass.before.Main.kt") public void testStaticExtensionFunOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/staticExtensionFunOnJavaClass.before.Main.kt"); } @TestMetadata("staticFunOnJavaClass.before.Main.kt") public void testStaticFunOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaClass.before.Main.kt"); } @TestMetadata("staticFunOnJavaInterface.before.Main.kt") public void testStaticFunOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/staticFunOnJavaInterface.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaClassMember.before.Main.kt") public void testJavaClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMember.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMember.before.Main.kt"); } @TestMetadata("javaClassMemberPartialSubstitution.before.Main.kt") public void testJavaClassMemberPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberPartialSubstitution.before.Main.kt"); } @TestMetadata("javaClassMemberWithReceiverArg.before.Main.kt") public void testJavaClassMemberWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberWithReceiverArg.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/javaClassMemberWithReceiverArg.before.Main.kt"); } } } @@ -1375,32 +1271,32 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateSecondaryConstructor extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateSecondaryConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("delegatorToSuperCallJavaClass.before.Main.kt") public void testDelegatorToSuperCallJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCallJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCallJavaClass.before.Main.kt"); } @TestMetadata("groovyConstructor.before.Main.kt") public void testGroovyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/groovyConstructor.before.Main.kt"); } @TestMetadata("javaConstructor.before.Main.kt") public void testJavaConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/javaConstructor.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/javaConstructor.before.Main.kt"); } @TestMetadata("superCallJavaClass.before.Main.kt") public void testSuperCallJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallJavaClass.before.Main.kt"); } } @@ -1408,6 +1304,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateTypeAlias extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeAlias"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1416,14 +1316,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaUserTypeReceiver.test") public void testJavaUserTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/javaUserTypeReceiver.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/javaUserTypeReceiver.test"); } } } @@ -1432,6 +1335,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateTypeParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1441,6 +1348,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateVariable extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1449,14 +1360,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("platformType.before.Main.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/platformType.before.Main.kt"); } } @@ -1464,20 +1378,22 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimaryParameter extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimaryParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("staticValOnJavaClass.before.Main.kt") public void testStaticValOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/staticValOnJavaClass.before.Main.kt"); } @TestMetadata("valOnJavaType.before.Main.kt") public void testValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnJavaType.before.Main.kt"); } } @@ -1485,74 +1401,67 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("extensionPropertyOnTypeFromAnotherPackage.before.Main.kt") public void testExtensionPropertyOnTypeFromAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionPropertyOnTypeFromAnotherPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionPropertyOnTypeFromAnotherPackage.before.Main.kt"); } @TestMetadata("extensionValOnGroovyType.before.Main.kt") public void testExtensionValOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnGroovyType.before.Main.kt"); } @TestMetadata("extensionValOnJavaType.before.Main.kt") public void testExtensionValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionValOnJavaType.before.Main.kt"); } @TestMetadata("staticExtensionValOnJavaType.before.Main.kt") public void testStaticExtensionValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticExtensionValOnJavaType.before.Main.kt"); } @TestMetadata("staticValOnJavaClass.before.Main.kt") public void testStaticValOnJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaClass.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaClass.before.Main.kt"); } @TestMetadata("staticValOnJavaInterface.before.Main.kt") public void testStaticValOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticValOnJavaInterface.before.Main.kt"); } @TestMetadata("staticVarOnJavaInterface.before.Main.kt") public void testStaticVarOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/staticVarOnJavaInterface.before.Main.kt"); } @TestMetadata("valOnGroovyType.before.Main.kt") public void testValOnGroovyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnGroovyType.before.Main.kt"); } @TestMetadata("valOnJavaInterface.before.Main.kt") public void testValOnJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaInterface.before.Main.kt"); } @TestMetadata("valOnJavaType.before.Main.kt") public void testValOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnJavaType.before.Main.kt"); } @TestMetadata("varOnJavaType.before.Main.kt") public void testVarOnJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/varOnJavaType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/varOnJavaType.before.Main.kt"); } } } @@ -1562,30 +1471,35 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedSymbolUsage extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaDeprecated.before.Main.kt") public void testJavaDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/javaDeprecated.before.Main.kt"); } @TestMetadata("toMethodFromCompanionObject.before.Main.kt") public void testToMethodFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/toMethodFromCompanionObject.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/toMethodFromCompanionObject.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassUsages extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addImportFromSamePackage.before.Main.kt") public void testAddImportFromSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/addImportFromSamePackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/addImportFromSamePackage.before.Main.kt"); } public void testAllFilesPresentInClassUsages() throws Exception { @@ -1596,14 +1510,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("annotation.before.Main.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/annotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/annotation.before.Main.kt"); } } } @@ -1612,34 +1529,33 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addImportForOperator.before.Main.kt") public void testAddImportForOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportForOperator.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportForOperator.before.Main.kt"); } @TestMetadata("addImportFromSamePackage.before.Main.kt") public void testAddImportFromSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage.before.Main.kt"); } @TestMetadata("addImportFromSamePackage2.before.Main.kt") public void testAddImportFromSamePackage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage2.before.Main.kt"); } @TestMetadata("addImportFromSamePackage3.before.Main.kt") public void testAddImportFromSamePackage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage3.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage3.before.Main.kt"); } @TestMetadata("addImports.before.Main.kt") public void testAddImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImports.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImports.before.Main.kt"); } public void testAllFilesPresentInImports() throws Exception { @@ -1648,8 +1564,7 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("rootPackage.before.Main.kt") public void testRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/rootPackage.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/imports/rootPackage.before.Main.kt"); } } @@ -1657,6 +1572,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeAliases extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeAliases() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1665,14 +1584,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("typealias.before.Main.kt") public void testTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject/typealias.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject/typealias.before.Main.kt"); } } } @@ -1681,14 +1603,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("platformType.before.Main.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/platformType.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/platformType.before.Main.kt"); } } @@ -1696,20 +1621,22 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("function.before.Main.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/function.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/function.before.Main.kt"); } @TestMetadata("property.before.Main.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/property.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject/property.before.Main.kt"); } } } @@ -1718,38 +1645,37 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IncreaseVisibility extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIncreaseVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/increaseVisibility"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("privateMemberToInternalMultiFile.before.Main.kt") public void testPrivateMemberToInternalMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateMemberToInternalMultiFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateMemberToInternalMultiFile.before.Main.kt"); } @TestMetadata("privateTopLevelFunInFile.before.Main.kt") public void testPrivateTopLevelFunInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelFunInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelFunInFile.before.Main.kt"); } @TestMetadata("privateTopLevelValInFile.before.Main.kt") public void testPrivateTopLevelValInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelValInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelValInFile.before.Main.kt"); } @TestMetadata("privateTopLevelVarInFile.before.Main.kt") public void testPrivateTopLevelVarInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelVarInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelVarInFile.before.Main.kt"); } @TestMetadata("privateTopLevelVarWithSetterInFile.before.Main.kt") public void testPrivateTopLevelVarWithSetterInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateTopLevelVarWithSetterInFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateTopLevelVarWithSetterInFile.before.Main.kt"); } } @@ -1757,14 +1683,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberVisibilityCanBePrivate extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberVisibilityCanBePrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/memberVisibilityCanBePrivate"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("getter.before.Main.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/getter.before.Main.kt"); } } @@ -1772,6 +1701,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1780,20 +1713,22 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConflictingExtension extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConflictingExtension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/conflictingExtension"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("removeImports.before.Main.kt") public void testRemoveImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/removeImports.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/removeImports.before.Main.kt"); } @TestMetadata("removeImportsOverloads.before.Main.kt") public void testRemoveImportsOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/removeImportsOverloads.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/removeImportsOverloads.before.Main.kt"); } } @@ -1801,26 +1736,27 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaAnnotationPositionedArguments extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaAnnotationPositionedArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/javaAnnotationPositionedArguments"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("basicMultiple.before.Main.kt") public void testBasicMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/basicMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/basicMultiple.before.Main.kt"); } @TestMetadata("noValueForArgumentMultiple.before.Main.kt") public void testNoValueForArgumentMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/noValueForArgumentMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/noValueForArgumentMultiple.before.Main.kt"); } @TestMetadata("wrongTypeMultiple.before.Main.kt") public void testWrongTypeMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/migration/javaAnnotationPositionedArguments/wrongTypeMultiple.before.Main.kt"); } } } @@ -1829,34 +1765,39 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("constVal.before.Main.kt") public void testConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/constVal.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/modifiers/constVal.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddOpenToClassDeclaration extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddOpenToClassDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("finalJavaSupertype.before.Main.kt") public void testFinalJavaSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaSupertype.before.Main.kt"); } @TestMetadata("finalJavaUpperBound.before.Main.kt") public void testFinalJavaUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalJavaUpperBound.before.Main.kt"); } } } @@ -1865,6 +1806,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullables extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1874,14 +1819,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OptimizeImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizeImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/optimizeImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("notRemoveImportsForTypeAliases.before.Main.kt") public void testNotRemoveImportsForTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/optimizeImports/notRemoveImportsForTypeAliases.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/optimizeImports/notRemoveImportsForTypeAliases.before.Main.kt"); } } @@ -1889,6 +1837,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1897,26 +1849,27 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NothingToOverride extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNothingToOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/nothingToOverride"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("import.before.Main.kt") public void testImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/import.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/import.before.Main.kt"); } @TestMetadata("overrideJavaMethodWithAnnotation.test") public void testOverrideJavaMethodWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/overrideJavaMethodWithAnnotation.test"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/overrideJavaMethodWithAnnotation.test"); } @TestMetadata("twoPackages.before.Main.kt") public void testTwoPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/twoPackages.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/twoPackages.before.Main.kt"); } } } @@ -1925,6 +1878,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/properties"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1934,56 +1891,52 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnused extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveUnused() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnused"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("javaTriangle.before.Main.kt") public void testJavaTriangle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangle.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangle.before.Main.kt"); } @TestMetadata("javaTriangle2.before.Main.kt") public void testJavaTriangle2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangle2.before.Main.kt"); } @TestMetadata("javaTriangle3.before.Main.kt") public void testJavaTriangle3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangle3.before.Main.kt"); } @TestMetadata("javaTriangleUnused.before.Main.kt") public void testJavaTriangleUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangleUnused.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangleUnused.before.Main.kt"); } @TestMetadata("javaTriangleUnused2.before.Main.kt") public void testJavaTriangleUnused2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/javaTriangleUnused2.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/javaTriangleUnused2.before.Main.kt"); } @TestMetadata("secondaryConstructorFromJava.before.Main.kt") public void testSecondaryConstructorFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/secondaryConstructorFromJava.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/secondaryConstructorFromJava.before.Main.kt"); } @TestMetadata("secondaryConstructorFromJavaDelegate.before.Main.kt") public void testSecondaryConstructorFromJavaDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/secondaryConstructorFromJavaDelegate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/secondaryConstructorFromJavaDelegate.before.Main.kt"); } @TestMetadata("usedObjectAsAliasMulti.before.Main.kt") public void testUsedObjectAsAliasMulti() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/removeUnused/usedObjectAsAliasMulti.before.Main.kt"); } } @@ -1991,6 +1944,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuppress() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -1999,6 +1956,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForStatement extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -2009,14 +1970,17 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeImports extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("importFromAnotherFile.before.Main.kt") public void testImportFromAnotherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/importFromAnotherFile.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeImports/importFromAnotherFile.before.Main.kt"); } } @@ -2024,10 +1988,13 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatch extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addArrayOfTypeForJavaAnnotation.before.Main.kt") public void testAddArrayOfTypeForJavaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addArrayOfTypeForJavaAnnotation.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeMismatch/addArrayOfTypeForJavaAnnotation.before.Main.kt"); } public void testAllFilesPresentInTypeMismatch() throws Exception { @@ -2036,22 +2003,24 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestMetadata("paramTypeInOverrides.before.Main.kt") public void testParamTypeInOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/paramTypeInOverrides.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeMismatch/paramTypeInOverrides.before.Main.kt"); } @TestMetadata("idea/testData/quickfix/typeMismatch/genericVarianceViolation") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericVarianceViolation extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericVarianceViolation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/genericVarianceViolation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("basicMultiple.before.Main.kt") public void testBasicMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/genericVarianceViolation/basicMultiple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("idea/testData/quickfix/typeMismatch/genericVarianceViolation/basicMultiple.before.Main.kt"); } } } @@ -2060,6 +2029,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -2068,6 +2041,10 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeMutability extends AbstractQuickFixMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiModuleTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiModuleTestGenerated.java index 491ced92eb3..0c75b29a978 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiModuleTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiModuleTestGenerated.java @@ -21,40 +21,38 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class QuickFixMultiModuleTestGenerated extends AbstractQuickFixMultiModuleTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/abstract/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/abstract/"); } @TestMetadata("addActualToClass") public void testAddActualToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/addActualToClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/addActualToClass/"); } @TestMetadata("addActualToClassMember") public void testAddActualToClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/addActualToClassMember/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/addActualToClassMember/"); } @TestMetadata("addActualToTopLevelMember") public void testAddActualToTopLevelMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/addActualToTopLevelMember/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/addActualToTopLevelMember/"); } @TestMetadata("addOperatorByHeader") public void testAddOperatorByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/addOperatorByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/addOperatorByHeader/"); } @TestMetadata("addOperatorByImpl") public void testAddOperatorByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/addOperatorByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/addOperatorByImpl/"); } public void testAllFilesPresentInMultiModuleQuickFix() throws Exception { @@ -63,307 +61,256 @@ public class QuickFixMultiModuleTestGenerated extends AbstractQuickFixMultiModul @TestMetadata("annotation") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/annotation/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/annotation/"); } @TestMetadata("class") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/class/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/class/"); } @TestMetadata("classFunction") public void testClassFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/classFunction/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/classFunction/"); } @TestMetadata("classOverloadedFunction") public void testClassOverloadedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/classOverloadedFunction/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/classOverloadedFunction/"); } @TestMetadata("classSomeProperties") public void testClassSomeProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/classSomeProperties/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/classSomeProperties/"); } @TestMetadata("companionAbsence") public void testCompanionAbsence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/companionAbsence/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/companionAbsence/"); } @TestMetadata("convertActualEnumToSealedClass") public void testConvertActualEnumToSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/convertActualEnumToSealedClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/convertActualEnumToSealedClass/"); } @TestMetadata("convertActualSealedClassToEnum") public void testConvertActualSealedClassToEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/convertActualSealedClassToEnum/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/convertActualSealedClassToEnum/"); } @TestMetadata("convertExpectEnumToSealedClass") public void testConvertExpectEnumToSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/convertExpectEnumToSealedClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/convertExpectEnumToSealedClass/"); } @TestMetadata("convertExpectSealedClassToEnum") public void testConvertExpectSealedClassToEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/convertExpectSealedClassToEnum/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/convertExpectSealedClassToEnum/"); } @TestMetadata("createFunInExpectClass") public void testCreateFunInExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/createFunInExpectClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/createFunInExpectClass/"); } @TestMetadata("createValInExpectClass") public void testCreateValInExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/createValInExpectClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/createValInExpectClass/"); } @TestMetadata("createVarInExpectClass") public void testCreateVarInExpectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/createVarInExpectClass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/createVarInExpectClass/"); } @TestMetadata("deprecatedHeader") public void testDeprecatedHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/deprecatedHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/deprecatedHeader/"); } @TestMetadata("deprecatedHeaderImpl") public void testDeprecatedHeaderImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/deprecatedHeaderImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/deprecatedHeaderImpl/"); } @TestMetadata("deprecatedImpl") public void testDeprecatedImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/deprecatedImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/deprecatedImpl/"); } @TestMetadata("deprecatedImplHeader") public void testDeprecatedImplHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/deprecatedImplHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/deprecatedImplHeader/"); } @TestMetadata("enum") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/enum/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/enum/"); } @TestMetadata("function") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/function/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/function/"); } @TestMetadata("functionSameFile") public void testFunctionSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/functionSameFile/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/functionSameFile/"); } @TestMetadata("functionTypeParameterToReceiverByHeader") public void testFunctionTypeParameterToReceiverByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/functionTypeParameterToReceiverByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/functionTypeParameterToReceiverByHeader/"); } @TestMetadata("functionTypeParameterToReceiverByImpl") public void testFunctionTypeParameterToReceiverByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/functionTypeParameterToReceiverByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/functionTypeParameterToReceiverByImpl/"); } @TestMetadata("functionTypeReceiverToParameterByHeader") public void testFunctionTypeReceiverToParameterByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/functionTypeReceiverToParameterByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/functionTypeReceiverToParameterByHeader/"); } @TestMetadata("functionTypeReceiverToParameterByImpl") public void testFunctionTypeReceiverToParameterByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/functionTypeReceiverToParameterByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/functionTypeReceiverToParameterByImpl/"); } @TestMetadata("implementMembersInImplClassNonImplInheritor") public void testImplementMembersInImplClassNonImplInheritor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/implementMembersInImplClassNonImplInheritor/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/implementMembersInImplClassNonImplInheritor/"); } @TestMetadata("interface") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/interface/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/interface/"); } @TestMetadata("memberFunParameterToReceiverByHeader") public void testMemberFunParameterToReceiverByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberFunParameterToReceiverByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberFunParameterToReceiverByHeader/"); } @TestMetadata("memberFunParameterToReceiverByImpl") public void testMemberFunParameterToReceiverByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberFunParameterToReceiverByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberFunParameterToReceiverByImpl/"); } @TestMetadata("memberFunReceiverToParameterByHeader") public void testMemberFunReceiverToParameterByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberFunReceiverToParameterByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberFunReceiverToParameterByHeader/"); } @TestMetadata("memberFunReceiverToParameterByImpl") public void testMemberFunReceiverToParameterByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberFunReceiverToParameterByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberFunReceiverToParameterByImpl/"); } @TestMetadata("memberFunToExtensionByHeader") public void testMemberFunToExtensionByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberFunToExtensionByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberFunToExtensionByHeader/"); } @TestMetadata("memberFunToExtensionByImpl") public void testMemberFunToExtensionByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberFunToExtensionByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberFunToExtensionByImpl/"); } @TestMetadata("memberValToExtensionByHeader") public void testMemberValToExtensionByHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberValToExtensionByHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberValToExtensionByHeader/"); } @TestMetadata("memberValToExtensionByHeaderWithInapplicableImpl") public void testMemberValToExtensionByHeaderWithInapplicableImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberValToExtensionByHeaderWithInapplicableImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberValToExtensionByHeaderWithInapplicableImpl/"); } @TestMetadata("memberValToExtensionByImpl") public void testMemberValToExtensionByImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/memberValToExtensionByImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/memberValToExtensionByImpl/"); } @TestMetadata("nested") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/nested/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/nested/"); } @TestMetadata("object") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/object/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/object/"); } @TestMetadata("orderHeader") public void testOrderHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/orderHeader/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/orderHeader/"); } @TestMetadata("orderImpl") public void testOrderImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/orderImpl/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/orderImpl/"); } @TestMetadata("package") public void testPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/package/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/package/"); } @TestMetadata("packageIncorrect") public void testPackageIncorrect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/packageIncorrect/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/packageIncorrect/"); } @TestMetadata("packageIncorrectEmpty") public void testPackageIncorrectEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/packageIncorrectEmpty/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/packageIncorrectEmpty/"); } @TestMetadata("primaryConstructor") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/primaryConstructor/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/primaryConstructor/"); } @TestMetadata("primaryConstructorAbsence") public void testPrimaryConstructorAbsence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/primaryConstructorAbsence/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/primaryConstructorAbsence/"); } @TestMetadata("property") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/property/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/property/"); } @TestMetadata("sealed") public void testSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/sealed/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/sealed/"); } @TestMetadata("sealedSubclass") public void testSealedSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/sealedSubclass/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/sealedSubclass/"); } @TestMetadata("secondaryConstructorAbsence") public void testSecondaryConstructorAbsence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/secondaryConstructorAbsence/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/secondaryConstructorAbsence/"); } @TestMetadata("withFakeJvm") public void testWithFakeJvm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/withFakeJvm/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/withFakeJvm/"); } @TestMetadata("withTest") public void testWithTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/withTest/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/withTest/"); } @TestMetadata("withTestDummy") public void testWithTestDummy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiModuleQuickFix/withTestDummy/"); - doTest(fileName); + runTest("idea/testData/multiModuleQuickFix/withTestDummy/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index cd8255e116f..06768984177 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class QuickFixTestGenerated extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQuickfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,112 +33,98 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Abstract extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractFunctionInNonAbstractClass.kt") public void testAbstractFunctionInNonAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractFunctionInNonAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractFunctionInNonAbstractClass.kt"); } @TestMetadata("abstractFunctionWithBody.kt") public void testAbstractFunctionWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractFunctionWithBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractFunctionWithBody.kt"); } @TestMetadata("abstractFunctionWithBody2.kt") public void testAbstractFunctionWithBody2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractFunctionWithBody2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractFunctionWithBody2.kt"); } @TestMetadata("abstractFunctionWithBody3.kt") public void testAbstractFunctionWithBody3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractFunctionWithBody3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractFunctionWithBody3.kt"); } @TestMetadata("abstractFunctionWithBodyWithComments.kt") public void testAbstractFunctionWithBodyWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractFunctionWithBodyWithComments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractFunctionWithBodyWithComments.kt"); } @TestMetadata("abstractFunctionWithBodyWithComments2.kt") public void testAbstractFunctionWithBodyWithComments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractFunctionWithBodyWithComments2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractFunctionWithBodyWithComments2.kt"); } @TestMetadata("abstractPropertyInCompanionObject.kt") public void testAbstractPropertyInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyInCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyInCompanionObject.kt"); } @TestMetadata("abstractPropertyInNonAbstractClass1.kt") public void testAbstractPropertyInNonAbstractClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyInNonAbstractClass1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyInNonAbstractClass1.kt"); } @TestMetadata("abstractPropertyInNonAbstractClass2.kt") public void testAbstractPropertyInNonAbstractClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyInNonAbstractClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyInNonAbstractClass2.kt"); } @TestMetadata("abstractPropertyInNonAbstractClass3.kt") public void testAbstractPropertyInNonAbstractClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyInNonAbstractClass3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyInNonAbstractClass3.kt"); } @TestMetadata("abstractPropertyInPrimaryConstructorParameters.kt") public void testAbstractPropertyInPrimaryConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyInPrimaryConstructorParameters.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyInPrimaryConstructorParameters.kt"); } @TestMetadata("abstractPropertyNotInClass.kt") public void testAbstractPropertyNotInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyNotInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyNotInClass.kt"); } @TestMetadata("abstractPropertyWIthInitializer2.kt") public void testAbstractPropertyWIthInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyWIthInitializer2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyWIthInitializer2.kt"); } @TestMetadata("abstractPropertyWIthInitializer3.kt") public void testAbstractPropertyWIthInitializer3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyWIthInitializer3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyWIthInitializer3.kt"); } @TestMetadata("abstractPropertyWithGetter1.kt") public void testAbstractPropertyWithGetter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyWithGetter1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyWithGetter1.kt"); } @TestMetadata("abstractPropertyWithGetter2.kt") public void testAbstractPropertyWithGetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyWithGetter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyWithGetter2.kt"); } @TestMetadata("abstractPropertyWithInitializer1.kt") public void testAbstractPropertyWithInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyWithInitializer1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyWithInitializer1.kt"); } @TestMetadata("abstractPropertyWithSetter.kt") public void testAbstractPropertyWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/abstractPropertyWithSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/abstractPropertyWithSetter.kt"); } public void testAllFilesPresentInAbstract() throws Exception { @@ -143,86 +133,72 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("makeEnumEntryAbstract.kt") public void testMakeEnumEntryAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/makeEnumEntryAbstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/makeEnumEntryAbstract.kt"); } @TestMetadata("makeObjectMemberAbstract.kt") public void testMakeObjectMemberAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/makeObjectMemberAbstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/makeObjectMemberAbstract.kt"); } @TestMetadata("makeTopLevelAbstract.kt") public void testMakeTopLevelAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/makeTopLevelAbstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/makeTopLevelAbstract.kt"); } @TestMetadata("manyImpl.kt") public void testManyImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/manyImpl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/manyImpl.kt"); } @TestMetadata("mustBeInitializedOrBeAbstract.kt") public void testMustBeInitializedOrBeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstract.kt"); } @TestMetadata("mustBeInitializedOrBeAbstractInFinalClass.kt") public void testMustBeInitializedOrBeAbstractInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstractInFinalClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstractInFinalClass.kt"); } @TestMetadata("mustBeInitializedOrBeAbstractInOpenClass.kt") public void testMustBeInitializedOrBeAbstractInOpenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstractInOpenClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstractInOpenClass.kt"); } @TestMetadata("mustBeInitializedOrBeAbstractInSealedClass.kt") public void testMustBeInitializedOrBeAbstractInSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstractInSealedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/mustBeInitializedOrBeAbstractInSealedClass.kt"); } @TestMetadata("nonAbstractFunctionWithNoBody.kt") public void testNonAbstractFunctionWithNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/nonAbstractFunctionWithNoBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/nonAbstractFunctionWithNoBody.kt"); } @TestMetadata("nonMemberAbstractFunction.kt") public void testNonMemberAbstractFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/nonMemberAbstractFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/nonMemberAbstractFunction.kt"); } @TestMetadata("nonMemberFunctionNoBody.kt") public void testNonMemberFunctionNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/nonMemberFunctionNoBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/nonMemberFunctionNoBody.kt"); } @TestMetadata("notImplementedMember.kt") public void testNotImplementedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/notImplementedMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/notImplementedMember.kt"); } @TestMetadata("notImplementedMemberFromAbstractClass.kt") public void testNotImplementedMemberFromAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/notImplementedMemberFromAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/notImplementedMemberFromAbstractClass.kt"); } @TestMetadata("replaceOpen.kt") public void testReplaceOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/abstract/replaceOpen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/abstract/replaceOpen.kt"); } } @@ -230,164 +206,142 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddAnnotationTarget extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddAnnotationTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addAnnotationTarget"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic1.kt") public void testBasic1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/basic1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/basic1.kt"); } @TestMetadata("basic2.kt") public void testBasic2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/basic2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/basic2.kt"); } @TestMetadata("basic3.kt") public void testBasic3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/basic3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/basic3.kt"); } @TestMetadata("basic4.kt") public void testBasic4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/basic4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/basic4.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/expression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/expression.kt"); } @TestMetadata("file.kt") public void testFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/file.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/file.kt"); } @TestMetadata("fromLib.kt") public void testFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/fromLib.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/fromLib.kt"); } @TestMetadata("hasAnnotationTarget1.kt") public void testHasAnnotationTarget1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/hasAnnotationTarget1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/hasAnnotationTarget1.kt"); } @TestMetadata("hasAnnotationTarget2.kt") public void testHasAnnotationTarget2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/hasAnnotationTarget2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/hasAnnotationTarget2.kt"); } @TestMetadata("noBackingField.kt") public void testNoBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/noBackingField.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/noBackingField.kt"); } @TestMetadata("use-site_delegate.kt") public void testUse_site_delegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_delegate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_delegate.kt"); } @TestMetadata("use-site_field.kt") public void testUse_site_field() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field.kt"); } @TestMetadata("use-site_field_member.kt") public void testUse_site_field_member() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field_member.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field_member.kt"); } @TestMetadata("use-site_field_member_with_delegate.kt") public void testUse_site_field_member_with_delegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field_member_with_delegate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field_member_with_delegate.kt"); } @TestMetadata("use-site_field_member_without_backing.kt") public void testUse_site_field_member_without_backing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field_member_without_backing.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field_member_without_backing.kt"); } @TestMetadata("use-site_field_toplevel.kt") public void testUse_site_field_toplevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field_toplevel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field_toplevel.kt"); } @TestMetadata("use-site_field_toplevel_with_delegate.kt") public void testUse_site_field_toplevel_with_delegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_with_delegate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_with_delegate.kt"); } @TestMetadata("use-site_field_toplevel_without_backing.kt") public void testUse_site_field_toplevel_without_backing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_without_backing.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_field_toplevel_without_backing.kt"); } @TestMetadata("use-site_file.kt") public void testUse_site_file() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_file.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_file.kt"); } @TestMetadata("use-site_get.kt") public void testUse_site_get() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_get.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_get.kt"); } @TestMetadata("use-site_invalid.kt") public void testUse_site_invalid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_invalid.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_invalid.kt"); } @TestMetadata("use-site_param.kt") public void testUse_site_param() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_param.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_param.kt"); } @TestMetadata("use-site_property.kt") public void testUse_site_property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_property.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_property.kt"); } @TestMetadata("use-site_receiver.kt") public void testUse_site_receiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_receiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_receiver.kt"); } @TestMetadata("use-site_set.kt") public void testUse_site_set() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_set.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_set.kt"); } @TestMetadata("use-site_setparam.kt") public void testUse_site_setparam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addAnnotationTarget/use-site_setparam.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addAnnotationTarget/use-site_setparam.kt"); } } @@ -395,20 +349,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddCrossinline extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddCrossinline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addCrossinline"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addCrossinline/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addCrossinline/basic.kt"); } @TestMetadata("suspend.kt") public void testSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addCrossinline/suspend.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addCrossinline/suspend.kt"); } } @@ -416,10 +372,13 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddDataModifier extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/abstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/abstract.kt"); } public void testAllFilesPresentInAddDataModifier() throws Exception { @@ -428,92 +387,77 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/inner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/inner.kt"); } @TestMetadata("invisibleParameter.kt") public void testInvisibleParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/invisibleParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/invisibleParameter.kt"); } @TestMetadata("invisibleParameter2.kt") public void testInvisibleParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/invisibleParameter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/invisibleParameter2.kt"); } @TestMetadata("noParameter.kt") public void testNoParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/noParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/noParameter.kt"); } @TestMetadata("notVarVal.kt") public void testNotVarVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/notVarVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/notVarVal.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/open.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/open.kt"); } @TestMetadata("sealed.kt") public void testSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/sealed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/sealed.kt"); } @TestMetadata("test1.kt") public void testTest1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test1.kt"); } @TestMetadata("test2.kt") public void testTest2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test2.kt"); } @TestMetadata("test3.kt") public void testTest3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test3.kt"); } @TestMetadata("test4.kt") public void testTest4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test4.kt"); } @TestMetadata("test5.kt") public void testTest5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test5.kt"); } @TestMetadata("test6.kt") public void testTest6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test6.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test6.kt"); } @TestMetadata("test7.kt") public void testTest7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/test7.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/test7.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addDataModifier/vararg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addDataModifier/vararg.kt"); } } @@ -521,50 +465,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddExclExclCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddExclExclCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addExclExclCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implicit.kt") public void testImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/implicit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/implicit.kt"); } @TestMetadata("implicitFunctionCall.kt") public void testImplicitFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/implicitFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/implicitFunctionCall.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/normal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/normal.kt"); } @TestMetadata("normal2.kt") public void testNormal2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/normal2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/normal2.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/null.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/null.kt"); } @TestMetadata("nullExpression.kt") public void testNullExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/nullExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/nullExpression.kt"); } @TestMetadata("operationIn.kt") public void testOperationIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addExclExclCall/operationIn.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addExclExclCall/operationIn.kt"); } } @@ -572,44 +513,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddGenericUpperBound extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddGenericUpperBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addGenericUpperBound"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addGenericUpperBound/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addGenericUpperBound/basic.kt"); } @TestMetadata("boundAlreadyExists.kt") public void testBoundAlreadyExists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addGenericUpperBound/boundAlreadyExists.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addGenericUpperBound/boundAlreadyExists.kt"); } @TestMetadata("inferenceTwoParams.kt") public void testInferenceTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt"); } @TestMetadata("kClassRuntime.kt") public void testKClassRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt"); } @TestMetadata("paramAsBound.kt") public void testParamAsBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addGenericUpperBound/paramAsBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addGenericUpperBound/paramAsBound.kt"); } @TestMetadata("withinDeclaration.kt") public void testWithinDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addGenericUpperBound/withinDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addGenericUpperBound/withinDeclaration.kt"); } } @@ -617,104 +556,92 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddInitializer extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddInitializer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addInitializer"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/localVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/localVar.kt"); } @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberExtensionProperty.kt"); } @TestMetadata("memberExtensionPropertyVarGetterOnly.kt") public void testMemberExtensionPropertyVarGetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarGetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarGetterOnly.kt"); } @TestMetadata("memberExtensionPropertyVarSetterOnly.kt") public void testMemberExtensionPropertyVarSetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarSetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberExtensionPropertyVarSetterOnly.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberProperty.kt"); } @TestMetadata("memberPropertyVarGetterOnly.kt") public void testMemberPropertyVarGetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberPropertyVarGetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberPropertyVarGetterOnly.kt"); } @TestMetadata("memberPropertyVarSetterOnly.kt") public void testMemberPropertyVarSetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberPropertyVarSetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberPropertyVarSetterOnly.kt"); } @TestMetadata("memberPropertyWithAccessor.kt") public void testMemberPropertyWithAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberPropertyWithAccessor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberPropertyWithAccessor.kt"); } @TestMetadata("memberPropertyWithDelegateRuntime.kt") public void testMemberPropertyWithDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt"); } @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelExtensionProperty.kt"); } @TestMetadata("topLevelExtensionPropertySetterOnly.kt") public void testTopLevelExtensionPropertySetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelExtensionPropertySetterOnly.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelProperty.kt"); } @TestMetadata("topLevelPropertyVarGetterOnly.kt") public void testTopLevelPropertyVarGetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelPropertyVarGetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarGetterOnly.kt"); } @TestMetadata("topLevelPropertyVarSetterOnly.kt") public void testTopLevelPropertyVarSetterOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelPropertyVarSetterOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyVarSetterOnly.kt"); } @TestMetadata("topLevelPropertyWithDelegateRuntime.kt") public void testTopLevelPropertyWithDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyWithDelegateRuntime.kt"); } @TestMetadata("topLevelPropertyWithGetter.kt") public void testTopLevelPropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInitializer/topLevelPropertyWithGetter.kt"); } } @@ -722,20 +649,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddInline extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addInline"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInline/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInline/basic.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInline/local.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInline/local.kt"); } } @@ -743,14 +672,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddInlineToReifiedFunctionFix extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddInlineToReifiedFunctionFix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addInlineToReifiedFunctionFix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addInlineToReifiedFunctionFix/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addInlineToReifiedFunctionFix/basic.kt"); } } @@ -758,20 +690,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddJvmDefault extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddJvmDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addJvmDefault"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionOverride.kt") public void testFunctionOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addJvmDefault/functionOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addJvmDefault/functionOverride.kt"); } @TestMetadata("propertyOverride.kt") public void testPropertyOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addJvmDefault/propertyOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addJvmDefault/propertyOverride.kt"); } } @@ -779,32 +713,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddNewLineAfterAnnotations extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddNewLineAfterAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addNewLineAfterAnnotations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addNewLineAfterAnnotations/basic.kt"); } @TestMetadata("manyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addNewLineAfterAnnotations/manyAnnotations.kt"); } @TestMetadata("poorlyFormattedExpression.kt") public void testPoorlyFormattedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addNewLineAfterAnnotations/poorlyFormattedExpression.kt"); } @TestMetadata("preserveComments.kt") public void testPreserveComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addNewLineAfterAnnotations/preserveComments.kt"); } } @@ -812,20 +746,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddNoinline extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddNoinline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addNoinline"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addNoinline/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addNoinline/basic.kt"); } @TestMetadata("suspend.kt") public void testSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addNoinline/suspend.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addNoinline/suspend.kt"); } } @@ -833,26 +769,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddReifiedToTypeParameterOfFunctionFix extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddReifiedToTypeParameterOfFunctionFix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doubleColonClass.kt") public void testDoubleColonClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix/doubleColonClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix/doubleColonClass.kt"); } @TestMetadata("secondTypeParameter.kt") public void testSecondTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix/secondTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix/secondTypeParameter.kt"); } @TestMetadata("toTypedArray.kt") public void testToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix/toTypedArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addReifiedToTypeParameterOfFunctionFix/toTypedArray.kt"); } } @@ -860,14 +797,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddRunBeforeLambda extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddRunBeforeLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addRunBeforeLambda"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addRunBeforeLambda/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addRunBeforeLambda/basic.kt"); } } @@ -875,76 +815,74 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddStarProjections extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddStarProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("qualifiedArrayList.kt") public void testQualifiedArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/qualifiedArrayList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/qualifiedArrayList.kt"); } @TestMetadata("qualifiedList.kt") public void testQualifiedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/qualifiedList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/qualifiedList.kt"); } @TestMetadata("qualifiedMap.kt") public void testQualifiedMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/qualifiedMap.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/qualifiedMap.kt"); } @TestMetadata("unqualifiedList.kt") public void testUnqualifiedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/unqualifiedList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/unqualifiedList.kt"); } @TestMetadata("unqualifiedMap.kt") public void testUnqualifiedMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/unqualifiedMap.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/unqualifiedMap.kt"); } @TestMetadata("unqualifiedMapOneArg.kt") public void testUnqualifiedMapOneArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/unqualifiedMapOneArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/unqualifiedMapOneArg.kt"); } @TestMetadata("idea/testData/quickfix/addStarProjections/cast") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/cast"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeFunctionalToStarProjection.kt") public void testChangeFunctionalToStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/cast/changeFunctionalToStarProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/cast/changeFunctionalToStarProjection.kt"); } @TestMetadata("changeToStarProjection.kt") public void testChangeToStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/cast/changeToStarProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/cast/changeToStarProjection.kt"); } @TestMetadata("changeToStarProjectionNullable.kt") public void testChangeToStarProjectionNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/cast/changeToStarProjectionNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/cast/changeToStarProjectionNullable.kt"); } @TestMetadata("uncheckedCastOnTypeParameter.kt") public void testUncheckedCastOnTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/cast/uncheckedCastOnTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/cast/uncheckedCastOnTypeParameter.kt"); } } @@ -952,26 +890,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckType extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/checkType"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeToStarProjectionMultipleParameters.kt") public void testChangeToStarProjectionMultipleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/checkType/changeToStarProjectionMultipleParameters.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/checkType/changeToStarProjectionMultipleParameters.kt"); } @TestMetadata("changeToStarProjectionNullable.kt") public void testChangeToStarProjectionNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/checkType/changeToStarProjectionNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/checkType/changeToStarProjectionNullable.kt"); } @TestMetadata("changeToStarProjectionSingleParameter.kt") public void testChangeToStarProjectionSingleParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/checkType/changeToStarProjectionSingleParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/checkType/changeToStarProjectionSingleParameter.kt"); } } @@ -979,56 +918,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/inner"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inner1.kt") public void testInner1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner1.kt"); } @TestMetadata("inner2.kt") public void testInner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner2.kt"); } @TestMetadata("inner3.kt") public void testInner3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner3.kt"); } @TestMetadata("inner4.kt") public void testInner4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner4.kt"); } @TestMetadata("inner5.kt") public void testInner5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner5.kt"); } @TestMetadata("inner6.kt") public void testInner6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner6.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner6.kt"); } @TestMetadata("inner7.kt") public void testInner7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner7.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner7.kt"); } @TestMetadata("inner8.kt") public void testInner8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/inner/inner8.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/inner/inner8.kt"); } } @@ -1036,44 +971,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addStarProjections/when"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("qualifiedArrayList.kt") public void testQualifiedArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/when/qualifiedArrayList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/when/qualifiedArrayList.kt"); } @TestMetadata("qualifiedList.kt") public void testQualifiedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/when/qualifiedList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/when/qualifiedList.kt"); } @TestMetadata("qualifiedMap.kt") public void testQualifiedMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/when/qualifiedMap.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/when/qualifiedMap.kt"); } @TestMetadata("unqualifiedList.kt") public void testUnqualifiedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/when/unqualifiedList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/when/unqualifiedList.kt"); } @TestMetadata("unqualifiedMap.kt") public void testUnqualifiedMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/when/unqualifiedMap.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/when/unqualifiedMap.kt"); } @TestMetadata("unqualifiedMapOneArg.kt") public void testUnqualifiedMapOneArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addStarProjections/when/unqualifiedMapOneArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addStarProjections/when/unqualifiedMapOneArg.kt"); } } } @@ -1082,44 +1015,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddSuspend extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addSuspend"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addSuspend/fakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addSuspend/fakeOverride.kt"); } @TestMetadata("fakeOverride2.kt") public void testFakeOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addSuspend/fakeOverride2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addSuspend/fakeOverride2.kt"); } @TestMetadata("middleClass.kt") public void testMiddleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addSuspend/middleClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addSuspend/middleClass.kt"); } @TestMetadata("middleClass2.kt") public void testMiddleClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addSuspend/middleClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addSuspend/middleClass2.kt"); } @TestMetadata("nonOverridden.kt") public void testNonOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addSuspend/nonOverridden.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addSuspend/nonOverridden.kt"); } @TestMetadata("nonOverridden2.kt") public void testNonOverridden2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addSuspend/nonOverridden2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addSuspend/nonOverridden2.kt"); } } @@ -1127,68 +1058,62 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddTypeAnnotationToValueParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddTypeAnnotationToValueParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/addTypeAnnotationToValueParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationWithArrayLiteralDouble.kt") public void testAnnotationWithArrayLiteralDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithArrayLiteralDouble.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithArrayLiteralDouble.kt"); } @TestMetadata("annotationWithArrayLiteralInt.kt") public void testAnnotationWithArrayLiteralInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithArrayLiteralInt.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithArrayLiteralInt.kt"); } @TestMetadata("annotationWithArrayLiteralString.kt") public void testAnnotationWithArrayLiteralString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithArrayLiteralString.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithArrayLiteralString.kt"); } @TestMetadata("annotationWithVarargArrayLiteralDouble.kt") public void testAnnotationWithVarargArrayLiteralDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargArrayLiteralDouble.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargArrayLiteralDouble.kt"); } @TestMetadata("annotationWithVarargArrayLiteralInt.kt") public void testAnnotationWithVarargArrayLiteralInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargArrayLiteralInt.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargArrayLiteralInt.kt"); } @TestMetadata("annotationWithVarargArrayLiteralString.kt") public void testAnnotationWithVarargArrayLiteralString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargArrayLiteralString.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargArrayLiteralString.kt"); } @TestMetadata("annotationWithVarargDoubleArray.kt") public void testAnnotationWithVarargDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargDoubleArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargDoubleArray.kt"); } @TestMetadata("annotationWithVarargIntArray.kt") public void testAnnotationWithVarargIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargIntArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/annotationWithVarargIntArray.kt"); } @TestMetadata("noDefaultValue.kt") public void testNoDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/noDefaultValue.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/noDefaultValue.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addTypeAnnotationToValueParameter/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addTypeAnnotationToValueParameter/simple.kt"); } } @@ -1196,16 +1121,18 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddValVar extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addVal.kt") public void testAddVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addValVar/addVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addValVar/addVal.kt"); } @TestMetadata("addValAfterVarArg.kt") public void testAddValAfterVarArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addValVar/addValAfterVarArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addValVar/addValAfterVarArg.kt"); } public void testAllFilesPresentInAddValVar() throws Exception { @@ -1217,16 +1144,18 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddVarianceModifier extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractIn.kt") public void testAbstractIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addVarianceModifier/abstractIn.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addVarianceModifier/abstractIn.kt"); } @TestMetadata("abstractOut.kt") public void testAbstractOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addVarianceModifier/abstractOut.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addVarianceModifier/abstractOut.kt"); } public void testAllFilesPresentInAddVarianceModifier() throws Exception { @@ -1235,8 +1164,7 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("emptyTest.kt") public void testEmptyTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/addVarianceModifier/emptyTest.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/addVarianceModifier/emptyTest.kt"); } } @@ -1244,80 +1172,72 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssignToProperty extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignToProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/assignToProperty"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentNameProperty.kt") public void testDifferentNameProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/differentNameProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/differentNameProperty.kt"); } @TestMetadata("differentNameProperty2.kt") public void testDifferentNameProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/differentNameProperty2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/differentNameProperty2.kt"); } @TestMetadata("differentTypeProperty.kt") public void testDifferentTypeProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/differentTypeProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/differentTypeProperty.kt"); } @TestMetadata("differentTypeProperty2.kt") public void testDifferentTypeProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/differentTypeProperty2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/differentTypeProperty2.kt"); } @TestMetadata("inSecondaryConstructor.kt") public void testInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/inSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/inSecondaryConstructor.kt"); } @TestMetadata("noProperty.kt") public void testNoProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/noProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/noProperty.kt"); } @TestMetadata("qualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/qualifiedThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/qualifiedThis.kt"); } @TestMetadata("sameProperty.kt") public void testSameProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/sameProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/sameProperty.kt"); } @TestMetadata("sameProperty2.kt") public void testSameProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/sameProperty2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/sameProperty2.kt"); } @TestMetadata("sameProperty3.kt") public void testSameProperty3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/sameProperty3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/sameProperty3.kt"); } @TestMetadata("valProperty.kt") public void testValProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/valProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/valProperty.kt"); } @TestMetadata("valProperty2.kt") public void testValProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/assignToProperty/valProperty2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/assignToProperty/valProperty2.kt"); } } @@ -1325,172 +1245,167 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AutoImports extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAutoImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("checkNoStackOverflowInImportInnerClassInCurrentFile.kt") public void testCheckNoStackOverflowInImportInnerClassInCurrentFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/checkNoStackOverflowInImportInnerClassInCurrentFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/checkNoStackOverflowInImportInnerClassInCurrentFile.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/enumEntries.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/enumEntries.kt"); } @TestMetadata("enumEntriesJsRuntime.kt") public void testEnumEntriesJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/enumEntriesJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/enumEntriesJsRuntime.kt"); } @TestMetadata("excludedCoroutineImpl.kt") public void testExcludedCoroutineImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/excludedCoroutineImpl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/excludedCoroutineImpl.kt"); } @TestMetadata("excludedCoroutineIntrinsics.kt") public void testExcludedCoroutineIntrinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/excludedCoroutineIntrinsics.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/excludedCoroutineIntrinsics.kt"); } @TestMetadata("excludedFromImport.kt") public void testExcludedFromImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/excludedFromImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/excludedFromImport.kt"); } @TestMetadata("infixCallAndObject.kt") public void testInfixCallAndObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/infixCallAndObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/infixCallAndObject.kt"); } @TestMetadata("kt17525.kt") public void testKt17525() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/kt17525.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/kt17525.kt"); } @TestMetadata("libraryPropertyJsRuntime.kt") public void testLibraryPropertyJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt"); } @TestMetadata("libraryPropertyRuntime.kt") public void testLibraryPropertyRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt"); } @TestMetadata("libraryTopLevelFunctionImportJsRuntime.kt") public void testLibraryTopLevelFunctionImportJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt"); } @TestMetadata("libraryTopLevelFunctionImportRuntime.kt") public void testLibraryTopLevelFunctionImportRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt"); } @TestMetadata("namelessClass.kt") public void testNamelessClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/namelessClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/namelessClass.kt"); } @TestMetadata("namelessFunction.kt") public void testNamelessFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/namelessFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/namelessFunction.kt"); } @TestMetadata("namelessObject.kt") public void testNamelessObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/namelessObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/namelessObject.kt"); } @TestMetadata("namelessParameter.kt") public void testNamelessParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/namelessParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/namelessParameter.kt"); } @TestMetadata("namelessProperty.kt") public void testNamelessProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/namelessProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/namelessProperty.kt"); } @TestMetadata("noImportForAlreadyImported.kt") public void testNoImportForAlreadyImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForAlreadyImported.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForAlreadyImported.kt"); } @TestMetadata("noImportForIndex.kt") public void testNoImportForIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/noImportForIndex.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/noImportForIndex.kt"); } @TestMetadata("notExcludedFromImportWhenInternalUse.kt") public void testNotExcludedFromImportWhenInternalUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/notExcludedFromImportWhenInternalUse.kt"); } @TestMetadata("notForThisLabel.kt") public void testNotForThisLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/notForThisLabel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/notForThisLabel.kt"); } @TestMetadata("sAMConstructorFromLambda.kt") public void testSAMConstructorFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/sAMConstructorFromLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/sAMConstructorFromLambda.kt"); } @TestMetadata("unresolvedReferenceInCall.kt") public void testUnresolvedReferenceInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/unresolvedReferenceInCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/unresolvedReferenceInCall.kt"); } @TestMetadata("idea/testData/quickfix/autoImports/kt21515") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports/kt21515"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferenceFromDeprecated.kt") public void testCallableReferenceFromDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/kt21515/callableReferenceFromDeprecated.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/kt21515/callableReferenceFromDeprecated.kt"); } @TestMetadata("classifierFromCompanionObjectDeprecationEnabled.kt") public void testClassifierFromCompanionObjectDeprecationEnabled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/kt21515/classifierFromCompanionObjectDeprecationEnabled.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/kt21515/classifierFromCompanionObjectDeprecationEnabled.kt"); } @TestMetadata("constructorFromDeprecated.kt") public void testConstructorFromDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/autoImports/kt21515/constructorFromDeprecated.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/autoImports/kt21515/constructorFromDeprecated.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/autoImports/mismatchingArgs") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MismatchingArgs extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMismatchingArgs() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/autoImports/mismatchingArgs"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } } @@ -1499,32 +1414,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CanBeParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCanBeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/canBeParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("usedInDerivedClass.kt") public void testUsedInDerivedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBeParameter/usedInDerivedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBeParameter/usedInDerivedClass.kt"); } @TestMetadata("usedInProperty.kt") public void testUsedInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBeParameter/usedInProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBeParameter/usedInProperty.kt"); } @TestMetadata("usedPrivateInInitializer.kt") public void testUsedPrivateInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBeParameter/usedPrivateInInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBeParameter/usedPrivateInInitializer.kt"); } @TestMetadata("usedVarArg.kt") public void testUsedVarArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBeParameter/usedVarArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBeParameter/usedVarArg.kt"); } } @@ -1532,38 +1447,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CanBePrimaryConstructorProperty extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCanBePrimaryConstructorProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/canBePrimaryConstructorProperty"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commentAfter.kt") public void testCommentAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBePrimaryConstructorProperty/commentAfter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBePrimaryConstructorProperty/commentAfter.kt"); } @TestMetadata("commentAhead.kt") public void testCommentAhead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBePrimaryConstructorProperty/commentAhead.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBePrimaryConstructorProperty/commentAhead.kt"); } @TestMetadata("protectedOpenVar.kt") public void testProtectedOpenVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBePrimaryConstructorProperty/protectedOpenVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBePrimaryConstructorProperty/protectedOpenVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBePrimaryConstructorProperty/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBePrimaryConstructorProperty/simple.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/canBePrimaryConstructorProperty/vararg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/canBePrimaryConstructorProperty/vararg.kt"); } } @@ -1571,52 +1485,48 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeSignature extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addConstructorParameter.kt") public void testAddConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addConstructorParameter.kt"); } @TestMetadata("addFunctionParameter.kt") public void testAddFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addFunctionParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addFunctionParameter.kt"); } @TestMetadata("addFunctionParameterAndChangeTypes.kt") public void testAddFunctionParameterAndChangeTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addFunctionParameterAndChangeTypes.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addFunctionParameterAndChangeTypes.kt"); } @TestMetadata("addFunctionParameterLongNameRuntime.kt") public void testAddFunctionParameterLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addFunctionParameterLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addFunctionParameterLongNameRuntime.kt"); } @TestMetadata("addNothingReturnType.kt") public void testAddNothingReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addNothingReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addNothingReturnType.kt"); } @TestMetadata("addParameterNotAvailableForBuiltins.kt") public void testAddParameterNotAvailableForBuiltins() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addParameterNotAvailableForBuiltins.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addParameterNotAvailableForBuiltins.kt"); } @TestMetadata("addParameterNotAvailableForLibrary.kt") public void testAddParameterNotAvailableForLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addParameterNotAvailableForLibrary.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addParameterNotAvailableForLibrary.kt"); } @TestMetadata("addParameterToFakeOverride.kt") public void testAddParameterToFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/addParameterToFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/addParameterToFakeOverride.kt"); } public void testAllFilesPresentInChangeSignature() throws Exception { @@ -1625,140 +1535,130 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("changeFunctionLiteralParameters1.kt") public void testChangeFunctionLiteralParameters1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/changeFunctionLiteralParameters1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/changeFunctionLiteralParameters1.kt"); } @TestMetadata("changeFunctionLiteralParameters2.kt") public void testChangeFunctionLiteralParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/changeFunctionLiteralParameters2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/changeFunctionLiteralParameters2.kt"); } @TestMetadata("complexHierarchy.kt") public void testComplexHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/complexHierarchy.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/complexHierarchy.kt"); } @TestMetadata("complexHierarchyHead.kt") public void testComplexHierarchyHead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/complexHierarchyHead.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/complexHierarchyHead.kt"); } @TestMetadata("complexHierarchyTail.kt") public void testComplexHierarchyTail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/complexHierarchyTail.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/complexHierarchyTail.kt"); } @TestMetadata("fixExtensionLambdaSignature.kt") public void testFixExtensionLambdaSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/fixExtensionLambdaSignature.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/fixExtensionLambdaSignature.kt"); } @TestMetadata("linearHierarchy.kt") public void testLinearHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/linearHierarchy.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/linearHierarchy.kt"); } @TestMetadata("notAvailableForSynthesized.kt") public void testNotAvailableForSynthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/notAvailableForSynthesized.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/notAvailableForSynthesized.kt"); } @TestMetadata("notEditable.kt") public void testNotEditable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/notEditable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/notEditable.kt"); } @TestMetadata("removeConstructorParameter.kt") public void testRemoveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeConstructorParameter.kt"); } @TestMetadata("removeFunctionFirstParameter.kt") public void testRemoveFunctionFirstParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeFunctionFirstParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeFunctionFirstParameter.kt"); } @TestMetadata("removeFunctionSecondParameter1.kt") public void testRemoveFunctionSecondParameter1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeFunctionSecondParameter1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeFunctionSecondParameter1.kt"); } @TestMetadata("removeFunctionSecondParameter2.kt") public void testRemoveFunctionSecondParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeFunctionSecondParameter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeFunctionSecondParameter2.kt"); } @TestMetadata("removeNamedParameter.kt") public void testRemoveNamedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeNamedParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeNamedParameter.kt"); } @TestMetadata("removeParameterFromExtension.kt") public void testRemoveParameterFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeParameterFromExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeParameterFromExtension.kt"); } @TestMetadata("removeParameterFromFakeOverride.kt") public void testRemoveParameterFromFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeParameterFromFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeParameterFromFakeOverride.kt"); } @TestMetadata("removeParameterNotAvailableForBuiltins.kt") public void testRemoveParameterNotAvailableForBuiltins() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeParameterNotAvailableForBuiltins.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeParameterNotAvailableForBuiltins.kt"); } @TestMetadata("removeUnusedConstructorParameterWithUsage.kt") public void testRemoveUnusedConstructorParameterWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeUnusedConstructorParameterWithUsage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeUnusedConstructorParameterWithUsage.kt"); } @TestMetadata("removeUnusedExtensionParameter.kt") public void testRemoveUnusedExtensionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeUnusedExtensionParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeUnusedExtensionParameter.kt"); } @TestMetadata("removeUnusedInternalConstructorParameter.kt") public void testRemoveUnusedInternalConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeUnusedInternalConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeUnusedInternalConstructorParameter.kt"); } @TestMetadata("removeUnusedParameter.kt") public void testRemoveUnusedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeUnusedParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeUnusedParameter.kt"); } @TestMetadata("removeUnusedPrimaryConstructorParameter.kt") public void testRemoveUnusedPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeUnusedPrimaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeUnusedPrimaryConstructorParameter.kt"); } @TestMetadata("removeUnusedPrimaryConstructorParameter2.kt") public void testRemoveUnusedPrimaryConstructorParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeSignature/removeUnusedPrimaryConstructorParameter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeSignature/removeUnusedPrimaryConstructorParameter2.kt"); + } + + @TestMetadata("idea/testData/quickfix/changeSignature/jk") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Jk extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJk() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeSignature/jk"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); + } } } @@ -1766,32 +1666,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeToLabeledReturn extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeToLabeledReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeToLabeledReturn"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multipleInner.kt") public void testMultipleInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt"); } @TestMetadata("multipleOuter.kt") public void testMultipleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToLabeledReturn/multipleOuter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToLabeledReturn/multipleOuter.kt"); } @TestMetadata("noCandidates.kt") public void testNoCandidates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToLabeledReturn/noCandidates.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToLabeledReturn/noCandidates.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToLabeledReturn/normal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToLabeledReturn/normal.kt"); } } @@ -1799,56 +1699,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeToUseSpreadOperator extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeToUseSpreadOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/changeToUseSpreadOperator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("differentTypeParameter.kt") public void testDifferentTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/differentTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/differentTypeParameter.kt"); } @TestMetadata("mapOf.kt") public void testMapOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/mapOf.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/mapOf.kt"); } @TestMetadata("mapOfBug.kt") public void testMapOfBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/mapOfBug.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/mapOfBug.kt"); } @TestMetadata("multipleParams.kt") public void testMultipleParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/multipleParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/multipleParams.kt"); } @TestMetadata("nonArray.kt") public void testNonArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/nonArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/nonArray.kt"); } @TestMetadata("nonVarArg.kt") public void testNonVarArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/nonVarArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/nonVarArg.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/normal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/normal.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/changeToUseSpreadOperator/vararg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/changeToUseSpreadOperator/vararg.kt"); } } @@ -1856,64 +1752,64 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckArguments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCheckArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonVarargSpread.kt") public void testNonVarargSpread() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/nonVarargSpread.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/nonVarargSpread.kt"); } @TestMetadata("idea/testData/quickfix/checkArguments/addNameToArgument") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddNameToArgument extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddNameToArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/checkArguments/addNameToArgument"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnString.kt") public void testInvokeOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/invokeOnString.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/invokeOnString.kt"); } @TestMetadata("mixedNamedAndPositionalArguments.kt") public void testMixedNamedAndPositionalArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArguments.kt"); } @TestMetadata("mixedNamedAndPositionalArgumentsConstructor.kt") public void testMixedNamedAndPositionalArgumentsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsConstructor.kt"); } @TestMetadata("mixedNamedAndPositionalArgumentsMultiple.kt") public void testMixedNamedAndPositionalArgumentsMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsMultiple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsMultiple.kt"); } @TestMetadata("mixedNamedAndPositionalArgumentsSubtype.kt") public void testMixedNamedAndPositionalArgumentsSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsSubtype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsSubtype.kt"); } @TestMetadata("mixedNamedAndPositionalArgumentsUsedNamed.kt") public void testMixedNamedAndPositionalArgumentsUsedNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsUsedNamed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsUsedNamed.kt"); } @TestMetadata("mixedNamedAndPositionalArgumentsUsedPositional.kt") public void testMixedNamedAndPositionalArgumentsUsedPositional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsUsedPositional.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/checkArguments/addNameToArgument/mixedNamedAndPositionalArgumentsUsedPositional.kt"); } } } @@ -1922,26 +1818,40 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConflictingImports extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConflictingImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/conflictingImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("removeConflictingImport.kt") public void testRemoveConflictingImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/conflictingImports/removeConflictingImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/conflictingImports/removeConflictingImport.kt"); } @TestMetadata("removeDuplicateImport.kt") public void testRemoveDuplicateImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/conflictingImports/removeDuplicateImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/conflictingImports/removeDuplicateImport.kt"); } @TestMetadata("removeDuplicateImportWithAlias.kt") public void testRemoveDuplicateImportWithAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/conflictingImports/removeDuplicateImportWithAlias.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/conflictingImports/removeDuplicateImportWithAlias.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/convertJavaInterfaceToClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConvertJavaInterfaceToClass extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConvertJavaInterfaceToClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/convertJavaInterfaceToClass"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } @@ -1949,26 +1859,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertPropertyInitializerToGetter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertPropertyInitializerToGetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/convertPropertyInitializerToGetter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/convertPropertyInitializerToGetter/val.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/convertPropertyInitializerToGetter/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/convertPropertyInitializerToGetter/var.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/convertPropertyInitializerToGetter/var.kt"); } @TestMetadata("varWithSetter.kt") public void testVarWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/convertPropertyInitializerToGetter/varWithSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/convertPropertyInitializerToGetter/varWithSetter.kt"); } } @@ -1976,6 +1887,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateFromUsage extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateFromUsage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -1984,6 +1899,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateClass extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -1992,56 +1911,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationEntry extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationEntry() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/annotationEntry"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationNoBrackets.kt") public void testAnnotationNoBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoBrackets.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoBrackets.kt"); } @TestMetadata("annotationNoParamList.kt") public void testAnnotationNoParamList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParamList.kt"); } @TestMetadata("annotationNoParams.kt") public void testAnnotationNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationNoParams.kt"); } @TestMetadata("annotationWithParams.kt") public void testAnnotationWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithParams.kt"); } @TestMetadata("annotationWithTypeParams.kt") public void testAnnotationWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/annotationWithTypeParams.kt"); } @TestMetadata("notAnnotation.kt") public void testNotAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/notAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/notAnnotation.kt"); } @TestMetadata("singleArgAnnotation.kt") public void testSingleArgAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleArgAnnotation.kt"); } @TestMetadata("singleNamedArgAnnotation.kt") public void testSingleNamedArgAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/annotationEntry/singleNamedArgAnnotation.kt"); } } @@ -2049,298 +1964,259 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallExpression extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callInAnnotationEntry.kt") public void testCallInAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInAnnotationEntry.kt"); } @TestMetadata("callInLambda.kt") public void testCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInLambda.kt"); } @TestMetadata("callInLocalFunNoReceiver.kt") public void testCallInLocalFunNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInLocalFunNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInLocalFunNoReceiver.kt"); } @TestMetadata("callInMemberFunNoReceiver.kt") public void testCallInMemberFunNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberFunNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberFunNoReceiver.kt"); } @TestMetadata("callInMemberValDelegateRuntime.kt") public void testCallInMemberValDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt"); } @TestMetadata("callInMemberVarDelegateRuntime.kt") public void testCallInMemberVarDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberVarDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberVarDelegateRuntime.kt"); } @TestMetadata("callInWhenEntry.kt") public void testCallInWhenEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInWhenEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callInWhenEntry.kt"); } @TestMetadata("callNoReceiver.kt") public void testCallNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callNoReceiver.kt"); } @TestMetadata("callWithClassQualifier.kt") public void testCallWithClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithClassQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithClassQualifier.kt"); } @TestMetadata("callWithExplicitParamNames.kt") public void testCallWithExplicitParamNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExplicitParamNames.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExplicitParamNames.kt"); } @TestMetadata("callWithExtraArgs.kt") public void testCallWithExtraArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExtraArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithExtraArgs.kt"); } @TestMetadata("callWithFinalSupertype.kt") public void testCallWithFinalSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithFinalSupertype.kt"); } @TestMetadata("callWithGenericReceiver.kt") public void testCallWithGenericReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGenericReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithGenericReceiver.kt"); } @TestMetadata("callWithLambdaArg.kt") public void testCallWithLambdaArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithLambdaArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithLambdaArg.kt"); } @TestMetadata("callWithLambdaArgOnly.kt") public void testCallWithLambdaArgOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithLambdaArgOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithLambdaArgOnly.kt"); } @TestMetadata("callWithLibClassQualifier.kt") public void testCallWithLibClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithLibClassQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithLibClassQualifier.kt"); } @TestMetadata("callWithMissingArgs.kt") public void testCallWithMissingArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithMissingArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithMissingArgs.kt"); } @TestMetadata("callWithObjectQualifier.kt") public void testCallWithObjectQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithObjectQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithObjectQualifier.kt"); } @TestMetadata("callWithPackageName.kt") public void testCallWithPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithPackageName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithPackageName.kt"); } @TestMetadata("callWithReceiver.kt") public void testCallWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithReceiver.kt"); } @TestMetadata("callWithSuperclassNoConstructorParams.kt") public void testCallWithSuperclassNoConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassNoConstructorParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassNoConstructorParams.kt"); } @TestMetadata("callWithSuperclassWithConstructorParams.kt") public void testCallWithSuperclassWithConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassWithConstructorParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSuperclassWithConstructorParams.kt"); } @TestMetadata("callWithSupertrait.kt") public void testCallWithSupertrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSupertrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithSupertrait.kt"); } @TestMetadata("callWithThisReceiverInClass.kt") public void testCallWithThisReceiverInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInClass.kt"); } @TestMetadata("callWithThisReceiverInExtension.kt") public void testCallWithThisReceiverInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInExtension.kt"); } @TestMetadata("callWithThisReceiverInNestedClass1.kt") public void testCallWithThisReceiverInNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInNestedClass1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInNestedClass1.kt"); } @TestMetadata("callWithThisReceiverInNestedClass2.kt") public void testCallWithThisReceiverInNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInNestedClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithThisReceiverInNestedClass2.kt"); } @TestMetadata("callWithTypeArgsInAnnotationEntry.kt") public void testCallWithTypeArgsInAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithTypeArgsInAnnotationEntry.kt"); } @TestMetadata("createNestedClass.kt") public void testCreateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/createNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/createNestedClass.kt"); } @TestMetadata("createNestedClassInInner.kt") public void testCreateNestedClassInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/createNestedClassInInner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/createNestedClassInInner.kt"); } @TestMetadata("expectedTypeBySuperFunction.kt") public void testExpectedTypeBySuperFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/expectedTypeBySuperFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/expectedTypeBySuperFunction.kt"); } @TestMetadata("quotedName.kt") public void testQuotedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/quotedName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/quotedName.kt"); } @TestMetadata("singleArgCallInAnnotationEntry.kt") public void testSingleArgCallInAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/singleArgCallInAnnotationEntry.kt"); } @TestMetadata("singleNamedArgCallInAnnotationEntry.kt") public void testSingleNamedArgCallInAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/singleNamedArgCallInAnnotationEntry.kt"); } @TestMetadata("unusedCallResult.kt") public void testUnusedCallResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/unusedCallResult.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/unusedCallResult.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callWithStarProjection.kt") public void testCallWithStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/callWithStarProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/callWithStarProjection.kt"); } @TestMetadata("classMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMember.kt"); } @TestMetadata("classMemberInner.kt") public void testClassMemberInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInner.kt"); } @TestMetadata("classMemberInnerPartialSubstitution.kt") public void testClassMemberInnerPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerPartialSubstitution.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerPartialSubstitution.kt"); } @TestMetadata("classMemberInnerWithReceiverArg.kt") public void testClassMemberInnerWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberInnerWithReceiverArg.kt"); } @TestMetadata("classMemberPartialSubstitution.kt") public void testClassMemberPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberPartialSubstitution.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/classMemberPartialSubstitution.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/extension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/extension.kt"); } @TestMetadata("noReceiver.kt") public void testNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiver.kt"); } @TestMetadata("noReceiverExtraArgs.kt") public void testNoReceiverExtraArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiverExtraArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiverExtraArgs.kt"); } @TestMetadata("noReceiverLongName.kt") public void testNoReceiverLongName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiverLongName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiverLongName.kt"); } @TestMetadata("noReceiverPartialSubstitution.kt") public void testNoReceiverPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiverPartialSubstitution.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/noReceiverPartialSubstitution.kt"); } @TestMetadata("withExpectedTypeNoReceiver.kt") public void testWithExpectedTypeNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/withExpectedTypeNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/callExpression/typeArguments/withExpectedTypeNoReceiver.kt"); } } } @@ -2349,56 +2225,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegationSpecifier extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegationSpecifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classDelegatorToSuperclass.kt") public void testClassDelegatorToSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/classDelegatorToSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/classDelegatorToSuperclass.kt"); } @TestMetadata("delegatorToSupercallNoReceiver.kt") public void testDelegatorToSupercallNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallNoReceiver.kt"); } @TestMetadata("delegatorToSupercallWithClassQualifier.kt") public void testDelegatorToSupercallWithClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithClassQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithClassQualifier.kt"); } @TestMetadata("delegatorToSupercallWithPackageQualifier.kt") public void testDelegatorToSupercallWithPackageQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithPackageQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithPackageQualifier.kt"); } @TestMetadata("delegatorToSupercallWithParamNames.kt") public void testDelegatorToSupercallWithParamNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithParamNames.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithParamNames.kt"); } @TestMetadata("delegatorToSupercallWithTypeParams.kt") public void testDelegatorToSupercallWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/delegatorToSupercallWithTypeParams.kt"); } @TestMetadata("traitDelegatorToSuperclass.kt") public void testTraitDelegatorToSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToSuperclass.kt"); } @TestMetadata("traitDelegatorToSuperclass2.kt") public void testTraitDelegatorToSuperclass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToSuperclass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/delegationSpecifier/traitDelegatorToSuperclass2.kt"); } } @@ -2406,124 +2278,114 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportDirective extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportDirective() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationInPackage.kt") public void testAnnotationInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationInPackage.kt"); } @TestMetadata("annotationWithQualifier.kt") public void testAnnotationWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/annotationWithQualifier.kt"); } @TestMetadata("classInPackage.kt") public void testClassInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/classInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/classInPackage.kt"); } @TestMetadata("classWithQualifier.kt") public void testClassWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/classWithQualifier.kt"); } @TestMetadata("enumEntryInEnum.kt") public void testEnumEntryInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInEnum.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInEnum.kt"); } @TestMetadata("enumEntryInPackage.kt") public void testEnumEntryInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryInPackage.kt"); } @TestMetadata("enumEntryWithQualifier.kt") public void testEnumEntryWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumEntryWithQualifier.kt"); } @TestMetadata("enumInPackage.kt") public void testEnumInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumInPackage.kt"); } @TestMetadata("enumWithQualifier.kt") public void testEnumWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/enumWithQualifier.kt"); } @TestMetadata("objectInPackage.kt") public void testObjectInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectInPackage.kt"); } @TestMetadata("objectWithQualifier.kt") public void testObjectWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/objectWithQualifier.kt"); } @TestMetadata("traitInPackage.kt") public void testTraitInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitInPackage.kt"); } @TestMetadata("traitWithQualifier.kt") public void testTraitWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/traitWithQualifier.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferenceOnClass.kt") public void testCallableReferenceOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/callableReferenceOnClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/callableReferenceOnClass.kt"); } @TestMetadata("callableReferenceOnClassWithCompanion.kt") public void testCallableReferenceOnClassWithCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/callableReferenceOnClassWithCompanion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/callableReferenceOnClassWithCompanion.kt"); } @TestMetadata("callableReferenceOnObject.kt") public void testCallableReferenceOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/callableReferenceOnObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/callableReferenceOnObject.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/constructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/constructor.kt"); } @TestMetadata("typeReference.kt") public void testTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/typeReference.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/importDirective/kt21515/typeReference.kt"); } } } @@ -2532,236 +2394,202 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReferenceExpression extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferenceExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/referenceExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationByClassLiteral.kt") public void testAnnotationByClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationByClassLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationByClassLiteral.kt"); } @TestMetadata("annotationNoReceiver.kt") public void testAnnotationNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationNoReceiver.kt"); } @TestMetadata("classByClassLiteral.kt") public void testClassByClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByClassLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByClassLiteral.kt"); } @TestMetadata("classByNestedQualifier.kt") public void testClassByNestedQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByNestedQualifier.kt"); } @TestMetadata("classByQualifier.kt") public void testClassByQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classByQualifier.kt"); } @TestMetadata("classInPackage.kt") public void testClassInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classInPackage.kt"); } @TestMetadata("classNoReceiver.kt") public void testClassNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classNoReceiver.kt"); } @TestMetadata("classWithQualifier.kt") public void testClassWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithQualifier.kt"); } @TestMetadata("classWithReceiver.kt") public void testClassWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classWithReceiver.kt"); } @TestMetadata("createNestedObject.kt") public void testCreateNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/createNestedObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/createNestedObject.kt"); } @TestMetadata("createNestedObjectInInner.kt") public void testCreateNestedObjectInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/createNestedObjectInInner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/createNestedObjectInInner.kt"); } @TestMetadata("enumByClassLiteral.kt") public void testEnumByClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByClassLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByClassLiteral.kt"); } @TestMetadata("enumByQualifier.kt") public void testEnumByQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumByQualifier.kt"); } @TestMetadata("enumEntryAddComma.kt") public void testEnumEntryAddComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryAddComma.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryAddComma.kt"); } @TestMetadata("enumEntryHasComma.kt") public void testEnumEntryHasComma() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryHasComma.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryHasComma.kt"); } @TestMetadata("enumEntryNoReceiver.kt") public void testEnumEntryNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryNoReceiver.kt"); } @TestMetadata("enumEntryWithEnumQualifier.kt") public void testEnumEntryWithEnumQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithEnumQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithEnumQualifier.kt"); } @TestMetadata("enumEntryWithEnumQualifierAndParams.kt") public void testEnumEntryWithEnumQualifierAndParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithEnumQualifierAndParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithEnumQualifierAndParams.kt"); } @TestMetadata("enumEntryWithEnumSuperclass.kt") public void testEnumEntryWithEnumSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithEnumSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithEnumSuperclass.kt"); } @TestMetadata("enumEntryWithQualifier.kt") public void testEnumEntryWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithQualifier.kt"); } @TestMetadata("enumEntryWithReceiver.kt") public void testEnumEntryWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithReceiver.kt"); } @TestMetadata("enumEntryWithSuperclass.kt") public void testEnumEntryWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryWithSuperclass.kt"); } @TestMetadata("enumNoReceiver.kt") public void testEnumNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumNoReceiver.kt"); } @TestMetadata("interfaceByClassLiteral.kt") public void testInterfaceByClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/interfaceByClassLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/interfaceByClassLiteral.kt"); } @TestMetadata("objectByClassLiteral.kt") public void testObjectByClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectByClassLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectByClassLiteral.kt"); } @TestMetadata("objectByQualifier.kt") public void testObjectByQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectByQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectByQualifier.kt"); } @TestMetadata("objectInPackage.kt") public void testObjectInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectInPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectInPackage.kt"); } @TestMetadata("objectNoReceiver.kt") public void testObjectNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectNoReceiver.kt"); } @TestMetadata("objectWithQualifier.kt") public void testObjectWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithQualifier.kt"); } @TestMetadata("objectWithReceiver.kt") public void testObjectWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithReceiver.kt"); } @TestMetadata("objectWithSuperclass.kt") public void testObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithSuperclass.kt"); } @TestMetadata("objectWithSupertrait.kt") public void testObjectWithSupertrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithSupertrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/objectWithSupertrait.kt"); } @TestMetadata("recursiveBound.kt") public void testRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/recursiveBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/recursiveBound.kt"); } @TestMetadata("traitByQualifier.kt") public void testTraitByQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitByQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitByQualifier.kt"); } @TestMetadata("traitNoReceiver.kt") public void testTraitNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitNoReceiver.kt"); } @TestMetadata("unusedReference.kt") public void testUnusedReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/unusedReference.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/unusedReference.kt"); } @TestMetadata("valDelegateExpressionRuntime.kt") public void testValDelegateExpressionRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/valDelegateExpressionRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/valDelegateExpressionRuntime.kt"); } @TestMetadata("varDelegateExpressionRuntime.kt") public void testVarDelegateExpressionRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/varDelegateExpressionRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/referenceExpression/varDelegateExpressionRuntime.kt"); } } @@ -2769,188 +2597,162 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createClass/typeReference"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationNotQualifierNoTypeArgs.kt") public void testAnnotationNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierNoTypeArgs.kt"); } @TestMetadata("annotationNotQualifierWithTypeArgs.kt") public void testAnnotationNotQualifierWithTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierWithTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationNotQualifierWithTypeArgs.kt"); } @TestMetadata("annotationQualifierNoTypeArgs.kt") public void testAnnotationQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/annotationQualifierNoTypeArgs.kt"); } @TestMetadata("classCurrentPackageReceiver.kt") public void testClassCurrentPackageReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classCurrentPackageReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classCurrentPackageReceiver.kt"); } @TestMetadata("classLibTypeReceiver.kt") public void testClassLibTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classLibTypeReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classLibTypeReceiver.kt"); } @TestMetadata("classNotQualifierNoTypeArgs.kt") public void testClassNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classNotQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classNotQualifierNoTypeArgs.kt"); } @TestMetadata("classNotQualifierWithStarProjection.kt") public void testClassNotQualifierWithStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classNotQualifierWithStarProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classNotQualifierWithStarProjection.kt"); } @TestMetadata("classNotQualifierWithTypeArgs.kt") public void testClassNotQualifierWithTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classNotQualifierWithTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classNotQualifierWithTypeArgs.kt"); } @TestMetadata("classQualifierNoTypeArgs.kt") public void testClassQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classQualifierNoTypeArgs.kt"); } @TestMetadata("classUserTypeReceiver.kt") public void testClassUserTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classUserTypeReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classUserTypeReceiver.kt"); } @TestMetadata("classUserTypeReceiverNoBody.kt") public void testClassUserTypeReceiverNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/classUserTypeReceiverNoBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/classUserTypeReceiverNoBody.kt"); } @TestMetadata("createNestedClass.kt") public void testCreateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/createNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/createNestedClass.kt"); } @TestMetadata("createNestedClassInInner.kt") public void testCreateNestedClassInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/createNestedClassInInner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/createNestedClassInInner.kt"); } @TestMetadata("enumEntryNotQualifierNoTypeArgs.kt") public void testEnumEntryNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryNotQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumEntryNotQualifierNoTypeArgs.kt"); } @TestMetadata("enumNotQualifierNoTypeArgs.kt") public void testEnumNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierNoTypeArgs.kt"); } @TestMetadata("enumNotQualifierWithTypeArgs.kt") public void testEnumNotQualifierWithTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierWithTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/enumNotQualifierWithTypeArgs.kt"); } @TestMetadata("nestedClassByTypeArgumentRefNoBody.kt") public void testNestedClassByTypeArgumentRefNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/nestedClassByTypeArgumentRefNoBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/nestedClassByTypeArgumentRefNoBody.kt"); } @TestMetadata("nestedClassByTypeArgumentRefWithBody.kt") public void testNestedClassByTypeArgumentRefWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/nestedClassByTypeArgumentRefWithBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/nestedClassByTypeArgumentRefWithBody.kt"); } @TestMetadata("noAnnotationForTypeBound.kt") public void testNoAnnotationForTypeBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeBound.kt"); } @TestMetadata("noAnnotationForTypeConstraint.kt") public void testNoAnnotationForTypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeConstraint.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/noAnnotationForTypeConstraint.kt"); } @TestMetadata("noEnumForTypeBound.kt") public void testNoEnumForTypeBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeBound.kt"); } @TestMetadata("noEnumForTypeConstraint.kt") public void testNoEnumForTypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeConstraint.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/noEnumForTypeConstraint.kt"); } @TestMetadata("noObjectForTypeBound.kt") public void testNoObjectForTypeBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeBound.kt"); } @TestMetadata("noObjectForTypeConstraint.kt") public void testNoObjectForTypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeConstraint.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/noObjectForTypeConstraint.kt"); } @TestMetadata("objectNotQualifierNoTypeArgs.kt") public void testObjectNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierNoTypeArgs.kt"); } @TestMetadata("objectNotQualifierWithTypeArgs.kt") public void testObjectNotQualifierWithTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierWithTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/objectNotQualifierWithTypeArgs.kt"); } @TestMetadata("objectQualifierNoTypeArgs.kt") public void testObjectQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/objectQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/objectQualifierNoTypeArgs.kt"); } @TestMetadata("traitNotQualifierNoTypeArgs.kt") public void testTraitNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/traitNotQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/traitNotQualifierNoTypeArgs.kt"); } @TestMetadata("typeArgumentWithBound.kt") public void testTypeArgumentWithBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/typeArgumentWithBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/typeArgumentWithBound.kt"); } @TestMetadata("typeArgumentWithMultipleBounds.kt") public void testTypeArgumentWithMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createClass/typeReference/typeArgumentWithMultipleBounds.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createClass/typeReference/typeArgumentWithMultipleBounds.kt"); } } } @@ -2959,6 +2761,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateFunction extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -2967,104 +2773,92 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryOperations extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customOperationOnUserType.kt") public void testCustomOperationOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/customOperationOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/customOperationOnUserType.kt"); } @TestMetadata("greaterOrEqualOnUserType.kt") public void testGreaterOrEqualOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/greaterOrEqualOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/greaterOrEqualOnUserType.kt"); } @TestMetadata("inOnUserType.kt") public void testInOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/inOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/inOnUserType.kt"); } @TestMetadata("lessOnUserType.kt") public void testLessOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/lessOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/lessOnUserType.kt"); } @TestMetadata("notInOnUserType.kt") public void testNotInOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/notInOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/notInOnUserType.kt"); } @TestMetadata("plusAssignOnUserType.kt") public void testPlusAssignOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusAssignOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusAssignOnUserType.kt"); } @TestMetadata("plusExtraArgs.kt") public void testPlusExtraArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusExtraArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusExtraArgs.kt"); } @TestMetadata("plusForAssignmentOnUserType.kt") public void testPlusForAssignmentOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusForAssignmentOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusForAssignmentOnUserType.kt"); } @TestMetadata("plusMissingArgs.kt") public void testPlusMissingArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusMissingArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusMissingArgs.kt"); } @TestMetadata("plusOnLibType.kt") public void testPlusOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt"); } @TestMetadata("plusOnUserType.kt") public void testPlusOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnUserType.kt"); } @TestMetadata("plusOnUserTypeWithTypeParams.kt") public void testPlusOnUserTypeWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnUserTypeWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnUserTypeWithTypeParams.kt"); } @TestMetadata("quotedName.kt") public void testQuotedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/quotedName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/quotedName.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/typeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/typeMismatch.kt"); } @TestMetadata("whenInOnUserType.kt") public void testWhenInOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/whenInOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/whenInOnUserType.kt"); } @TestMetadata("whenNotInOnUserType.kt") public void testWhenNotInOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/whenNotInOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/whenNotInOnUserType.kt"); } } @@ -3072,418 +2866,359 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("approximateAnonymousObjectRuntime.kt") public void testApproximateAnonymousObjectRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/approximateAnonymousObjectRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/approximateAnonymousObjectRuntime.kt"); } @TestMetadata("approximateLocalClassRuntime.kt") public void testApproximateLocalClassRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/approximateLocalClassRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/approximateLocalClassRuntime.kt"); } @TestMetadata("argumentTypeMismatch.kt") public void testArgumentTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/argumentTypeMismatch.kt"); } @TestMetadata("callInAnnotationEntry.kt") public void testCallInAnnotationEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/callInAnnotationEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/callInAnnotationEntry.kt"); } @TestMetadata("callInStringTemplateRuntime.kt") public void testCallInStringTemplateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/callInStringTemplateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/callInStringTemplateRuntime.kt"); } @TestMetadata("callWithClassLiteral.kt") public void testCallWithClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/callWithClassLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/callWithClassLiteral.kt"); } @TestMetadata("callWithLambdaArg.kt") public void testCallWithLambdaArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/callWithLambdaArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/callWithLambdaArg.kt"); } @TestMetadata("callWithLambdaArgOnly.kt") public void testCallWithLambdaArgOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/callWithLambdaArgOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/callWithLambdaArgOnly.kt"); } @TestMetadata("doNotStripPrefix.kt") public void testDoNotStripPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/doNotStripPrefix.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/doNotStripPrefix.kt"); } @TestMetadata("extensionFunOnTrait.kt") public void testExtensionFunOnTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionFunOnTrait.kt"); } @TestMetadata("extensionRefInImport.kt") public void testExtensionRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionRefInImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionRefInImport.kt"); } @TestMetadata("funExtraArgs.kt") public void testFunExtraArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funExtraArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funExtraArgs.kt"); } @TestMetadata("funMissingArgs.kt") public void testFunMissingArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funMissingArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funMissingArgs.kt"); } @TestMetadata("funOnClassNoClassObject.kt") public void testFunOnClassNoClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnClassNoClassObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnClassNoClassObject.kt"); } @TestMetadata("funOnClassObject.kt") public void testFunOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnClassObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnClassObject.kt"); } @TestMetadata("funOnLibObject.kt") public void testFunOnLibObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibObject.kt"); } @TestMetadata("funOnLibType.kt") public void testFunOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt"); } @TestMetadata("funOnTrait.kt") public void testFunOnTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnTrait.kt"); } @TestMetadata("funOnUserObject.kt") public void testFunOnUserObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserObject.kt"); } @TestMetadata("funOnUserType.kt") public void testFunOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserType.kt"); } @TestMetadata("funOnUserTypeWithDeclarations.kt") public void testFunOnUserTypeWithDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserTypeWithDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserTypeWithDeclarations.kt"); } @TestMetadata("funOnUserTypeWithTypeParams.kt") public void testFunOnUserTypeWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserTypeWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funOnUserTypeWithTypeParams.kt"); } @TestMetadata("funPlacement.kt") public void testFunPlacement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funPlacement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funPlacement.kt"); } @TestMetadata("funWithExplicitParamNamesOnUserType.kt") public void testFunWithExplicitParamNamesOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt"); } @TestMetadata("funWithNullableParamType.kt") public void testFunWithNullableParamType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funWithNullableParamType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funWithNullableParamType.kt"); } @TestMetadata("funWithNullableType.kt") public void testFunWithNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funWithNullableType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funWithNullableType.kt"); } @TestMetadata("funWithNullableTypeParameter.kt") public void testFunWithNullableTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funWithNullableTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funWithNullableTypeParameter.kt"); } @TestMetadata("funWithPackageName.kt") public void testFunWithPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/funWithPackageName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/funWithPackageName.kt"); } @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/functionalType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/functionalType.kt"); } @TestMetadata("functionalTypeInReceiver.kt") public void testFunctionalTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/functionalTypeInReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/functionalTypeInReceiver.kt"); } @TestMetadata("inAnonymousFunBlockWithExpectedType.kt") public void testInAnonymousFunBlockWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunBlockWithExpectedType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunBlockWithExpectedType.kt"); } @TestMetadata("inAnonymousFunExprWithExpectedType.kt") public void testInAnonymousFunExprWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt"); } @TestMetadata("inLambda.kt") public void testInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt"); } @TestMetadata("inLambdaWithExpectedType.kt") public void testInLambdaWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt"); } @TestMetadata("inconsistentTypes.kt") public void testInconsistentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/inconsistentTypes.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/inconsistentTypes.kt"); } @TestMetadata("insideIfCondition.kt") public void testInsideIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/insideIfCondition.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/insideIfCondition.kt"); } @TestMetadata("kt10983.kt") public void testKt10983() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt"); } @TestMetadata("localFunNoReceiver.kt") public void testLocalFunNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/localFunNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/localFunNoReceiver.kt"); } @TestMetadata("memberFunNoReceiver.kt") public void testMemberFunNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/memberFunNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/memberFunNoReceiver.kt"); } @TestMetadata("memberValDelegateRuntime.kt") public void testMemberValDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/memberValDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/memberValDelegateRuntime.kt"); } @TestMetadata("memberVarDelegateRuntime.kt") public void testMemberVarDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/memberVarDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/memberVarDelegateRuntime.kt"); } @TestMetadata("notExactArgument.kt") public void testNotExactArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/notExactArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/notExactArgument.kt"); } @TestMetadata("objectMemberFunNoReceiver.kt") public void testObjectMemberFunNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/objectMemberFunNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/objectMemberFunNoReceiver.kt"); } @TestMetadata("privateForMembers.kt") public void testPrivateForMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/privateForMembers.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/privateForMembers.kt"); } @TestMetadata("propertyOnUserType.kt") public void testPropertyOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/propertyOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/propertyOnUserType.kt"); } @TestMetadata("qualifiedCallInStringTemplateRuntime.kt") public void testQualifiedCallInStringTemplateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/qualifiedCallInStringTemplateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/qualifiedCallInStringTemplateRuntime.kt"); } @TestMetadata("refInImport.kt") public void testRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/refInImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/refInImport.kt"); } @TestMetadata("smartCastWithIs.kt") public void testSmartCastWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/smartCastWithIs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/smartCastWithIs.kt"); } @TestMetadata("smartCastWithNullCheck.kt") public void testSmartCastWithNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/smartCastWithNullCheck.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/smartCastWithNullCheck.kt"); } @TestMetadata("stripPrefix.kt") public void testStripPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/stripPrefix.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/stripPrefix.kt"); } @TestMetadata("thisInClass.kt") public void testThisInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/thisInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/thisInClass.kt"); } @TestMetadata("thisInExtension.kt") public void testThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/thisInExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/thisInExtension.kt"); } @TestMetadata("thisInNestedClass1.kt") public void testThisInNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/thisInNestedClass1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/thisInNestedClass1.kt"); } @TestMetadata("thisInNestedClass2.kt") public void testThisInNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/thisInNestedClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/thisInNestedClass2.kt"); } @TestMetadata("topLevelFunNoReceiver.kt") public void testTopLevelFunNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/topLevelFunNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/topLevelFunNoReceiver.kt"); } @TestMetadata("topLevelFunPlacement.kt") public void testTopLevelFunPlacement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/topLevelFunPlacement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/topLevelFunPlacement.kt"); } @TestMetadata("unitFun.kt") public void testUnitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/unitFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/unitFun.kt"); } @TestMetadata("unknownType.kt") public void testUnknownType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/unknownType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/unknownType.kt"); } @TestMetadata("unresolvedSupertype.kt") public void testUnresolvedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/unresolvedSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/unresolvedSupertype.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Abstract extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAbstract() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/abstract"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classNoExplicitReceiver.kt") public void testClassNoExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/classNoExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/classNoExplicitReceiver.kt"); } @TestMetadata("explicitReceiverOfContainingClass.kt") public void testExplicitReceiverOfContainingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/explicitReceiverOfContainingClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/explicitReceiverOfContainingClass.kt"); } @TestMetadata("inAbstractSuperclass.kt") public void testInAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/inAbstractSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/inAbstractSuperclass.kt"); } @TestMetadata("inBaseInterface.kt") public void testInBaseInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/inBaseInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/inBaseInterface.kt"); } @TestMetadata("interfaceNoExplicitReceiver.kt") public void testInterfaceNoExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/interfaceNoExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/interfaceNoExplicitReceiver.kt"); } @TestMetadata("noAbstractSuperclass.kt") public void testNoAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/noAbstractSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/noAbstractSuperclass.kt"); } @TestMetadata("notAbstractClass.kt") public void testNotAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/notAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/notAbstractClass.kt"); } @TestMetadata("otherExplicitReceiver.kt") public void testOtherExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/otherExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/abstract/otherExplicitReceiver.kt"); } } @@ -3491,38 +3226,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionByExtensionReceiver extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensionByExtensionReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionFunction.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionLambda.kt"); } @TestMetadata("extensionPropertyGetter.kt") public void testExtensionPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionPropertyGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionPropertyGetter.kt"); } @TestMetadata("extensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionPropertySetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/extensionPropertySetter.kt"); } @TestMetadata("notExtensionCallable.kt") public void testNotExtensionCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/notExtensionCallable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/extensionByExtensionReceiver/notExtensionCallable.kt"); } } @@ -3530,92 +3264,82 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callWithStarProjection.kt") public void testCallWithStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/callWithStarProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/callWithStarProjection.kt"); } @TestMetadata("classMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMember.kt"); } @TestMetadata("classMemberInFunctionLiteralWithReceiver.kt") public void testClassMemberInFunctionLiteralWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMemberInFunctionLiteralWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMemberInFunctionLiteralWithReceiver.kt"); } @TestMetadata("classMemberPartialSubstitution.kt") public void testClassMemberPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMemberPartialSubstitution.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMemberPartialSubstitution.kt"); } @TestMetadata("classMemberWithReceiverArg.kt") public void testClassMemberWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMemberWithReceiverArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/classMemberWithReceiverArg.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extension.kt"); } @TestMetadata("extensionPartialSubstitution.kt") public void testExtensionPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionPartialSubstitution.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionPartialSubstitution.kt"); } @TestMetadata("extensionWithReceiverArg.kt") public void testExtensionWithReceiverArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionWithReceiverArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionWithReceiverArg.kt"); } @TestMetadata("extensionWithTypeParameterAsReceiver.kt") public void testExtensionWithTypeParameterAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionWithTypeParameterAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/extensionWithTypeParameterAsReceiver.kt"); } @TestMetadata("memberWithTypeParameterAsReceiver.kt") public void testMemberWithTypeParameterAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/memberWithTypeParameterAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/memberWithTypeParameterAsReceiver.kt"); } @TestMetadata("noReceiver.kt") public void testNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiver.kt"); } @TestMetadata("noReceiverExtraArgs.kt") public void testNoReceiverExtraArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiverExtraArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiverExtraArgs.kt"); } @TestMetadata("noReceiverLongName.kt") public void testNoReceiverLongName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiverLongName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiverLongName.kt"); } @TestMetadata("noReceiverPartialSubstitution.kt") public void testNoReceiverPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiverPartialSubstitution.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/call/typeArguments/noReceiverPartialSubstitution.kt"); } } } @@ -3624,44 +3348,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/callableReferences"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionNoReceiverInCallableRef.kt") public void testExtensionNoReceiverInCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/extensionNoReceiverInCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/extensionNoReceiverInCallableRef.kt"); } @TestMetadata("extensionWithReceiverInCallableRef.kt") public void testExtensionWithReceiverInCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/extensionWithReceiverInCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/extensionWithReceiverInCallableRef.kt"); } @TestMetadata("noExpectedReturnType.kt") public void testNoExpectedReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/noExpectedReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/noExpectedReturnType.kt"); } @TestMetadata("noFunctionalType.kt") public void testNoFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/noFunctionalType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/noFunctionalType.kt"); } @TestMetadata("nonExtensionWithReceiverInCallableRef.kt") public void testNonExtensionWithReceiverInCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/nonExtensionWithReceiverInCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/nonExtensionWithReceiverInCallableRef.kt"); } @TestMetadata("withExpectedReturnType.kt") public void testWithExpectedReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/withExpectedReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/callableReferences/withExpectedReturnType.kt"); } } @@ -3669,26 +3391,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Component extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComponent() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/component"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createComponentFromUsage1.kt") public void testCreateComponentFromUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/component/createComponentFromUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/component/createComponentFromUsage1.kt"); } @TestMetadata("createComponentFromUsage2.kt") public void testCreateComponentFromUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/component/createComponentFromUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/component/createComponentFromUsage2.kt"); } @TestMetadata("createComponentFromUsage3.kt") public void testCreateComponentFromUsage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/component/createComponentFromUsage3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/component/createComponentFromUsage3.kt"); } } @@ -3696,44 +3419,55 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegateAccessors extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegateAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/localVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/localVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/localVar.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/val.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/var.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/var.kt"); } @TestMetadata("varMissingGet.kt") public void testVarMissingGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/varMissingGet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/varMissingGet.kt"); } @TestMetadata("varMissingSet.kt") public void testVarMissingSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/varMissingSet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/delegateAccessors/varMissingSet.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createFunction/fromJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FromJava extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFromJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/fromJava"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } @@ -3741,86 +3475,77 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Get extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGet() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/get"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createGetFromUsage1.kt") public void testCreateGetFromUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage1.kt"); } @TestMetadata("createGetFromUsage10.kt") public void testCreateGetFromUsage10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage10.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage10.kt"); } @TestMetadata("createGetFromUsage11.kt") public void testCreateGetFromUsage11() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage11.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage11.kt"); } @TestMetadata("createGetFromUsage12.kt") public void testCreateGetFromUsage12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage12.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage12.kt"); } @TestMetadata("createGetFromUsage13.kt") public void testCreateGetFromUsage13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage13.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage13.kt"); } @TestMetadata("createGetFromUsage2.kt") public void testCreateGetFromUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage2.kt"); } @TestMetadata("createGetFromUsage3.kt") public void testCreateGetFromUsage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage3.kt"); } @TestMetadata("createGetFromUsage4.kt") public void testCreateGetFromUsage4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage4.kt"); } @TestMetadata("createGetFromUsage5.kt") public void testCreateGetFromUsage5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage5.kt"); } @TestMetadata("createGetFromUsage7.kt") public void testCreateGetFromUsage7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage7.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage7.kt"); } @TestMetadata("createGetFromUsage8.kt") public void testCreateGetFromUsage8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage8.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage8.kt"); } @TestMetadata("createGetFromUsage9.kt") public void testCreateGetFromUsage9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage9.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/createGetFromUsage9.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/get/typeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/get/typeMismatch.kt"); } } @@ -3828,20 +3553,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HasNext extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInHasNext() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/hasNext"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createHasNextFromUsage1.kt") public void testCreateHasNextFromUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/hasNext/createHasNextFromUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/hasNext/createHasNextFromUsage1.kt"); } @TestMetadata("createHasNextFromUsage2.kt") public void testCreateHasNextFromUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/hasNext/createHasNextFromUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/hasNext/createHasNextFromUsage2.kt"); } } @@ -3849,38 +3576,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/invoke"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnLibType.kt") public void testInvokeOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnLibType.kt"); } @TestMetadata("invokeOnUserType.kt") public void testInvokeOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnUserType.kt"); } @TestMetadata("invokeOnUserTypeWithTypeParams.kt") public void testInvokeOnUserTypeWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnUserTypeWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeOnUserTypeWithTypeParams.kt"); } @TestMetadata("invokeWithExplicitParamNamesOnUserType.kt") public void testInvokeWithExplicitParamNamesOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt"); } @TestMetadata("lambdaArgument.kt") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/invoke/lambdaArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/invoke/lambdaArgument.kt"); } } @@ -3888,26 +3614,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Iterator extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/iterator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createIteratorFromUsage1.kt") public void testCreateIteratorFromUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/iterator/createIteratorFromUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/iterator/createIteratorFromUsage1.kt"); } @TestMetadata("createIteratorFromUsage2.kt") public void testCreateIteratorFromUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/iterator/createIteratorFromUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/iterator/createIteratorFromUsage2.kt"); } @TestMetadata("createIteratorFromUsage3.kt") public void testCreateIteratorFromUsage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/iterator/createIteratorFromUsage3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/iterator/createIteratorFromUsage3.kt"); } } @@ -3915,20 +3642,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Next extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNext() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/next"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createNextFromUsage1.kt") public void testCreateNextFromUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/next/createNextFromUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/next/createNextFromUsage1.kt"); } @TestMetadata("createNextFromUsage2.kt") public void testCreateNextFromUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/next/createNextFromUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/next/createNextFromUsage2.kt"); } } @@ -3936,32 +3665,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Set extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSet() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/set"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("createSetFromUsage1.kt") public void testCreateSetFromUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/set/createSetFromUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/set/createSetFromUsage1.kt"); } @TestMetadata("createSetFromUsage2.kt") public void testCreateSetFromUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/set/createSetFromUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/set/createSetFromUsage2.kt"); } @TestMetadata("setterForIncrement.kt") public void testSetterForIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/set/setterForIncrement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/set/setterForIncrement.kt"); } @TestMetadata("typeMismatch.kt") public void testTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/set/typeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/set/typeMismatch.kt"); } } @@ -3969,38 +3698,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryOperations extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnaryOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("incOnUserType.kt") public void testIncOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/incOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/incOnUserType.kt"); } @TestMetadata("minusMissingArgs.kt") public void testMinusMissingArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusMissingArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusMissingArgs.kt"); } @TestMetadata("minusOnLibType.kt") public void testMinusOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusOnLibType.kt"); } @TestMetadata("minusOnUserType.kt") public void testMinusOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusOnUserType.kt"); } @TestMetadata("minusOnUserTypeWithTypeParams.kt") public void testMinusOnUserTypeWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusOnUserTypeWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createFunction/unaryOperations/minusOnUserTypeWithTypeParams.kt"); } } } @@ -4009,98 +3737,87 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateSecondaryConstructor extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateSecondaryConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createSecondaryConstructor"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentTypeMismatch.kt") public void testArgumentTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/argumentTypeMismatch.kt"); } @TestMetadata("callWithExpectedType.kt") public void testCallWithExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/callWithExpectedType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/callWithExpectedType.kt"); } @TestMetadata("callWithTypeArguments.kt") public void testCallWithTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/callWithTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/callWithTypeArguments.kt"); } @TestMetadata("classWithBody.kt") public void testClassWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/classWithBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/classWithBody.kt"); } @TestMetadata("classWithoutBody.kt") public void testClassWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/classWithoutBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/classWithoutBody.kt"); } @TestMetadata("delegatorToSuperCall.kt") public void testDelegatorToSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCall.kt"); } @TestMetadata("delegatorToSuperCallNoClass.kt") public void testDelegatorToSuperCallNoClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCallNoClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/delegatorToSuperCallNoClass.kt"); } @TestMetadata("noParametersImplicitSuperCall.kt") public void testNoParametersImplicitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noParametersImplicitSuperCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noParametersImplicitSuperCall.kt"); } @TestMetadata("noParametersSuperCall.kt") public void testNoParametersSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noParametersSuperCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noParametersSuperCall.kt"); } @TestMetadata("noParametersThisCall.kt") public void testNoParametersThisCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noParametersThisCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noParametersThisCall.kt"); } @TestMetadata("noneApplicable.kt") public void testNoneApplicable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noneApplicable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/noneApplicable.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCall.kt"); } @TestMetadata("superCallNoClass.kt") public void testSuperCallNoClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallNoClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/superCallNoClass.kt"); } @TestMetadata("thisCall.kt") public void testThisCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/thisCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/thisCall.kt"); } @TestMetadata("wrongExpectedType.kt") public void testWrongExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/wrongExpectedType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createSecondaryConstructor/wrongExpectedType.kt"); } } @@ -4108,6 +3825,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateTypeAlias extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeAlias"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -4116,74 +3837,67 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeReference extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("currentPackageReceiver.kt") public void testCurrentPackageReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/currentPackageReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/currentPackageReceiver.kt"); } @TestMetadata("libTypeReceiver.kt") public void testLibTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/libTypeReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/libTypeReceiver.kt"); } @TestMetadata("notQualifierNoTypeArgs.kt") public void testNotQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/notQualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/notQualifierNoTypeArgs.kt"); } @TestMetadata("notQualifierWithStarProjection.kt") public void testNotQualifierWithStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/notQualifierWithStarProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/notQualifierWithStarProjection.kt"); } @TestMetadata("notQualifierWithTypeArgs.kt") public void testNotQualifierWithTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/notQualifierWithTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/notQualifierWithTypeArgs.kt"); } @TestMetadata("qualifierNoTypeArgs.kt") public void testQualifierNoTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/qualifierNoTypeArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/qualifierNoTypeArgs.kt"); } @TestMetadata("recursiveTypeBound1.kt") public void testRecursiveTypeBound1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/recursiveTypeBound1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/recursiveTypeBound1.kt"); } @TestMetadata("recursiveTypeBound2.kt") public void testRecursiveTypeBound2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/recursiveTypeBound2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/recursiveTypeBound2.kt"); } @TestMetadata("typeParameterDependency.kt") public void testTypeParameterDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/typeParameterDependency.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/typeParameterDependency.kt"); } @TestMetadata("userTypeReceiver.kt") public void testUserTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/userTypeReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/userTypeReceiver.kt"); } @TestMetadata("userTypeReceiverNoBody.kt") public void testUserTypeReceiverNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/userTypeReceiverNoBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeAlias/typeReference/userTypeReceiverNoBody.kt"); } } } @@ -4192,6 +3906,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateTypeParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -4200,86 +3918,77 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InContainingDeclaration extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInContainingDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classNoExplication.kt") public void testClassNoExplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classNoExplication.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classNoExplication.kt"); } @TestMetadata("classWithExplication.kt") public void testClassWithExplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt"); } @TestMetadata("classWithExplicationAndRecursiveUpperBound.kt") public void testClassWithExplicationAndRecursiveUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt"); } @TestMetadata("classWithExplicationAndUpperBound.kt") public void testClassWithExplicationAndUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt"); } @TestMetadata("functionNoExplication.kt") public void testFunctionNoExplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionNoExplication.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionNoExplication.kt"); } @TestMetadata("functionWithExplication.kt") public void testFunctionWithExplication() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplication.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplication.kt"); } @TestMetadata("functionWithExplicationAndRecursiveUpperBound.kt") public void testFunctionWithExplicationAndRecursiveUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt"); } @TestMetadata("functionWithExplicationAndUpperBound.kt") public void testFunctionWithExplicationAndUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt"); } @TestMetadata("inAnnotation.kt") public void testInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inAnnotation.kt"); } @TestMetadata("inSuperTypeEntry.kt") public void testInSuperTypeEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inSuperTypeEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/inSuperTypeEntry.kt"); } @TestMetadata("qualifiedType.kt") public void testQualifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/qualifiedType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/qualifiedType.kt"); } @TestMetadata("typeQualifier.kt") public void testTypeQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/typeQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/typeQualifier.kt"); } @TestMetadata("withTypeArguments.kt") public void testWithTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/withTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/withTypeArguments.kt"); } } @@ -4287,22 +3996,23 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InReferencedDeclaration extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addMultiple.kt") public void testAddMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/addMultiple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/addMultiple.kt"); } @TestMetadata("addSingle.kt") public void testAddSingle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/addSingle.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/addSingle.kt"); } @TestMetadata("addToFunction.kt") public void testAddToFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/addToFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/addToFunction.kt"); } public void testAllFilesPresentInInReferencedDeclaration() throws Exception { @@ -4311,14 +4021,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("missingArguments.kt") public void testMissingArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/missingArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/missingArguments.kt"); } @TestMetadata("notOnTypeArgumentList.kt") public void testNotOnTypeArgumentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/notOnTypeArgumentList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createTypeParameter/inReferencedDeclaration/notOnTypeArgumentList.kt"); } } } @@ -4327,6 +4035,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateVariable extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -4335,134 +4047,117 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalVariable extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/localVariable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignedInFun.kt") public void testAssignedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/assignedInFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/assignedInFun.kt"); } @TestMetadata("callableRef.kt") public void testCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/callableRef.kt"); } @TestMetadata("inAccessor.kt") public void testInAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessor.kt"); } @TestMetadata("inAccessorWithExpressionBody.kt") public void testInAccessorWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inAccessorWithExpressionBody.kt"); } @TestMetadata("inBinaryOperation.kt") public void testInBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inBinaryOperation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inBinaryOperation.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inClass.kt"); } @TestMetadata("inFun.kt") public void testInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inFun.kt"); } @TestMetadata("inFunWithExpressionBody.kt") public void testInFunWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inFunWithExpressionBody.kt"); } @TestMetadata("inLabelRef.kt") public void testInLabelRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inLabelRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inLabelRef.kt"); } @TestMetadata("inLambdaNoParams.kt") public void testInLambdaNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaNoParams.kt"); } @TestMetadata("inLambdaWithParams.kt") public void testInLambdaWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inLambdaWithParams.kt"); } @TestMetadata("inMultiLineLambdaNoParams.kt") public void testInMultiLineLambdaNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaNoParams.kt"); } @TestMetadata("inMultiLineLambdaWithParams.kt") public void testInMultiLineLambdaWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inMultiLineLambdaWithParams.kt"); } @TestMetadata("inWhen.kt") public void testInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/inWhen.kt"); } @TestMetadata("localWithPackageName.kt") public void testLocalWithPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/localWithPackageName.kt"); } @TestMetadata("nonIdentifier.kt") public void testNonIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/nullableType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/nullableType.kt"); } @TestMetadata("onTopLevel.kt") public void testOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/onTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/onTopLevel.kt"); } @TestMetadata("positionNextToUsage.kt") public void testPositionNextToUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/positionNextToUsage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/positionNextToUsage.kt"); } @TestMetadata("qualifiedInFun.kt") public void testQualifiedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/qualifiedInFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/qualifiedInFun.kt"); } @TestMetadata("unitTypedInFun.kt") public void testUnitTypedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/localVariable/unitTypedInFun.kt"); } } @@ -4470,326 +4165,277 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/parameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignedInFun.kt") public void testAssignedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFun.kt"); } @TestMetadata("assignedInFunInClass.kt") public void testAssignedInFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFunInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/assignedInFunInClass.kt"); } @TestMetadata("callableRef.kt") public void testCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/callableRef.kt"); } @TestMetadata("dataClassPropertyByDestructuringEntry.kt") public void testDataClassPropertyByDestructuringEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntry.kt"); } @TestMetadata("dataClassPropertyByDestructuringEntryWithSkippedIndex.kt") public void testDataClassPropertyByDestructuringEntryWithSkippedIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithSkippedIndex.kt"); } @TestMetadata("dataClassPropertyByDestructuringEntryWithType.kt") public void testDataClassPropertyByDestructuringEntryWithType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByDestructuringEntryWithType.kt"); } @TestMetadata("dataClassPropertyByNamedArgument.kt") public void testDataClassPropertyByNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByNamedArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/dataClassPropertyByNamedArgument.kt"); } @TestMetadata("inAccessorInClass.kt") public void testInAccessorInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClass.kt"); } @TestMetadata("inAccessorInClassObject.kt") public void testInAccessorInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClassObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInClassObject.kt"); } @TestMetadata("inAccessorInGenClass.kt") public void testInAccessorInGenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInGenClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInGenClass.kt"); } @TestMetadata("inAccessorInObject.kt") public void testInAccessorInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInObject.kt"); } @TestMetadata("inAccessorInTrait.kt") public void testInAccessorInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorInTrait.kt"); } @TestMetadata("inAccessorNoClass.kt") public void testInAccessorNoClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorNoClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorNoClass.kt"); } @TestMetadata("inAccessorWithExpressionBodyInClass.kt") public void testInAccessorWithExpressionBodyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorWithExpressionBodyInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAccessorWithExpressionBodyInClass.kt"); } @TestMetadata("inAnonymousObject.kt") public void testInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAnonymousObject.kt"); } @TestMetadata("inAnonymousObjectInSecondaryConstructor.kt") public void testInAnonymousObjectInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAnonymousObjectInSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inAnonymousObjectInSecondaryConstructor.kt"); } @TestMetadata("inBinaryOperation.kt") public void testInBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inBinaryOperation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inBinaryOperation.kt"); } @TestMetadata("inClassInitializer.kt") public void testInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inClassInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inClassInitializer.kt"); } @TestMetadata("inClassObjectInitializer.kt") public void testInClassObjectInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inClassObjectInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inClassObjectInitializer.kt"); } @TestMetadata("inFun.kt") public void testInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inFun.kt"); } @TestMetadata("inFunInClass.kt") public void testInFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inFunInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inFunInClass.kt"); } @TestMetadata("inFunInGenClass.kt") public void testInFunInGenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inFunInGenClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inFunInGenClass.kt"); } @TestMetadata("inGenAccessorInClass.kt") public void testInGenAccessorInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInClass.kt"); } @TestMetadata("inGenAccessorInGenClass.kt") public void testInGenAccessorInGenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInGenClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenAccessorInGenClass.kt"); } @TestMetadata("inGenFunInClass.kt") public void testInGenFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenFunInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenFunInClass.kt"); } @TestMetadata("inGenFunInGenClass.kt") public void testInGenFunInGenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenFunInGenClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inGenFunInGenClass.kt"); } @TestMetadata("inLabelRef.kt") public void testInLabelRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLabelRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLabelRef.kt"); } @TestMetadata("inLambdaNoParams.kt") public void testInLambdaNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaNoParams.kt"); } @TestMetadata("inLambdaWithIt.kt") public void testInLambdaWithIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithIt.kt"); } @TestMetadata("inLambdaWithParams.kt") public void testInLambdaWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithParams.kt"); } @TestMetadata("inLambdaWithTypedParams.kt") public void testInLambdaWithTypedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inLambdaWithTypedParams.kt"); } @TestMetadata("inMultiLineLambdaNoParams.kt") public void testInMultiLineLambdaNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inMultiLineLambdaNoParams.kt"); } @TestMetadata("inPropertyInitializerInClass.kt") public void testInPropertyInitializerInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClass.kt"); } @TestMetadata("inPropertyInitializerInClassObject.kt") public void testInPropertyInitializerInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClassObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInClassObject.kt"); } @TestMetadata("inPropertyInitializerInEnumClass.kt") public void testInPropertyInitializerInEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInEnumClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInEnumClass.kt"); } @TestMetadata("inPropertyInitializerInEnumEntry.kt") public void testInPropertyInitializerInEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInEnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInEnumEntry.kt"); } @TestMetadata("inPropertyInitializerInGenClass.kt") public void testInPropertyInitializerInGenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInGenClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInGenClass.kt"); } @TestMetadata("inPropertyInitializerInNestedClass.kt") public void testInPropertyInitializerInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInNestedClass.kt"); } @TestMetadata("inPropertyInitializerInObject.kt") public void testInPropertyInitializerInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerInObject.kt"); } @TestMetadata("inPropertyInitializerNoClass.kt") public void testInPropertyInitializerNoClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerNoClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inPropertyInitializerNoClass.kt"); } @TestMetadata("inSecondaryConstructor.kt") public void testInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/inSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/inSecondaryConstructor.kt"); } @TestMetadata("namedArgInConstructorCall.kt") public void testNamedArgInConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/namedArgInConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/namedArgInConstructorCall.kt"); } @TestMetadata("namedArgInFunctionCall.kt") public void testNamedArgInFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/namedArgInFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/namedArgInFunctionCall.kt"); } @TestMetadata("nonIdentifier.kt") public void testNonIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/nullableType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/nullableType.kt"); } @TestMetadata("parameterFromClassDelegationSpecifier.kt") public void testParameterFromClassDelegationSpecifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/parameterFromClassDelegationSpecifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/parameterFromClassDelegationSpecifier.kt"); } @TestMetadata("parameterFromEnumEntryDelegationSpecifier.kt") public void testParameterFromEnumEntryDelegationSpecifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/parameterFromEnumEntryDelegationSpecifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/parameterFromEnumEntryDelegationSpecifier.kt"); } @TestMetadata("parameterFromObjectDelegationSpecifier.kt") public void testParameterFromObjectDelegationSpecifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/parameterFromObjectDelegationSpecifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/parameterFromObjectDelegationSpecifier.kt"); } @TestMetadata("qualifiedInFun.kt") public void testQualifiedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/qualifiedInFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/qualifiedInFun.kt"); } @TestMetadata("quotedName.kt") public void testQuotedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/quotedName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/quotedName.kt"); } @TestMetadata("recursiveBound.kt") public void testRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/recursiveBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/recursiveBound.kt"); } @TestMetadata("withPackageName.kt") public void testWithPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/withPackageName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/withPackageName.kt"); } @TestMetadata("wrongReceiver.kt") public void testWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/parameter/wrongReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/parameter/wrongReceiver.kt"); } } @@ -4797,86 +4443,77 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimaryParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimaryParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localValNoReceiver.kt") public void testLocalValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/localValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/localValNoReceiver.kt"); } @TestMetadata("memberValNoReceiver.kt") public void testMemberValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/memberValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/memberValNoReceiver.kt"); } @TestMetadata("memberVarNoReceiver.kt") public void testMemberVarNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/memberVarNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/memberVarNoReceiver.kt"); } @TestMetadata("objectMemberValNoReceiver.kt") public void testObjectMemberValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/objectMemberValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/objectMemberValNoReceiver.kt"); } @TestMetadata("thisInClass.kt") public void testThisInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInClass.kt"); } @TestMetadata("thisInExtension.kt") public void testThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInExtension.kt"); } @TestMetadata("thisInNestedClass1.kt") public void testThisInNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInNestedClass1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInNestedClass1.kt"); } @TestMetadata("thisInNestedClass2.kt") public void testThisInNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInNestedClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/thisInNestedClass2.kt"); } @TestMetadata("topLevelValNoReceiver.kt") public void testTopLevelValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/topLevelValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/topLevelValNoReceiver.kt"); } @TestMetadata("valOnCompanionObject.kt") public void testValOnCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnCompanionObject.kt"); } @TestMetadata("valOnLibType.kt") public void testValOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnLibType.kt"); } @TestMetadata("valOnUserType.kt") public void testValOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/valOnUserType.kt"); } @TestMetadata("varOnUserType.kt") public void testVarOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/varOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/primaryParameter/varOnUserType.kt"); } } @@ -4884,268 +4521,247 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callOnUserType.kt") public void testCallOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/callOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/callOnUserType.kt"); } @TestMetadata("callableRef.kt") public void testCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/callableRef.kt"); } @TestMetadata("extensionRefInImport.kt") public void testExtensionRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionRefInImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionRefInImport.kt"); } @TestMetadata("extensionWithTypeParameterAsReceiver.kt") public void testExtensionWithTypeParameterAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/extensionWithTypeParameterAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/extensionWithTypeParameterAsReceiver.kt"); } @TestMetadata("inBinaryOperation.kt") public void testInBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/inBinaryOperation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/inBinaryOperation.kt"); } @TestMetadata("inLabelRef.kt") public void testInLabelRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/inLabelRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/inLabelRef.kt"); } @TestMetadata("inconsistentTypes.kt") public void testInconsistentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/inconsistentTypes.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/inconsistentTypes.kt"); } @TestMetadata("localValDelegateRuntime.kt") public void testLocalValDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/localValDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/localValDelegateRuntime.kt"); } @TestMetadata("localValNoReceiver.kt") public void testLocalValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/localValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/localValNoReceiver.kt"); } @TestMetadata("memberValDelegateRuntime.kt") public void testMemberValDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/memberValDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/memberValDelegateRuntime.kt"); } @TestMetadata("memberValNoReceiver.kt") public void testMemberValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/memberValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/memberValNoReceiver.kt"); } @TestMetadata("memberVarDelegateRuntime.kt") public void testMemberVarDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/memberVarDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/memberVarDelegateRuntime.kt"); } @TestMetadata("memberWithTypeParameterAsReceiver.kt") public void testMemberWithTypeParameterAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/memberWithTypeParameterAsReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/memberWithTypeParameterAsReceiver.kt"); } @TestMetadata("nonAbstractInInterface.kt") public void testNonAbstractInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/nonAbstractInInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/nonAbstractInInterface.kt"); } @TestMetadata("objectMemberValNoReceiver.kt") public void testObjectMemberValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/objectMemberValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/objectMemberValNoReceiver.kt"); } @TestMetadata("privateForMembers.kt") public void testPrivateForMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/privateForMembers.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/privateForMembers.kt"); } @TestMetadata("qualifiedRefInStringTemplateRuntime.kt") public void testQualifiedRefInStringTemplateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/qualifiedRefInStringTemplateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/qualifiedRefInStringTemplateRuntime.kt"); } @TestMetadata("quotedName.kt") public void testQuotedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/quotedName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/quotedName.kt"); } @TestMetadata("recursiveBound.kt") public void testRecursiveBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/recursiveBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/recursiveBound.kt"); } @TestMetadata("refInImport.kt") public void testRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/refInImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/refInImport.kt"); } @TestMetadata("refInStringTemplateRuntime.kt") public void testRefInStringTemplateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/refInStringTemplateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/refInStringTemplateRuntime.kt"); } @TestMetadata("thisInClass.kt") public void testThisInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/thisInClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/thisInClass.kt"); } @TestMetadata("thisInExtension.kt") public void testThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/thisInExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/thisInExtension.kt"); } @TestMetadata("thisInNestedClass1.kt") public void testThisInNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/thisInNestedClass1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/thisInNestedClass1.kt"); } @TestMetadata("thisInNestedClass2.kt") public void testThisInNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/thisInNestedClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/thisInNestedClass2.kt"); } @TestMetadata("topLevelValNoReceiver.kt") public void testTopLevelValNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/topLevelValNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/topLevelValNoReceiver.kt"); } @TestMetadata("topLevelValWithPackageName.kt") public void testTopLevelValWithPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/topLevelValWithPackageName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/topLevelValWithPackageName.kt"); } @TestMetadata("valOnClassNoClassObject.kt") public void testValOnClassNoClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnClassNoClassObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnClassNoClassObject.kt"); } @TestMetadata("valOnClassObject.kt") public void testValOnClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnClassObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnClassObject.kt"); } @TestMetadata("valOnLibObject.kt") public void testValOnLibObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnLibObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnLibObject.kt"); } @TestMetadata("valOnLibType.kt") public void testValOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnLibType.kt"); } @TestMetadata("valOnUserObject.kt") public void testValOnUserObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnUserObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnUserObject.kt"); } @TestMetadata("valOnUserType.kt") public void testValOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnUserType.kt"); } @TestMetadata("valOnUserTypeWithTypeParams.kt") public void testValOnUserTypeWithTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valOnUserTypeWithTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valOnUserTypeWithTypeParams.kt"); } @TestMetadata("valWithNullableType.kt") public void testValWithNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/valWithNullableType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/valWithNullableType.kt"); } @TestMetadata("varOnLibType.kt") public void testVarOnLibType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/varOnLibType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/varOnLibType.kt"); } @TestMetadata("varOnUserType.kt") public void testVarOnUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/varOnUserType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/varOnUserType.kt"); } @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Abstract extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAbstract() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property/abstract"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classNoExplicitReceiver.kt") public void testClassNoExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/classNoExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/classNoExplicitReceiver.kt"); } @TestMetadata("explicitReceiverOfContainingClass.kt") public void testExplicitReceiverOfContainingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/explicitReceiverOfContainingClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/explicitReceiverOfContainingClass.kt"); } @TestMetadata("interfaceNoExplicitReceiver.kt") public void testInterfaceNoExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/interfaceNoExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/interfaceNoExplicitReceiver.kt"); } @TestMetadata("notAbstractClass.kt") public void testNotAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/notAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/notAbstractClass.kt"); } @TestMetadata("otherExplicitReceiver.kt") public void testOtherExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/otherExplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createFromUsage/createVariable/property/abstract/otherExplicitReceiver.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FieldFromJava extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFieldFromJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createFromUsage/createVariable/property/fieldFromJava"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } } @@ -5156,62 +4772,57 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateLabel extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCreateLabel() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/createLabel"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("breakInLoop.kt") public void testBreakInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/breakInLoop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/breakInLoop.kt"); } @TestMetadata("breakInOuterLoop.kt") public void testBreakInOuterLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/breakInOuterLoop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/breakInOuterLoop.kt"); } @TestMetadata("breakInlambdaBeforeLoop.kt") public void testBreakInlambdaBeforeLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/breakInlambdaBeforeLoop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/breakInlambdaBeforeLoop.kt"); } @TestMetadata("breakNoLoop.kt") public void testBreakNoLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/breakNoLoop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/breakNoLoop.kt"); } @TestMetadata("continueInLoop.kt") public void testContinueInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/continueInLoop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/continueInLoop.kt"); } @TestMetadata("continueNoLoop.kt") public void testContinueNoLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/continueNoLoop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/continueNoLoop.kt"); } @TestMetadata("returnInLambda.kt") public void testReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/returnInLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/returnInLambda.kt"); } @TestMetadata("returnInOuterLambda.kt") public void testReturnInOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/returnInOuterLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/returnInOuterLambda.kt"); } @TestMetadata("returnNoLambda.kt") public void testReturnNoLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/createLabel/returnNoLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/createLabel/returnNoLambda.kt"); } } @@ -5219,68 +4830,62 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DecreaseVisibility extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDecreaseVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/decreaseVisibility"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exposedParameterType.kt") public void testExposedParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedParameterType.kt"); } @TestMetadata("exposedPropertyType.kt") public void testExposedPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedPropertyType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedPropertyType.kt"); } @TestMetadata("exposedReceiverType.kt") public void testExposedReceiverType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedReceiverType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedReceiverType.kt"); } @TestMetadata("exposedReturnType.kt") public void testExposedReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedReturnType.kt"); } @TestMetadata("exposedSuperClass.kt") public void testExposedSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedSuperClass.kt"); } @TestMetadata("exposedSuperClassProtectedBase.kt") public void testExposedSuperClassProtectedBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedBase.kt"); } @TestMetadata("exposedSuperClassProtectedInAnother.kt") public void testExposedSuperClassProtectedInAnother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedInAnother.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedSuperClassProtectedInAnother.kt"); } @TestMetadata("exposedSuperInterface.kt") public void testExposedSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedSuperInterface.kt"); } @TestMetadata("exposedSuperInterfacePrivate.kt") public void testExposedSuperInterfacePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedSuperInterfacePrivate.kt"); } @TestMetadata("exposedTypeParameterBound.kt") public void testExposedTypeParameterBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/decreaseVisibility/exposedTypeParameterBound.kt"); } } @@ -5288,10 +4893,13 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedSymbolUsage extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addImplicitReceiverNested.kt") public void testAddImplicitReceiverNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/addImplicitReceiverNested.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/addImplicitReceiverNested.kt"); } public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { @@ -5300,394 +4908,334 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("callChainBug.kt") public void testCallChainBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/callChainBug.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/callChainBug.kt"); } @TestMetadata("callWithError.kt") public void testCallWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/callWithError.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/callWithError.kt"); } @TestMetadata("changeThis1.kt") public void testChangeThis1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThis1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/changeThis1.kt"); } @TestMetadata("changeThis2.kt") public void testChangeThis2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThis2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/changeThis2.kt"); } @TestMetadata("changeThisToOuterThis.kt") public void testChangeThisToOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisToOuterThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/changeThisToOuterThis.kt"); } @TestMetadata("classLiteralAndTypeArgsRuntime.kt") public void testClassLiteralAndTypeArgsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt"); } @TestMetadata("deprecationLevel.kt") public void testDeprecationLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/deprecationLevel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/deprecationLevel.kt"); } @TestMetadata("doNotShortenUserReferences.kt") public void testDoNotShortenUserReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/doNotShortenUserReferences.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/doNotShortenUserReferences.kt"); } @TestMetadata("doNotShortenUsersExplicitThis.kt") public void testDoNotShortenUsersExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/doNotShortenUsersExplicitThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/doNotShortenUsersExplicitThis.kt"); } @TestMetadata("dropReceiver.kt") public void testDropReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/dropReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/dropReceiver.kt"); } @TestMetadata("extensionForGenericClass.kt") public void testExtensionForGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/extensionForGenericClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/extensionForGenericClass.kt"); } @TestMetadata("implicitCompanionObjectThis.kt") public void testImplicitCompanionObjectThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/implicitCompanionObjectThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/implicitCompanionObjectThis.kt"); } @TestMetadata("implicitQualifiedThisRuntime.kt") public void testImplicitQualifiedThisRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt"); } @TestMetadata("incorrectArgs.kt") public void testIncorrectArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/incorrectArgs.kt"); } @TestMetadata("incorrectReplacement.kt") public void testIncorrectReplacement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/incorrectReplacement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/incorrectReplacement.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/infixCall.kt"); } @TestMetadata("keepArgumentNamed.kt") public void testKeepArgumentNamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepArgumentNamed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepArgumentNamed.kt"); } @TestMetadata("keepInfixCall.kt") public void testKeepInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepInfixCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepInfixCall.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/localFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/localFun.kt"); } @TestMetadata("mailformedExpression.kt") public void testMailformedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/mailformedExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/mailformedExpression.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/memberFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/memberFunction.kt"); } @TestMetadata("memberFunctionImplicitReceiver.kt") public void testMemberFunctionImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/memberFunctionImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/memberFunctionImplicitReceiver.kt"); } @TestMetadata("memberFunctionInGenericClass.kt") public void testMemberFunctionInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/memberFunctionInGenericClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/memberFunctionInGenericClass.kt"); } @TestMetadata("methodToProperty.kt") public void testMethodToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/methodToProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/methodToProperty.kt"); } @TestMetadata("noReplacement.kt") public void testNoReplacement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/noReplacement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/noReplacement.kt"); } @TestMetadata("operatorCall.kt") public void testOperatorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/operatorCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/operatorCall.kt"); } @TestMetadata("operatorCall2.kt") public void testOperatorCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/operatorCall2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/operatorCall2.kt"); } @TestMetadata("parameters.kt") public void testParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/parameters.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/parameters.kt"); } @TestMetadata("propertyAssignment.kt") public void testPropertyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignment.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignment.kt"); } @TestMetadata("propertyAssignmentDefaultSetter.kt") public void testPropertyAssignmentDefaultSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignmentDefaultSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignmentDefaultSetter.kt"); } @TestMetadata("propertyAssignmentNoReceiver.kt") public void testPropertyAssignmentNoReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignmentNoReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignmentNoReceiver.kt"); } @TestMetadata("propertyAssignmentNoSetter.kt") public void testPropertyAssignmentNoSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignmentNoSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyAssignmentNoSetter.kt"); } @TestMetadata("propertyModification.kt") public void testPropertyModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyModification.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyModification.kt"); } @TestMetadata("propertyToMethod.kt") public void testPropertyToMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyToMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyToMethod.kt"); } @TestMetadata("propertyToSyntheticExtension.kt") public void testPropertyToSyntheticExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/propertyToSyntheticExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/propertyToSyntheticExtension.kt"); } @TestMetadata("replaceCallWithArgument.kt") public void testReplaceCallWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/replaceCallWithArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/replaceCallWithArgument.kt"); } @TestMetadata("replaceCallWithReceiver.kt") public void testReplaceCallWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/replaceCallWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/replaceCallWithReceiver.kt"); } @TestMetadata("replaceModToRem.kt") public void testReplaceModToRem() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/replaceModToRem.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/replaceModToRem.kt"); } @TestMetadata("shortenReferences.kt") public void testShortenReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/shortenReferences.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/shortenReferences.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/simple.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/stringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/stringTemplate.kt"); } @TestMetadata("toOuterClassMethod.kt") public void testToOuterClassMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/toOuterClassMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/toOuterClassMethod.kt"); } @TestMetadata("twoValuesCombined.kt") public void testTwoValuesCombined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/twoValuesCombined.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/twoValuesCombined.kt"); } @TestMetadata("usageInDerivedClass.kt") public void testUsageInDerivedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/usageInDerivedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/usageInDerivedClass.kt"); } @TestMetadata("usageInDerivedClassGeneric.kt") public void testUsageInDerivedClassGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/usageInDerivedClassGeneric.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/usageInDerivedClassGeneric.kt"); } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentSideEffects extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArgumentSideEffects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("complexExpressionNotUsed1.kt") public void testComplexExpressionNotUsed1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed1.kt"); } @TestMetadata("complexExpressionNotUsed2.kt") public void testComplexExpressionNotUsed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed2.kt"); } @TestMetadata("complexExpressionNotUsed3Runtime.kt") public void testComplexExpressionNotUsed3Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt"); } @TestMetadata("complexExpressionNotUsed4Runtime.kt") public void testComplexExpressionNotUsed4Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt"); } @TestMetadata("complexExpressionNotUsed5Runtime.kt") public void testComplexExpressionNotUsed5Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt"); } @TestMetadata("complexExpressionNotUsedSafeCall.kt") public void testComplexExpressionNotUsedSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall.kt"); } @TestMetadata("complexExpressionNotUsedSafeCall2Runtime.kt") public void testComplexExpressionNotUsedSafeCall2Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt"); } @TestMetadata("complexExpressionNotUsedShortenRefsRuntime.kt") public void testComplexExpressionNotUsedShortenRefsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt"); } @TestMetadata("complexExpressionUsedTwice.kt") public void testComplexExpressionUsedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice.kt"); } @TestMetadata("complexExpressionUsedTwice2.kt") public void testComplexExpressionUsedTwice2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice2.kt"); } @TestMetadata("complexExpressionUsedTwice3Runtime.kt") public void testComplexExpressionUsedTwice3Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt"); } @TestMetadata("complexExpressionUsedTwice4.kt") public void testComplexExpressionUsedTwice4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice4.kt"); } @TestMetadata("complexExpressionUsedTwice5Runtime.kt") public void testComplexExpressionUsedTwice5Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt"); } @TestMetadata("complexExpressionUsedTwice6Runtime.kt") public void testComplexExpressionUsedTwice6Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt"); } @TestMetadata("simpleExpressionNotUsed.kt") public void testSimpleExpressionNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/simpleExpressionNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/simpleExpressionNotUsed.kt"); } @TestMetadata("simpleExpressionUsedTwice.kt") public void testSimpleExpressionUsedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/simpleExpressionUsedTwice.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/simpleExpressionUsedTwice.kt"); } @TestMetadata("stringLiteralUsedTwice.kt") public void testStringLiteralUsedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringLiteralUsedTwice.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringLiteralUsedTwice.kt"); } @TestMetadata("stringTemplateUsedTwice.kt") public void testStringTemplateUsedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringTemplateUsedTwice.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringTemplateUsedTwice.kt"); } @TestMetadata("stringTemplateUsedTwice2.kt") public void testStringTemplateUsedTwice2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringTemplateUsedTwice2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringTemplateUsedTwice2.kt"); } } @@ -5695,154 +5243,139 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassUsages extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation1.kt") public void testAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation1.kt"); } @TestMetadata("annotation2.kt") public void testAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation2.kt"); } @TestMetadata("annotation3.kt") public void testAnnotation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation3.kt"); } @TestMetadata("annotation4.kt") public void testAnnotation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotation4.kt"); } @TestMetadata("annotationKeepNamedArgs.kt") public void testAnnotationKeepNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/annotationKeepNamedArgs.kt"); } @TestMetadata("constructorUsage1.kt") public void testConstructorUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage1.kt"); } @TestMetadata("constructorUsage2.kt") public void testConstructorUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage2.kt"); } @TestMetadata("constructorUsage3.kt") public void testConstructorUsage3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage3.kt"); } @TestMetadata("constructorUsage4.kt") public void testConstructorUsage4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsage4.kt"); } @TestMetadata("imports.kt") public void testImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/imports.kt"); } @TestMetadata("inAliasSimple.kt") public void testInAliasSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasSimple.kt"); } @TestMetadata("inAliasWithOwnReplaceForConstructorForAliasArguments.kt") public void testInAliasWithOwnReplaceForConstructorForAliasArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorForAliasArguments.kt"); } @TestMetadata("inAliasWithOwnReplaceForConstructorUnused.kt") public void testInAliasWithOwnReplaceForConstructorUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUnused.kt"); } @TestMetadata("inAliasWithOwnReplaceForConstructorUsed.kt") public void testInAliasWithOwnReplaceForConstructorUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForConstructorUsed.kt"); } @TestMetadata("inAliasWithOwnReplaceForSecondaryConstructorUnused.kt") public void testInAliasWithOwnReplaceForSecondaryConstructorUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUnused.kt"); } @TestMetadata("inAliasWithOwnReplaceForSecondaryConstructorUsed.kt") public void testInAliasWithOwnReplaceForSecondaryConstructorUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inAliasWithOwnReplaceForSecondaryConstructorUsed.kt"); } @TestMetadata("inTypeArgument.kt") public void testInTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/inTypeArgument.kt"); } @TestMetadata("nestedClassToNestedClass.kt") public void testNestedClassToNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/nestedClassToNestedClass.kt"); } @TestMetadata("noAnnotationConstructorUsage.kt") public void testNoAnnotationConstructorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/noAnnotationConstructorUsage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/noAnnotationConstructorUsage.kt"); } @TestMetadata("qualifiedClassName.kt") public void testQualifiedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassName.kt"); } @TestMetadata("qualifiedClassNameInPattern.kt") public void testQualifiedClassNameInPattern() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/qualifiedClassNameInPattern.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/simple.kt"); } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WholeProject extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWholeProject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/classUsages/wholeProject/inheritance.kt"); } } } @@ -5851,26 +5384,40 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionLiteralArguments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctionLiteralArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cannotKeepOutside.kt") public void testCannotKeepOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments/cannotKeepOutside.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments/cannotKeepOutside.kt"); } @TestMetadata("keepInside.kt") public void testKeepInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments/keepInside.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments/keepInside.kt"); } @TestMetadata("keepOutside.kt") public void testKeepOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments/keepOutside.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/functionLiteralArguments/keepOutside.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Imports extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInImports() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/imports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } @@ -5878,10 +5425,13 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KeepComments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addArguments.kt") public void testAddArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/addArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/addArguments.kt"); } public void testAllFilesPresentInKeepComments() throws Exception { @@ -5890,38 +5440,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("commentBeforeArgument.kt") public void testCommentBeforeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/commentBeforeArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/commentBeforeArgument.kt"); } @TestMetadata("dropArgument.kt") public void testDropArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/dropArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/dropArgument.kt"); } @TestMetadata("multipleArguments.kt") public void testMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/multipleArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/multipleArguments.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/simple.kt"); } @TestMetadata("usedTwice.kt") public void testUsedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/usedTwice.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/usedTwice.kt"); } @TestMetadata("variableForArgument.kt") public void testVariableForArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/variableForArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepComments/variableForArgument.kt"); } } @@ -5929,10 +5473,13 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KeepLineBreaks extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addArgument.kt") public void testAddArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/addArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/addArgument.kt"); } public void testAllFilesPresentInKeepLineBreaks() throws Exception { @@ -5941,14 +5488,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("lineBreakAfterReceiverRuntime.kt") public void testLineBreakAfterReceiverRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/simple.kt"); } } @@ -5956,20 +5501,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorCalls extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOperatorCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls/in.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls/in.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls/plusAssign.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/operatorCalls/plusAssign.kt"); } } @@ -5977,74 +5524,67 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OptionalParameters extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptionalParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dropAll.kt") public void testDropAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/dropAll.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/dropAll.kt"); } @TestMetadata("functionalLiteralArgument.kt") public void testFunctionalLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/functionalLiteralArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/functionalLiteralArgument.kt"); } @TestMetadata("namedArgument.kt") public void testNamedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/namedArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/namedArgument.kt"); } @TestMetadata("optionalParameters1.kt") public void testOptionalParameters1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters1.kt"); } @TestMetadata("optionalParameters2.kt") public void testOptionalParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters2.kt"); } @TestMetadata("optionalParameters3.kt") public void testOptionalParameters3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters3.kt"); } @TestMetadata("optionalParameters4.kt") public void testOptionalParameters4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters4.kt"); } @TestMetadata("optionalParameters5.kt") public void testOptionalParameters5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters5.kt"); } @TestMetadata("optionalParameters7.kt") public void testOptionalParameters7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters7.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters7.kt"); } @TestMetadata("optionalParameters9.kt") public void testOptionalParameters9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters9.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters9.kt"); } @TestMetadata("overridingMethod.kt") public void testOverridingMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/overridingMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/overridingMethod.kt"); } } @@ -6052,68 +5592,62 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublishedApi extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPublishedApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("existingStub.kt") public void testExistingStub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/existingStub.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/existingStub.kt"); } @TestMetadata("existingStubForVar.kt") public void testExistingStubForVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/existingStubForVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/existingStubForVar.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/extension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/extension.kt"); } @TestMetadata("extensionVar.kt") public void testExtensionVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/extensionVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/extensionVar.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/generic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/generic.kt"); } @TestMetadata("genericDerived.kt") public void testGenericDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/genericDerived.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/genericDerived.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/genericFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/genericFunction.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/simple.kt"); } @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/simpleVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/simpleVal.kt"); } @TestMetadata("simpleVar.kt") public void testSimpleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/simpleVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/publishedApi/simpleVar.kt"); } } @@ -6121,56 +5655,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/safeCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeThisSafeCall.kt") public void testChangeThisSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCall.kt"); } @TestMetadata("changeThisSafeCallWithValue1Runtime.kt") public void testChangeThisSafeCallWithValue1Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt"); } @TestMetadata("changeThisSafeCallWithValue2Runtime.kt") public void testChangeThisSafeCallWithValue2Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt"); } @TestMetadata("changeThisSafeCallWithValue3Runtime.kt") public void testChangeThisSafeCallWithValue3Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt"); } @TestMetadata("changeThisSafeCallWithValue4Runtime.kt") public void testChangeThisSafeCallWithValue4Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt"); } @TestMetadata("changeThisSafeCallWithValueRuntime.kt") public void testChangeThisSafeCallWithValueRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt"); } @TestMetadata("dropReceiverSafeCall.kt") public void testDropReceiverSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/dropReceiverSafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/dropReceiverSafeCall.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/safeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/safeCall.kt"); } } @@ -6178,62 +5708,70 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeAliases extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeAliases() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("compoundWithDeprecatedArgumentsAndConstructor.kt") public void testCompoundWithDeprecatedArgumentsAndConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/compoundWithDeprecatedArgumentsAndConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/compoundWithDeprecatedArgumentsAndConstructor.kt"); } @TestMetadata("conflictOnTypeAndAlias.kt") public void testConflictOnTypeAndAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/conflictOnTypeAndAlias.kt"); } @TestMetadata("constructorUsage.kt") public void testConstructorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsage.kt"); } @TestMetadata("constructorUsageWithConflict.kt") public void testConstructorUsageWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict.kt"); } @TestMetadata("constructorUsageWithConflict1.kt") public void testConstructorUsageWithConflict1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/constructorUsageWithConflict1.kt"); } @TestMetadata("onlyAliasDeprecated.kt") public void testOnlyAliasDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/onlyAliasDeprecated.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/onlyAliasDeprecated.kt"); } @TestMetadata("transitiveFromClass.kt") public void testTransitiveFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveFromClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveFromClass.kt"); } @TestMetadata("transitiveLong.kt") public void testTransitiveLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/transitiveLong.kt"); } @TestMetadata("typeAliasWithAllGenericParams.kt") public void testTypeAliasWithAllGenericParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/typeAliasWithAllGenericParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/typeAliasWithAllGenericParams.kt"); + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WholeProject extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWholeProject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/wholeProject"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); + } } } @@ -6241,50 +5779,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeArguments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("emptyVarargRuntime.kt") public void testEmptyVarargRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt"); } @TestMetadata("explicitInPatternImplicitInUsage.kt") public void testExplicitInPatternImplicitInUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt"); } @TestMetadata("explicitTypeArg.kt") public void testExplicitTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg.kt"); } @TestMetadata("keepInUserCodeRuntime.kt") public void testKeepInUserCodeRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt"); } @TestMetadata("keepOriginalIfQualified.kt") public void testKeepOriginalIfQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepOriginalIfQualified.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepOriginalIfQualified.kt"); } @TestMetadata("noImplicitTypeArgImportRuntime.kt") public void testNoImplicitTypeArgImportRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt"); } @TestMetadata("nonEmptyVarargRuntime.kt") public void testNonEmptyVarargRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt"); } } @@ -6292,22 +5827,23 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addedNamedArgumentAfterRuntime.kt") public void testAddedNamedArgumentAfterRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt"); } @TestMetadata("addedPositionalArgumentAfterRuntime.kt") public void testAddedPositionalArgumentAfterRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt"); } @TestMetadata("addedSpreadArgumentAfterRuntime.kt") public void testAddedSpreadArgumentAfterRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt"); } public void testAllFilesPresentInVararg() throws Exception { @@ -6316,122 +5852,115 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("booleanArrayRuntime.kt") public void testBooleanArrayRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt"); } @TestMetadata("byteArrayRuntime.kt") public void testByteArrayRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt"); } @TestMetadata("doNotShortenUserReferences2Runtime.kt") public void testDoNotShortenUserReferences2Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt"); } @TestMetadata("doNotShortenUserReferencesRuntime.kt") public void testDoNotShortenUserReferencesRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt"); } @TestMetadata("doNotSimplifyOriginalCallRuntime.kt") public void testDoNotSimplifyOriginalCallRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt"); } @TestMetadata("doubleArrayRuntime.kt") public void testDoubleArrayRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt"); } @TestMetadata("floatArrayRuntime.kt") public void testFloatArrayRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt"); } @TestMetadata("longArrayRuntime.kt") public void testLongArrayRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt"); } @TestMetadata("multipleSpreadArguments2Runtime.kt") public void testMultipleSpreadArguments2Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt"); } @TestMetadata("multipleSpreadArgumentsRuntime.kt") public void testMultipleSpreadArgumentsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt"); } @TestMetadata("noImportRuntime.kt") public void testNoImportRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt"); } @TestMetadata("shortArrayRuntime.kt") public void testShortArrayRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt"); } @TestMetadata("vararg1Runtime.kt") public void testVararg1Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt"); } @TestMetadata("vararg2Runtime.kt") public void testVararg2Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt"); } @TestMetadata("vararg3Runtime.kt") public void testVararg3Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt"); } @TestMetadata("vararg4.kt") public void testVararg4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt"); } @TestMetadata("vararg5.kt") public void testVararg5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt"); } @TestMetadata("vararg6Runtime.kt") public void testVararg6Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt"); } @TestMetadata("vararg7.kt") public void testVararg7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt"); } @TestMetadata("vararg8Runtime.kt") public void testVararg8Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WholeProject extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWholeProject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } } @@ -6440,176 +5969,152 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/expressions"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fixNullableBinaryWithExclExcl.kt") public void testFixNullableBinaryWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableBinaryWithExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableBinaryWithExclExcl.kt"); } @TestMetadata("fixNullableInfixWithExclExcl.kt") public void testFixNullableInfixWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableInfixWithExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableInfixWithExclExcl.kt"); } @TestMetadata("fixNullableIterableGenericWithExclExcl.kt") public void testFixNullableIterableGenericWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableIterableGenericWithExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableIterableGenericWithExclExcl.kt"); } @TestMetadata("fixNullableIterableWithExclExcl.kt") public void testFixNullableIterableWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableIterableWithExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableIterableWithExclExcl.kt"); } @TestMetadata("fixNullableUnaryWithExclExcl.kt") public void testFixNullableUnaryWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableUnaryWithExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableUnaryWithExclExcl.kt"); } @TestMetadata("fixNullableWithExclExclAbsentWithBadIterator.kt") public void testFixNullableWithExclExclAbsentWithBadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableWithExclExclAbsentWithBadIterator.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableWithExclExclAbsentWithBadIterator.kt"); } @TestMetadata("fixNullableWithIteratorWithExclExcl.kt") public void testFixNullableWithIteratorWithExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/fixNullableWithIteratorWithExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/fixNullableWithIteratorWithExclExcl.kt"); } @TestMetadata("kt11594.kt") public void testKt11594() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/kt11594.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/kt11594.kt"); } @TestMetadata("removeUselessCast.kt") public void testRemoveUselessCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessCast.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessCast.kt"); } @TestMetadata("removeUselessCastInParens.kt") public void testRemoveUselessCastInParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessCastInParens.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessCastInParens.kt"); } @TestMetadata("removeUselessCastUnderSmartCast.kt") public void testRemoveUselessCastUnderSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessCastUnderSmartCast.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessCastUnderSmartCast.kt"); } @TestMetadata("removeUselessIsCheck.kt") public void testRemoveUselessIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessIsCheck.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessIsCheck.kt"); } @TestMetadata("removeUselessIsCheckInWhen.kt") public void testRemoveUselessIsCheckInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessIsCheckInWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessIsCheckInWhen.kt"); } @TestMetadata("removeUselessIsCheckInWhenExpressionless.kt") public void testRemoveUselessIsCheckInWhenExpressionless() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessIsCheckInWhenExpressionless.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessIsCheckInWhenExpressionless.kt"); } @TestMetadata("removeUselessIsCheckInWhenExpressionlessNegate.kt") public void testRemoveUselessIsCheckInWhenExpressionlessNegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessIsCheckInWhenExpressionlessNegate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessIsCheckInWhenExpressionlessNegate.kt"); } @TestMetadata("removeUselessIsCheckInWhenNegate.kt") public void testRemoveUselessIsCheckInWhenNegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessIsCheckInWhenNegate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessIsCheckInWhenNegate.kt"); } @TestMetadata("removeUselessIsCheckNegate.kt") public void testRemoveUselessIsCheckNegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/removeUselessIsCheckNegate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/removeUselessIsCheckNegate.kt"); } @TestMetadata("unnecessaryNonNullAssertion1.kt") public void testUnnecessaryNonNullAssertion1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unnecessaryNonNullAssertion1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unnecessaryNonNullAssertion1.kt"); } @TestMetadata("unnecessaryNonNullAssertion2.kt") public void testUnnecessaryNonNullAssertion2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unnecessaryNonNullAssertion2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unnecessaryNonNullAssertion2.kt"); } @TestMetadata("unnecessaryNonNullAssertion3.kt") public void testUnnecessaryNonNullAssertion3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unnecessaryNonNullAssertion3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unnecessaryNonNullAssertion3.kt"); } @TestMetadata("unnecessarySafeCall1.kt") public void testUnnecessarySafeCall1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unnecessarySafeCall1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unnecessarySafeCall1.kt"); } @TestMetadata("unsafeCall1.kt") public void testUnsafeCall1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unsafeCall1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unsafeCall1.kt"); } @TestMetadata("unsafeCall2.kt") public void testUnsafeCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unsafeCall2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unsafeCall2.kt"); } @TestMetadata("unsafeCall3.kt") public void testUnsafeCall3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unsafeCall3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unsafeCall3.kt"); } @TestMetadata("unsafeCall4.kt") public void testUnsafeCall4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unsafeCall4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unsafeCall4.kt"); } @TestMetadata("unsafeCall5.kt") public void testUnsafeCall5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/unsafeCall5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/unsafeCall5.kt"); } @TestMetadata("uselessCastStaticAssertIsFine.kt") public void testUselessCastStaticAssertIsFine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/uselessCastStaticAssertIsFine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/uselessCastStaticAssertIsFine.kt"); } @TestMetadata("uselessElvis.kt") public void testUselessElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/expressions/uselessElvis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/expressions/uselessElvis.kt"); } } @@ -6617,38 +6122,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FoldTryCatch extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFoldTryCatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/foldTryCatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conditional.kt") public void testConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/foldTryCatch/conditional.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/foldTryCatch/conditional.kt"); } @TestMetadata("emptyFinally.kt") public void testEmptyFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/foldTryCatch/emptyFinally.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/foldTryCatch/emptyFinally.kt"); } @TestMetadata("multipleExceptions.kt") public void testMultipleExceptions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/foldTryCatch/multipleExceptions.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/foldTryCatch/multipleExceptions.kt"); } @TestMetadata("shadow.kt") public void testShadow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/foldTryCatch/shadow.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/foldTryCatch/shadow.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/foldTryCatch/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/foldTryCatch/simple.kt"); } } @@ -6656,10 +6160,13 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Implement extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstract.kt") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/abstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/abstract.kt"); } public void testAllFilesPresentInImplement() throws Exception { @@ -6668,170 +6175,142 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/annotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/annotation.kt"); } @TestMetadata("doNotAddExpectForVal.kt") public void testDoNotAddExpectForVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/doNotAddExpectForVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/doNotAddExpectForVal.kt"); } @TestMetadata("doNotAddHeader.kt") public void testDoNotAddHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/doNotAddHeader.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/doNotAddHeader.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/enum.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/enum.kt"); } @TestMetadata("finalClass.kt") public void testFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/finalClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/finalClass.kt"); } @TestMetadata("inCompanion.kt") public void testInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/inCompanion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/inCompanion.kt"); } @TestMetadata("inInternalCompanion.kt") public void testInInternalCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/inInternalCompanion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/inInternalCompanion.kt"); } @TestMetadata("inPrivateCompanion.kt") public void testInPrivateCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/inPrivateCompanion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/inPrivateCompanion.kt"); } @TestMetadata("inProtectedCompanion.kt") public void testInProtectedCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/inProtectedCompanion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/inProtectedCompanion.kt"); } @TestMetadata("incorrectRange.kt") public void testIncorrectRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/incorrectRange.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/incorrectRange.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/inner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/inner.kt"); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/interface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/interface.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/local.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/local.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/nested.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/nested.kt"); } @TestMetadata("nestedPrivateInterface.kt") public void testNestedPrivateInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/nestedPrivateInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/nestedPrivateInterface.kt"); } @TestMetadata("noDefaultConstructor.kt") public void testNoDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/noDefaultConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/noDefaultConstructor.kt"); } @TestMetadata("private.kt") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/private.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/private.kt"); } @TestMetadata("privateConstructor.kt") public void testPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/privateConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/privateConstructor.kt"); } @TestMetadata("privateNested.kt") public void testPrivateNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/privateNested.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/privateNested.kt"); } @TestMetadata("privateNestedWithConflict.kt") public void testPrivateNestedWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/privateNestedWithConflict.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/privateNestedWithConflict.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/protected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/protected.kt"); } @TestMetadata("sealed.kt") public void testSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/sealed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/sealed.kt"); } @TestMetadata("sealedEmpty.kt") public void testSealedEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/sealedEmpty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/sealedEmpty.kt"); } @TestMetadata("sealedWithConflict.kt") public void testSealedWithConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/sealedWithConflict.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/sealedWithConflict.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/typeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/typeParameter.kt"); } @TestMetadata("typeParameterOut.kt") public void testTypeParameterOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/typeParameterOut.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/typeParameterOut.kt"); } @TestMetadata("typeParameterWhere.kt") public void testTypeParameterWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/typeParameterWhere.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/typeParameterWhere.kt"); } @TestMetadata("typeParametersClass.kt") public void testTypeParametersClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/implement/typeParametersClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/implement/typeParametersClass.kt"); } } @@ -6839,184 +6318,164 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IncreaseVisibility extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIncreaseVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/increaseVisibility"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("exposedParameterType.kt") public void testExposedParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedParameterType.kt"); } @TestMetadata("exposedParameterTypePublic.kt") public void testExposedParameterTypePublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedParameterTypePublic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedParameterTypePublic.kt"); } @TestMetadata("exposedPropertyType.kt") public void testExposedPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedPropertyType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedPropertyType.kt"); } @TestMetadata("exposedReceiverType.kt") public void testExposedReceiverType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedReceiverType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedReceiverType.kt"); } @TestMetadata("exposedReturnType.kt") public void testExposedReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedReturnType.kt"); } @TestMetadata("exposedSuperClass.kt") public void testExposedSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedSuperClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedSuperClass.kt"); } @TestMetadata("exposedSuperClassProtectedBase.kt") public void testExposedSuperClassProtectedBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedSuperClassProtectedBase.kt"); } @TestMetadata("exposedSuperClassProtectedInAnother.kt") public void testExposedSuperClassProtectedInAnother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedSuperClassProtectedInAnother.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedSuperClassProtectedInAnother.kt"); } @TestMetadata("exposedSuperClassProtectedInAnotherFromPrivate.kt") public void testExposedSuperClassProtectedInAnotherFromPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedSuperClassProtectedInAnotherFromPrivate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedSuperClassProtectedInAnotherFromPrivate.kt"); } @TestMetadata("exposedSuperInterface.kt") public void testExposedSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedSuperInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedSuperInterface.kt"); } @TestMetadata("exposedTypeParameterBound.kt") public void testExposedTypeParameterBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/exposedTypeParameterBound.kt"); } @TestMetadata("invalidSealedClassInheritance.kt") public void testInvalidSealedClassInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invalidSealedClassInheritance.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invalidSealedClassInheritance.kt"); } @TestMetadata("overriddenProtectedMemberToPublicSingleFile.kt") public void testOverriddenProtectedMemberToPublicSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/overriddenProtectedMemberToPublicSingleFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/overriddenProtectedMemberToPublicSingleFile.kt"); } @TestMetadata("privateMemberToInternalSingleFile.kt") public void testPrivateMemberToInternalSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateMemberToInternalSingleFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateMemberToInternalSingleFile.kt"); } @TestMetadata("privateMemberToInternalWithExposed.kt") public void testPrivateMemberToInternalWithExposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateMemberToInternalWithExposed.kt"); } @TestMetadata("privateMemberToPublicSingleFile.kt") public void testPrivateMemberToPublicSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateMemberToPublicSingleFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateMemberToPublicSingleFile.kt"); } @TestMetadata("privateSealedClassInheritance.kt") public void testPrivateSealedClassInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/privateSealedClassInheritance.kt"); } @TestMetadata("protectedMemberToPublicSingleFile.kt") public void testProtectedMemberToPublicSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/protectedMemberToPublicSingleFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/protectedMemberToPublicSingleFile.kt"); } @TestMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InvisibleFake extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvisibleFake() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/increaseVisibility/invisibleFake"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("methodToInternal.kt") public void testMethodToInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToInternal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToInternal.kt"); } @TestMetadata("methodToNotProtected.kt") public void testMethodToNotProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToNotProtected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToNotProtected.kt"); } @TestMetadata("methodToProtected.kt") public void testMethodToProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToProtected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToProtected.kt"); } @TestMetadata("methodToProtected2.kt") public void testMethodToProtected2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToProtected2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToProtected2.kt"); } @TestMetadata("methodToPublic.kt") public void testMethodToPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToPublic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/methodToPublic.kt"); } @TestMetadata("propertyToInternal.kt") public void testPropertyToInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToInternal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToInternal.kt"); } @TestMetadata("propertyToNotProtected.kt") public void testPropertyToNotProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToNotProtected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToNotProtected.kt"); } @TestMetadata("propertyToProtected.kt") public void testPropertyToProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToProtected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToProtected.kt"); } @TestMetadata("propertyToProtected2.kt") public void testPropertyToProtected2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToProtected2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToProtected2.kt"); } @TestMetadata("propertyToPublic.kt") public void testPropertyToPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToPublic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/increaseVisibility/invisibleFake/propertyToPublic.kt"); } } } @@ -7025,104 +6484,92 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InitializeWithConstructorParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInitializeWithConstructorParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/initializeWithConstructorParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructorWithThisDelegation.kt") public void testConstructorWithThisDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/constructorWithThisDelegation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/constructorWithThisDelegation.kt"); } @TestMetadata("genericParameterInScope.kt") public void testGenericParameterInScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/genericParameterInScope.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/genericParameterInScope.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/localVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/localVar.kt"); } @TestMetadata("memberPropertyInClassNameClashInPrimaryConstructor.kt") public void testMemberPropertyInClassNameClashInPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassNameClashInPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassNameClashInPrimaryConstructor.kt"); } @TestMetadata("memberPropertyInClassNameClashInSecondaryConstructor.kt") public void testMemberPropertyInClassNameClashInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassNameClashInSecondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassNameClashInSecondaryConstructor.kt"); } @TestMetadata("memberPropertyInClassNoConstructors.kt") public void testMemberPropertyInClassNoConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassNoConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassNoConstructors.kt"); } @TestMetadata("memberPropertyInClassPrimaryAndSecondaryConstructors.kt") public void testMemberPropertyInClassPrimaryAndSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassPrimaryAndSecondaryConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassPrimaryAndSecondaryConstructors.kt"); } @TestMetadata("memberPropertyInClassPrimaryConstructorOnly.kt") public void testMemberPropertyInClassPrimaryConstructorOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassPrimaryConstructorOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassPrimaryConstructorOnly.kt"); } @TestMetadata("memberPropertyInClassSecondaryConstructorsOnly.kt") public void testMemberPropertyInClassSecondaryConstructorsOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassSecondaryConstructorsOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInClassSecondaryConstructorsOnly.kt"); } @TestMetadata("memberPropertyInInterface.kt") public void testMemberPropertyInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInInterface.kt"); } @TestMetadata("memberPropertyInObject.kt") public void testMemberPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyInObject.kt"); } @TestMetadata("memberPropertyNoAccessorsInClassNoConstructors.kt") public void testMemberPropertyNoAccessorsInClassNoConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyNoAccessorsInClassNoConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyNoAccessorsInClassNoConstructors.kt"); } @TestMetadata("memberPropertyNoAccessorsInClassPrimaryAndSecondaryConstructors.kt") public void testMemberPropertyNoAccessorsInClassPrimaryAndSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyNoAccessorsInClassPrimaryAndSecondaryConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyNoAccessorsInClassPrimaryAndSecondaryConstructors.kt"); } @TestMetadata("memberPropertyNoAccessorsInClassPrimaryConstructorOnly.kt") public void testMemberPropertyNoAccessorsInClassPrimaryConstructorOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyNoAccessorsInClassPrimaryConstructorOnly.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyNoAccessorsInClassPrimaryConstructorOnly.kt"); } @TestMetadata("memberPropertyWithDelegateRuntime.kt") public void testMemberPropertyWithDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyWithDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyWithDelegateRuntime.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/initializeWithConstructorParameter/topLevelProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/initializeWithConstructorParameter/topLevelProperty.kt"); } } @@ -7130,26 +6577,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineTypeParameterFix extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineTypeParameterFix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/inlineTypeParameterFix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/inlineTypeParameterFix/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/inlineTypeParameterFix/basic.kt"); } @TestMetadata("basicMultipleDef.kt") public void testBasicMultipleDef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/inlineTypeParameterFix/basicMultipleDef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/inlineTypeParameterFix/basicMultipleDef.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/inlineTypeParameterFix/function.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/inlineTypeParameterFix/function.kt"); } } @@ -7157,56 +6605,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InsertDelegationCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInsertDelegationCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/insertDelegationCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonApplicableInsertSuper.kt") public void testNonApplicableInsertSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/nonApplicableInsertSuper.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/nonApplicableInsertSuper.kt"); } @TestMetadata("nonApplicableInsertThis.kt") public void testNonApplicableInsertThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/nonApplicableInsertThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/nonApplicableInsertThis.kt"); } @TestMetadata("nonApplicableOnEmpty.kt") public void testNonApplicableOnEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/nonApplicableOnEmpty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/nonApplicableOnEmpty.kt"); } @TestMetadata("nonApplicableWithOneConstructor.kt") public void testNonApplicableWithOneConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/nonApplicableWithOneConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/nonApplicableWithOneConstructor.kt"); } @TestMetadata("primaryRequiredNoSuper.kt") public void testPrimaryRequiredNoSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/primaryRequiredNoSuper.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/primaryRequiredNoSuper.kt"); } @TestMetadata("primaryRequiredParameterless.kt") public void testPrimaryRequiredParameterless() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/primaryRequiredParameterless.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/primaryRequiredParameterless.kt"); } @TestMetadata("primaryRequiredWithBody.kt") public void testPrimaryRequiredWithBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/primaryRequiredWithBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/primaryRequiredWithBody.kt"); } @TestMetadata("primaryRequiredWithParameter.kt") public void testPrimaryRequiredWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/insertDelegationCall/primaryRequiredWithParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/insertDelegationCall/primaryRequiredWithParameter.kt"); } } @@ -7214,20 +6658,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KdocMissingDocumentation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKdocMissingDocumentation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/kdocMissingDocumentation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/kdocMissingDocumentation/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/kdocMissingDocumentation/simple.kt"); } @TestMetadata("withIndentation.kt") public void testWithIndentation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/kdocMissingDocumentation/withIndentation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/kdocMissingDocumentation/withIndentation.kt"); } } @@ -7235,44 +6681,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/lateinit"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/lateinit/nullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/lateinit/nullable.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/lateinit/val.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/lateinit/val.kt"); } @TestMetadata("withGetter.kt") public void testWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/lateinit/withGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/lateinit/withGetter.kt"); } @TestMetadata("withGetterSetter.kt") public void testWithGetterSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/lateinit/withGetterSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/lateinit/withGetterSetter.kt"); } @TestMetadata("withInitializer.kt") public void testWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/lateinit/withInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/lateinit/withInitializer.kt"); } @TestMetadata("withSetter.kt") public void testWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/lateinit/withSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/lateinit/withSetter.kt"); } } @@ -7280,22 +6724,23 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LeakingThis extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessOpenProperty.kt") public void testAccessOpenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/accessOpenProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/accessOpenProperty.kt"); } @TestMetadata("accessOpenPropertyClass.kt") public void testAccessOpenPropertyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/accessOpenPropertyClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/accessOpenPropertyClass.kt"); } @TestMetadata("accessOverriddenProperty.kt") public void testAccessOverriddenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/accessOverriddenProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/accessOverriddenProperty.kt"); } public void testAllFilesPresentInLeakingThis() throws Exception { @@ -7304,32 +6749,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("callOpenMethod.kt") public void testCallOpenMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/callOpenMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/callOpenMethod.kt"); } @TestMetadata("callOpenMethodClass.kt") public void testCallOpenMethodClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/callOpenMethodClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/callOpenMethodClass.kt"); } @TestMetadata("inAbstract.kt") public void testInAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/inAbstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/inAbstract.kt"); } @TestMetadata("inNonFinal.kt") public void testInNonFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/inNonFinal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/inNonFinal.kt"); } @TestMetadata("inOverridden.kt") public void testInOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/leakingThis/inOverridden.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/leakingThis/inOverridden.kt"); } } @@ -7337,20 +6777,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Libraries extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibraries() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/libraries"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("junit.kt") public void testJunit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/libraries/junit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/libraries/junit.kt"); } @TestMetadata("testNG.kt") public void testTestNG() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/libraries/testNG.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/libraries/testNG.kt"); } } @@ -7358,32 +6800,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MakeConstructorParameterProperty extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMakeConstructorParameterProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/makeConstructorParameterProperty"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeConstructorParameterProperty/inner.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeConstructorParameterProperty/inner.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeConstructorParameterProperty/override.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeConstructorParameterProperty/override.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeConstructorParameterProperty/val.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeConstructorParameterProperty/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeConstructorParameterProperty/var.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeConstructorParameterProperty/var.kt"); } } @@ -7391,26 +6833,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MakeTypeParameterReified extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMakeTypeParameterReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/makeTypeParameterReified"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noTypeParameter.kt") public void testNoTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeTypeParameterReified/noTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeTypeParameterReified/noTypeParameter.kt"); } @TestMetadata("noTypeParameter2.kt") public void testNoTypeParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeTypeParameterReified/noTypeParameter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeTypeParameterReified/noTypeParameter2.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/makeTypeParameterReified/typeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/makeTypeParameterReified/typeParameter.kt"); } } @@ -7418,38 +6861,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberVisibilityCanBePrivate extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberVisibilityCanBePrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/memberVisibilityCanBePrivate"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructorParam.kt") public void testConstructorParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/constructorParam.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/constructorParam.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/internal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/internal.kt"); } @TestMetadata("noModifier.kt") public void testNoModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/noModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/noModifier.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/protected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/protected.kt"); } @TestMetadata("public.kt") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/memberVisibilityCanBePrivate/public.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/memberVisibilityCanBePrivate/public.kt"); } } @@ -7457,6 +6899,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migration extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -7465,20 +6911,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CommasInWhenWithoutArgument extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCommasInWhenWithoutArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/commasInWhenWithoutArgument"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commasInConditionWithNoArguments.kt") public void testCommasInConditionWithNoArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments.kt"); } @TestMetadata("commasInConditionWithNoArguments2.kt") public void testCommasInConditionWithNoArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/commasInWhenWithoutArgument/commasInConditionWithNoArguments2.kt"); } } @@ -7486,92 +6934,95 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConflictingExtension extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConflictingExtension() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/conflictingExtension"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("explicitThis.kt") public void testExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/explicitThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/explicitThis.kt"); } @TestMetadata("markHiddenAndDeprecated.kt") public void testMarkHiddenAndDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/markHiddenAndDeprecated.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/memberExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/memberExtension.kt"); } @TestMetadata("returnInGetter.kt") public void testReturnInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/returnInGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/returnInGetter.kt"); } @TestMetadata("setterWithExpressionBody.kt") public void testSetterWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/setterWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/setterWithExpressionBody.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/simple.kt"); } @TestMetadata("valInsteadOfVar.kt") public void testValInsteadOfVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/valInsteadOfVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/valInsteadOfVar.kt"); } @TestMetadata("varInsteadOfVal.kt") public void testVarInsteadOfVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/varInsteadOfVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/varInsteadOfVal.kt"); } @TestMetadata("withSetter.kt") public void testWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/withSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/withSetter.kt"); } @TestMetadata("wrongExplicitThis.kt") public void testWrongExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/wrongExplicitThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/wrongExplicitThis.kt"); } @TestMetadata("wrongExplicitThis2.kt") public void testWrongExplicitThis2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/wrongExplicitThis2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/wrongExplicitThis2.kt"); } @TestMetadata("wrongGetter.kt") public void testWrongGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/wrongGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/wrongGetter.kt"); } @TestMetadata("wrongGetter2.kt") public void testWrongGetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/wrongGetter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/wrongGetter2.kt"); } @TestMetadata("wrongSetter.kt") public void testWrongSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/conflictingExtension/wrongSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/conflictingExtension/wrongSetter.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/migration/javaAnnotationPositionedArguments") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaAnnotationPositionedArguments extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaAnnotationPositionedArguments() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/javaAnnotationPositionedArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } @@ -7579,158 +7030,137 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsExternal extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsExternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/jsExternal"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("externalExtensionFunJsRuntime.kt") public void testExternalExtensionFunJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt"); } @TestMetadata("externalExtensionFunParamsJsRuntime.kt") public void testExternalExtensionFunParamsJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt"); } @TestMetadata("externalExtensionVarJsRuntime.kt") public void testExternalExtensionVarJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt"); } @TestMetadata("funPlacementOnCompanionObjectJsRuntime.kt") public void testFunPlacementOnCompanionObjectJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/funPlacementOnCompanionObjectJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/funPlacementOnCompanionObjectJsRuntime.kt"); } @TestMetadata("funPlacementOnExternalClassJsRuntime.kt") public void testFunPlacementOnExternalClassJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/funPlacementOnExternalClassJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/funPlacementOnExternalClassJsRuntime.kt"); } @TestMetadata("funPlacementOnExternalObjectJsRuntime.kt") public void testFunPlacementOnExternalObjectJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/funPlacementOnExternalObjectJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/funPlacementOnExternalObjectJsRuntime.kt"); } @TestMetadata("nativeExtensionFunBlockBodyJsRuntime.kt") public void testNativeExtensionFunBlockBodyJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt"); } @TestMetadata("nativeExtensionFunJsName.kt") public void testNativeExtensionFunJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsName.kt"); } @TestMetadata("nativeExtensionFunJsRuntime.kt") public void testNativeExtensionFunJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt"); } @TestMetadata("nativeExtensionFunParamsJsRuntime.kt") public void testNativeExtensionFunParamsJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt"); } @TestMetadata("nativeExtensionVaslJsRuntime.kt") public void testNativeExtensionVaslJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt"); } @TestMetadata("nativeGetterExtensionFunJsRuntime.kt") public void testNativeGetterExtensionFunJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeGetterExtensionFunJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeGetterExtensionFunJsRuntime.kt"); } @TestMetadata("nativeInvokeExtensionFunJsRuntime.kt") public void testNativeInvokeExtensionFunJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeInvokeExtensionFunJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeInvokeExtensionFunJsRuntime.kt"); } @TestMetadata("nativeMemberAll01.kt") public void testNativeMemberAll01() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberAll01.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberAll01.kt"); } @TestMetadata("nativeMemberAll02.kt") public void testNativeMemberAll02() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberAll02.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberAll02.kt"); } @TestMetadata("nativeMemberAll03.kt") public void testNativeMemberAll03() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt"); } @TestMetadata("nativeMemberGetter.kt") public void testNativeMemberGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberGetter.kt"); } @TestMetadata("nativeMemberInvoke.kt") public void testNativeMemberInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberInvoke.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberInvoke.kt"); } @TestMetadata("nativeMemberInvokeGenericClass.kt") public void testNativeMemberInvokeGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberInvokeGenericClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberInvokeGenericClass.kt"); } @TestMetadata("nativeMemberInvokeGenericClassAndFun.kt") public void testNativeMemberInvokeGenericClassAndFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberInvokeGenericClassAndFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberInvokeGenericClassAndFun.kt"); } @TestMetadata("nativeMemberInvokeGenericFun.kt") public void testNativeMemberInvokeGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberInvokeGenericFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberInvokeGenericFun.kt"); } @TestMetadata("nativeMemberNative.kt") public void testNativeMemberNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberNative.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberNative.kt"); } @TestMetadata("nativeMemberSetter.kt") public void testNativeMemberSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeMemberSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeMemberSetter.kt"); } @TestMetadata("nativeSetterExtensionFunJsRuntime.kt") public void testNativeSetterExtensionFunJsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nativeSetterExtensionFunJsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nativeSetterExtensionFunJsRuntime.kt"); } @TestMetadata("nestedExtension01.kt") public void testNestedExtension01() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/jsExternal/nestedExtension01.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/jsExternal/nestedExtension01.kt"); } } @@ -7738,14 +7168,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MissingConstructorKeyword extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMissingConstructorKeyword() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/missingConstructorKeyword"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/missingConstructorKeyword/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/missingConstructorKeyword/basic.kt"); } } @@ -7753,20 +7186,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObsoleteLabelSyntax extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObsoleteLabelSyntax() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/obsoleteLabelSyntax"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/obsoleteLabelSyntax/lambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/obsoleteLabelSyntax/lambda.kt"); } @TestMetadata("loop.kt") public void testLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/obsoleteLabelSyntax/loop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/obsoleteLabelSyntax/loop.kt"); } } @@ -7774,14 +7209,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveNameFromFunctionExpression extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveNameFromFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/removeNameFromFunctionExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/removeNameFromFunctionExpression/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/removeNameFromFunctionExpression/basic.kt"); } } @@ -7789,20 +7227,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameterList extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameterList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/migration/typeParameterList"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/typeParameterList/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/typeParameterList/basic.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/migration/typeParameterList/extension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/migration/typeParameterList/extension.kt"); } } } @@ -7811,14 +7251,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MissingConstructorBrackets extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMissingConstructorBrackets() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/missingConstructorBrackets"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/missingConstructorBrackets/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/missingConstructorBrackets/basic.kt"); } } @@ -7826,16 +7269,18 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractModifierInEnum.kt") public void testAbstractModifierInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/abstractModifierInEnum.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/abstractModifierInEnum.kt"); } @TestMetadata("addLateinit.kt") public void testAddLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addLateinit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addLateinit.kt"); } public void testAllFilesPresentInModifiers() throws Exception { @@ -7844,394 +7289,334 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("cannotMakeClassAnnotation.kt") public void testCannotMakeClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/cannotMakeClassAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/cannotMakeClassAnnotation.kt"); } @TestMetadata("finalTrait.kt") public void testFinalTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/finalTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/finalTrait.kt"); } @TestMetadata("illegalEnumAnnotation1.kt") public void testIllegalEnumAnnotation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/illegalEnumAnnotation1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/illegalEnumAnnotation1.kt"); } @TestMetadata("illegalEnumAnnotation2.kt") public void testIllegalEnumAnnotation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/illegalEnumAnnotation2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/illegalEnumAnnotation2.kt"); } @TestMetadata("infixModifier.kt") public void testInfixModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/infixModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/infixModifier.kt"); } @TestMetadata("kt10409.kt") public void testKt10409() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/kt10409.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/kt10409.kt"); } @TestMetadata("nestedAbstractClass.kt") public void testNestedAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedAbstractClass.kt"); } @TestMetadata("nestedAnnotationClass.kt") public void testNestedAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedAnnotationClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedAnnotationClass.kt"); } @TestMetadata("nestedClassNotAllowed.kt") public void testNestedClassNotAllowed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedClassNotAllowed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedClassNotAllowed.kt"); } @TestMetadata("nestedDataClass.kt") public void testNestedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedDataClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedDataClass.kt"); } @TestMetadata("nestedEnumClass.kt") public void testNestedEnumClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedEnumClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedEnumClass.kt"); } @TestMetadata("nestedInterface.kt") public void testNestedInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedInterface.kt"); } @TestMetadata("nestedObject.kt") public void testNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedObject.kt"); } @TestMetadata("nestedSealedClass.kt") public void testNestedSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/nestedSealedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/nestedSealedClass.kt"); } @TestMetadata("noAbstractForAnonymousObject.kt") public void testNoAbstractForAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/noAbstractForAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/noAbstractForAnonymousObject.kt"); } @TestMetadata("noAbstractForObject.kt") public void testNoAbstractForObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/noAbstractForObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/noAbstractForObject.kt"); } @TestMetadata("noLateinitOnNullable.kt") public void testNoLateinitOnNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/noLateinitOnNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/noLateinitOnNullable.kt"); } @TestMetadata("noLateinitOnPrimitive.kt") public void testNoLateinitOnPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/noLateinitOnPrimitive.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/noLateinitOnPrimitive.kt"); } @TestMetadata("notAnAnnotationClass.kt") public void testNotAnAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/notAnAnnotationClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/notAnAnnotationClass.kt"); } @TestMetadata("openMemberInFinalClass1.kt") public void testOpenMemberInFinalClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/openMemberInFinalClass1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/openMemberInFinalClass1.kt"); } @TestMetadata("openMemberInFinalClass2.kt") public void testOpenMemberInFinalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/openMemberInFinalClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/openMemberInFinalClass2.kt"); } @TestMetadata("openMemberInFinalClass3.kt") public void testOpenMemberInFinalClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/openMemberInFinalClass3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/openMemberInFinalClass3.kt"); } @TestMetadata("openMemberInFinalClass4.kt") public void testOpenMemberInFinalClass4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/openMemberInFinalClass4.kt"); } @TestMetadata("openModifierInEnum.kt") public void testOpenModifierInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/openModifierInEnum.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/openModifierInEnum.kt"); } @TestMetadata("openVarWithPrivateSetter.kt") public void testOpenVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/openVarWithPrivateSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/openVarWithPrivateSetter.kt"); } @TestMetadata("operatorModifier.kt") public void testOperatorModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/operatorModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/operatorModifier.kt"); } @TestMetadata("operatorModifierCollection.kt") public void testOperatorModifierCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/operatorModifierCollection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/operatorModifierCollection.kt"); } @TestMetadata("operatorModifierComponent.kt") public void testOperatorModifierComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/operatorModifierComponent.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/operatorModifierComponent.kt"); } @TestMetadata("operatorModifierGet.kt") public void testOperatorModifierGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/operatorModifierGet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/operatorModifierGet.kt"); } @TestMetadata("operatorModifierInherited.kt") public void testOperatorModifierInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/operatorModifierInherited.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/operatorModifierInherited.kt"); } @TestMetadata("overrideWithPrivateSetter.kt") public void testOverrideWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/overrideWithPrivateSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/overrideWithPrivateSetter.kt"); } @TestMetadata("packageMemberCannotBeProtected.kt") public void testPackageMemberCannotBeProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/packageMemberCannotBeProtected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/packageMemberCannotBeProtected.kt"); } @TestMetadata("redundantOpenInInterface.kt") public void testRedundantOpenInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/redundantOpenInInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/redundantOpenInInterface.kt"); } @TestMetadata("removeAbstractModifier.kt") public void testRemoveAbstractModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeAbstractModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeAbstractModifier.kt"); } @TestMetadata("removeIncompatibleModifier.kt") public void testRemoveIncompatibleModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeIncompatibleModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeIncompatibleModifier.kt"); } @TestMetadata("removeInnerForClassInTrait.kt") public void testRemoveInnerForClassInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeInnerForClassInTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeInnerForClassInTrait.kt"); } @TestMetadata("removeModifierFromOperatorMod.kt") public void testRemoveModifierFromOperatorMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeModifierFromOperatorMod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeModifierFromOperatorMod.kt"); } @TestMetadata("removeModifierFromOperatorModAssign.kt") public void testRemoveModifierFromOperatorModAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeModifierFromOperatorModAssign.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeModifierFromOperatorModAssign.kt"); } @TestMetadata("removeProtectedModifier.kt") public void testRemoveProtectedModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeProtectedModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeProtectedModifier.kt"); } @TestMetadata("removeRedundantModifier1.kt") public void testRemoveRedundantModifier1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeRedundantModifier1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeRedundantModifier1.kt"); } @TestMetadata("removeRedundantModifier2.kt") public void testRemoveRedundantModifier2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeRedundantModifier2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeRedundantModifier2.kt"); } @TestMetadata("removeRedundantModifier3.kt") public void testRemoveRedundantModifier3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeRedundantModifier3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeRedundantModifier3.kt"); } @TestMetadata("removeSupertype1.kt") public void testRemoveSupertype1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeSupertype1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeSupertype1.kt"); } @TestMetadata("removeSupertype2.kt") public void testRemoveSupertype2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeSupertype2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeSupertype2.kt"); } @TestMetadata("removeSupertype3.kt") public void testRemoveSupertype3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeSupertype3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeSupertype3.kt"); } @TestMetadata("removeSupertype4.kt") public void testRemoveSupertype4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/removeSupertype4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/removeSupertype4.kt"); } @TestMetadata("visibilityModifer1.kt") public void testVisibilityModifer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/visibilityModifer1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/visibilityModifer1.kt"); } @TestMetadata("visibilityModifer2.kt") public void testVisibilityModifer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/visibilityModifer2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/visibilityModifer2.kt"); } @TestMetadata("visibilityModiferOverrideJavaRuntime.kt") public void testVisibilityModiferOverrideJavaRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt"); } @TestMetadata("visibilityModiferParameter.kt") public void testVisibilityModiferParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/visibilityModiferParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/visibilityModiferParameter.kt"); } @TestMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddOpenToClassDeclaration extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddOpenToClassDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/addOpenToClassDeclaration"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumSupertype.kt") public void testEnumSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/enumSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/enumSupertype.kt"); } @TestMetadata("enumUpperBound.kt") public void testEnumUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/enumUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/enumUpperBound.kt"); } @TestMetadata("explicitlyFinalSupertype.kt") public void testExplicitlyFinalSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/explicitlyFinalSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/explicitlyFinalSupertype.kt"); } @TestMetadata("explicitlyFinalUpperBound.kt") public void testExplicitlyFinalUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/explicitlyFinalUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/explicitlyFinalUpperBound.kt"); } @TestMetadata("finalLibrarySupertype.kt") public void testFinalLibrarySupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalLibrarySupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalLibrarySupertype.kt"); } @TestMetadata("finalLibraryUpperBound.kt") public void testFinalLibraryUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalLibraryUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalLibraryUpperBound.kt"); } @TestMetadata("finalSupertype.kt") public void testFinalSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalSupertype.kt"); } @TestMetadata("finalUpperBound.kt") public void testFinalUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalUpperBound.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/finalUpperBound.kt"); } @TestMetadata("implementTraitFinalSupertype.kt") public void testImplementTraitFinalSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/implementTraitFinalSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/implementTraitFinalSupertype.kt"); } @TestMetadata("nestedFinalClass.kt") public void testNestedFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/nestedFinalClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/nestedFinalClass.kt"); } @TestMetadata("openInCompanion.kt") public void testOpenInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/openInCompanion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/openInCompanion.kt"); } @TestMetadata("secondaryCtrDelegationInHeader.kt") public void testSecondaryCtrDelegationInHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/secondaryCtrDelegationInHeader.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/secondaryCtrDelegationInHeader.kt"); } @TestMetadata("secondaryCtrDelegationInSecondary.kt") public void testSecondaryCtrDelegationInSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/secondaryCtrDelegationInSecondary.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/secondaryCtrDelegationInSecondary.kt"); } @TestMetadata("withConstructor.kt") public void testWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/withConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/addOpenToClassDeclaration/withConstructor.kt"); } } @@ -8239,62 +7624,57 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suspend extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/modifiers/suspend"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/base.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/base.kt"); } @TestMetadata("createCoroutine.kt") public void testCreateCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/createCoroutine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/createCoroutine.kt"); } @TestMetadata("init.kt") public void testInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/init.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/init.kt"); } @TestMetadata("open.kt") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/open.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/open.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/override.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/override.kt"); } @TestMetadata("public.kt") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/public.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/public.kt"); } @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/startCoroutine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/startCoroutine.kt"); } @TestMetadata("startCoroutineNoImport.kt") public void testStartCoroutineNoImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/startCoroutineNoImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/startCoroutineNoImport.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/modifiers/suspend/topLevel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/modifiers/suspend/topLevel.kt"); } } } @@ -8303,32 +7683,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveReceiverAnnotation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveReceiverAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/moveReceiverAnnotation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveReceiverAnnotation/fun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveReceiverAnnotation/fun.kt"); } @TestMetadata("notExtensionFun.kt") public void testNotExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveReceiverAnnotation/notExtensionFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveReceiverAnnotation/notExtensionFun.kt"); } @TestMetadata("notExtensionVal.kt") public void testNotExtensionVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveReceiverAnnotation/notExtensionVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveReceiverAnnotation/notExtensionVal.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveReceiverAnnotation/val.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveReceiverAnnotation/val.kt"); } } @@ -8336,80 +7716,72 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MoveToConstructorParameters extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveToConstructorParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/moveToConstructorParameters"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/localVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/localVar.kt"); } @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberExtensionProperty.kt"); } @TestMetadata("memberPropertyInClassNameClash.kt") public void testMemberPropertyInClassNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassNameClash.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassNameClash.kt"); } @TestMetadata("memberPropertyInClassNoPrimaryConstructor.kt") public void testMemberPropertyInClassNoPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassNoPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassNoPrimaryConstructor.kt"); } @TestMetadata("memberPropertyInClassWithConstructorDelegatingToSuper.kt") public void testMemberPropertyInClassWithConstructorDelegatingToSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassWithConstructorDelegatingToSuper.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassWithConstructorDelegatingToSuper.kt"); } @TestMetadata("memberPropertyInClassWithImplicitlyDelegatingConstructor.kt") public void testMemberPropertyInClassWithImplicitlyDelegatingConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassWithImplicitlyDelegatingConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassWithImplicitlyDelegatingConstructor.kt"); } @TestMetadata("memberPropertyInClassWithPrimaryConstructor.kt") public void testMemberPropertyInClassWithPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassWithPrimaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInClassWithPrimaryConstructor.kt"); } @TestMetadata("memberPropertyInInterface.kt") public void testMemberPropertyInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInInterface.kt"); } @TestMetadata("memberPropertyInObject.kt") public void testMemberPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyInObject.kt"); } @TestMetadata("memberPropertyWithDelegateRuntime.kt") public void testMemberPropertyWithDelegateRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/memberPropertyWithDelegateRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/memberPropertyWithDelegateRuntime.kt"); } @TestMetadata("propertyWithModifiersAndComments.kt") public void testPropertyWithModifiersAndComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/propertyWithModifiersAndComments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/propertyWithModifiersAndComments.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/moveToConstructorParameters/topLevelProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/moveToConstructorParameters/topLevelProperty.kt"); } } @@ -8417,112 +7789,104 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullables extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("removeRedundantNullable.kt") public void testRemoveRedundantNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/removeRedundantNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/removeRedundantNullable.kt"); } @TestMetadata("removeSupertypeNullable1.kt") public void testRemoveSupertypeNullable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/removeSupertypeNullable1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/removeSupertypeNullable1.kt"); } @TestMetadata("removeSupertypeNullable2.kt") public void testRemoveSupertypeNullable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/removeSupertypeNullable2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/removeSupertypeNullable2.kt"); } @TestMetadata("removeUselessNullable.kt") public void testRemoveUselessNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/removeUselessNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/removeUselessNullable.kt"); } @TestMetadata("idea/testData/quickfix/nullables/unsafeInfixCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnsafeInfixCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnsafeInfixCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/nullables/unsafeInfixCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noComparison.kt") public void testNoComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/noComparison.kt"); } @TestMetadata("unsafeComparisonInCondition.kt") public void testUnsafeComparisonInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInCondition.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInCondition.kt"); } @TestMetadata("unsafeComparisonInLogic.kt") public void testUnsafeComparisonInLogic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInLogic.kt"); } @TestMetadata("unsafeComparisonInWhen.kt") public void testUnsafeComparisonInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhen.kt"); } @TestMetadata("unsafeComparisonInWhile.kt") public void testUnsafeComparisonInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeComparisonInWhile.kt"); } @TestMetadata("unsafeGet.kt") public void testUnsafeGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeGet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeGet.kt"); } @TestMetadata("unsafeInfixCall.kt") public void testUnsafeInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInfixCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInfixCall.kt"); } @TestMetadata("unsafeInvoke.kt") public void testUnsafeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvoke.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvoke.kt"); } @TestMetadata("unsafeInvokeWithImplicitReceiver.kt") public void testUnsafeInvokeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt"); } @TestMetadata("unsafeInvokeWithReceiver.kt") public void testUnsafeInvokeWithReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithReceiver.kt"); } @TestMetadata("unsafePlus.kt") public void testUnsafePlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt"); } @TestMetadata("unsafeSet.kt") public void testUnsafeSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeSet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeSet.kt"); } } } @@ -8531,20 +7895,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OptimizeImports extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOptimizeImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/optimizeImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("destructuringAtTop.kt") public void testDestructuringAtTop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/optimizeImports/destructuringAtTop.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/optimizeImports/destructuringAtTop.kt"); } @TestMetadata("fileRuntime.kt") public void testFileRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/optimizeImports/fileRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/optimizeImports/fileRuntime.kt"); } } @@ -8552,210 +7918,185 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Override extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeToInvocation.kt") public void testChangeToInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/changeToInvocation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/changeToInvocation.kt"); } @TestMetadata("dontOfferToImplementMembersForExpectedClass.kt") public void testDontOfferToImplementMembersForExpectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/dontOfferToImplementMembersForExpectedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/dontOfferToImplementMembersForExpectedClass.kt"); } @TestMetadata("implemenAsConstructorParameter.kt") public void testImplemenAsConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/implemenAsConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/implemenAsConstructorParameter.kt"); } @TestMetadata("implemenAsConstructorParameterFunction.kt") public void testImplemenAsConstructorParameterFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/implemenAsConstructorParameterFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/implemenAsConstructorParameterFunction.kt"); } @TestMetadata("implemenAsConstructorParameterInObject.kt") public void testImplemenAsConstructorParameterInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/implemenAsConstructorParameterInObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/implemenAsConstructorParameterInObject.kt"); } @TestMetadata("implementMember.kt") public void testImplementMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/implementMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/implementMember.kt"); } @TestMetadata("implementMemberFromAbstractClass.kt") public void testImplementMemberFromAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/implementMemberFromAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/implementMemberFromAbstractClass.kt"); } @TestMetadata("overriddingMultipleFinalMethods.kt") public void testOverriddingMultipleFinalMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overriddingMultipleFinalMethods.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overriddingMultipleFinalMethods.kt"); } @TestMetadata("overridingDelegatedMethod.kt") public void testOverridingDelegatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingDelegatedMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingDelegatedMethod.kt"); } @TestMetadata("overridingFakeOverride.kt") public void testOverridingFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingFakeOverride.kt"); } @TestMetadata("overridingFinalJavaMethod.kt") public void testOverridingFinalJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingFinalJavaMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingFinalJavaMethod.kt"); } @TestMetadata("overridingFinalMethod.kt") public void testOverridingFinalMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingFinalMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingFinalMethod.kt"); } @TestMetadata("overridingFinalMethodInLocal.kt") public void testOverridingFinalMethodInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingFinalMethodInLocal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingFinalMethodInLocal.kt"); } @TestMetadata("overridingFinalProperty.kt") public void testOverridingFinalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingFinalProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingFinalProperty.kt"); } @TestMetadata("overridingOpenMethodInFinalClass.kt") public void testOverridingOpenMethodInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/overridingOpenMethodInFinalClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/overridingOpenMethodInFinalClass.kt"); } @TestMetadata("parameterNameChangedAmbiguousRename.kt") public void testParameterNameChangedAmbiguousRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/parameterNameChangedAmbiguousRename.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/parameterNameChangedAmbiguousRename.kt"); } @TestMetadata("parameterNameChangedMultipleOverrideRenamePossible.kt") public void testParameterNameChangedMultipleOverrideRenamePossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/parameterNameChangedMultipleOverrideRenamePossible.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/parameterNameChangedMultipleOverrideRenamePossible.kt"); } @TestMetadata("parameterNameChangedRenamePossible.kt") public void testParameterNameChangedRenamePossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/parameterNameChangedRenamePossible.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/parameterNameChangedRenamePossible.kt"); } @TestMetadata("virtualMethodHidden.kt") public void testVirtualMethodHidden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/virtualMethodHidden.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/virtualMethodHidden.kt"); } @TestMetadata("idea/testData/quickfix/override/nothingToOverride") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NothingToOverride extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addFunction.kt") public void testAddFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunction.kt"); } @TestMetadata("addFunctionAbstractClass.kt") public void testAddFunctionAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionAbstractClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionAbstractClass.kt"); } @TestMetadata("addFunctionInLocalDeclaration.kt") public void testAddFunctionInLocalDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionInLocalDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionInLocalDeclaration.kt"); } @TestMetadata("addFunctionNoBody.kt") public void testAddFunctionNoBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionNoBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionNoBody.kt"); } @TestMetadata("addFunctionNonUnitReturnType.kt") public void testAddFunctionNonUnitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionNonUnitReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionNonUnitReturnType.kt"); } @TestMetadata("addFunctionTrait.kt") public void testAddFunctionTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionTrait.kt"); } @TestMetadata("addFunctionTwoSuperclasses.kt") public void testAddFunctionTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionTwoSuperclasses.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionTwoSuperclasses.kt"); } @TestMetadata("addFunctionTwoTraits.kt") public void testAddFunctionTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addFunctionTwoTraits.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addFunctionTwoTraits.kt"); } @TestMetadata("addParameter.kt") public void testAddParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addParameter.kt"); } @TestMetadata("addParameterGenericClass.kt") public void testAddParameterGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addParameterGenericClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addParameterGenericClass.kt"); } @TestMetadata("addParameterMultiple.kt") public void testAddParameterMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addParameterMultiple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addParameterMultiple.kt"); } @TestMetadata("addParameterPreserveVisibility.kt") public void testAddParameterPreserveVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addParameterPreserveVisibility.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addParameterPreserveVisibility.kt"); } @TestMetadata("addParameterTwoSupertraits.kt") public void testAddParameterTwoSupertraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addParameterTwoSupertraits.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addParameterTwoSupertraits.kt"); } @TestMetadata("addParameterTwoSupertypes.kt") public void testAddParameterTwoSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/addParameterTwoSupertypes.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/addParameterTwoSupertypes.kt"); } public void testAllFilesPresentInNothingToOverride() throws Exception { @@ -8764,104 +8105,87 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("changeParameterType.kt") public void testChangeParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterType.kt"); } @TestMetadata("changeParameterTypeAbstractSuperclass.kt") public void testChangeParameterTypeAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeAbstractSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeAbstractSuperclass.kt"); } @TestMetadata("changeParameterTypeInTrait.kt") public void testChangeParameterTypeInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeInTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeInTrait.kt"); } @TestMetadata("changeParameterTypeMatchNames.kt") public void testChangeParameterTypeMatchNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeMatchNames.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeMatchNames.kt"); } @TestMetadata("changeParameterTypeModifyOrder.kt") public void testChangeParameterTypeModifyOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeModifyOrder.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeModifyOrder.kt"); } @TestMetadata("changeParameterTypeOpenOverride.kt") public void testChangeParameterTypeOpenOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeOpenOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeOpenOverride.kt"); } @TestMetadata("changeParameterTypeSingleExpressionFunction.kt") public void testChangeParameterTypeSingleExpressionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeSingleExpressionFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeSingleExpressionFunction.kt"); } @TestMetadata("changeParameterTypeSuperTrait.kt") public void testChangeParameterTypeSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeSuperTrait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeParameterTypeSuperTrait.kt"); } @TestMetadata("changeReturnType.kt") public void testChangeReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/changeReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/changeReturnType.kt"); } @TestMetadata("doNotLooseAnnotations.kt") public void testDoNotLooseAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/doNotLooseAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/doNotLooseAnnotations.kt"); } @TestMetadata("noDefaultValuesInOverride.kt") public void testNoDefaultValuesInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/noDefaultValuesInOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/noDefaultValuesInOverride.kt"); } @TestMetadata("noOpenSuperFunction.kt") public void testNoOpenSuperFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/noOpenSuperFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/noOpenSuperFunction.kt"); } @TestMetadata("overrideJavaMethod.kt") public void testOverrideJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/overrideJavaMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/overrideJavaMethod.kt"); } @TestMetadata("removeOverride.kt") public void testRemoveOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/removeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/removeOverride.kt"); } @TestMetadata("removeParameter.kt") public void testRemoveParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/removeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/removeParameter.kt"); } @TestMetadata("removeParameterTwoTraits.kt") public void testRemoveParameterTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/removeParameterTwoTraits.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/removeParameterTwoTraits.kt"); } @TestMetadata("swapParametersGenericClass.kt") public void testSwapParametersGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/nothingToOverride/swapParametersGenericClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/nothingToOverride/swapParametersGenericClass.kt"); } } @@ -8869,116 +8193,102 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatchOnOverride extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeMismatchOnOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/override/typeMismatchOnOverride"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cantChangeMultipleOverriddenPropertiesTypes.kt") public void testCantChangeMultipleOverriddenPropertiesTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangeMultipleOverriddenPropertiesTypes.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangeMultipleOverriddenPropertiesTypes.kt"); } @TestMetadata("cantChangeOverriddenPropertyTypeToMatchOverridingProperty.kt") public void testCantChangeOverriddenPropertyTypeToMatchOverridingProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangeOverriddenPropertyTypeToMatchOverridingProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangeOverriddenPropertyTypeToMatchOverridingProperty.kt"); } @TestMetadata("cantChangePropertyTypeToMatchOverridenProperties.kt") public void testCantChangePropertyTypeToMatchOverridenProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangePropertyTypeToMatchOverridenProperties.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangePropertyTypeToMatchOverridenProperties.kt"); } @TestMetadata("cantChangeReturnTypeOfOverriddenFunction.kt") public void testCantChangeReturnTypeOfOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangeReturnTypeOfOverriddenFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/cantChangeReturnTypeOfOverriddenFunction.kt"); } @TestMetadata("changeOverriddenPropertyType1.kt") public void testChangeOverriddenPropertyType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType1.kt"); } @TestMetadata("changeOverriddenPropertyType2.kt") public void testChangeOverriddenPropertyType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/changeOverriddenPropertyType2.kt"); } @TestMetadata("changeOverridingPropertyTypeToFunctionType.kt") public void testChangeOverridingPropertyTypeToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/changeOverridingPropertyTypeToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/changeOverridingPropertyTypeToFunctionType.kt"); } @TestMetadata("changeReturnTypeOfOverriddenFunction.kt") public void testChangeReturnTypeOfOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/changeReturnTypeOfOverriddenFunction.kt"); } @TestMetadata("namedFunctionReturnOverrideInsideVariableInitializer.kt") public void testNamedFunctionReturnOverrideInsideVariableInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/namedFunctionReturnOverrideInsideVariableInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/namedFunctionReturnOverrideInsideVariableInitializer.kt"); } @TestMetadata("objectInsideBody.kt") public void testObjectInsideBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/objectInsideBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/objectInsideBody.kt"); } @TestMetadata("propertyReturnTypeMismatchOnOverride.kt") public void testPropertyReturnTypeMismatchOnOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/propertyReturnTypeMismatchOnOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/propertyReturnTypeMismatchOnOverride.kt"); } @TestMetadata("propertyTypeMismatchOnOverrideIntLong.kt") public void testPropertyTypeMismatchOnOverrideIntLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/propertyTypeMismatchOnOverrideIntLong.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/propertyTypeMismatchOnOverrideIntLong.kt"); } @TestMetadata("propertyTypeMismatchOnOverrideIntUnit.kt") public void testPropertyTypeMismatchOnOverrideIntUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/propertyTypeMismatchOnOverrideIntUnit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/propertyTypeMismatchOnOverrideIntUnit.kt"); } @TestMetadata("returnTypeMismatchOnMultipleOverride.kt") public void testReturnTypeMismatchOnMultipleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnMultipleOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnMultipleOverride.kt"); } @TestMetadata("returnTypeMismatchOnMultipleOverrideAmbiguity.kt") public void testReturnTypeMismatchOnMultipleOverrideAmbiguity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnMultipleOverrideAmbiguity.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnMultipleOverrideAmbiguity.kt"); } @TestMetadata("returnTypeMismatchOnOverrideIntLong.kt") public void testReturnTypeMismatchOnOverrideIntLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnOverrideIntLong.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnOverrideIntLong.kt"); } @TestMetadata("returnTypeMismatchOnOverrideIntUnit.kt") public void testReturnTypeMismatchOnOverrideIntUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnOverrideIntUnit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnOverrideIntUnit.kt"); } @TestMetadata("returnTypeMismatchOnOverrideUnitInt.kt") public void testReturnTypeMismatchOnOverrideUnitInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnOverrideUnitInt.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/override/typeMismatchOnOverride/returnTypeMismatchOnOverrideUnitInt.kt"); } } } @@ -8987,32 +8297,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformClasses extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/platformClasses"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mapPlatformClassToKotlin1.kt") public void testMapPlatformClassToKotlin1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin1.kt"); } @TestMetadata("mapPlatformClassToKotlin2.kt") public void testMapPlatformClassToKotlin2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin2.kt"); } @TestMetadata("mapPlatformClassToKotlin3.kt") public void testMapPlatformClassToKotlin3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin3.kt"); } @TestMetadata("mapPlatformClassToKotlin4.kt") public void testMapPlatformClassToKotlin4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformClasses/mapPlatformClassToKotlin4.kt"); } } @@ -9020,32 +8330,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypesInspection extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypesInspection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/platformTypesInspection"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nestedNoAssertRuntime.kt") public void testNestedNoAssertRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformTypesInspection/nestedNoAssertRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformTypesInspection/nestedNoAssertRuntime.kt"); } @TestMetadata("nestedRuntime.kt") public void testNestedRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformTypesInspection/nestedRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformTypesInspection/nestedRuntime.kt"); } @TestMetadata("nullableAssertRuntime.kt") public void testNullableAssertRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformTypesInspection/nullableAssertRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformTypesInspection/nullableAssertRuntime.kt"); } @TestMetadata("nullableRuntime.kt") public void testNullableRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/platformTypesInspection/nullableRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/platformTypesInspection/nullableRuntime.kt"); } } @@ -9053,32 +8363,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveCastToConversion extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveCastToConversion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/primitiveCastToConversion"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/primitiveCastToConversion/boolean.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/primitiveCastToConversion/boolean.kt"); } @TestMetadata("charToShort.kt") public void testCharToShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/primitiveCastToConversion/charToShort.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/primitiveCastToConversion/charToShort.kt"); } @TestMetadata("intToByte.kt") public void testIntToByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/primitiveCastToConversion/intToByte.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/primitiveCastToConversion/intToByte.kt"); } @TestMetadata("longToFloat.kt") public void testLongToFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/primitiveCastToConversion/longToFloat.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/primitiveCastToConversion/longToFloat.kt"); } } @@ -9086,6 +8396,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/properties"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -9094,38 +8408,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionPropertyInitializerToGetter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtensionPropertyInitializerToGetter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("baseCase.kt") public void testBaseCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/baseCase.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/baseCase.kt"); } @TestMetadata("baseCaseVar.kt") public void testBaseCaseVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/baseCaseVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/baseCaseVar.kt"); } @TestMetadata("baseCaseWithoutTypeAnnotation.kt") public void testBaseCaseWithoutTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/baseCaseWithoutTypeAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/baseCaseWithoutTypeAnnotation.kt"); } @TestMetadata("dontShowQuickfixOnExistingAccessors.kt") public void testDontShowQuickfixOnExistingAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/dontShowQuickfixOnExistingAccessors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/dontShowQuickfixOnExistingAccessors.kt"); } @TestMetadata("insertGetterBeforeExistingSetter.kt") public void testInsertGetterBeforeExistingSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/insertGetterBeforeExistingSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/properties/extensionPropertyInitializerToGetter/insertGetterBeforeExistingSetter.kt"); } } } @@ -9134,20 +8447,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProtectedInFinal extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtectedInFinal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/protectedInFinal"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/protectedInFinal/protected.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/protectedInFinal/protected.kt"); } @TestMetadata("protected2.kt") public void testProtected2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/protectedInFinal/protected2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/protectedInFinal/protected2.kt"); } } @@ -9155,56 +8470,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantIf extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantIf"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignExpression.kt") public void testAssignExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/assignExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/assignExpression.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/assignment.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/assignment.kt"); } @TestMetadata("assignmentFake.kt") public void testAssignmentFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/assignmentFake.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/assignmentFake.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/expression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/expression.kt"); } @TestMetadata("expressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/expressionBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/expressionBody.kt"); } @TestMetadata("labeledReturn.kt") public void testLabeledReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/labeledReturn.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/labeledReturn.kt"); } @TestMetadata("negate.kt") public void testNegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/negate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/negate.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantIf/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantIf/simple.kt"); } } @@ -9212,20 +8523,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantModalityModifier extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantModalityModifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantModalityModifier"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("redundantAbstract.kt") public void testRedundantAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantModalityModifier/redundantAbstract.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantModalityModifier/redundantAbstract.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantModalityModifier/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantModalityModifier/simple.kt"); } } @@ -9233,16 +8546,18 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantSemicolon extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("afterImport.kt") public void testAfterImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantSemicolon/afterImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantSemicolon/afterImport.kt"); } @TestMetadata("afterStatement.kt") public void testAfterStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantSemicolon/afterStatement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantSemicolon/afterStatement.kt"); } public void testAllFilesPresentInRedundantSemicolon() throws Exception { @@ -9254,14 +8569,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantSuspend extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantSuspend"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantSuspend/inline.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantSuspend/inline.kt"); } } @@ -9269,14 +8587,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantVisibilityModifier extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRedundantVisibilityModifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/redundantVisibilityModifier"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/redundantVisibilityModifier/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/redundantVisibilityModifier/simple.kt"); } } @@ -9284,14 +8605,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveAnnotation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeAnnotation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("jvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeAnnotation/jvmOverloads.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeAnnotation/jvmOverloads.kt"); } } @@ -9299,26 +8623,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveAtFromAnnotationArgument extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveAtFromAnnotationArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeAtFromAnnotationArgument"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayParam.kt") public void testArrayParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeAtFromAnnotationArgument/arrayParam.kt"); } @TestMetadata("namedParam.kt") public void testNamedParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeAtFromAnnotationArgument/namedParam.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeAtFromAnnotationArgument/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeAtFromAnnotationArgument/simple.kt"); } } @@ -9326,20 +8651,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveFinalUpperBound extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveFinalUpperBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeFinalUpperBound"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeFinalUpperBound/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeFinalUpperBound/basic.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeFinalUpperBound/function.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeFinalUpperBound/function.kt"); } } @@ -9347,14 +8674,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveNoConstructor extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveNoConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeNoConstructor"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeNoConstructor/basic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeNoConstructor/basic.kt"); } } @@ -9362,32 +8692,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveRedundantAssignment extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveRedundantAssignment() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeRedundantAssignment"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constant.kt") public void testConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeRedundantAssignment/constant.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeRedundantAssignment/constant.kt"); } @TestMetadata("functionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeRedundantAssignment/functionCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeRedundantAssignment/functionCall.kt"); } @TestMetadata("notRedundant.kt") public void testNotRedundant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeRedundantAssignment/notRedundant.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeRedundantAssignment/notRedundant.kt"); } @TestMetadata("simpleRef.kt") public void testSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeRedundantAssignment/simpleRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeRedundantAssignment/simpleRef.kt"); } } @@ -9395,14 +8725,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveRedundantInitializer extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveRedundantInitializer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeRedundantInitializer"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeRedundantInitializer/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeRedundantInitializer/simple.kt"); } } @@ -9410,20 +8743,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveSingleLambdaParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveSingleLambdaParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeSingleLambdaParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSingleLambdaParameter/multiple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSingleLambdaParameter/multiple.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSingleLambdaParameter/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSingleLambdaParameter/simple.kt"); } } @@ -9431,44 +8766,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveSuspend extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveSuspend() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeSuspend"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSuspend/fakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSuspend/fakeOverride.kt"); } @TestMetadata("fakeOverride2.kt") public void testFakeOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSuspend/fakeOverride2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSuspend/fakeOverride2.kt"); } @TestMetadata("middleClass.kt") public void testMiddleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSuspend/middleClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSuspend/middleClass.kt"); } @TestMetadata("middleClass2.kt") public void testMiddleClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSuspend/middleClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSuspend/middleClass2.kt"); } @TestMetadata("nonOverridden.kt") public void testNonOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSuspend/nonOverridden.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSuspend/nonOverridden.kt"); } @TestMetadata("nonOverridden2.kt") public void testNonOverridden2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeSuspend/nonOverridden2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeSuspend/nonOverridden2.kt"); } } @@ -9476,44 +8809,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveToStringInStringTemplate extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveToStringInStringTemplate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeToStringInStringTemplate"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeToStringInStringTemplate/call.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeToStringInStringTemplate/call.kt"); } @TestMetadata("name.kt") public void testName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeToStringInStringTemplate/name.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeToStringInStringTemplate/name.kt"); } @TestMetadata("nameWithPostfix.kt") public void testNameWithPostfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeToStringInStringTemplate/nameWithPostfix.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeToStringInStringTemplate/nameWithPostfix.kt"); } @TestMetadata("necessaryBrackets1.kt") public void testNecessaryBrackets1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeToStringInStringTemplate/necessaryBrackets1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeToStringInStringTemplate/necessaryBrackets1.kt"); } @TestMetadata("necessaryBrackets2.kt") public void testNecessaryBrackets2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeToStringInStringTemplate/necessaryBrackets2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeToStringInStringTemplate/necessaryBrackets2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeToStringInStringTemplate/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeToStringInStringTemplate/simple.kt"); } } @@ -9521,122 +8852,107 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnused extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveUnused() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnused"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deledage.kt") public void testDeledage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/deledage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/deledage.kt"); } @TestMetadata("importEnumValues.kt") public void testImportEnumValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/importEnumValues.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/importEnumValues.kt"); } @TestMetadata("importObjectFun.kt") public void testImportObjectFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/importObjectFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/importObjectFun.kt"); } @TestMetadata("notTriangle.kt") public void testNotTriangle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/notTriangle.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/notTriangle.kt"); } @TestMetadata("triangle.kt") public void testTriangle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/triangle.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/triangle.kt"); } @TestMetadata("triangle2.kt") public void testTriangle2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/triangle2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/triangle2.kt"); } @TestMetadata("unusedClass.kt") public void testUnusedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedClass.kt"); } @TestMetadata("unusedConstructor.kt") public void testUnusedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedConstructor.kt"); } @TestMetadata("unusedDelegatedConstructor.kt") public void testUnusedDelegatedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedDelegatedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedDelegatedConstructor.kt"); } @TestMetadata("unusedDelegatedConstructorSuper.kt") public void testUnusedDelegatedConstructorSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedDelegatedConstructorSuper.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedDelegatedConstructorSuper.kt"); } @TestMetadata("unusedFunction.kt") public void testUnusedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedFunction.kt"); } @TestMetadata("unusedProperty.kt") public void testUnusedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedProperty.kt"); } @TestMetadata("unusedPropertyAsConstructorParameter.kt") public void testUnusedPropertyAsConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedPropertyAsConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedPropertyAsConstructorParameter.kt"); } @TestMetadata("unusedPropertyAsConstructorParameter2.kt") public void testUnusedPropertyAsConstructorParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedPropertyAsConstructorParameter2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedPropertyAsConstructorParameter2.kt"); } @TestMetadata("unusedTypeParameter.kt") public void testUnusedTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/unusedTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/unusedTypeParameter.kt"); } @TestMetadata("usedClassAsAlias.kt") public void testUsedClassAsAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/usedClassAsAlias.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/usedClassAsAlias.kt"); } @TestMetadata("usedFunAsAlias.kt") public void testUsedFunAsAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/usedFunAsAlias.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/usedFunAsAlias.kt"); } @TestMetadata("usedObjectAsAlias.kt") public void testUsedObjectAsAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/usedObjectAsAlias.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/usedObjectAsAlias.kt"); } @TestMetadata("usedVarAsAlias.kt") public void testUsedVarAsAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnused/usedVarAsAlias.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnused/usedVarAsAlias.kt"); } } @@ -9644,20 +8960,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveUnusedReceiver extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveUnusedReceiver() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/removeUnusedReceiver"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnusedReceiver/inFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnusedReceiver/inFunction.kt"); } @TestMetadata("inProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/removeUnusedReceiver/inProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/removeUnusedReceiver/inProperty.kt"); } } @@ -9665,26 +8983,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RenameToRem extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenameToRem() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/renameToRem"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("modAsExtension.kt") public void testModAsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToRem/modAsExtension.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToRem/modAsExtension.kt"); } @TestMetadata("modAsMember.kt") public void testModAsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToRem/modAsMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToRem/modAsMember.kt"); } @TestMetadata("modAssignAsMember.kt") public void testModAssignAsMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToRem/modAssignAsMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToRem/modAssignAsMember.kt"); } } @@ -9692,56 +9011,52 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RenameToUnderscore extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenameToUnderscore() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/renameToUnderscore"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("commonDestructuring.kt") public void testCommonDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/commonDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/commonDestructuring.kt"); } @TestMetadata("forDestructuring.kt") public void testForDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/forDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/forDestructuring.kt"); } @TestMetadata("functionExpressionParameterNoRemoveParameter.kt") public void testFunctionExpressionParameterNoRemoveParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/functionExpressionParameterNoRemoveParameter.kt"); } @TestMetadata("lambdaDestructuring.kt") public void testLambdaDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/lambdaDestructuring.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/lambdaDestructuring.kt"); } @TestMetadata("lambdaParameter.kt") public void testLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/lambdaParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/lambdaParameter.kt"); } @TestMetadata("lambdaParameterNoRemoveParameter.kt") public void testLambdaParameterNoRemoveParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/lambdaParameterNoRemoveParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/lambdaParameterNoRemoveParameter.kt"); } @TestMetadata("noActionForCommonFunction.kt") public void testNoActionForCommonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/noActionForCommonFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/noActionForCommonFunction.kt"); } @TestMetadata("noActionForCommonVal.kt") public void testNoActionForCommonVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameToUnderscore/noActionForCommonVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameToUnderscore/noActionForCommonVal.kt"); } } @@ -9749,44 +9064,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RenameUnresolvedReference extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenameUnresolvedReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/renameUnresolvedReference"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("qualifiedFunRef.kt") public void testQualifiedFunRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameUnresolvedReference/qualifiedFunRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameUnresolvedReference/qualifiedFunRef.kt"); } @TestMetadata("qualifiedPropertyRef.kt") public void testQualifiedPropertyRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameUnresolvedReference/qualifiedPropertyRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameUnresolvedReference/qualifiedPropertyRef.kt"); } @TestMetadata("typeRef.kt") public void testTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameUnresolvedReference/typeRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameUnresolvedReference/typeRef.kt"); } @TestMetadata("unqualifiedFunRef.kt") public void testUnqualifiedFunRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameUnresolvedReference/unqualifiedFunRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameUnresolvedReference/unqualifiedFunRef.kt"); } @TestMetadata("unqualifiedPropertyRef.kt") public void testUnqualifiedPropertyRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameUnresolvedReference/unqualifiedPropertyRef.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameUnresolvedReference/unqualifiedPropertyRef.kt"); } @TestMetadata("unqualifiedPropertyRefWithPackageError.kt") public void testUnqualifiedPropertyRefWithPackageError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/renameUnresolvedReference/unqualifiedPropertyRefWithPackageError.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/renameUnresolvedReference/unqualifiedPropertyRefWithPackageError.kt"); } } @@ -9794,62 +9107,57 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceInfixOrOperatorCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceInfixOrOperatorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceInfixOrOperatorCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/array.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/array.kt"); } @TestMetadata("arraySet.kt") public void testArraySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/arraySet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/arraySet.kt"); } @TestMetadata("assignmentArray.kt") public void testAssignmentArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentArray.kt"); } @TestMetadata("assignmentBinaryOperator.kt") public void testAssignmentBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentBinaryOperator.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentBinaryOperator.kt"); } @TestMetadata("assignmentCallExpression.kt") public void testAssignmentCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentCallExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentCallExpression.kt"); } @TestMetadata("assignmentList.kt") public void testAssignmentList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/assignmentList.kt"); } @TestMetadata("binaryOperator.kt") public void testBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/binaryOperator.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/binaryOperator.kt"); } @TestMetadata("callExpression.kt") public void testCallExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/callExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/callExpression.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceInfixOrOperatorCall/list.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceInfixOrOperatorCall/list.kt"); } } @@ -9857,62 +9165,57 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceJvmFieldWithConst extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceJvmFieldWithConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceJvmFieldWithConst"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/class.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/class.kt"); } @TestMetadata("companionInInterface.kt") public void testCompanionInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/companionInInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/companionInInterface.kt"); } @TestMetadata("getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/getter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/getter.kt"); } @TestMetadata("nonConstantInitializer.kt") public void testNonConstantInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/nonConstantInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/nonConstantInitializer.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/nullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/nullable.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/object.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/object.kt"); } @TestMetadata("stringTemplateWithConstants.kt") public void testStringTemplateWithConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/stringTemplateWithConstants.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/stringTemplateWithConstants.kt"); } @TestMetadata("stringTemplateWithVal.kt") public void testStringTemplateWithVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/stringTemplateWithVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/stringTemplateWithVal.kt"); } @TestMetadata("toplevel.kt") public void testToplevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceJvmFieldWithConst/toplevel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceJvmFieldWithConst/toplevel.kt"); } } @@ -9920,26 +9223,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithArrayCallInAnnotation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceWithArrayCallInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithArrayCallInAnnotation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("emptyLiteral.kt") public void testEmptyLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithArrayCallInAnnotation/emptyLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithArrayCallInAnnotation/emptyLiteral.kt"); } @TestMetadata("literalWithValues.kt") public void testLiteralWithValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithArrayCallInAnnotation/literalWithValues.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithArrayCallInAnnotation/literalWithValues.kt"); } @TestMetadata("replaceSingleElementInNamedForm.kt") public void testReplaceSingleElementInNamedForm() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithArrayCallInAnnotation/replaceSingleElementInNamedForm.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithArrayCallInAnnotation/replaceSingleElementInNamedForm.kt"); } } @@ -9947,20 +9251,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithDotCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceWithDotCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithDotCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("functionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithDotCall/functionCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithDotCall/functionCall.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithDotCall/normal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithDotCall/normal.kt"); } } @@ -9968,98 +9274,87 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithSafeCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceWithSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithSafeCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("apply.kt") public void testApply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/apply.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/apply.kt"); } @TestMetadata("applyWithImplicitParameter.kt") public void testApplyWithImplicitParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/applyWithImplicitParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/applyWithImplicitParameter.kt"); } @TestMetadata("applyWithImplicitParameterFunctionCall.kt") public void testApplyWithImplicitParameterFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/applyWithImplicitParameterFunctionCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/applyWithImplicitParameterFunctionCall.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/assignment.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/assignment.kt"); } @TestMetadata("assignmentFromImplicitParameter.kt") public void testAssignmentFromImplicitParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/assignmentFromImplicitParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/assignmentFromImplicitParameter.kt"); } @TestMetadata("assignmentToNullable.kt") public void testAssignmentToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/assignmentToNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/assignmentToNullable.kt"); } @TestMetadata("assignmentToProperty.kt") public void testAssignmentToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/assignmentToProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/assignmentToProperty.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/expression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/expression.kt"); } @TestMetadata("extFunction.kt") public void testExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/extFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/extFunction.kt"); } @TestMetadata("functionCall.kt") public void testFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/functionCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/functionCall.kt"); } @TestMetadata("invokeOperator.kt") public void testInvokeOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/invokeOperator.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/invokeOperator.kt"); } @TestMetadata("let.kt") public void testLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/let.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/let.kt"); } @TestMetadata("letWithParameter.kt") public void testLetWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/letWithParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/letWithParameter.kt"); } @TestMetadata("noReplaceWithSafeCallForImplicitReceiver.kt") public void testNoReplaceWithSafeCallForImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/noReplaceWithSafeCallForImplicitReceiver.kt"); } @TestMetadata("normal.kt") public void testNormal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCall/normal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCall/normal.kt"); } } @@ -10067,98 +9362,87 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReplaceWithSafeCallForScopeFunction extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReplaceWithSafeCallForScopeFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/replaceWithSafeCallForScopeFunction"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("also.kt") public void testAlso() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/also.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/also.kt"); } @TestMetadata("applyWithFake.kt") public void testApplyWithFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithFake.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithFake.kt"); } @TestMetadata("applyWithThis.kt") public void testApplyWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThis.kt"); } @TestMetadata("applyWithThisAndArrow.kt") public void testApplyWithThisAndArrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisAndArrow.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisAndArrow.kt"); } @TestMetadata("applyWithThisLabeled.kt") public void testApplyWithThisLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeled.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeled.kt"); } @TestMetadata("applyWithThisLabeledFake.kt") public void testApplyWithThisLabeledFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeledFake.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithThisLabeledFake.kt"); } @TestMetadata("applyWithoutThis.kt") public void testApplyWithoutThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithoutThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithoutThis.kt"); } @TestMetadata("applyWithoutThisMethodCall.kt") public void testApplyWithoutThisMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithoutThisMethodCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/applyWithoutThisMethodCall.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/assignment.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/assignment.kt"); } @TestMetadata("let.kt") public void testLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/let.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/let.kt"); } @TestMetadata("letWithParam.kt") public void testLetWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithParam.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithParam.kt"); } @TestMetadata("letWithWrongImplicitThis.kt") public void testLetWithWrongImplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongImplicitThis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongImplicitThis.kt"); } @TestMetadata("letWithWrongParam.kt") public void testLetWithWrongParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongParam.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/letWithWrongParam.kt"); } @TestMetadata("notInsideScope.kt") public void testNotInsideScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/notInsideScope.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/notInsideScope.kt"); } @TestMetadata("run.kt") public void testRun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/run.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/replaceWithSafeCallForScopeFunction/run.kt"); } } @@ -10166,50 +9450,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SimplifyComparison extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSimplifyComparison() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/simplifyComparison"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doubleNull.kt") public void testDoubleNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/doubleNull.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/doubleNull.kt"); } @TestMetadata("notNull.kt") public void testNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/notNull.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/notNull.kt"); } @TestMetadata("nullOrNotNull.kt") public void testNullOrNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/nullOrNotNull.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/nullOrNotNull.kt"); } @TestMetadata("somethingAndNotNull.kt") public void testSomethingAndNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/somethingAndNotNull.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/somethingAndNotNull.kt"); } @TestMetadata("withAssertion.kt") public void testWithAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/withAssertion.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/withAssertion.kt"); } @TestMetadata("withAssertion2.kt") public void testWithAssertion2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/withAssertion2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/withAssertion2.kt"); } @TestMetadata("withAssertion3.kt") public void testWithAssertion3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/simplifyComparison/withAssertion3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/simplifyComparison/withAssertion3.kt"); } } @@ -10217,50 +9498,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecifyOverrideExplicitly extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSpecifyOverrideExplicitly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/specifyOverrideExplicitly"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/base.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/base.kt"); } @TestMetadata("global.kt") public void testGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/global.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/global.kt"); } @TestMetadata("lists.kt") public void testLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/lists.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/lists.kt"); } @TestMetadata("lists2.kt") public void testLists2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/lists2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/lists2.kt"); } @TestMetadata("notPossible.kt") public void testNotPossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/notPossible.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/notPossible.kt"); } @TestMetadata("outer.kt") public void testOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/outer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/outer.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/specifyOverrideExplicitly/property.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/specifyOverrideExplicitly/property.kt"); } } @@ -10268,26 +9546,27 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperTypeIsExtensionType extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuperTypeIsExtensionType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/superTypeIsExtensionType"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("typeWith1Argument.kt") public void testTypeWith1Argument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/superTypeIsExtensionType/typeWith1Argument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/superTypeIsExtensionType/typeWith1Argument.kt"); } @TestMetadata("typeWithNoArgument.kt") public void testTypeWithNoArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/superTypeIsExtensionType/typeWithNoArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/superTypeIsExtensionType/typeWithNoArgument.kt"); } @TestMetadata("typeWithTypeArgument.kt") public void testTypeWithTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/superTypeIsExtensionType/typeWithTypeArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/superTypeIsExtensionType/typeWithTypeArgument.kt"); } } @@ -10295,14 +9574,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Supercalls extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSupercalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/supercalls"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("typeArgumentsRedundantInSuperQualifier.kt") public void testTypeArgumentsRedundantInSuperQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supercalls/typeArgumentsRedundantInSuperQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supercalls/typeArgumentsRedundantInSuperQualifier.kt"); } } @@ -10310,64 +9592,58 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SupertypeInitialization extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addImport.kt") public void testAddImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addImport.kt"); } @TestMetadata("addParameters.kt") public void testAddParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParameters.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParameters.kt"); } @TestMetadata("addParenthesis.kt") public void testAddParenthesis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesis.kt"); } @TestMetadata("addParenthesisDefaultParameters.kt") public void testAddParenthesisDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisDefaultParameters.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisDefaultParameters.kt"); } @TestMetadata("addParenthesisEmptyConstructor.kt") public void testAddParenthesisEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisEmptyConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisEmptyConstructor.kt"); } @TestMetadata("addParenthesisForInvalidSealedClass.kt") public void testAddParenthesisForInvalidSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass.kt"); } @TestMetadata("addParenthesisForInvalidSealedClass2.kt") public void testAddParenthesisForInvalidSealedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisForInvalidSealedClass2.kt"); } @TestMetadata("addParenthesisForLocalClass.kt") public void testAddParenthesisForLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisForLocalClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisForLocalClass.kt"); } @TestMetadata("addParenthesisForObjectExpression.kt") public void testAddParenthesisForObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisForObjectExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisForObjectExpression.kt"); } @TestMetadata("addParenthesisForSealedClass.kt") public void testAddParenthesisForSealedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/addParenthesisForSealedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/addParenthesisForSealedClass.kt"); } public void testAllFilesPresentInSupertypeInitialization() throws Exception { @@ -10376,92 +9652,77 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("baseConstructorError.kt") public void testBaseConstructorError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/baseConstructorError.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/baseConstructorError.kt"); } @TestMetadata("createConstructor.kt") public void testCreateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/createConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/createConstructor.kt"); } @TestMetadata("displayLongSignatures1.kt") public void testDisplayLongSignatures1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/displayLongSignatures1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/displayLongSignatures1.kt"); } @TestMetadata("displayLongSignatures2.kt") public void testDisplayLongSignatures2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/displayLongSignatures2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/displayLongSignatures2.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/genericClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/genericClass.kt"); } @TestMetadata("incompleteConstructor.kt") public void testIncompleteConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/incompleteConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/incompleteConstructor.kt"); } @TestMetadata("keywordName.kt") public void testKeywordName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/keywordName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/keywordName.kt"); } @TestMetadata("multipleConstructors.kt") public void testMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/multipleConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/multipleConstructors.kt"); } @TestMetadata("noAccessibleConstructors.kt") public void testNoAccessibleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/noAccessibleConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/noAccessibleConstructors.kt"); } @TestMetadata("noParameters.kt") public void testNoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/noParameters.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/noParameters.kt"); } @TestMetadata("primaryConstructorInaccessible.kt") public void testPrimaryConstructorInaccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/primaryConstructorInaccessible.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/primaryConstructorInaccessible.kt"); } @TestMetadata("someParametersAlreadyExist.kt") public void testSomeParametersAlreadyExist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/someParametersAlreadyExist.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/someParametersAlreadyExist.kt"); } @TestMetadata("vararg1.kt") public void testVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/vararg1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/vararg1.kt"); } @TestMetadata("vararg2.kt") public void testVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/vararg2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/vararg2.kt"); } @TestMetadata("vararg3.kt") public void testVararg3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/supertypeInitialization/vararg3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/supertypeInitialization/vararg3.kt"); } } @@ -10469,6 +9730,10 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Suppress extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuppress() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @@ -10477,104 +9742,92 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotationPosition extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotationPosition() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/annotationPosition"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("paramWithModifier.kt") public void testParamWithModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/paramWithModifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/paramWithModifier.kt"); } @TestMetadata("topLevelFunctionModifierOnThePreviousLine.kt") public void testTopLevelFunctionModifierOnThePreviousLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionModifierOnThePreviousLine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionModifierOnThePreviousLine.kt"); } @TestMetadata("topLevelFunctionModifierOnTheSameLine.kt") public void testTopLevelFunctionModifierOnTheSameLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionModifierOnTheSameLine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionModifierOnTheSameLine.kt"); } @TestMetadata("topLevelFunctionNoModifiers.kt") public void testTopLevelFunctionNoModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionNoModifiers.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionNoModifiers.kt"); } @TestMetadata("topLevelFunctionSuppressAnotherPreviousLine.kt") public void testTopLevelFunctionSuppressAnotherPreviousLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressAnotherPreviousLine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressAnotherPreviousLine.kt"); } @TestMetadata("topLevelFunctionSuppressEmptyArgsPreviousLine.kt") public void testTopLevelFunctionSuppressEmptyArgsPreviousLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressEmptyArgsPreviousLine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressEmptyArgsPreviousLine.kt"); } @TestMetadata("topLevelFunctionSuppressNoArgsPreviousLine.kt") public void testTopLevelFunctionSuppressNoArgsPreviousLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsPreviousLine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsPreviousLine.kt"); } @TestMetadata("topLevelFunctionSuppressNoArgsPreviousLineBare.kt") public void testTopLevelFunctionSuppressNoArgsPreviousLineBare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsPreviousLineBare.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsPreviousLineBare.kt"); } @TestMetadata("topLevelFunctionSuppressNoArgsTheSameLine.kt") public void testTopLevelFunctionSuppressNoArgsTheSameLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsTheSameLine.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsTheSameLine.kt"); } @TestMetadata("topLevelFunctionSuppressNoArgsTheSameLineBare.kt") public void testTopLevelFunctionSuppressNoArgsTheSameLineBare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsTheSameLineBare.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressNoArgsTheSameLineBare.kt"); } @TestMetadata("topLevelFunctionSuppressOnFile.kt") public void testTopLevelFunctionSuppressOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFile.kt"); } @TestMetadata("topLevelFunctionSuppressOnFileOtherAnnotation.kt") public void testTopLevelFunctionSuppressOnFileOtherAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFileOtherAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFileOtherAnnotation.kt"); } @TestMetadata("topLevelFunctionSuppressOnFileWithPackage.kt") public void testTopLevelFunctionSuppressOnFileWithPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFileWithPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFileWithPackage.kt"); } @TestMetadata("topLevelFunctionSuppressOnFileWithSuppress.kt") public void testTopLevelFunctionSuppressOnFileWithSuppress() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFileWithSuppress.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionSuppressOnFileWithSuppress.kt"); } @TestMetadata("topLevelFunctionUnrelatedAnnotation.kt") public void testTopLevelFunctionUnrelatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotation.kt"); } @TestMetadata("topLevelFunctionUnrelatedAnnotationBare.kt") public void testTopLevelFunctionUnrelatedAnnotationBare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotationBare.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/annotationPosition/topLevelFunctionUnrelatedAnnotationBare.kt"); } } @@ -10582,68 +9835,62 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Availability extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAvailability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/availability"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localFunSuppressForLocal.kt") public void testLocalFunSuppressForLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/localFunSuppressForLocal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/localFunSuppressForLocal.kt"); } @TestMetadata("localFunSuppressForOuter.kt") public void testLocalFunSuppressForOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/localFunSuppressForOuter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/localFunSuppressForOuter.kt"); } @TestMetadata("localValSuppressForFun.kt") public void testLocalValSuppressForFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/localValSuppressForFun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/localValSuppressForFun.kt"); } @TestMetadata("localValSuppressForVal.kt") public void testLocalValSuppressForVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/localValSuppressForVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/localValSuppressForVal.kt"); } @TestMetadata("memberOfNestedSuppressForMember.kt") public void testMemberOfNestedSuppressForMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/memberOfNestedSuppressForMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/memberOfNestedSuppressForMember.kt"); } @TestMetadata("memberOfNestedSuppressForNested.kt") public void testMemberOfNestedSuppressForNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/memberOfNestedSuppressForNested.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/memberOfNestedSuppressForNested.kt"); } @TestMetadata("memberOfNestedSuppressForOuter.kt") public void testMemberOfNestedSuppressForOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/memberOfNestedSuppressForOuter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/memberOfNestedSuppressForOuter.kt"); } @TestMetadata("memberSuppressForClass.kt") public void testMemberSuppressForClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/memberSuppressForClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/memberSuppressForClass.kt"); } @TestMetadata("memberSuppressForMember.kt") public void testMemberSuppressForMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/memberSuppressForMember.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/memberSuppressForMember.kt"); } @TestMetadata("topLevelFunctionAlreadySuppressed.kt") public void testTopLevelFunctionAlreadySuppressed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/availability/topLevelFunctionAlreadySuppressed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/availability/topLevelFunctionAlreadySuppressed.kt"); } } @@ -10651,80 +9898,72 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationKinds extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationKinds() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/declarationKinds"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/class.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/classObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/classObject.kt"); } @TestMetadata("enumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/enumEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/enumEntry.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/fun.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/fun.kt"); } @TestMetadata("multiVal.kt") public void testMultiVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/multiVal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/multiVal.kt"); } @TestMetadata("multiVar.kt") public void testMultiVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/multiVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/multiVar.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/object.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/object.kt"); } @TestMetadata("param.kt") public void testParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/param.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/param.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/secondaryConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/secondaryConstructor.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/trait.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/trait.kt"); } @TestMetadata("val.kt") public void testVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/val.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/val.kt"); } @TestMetadata("var.kt") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/declarationKinds/var.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/declarationKinds/var.kt"); } } @@ -10732,20 +9971,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ErrorRecovery extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInErrorRecovery() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/errorRecovery"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonStringInSuppress.kt") public void testNonStringInSuppress() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/errorRecovery/nonStringInSuppress.kt"); } @TestMetadata("unresolvedAnnotation.kt") public void testUnresolvedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/errorRecovery/unresolvedAnnotation.kt"); } } @@ -10753,310 +9994,269 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForStatement extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("andAnd.kt") public void testAndAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/andAnd.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/andAnd.kt"); } @TestMetadata("annotatedExpr.kt") public void testAnnotatedExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/annotatedExpr.kt"); } @TestMetadata("annotatedExprWithSuppress.kt") public void testAnnotatedExprWithSuppress() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/annotatedExprWithSuppress.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/annotatedExprWithSuppress.kt"); } @TestMetadata("arrayRead.kt") public void testArrayRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/arrayRead.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/arrayRead.kt"); } @TestMetadata("as.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/as.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/as.kt"); } @TestMetadata("asSafe.kt") public void testAsSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/asSafe.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/asSafe.kt"); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/assign.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/assign.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/call.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/call.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/doWhile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/doWhile.kt"); } @TestMetadata("dotQualified.kt") public void testDotQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/dotQualified.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/dotQualified.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/elvis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/elvis.kt"); } @TestMetadata("eqEq.kt") public void testEqEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/eqEq.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/eqEq.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/for.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/for.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/if.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/if.kt"); } @TestMetadata("in.kt") public void testIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/in.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/in.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/infix.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/infix.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/is.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/is.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/labeled.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/labeled.kt"); } @TestMetadata("less.kt") public void testLess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/less.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/less.kt"); } @TestMetadata("mul.kt") public void testMul() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/mul.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/mul.kt"); } @TestMetadata("orOr.kt") public void testOrOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/orOr.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/orOr.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/parenthesized.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/parenthesized.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/plus.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/plus.kt"); } @TestMetadata("postfix.kt") public void testPostfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/postfix.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/postfix.kt"); } @TestMetadata("postfixPlusPlus.kt") public void testPostfixPlusPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/postfixPlusPlus.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/postfixPlusPlus.kt"); } @TestMetadata("prefixPlusPlus.kt") public void testPrefixPlusPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/prefixPlusPlus.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/prefixPlusPlus.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/range.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/range.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/return.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/return.kt"); } @TestMetadata("safeQualified.kt") public void testSafeQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/safeQualified.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/safeQualified.kt"); } @TestMetadata("simpleName.kt") public void testSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/simpleName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/simpleName.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/stringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/stringTemplate.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/throw.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/throw.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/try.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/try.kt"); } @TestMetadata("whenExpressionEntry.kt") public void testWhenExpressionEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/whenExpressionEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/whenExpressionEntry.kt"); } @TestMetadata("whenInEntry.kt") public void testWhenInEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/whenInEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/whenInEntry.kt"); } @TestMetadata("whenIsEntry.kt") public void testWhenIsEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/whenIsEntry.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/whenIsEntry.kt"); } @TestMetadata("whenSubject.kt") public void testWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/whenSubject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/whenSubject.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/while.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/while.kt"); } @TestMetadata("idea/testData/quickfix/suppress/forStatement/unavailable") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unavailable extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnavailable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/forStatement/unavailable"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inAnnotationArgument.kt") public void testInAnnotationArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inAnnotationArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inAnnotationArgument.kt"); } @TestMetadata("inClassHeader.kt") public void testInClassHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inClassHeader.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inClassHeader.kt"); } @TestMetadata("inDefaultArgument.kt") public void testInDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inDefaultArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inDefaultArgument.kt"); } @TestMetadata("inExpressionBody.kt") public void testInExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inExpressionBody.kt"); } @TestMetadata("inLocalValInitializer.kt") public void testInLocalValInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inLocalValInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inLocalValInitializer.kt"); } @TestMetadata("inParameterType.kt") public void testInParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inParameterType.kt"); } @TestMetadata("inParameterTypeInFunctionLiteral.kt") public void testInParameterTypeInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inParameterTypeInFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inParameterTypeInFunctionLiteral.kt"); } @TestMetadata("inPropertyInitializer.kt") public void testInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/inPropertyInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/inPropertyInitializer.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/objectLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/objectLiteral.kt"); } @TestMetadata("objectLiteralInsideExpression.kt") public void testObjectLiteralInsideExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/objectLiteralInsideExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/objectLiteralInsideExpression.kt"); } @TestMetadata("supretype.kt") public void testSupretype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/forStatement/unavailable/supretype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/forStatement/unavailable/supretype.kt"); } } } @@ -11065,20 +10265,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inspections extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInspections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/suppress/inspections"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ifNullToElvis.kt") public void testIfNullToElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/inspections/ifNullToElvis.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/inspections/ifNullToElvis.kt"); } @TestMetadata("unusedImports.kt") public void testUnusedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/suppress/inspections/unusedImports.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/suppress/inspections/unusedImports.kt"); } } } @@ -11087,32 +10289,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SurroundWithArrayOfForNamedArgumentsToVarargs extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSurroundWithArrayOfForNamedArgumentsToVarargs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("replaceForVarargOfAny.kt") public void testReplaceForVarargOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/replaceForVarargOfAny.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/replaceForVarargOfAny.kt"); } @TestMetadata("replaceToArrayOfPrimitiveTypes.kt") public void testReplaceToArrayOfPrimitiveTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/replaceToArrayOfPrimitiveTypes.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/replaceToArrayOfPrimitiveTypes.kt"); } @TestMetadata("simpleNamedArgumentToVararg.kt") public void testSimpleNamedArgumentToVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/simpleNamedArgumentToVararg.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/simpleNamedArgumentToVararg.kt"); } @TestMetadata("surroundWithSpreadForConstructorCall.kt") public void testSurroundWithSpreadForConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/surroundWithSpreadForConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithArrayOfForNamedArgumentsToVarargs/surroundWithSpreadForConstructorCall.kt"); } } @@ -11120,122 +10322,107 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SurroundWithNullCheck extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSurroundWithNullCheck() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/surroundWithNullCheck"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentNullable.kt") public void testArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/argumentNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/argumentNullable.kt"); } @TestMetadata("chainedUnsafeCall.kt") public void testChainedUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/chainedUnsafeCall.kt"); } @TestMetadata("expressionUnsafeCall.kt") public void testExpressionUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/expressionUnsafeCall.kt"); } @TestMetadata("infixUnsafeCall.kt") public void testInfixUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/infixUnsafeCall.kt"); } @TestMetadata("invokeFuncUnsafe.kt") public void testInvokeFuncUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/invokeFuncUnsafe.kt"); } @TestMetadata("invokeUnsafe.kt") public void testInvokeUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/invokeUnsafe.kt"); } @TestMetadata("iteratorUnsafe.kt") public void testIteratorUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/iteratorUnsafe.kt"); } @TestMetadata("nullableInCondition.kt") public void testNullableInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/nullableInCondition.kt"); } @TestMetadata("objectNestedQualifiers.kt") public void testObjectNestedQualifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/objectNestedQualifiers.kt"); } @TestMetadata("objectQualifier.kt") public void testObjectQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/objectQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/objectQualifier.kt"); } @TestMetadata("simpleUnsafeCall.kt") public void testSimpleUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/simpleUnsafeCall.kt"); } @TestMetadata("unsafeCallInBinary.kt") public void testUnsafeCallInBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInBinary.kt"); } @TestMetadata("unsafeCallInDeclaration.kt") public void testUnsafeCallInDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInDeclaration.kt"); } @TestMetadata("unsafeCallInGetter.kt") public void testUnsafeCallInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInGetter.kt"); } @TestMetadata("unsafeCallInsideAnonymous.kt") public void testUnsafeCallInsideAnonymous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideAnonymous.kt"); } @TestMetadata("unsafeCallInsideIf.kt") public void testUnsafeCallInsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideIf.kt"); } @TestMetadata("unsafeCallInsideWhen.kt") public void testUnsafeCallInsideWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhen.kt"); } @TestMetadata("unsafeCallInsideWhile.kt") public void testUnsafeCallInsideWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unsafeCallInsideWhile.kt"); } @TestMetadata("unstableValue.kt") public void testUnstableValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/surroundWithNullCheck/unstableValue.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/surroundWithNullCheck/unstableValue.kt"); } } @@ -11243,32 +10430,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToString extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/toString"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notNullableExpectedNullable.kt") public void testNotNullableExpectedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/toString/notNullableExpectedNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/toString/notNullableExpectedNullable.kt"); } @TestMetadata("nullableExpectedNotNullable.kt") public void testNullableExpectedNotNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/toString/nullableExpectedNotNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/toString/nullableExpectedNotNullable.kt"); } @TestMetadata("nullableExpectedNullable.kt") public void testNullableExpectedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/toString/nullableExpectedNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/toString/nullableExpectedNullable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/toString/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/toString/simple.kt"); } } @@ -11276,32 +10463,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TooLongCharLiteralToString extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTooLongCharLiteralToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/tooLongCharLiteralToString"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("backslashShouldNotBeEscaped.kt") public void testBackslashShouldNotBeEscaped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/tooLongCharLiteralToString/backslashShouldNotBeEscaped.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/tooLongCharLiteralToString/backslashShouldNotBeEscaped.kt"); } @TestMetadata("dollarShouldNotBeEscaped.kt") public void testDollarShouldNotBeEscaped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/tooLongCharLiteralToString/dollarShouldNotBeEscaped.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/tooLongCharLiteralToString/dollarShouldNotBeEscaped.kt"); } @TestMetadata("doubleQuotesShouldBeEscaped.kt") public void testDoubleQuotesShouldBeEscaped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/tooLongCharLiteralToString/doubleQuotesShouldBeEscaped.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/tooLongCharLiteralToString/doubleQuotesShouldBeEscaped.kt"); } @TestMetadata("ecapedDoubleQuotesShouldNotBeEscaped.kt") public void testEcapedDoubleQuotesShouldNotBeEscaped() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/tooLongCharLiteralToString/ecapedDoubleQuotesShouldNotBeEscaped.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/tooLongCharLiteralToString/ecapedDoubleQuotesShouldNotBeEscaped.kt"); } } @@ -11309,122 +10496,107 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeAddition extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeAddition() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeAddition"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ambiguousFunctionReturnType.kt") public void testAmbiguousFunctionReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/ambiguousFunctionReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/ambiguousFunctionReturnType.kt"); } @TestMetadata("ambiguousPropertyReturnType.kt") public void testAmbiguousPropertyReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/ambiguousPropertyReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/ambiguousPropertyReturnType.kt"); } @TestMetadata("changeAccessorTypeToFunctionType.kt") public void testChangeAccessorTypeToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/changeAccessorTypeToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/changeAccessorTypeToFunctionType.kt"); } @TestMetadata("noAddErrorType.kt") public void testNoAddErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/noAddErrorType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/noAddErrorType.kt"); } @TestMetadata("propertyHasType.kt") public void testPropertyHasType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/propertyHasType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/propertyHasType.kt"); } @TestMetadata("propertyWithGetterWithBlockBody.kt") public void testPropertyWithGetterWithBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/propertyWithGetterWithBlockBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/propertyWithGetterWithBlockBody.kt"); } @TestMetadata("propertyWithGetterWithInferredType.kt") public void testPropertyWithGetterWithInferredType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/propertyWithGetterWithInferredType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/propertyWithGetterWithInferredType.kt"); } @TestMetadata("propertyWithGetterWithoutType.kt") public void testPropertyWithGetterWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/propertyWithGetterWithoutType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/propertyWithGetterWithoutType.kt"); } @TestMetadata("propertyWithRecursiveGetter.kt") public void testPropertyWithRecursiveGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/propertyWithRecursiveGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/propertyWithRecursiveGetter.kt"); } @TestMetadata("propertyWithSetterWithoutType.kt") public void testPropertyWithSetterWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/propertyWithSetterWithoutType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/propertyWithSetterWithoutType.kt"); } @TestMetadata("protectedFunWithoutReturnType.kt") public void testProtectedFunWithoutReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/protectedFunWithoutReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/protectedFunWithoutReturnType.kt"); } @TestMetadata("publicFunWithoutBody.kt") public void testPublicFunWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/publicFunWithoutBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/publicFunWithoutBody.kt"); } @TestMetadata("publicFunWithoutReturnType.kt") public void testPublicFunWithoutReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/publicFunWithoutReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/publicFunWithoutReturnType.kt"); } @TestMetadata("publicFunWithoutReturnTypeCaretOnParameter.kt") public void testPublicFunWithoutReturnTypeCaretOnParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/publicFunWithoutReturnTypeCaretOnParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/publicFunWithoutReturnTypeCaretOnParameter.kt"); } @TestMetadata("publicValWithoutReturnType.kt") public void testPublicValWithoutReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/publicValWithoutReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/publicValWithoutReturnType.kt"); } @TestMetadata("publicValWithoutReturnTypeCaretOnPublic.kt") public void testPublicValWithoutReturnTypeCaretOnPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/publicValWithoutReturnTypeCaretOnPublic.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/publicValWithoutReturnTypeCaretOnPublic.kt"); } @TestMetadata("wrongGetterParameterType.kt") public void testWrongGetterParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/wrongGetterParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/wrongGetterParameterType.kt"); } @TestMetadata("wrongGetterParameterTypeLongNameRuntime.kt") public void testWrongGetterParameterTypeLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/wrongGetterParameterTypeLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/wrongGetterParameterTypeLongNameRuntime.kt"); } @TestMetadata("wrongSetterParameterType.kt") public void testWrongSetterParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeAddition/wrongSetterParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeAddition/wrongSetterParameterType.kt"); } } @@ -11432,38 +10604,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeImports extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeImports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("hasThisImport.kt") public void testHasThisImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/hasThisImport.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeImports/hasThisImport.kt"); } @TestMetadata("noImportFromTheSameFile.kt") public void testNoImportFromTheSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/noImportFromTheSameFile.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeImports/noImportFromTheSameFile.kt"); } @TestMetadata("noImportJavaLang.kt") public void testNoImportJavaLang() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/noImportJavaLang.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeImports/noImportJavaLang.kt"); } @TestMetadata("noImportJetStandard.kt") public void testNoImportJetStandard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/noImportJetStandard.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeImports/noImportJetStandard.kt"); } @TestMetadata("toImport1.kt") public void testToImport1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeImports/toImport1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeImports/toImport1.kt"); } } @@ -11471,14 +10642,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeInferenceExpectedTypeMismatch extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeInferenceExpectedTypeMismatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeInferenceExpectedTypeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("convertClassToKClass1Runtime.kt") public void testConvertClassToKClass1Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt"); } } @@ -11486,64 +10660,58 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatch extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessibleLocalClassInReturn.kt") public void testAccessibleLocalClassInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/accessibleLocalClassInReturn.kt"); } @TestMetadata("addArrayOfType.kt") public void testAddArrayOfType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addArrayOfType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addArrayOfType.kt"); } @TestMetadata("addArrayOfTypeForNamedParameter.kt") public void testAddArrayOfTypeForNamedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addArrayOfTypeForNamedParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addArrayOfTypeForNamedParameter.kt"); } @TestMetadata("addExclExclToQualifiedArgument.kt") public void testAddExclExclToQualifiedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addExclExclToQualifiedArgument.kt"); } @TestMetadata("addExclExclToRemoveNullability.kt") public void testAddExclExclToRemoveNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullability.kt"); } @TestMetadata("addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt") public void testAddExclExclToRemoveNullabilityDisabledWhenItCannotHelp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityDisabledWhenItCannotHelp.kt"); } @TestMetadata("addExclExclToRemoveNullabilityForGeneric.kt") public void testAddExclExclToRemoveNullabilityForGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForGeneric.kt"); } @TestMetadata("addExclExclToRemoveNullabilityForSubclass.kt") public void testAddExclExclToRemoveNullabilityForSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addExclExclToRemoveNullabilityForSubclass.kt"); } @TestMetadata("addExclExclWhenSmartCastImpossible.kt") public void testAddExclExclWhenSmartCastImpossible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addExclExclWhenSmartCastImpossible.kt"); } @TestMetadata("addIntArrayOf.kt") public void testAddIntArrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/addIntArrayOf.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/addIntArrayOf.kt"); } public void testAllFilesPresentInTypeMismatch() throws Exception { @@ -11552,394 +10720,334 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("anonymousObjectInCall.kt") public void testAnonymousObjectInCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/anonymousObjectInCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/anonymousObjectInCall.kt"); } @TestMetadata("anonymousObjectInInfixCall.kt") public void testAnonymousObjectInInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/anonymousObjectInInfixCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/anonymousObjectInInfixCall.kt"); } @TestMetadata("anonymousObjectInInitializer.kt") public void testAnonymousObjectInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/anonymousObjectInInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/anonymousObjectInInitializer.kt"); } @TestMetadata("anonymousObjectInReturn.kt") public void testAnonymousObjectInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/anonymousObjectInReturn.kt"); } @TestMetadata("anyInReturn.kt") public void testAnyInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/anyInReturn.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/anyInReturn.kt"); } @TestMetadata("changeFunctionLiteralParameterTypeToFunctionType.kt") public void testChangeFunctionLiteralParameterTypeToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeFunctionLiteralParameterTypeToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeFunctionLiteralParameterTypeToFunctionType.kt"); } @TestMetadata("changeFunctionLiteralParameterTypeToFunctionTypeLongNameRuntime.kt") public void testChangeFunctionLiteralParameterTypeToFunctionTypeLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeFunctionLiteralParameterTypeToFunctionTypeLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeFunctionLiteralParameterTypeToFunctionTypeLongNameRuntime.kt"); } @TestMetadata("changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt") public void testChangeFunctionReturnTypeToMatchExpectedTypeOfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCall.kt"); } @TestMetadata("changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt") public void testChangeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeFunctionReturnTypeToMatchExpectedTypeOfCallLongNameRuntime.kt"); } @TestMetadata("changeReturnTypeForTypeInference.kt") public void testChangeReturnTypeForTypeInference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeForTypeInference.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeForTypeInference.kt"); } @TestMetadata("changeReturnTypeForTypeMismatch.kt") public void testChangeReturnTypeForTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeForTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeForTypeMismatch.kt"); } @TestMetadata("changeReturnTypeNoFqNameForAnonymousObject.kt") public void testChangeReturnTypeNoFqNameForAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForAnonymousObject.kt"); } @TestMetadata("changeReturnTypeNoFqNameForCompanionObject.kt") public void testChangeReturnTypeNoFqNameForCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForCompanionObject.kt"); } @TestMetadata("changeReturnTypeNoFqNameForLocalClass.kt") public void testChangeReturnTypeNoFqNameForLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForLocalClass.kt"); } @TestMetadata("changeReturnTypeNoFqNameForNestedClass.kt") public void testChangeReturnTypeNoFqNameForNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForNestedClass.kt"); } @TestMetadata("changeReturnTypeNoFqNameForTopLevelClass.kt") public void testChangeReturnTypeNoFqNameForTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeNoFqNameForTopLevelClass.kt"); } @TestMetadata("changeReturnTypeToSpecificNullable.kt") public void testChangeReturnTypeToSpecificNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeToSpecificNullable.kt"); } @TestMetadata("changeReturnTypeWhenFunctionNameIsMissing.kt") public void testChangeReturnTypeWhenFunctionNameIsMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeWhenFunctionNameIsMissing.kt"); } @TestMetadata("changeReturnTypeWhenValueParameterListIsAbsent.kt") public void testChangeReturnTypeWhenValueParameterListIsAbsent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/changeReturnTypeWhenValueParameterListIsAbsent.kt"); } @TestMetadata("compareToTypeMismatch.kt") public void testCompareToTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/compareToTypeMismatch.kt"); } @TestMetadata("constantTypeMismatch.kt") public void testConstantTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/constantTypeMismatch.kt"); } @TestMetadata("dontChangeOverriddenPropertyTypeToErrorType.kt") public void testDontChangeOverriddenPropertyTypeToErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/dontChangeOverriddenPropertyTypeToErrorType.kt"); } @TestMetadata("expectedParameterTypeMismatch.kt") public void testExpectedParameterTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/expectedParameterTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/expectedParameterTypeMismatch.kt"); } @TestMetadata("expectedParameterTypeMismatchLongNameRuntime.kt") public void testExpectedParameterTypeMismatchLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/expectedParameterTypeMismatchLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/expectedParameterTypeMismatchLongNameRuntime.kt"); } @TestMetadata("hasNextFunctionReturnTypeMismatch.kt") public void testHasNextFunctionReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/hasNextFunctionReturnTypeMismatch.kt"); } @TestMetadata("intToShortTypeMismatch.kt") public void testIntToShortTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/intToShortTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/intToShortTypeMismatch.kt"); } @TestMetadata("kt17404.kt") public void testKt17404() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/kt17404.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/kt17404.kt"); } @TestMetadata("letClassImplementAdditionalInterface.kt") public void testLetClassImplementAdditionalInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementAdditionalInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementAdditionalInterface.kt"); } @TestMetadata("letClassImplementGenericInterface.kt") public void testLetClassImplementGenericInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementGenericInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementGenericInterface.kt"); } @TestMetadata("letClassImplementGenericInterfaceTwice.kt") public void testLetClassImplementGenericInterfaceTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementGenericInterfaceTwice.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementGenericInterfaceTwice.kt"); } @TestMetadata("letClassImplementGenericStarInterface.kt") public void testLetClassImplementGenericStarInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementGenericStarInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementGenericStarInterface.kt"); } @TestMetadata("letClassImplementIndirectlyInheritedInterface.kt") public void testLetClassImplementIndirectlyInheritedInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementIndirectlyInheritedInterface.kt"); } @TestMetadata("letClassImplementInterface.kt") public void testLetClassImplementInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementInterface.kt"); } @TestMetadata("letClassImplementInterfaceNullable.kt") public void testLetClassImplementInterfaceNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letClassImplementInterfaceNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letClassImplementInterfaceNullable.kt"); } @TestMetadata("letInterfaceExtendInterface.kt") public void testLetInterfaceExtendInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letInterfaceExtendInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letInterfaceExtendInterface.kt"); } @TestMetadata("letObjectImplementAdditionalInterface.kt") public void testLetObjectImplementAdditionalInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letObjectImplementAdditionalInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letObjectImplementAdditionalInterface.kt"); } @TestMetadata("letObjectLiteralImplementInterface.kt") public void testLetObjectLiteralImplementInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letObjectLiteralImplementInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letObjectLiteralImplementInterface.kt"); } @TestMetadata("letStringImplementInterface.kt") public void testLetStringImplementInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/letStringImplementInterface.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/letStringImplementInterface.kt"); } @TestMetadata("localClassInReturn1.kt") public void testLocalClassInReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/localClassInReturn1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/localClassInReturn1.kt"); } @TestMetadata("localClassInReturn2.kt") public void testLocalClassInReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/localClassInReturn2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/localClassInReturn2.kt"); } @TestMetadata("longToDoubleTypeMismatch.kt") public void testLongToDoubleTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/longToDoubleTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/longToDoubleTypeMismatch.kt"); } @TestMetadata("longToIntTypeMismatch.kt") public void testLongToIntTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/longToIntTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/longToIntTypeMismatch.kt"); } @TestMetadata("makeReturnTypeNullable.kt") public void testMakeReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/makeReturnTypeNullable.kt"); } @TestMetadata("noReturnInFunctionWithBlockBody.kt") public void testNoReturnInFunctionWithBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/noReturnInFunctionWithBlockBody.kt"); } @TestMetadata("nullArgumentForNonNullParameter.kt") public void testNullArgumentForNonNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/nullArgumentForNonNullParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/nullArgumentForNonNullParameter.kt"); } @TestMetadata("parameterDefaultValue.kt") public void testParameterDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterDefaultValue.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterDefaultValue.kt"); } @TestMetadata("propertyTypeMismatch.kt") public void testPropertyTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/propertyTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/propertyTypeMismatch.kt"); } @TestMetadata("propertyTypeMismatchLongNameRuntime.kt") public void testPropertyTypeMismatchLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt"); } @TestMetadata("resolvableTypeParams.kt") public void testResolvableTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/resolvableTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/resolvableTypeParams.kt"); } @TestMetadata("returnTypeMismatch.kt") public void testReturnTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/returnTypeMismatch.kt"); } @TestMetadata("shortToByteTypeMismatch.kt") public void testShortToByteTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/shortToByteTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/shortToByteTypeMismatch.kt"); } @TestMetadata("tooManyArgumentsException.kt") public void testTooManyArgumentsException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/tooManyArgumentsException.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/tooManyArgumentsException.kt"); } @TestMetadata("unresolvableTypeParams.kt") public void testUnresolvableTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/unresolvableTypeParams.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/unresolvableTypeParams.kt"); } @TestMetadata("idea/testData/quickfix/typeMismatch/casts") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/casts"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("castQualifiedArgument.kt") public void testCastQualifiedArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/castQualifiedArgument.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/castQualifiedArgument.kt"); } @TestMetadata("castToFunctionType.kt") public void testCastToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/castToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/castToFunctionType.kt"); } @TestMetadata("preferExclExcl.kt") public void testPreferExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/preferExclExcl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/preferExclExcl.kt"); } @TestMetadata("smartcastImpossible1.kt") public void testSmartcastImpossible1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/smartcastImpossible1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/smartcastImpossible1.kt"); } @TestMetadata("smartcastImpossible2.kt") public void testSmartcastImpossible2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/smartcastImpossible2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/smartcastImpossible2.kt"); } @TestMetadata("smartcastImpossible3.kt") public void testSmartcastImpossible3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt"); } @TestMetadata("typeMismatch1.kt") public void testTypeMismatch1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/typeMismatch1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/typeMismatch1.kt"); } @TestMetadata("typeMismatch2.kt") public void testTypeMismatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/typeMismatch2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/typeMismatch2.kt"); } @TestMetadata("typeMismatch3.kt") public void testTypeMismatch3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/typeMismatch3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/typeMismatch3.kt"); } @TestMetadata("typeMismatch4.kt") public void testTypeMismatch4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/typeMismatch4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/typeMismatch4.kt"); } @TestMetadata("typeMismatchLongNameRuntime.kt") public void testTypeMismatchLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/casts/typeMismatchLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/casts/typeMismatchLongNameRuntime.kt"); } } @@ -11947,44 +11055,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ComponentFunctionReturnTypeMismatch extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComponentFunctionReturnTypeMismatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("componentFunctionReturnTypeMismatch1.kt") public void testComponentFunctionReturnTypeMismatch1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch1.kt"); } @TestMetadata("componentFunctionReturnTypeMismatch2.kt") public void testComponentFunctionReturnTypeMismatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch2.kt"); } @TestMetadata("componentFunctionReturnTypeMismatch3.kt") public void testComponentFunctionReturnTypeMismatch3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch3.kt"); } @TestMetadata("componentFunctionReturnTypeMismatch4.kt") public void testComponentFunctionReturnTypeMismatch4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch4.kt"); } @TestMetadata("componentFunctionReturnTypeMismatch5.kt") public void testComponentFunctionReturnTypeMismatch5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch5.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/componentFunctionReturnTypeMismatch5.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/dataClass.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/componentFunctionReturnTypeMismatch/dataClass.kt"); } } @@ -11992,74 +11098,67 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertCollection extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertCollection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/convertCollection"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayToCollection.kt") public void testArrayToCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/arrayToCollection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/arrayToCollection.kt"); } @TestMetadata("arrayToIterable.kt") public void testArrayToIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/arrayToIterable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/arrayToIterable.kt"); } @TestMetadata("arrayToList.kt") public void testArrayToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/arrayToList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/arrayToList.kt"); } @TestMetadata("arrayToSequence.kt") public void testArrayToSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/arrayToSequence.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/arrayToSequence.kt"); } @TestMetadata("iterableToArray.kt") public void testIterableToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/iterableToArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/iterableToArray.kt"); } @TestMetadata("listToArray.kt") public void testListToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/listToArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/listToArray.kt"); } @TestMetadata("listToArrayBinary.kt") public void testListToArrayBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/listToArrayBinary.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/listToArrayBinary.kt"); } @TestMetadata("listToMutableList.kt") public void testListToMutableList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/listToMutableList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/listToMutableList.kt"); } @TestMetadata("listToSequence.kt") public void testListToSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/listToSequence.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/listToSequence.kt"); } @TestMetadata("sequenceToArray.kt") public void testSequenceToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/sequenceToArray.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/sequenceToArray.kt"); } @TestMetadata("sequenceToList.kt") public void testSequenceToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/convertCollection/sequenceToList.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/convertCollection/sequenceToList.kt"); } } @@ -12067,26 +11166,40 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FixOverloadedOperator extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFixOverloadedOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/fixOverloadedOperator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeNotFunctionReturnType.kt") public void testChangeNotFunctionReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeNotFunctionReturnType.kt"); } @TestMetadata("changePlusFunctionReturnType.kt") public void testChangePlusFunctionReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changePlusFunctionReturnType.kt"); } @TestMetadata("changeTimesFunctionParameterType.kt") public void testChangeTimesFunctionParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeTimesFunctionParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/fixOverloadedOperator/changeTimesFunctionParameterType.kt"); + } + } + + @TestMetadata("idea/testData/quickfix/typeMismatch/genericVarianceViolation") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class GenericVarianceViolation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInGenericVarianceViolation() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/genericVarianceViolation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } } @@ -12094,20 +11207,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NumberConversion extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNumberConversion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/numberConversion"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("convertBinaryExpression.kt") public void testConvertBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/numberConversion/convertBinaryExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/numberConversion/convertBinaryExpression.kt"); } @TestMetadata("convertExpression.kt") public void testConvertExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/numberConversion/convertExpression.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/numberConversion/convertExpression.kt"); } } @@ -12115,50 +11230,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParameterTypeMismatch extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameterTypeMismatch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/parameterTypeMismatch"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("changeFunctionParameterType1.kt") public void testChangeFunctionParameterType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType1.kt"); } @TestMetadata("changeFunctionParameterType2.kt") public void testChangeFunctionParameterType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType2.kt"); } @TestMetadata("changeFunctionParameterType3.kt") public void testChangeFunctionParameterType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType3.kt"); } @TestMetadata("changeFunctionParameterType4.kt") public void testChangeFunctionParameterType4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeFunctionParameterType4.kt"); } @TestMetadata("changeParameterTypeLongNameRuntime.kt") public void testChangeParameterTypeLongNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeParameterTypeLongNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changeParameterTypeLongNameRuntime.kt"); } @TestMetadata("changePrimaryConstructorParameterType.kt") public void testChangePrimaryConstructorParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changePrimaryConstructorParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/changePrimaryConstructorParameterType.kt"); } @TestMetadata("multiFakeOverride.kt") public void testMultiFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/multiFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/parameterTypeMismatch/multiFakeOverride.kt"); } } @@ -12166,104 +11278,92 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMismatchOnReturnedExpression extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeMismatchOnReturnedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("assignmentTypeMismatch.kt") public void testAssignmentTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/assignmentTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/assignmentTypeMismatch.kt"); } @TestMetadata("changeFunctionReturnTypeToFunctionType.kt") public void testChangeFunctionReturnTypeToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToFunctionType.kt"); } @TestMetadata("changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt") public void testChangeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/changeFunctionReturnTypeToMatchReturnTypeOfReturnedLiteral.kt"); } @TestMetadata("dontChangeFunctionReturnTypeToErrorType.kt") public void testDontChangeFunctionReturnTypeToErrorType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/dontChangeFunctionReturnTypeToErrorType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/dontChangeFunctionReturnTypeToErrorType.kt"); } @TestMetadata("literalPropertyWithGetter.kt") public void testLiteralPropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/literalPropertyWithGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/literalPropertyWithGetter.kt"); } @TestMetadata("multiFakeOverride.kt") public void testMultiFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverride.kt"); } @TestMetadata("multiFakeOverrideForOperatorConvention.kt") public void testMultiFakeOverrideForOperatorConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverrideForOperatorConvention.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/multiFakeOverrideForOperatorConvention.kt"); } @TestMetadata("nonLocalReturnRuntime.kt") public void testNonLocalReturnRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt"); } @TestMetadata("nonLocalReturnWithLabelRuntime.kt") public void testNonLocalReturnWithLabelRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt"); } @TestMetadata("notApplicableToConstructor.kt") public void testNotApplicableToConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/notApplicableToConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/notApplicableToConstructor.kt"); } @TestMetadata("propertyGetterInitializerTypeMismatch.kt") public void testPropertyGetterInitializerTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt"); } @TestMetadata("returnedExpressionTypeMismatchFunctionParameterType.kt") public void testReturnedExpressionTypeMismatchFunctionParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/returnedExpressionTypeMismatchFunctionParameterType.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/returnedExpressionTypeMismatchFunctionParameterType.kt"); } @TestMetadata("typeMismatchInIfStatementReturnedByFunction.kt") public void testTypeMismatchInIfStatementReturnedByFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByFunction.kt"); } @TestMetadata("typeMismatchInIfStatementReturnedByLiteral.kt") public void testTypeMismatchInIfStatementReturnedByLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByLiteral.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInIfStatementReturnedByLiteral.kt"); } @TestMetadata("typeMismatchInInitializer.kt") public void testTypeMismatchInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInInitializer.kt"); } @TestMetadata("typeMismatchInReturnStatement.kt") public void testTypeMismatchInReturnStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/typeMismatchInReturnStatement.kt"); } } @@ -12271,80 +11371,72 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WrongPrimitive extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWrongPrimitive() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeMismatch/wrongPrimitive"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("doubleToIntDecimalPlaces.kt") public void testDoubleToIntDecimalPlaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/doubleToIntDecimalPlaces.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/doubleToIntDecimalPlaces.kt"); } @TestMetadata("doubleToLongNotInRange.kt") public void testDoubleToLongNotInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/doubleToLongNotInRange.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/doubleToLongNotInRange.kt"); } @TestMetadata("doubleToShortNotInRange.kt") public void testDoubleToShortNotInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/doubleToShortNotInRange.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/doubleToShortNotInRange.kt"); } @TestMetadata("floatToDoubleWithDecimal.kt") public void testFloatToDoubleWithDecimal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToDoubleWithDecimal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToDoubleWithDecimal.kt"); } @TestMetadata("floatToInt.kt") public void testFloatToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToInt.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToInt.kt"); } @TestMetadata("floatToInt2.kt") public void testFloatToInt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToInt2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToInt2.kt"); } @TestMetadata("floatToLong.kt") public void testFloatToLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToLong.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/floatToLong.kt"); } @TestMetadata("hexToFloat.kt") public void testHexToFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/hexToFloat.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/hexToFloat.kt"); } @TestMetadata("intToFloat.kt") public void testIntToFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/intToFloat.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/intToFloat.kt"); } @TestMetadata("longToDouble.kt") public void testLongToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/longToDouble.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/longToDouble.kt"); } @TestMetadata("longToInt.kt") public void testLongToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/longToInt.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/longToInt.kt"); } @TestMetadata("longToIntBinary.kt") public void testLongToIntBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeMismatch/wrongPrimitive/longToIntBinary.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeMismatch/wrongPrimitive/longToIntBinary.kt"); } } } @@ -12353,62 +11445,57 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeOfAnnotationMember extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeOfAnnotationMember() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeOfAnnotationMember"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/boolean.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/boolean.kt"); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/byte.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/char.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/char.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/float.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/float.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/int.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/long.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/long.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/short.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/short.kt"); } @TestMetadata("star.kt") public void testStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/star.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/star.kt"); } @TestMetadata("string.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeOfAnnotationMember/string.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeOfAnnotationMember/string.kt"); } } @@ -12416,20 +11503,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeParameters"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("misplacedClassTypeParameter.kt") public void testMisplacedClassTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeParameters/misplacedClassTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeParameters/misplacedClassTypeParameter.kt"); } @TestMetadata("misplacedFunctionTypeParameter.kt") public void testMisplacedFunctionTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeParameters/misplacedFunctionTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeParameters/misplacedFunctionTypeParameter.kt"); } } @@ -12437,50 +11526,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeProjection extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeProjection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/typeProjection"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("conflictingProjection.kt") public void testConflictingProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/conflictingProjection.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/conflictingProjection.kt"); } @TestMetadata("projectionInImmediateArgumentToSupertype.kt") public void testProjectionInImmediateArgumentToSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/projectionInImmediateArgumentToSupertype.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/projectionInImmediateArgumentToSupertype.kt"); } @TestMetadata("projectionOnNonClassTypeArgument1.kt") public void testProjectionOnNonClassTypeArgument1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/projectionOnNonClassTypeArgument1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/projectionOnNonClassTypeArgument1.kt"); } @TestMetadata("projectionOnNonClassTypeArgument2.kt") public void testProjectionOnNonClassTypeArgument2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/projectionOnNonClassTypeArgument2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/projectionOnNonClassTypeArgument2.kt"); } @TestMetadata("removeRedundantProjection1.kt") public void testRemoveRedundantProjection1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/removeRedundantProjection1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/removeRedundantProjection1.kt"); } @TestMetadata("removeRedundantProjection2.kt") public void testRemoveRedundantProjection2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/removeRedundantProjection2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/removeRedundantProjection2.kt"); } @TestMetadata("removeVariance.kt") public void testRemoveVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/typeProjection/removeVariance.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/typeProjection/removeVariance.kt"); } } @@ -12488,44 +11574,42 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnnecessaryLateinit extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnnecessaryLateinit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/unnecessaryLateinit"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lateinitWithConstructor.kt") public void testLateinitWithConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unnecessaryLateinit/lateinitWithConstructor.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unnecessaryLateinit/lateinitWithConstructor.kt"); } @TestMetadata("lateinitWithInit.kt") public void testLateinitWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unnecessaryLateinit/lateinitWithInit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unnecessaryLateinit/lateinitWithInit.kt"); } @TestMetadata("lateinitWithMultipleConstructors.kt") public void testLateinitWithMultipleConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unnecessaryLateinit/lateinitWithMultipleConstructors.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unnecessaryLateinit/lateinitWithMultipleConstructors.kt"); } @TestMetadata("lateinitWithMultipleConstructorsAndDelegation.kt") public void testLateinitWithMultipleConstructorsAndDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unnecessaryLateinit/lateinitWithMultipleConstructorsAndDelegation.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unnecessaryLateinit/lateinitWithMultipleConstructorsAndDelegation.kt"); } @TestMetadata("lateinitWithMultipleInit.kt") public void testLateinitWithMultipleInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unnecessaryLateinit/lateinitWithMultipleInit.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unnecessaryLateinit/lateinitWithMultipleInit.kt"); } @TestMetadata("secondaryConstructorDelegateItself.kt") public void testSecondaryConstructorDelegateItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unnecessaryLateinit/secondaryConstructorDelegateItself.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unnecessaryLateinit/secondaryConstructorDelegateItself.kt"); } } @@ -12533,32 +11617,32 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnusedSuppressAnnotation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnusedSuppressAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/unusedSuppressAnnotation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notForDeprecated.kt") public void testNotForDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unusedSuppressAnnotation/notForDeprecated.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unusedSuppressAnnotation/notForDeprecated.kt"); } @TestMetadata("notForJava.kt") public void testNotForJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unusedSuppressAnnotation/notForJava.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unusedSuppressAnnotation/notForJava.kt"); } @TestMetadata("notForJetBrains.kt") public void testNotForJetBrains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unusedSuppressAnnotation/notForJetBrains.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unusedSuppressAnnotation/notForJetBrains.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/unusedSuppressAnnotation/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/unusedSuppressAnnotation/simple.kt"); } } @@ -12566,126 +11650,121 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unusedVariableWithConstantInitializer.kt") public void testUnusedVariableWithConstantInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/unusedVariableWithConstantInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/unusedVariableWithConstantInitializer.kt"); } @TestMetadata("unusedVariableWithInitializer.kt") public void testUnusedVariableWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/unusedVariableWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/unusedVariableWithInitializer.kt"); } @TestMetadata("unusedVariableWithNullInitializer.kt") public void testUnusedVariableWithNullInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/unusedVariableWithNullInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/unusedVariableWithNullInitializer.kt"); } @TestMetadata("unusedVariableWithoutInitializer.kt") public void testUnusedVariableWithoutInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/unusedVariableWithoutInitializer.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/unusedVariableWithoutInitializer.kt"); } @TestMetadata("idea/testData/quickfix/variables/changeMutability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeMutability extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeMutability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("capturedMemberValInitialization.kt") public void testCapturedMemberValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/capturedMemberValInitialization.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/capturedMemberValInitialization.kt"); } @TestMetadata("capturedValInitialization.kt") public void testCapturedValInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/capturedValInitialization.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/capturedValInitialization.kt"); } @TestMetadata("funParameter.kt") public void testFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/funParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/funParameter.kt"); } @TestMetadata("localInGetter.kt") public void testLocalInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/localInGetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/localInGetter.kt"); } @TestMetadata("valOverrideVar.kt") public void testValOverrideVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valOverrideVar.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valOverrideVar.kt"); } @TestMetadata("valOverrideVarConstructorParameter.kt") public void testValOverrideVarConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valOverrideVarConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valOverrideVarConstructorParameter.kt"); } @TestMetadata("valReassignmentLocal.kt") public void testValReassignmentLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valReassignmentLocal.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valReassignmentLocal.kt"); } @TestMetadata("valReassignmentOuterDecl.kt") public void testValReassignmentOuterDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valReassignmentOuterDecl.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valReassignmentOuterDecl.kt"); } @TestMetadata("valReassignmentProperty.kt") public void testValReassignmentProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valReassignmentProperty.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valReassignmentProperty.kt"); } @TestMetadata("valReassignmentPropertyConstructorParameter.kt") public void testValReassignmentPropertyConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valReassignmentPropertyConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valReassignmentPropertyConstructorParameter.kt"); } @TestMetadata("valWithSetter.kt") public void testValWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/valWithSetter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/valWithSetter.kt"); } @TestMetadata("idea/testData/quickfix/variables/changeMutability/canBeVal") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CanBeVal extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCanBeVal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeMutability/canBeVal"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multiVariable.kt") public void testMultiVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/canBeVal/multiVariable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/canBeVal/multiVariable.kt"); } @TestMetadata("singleVariable.kt") public void testSingleVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeMutability/canBeVal/singleVariable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeMutability/canBeVal/singleVariable.kt"); } } } @@ -12694,14 +11773,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeToFunctionInvocation extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeToFunctionInvocation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToFunctionInvocation"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("funInvWithoutParentheses.kt") public void testFunInvWithoutParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeToFunctionInvocation/funInvWithoutParentheses.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeToFunctionInvocation/funInvWithoutParentheses.kt"); } } @@ -12709,38 +11791,37 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeToPropertyAccess extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeToPropertyAccess() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/changeToPropertyAccess"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumEntryCall.kt") public void testEnumEntryCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeToPropertyAccess/enumEntryCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeToPropertyAccess/enumEntryCall.kt"); } @TestMetadata("nonSimpleName.kt") public void testNonSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeToPropertyAccess/nonSimpleName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeToPropertyAccess/nonSimpleName.kt"); } @TestMetadata("objectCall.kt") public void testObjectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeToPropertyAccess/objectCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeToPropertyAccess/objectCall.kt"); } @TestMetadata("propertyCall.kt") public void testPropertyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeToPropertyAccess/propertyCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeToPropertyAccess/propertyCall.kt"); } @TestMetadata("propertyCallWithArguments.kt") public void testPropertyCallWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/changeToPropertyAccess/propertyCallWithArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/changeToPropertyAccess/propertyCallWithArguments.kt"); } } @@ -12748,50 +11829,47 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveValVarFromParameter extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveValVarFromParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/variables/removeValVarFromParameter"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("catchParameter.kt") public void testCatchParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/catchParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/catchParameter.kt"); } @TestMetadata("constructorParameter.kt") public void testConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/constructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/constructorParameter.kt"); } @TestMetadata("funParameter.kt") public void testFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/funParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/funParameter.kt"); } @TestMetadata("loopMultiParameter.kt") public void testLoopMultiParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/loopMultiParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/loopMultiParameter.kt"); } @TestMetadata("loopParameter.kt") public void testLoopParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/loopParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/loopParameter.kt"); } @TestMetadata("parameterWithComment.kt") public void testParameterWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/parameterWithComment.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/parameterWithComment.kt"); } @TestMetadata("secondaryConstructorParameter.kt") public void testSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/variables/removeValVarFromParameter/secondaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/variables/removeValVarFromParameter/secondaryConstructorParameter.kt"); } } } @@ -12800,82 +11878,73 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addElseBranchEnumStatement.kt") public void testAddElseBranchEnumStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addElseBranchEnumStatement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addElseBranchEnumStatement.kt"); } @TestMetadata("addRemainingBranchesBoolean.kt") public void testAddRemainingBranchesBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesBoolean.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesBoolean.kt"); } @TestMetadata("addRemainingBranchesEnum.kt") public void testAddRemainingBranchesEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnum.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnum.kt"); } @TestMetadata("addRemainingBranchesEnumBackTicks.kt") public void testAddRemainingBranchesEnumBackTicks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnumBackTicks.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnumBackTicks.kt"); } @TestMetadata("addRemainingBranchesEnumImport1.kt") public void testAddRemainingBranchesEnumImport1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnumImport1.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnumImport1.kt"); } @TestMetadata("addRemainingBranchesEnumImport2.kt") public void testAddRemainingBranchesEnumImport2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnumImport2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnumImport2.kt"); } @TestMetadata("addRemainingBranchesEnumImport3.kt") public void testAddRemainingBranchesEnumImport3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnumImport3.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnumImport3.kt"); } @TestMetadata("addRemainingBranchesEnumImport4.kt") public void testAddRemainingBranchesEnumImport4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnumImport4.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnumImport4.kt"); } @TestMetadata("addRemainingBranchesEnumStatement.kt") public void testAddRemainingBranchesEnumStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesEnumStatement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesEnumStatement.kt"); } @TestMetadata("addRemainingBranchesInNonDefaultPackage.kt") public void testAddRemainingBranchesInNonDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesInNonDefaultPackage.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesInNonDefaultPackage.kt"); } @TestMetadata("addRemainingBranchesSealed.kt") public void testAddRemainingBranchesSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesSealed.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesSealed.kt"); } @TestMetadata("addRemainingBranchesSealedBackTicks.kt") public void testAddRemainingBranchesSealedBackTicks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesSealedBackTicks.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesSealedBackTicks.kt"); } @TestMetadata("addRemainingBranchesSealedStatement.kt") public void testAddRemainingBranchesSealedStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/addRemainingBranchesSealedStatement.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/addRemainingBranchesSealedStatement.kt"); } public void testAllFilesPresentInWhen() throws Exception { @@ -12884,74 +11953,62 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestMetadata("breakInWhen.kt") public void testBreakInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/breakInWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/breakInWhen.kt"); } @TestMetadata("breakInWhenInLabeled.kt") public void testBreakInWhenInLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/breakInWhenInLabeled.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/breakInWhenInLabeled.kt"); } @TestMetadata("commasInConditionWithNoArguments.kt") public void testCommasInConditionWithNoArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/commasInConditionWithNoArguments.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/commasInConditionWithNoArguments.kt"); } @TestMetadata("commasInConditionWithNoArguments2.kt") public void testCommasInConditionWithNoArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/commasInConditionWithNoArguments2.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/commasInConditionWithNoArguments2.kt"); } @TestMetadata("continueInWhen.kt") public void testContinueInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/continueInWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/continueInWhen.kt"); } @TestMetadata("continueInWhenInLabeled.kt") public void testContinueInWhenInLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/continueInWhenInLabeled.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/continueInWhenInLabeled.kt"); } @TestMetadata("continueInWhenWithLabel.kt") public void testContinueInWhenWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/continueInWhenWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/continueInWhenWithLabel.kt"); } @TestMetadata("elseNotLastInWhen.kt") public void testElseNotLastInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/elseNotLastInWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/elseNotLastInWhen.kt"); } @TestMetadata("noElseInWhenWithBranches.kt") public void testNoElseInWhenWithBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/noElseInWhenWithBranches.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/noElseInWhenWithBranches.kt"); } @TestMetadata("noElseInWhenWithoutBranches.kt") public void testNoElseInWhenWithoutBranches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/noElseInWhenWithoutBranches.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/noElseInWhenWithoutBranches.kt"); } @TestMetadata("removeRedundantElse.kt") public void testRemoveRedundantElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/removeRedundantElse.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/removeRedundantElse.kt"); } @TestMetadata("twoElseBranchesInWhen.kt") public void testTwoElseBranchesInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/when/twoElseBranchesInWhen.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/when/twoElseBranchesInWhen.kt"); } } @@ -12959,68 +12016,62 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WrapWithSafeLetCall extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWrapWithSafeLetCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/wrapWithSafeLetCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("argumentNullable.kt") public void testArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/argumentNullable.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/argumentNullable.kt"); } @TestMetadata("chainedCallTypeMismatch.kt") public void testChainedCallTypeMismatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/chainedCallTypeMismatch.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/chainedCallTypeMismatch.kt"); } @TestMetadata("chainedUnsafeCall.kt") public void testChainedUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/chainedUnsafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/chainedUnsafeCall.kt"); } @TestMetadata("expressionUnsafeCall.kt") public void testExpressionUnsafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/expressionUnsafeCall.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/extensionMethod.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/extensionMethod.kt"); } @TestMetadata("insideLet.kt") public void testInsideLet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/insideLet.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/insideLet.kt"); } @TestMetadata("invokeFuncUnsafe.kt") public void testInvokeFuncUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/invokeFuncUnsafe.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/invokeFuncUnsafe.kt"); } @TestMetadata("invokeUnsafe.kt") public void testInvokeUnsafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/invokeUnsafe.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/invokeUnsafe.kt"); } @TestMetadata("objectQualifier.kt") public void testObjectQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/objectQualifier.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/objectQualifier.kt"); } @TestMetadata("unstableValue.kt") public void testUnstableValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrapWithSafeLetCall/unstableValue.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrapWithSafeLetCall/unstableValue.kt"); } } @@ -13028,14 +12079,17 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WrongLongSuffix extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWrongLongSuffix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/wrongLongSuffix"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/wrongLongSuffix/simple.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/wrongLongSuffix/simple.kt"); } } @@ -13043,20 +12097,22 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class YieldUnsupported extends AbstractQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInYieldUnsupported() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/yieldUnsupported"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("yieldAsSimpleName.kt") public void testYieldAsSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/yieldUnsupported/yieldAsSimpleName.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/yieldUnsupported/yieldAsSimpleName.kt"); } @TestMetadata("yieldBeforeLambda.kt") public void testYieldBeforeLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/yieldUnsupported/yieldBeforeLambda.kt"); - doTest(fileName); + runTest("idea/testData/quickfix/yieldUnsupported/yieldBeforeLambda.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/NameSuggestionProviderTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/NameSuggestionProviderTestGenerated.java index aa091980c7d..508d53ee65c 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/NameSuggestionProviderTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/NameSuggestionProviderTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class NameSuggestionProviderTestGenerated extends AbstractNameSuggestionProviderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNameSuggestionProvider() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/nameSuggestionProvider"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localVarAsCallArgument.kt") public void testLocalVarAsCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/nameSuggestionProvider/localVarAsCallArgument.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/nameSuggestionProvider/localVarAsCallArgument.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/CopyTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/CopyTestGenerated.java index 106ce5603a9..01106c7fe46 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/CopyTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/CopyTestGenerated.java @@ -21,217 +21,186 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CopyTestGenerated extends AbstractCopyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCopy() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/copy"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("copyClassCaretInside/copyClassCaretInside.test") public void testCopyClassCaretInside_CopyClassCaretInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyClassCaretInside/copyClassCaretInside.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyClassCaretInside/copyClassCaretInside.test"); } @TestMetadata("copyClassToExistingFile/copyClassToExistingFile.test") public void testCopyClassToExistingFile_CopyClassToExistingFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyClassToExistingFile/copyClassToExistingFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyClassToExistingFile/copyClassToExistingFile.test"); } @TestMetadata("copyClassToNewFile/copyClassToNewFile.test") public void testCopyClassToNewFile_CopyClassToNewFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyClassToNewFile/copyClassToNewFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyClassToNewFile/copyClassToNewFile.test"); } @TestMetadata("copyClassToSamePackageWithRename/copyClassToSamePackageWithRename.test") public void testCopyClassToSamePackageWithRename_CopyClassToSamePackageWithRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyClassToSamePackageWithRename/copyClassToSamePackageWithRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyClassToSamePackageWithRename/copyClassToSamePackageWithRename.test"); } @TestMetadata("copyClassWithCompanionRefs/copyClassWithCompanionRefs.test") public void testCopyClassWithCompanionRefs_CopyClassWithCompanionRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyClassWithCompanionRefs/copyClassWithCompanionRefs.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyClassWithCompanionRefs/copyClassWithCompanionRefs.test"); } @TestMetadata("copyClassWithRename/copyClassWithRename.test") public void testCopyClassWithRename_CopyClassWithRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyClassWithRename/copyClassWithRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyClassWithRename/copyClassWithRename.test"); } @TestMetadata("copyFIleFromDefaultPackage/copyFIleFromDefaultPackage.test") public void testCopyFIleFromDefaultPackage_CopyFIleFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyFIleFromDefaultPackage/copyFIleFromDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyFIleFromDefaultPackage/copyFIleFromDefaultPackage.test"); } @TestMetadata("copyFIleRetainContent/copyFIleRetainContent.test") public void testCopyFIleRetainContent_CopyFIleRetainContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyFIleRetainContent/copyFIleRetainContent.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyFIleRetainContent/copyFIleRetainContent.test"); } @TestMetadata("copyFIleToDefaultPackage/copyFIleToDefaultPackage.test") public void testCopyFIleToDefaultPackage_CopyFIleToDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyFIleToDefaultPackage/copyFIleToDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyFIleToDefaultPackage/copyFIleToDefaultPackage.test"); } @TestMetadata("copyFIleWithPackageAndDirUnmatched/copyFIleWithPackageAndDirUnmatched.test") public void testCopyFIleWithPackageAndDirUnmatched_CopyFIleWithPackageAndDirUnmatched() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyFIleWithPackageAndDirUnmatched/copyFIleWithPackageAndDirUnmatched.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyFIleWithPackageAndDirUnmatched/copyFIleWithPackageAndDirUnmatched.test"); } @TestMetadata("copyFunCallQualificationWithParentheses/copyFunCallQualificationWithParentheses.test") public void testCopyFunCallQualificationWithParentheses_CopyFunCallQualificationWithParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyFunCallQualificationWithParentheses/copyFunCallQualificationWithParentheses.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyFunCallQualificationWithParentheses/copyFunCallQualificationWithParentheses.test"); } @TestMetadata("copyKtFileToTextFile/copyKtFileToTextFile.test") public void testCopyKtFileToTextFile_CopyKtFileToTextFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyKtFileToTextFile/copyKtFileToTextFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyKtFileToTextFile/copyKtFileToTextFile.test"); } @TestMetadata("copyLocalClass/copyLocalClass.test") public void testCopyLocalClass_CopyLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyLocalClass/copyLocalClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyLocalClass/copyLocalClass.test"); } @TestMetadata("copyLocalFunction/copyLocalFunction.test") public void testCopyLocalFunction_CopyLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyLocalFunction/copyLocalFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyLocalFunction/copyLocalFunction.test"); } @TestMetadata("copyLocalVariable/copyLocalVariable.test") public void testCopyLocalVariable_CopyLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyLocalVariable/copyLocalVariable.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyLocalVariable/copyLocalVariable.test"); } @TestMetadata("copyMemberFunction/copyMemberFunction.test") public void testCopyMemberFunction_CopyMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyMemberFunction/copyMemberFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyMemberFunction/copyMemberFunction.test"); } @TestMetadata("copyMemberProperty/copyMemberProperty.test") public void testCopyMemberProperty_CopyMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyMemberProperty/copyMemberProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyMemberProperty/copyMemberProperty.test"); } @TestMetadata("copyMultiClassFile/copyMultiClassFile.test") public void testCopyMultiClassFile_CopyMultiClassFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyMultiClassFile/copyMultiClassFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyMultiClassFile/copyMultiClassFile.test"); } @TestMetadata("copyMultipleClassesToExistingFile/copyMultipleClassesToExistingFile.test") public void testCopyMultipleClassesToExistingFile_CopyMultipleClassesToExistingFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyMultipleClassesToExistingFile/copyMultipleClassesToExistingFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyMultipleClassesToExistingFile/copyMultipleClassesToExistingFile.test"); } @TestMetadata("copyMultipleClassesToNewFile/copyMultipleClassesToNewFile.test") public void testCopyMultipleClassesToNewFile_CopyMultipleClassesToNewFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyMultipleClassesToNewFile/copyMultipleClassesToNewFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyMultipleClassesToNewFile/copyMultipleClassesToNewFile.test"); } @TestMetadata("copyMultipleDeclarations/copyMultipleDeclarations.test") public void testCopyMultipleDeclarations_CopyMultipleDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyMultipleDeclarations/copyMultipleDeclarations.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyMultipleDeclarations/copyMultipleDeclarations.test"); } @TestMetadata("copyNestedClass/copyNestedClass.test") public void testCopyNestedClass_CopyNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyNestedClass/copyNestedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyNestedClass/copyNestedClass.test"); } @TestMetadata("copyObject/copyObject.test") public void testCopyObject_CopyObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyObject/copyObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyObject/copyObject.test"); } @TestMetadata("copySingleClass/copySingleClass.test") public void testCopySingleClass_CopySingleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copySingleClass/copySingleClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copySingleClass/copySingleClass.test"); } @TestMetadata("copySingleClassFile/copySingleClassFile.test") public void testCopySingleClassFile_CopySingleClassFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copySingleClassFile/copySingleClassFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copySingleClassFile/copySingleClassFile.test"); } @TestMetadata("copySingleClassWithRename/copySingleClassWithRename.test") public void testCopySingleClassWithRename_CopySingleClassWithRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copySingleClassWithRename/copySingleClassWithRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copySingleClassWithRename/copySingleClassWithRename.test"); } @TestMetadata("copyTopLevelFunction/copyTopLevelFunction.test") public void testCopyTopLevelFunction_CopyTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyTopLevelFunction/copyTopLevelFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyTopLevelFunction/copyTopLevelFunction.test"); } @TestMetadata("copyTopLevelFunctionWithRename/copyTopLevelFunctionWithRename.test") public void testCopyTopLevelFunctionWithRename_CopyTopLevelFunctionWithRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyTopLevelFunctionWithRename/copyTopLevelFunctionWithRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyTopLevelFunctionWithRename/copyTopLevelFunctionWithRename.test"); } @TestMetadata("copyTopLevelProperty/copyTopLevelProperty.test") public void testCopyTopLevelProperty_CopyTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyTopLevelProperty/copyTopLevelProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyTopLevelProperty/copyTopLevelProperty.test"); } @TestMetadata("copyTopLevelPropertyWithRename/copyTopLevelPropertyWithRename.test") public void testCopyTopLevelPropertyWithRename_CopyTopLevelPropertyWithRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyTopLevelPropertyWithRename/copyTopLevelPropertyWithRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyTopLevelPropertyWithRename/copyTopLevelPropertyWithRename.test"); } @TestMetadata("copyWithImportInsertion/copyWithImportInsertion.test") public void testCopyWithImportInsertion_CopyWithImportInsertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/copyWithImportInsertion/copyWithImportInsertion.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/copyWithImportInsertion/copyWithImportInsertion.test"); } @TestMetadata("kt18149/kt18149.test") public void testKt18149_Kt18149() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/kt18149/kt18149.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/kt18149/kt18149.test"); } @TestMetadata("protectedConstructorRefInSuperListEntry/protectedConstructorRefInSuperListEntry.test") public void testProtectedConstructorRefInSuperListEntry_ProtectedConstructorRefInSuperListEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/protectedConstructorRefInSuperListEntry/protectedConstructorRefInSuperListEntry.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/protectedConstructorRefInSuperListEntry/protectedConstructorRefInSuperListEntry.test"); } @TestMetadata("refToImportJavaStaticField/refToImportedJavaStaticField.test") public void testRefToImportJavaStaticField_RefToImportedJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/refToImportJavaStaticField/refToImportedJavaStaticField.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/refToImportJavaStaticField/refToImportedJavaStaticField.test"); } @TestMetadata("refToImportJavaStaticMethod/refToImportedJavaStaticMethod.test") public void testRefToImportJavaStaticMethod_RefToImportedJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copy/refToImportJavaStaticMethod/refToImportedJavaStaticMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copy/refToImportJavaStaticMethod/refToImportedJavaStaticMethod.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/MultiModuleCopyTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/MultiModuleCopyTestGenerated.java index 363b3915947..2b540c208fd 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/MultiModuleCopyTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/copy/MultiModuleCopyTestGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiModuleCopyTestGenerated extends AbstractMultiModuleCopyTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCopyMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/copyMultiModule"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("fileNotUnderSourceRoot/fileNotUnderSourceRoot.test") public void testFileNotUnderSourceRoot_FileNotUnderSourceRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copyMultiModule/fileNotUnderSourceRoot/fileNotUnderSourceRoot.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copyMultiModule/fileNotUnderSourceRoot/fileNotUnderSourceRoot.test"); } @TestMetadata("internalReferencesToAnotherModule2/internalReferencesToAnotherModule.test") public void testInternalReferencesToAnotherModule2_InternalReferencesToAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copyMultiModule/internalReferencesToAnotherModule2/internalReferencesToAnotherModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copyMultiModule/internalReferencesToAnotherModule2/internalReferencesToAnotherModule.test"); } @TestMetadata("referencesToUnrelatedModule/referencesToUnrelatedModule.test") public void testReferencesToUnrelatedModule_ReferencesToUnrelatedModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/copyMultiModule/referencesToUnrelatedModule/referencesToUnrelatedModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/copyMultiModule/referencesToUnrelatedModule/referencesToUnrelatedModule.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java index 6b8e7931761..c9cbe74fd56 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/inline/InlineTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class InlineTestGenerated extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,220 +33,194 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EmptyFunction.kt") public void testEmptyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/EmptyFunction.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/EmptyFunction.kt"); } @TestMetadata("ExtensionAndDispatchReceivers.kt") public void testExtensionAndDispatchReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/ExtensionAndDispatchReceivers.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/ExtensionAndDispatchReceivers.kt"); } @TestMetadata("InStringTemplates.kt") public void testInStringTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/InStringTemplates.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/InStringTemplates.kt"); } @TestMetadata("LocalCapturing.kt") public void testLocalCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/LocalCapturing.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/LocalCapturing.kt"); } @TestMetadata("LocalSimple.kt") public void testLocalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/LocalSimple.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/LocalSimple.kt"); } @TestMetadata("MultipleReturns.kt") public void testMultipleReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/MultipleReturns.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/MultipleReturns.kt"); } @TestMetadata("OuterClassReceiver.kt") public void testOuterClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/OuterClassReceiver.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/OuterClassReceiver.kt"); } @TestMetadata("Reference.kt") public void testReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/Reference.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/Reference.kt"); } @TestMetadata("ReturnNotInTheEnd.kt") public void testReturnNotInTheEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/ReturnNotInTheEnd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/ReturnNotInTheEnd.kt"); } @TestMetadata("UnitReturnType.kt") public void testUnitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/UnitReturnType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/UnitReturnType.kt"); } @TestMetadata("UnitReturnType2.kt") public void testUnitReturnType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/UnitReturnType2.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/UnitReturnType2.kt"); } @TestMetadata("idea/testData/refactoring/inline/function/expressionBody") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExpressionBody extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressionBody() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function/expressionBody"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ComplexArgumentNotUsed.kt") public void testComplexArgumentNotUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/ComplexArgumentNotUsed.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/ComplexArgumentNotUsed.kt"); } @TestMetadata("ComplexArgumentUsedTwice.kt") public void testComplexArgumentUsedTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/ComplexArgumentUsedTwice.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/ComplexArgumentUsedTwice.kt"); } @TestMetadata("Constant.kt") public void testConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/Constant.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/Constant.kt"); } @TestMetadata("DoNotKeepString.kt") public void testDoNotKeepString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/DoNotKeepString.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/DoNotKeepString.kt"); } @TestMetadata("ExplicitReturnType.kt") public void testExplicitReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/ExplicitReturnType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/ExplicitReturnType.kt"); } @TestMetadata("explicitTypeArgument.kt") public void testExplicitTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/explicitTypeArgument.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/explicitTypeArgument.kt"); } @TestMetadata("explicitTypeArgumentComplex.kt") public void testExplicitTypeArgumentComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/explicitTypeArgumentComplex.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/explicitTypeArgumentComplex.kt"); } @TestMetadata("explicitTypeArgumentNotNeeded.kt") public void testExplicitTypeArgumentNotNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/explicitTypeArgumentNotNeeded.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/explicitTypeArgumentNotNeeded.kt"); } @TestMetadata("FromUsage.kt") public void testFromUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/FromUsage.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/FromUsage.kt"); } @TestMetadata("FunctionalParameterPassed.kt") public void testFunctionalParameterPassed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/FunctionalParameterPassed.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/FunctionalParameterPassed.kt"); } @TestMetadata("FunctionalType.kt") public void testFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/FunctionalType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/FunctionalType.kt"); } @TestMetadata("Lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/Lambda.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/Lambda.kt"); } @TestMetadata("Lambda1.kt") public void testLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/Lambda1.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/Lambda1.kt"); } @TestMetadata("Lambda2.kt") public void testLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/Lambda2.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/Lambda2.kt"); } @TestMetadata("LambdaGeneric.kt") public void testLambdaGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/LambdaGeneric.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/LambdaGeneric.kt"); } @TestMetadata("ManyParams.kt") public void testManyParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/ManyParams.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/ManyParams.kt"); } @TestMetadata("MultipleInComposition.kt") public void testMultipleInComposition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/MultipleInComposition.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/MultipleInComposition.kt"); } @TestMetadata("MultipleInExpression.kt") public void testMultipleInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/MultipleInExpression.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/MultipleInExpression.kt"); } @TestMetadata("Recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/Recursive.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/Recursive.kt"); } @TestMetadata("SafeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/SafeCall.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/SafeCall.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/Simple.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/Simple.kt"); } @TestMetadata("StringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/StringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/StringTemplate.kt"); } @TestMetadata("WithReference.kt") public void testWithReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/expressionBody/WithReference.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/expressionBody/WithReference.kt"); } } @@ -250,122 +228,107 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromIntellij extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromIntellij() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/function/fromIntellij"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/ArrayAccess.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/ArrayAccess.kt"); } @TestMetadata("AvoidMultipleSubstitutionsInParameterTypes.kt") public void testAvoidMultipleSubstitutionsInParameterTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/AvoidMultipleSubstitutionsInParameterTypes.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/AvoidMultipleSubstitutionsInParameterTypes.kt"); } @TestMetadata("CallInFor.kt") public void testCallInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/CallInFor.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/CallInFor.kt"); } @TestMetadata("CallUnderIf.kt") public void testCallUnderIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/CallUnderIf.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/CallUnderIf.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/EnumConstructor.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/EnumConstructor.kt"); } @TestMetadata("FieldInitializer.kt") public void testFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/FieldInitializer.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/FieldInitializer.kt"); } @TestMetadata("FlatVarargs.kt") public void testFlatVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/FlatVarargs.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/FlatVarargs.kt"); } @TestMetadata("InaccessibleFieldInSuperclass.kt") public void testInaccessibleFieldInSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/InaccessibleFieldInSuperclass.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/InaccessibleFieldInSuperclass.kt"); } @TestMetadata("InferredType.kt") public void testInferredType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/InferredType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/InferredType.kt"); } @TestMetadata("InlineAnonymousClassWithPrivateMethod.kt") public void testInlineAnonymousClassWithPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/InlineAnonymousClassWithPrivateMethod.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/InlineAnonymousClassWithPrivateMethod.kt"); } @TestMetadata("InlineMultipleOccurrencesInFieldInitializer.kt") public void testInlineMultipleOccurrencesInFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/InlineMultipleOccurrencesInFieldInitializer.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/InlineMultipleOccurrencesInFieldInitializer.kt"); } @TestMetadata("InlineWithQualifier.kt") public void testInlineWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/InlineWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/InlineWithQualifier.kt"); } @TestMetadata("InlineWithTry.kt") public void testInlineWithTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/InlineWithTry.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/InlineWithTry.kt"); } @TestMetadata("NotAStatement.kt") public void testNotAStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/NotAStatement.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/NotAStatement.kt"); } @TestMetadata("ParamNameConflictsWithLocalVar.kt") public void testParamNameConflictsWithLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/ParamNameConflictsWithLocalVar.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/ParamNameConflictsWithLocalVar.kt"); } @TestMetadata("SideEffect.kt") public void testSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/SideEffect.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/SideEffect.kt"); } @TestMetadata("Substitution.kt") public void testSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/Substitution.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/Substitution.kt"); } @TestMetadata("VoidWithReturn.kt") public void testVoidWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/VoidWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/VoidWithReturn.kt"); } @TestMetadata("WithSuperInside.kt") public void testWithSuperInside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/fromIntellij/WithSuperInside.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/fromIntellij/WithSuperInside.kt"); } } @@ -373,10 +336,13 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnAtEnd extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddBlockToControlStatement.kt") public void testAddBlockToControlStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/AddBlockToControlStatement.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/AddBlockToControlStatement.kt"); } public void testAllFilesPresentInReturnAtEnd() throws Exception { @@ -385,110 +351,92 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestMetadata("Bug1.kt") public void testBug1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/Bug1.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/Bug1.kt"); } @TestMetadata("CallArgument.kt") public void testCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/CallArgument.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/CallArgument.kt"); } @TestMetadata("ClassDelegate.kt") public void testClassDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/ClassDelegate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/ClassDelegate.kt"); } @TestMetadata("ConvertToBlockBody.kt") public void testConvertToBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/ConvertToBlockBody.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/ConvertToBlockBody.kt"); } @TestMetadata("DefaultParameter.kt") public void testDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/DefaultParameter.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/DefaultParameter.kt"); } @TestMetadata("MultipleStatements.kt") public void testMultipleStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/MultipleStatements.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/MultipleStatements.kt"); } @TestMetadata("OnLocalMemberLevel.kt") public void testOnLocalMemberLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/OnLocalMemberLevel.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/OnLocalMemberLevel.kt"); } @TestMetadata("OnMemberLevel.kt") public void testOnMemberLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/OnMemberLevel.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/OnMemberLevel.kt"); } @TestMetadata("OnTopLevel.kt") public void testOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/OnTopLevel.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/OnTopLevel.kt"); } @TestMetadata("PrivateMember.kt") public void testPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/PrivateMember.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/PrivateMember.kt"); } @TestMetadata("PublicMember.kt") public void testPublicMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/PublicMember.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/PublicMember.kt"); } @TestMetadata("Recursive.kt") public void testRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/Recursive.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/Recursive.kt"); } @TestMetadata("ReturnFromLambda.kt") public void testReturnFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/ReturnFromLambda.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/ReturnFromLambda.kt"); } @TestMetadata("SafeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/SafeCall.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/SafeCall.kt"); } @TestMetadata("SingleStatement.kt") public void testSingleStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/SingleStatement.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/SingleStatement.kt"); } @TestMetadata("UnusedComplicatedReturnValue.kt") public void testUnusedComplicatedReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/UnusedComplicatedReturnValue.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/UnusedComplicatedReturnValue.kt"); } @TestMetadata("UnusedReturnValue.kt") public void testUnusedReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/UnusedReturnValue.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/UnusedReturnValue.kt"); } @TestMetadata("ValIntializer.kt") public void testValIntializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/function/returnAtEnd/ValIntializer.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/function/returnAtEnd/ValIntializer.kt"); } } } @@ -497,44 +445,42 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineTypeAlias extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineTypeAlias"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extensionFunctionTypeToFunctionType.kt") public void testExtensionFunctionTypeToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineTypeAlias/extensionFunctionTypeToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineTypeAlias/extensionFunctionTypeToFunctionType.kt"); } @TestMetadata("functionTypeToFunctionType.kt") public void testFunctionTypeToFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineTypeAlias/functionTypeToFunctionType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineTypeAlias/functionTypeToFunctionType.kt"); } @TestMetadata("functionTypeToNullableType.kt") public void testFunctionTypeToNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineTypeAlias/functionTypeToNullableType.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineTypeAlias/functionTypeToNullableType.kt"); } @TestMetadata("keepImports.kt") public void testKeepImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineTypeAlias/keepImports.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineTypeAlias/keepImports.kt"); } @TestMetadata("replaceImports.kt") public void testReplaceImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineTypeAlias/replaceImports.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineTypeAlias/replaceImports.kt"); } @TestMetadata("simpleAlias.kt") public void testSimpleAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineTypeAlias/simpleAlias.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineTypeAlias/simpleAlias.kt"); } } @@ -542,328 +488,284 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineVariableOrProperty extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineVariableOrProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineVariableOrProperty"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AppendToCollection.kt") public void testAppendToCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/AppendToCollection.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/AppendToCollection.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/Basic.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/Basic.kt"); } @TestMetadata("BasicCaretOnDeclaration.kt") public void testBasicCaretOnDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/BasicCaretOnDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/BasicCaretOnDeclaration.kt"); } @TestMetadata("ifInQualifiedExpression.kt") public void testIfInQualifiedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/ifInQualifiedExpression.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/ifInQualifiedExpression.kt"); } @TestMetadata("InFunctionLiteral.kt") public void testInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/InFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/InFunctionLiteral.kt"); } @TestMetadata("lessAndGreaterInCallArgs.kt") public void testLessAndGreaterInCallArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/lessAndGreaterInCallArgs.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/lessAndGreaterInCallArgs.kt"); } @TestMetadata("MethodReference.kt") public void testMethodReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/MethodReference.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/MethodReference.kt"); } @TestMetadata("MultipleInitializers.kt") public void testMultipleInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/MultipleInitializers.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/MultipleInitializers.kt"); } @TestMetadata("MultipleUsages.kt") public void testMultipleUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/MultipleUsages.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/MultipleUsages.kt"); } @TestMetadata("noUsages.kt") public void testNoUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/noUsages.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/noUsages.kt"); } @TestMetadata("Parameter.kt") public void testParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/Parameter.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/Parameter.kt"); } @TestMetadata("semicolon.kt") public void testSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/semicolon.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/semicolon.kt"); } @TestMetadata("semicolonWithSpacesAndComments.kt") public void testSemicolonWithSpacesAndComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/semicolonWithSpacesAndComments.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/semicolonWithSpacesAndComments.kt"); } @TestMetadata("SeparateInitializer.kt") public void testSeparateInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/SeparateInitializer.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/SeparateInitializer.kt"); } @TestMetadata("SeparateInitializerInTry.kt") public void testSeparateInitializerInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/SeparateInitializerInTry.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/SeparateInitializerInTry.kt"); } @TestMetadata("UsedInAssignment.kt") public void testUsedInAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/UsedInAssignment.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/UsedInAssignment.kt"); } @TestMetadata("ValWithoutInitializer.kt") public void testValWithoutInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/ValWithoutInitializer.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/ValWithoutInitializer.kt"); } @TestMetadata("varNoWrite.kt") public void testVarNoWrite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/varNoWrite.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/varNoWrite.kt"); } @TestMetadata("varWithAssignment.kt") public void testVarWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/varWithAssignment.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/varWithAssignment.kt"); } @TestMetadata("varWithInc.kt") public void testVarWithInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/varWithInc.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/varWithInc.kt"); } @TestMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddParenthesis extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddParenthesis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/ArrayAccess.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/ArrayAccess.kt"); } @TestMetadata("ArrayAccessDontAdd.kt") public void testArrayAccessDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/ArrayAccessDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/ArrayAccessDontAdd.kt"); } @TestMetadata("Binary.kt") public void testBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Binary.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Binary.kt"); } @TestMetadata("BinaryDontAdd.kt") public void testBinaryDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/BinaryDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/BinaryDontAdd.kt"); } @TestMetadata("Call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Call.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Call.kt"); } @TestMetadata("CallCorrected.kt") public void testCallCorrected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/CallCorrected.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/CallCorrected.kt"); } @TestMetadata("CallDontAdd.kt") public void testCallDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/CallDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/CallDontAdd.kt"); } @TestMetadata("Callee.kt") public void testCallee() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Callee.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Callee.kt"); } @TestMetadata("ColonDontAdd.kt") public void testColonDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/ColonDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/ColonDontAdd.kt"); } @TestMetadata("If.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/If.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/If.kt"); } @TestMetadata("IfIntoArrayAccess.kt") public void testIfIntoArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoArrayAccess.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoArrayAccess.kt"); } @TestMetadata("IfIntoArrayAccessBrackets.kt") public void testIfIntoArrayAccessBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoArrayAccessBrackets.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoArrayAccessBrackets.kt"); } @TestMetadata("IfIntoBinaryLeft.kt") public void testIfIntoBinaryLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryLeft.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryLeft.kt"); } @TestMetadata("IfIntoBinaryRight.kt") public void testIfIntoBinaryRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryRight.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryRight.kt"); } @TestMetadata("IfIntoBinaryRightLeft.kt") public void testIfIntoBinaryRightLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryRightLeft.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryRightLeft.kt"); } @TestMetadata("IfIntoBinaryRightLeftDontAdd.kt") public void testIfIntoBinaryRightLeftDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryRightLeftDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoBinaryRightLeftDontAdd.kt"); } @TestMetadata("IfIntoPostfix.kt") public void testIfIntoPostfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoPostfix.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoPostfix.kt"); } @TestMetadata("IfIntoPrefix.kt") public void testIfIntoPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoPrefix.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IfIntoPrefix.kt"); } @TestMetadata("IndexedCorrected.kt") public void testIndexedCorrected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IndexedCorrected.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IndexedCorrected.kt"); } @TestMetadata("IsDontAdd.kt") public void testIsDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IsDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IsDontAdd.kt"); } @TestMetadata("IsIntoCall.kt") public void testIsIntoCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IsIntoCall.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/IsIntoCall.kt"); } @TestMetadata("LeftAssociative.kt") public void testLeftAssociative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/LeftAssociative.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/LeftAssociative.kt"); } @TestMetadata("LeftAssociativeBoolean.kt") public void testLeftAssociativeBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/LeftAssociativeBoolean.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/LeftAssociativeBoolean.kt"); } @TestMetadata("LeftAssociativeDontAdd.kt") public void testLeftAssociativeDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/LeftAssociativeDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/LeftAssociativeDontAdd.kt"); } @TestMetadata("PostfixIntoPrefix.kt") public void testPostfixIntoPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/PostfixIntoPrefix.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/PostfixIntoPrefix.kt"); } @TestMetadata("PrefixIntoPostfix.kt") public void testPrefixIntoPostfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/PrefixIntoPostfix.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/PrefixIntoPostfix.kt"); } @TestMetadata("Qualified.kt") public void testQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Qualified.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/Qualified.kt"); } @TestMetadata("QualifiedDontAdd.kt") public void testQualifiedDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/QualifiedDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/QualifiedDontAdd.kt"); } @TestMetadata("StringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/StringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/StringTemplate.kt"); } @TestMetadata("StringTemplateAlreadyInBraces.kt") public void testStringTemplateAlreadyInBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/StringTemplateAlreadyInBraces.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/StringTemplateAlreadyInBraces.kt"); } @TestMetadata("StringTemplateDontAdd.kt") public void testStringTemplateDontAdd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/StringTemplateDontAdd.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/StringTemplateDontAdd.kt"); } @TestMetadata("UnaryIntoBinary.kt") public void testUnaryIntoBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/UnaryIntoBinary.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/addParenthesis/UnaryIntoBinary.kt"); } } @@ -871,50 +773,47 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicateParameterTypes extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExplicateParameterTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("EnoughDontExplicate.kt") public void testEnoughDontExplicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/EnoughDontExplicate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/EnoughDontExplicate.kt"); } @TestMetadata("ErrorTypes.kt") public void testErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/ErrorTypes.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/ErrorTypes.kt"); } @TestMetadata("It.kt") public void testIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/It.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/It.kt"); } @TestMetadata("ItMultiLine.kt") public void testItMultiLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/ItMultiLine.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/ItMultiLine.kt"); } @TestMetadata("Parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/Parenthesized.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/Parenthesized.kt"); } @TestMetadata("Simplest.kt") public void testSimplest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/Simplest.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/Simplest.kt"); } @TestMetadata("TrivialDontExplicate.kt") public void testTrivialDontExplicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/TrivialDontExplicate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateParameterTypes/TrivialDontExplicate.kt"); } } @@ -922,68 +821,62 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicateTypeArgument extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExplicateTypeArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DeeperNestedCall.kt") public void testDeeperNestedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/DeeperNestedCall.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/DeeperNestedCall.kt"); } @TestMetadata("DeeperNestedCall2.kt") public void testDeeperNestedCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/DeeperNestedCall2.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/DeeperNestedCall2.kt"); } @TestMetadata("EnoughDontExplicate.kt") public void testEnoughDontExplicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/EnoughDontExplicate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/EnoughDontExplicate.kt"); } @TestMetadata("ExplicateForSome.kt") public void testExplicateForSome() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/ExplicateForSome.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/ExplicateForSome.kt"); } @TestMetadata("InStringTemplate.kt") public void testInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/InStringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/InStringTemplate.kt"); } @TestMetadata("NestedCall.kt") public void testNestedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/NestedCall.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/NestedCall.kt"); } @TestMetadata("Parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/Parenthesized.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/Parenthesized.kt"); } @TestMetadata("Qualified.kt") public void testQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/Qualified.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/Qualified.kt"); } @TestMetadata("Simplest.kt") public void testSimplest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/Simplest.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/Simplest.kt"); } @TestMetadata("TrivialDontExplicate.kt") public void testTrivialDontExplicate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/TrivialDontExplicate.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/explicateTypeArgument/TrivialDontExplicate.kt"); } } @@ -991,118 +884,109 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineVariableOrProperty/property"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/Basic.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/Basic.kt"); } @TestMetadata("ClassObjectProperty.kt") public void testClassObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/ClassObjectProperty.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/ClassObjectProperty.kt"); } @TestMetadata("InstanceProperty.kt") public void testInstanceProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/InstanceProperty.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/InstanceProperty.kt"); } @TestMetadata("KT17489.kt") public void testKT17489() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/KT17489.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/KT17489.kt"); } @TestMetadata("keepImport.kt") public void testKeepImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/keepImport.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/keepImport.kt"); } @TestMetadata("Library.kt") public void testLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/Library.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/Library.kt"); } @TestMetadata("multiplePackages.kt") public void testMultiplePackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/multiplePackages.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/multiplePackages.kt"); } @TestMetadata("ObjectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/ObjectProperty.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/ObjectProperty.kt"); } @TestMetadata("PrivateSet.kt") public void testPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/PrivateSet.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/PrivateSet.kt"); } @TestMetadata("QualifiedUsage.kt") public void testQualifiedUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/QualifiedUsage.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/QualifiedUsage.kt"); } @TestMetadata("removeImport.kt") public void testRemoveImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/removeImport.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/removeImport.kt"); } @TestMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors"), Pattern.compile("^(\\w+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("BlockBody.kt") public void testBlockBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/BlockBody.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/BlockBody.kt"); } @TestMetadata("ExpressionBody.kt") public void testExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/ExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/ExpressionBody.kt"); } @TestMetadata("ExtensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/ExtensionProperty.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/ExtensionProperty.kt"); } @TestMetadata("GetterAndSetter.kt") public void testGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/GetterAndSetter.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/GetterAndSetter.kt"); } @TestMetadata("PlusPlus.kt") public void testPlusPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/PlusPlus.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/PlusPlus.kt"); } @TestMetadata("WithInitializer.kt") public void testWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/WithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/property/accessors/WithInitializer.kt"); } } } @@ -1111,10 +995,13 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractInlineTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addBraces.kt") public void testAddBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/addBraces.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/addBraces.kt"); } public void testAllFilesPresentInStringTemplates() throws Exception { @@ -1123,38 +1010,32 @@ public class InlineTestGenerated extends AbstractInlineTest { @TestMetadata("blockEntry.kt") public void testBlockEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/blockEntry.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/blockEntry.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/empty.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/empty.kt"); } @TestMetadata("nonEmpty.kt") public void testNonEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/nonEmpty.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/nonEmpty.kt"); } @TestMetadata("nonRawToRaw.kt") public void testNonRawToRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/nonRawToRaw.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/nonRawToRaw.kt"); } @TestMetadata("rawString.kt") public void testRawString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/rawString.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/rawString.kt"); } @TestMetadata("rawToNonRaw.kt") public void testRawToNonRaw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/rawToNonRaw.kt"); - doTest(fileName); + runTest("idea/testData/refactoring/inline/inlineVariableOrProperty/stringTemplates/rawToNonRaw.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java index d2283db31b2..70f96d58498 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java @@ -23,550 +23,469 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceVariable extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceVariableTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousType.kt") public void testAnonymousType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/AnonymousType.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/AnonymousType.kt"); } @TestMetadata("ArrayAccessExpr.kt") public void testArrayAccessExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ArrayAccessExpr.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ArrayAccessExpr.kt"); } @TestMetadata("arrayAssignment.kt") public void testArrayAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/arrayAssignment.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/arrayAssignment.kt"); } @TestMetadata("callUnderSmartCast.kt") public void testCallUnderSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/callUnderSmartCast.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/callUnderSmartCast.kt"); } @TestMetadata("commentSkipping.kt") public void testCommentSkipping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/commentSkipping.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/commentSkipping.kt"); } @TestMetadata("ComplexCallee.kt") public void testComplexCallee() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ComplexCallee.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ComplexCallee.kt"); } @TestMetadata("ConstructorDelegationCall.kt") public void testConstructorDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ConstructorDelegationCall.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ConstructorDelegationCall.kt"); } @TestMetadata("DelegatorByExpressionInDelegate.kt") public void testDelegatorByExpressionInDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DelegatorByExpressionInDelegate.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DelegatorByExpressionInDelegate.kt"); } @TestMetadata("DelegatorByExpressionInType.kt") public void testDelegatorByExpressionInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DelegatorByExpressionInType.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DelegatorByExpressionInType.kt"); } @TestMetadata("DelegatorToSuperCallInArgument.kt") public void testDelegatorToSuperCallInArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DelegatorToSuperCallInArgument.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DelegatorToSuperCallInArgument.kt"); } @TestMetadata("DelegatorToSuperCallInType.kt") public void testDelegatorToSuperCallInType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DelegatorToSuperCallInType.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DelegatorToSuperCallInType.kt"); } @TestMetadata("DelegatorToSuperClass.kt") public void testDelegatorToSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DelegatorToSuperClass.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DelegatorToSuperClass.kt"); } @TestMetadata("DoWhileAddBlock.kt") public void testDoWhileAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt"); } @TestMetadata("DoWhileAddBlockInner.kt") public void testDoWhileAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt"); } @TestMetadata("dynamicType.kt") public void testDynamicType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/dynamicType.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/dynamicType.kt"); } @TestMetadata("FewOccurrences.kt") public void testFewOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/FewOccurrences.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/FewOccurrences.kt"); } @TestMetadata("FunctionAddBlock.kt") public void testFunctionAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/FunctionAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/FunctionAddBlock.kt"); } @TestMetadata("FunctionAddBlockInner.kt") public void testFunctionAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/FunctionAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/FunctionAddBlockInner.kt"); } @TestMetadata("FunctionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/FunctionLiteral.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/FunctionLiteral.kt"); } @TestMetadata("FunctionLiteralFromExpected.kt") public void testFunctionLiteralFromExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/FunctionLiteralFromExpected.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/FunctionLiteralFromExpected.kt"); } @TestMetadata("FunctionLiteralWithExtraArgs.kt") public void testFunctionLiteralWithExtraArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/FunctionLiteralWithExtraArgs.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/FunctionLiteralWithExtraArgs.kt"); } @TestMetadata("IfCondition.kt") public void testIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IfCondition.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IfCondition.kt"); } @TestMetadata("IfElseAddBlock.kt") public void testIfElseAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IfElseAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IfElseAddBlock.kt"); } @TestMetadata("IfElseAddBlockInner.kt") public void testIfElseAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IfElseAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IfElseAddBlockInner.kt"); } @TestMetadata("IfThenAddBlock.kt") public void testIfThenAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IfThenAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IfThenAddBlock.kt"); } @TestMetadata("IfThenAddBlockInner.kt") public void testIfThenAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IfThenAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IfThenAddBlockInner.kt"); } @TestMetadata("IfThenValuedAddBlock.kt") public void testIfThenValuedAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IfThenValuedAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IfThenValuedAddBlock.kt"); } @TestMetadata("InsideOfInitializerAnnotation.kt") public void testInsideOfInitializerAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/InsideOfInitializerAnnotation.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/InsideOfInitializerAnnotation.kt"); } @TestMetadata("IntroduceAndCreateBlock.kt") public void testIntroduceAndCreateBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IntroduceAndCreateBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IntroduceAndCreateBlock.kt"); } @TestMetadata("IntroduceLambdaAndCreateBlock.kt") public void testIntroduceLambdaAndCreateBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/IntroduceLambdaAndCreateBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/IntroduceLambdaAndCreateBlock.kt"); } @TestMetadata("introduceToClass.kt") public void testIntroduceToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/introduceToClass.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/introduceToClass.kt"); } @TestMetadata("introduceToFile.kt") public void testIntroduceToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/introduceToFile.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/introduceToFile.kt"); } @TestMetadata("It.kt") public void testIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/It.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/It.kt"); } @TestMetadata("kt10808.kt") public void testKt10808() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/kt10808.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/kt10808.kt"); } @TestMetadata("kt21530_withConstructorParam.kt") public void testKt21530_withConstructorParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/kt21530_withConstructorParam.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/kt21530_withConstructorParam.kt"); } @TestMetadata("kt21530_withGlobal.kt") public void testKt21530_withGlobal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/kt21530_withGlobal.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/kt21530_withGlobal.kt"); } @TestMetadata("kt21530_withParam.kt") public void testKt21530_withParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/kt21530_withParam.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/kt21530_withParam.kt"); } @TestMetadata("LoopRange.kt") public void testLoopRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/LoopRange.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/LoopRange.kt"); } @TestMetadata("ManyInnerOccurences.kt") public void testManyInnerOccurences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ManyInnerOccurences.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ManyInnerOccurences.kt"); } @TestMetadata("ManyOccurrences.kt") public void testManyOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ManyOccurrences.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ManyOccurrences.kt"); } @TestMetadata("multilineBinaryExpression.kt") public void testMultilineBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multilineBinaryExpression.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multilineBinaryExpression.kt"); } @TestMetadata("multilineBinaryExpressionWithComments.kt") public void testMultilineBinaryExpressionWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multilineBinaryExpressionWithComments.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multilineBinaryExpressionWithComments.kt"); } @TestMetadata("multilineNestedBinaryExpression1.kt") public void testMultilineNestedBinaryExpression1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multilineNestedBinaryExpression1.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multilineNestedBinaryExpression1.kt"); } @TestMetadata("multilineNestedBinaryExpression2.kt") public void testMultilineNestedBinaryExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multilineNestedBinaryExpression2.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multilineNestedBinaryExpression2.kt"); } @TestMetadata("NameSuggestionBug1.kt") public void testNameSuggestionBug1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NameSuggestionBug1.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NameSuggestionBug1.kt"); } @TestMetadata("NameSuggestionBug2.kt") public void testNameSuggestionBug2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NameSuggestionBug2.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NameSuggestionBug2.kt"); } @TestMetadata("NameSuggestionCheckVisibility.kt") public void testNameSuggestionCheckVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NameSuggestionCheckVisibility.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NameSuggestionCheckVisibility.kt"); } @TestMetadata("noConflictWithInnerVariable.kt") public void testNoConflictWithInnerVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/noConflictWithInnerVariable.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/noConflictWithInnerVariable.kt"); } @TestMetadata("NoExplicitReceivers.kt") public void testNoExplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NoExplicitReceivers.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NoExplicitReceivers.kt"); } @TestMetadata("NoExplicitReceiversUnresolved.kt") public void testNoExplicitReceiversUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NoExplicitReceiversUnresolved.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NoExplicitReceiversUnresolved.kt"); } @TestMetadata("NoNewLinesInBetween.kt") public void testNoNewLinesInBetween() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NoNewLinesInBetween.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NoNewLinesInBetween.kt"); } @TestMetadata("NoNewLinesInBetweenNoBraces.kt") public void testNoNewLinesInBetweenNoBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/NoNewLinesInBetweenNoBraces.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/NoNewLinesInBetweenNoBraces.kt"); } @TestMetadata("nonEquivalentReceivers.kt") public void testNonEquivalentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/nonEquivalentReceivers.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/nonEquivalentReceivers.kt"); } @TestMetadata("notNullAssertion.kt") public void testNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/notNullAssertion.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/notNullAssertion.kt"); } @TestMetadata("OccurrencesInStringTemplate.kt") public void testOccurrencesInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/OccurrencesInStringTemplate.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/OccurrencesInStringTemplate.kt"); } @TestMetadata("onAssignmentLHS.kt") public void testOnAssignmentLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/onAssignmentLHS.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/onAssignmentLHS.kt"); } @TestMetadata("OneExplicitReceiver.kt") public void testOneExplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/OneExplicitReceiver.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/OneExplicitReceiver.kt"); } @TestMetadata("PropertyAccessorAddBlock.kt") public void testPropertyAccessorAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/PropertyAccessorAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/PropertyAccessorAddBlock.kt"); } @TestMetadata("PropertyAccessorAddBlockInner.kt") public void testPropertyAccessorAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/PropertyAccessorAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/PropertyAccessorAddBlockInner.kt"); } @TestMetadata("qualifier.kt") public void testQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/qualifier.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/qualifier.kt"); } @TestMetadata("ReplaceOccurence.kt") public void testReplaceOccurence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ReplaceOccurence.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ReplaceOccurence.kt"); } @TestMetadata("selectorAssignment.kt") public void testSelectorAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/selectorAssignment.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/selectorAssignment.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/Simple.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/Simple.kt"); } @TestMetadata("SimpleCreateValue.kt") public void testSimpleCreateValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/SimpleCreateValue.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/SimpleCreateValue.kt"); } @TestMetadata("skipClassReference.kt") public void testSkipClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/skipClassReference.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/skipClassReference.kt"); } @TestMetadata("skipUsageInAssignmentLHS.kt") public void testSkipUsageInAssignmentLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/skipUsageInAssignmentLHS.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/skipUsageInAssignmentLHS.kt"); } @TestMetadata("StringInjection.kt") public void testStringInjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/StringInjection.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/StringInjection.kt"); } @TestMetadata("SuperReference.kt") public void testSuperReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/SuperReference.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/SuperReference.kt"); } @TestMetadata("thisAsCallee.kt") public void testThisAsCallee() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/thisAsCallee.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/thisAsCallee.kt"); } @TestMetadata("ThisReference.kt") public void testThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/ThisReference.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/ThisReference.kt"); } @TestMetadata("TwoExplicitReceivers.kt") public void testTwoExplicitReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/TwoExplicitReceivers.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/TwoExplicitReceivers.kt"); } @TestMetadata("TypeElement.kt") public void testTypeElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/TypeElement.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/TypeElement.kt"); } @TestMetadata("UnresolvedOccurrences.kt") public void testUnresolvedOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/UnresolvedOccurrences.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/UnresolvedOccurrences.kt"); } @TestMetadata("UsedAndUnusedExpressions1.kt") public void testUsedAndUnusedExpressions1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/UsedAndUnusedExpressions1.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/UsedAndUnusedExpressions1.kt"); } @TestMetadata("UsedAndUnusedExpressions2.kt") public void testUsedAndUnusedExpressions2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/UsedAndUnusedExpressions2.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/UsedAndUnusedExpressions2.kt"); } @TestMetadata("WhenAddBlock.kt") public void testWhenAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhenAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhenAddBlock.kt"); } @TestMetadata("WhenAddBlockInner.kt") public void testWhenAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhenAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhenAddBlockInner.kt"); } @TestMetadata("WhenEntryCondition.kt") public void testWhenEntryCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhenEntryCondition.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhenEntryCondition.kt"); } @TestMetadata("WhenParts.kt") public void testWhenParts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhenParts.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhenParts.kt"); } @TestMetadata("WhenValuedAddBlock.kt") public void testWhenValuedAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhenValuedAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhenValuedAddBlock.kt"); } @TestMetadata("WhileAddBlock.kt") public void testWhileAddBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhileAddBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhileAddBlock.kt"); } @TestMetadata("WhileAddBlockInner.kt") public void testWhileAddBlockInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt"); } @TestMetadata("WhileCondition.kt") public void testWhileCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/WhileCondition.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/WhileCondition.kt"); } @TestMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicateTypeArguments extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceVariableTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExplicateTypeArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/explicateTypeArguments"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("DeeperNestedCall.kt") public void testDeeperNestedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments/DeeperNestedCall.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/explicateTypeArguments/DeeperNestedCall.kt"); } @TestMetadata("NestedCall.kt") public void testNestedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments/NestedCall.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/explicateTypeArguments/NestedCall.kt"); } @TestMetadata("Parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments/Parenthesized.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/explicateTypeArguments/Parenthesized.kt"); } @TestMetadata("Qualified.kt") public void testQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments/Qualified.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/explicateTypeArguments/Qualified.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments/Simple.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/explicateTypeArguments/Simple.kt"); } @TestMetadata("UnmatchedOccurrences.kt") public void testUnmatchedOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/explicateTypeArguments/UnmatchedOccurrences.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/explicateTypeArguments/UnmatchedOccurrences.kt"); } } @@ -574,74 +493,67 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtractToScope extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceVariableTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtractToScope() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/extractToScope"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("implicitOuterThisInsideNestedLamba.kt") public void testImplicitOuterThisInsideNestedLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/implicitOuterThisInsideNestedLamba.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/implicitOuterThisInsideNestedLamba.kt"); } @TestMetadata("implicitThisInsideNestedLamba.kt") public void testImplicitThisInsideNestedLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/implicitThisInsideNestedLamba.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/implicitThisInsideNestedLamba.kt"); } @TestMetadata("insideFunExpression.kt") public void testInsideFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideFunExpression.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideFunExpression.kt"); } @TestMetadata("insideFunExpressionWithBlock.kt") public void testInsideFunExpressionWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideFunExpressionWithBlock.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideFunExpressionWithBlock.kt"); } @TestMetadata("insideLamba.kt") public void testInsideLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideLamba.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideLamba.kt"); } @TestMetadata("insideNestedFunExpression.kt") public void testInsideNestedFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedFunExpression.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedFunExpression.kt"); } @TestMetadata("insideNestedFunExpressionInLambda.kt") public void testInsideNestedFunExpressionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedFunExpressionInLambda.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedFunExpressionInLambda.kt"); } @TestMetadata("insideNestedLamba.kt") public void testInsideNestedLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedLamba.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedLamba.kt"); } @TestMetadata("insideNestedLambdaInFunExpression.kt") public void testInsideNestedLambdaInFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedLambdaInFunExpression.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/insideNestedLambdaInFunExpression.kt"); } @TestMetadata("itInsideNestedLamba.kt") public void testItInsideNestedLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/itInsideNestedLamba.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/itInsideNestedLamba.kt"); } @TestMetadata("outerItInsideNestedLamba.kt") public void testOuterItInsideNestedLamba() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/extractToScope/outerItInsideNestedLamba.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/extractToScope/outerItInsideNestedLamba.kt"); } } @@ -649,62 +561,57 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDeclarations extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceVariableTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/multiDeclarations"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/array.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/array.kt"); } @TestMetadata("intArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/intArray.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/intArray.kt"); } @TestMetadata("list.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/list.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/list.kt"); } @TestMetadata("notOperators.kt") public void testNotOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/notOperators.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/notOperators.kt"); } @TestMetadata("singleComponent.kt") public void testSingleComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/singleComponent.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/singleComponent.kt"); } @TestMetadata("unresolvedComponent3.kt") public void testUnresolvedComponent3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/unresolvedComponent3.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/unresolvedComponent3.kt"); } @TestMetadata("unusedExpr.kt") public void testUnusedExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/unusedExpr.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/unusedExpr.kt"); } @TestMetadata("usedExpr.kt") public void testUsedExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/usedExpr.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/usedExpr.kt"); } @TestMetadata("userDataClass.kt") public void testUserDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/multiDeclarations/userDataClass.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/multiDeclarations/userDataClass.kt"); } } @@ -712,26 +619,27 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceVariableTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ExpressionPart.kts") public void testExpressionPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/script/ExpressionPart.kts"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/script/ExpressionPart.kts"); } @TestMetadata("NotExpression.kts") public void testNotExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/script/NotExpression.kts"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/script/NotExpression.kts"); } @TestMetadata("TopLevelExpression.kts") public void testTopLevelExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/script/TopLevelExpression.kts"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/script/TopLevelExpression.kts"); } } @@ -739,110 +647,97 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceVariableTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceVariable/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("brokenEntryWithBlockExpr.kt") public void testBrokenEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/brokenEntryWithBlockExpr.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/brokenEntryWithBlockExpr.kt"); } @TestMetadata("brokenEntryWithExpr.kt") public void testBrokenEntryWithExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/brokenEntryWithExpr.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/brokenEntryWithExpr.kt"); } @TestMetadata("brokenEscapeEntry.kt") public void testBrokenEscapeEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/brokenEscapeEntry.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/brokenEscapeEntry.kt"); } @TestMetadata("extractFalse.kt") public void testExtractFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/extractFalse.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/extractFalse.kt"); } @TestMetadata("extractIntegerLiteral.kt") public void testExtractIntegerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/extractIntegerLiteral.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/extractIntegerLiteral.kt"); } @TestMetadata("extractTrue.kt") public void testExtractTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/extractTrue.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/extractTrue.kt"); } @TestMetadata("extractTrueWithSpaces.kt") public void testExtractTrueWithSpaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/extractTrueWithSpaces.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/extractTrueWithSpaces.kt"); } @TestMetadata("fullContent.kt") public void testFullContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/fullContent.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/fullContent.kt"); } @TestMetadata("fullEntryWithBlockExpr.kt") public void testFullEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/fullEntryWithBlockExpr.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/fullEntryWithBlockExpr.kt"); } @TestMetadata("fullEntryWithSimpleName.kt") public void testFullEntryWithSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/fullEntryWithSimpleName.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/fullEntryWithSimpleName.kt"); } @TestMetadata("multipleEntriesWithPrefix.kt") public void testMultipleEntriesWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/multipleEntriesWithPrefix.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/multipleEntriesWithPrefix.kt"); } @TestMetadata("multipleEntriesWithSubstring.kt") public void testMultipleEntriesWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/multipleEntriesWithSubstring.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/multipleEntriesWithSubstring.kt"); } @TestMetadata("multipleEntriesWithSuffix.kt") public void testMultipleEntriesWithSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/multipleEntriesWithSuffix.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/multipleEntriesWithSuffix.kt"); } @TestMetadata("rawTemplateWithSubstring.kt") public void testRawTemplateWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/rawTemplateWithSubstring.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/rawTemplateWithSubstring.kt"); } @TestMetadata("singleEntryPrefix.kt") public void testSingleEntryPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/singleEntryPrefix.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/singleEntryPrefix.kt"); } @TestMetadata("singleEntrySubstring.kt") public void testSingleEntrySubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/singleEntrySubstring.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/singleEntrySubstring.kt"); } @TestMetadata("singleEntrySuffix.kt") public void testSingleEntrySuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceVariable/stringTemplates/singleEntrySuffix.kt"); - doIntroduceVariableTest(fileName); + runTest("idea/testData/refactoring/introduceVariable/stringTemplates/singleEntrySuffix.kt"); } } } @@ -851,6 +746,10 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtractFunction extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtractFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -859,302 +758,257 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Basic extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBasic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/basic"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callWithPlatformTypeReceiver.kt") public void testCallWithPlatformTypeReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/callWithPlatformTypeReceiver.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/callWithPlatformTypeReceiver.kt"); } @TestMetadata("callableReferenceSelector.kt") public void testCallableReferenceSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/callableReferenceSelector.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/callableReferenceSelector.kt"); } @TestMetadata("calleeExpression.kt") public void testCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/calleeExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/calleeExpression.kt"); } @TestMetadata("classQualifier.kt") public void testClassQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/classQualifier.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/classQualifier.kt"); } @TestMetadata("companionObjectMemberRef.kt") public void testCompanionObjectMemberRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/companionObjectMemberRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/companionObjectMemberRef.kt"); } @TestMetadata("convertBinaryExpression.kt") public void testConvertBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/convertBinaryExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/convertBinaryExpression.kt"); } @TestMetadata("convertInfixExpression.kt") public void testConvertInfixExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/convertInfixExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/convertInfixExpression.kt"); } @TestMetadata("delegatingFunction.kt") public void testDelegatingFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/delegatingFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/delegatingFunction.kt"); } @TestMetadata("enumQualifier.kt") public void testEnumQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/enumQualifier.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/enumQualifier.kt"); } @TestMetadata("extensionFunForArray.kt") public void testExtensionFunForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/extensionFunForArray.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/extensionFunForArray.kt"); } @TestMetadata("extractBlockContent.kt") public void testExtractBlockContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/extractBlockContent.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/extractBlockContent.kt"); } @TestMetadata("extractFromPrivateInlineFun.kt") public void testExtractFromPrivateInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/extractFromPrivateInlineFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/extractFromPrivateInlineFun.kt"); } @TestMetadata("extractFromPublicInlineFun.kt") public void testExtractFromPublicInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/extractFromPublicInlineFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/extractFromPublicInlineFun.kt"); } @TestMetadata("extractSuspend.kt") public void testExtractSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/extractSuspend.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/extractSuspend.kt"); } @TestMetadata("extractToEnumClassBody.kt") public void testExtractToEnumClassBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/extractToEnumClassBody.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/extractToEnumClassBody.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/fakeOverride.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/fakeOverride.kt"); } @TestMetadata("fragmentWithComment.kt") public void testFragmentWithComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/fragmentWithComment.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/fragmentWithComment.kt"); } @TestMetadata("fragmentWithMultilineComment.kt") public void testFragmentWithMultilineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/fragmentWithMultilineComment.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/fragmentWithMultilineComment.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/identityEquals.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/identityEquals.kt"); } @TestMetadata("invisibleType.kt") public void testInvisibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/invisibleType.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/invisibleType.kt"); } @TestMetadata("lineWithSemicolon.kt") public void testLineWithSemicolon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/lineWithSemicolon.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/lineWithSemicolon.kt"); } @TestMetadata("localClassExtraction.kt") public void testLocalClassExtraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localClassExtraction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localClassExtraction.kt"); } @TestMetadata("localClassFunctionRef.kt") public void testLocalClassFunctionRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localClassFunctionRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localClassFunctionRef.kt"); } @TestMetadata("localClassPropertyRef.kt") public void testLocalClassPropertyRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localClassPropertyRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localClassPropertyRef.kt"); } @TestMetadata("localExtraction.kt") public void testLocalExtraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localExtraction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localExtraction.kt"); } @TestMetadata("localFunExtraction.kt") public void testLocalFunExtraction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localFunExtraction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localFunExtraction.kt"); } @TestMetadata("localFunctionInTheMiddleSimpleControlFlow.kt") public void testLocalFunctionInTheMiddleSimpleControlFlow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localFunctionInTheMiddleSimpleControlFlow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localFunctionInTheMiddleSimpleControlFlow.kt"); } @TestMetadata("localFunctionInTheMiddleUnusedVar.kt") public void testLocalFunctionInTheMiddleUnusedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localFunctionInTheMiddleUnusedVar.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localFunctionInTheMiddleUnusedVar.kt"); } @TestMetadata("localFunctionInTheMiddleUsedVar.kt") public void testLocalFunctionInTheMiddleUsedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localFunctionInTheMiddleUsedVar.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localFunctionInTheMiddleUsedVar.kt"); } @TestMetadata("localFunctionRef.kt") public void testLocalFunctionRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localFunctionRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localFunctionRef.kt"); } @TestMetadata("localObjectRef.kt") public void testLocalObjectRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/localObjectRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/localObjectRef.kt"); } @TestMetadata("malformedExpression.kt") public void testMalformedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/malformedExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/malformedExpression.kt"); } @TestMetadata("malformedStatements.kt") public void testMalformedStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/malformedStatements.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/malformedStatements.kt"); } @TestMetadata("memberValUnderSmartCast.kt") public void testMemberValUnderSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/memberValUnderSmartCast.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/memberValUnderSmartCast.kt"); } @TestMetadata("memberValUnderSmartCastAndImplicitReceiver.kt") public void testMemberValUnderSmartCastAndImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/memberValUnderSmartCastAndImplicitReceiver.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/memberValUnderSmartCastAndImplicitReceiver.kt"); } @TestMetadata("misdirectedRef.kt") public void testMisdirectedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/misdirectedRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/misdirectedRef.kt"); } @TestMetadata("noConflictWithInnerFunction.kt") public void testNoConflictWithInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/noConflictWithInnerFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/noConflictWithInnerFunction.kt"); } @TestMetadata("objectQualifier.kt") public void testObjectQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/objectQualifier.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/objectQualifier.kt"); } @TestMetadata("packageQualifier.kt") public void testPackageQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/packageQualifier.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/packageQualifier.kt"); } @TestMetadata("privateMemberInClassObject.kt") public void testPrivateMemberInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/privateMemberInClassObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/privateMemberInClassObject.kt"); } @TestMetadata("privateMemberRef.kt") public void testPrivateMemberRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/privateMemberRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/privateMemberRef.kt"); } @TestMetadata("privateNestedClass.kt") public void testPrivateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/privateNestedClass.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/privateNestedClass.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/privateSetter.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/privateSetter.kt"); } @TestMetadata("refInReturn.kt") public void testRefInReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/refInReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/refInReturn.kt"); } @TestMetadata("suspendCall.kt") public void testSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/suspendCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/suspendCall.kt"); } @TestMetadata("suspendCallWithExtractedParameter.kt") public void testSuspendCallWithExtractedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/suspendCallWithExtractedParameter.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/suspendCallWithExtractedParameter.kt"); } @TestMetadata("topLevelValUnderSmartCast.kt") public void testTopLevelValUnderSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/topLevelValUnderSmartCast.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/topLevelValUnderSmartCast.kt"); } @TestMetadata("traitFunction.kt") public void testTraitFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/traitFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/traitFunction.kt"); } @TestMetadata("unresolvedWrongReceiver.kt") public void testUnresolvedWrongReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/unresolvedWrongReceiver.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/basic/unresolvedWrongReceiver.kt"); } } @@ -1162,6 +1016,10 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -1170,68 +1028,62 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConditionalJumps extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConditionalJumps() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("conditionalBreakWithIf.kt") public void testConditionalBreakWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithIf.kt"); } @TestMetadata("conditionalBreakWithIfAndExtraVars.kt") public void testConditionalBreakWithIfAndExtraVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithIfAndExtraVars.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithIfAndExtraVars.kt"); } @TestMetadata("conditionalBreakWithIfElse.kt") public void testConditionalBreakWithIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithIfElse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithIfElse.kt"); } @TestMetadata("conditionalBreakWithWhen.kt") public void testConditionalBreakWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalBreakWithWhen.kt"); } @TestMetadata("conditionalReturnWithIf.kt") public void testConditionalReturnWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalReturnWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalReturnWithIf.kt"); } @TestMetadata("conditionalReturnWithIfElse.kt") public void testConditionalReturnWithIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalReturnWithIfElse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalReturnWithIfElse.kt"); } @TestMetadata("conditionalReturnWithWhen.kt") public void testConditionalReturnWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalReturnWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/conditionalReturnWithWhen.kt"); } @TestMetadata("unconditionalBreakWithIf.kt") public void testUnconditionalBreakWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/unconditionalBreakWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/unconditionalBreakWithIf.kt"); } @TestMetadata("unconditionalBreakWithIfElse.kt") public void testUnconditionalBreakWithIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/unconditionalBreakWithIfElse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/unconditionalBreakWithIfElse.kt"); } @TestMetadata("unconditionalBreakWithWhen.kt") public void testUnconditionalBreakWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/unconditionalBreakWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/conditionalJumps/unconditionalBreakWithWhen.kt"); } } @@ -1239,50 +1091,47 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Default extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefault() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/default"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("defaultCF.kt") public void testDefaultCF() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/defaultCF.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/defaultCF.kt"); } @TestMetadata("defaultCFWithExtraVars.kt") public void testDefaultCFWithExtraVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/defaultCFWithExtraVars.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/defaultCFWithExtraVars.kt"); } @TestMetadata("defaultCFWithJumps.kt") public void testDefaultCFWithJumps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/defaultCFWithJumps.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/defaultCFWithJumps.kt"); } @TestMetadata("ignoredReturnValueWithIf.kt") public void testIgnoredReturnValueWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithIf.kt"); } @TestMetadata("ignoredReturnValueWithIfNoBlocks.kt") public void testIgnoredReturnValueWithIfNoBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithIfNoBlocks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithIfNoBlocks.kt"); } @TestMetadata("ignoredReturnValueWithWhen.kt") public void testIgnoredReturnValueWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithWhen.kt"); } @TestMetadata("ignoredReturnValueWithWhenNoBlocks.kt") public void testIgnoredReturnValueWithWhenNoBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithWhenNoBlocks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/default/ignoredReturnValueWithWhenNoBlocks.kt"); } } @@ -1290,56 +1139,52 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefiniteReturns extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefiniteReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("definiteReturnWithIf.kt") public void testDefiniteReturnWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/definiteReturnWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/definiteReturnWithIf.kt"); } @TestMetadata("definiteReturnWithWhen.kt") public void testDefiniteReturnWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/definiteReturnWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/definiteReturnWithWhen.kt"); } @TestMetadata("labeledAndUnlabeledReturn1.kt") public void testLabeledAndUnlabeledReturn1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/labeledAndUnlabeledReturn1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/labeledAndUnlabeledReturn1.kt"); } @TestMetadata("labeledAndUnlabeledReturn2.kt") public void testLabeledAndUnlabeledReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/labeledAndUnlabeledReturn2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/labeledAndUnlabeledReturn2.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/nonLocalReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/nonLocalReturn.kt"); } @TestMetadata("nonLocalReturnWithLabel.kt") public void testNonLocalReturnWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/nonLocalReturnWithLabel.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/nonLocalReturnWithLabel.kt"); } @TestMetadata("returnWithLabel.kt") public void testReturnWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/returnWithLabel.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/returnWithLabel.kt"); } @TestMetadata("singleDefiniteReturn.kt") public void testSingleDefiniteReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/singleDefiniteReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/definiteReturns/singleDefiniteReturn.kt"); } } @@ -1347,92 +1192,82 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluateExpression extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEvaluateExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("evalExprInIfCondition.kt") public void testEvalExprInIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInIfCondition.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInIfCondition.kt"); } @TestMetadata("evalExprInIfElse.kt") public void testEvalExprInIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInIfElse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInIfElse.kt"); } @TestMetadata("evalExprInIfThen.kt") public void testEvalExprInIfThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInIfThen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInIfThen.kt"); } @TestMetadata("evalExprInWhenBranch.kt") public void testEvalExprInWhenBranch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInWhenBranch.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInWhenBranch.kt"); } @TestMetadata("evalExprInWhenCondition.kt") public void testEvalExprInWhenCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInWhenCondition.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInWhenCondition.kt"); } @TestMetadata("evalExprInWhenSubject.kt") public void testEvalExprInWhenSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInWhenSubject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExprInWhenSubject.kt"); } @TestMetadata("evalExpressionBodyFunction.kt") public void testEvalExpressionBodyFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExpressionBodyFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalExpressionBodyFunction.kt"); } @TestMetadata("evalIfExpr.kt") public void testEvalIfExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalIfExpr.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalIfExpr.kt"); } @TestMetadata("evalWhenExpr.kt") public void testEvalWhenExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalWhenExpr.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/evalWhenExpr.kt"); } @TestMetadata("simpleEvalExpr.kt") public void testSimpleEvalExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/simpleEvalExpr.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/simpleEvalExpr.kt"); } @TestMetadata("trailingLambdaEmptyArgList.kt") public void testTrailingLambdaEmptyArgList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaEmptyArgList.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaEmptyArgList.kt"); } @TestMetadata("trailingLambdaNoArgList.kt") public void testTrailingLambdaNoArgList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaNoArgList.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaNoArgList.kt"); } @TestMetadata("trailingLambdaNonEmptyArgList.kt") public void testTrailingLambdaNonEmptyArgList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaNonEmptyArgList.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaNonEmptyArgList.kt"); } @TestMetadata("trailingLambdaNonEmptyArgListWithNamedArgs.kt") public void testTrailingLambdaNonEmptyArgListWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaNonEmptyArgListWithNamedArgs.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/evaluateExpression/trailingLambdaNonEmptyArgListWithNamedArgs.kt"); } } @@ -1440,56 +1275,52 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExitPointEquivalence extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExitPointEquivalence() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("breakAndReturn.kt") public void testBreakAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakAndReturn.kt"); } @TestMetadata("breakContinueAndDefault.kt") public void testBreakContinueAndDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/breakContinueAndDefault.kt"); } @TestMetadata("continueAndReturn.kt") public void testContinueAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/continueAndReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/continueAndReturn.kt"); } @TestMetadata("defaultAndBreak.kt") public void testDefaultAndBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndBreak.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndBreak.kt"); } @TestMetadata("defaultAndContinue.kt") public void testDefaultAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndContinue.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndContinue.kt"); } @TestMetadata("defaultAndReturn.kt") public void testDefaultAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndReturn.kt"); } @TestMetadata("defaultAndReturnInWhen.kt") public void testDefaultAndReturnInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndReturnInWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/defaultAndReturnInWhen.kt"); } @TestMetadata("multipleBreaks.kt") public void testMultipleBreaks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/multipleBreaks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/exitPointEquivalence/multipleBreaks.kt"); } } @@ -1497,50 +1328,47 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Initializer extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInitializer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/initializer"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("propertyWithInitializer.kt") public void testPropertyWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithInitializer.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithInitializer.kt"); } @TestMetadata("propertyWithInitializerAndExtraVars.kt") public void testPropertyWithInitializerAndExtraVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithInitializerAndExtraVars.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithInitializerAndExtraVars.kt"); } @TestMetadata("propertyWithInitializerAndUnusedVars.kt") public void testPropertyWithInitializerAndUnusedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithInitializerAndUnusedVars.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithInitializerAndUnusedVars.kt"); } @TestMetadata("propertyWithSeparateInitializer.kt") public void testPropertyWithSeparateInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithSeparateInitializer.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/propertyWithSeparateInitializer.kt"); } @TestMetadata("valueUsedInAnonymousObject.kt") public void testValueUsedInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/valueUsedInAnonymousObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/valueUsedInAnonymousObject.kt"); } @TestMetadata("valueUsedInLambda.kt") public void testValueUsedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/valueUsedInLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/valueUsedInLambda.kt"); } @TestMetadata("valueUsedInLocalFunction.kt") public void testValueUsedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/initializer/valueUsedInLocalFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/initializer/valueUsedInLocalFunction.kt"); } } @@ -1548,158 +1376,137 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OutputValues extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInOutputValues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/outputValues"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("genericPair.kt") public void testGenericPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/genericPair.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/genericPair.kt"); } @TestMetadata("initializersAndUpdate.kt") public void testInitializersAndUpdate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/initializersAndUpdate.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/initializersAndUpdate.kt"); } @TestMetadata("nestedNonInlinableCall.kt") public void testNestedNonInlinableCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/nestedNonInlinableCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/nestedNonInlinableCall.kt"); } @TestMetadata("outputValueWithExpression.kt") public void testOutputValueWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValueWithExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValueWithExpression.kt"); } @TestMetadata("outputValueWithReturn.kt") public void testOutputValueWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValueWithReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValueWithReturn.kt"); } @TestMetadata("outputValueWithSingleLineExpression.kt") public void testOutputValueWithSingleLineExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValueWithSingleLineExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValueWithSingleLineExpression.kt"); } @TestMetadata("outputValuesWithExpression.kt") public void testOutputValuesWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValuesWithExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/outputValuesWithExpression.kt"); } @TestMetadata("pair.kt") public void testPair() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pair.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pair.kt"); } @TestMetadata("pairOfInitalizersWithNonLocalUsages.kt") public void testPairOfInitalizersWithNonLocalUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairOfInitalizersWithNonLocalUsages.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairOfInitalizersWithNonLocalUsages.kt"); } @TestMetadata("pairOfVarInitalizersWithNonLocalUsages.kt") public void testPairOfVarInitalizersWithNonLocalUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairOfVarInitalizersWithNonLocalUsages.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairOfVarInitalizersWithNonLocalUsages.kt"); } @TestMetadata("pairWithIf.kt") public void testPairWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithIf.kt"); } @TestMetadata("pairWithNameClash.kt") public void testPairWithNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithNameClash.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithNameClash.kt"); } @TestMetadata("pairWithWhen.kt") public void testPairWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/pairWithWhen.kt"); } @TestMetadata("singleOutputValue.kt") public void testSingleOutputValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValue.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValue.kt"); } @TestMetadata("singleOutputValueWithIf.kt") public void testSingleOutputValueWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithIf.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithIf.kt"); } @TestMetadata("singleOutputValueWithIfElse.kt") public void testSingleOutputValueWithIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithIfElse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithIfElse.kt"); } @TestMetadata("singleOutputValueWithWhen.kt") public void testSingleOutputValueWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithWhen.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithWhen.kt"); } @TestMetadata("singleOutputValueWithWhenElse.kt") public void testSingleOutputValueWithWhenElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithWhenElse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/singleOutputValueWithWhenElse.kt"); } @TestMetadata("tooManyOutputValues.kt") public void testTooManyOutputValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/tooManyOutputValues.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/tooManyOutputValues.kt"); } @TestMetadata("tooManyOutputValuesAsList.kt") public void testTooManyOutputValuesAsList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/tooManyOutputValuesAsList.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/tooManyOutputValuesAsList.kt"); } @TestMetadata("triple.kt") public void testTriple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/triple.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/triple.kt"); } @TestMetadata("usedAndUnusedOutputValues.kt") public void testUsedAndUnusedOutputValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/usedAndUnusedOutputValues.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/usedAndUnusedOutputValues.kt"); } @TestMetadata("valAndVarInitalizersWithNonLocalUsages.kt") public void testValAndVarInitalizersWithNonLocalUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/valAndVarInitalizersWithNonLocalUsages.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/valAndVarInitalizersWithNonLocalUsages.kt"); } @TestMetadata("valuesUsedInLambdaOnly.kt") public void testValuesUsedInLambdaOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/valuesUsedInLambdaOnly.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/valuesUsedInLambdaOnly.kt"); } @TestMetadata("valuesUsedInNestedBlock.kt") public void testValuesUsedInNestedBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/outputValues/valuesUsedInNestedBlock.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/outputValues/valuesUsedInNestedBlock.kt"); } } @@ -1707,26 +1514,27 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnTypeCandidates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturnTypeCandidates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("javaAnnotatedNotNull.kt") public void testJavaAnnotatedNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates/javaAnnotatedNotNull.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates/javaAnnotatedNotNull.kt"); } @TestMetadata("javaAnnotatedNullable.kt") public void testJavaAnnotatedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates/javaAnnotatedNullable.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates/javaAnnotatedNullable.kt"); } @TestMetadata("javaNoNullabilityAnnotation.kt") public void testJavaNoNullabilityAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates/javaNoNullabilityAnnotation.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/returnTypeCandidates/javaNoNullabilityAnnotation.kt"); } } @@ -1734,50 +1542,47 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Throws extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThrows() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/throws"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("breakWithThrow.kt") public void testBreakWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/breakWithThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/breakWithThrow.kt"); } @TestMetadata("continueWithThrow.kt") public void testContinueWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/continueWithThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/continueWithThrow.kt"); } @TestMetadata("evalExpressionWithThrow.kt") public void testEvalExpressionWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/evalExpressionWithThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/evalExpressionWithThrow.kt"); } @TestMetadata("implicitThrow.kt") public void testImplicitThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/implicitThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/implicitThrow.kt"); } @TestMetadata("nonValuedReturnWithThrow.kt") public void testNonValuedReturnWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/nonValuedReturnWithThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/nonValuedReturnWithThrow.kt"); } @TestMetadata("outputValueWithThrow.kt") public void testOutputValueWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/outputValueWithThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/outputValueWithThrow.kt"); } @TestMetadata("returnWithThrow.kt") public void testReturnWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/throws/returnWithThrow.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/throws/returnWithThrow.kt"); } } @@ -1785,50 +1590,47 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unextractable extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnextractable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/controlFlow/unextractable"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/anonymousObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/anonymousObject.kt"); } @TestMetadata("evalExpressionWithReturn.kt") public void testEvalExpressionWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/evalExpressionWithReturn.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/evalExpressionWithReturn.kt"); } @TestMetadata("jumpsAndReturns.kt") public void testJumpsAndReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/jumpsAndReturns.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/jumpsAndReturns.kt"); } @TestMetadata("multipleJumps.kt") public void testMultipleJumps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/multipleJumps.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/multipleJumps.kt"); } @TestMetadata("multipleReturnsWithDefault.kt") public void testMultipleReturnsWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/multipleReturnsWithDefault.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/multipleReturnsWithDefault.kt"); } @TestMetadata("unmatchedReturnTargets.kt") public void testUnmatchedReturnTargets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/unmatchedReturnTargets.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/unmatchedReturnTargets.kt"); } @TestMetadata("variablesOutOfScope.kt") public void testVariablesOutOfScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/controlFlow/unextractable/variablesOutOfScope.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/controlFlow/unextractable/variablesOutOfScope.kt"); } } } @@ -1837,50 +1639,47 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultContainer extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultContainer() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/defaultContainer"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/anonymousObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/anonymousObject.kt"); } @TestMetadata("classFunction.kt") public void testClassFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/classFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/classFunction.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/lambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/lambda.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/localClass.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/localClass.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/localFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/localFunction.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/nestedLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/nestedLambda.kt"); } @TestMetadata("topLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/defaultContainer/topLevelFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/defaultContainer/topLevelFunction.kt"); } } @@ -1888,26 +1687,27 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/delegation"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("delegationByExpression.kt") public void testDelegationByExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/delegation/delegationByExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/delegation/delegationByExpression.kt"); } @TestMetadata("delegationByExpressionFull.kt") public void testDelegationByExpressionFull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/delegation/delegationByExpressionFull.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/delegation/delegationByExpressionFull.kt"); } @TestMetadata("delegationBySuperCall.kt") public void testDelegationBySuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/delegation/delegationBySuperCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/delegation/delegationBySuperCall.kt"); } } @@ -1915,74 +1715,67 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Duplicates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDuplicates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/duplicates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("branchingMatch1.kt") public void testBranchingMatch1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/branchingMatch1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/branchingMatch1.kt"); } @TestMetadata("branchingMatch2.kt") public void testBranchingMatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/branchingMatch2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/branchingMatch2.kt"); } @TestMetadata("defaultCF.kt") public void testDefaultCF() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/defaultCF.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/defaultCF.kt"); } @TestMetadata("insertAfterDuplicates.kt") public void testInsertAfterDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/insertAfterDuplicates.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/insertAfterDuplicates.kt"); } @TestMetadata("insertBeforeDuplicates.kt") public void testInsertBeforeDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/insertBeforeDuplicates.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/insertBeforeDuplicates.kt"); } @TestMetadata("multipleOutputValuesMatching.kt") public void testMultipleOutputValuesMatching() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/multipleOutputValuesMatching.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/multipleOutputValuesMatching.kt"); } @TestMetadata("nestedStrongMatch.kt") public void testNestedStrongMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/nestedStrongMatch.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/nestedStrongMatch.kt"); } @TestMetadata("notNullAssertion.kt") public void testNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/notNullAssertion.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/notNullAssertion.kt"); } @TestMetadata("outputValueAndUnitMatching.kt") public void testOutputValueAndUnitMatching() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/outputValueAndUnitMatching.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/outputValueAndUnitMatching.kt"); } @TestMetadata("outputValueMatching.kt") public void testOutputValueMatching() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/outputValueMatching.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/outputValueMatching.kt"); } @TestMetadata("singleExpression.kt") public void testSingleExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/duplicates/singleExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/duplicates/singleExpression.kt"); } } @@ -1990,6 +1783,10 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Initializers extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInitializers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -1998,32 +1795,32 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/accessors"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/accessors/memberProperty.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/accessors/memberProperty.kt"); } @TestMetadata("memberPropertyWithLambda.kt") public void testMemberPropertyWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/accessors/memberPropertyWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/accessors/memberPropertyWithLambda.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/accessors/topLevelProperty.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/accessors/topLevelProperty.kt"); } @TestMetadata("topLevelPropertyWithLambda.kt") public void testTopLevelPropertyWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/accessors/topLevelPropertyWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/accessors/topLevelPropertyWithLambda.kt"); } } @@ -2031,32 +1828,32 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/classes"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("classInitializer.kt") public void testClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt"); } @TestMetadata("classInitializerWithLambda.kt") public void testClassInitializerWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt"); } @TestMetadata("classParameters.kt") public void testClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/classes/classParameters.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/classes/classParameters.kt"); } @TestMetadata("classParametersWithLambda.kt") public void testClassParametersWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/classes/classParametersWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/classes/classParametersWithLambda.kt"); } } @@ -2064,80 +1861,72 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/functions"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/localFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/localFunction.kt"); } @TestMetadata("localFunctionParameters.kt") public void testLocalFunctionParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/localFunctionParameters.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/localFunctionParameters.kt"); } @TestMetadata("localFunctionParametersWithLambda.kt") public void testLocalFunctionParametersWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/localFunctionParametersWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/localFunctionParametersWithLambda.kt"); } @TestMetadata("localFunctionWithLambda.kt") public void testLocalFunctionWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/localFunctionWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/localFunctionWithLambda.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/memberFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/memberFunction.kt"); } @TestMetadata("memberFunctionParameters.kt") public void testMemberFunctionParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/memberFunctionParameters.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/memberFunctionParameters.kt"); } @TestMetadata("memberFunctionParametersWithLambda.kt") public void testMemberFunctionParametersWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/memberFunctionParametersWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/memberFunctionParametersWithLambda.kt"); } @TestMetadata("memberFunctionWithLambda.kt") public void testMemberFunctionWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/memberFunctionWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/memberFunctionWithLambda.kt"); } @TestMetadata("topLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunction.kt"); } @TestMetadata("topLevelFunctionParameters.kt") public void testTopLevelFunctionParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunctionParameters.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunctionParameters.kt"); } @TestMetadata("topLevelFunctionParametersWithLambda.kt") public void testTopLevelFunctionParametersWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunctionParametersWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunctionParametersWithLambda.kt"); } @TestMetadata("topLevelFunctionWithLambda.kt") public void testTopLevelFunctionWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunctionWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/functions/topLevelFunctionWithLambda.kt"); } } @@ -2145,56 +1934,52 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/initializers/properties"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/localProperty.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/localProperty.kt"); } @TestMetadata("localPropertyWithLambda.kt") public void testLocalPropertyWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/localPropertyWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/localPropertyWithLambda.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/memberProperty.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/memberProperty.kt"); } @TestMetadata("memberPropertyWithLambda.kt") public void testMemberPropertyWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/memberPropertyWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/memberPropertyWithLambda.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/multiDeclaration.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/multiDeclaration.kt"); } @TestMetadata("nestedInMultiDeclaration.kt") public void testNestedInMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/nestedInMultiDeclaration.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/nestedInMultiDeclaration.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/topLevelProperty.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/topLevelProperty.kt"); } @TestMetadata("topLevelPropertyWithLambda.kt") public void testTopLevelPropertyWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/initializers/properties/topLevelPropertyWithLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/initializers/properties/topLevelPropertyWithLambda.kt"); } } } @@ -2203,32 +1988,32 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiline extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/multiline"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("multilineBinaryExpression.kt") public void testMultilineBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/multiline/multilineBinaryExpression.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/multiline/multilineBinaryExpression.kt"); } @TestMetadata("multilineBinaryExpressionWithComments.kt") public void testMultilineBinaryExpressionWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/multiline/multilineBinaryExpressionWithComments.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/multiline/multilineBinaryExpressionWithComments.kt"); } @TestMetadata("multilineNestedBinaryExpression1.kt") public void testMultilineNestedBinaryExpression1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/multiline/multilineNestedBinaryExpression1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/multiline/multilineNestedBinaryExpression1.kt"); } @TestMetadata("multilineNestedBinaryExpression2.kt") public void testMultilineNestedBinaryExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/multiline/multilineNestedBinaryExpression2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/multiline/multilineNestedBinaryExpression2.kt"); } } @@ -2236,6 +2021,10 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @@ -2244,110 +2033,97 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CandidateTypes extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCandidateTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/candidateTypes"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("cantLiftAnonymousToSupertype.kt") public void testCantLiftAnonymousToSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/cantLiftAnonymousToSupertype.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/cantLiftAnonymousToSupertype.kt"); } @TestMetadata("flexibleTypesWithNull.kt") public void testFlexibleTypesWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/flexibleTypesWithNull.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/flexibleTypesWithNull.kt"); } @TestMetadata("flexibleTypesWithoutNull.kt") public void testFlexibleTypesWithoutNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/flexibleTypesWithoutNull.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/flexibleTypesWithoutNull.kt"); } @TestMetadata("liftAnonymousToSupertype1.kt") public void testLiftAnonymousToSupertype1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/liftAnonymousToSupertype1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/liftAnonymousToSupertype1.kt"); } @TestMetadata("liftAnonymousToSupertype2.kt") public void testLiftAnonymousToSupertype2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/liftAnonymousToSupertype2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/liftAnonymousToSupertype2.kt"); } @TestMetadata("multipleTypes.kt") public void testMultipleTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes.kt"); } @TestMetadata("multipleTypes2.kt") public void testMultipleTypes2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes2.kt"); } @TestMetadata("multipleTypes3.kt") public void testMultipleTypes3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes3.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes3.kt"); } @TestMetadata("multipleTypes4.kt") public void testMultipleTypes4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes4.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/multipleTypes4.kt"); } @TestMetadata("mutablyFlexibleType.kt") public void testMutablyFlexibleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/mutablyFlexibleType.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/mutablyFlexibleType.kt"); } @TestMetadata("nonNullableTypes.kt") public void testNonNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/nonNullableTypes.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/nonNullableTypes.kt"); } @TestMetadata("nullableTypes.kt") public void testNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/nullableTypes.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/nullableTypes.kt"); } @TestMetadata("receiverCandidateTypes.kt") public void testReceiverCandidateTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/receiverCandidateTypes.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/receiverCandidateTypes.kt"); } @TestMetadata("typeHierarchy1.kt") public void testTypeHierarchy1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy1.kt"); } @TestMetadata("typeHierarchy2.kt") public void testTypeHierarchy2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy2.kt"); } @TestMetadata("typeHierarchy3.kt") public void testTypeHierarchy3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy3.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy3.kt"); } @TestMetadata("typeHierarchy4.kt") public void testTypeHierarchy4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy4.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/candidateTypes/typeHierarchy4.kt"); } } @@ -2355,38 +2131,37 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedFunctions extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCapturedFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/capturedFunctions"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("deeplyLocalFun.kt") public void testDeeplyLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/deeplyLocalFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/deeplyLocalFun.kt"); } @TestMetadata("localExtensionFun.kt") public void testLocalExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localExtensionFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localExtensionFun.kt"); } @TestMetadata("localExtensionFunChainedCalls.kt") public void testLocalExtensionFunChainedCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localExtensionFunChainedCalls.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localExtensionFunChainedCalls.kt"); } @TestMetadata("localExtensionFunInfixCall.kt") public void testLocalExtensionFunInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localExtensionFunInfixCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localExtensionFunInfixCall.kt"); } @TestMetadata("localFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/capturedFunctions/localFun.kt"); } } @@ -2394,32 +2169,32 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtractSuper extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtractSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/extractSuper"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("labeledSuperPropertyCall.kt") public void testLabeledSuperPropertyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractSuper/labeledSuperPropertyCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractSuper/labeledSuperPropertyCall.kt"); } @TestMetadata("superFunctionCall.kt") public void testSuperFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractSuper/superFunctionCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractSuper/superFunctionCall.kt"); } @TestMetadata("superLabeledFunctionCall.kt") public void testSuperLabeledFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractSuper/superLabeledFunctionCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractSuper/superLabeledFunctionCall.kt"); } @TestMetadata("superPropertyCall.kt") public void testSuperPropertyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractSuper/superPropertyCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractSuper/superPropertyCall.kt"); } } @@ -2427,122 +2202,107 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtractThis extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtractThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/extractThis"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("explicitLabeledThisInMember.kt") public void testExplicitLabeledThisInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitLabeledThisInMember.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitLabeledThisInMember.kt"); } @TestMetadata("explicitThisInExtension.kt") public void testExplicitThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitThisInExtension.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitThisInExtension.kt"); } @TestMetadata("explicitThisInMember.kt") public void testExplicitThisInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitThisInMember.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitThisInMember.kt"); } @TestMetadata("explicitThisWithSmartCast.kt") public void testExplicitThisWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitThisWithSmartCast.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/explicitThisWithSmartCast.kt"); } @TestMetadata("implicitAndExplicitLabeledThisInMember.kt") public void testImplicitAndExplicitLabeledThisInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitAndExplicitLabeledThisInMember.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitAndExplicitLabeledThisInMember.kt"); } @TestMetadata("implicitAndExplicitThisInExtension.kt") public void testImplicitAndExplicitThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitAndExplicitThisInExtension.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitAndExplicitThisInExtension.kt"); } @TestMetadata("implicitThisInExtension.kt") public void testImplicitThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitThisInExtension.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitThisInExtension.kt"); } @TestMetadata("implicitThisInMember.kt") public void testImplicitThisInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitThisInMember.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitThisInMember.kt"); } @TestMetadata("implicitThisWithSmartCast.kt") public void testImplicitThisWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitThisWithSmartCast.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/implicitThisWithSmartCast.kt"); } @TestMetadata("javaSyntheticProperty.kt") public void testJavaSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/javaSyntheticProperty.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/javaSyntheticProperty.kt"); } @TestMetadata("javaSyntheticPropertyWithDelegation.kt") public void testJavaSyntheticPropertyWithDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/javaSyntheticPropertyWithDelegation.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/javaSyntheticPropertyWithDelegation.kt"); } @TestMetadata("javaSyntheticPropertyWithOverride.kt") public void testJavaSyntheticPropertyWithOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/javaSyntheticPropertyWithOverride.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/javaSyntheticPropertyWithOverride.kt"); } @TestMetadata("missingReceiver.kt") public void testMissingReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/missingReceiver.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/missingReceiver.kt"); } @TestMetadata("paramAsExplicitInvoke.kt") public void testParamAsExplicitInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/paramAsExplicitInvoke.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/paramAsExplicitInvoke.kt"); } @TestMetadata("paramWithExtensionInvoke.kt") public void testParamWithExtensionInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/paramWithExtensionInvoke.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/paramWithExtensionInvoke.kt"); } @TestMetadata("propertyWithExplicitInvoke.kt") public void testPropertyWithExplicitInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/propertyWithExplicitInvoke.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/propertyWithExplicitInvoke.kt"); } @TestMetadata("propertyWithImplicitInvoke.kt") public void testPropertyWithImplicitInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/propertyWithImplicitInvoke.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/propertyWithImplicitInvoke.kt"); } @TestMetadata("qualifiedThis.kt") public void testQualifiedThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/qualifiedThis.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/qualifiedThis.kt"); } @TestMetadata("qualifiedThisAsArgument.kt") public void testQualifiedThisAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/extractThis/qualifiedThisAsArgument.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/extractThis/qualifiedThisAsArgument.kt"); } } @@ -2550,32 +2310,32 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class It extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/it"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("innerIt.kt") public void testInnerIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/it/innerIt.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/it/innerIt.kt"); } @TestMetadata("lambdaWithIt.kt") public void testLambdaWithIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/it/lambdaWithIt.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/it/lambdaWithIt.kt"); } @TestMetadata("outerIt.kt") public void testOuterIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/it/outerIt.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/it/outerIt.kt"); } @TestMetadata("simpleIt.kt") public void testSimpleIt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/it/simpleIt.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/it/simpleIt.kt"); } } @@ -2583,10 +2343,13 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Misc extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addPrefixToBackticks.kt") public void testAddPrefixToBackticks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/addPrefixToBackticks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/addPrefixToBackticks.kt"); } public void testAllFilesPresentInMisc() throws Exception { @@ -2595,152 +2358,127 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/classObject.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/extensionLambda.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/extensionLambda.kt"); } @TestMetadata("extensionLambdaAsParameter.kt") public void testExtensionLambdaAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/extensionLambdaAsParameter.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/extensionLambdaAsParameter.kt"); } @TestMetadata("idWithBackticks.kt") public void testIdWithBackticks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/idWithBackticks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/idWithBackticks.kt"); } @TestMetadata("idWithRequiredBackticks.kt") public void testIdWithRequiredBackticks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/idWithRequiredBackticks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/idWithRequiredBackticks.kt"); } @TestMetadata("innerClassObject.kt") public void testInnerClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/innerClassObject.kt"); } @TestMetadata("kt5001.kt") public void testKt5001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/kt5001.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/kt5001.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/multiDeclaration.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/multiDeclaration.kt"); } @TestMetadata("multipleOccurrences.kt") public void testMultipleOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/multipleOccurrences.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/multipleOccurrences.kt"); } @TestMetadata("namedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/namedArguments.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/namedArguments.kt"); } @TestMetadata("qualifiedAnnotation.kt") public void testQualifiedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedAnnotation.kt"); } @TestMetadata("qualifiedClassObject.kt") public void testQualifiedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedClassObject.kt"); } @TestMetadata("qualifiedEnum.kt") public void testQualifiedEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedEnum.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedEnum.kt"); } @TestMetadata("qualifiedObject.kt") public void testQualifiedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedObject.kt"); } @TestMetadata("qualifiedPackage.kt") public void testQualifiedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedPackage.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedPackage.kt"); } @TestMetadata("qualifiedTypeArg.kt") public void testQualifiedTypeArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedTypeArg.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedTypeArg.kt"); } @TestMetadata("qualifiedTypeInValueArg.kt") public void testQualifiedTypeInValueArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedTypeInValueArg.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedTypeInValueArg.kt"); } @TestMetadata("qualifiedTypeRef.kt") public void testQualifiedTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedTypeRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/qualifiedTypeRef.kt"); } @TestMetadata("reducedParameterList.kt") public void testReducedParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/reducedParameterList.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/reducedParameterList.kt"); } @TestMetadata("replaceWithBackticks.kt") public void testReplaceWithBackticks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/replaceWithBackticks.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/replaceWithBackticks.kt"); } @TestMetadata("replaceWithBackticks2.kt") public void testReplaceWithBackticks2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/replaceWithBackticks2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/replaceWithBackticks2.kt"); } @TestMetadata("thisInObject.kt") public void testThisInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/thisInObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/thisInObject.kt"); } @TestMetadata("typeRef.kt") public void testTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/typeRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/typeRef.kt"); } @TestMetadata("usagesInCallArgs.kt") public void testUsagesInCallArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/usagesInCallArgs.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/usagesInCallArgs.kt"); } @TestMetadata("variableAsFunction.kt") public void testVariableAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/misc/variableAsFunction.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/misc/variableAsFunction.kt"); } } @@ -2748,50 +2486,47 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonDenotableTypes extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonDenotableTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/anonymousObject.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/anonymousObject.kt"); } @TestMetadata("anonymousObjectWithCall.kt") public void testAnonymousObjectWithCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/anonymousObjectWithCall.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/anonymousObjectWithCall.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClass.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClass.kt"); } @TestMetadata("localClassWithSuperclass.kt") public void testLocalClassWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclass.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclass.kt"); } @TestMetadata("localClassWithSuperclassParameter.kt") public void testLocalClassWithSuperclassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclassParameter.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclassParameter.kt"); } @TestMetadata("localClassWithSuperclassParameterInLocalFun.kt") public void testLocalClassWithSuperclassParameterInLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclassParameterInLocalFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclassParameterInLocalFun.kt"); } @TestMetadata("localClassWithSuperclassParameterNoApproximation.kt") public void testLocalClassWithSuperclassParameterNoApproximation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclassParameterNoApproximation.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/parameters/nonDenotableTypes/localClassWithSuperclassParameterNoApproximation.kt"); } } } @@ -2800,20 +2535,22 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("NotExpression.kts") public void testNotExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/script/NotExpression.kts"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/script/NotExpression.kts"); } @TestMetadata("TopLevelExpression.kts") public void testTopLevelExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/script/TopLevelExpression.kts"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/script/TopLevelExpression.kts"); } } @@ -2821,104 +2558,92 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("brokenEntryWithBlockExpr.kt") public void testBrokenEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/brokenEntryWithBlockExpr.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/brokenEntryWithBlockExpr.kt"); } @TestMetadata("brokenEntryWithExpr.kt") public void testBrokenEntryWithExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/brokenEntryWithExpr.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/brokenEntryWithExpr.kt"); } @TestMetadata("brokenEscapeEntry.kt") public void testBrokenEscapeEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/brokenEscapeEntry.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/brokenEscapeEntry.kt"); } @TestMetadata("extractFalse.kt") public void testExtractFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/extractFalse.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/extractFalse.kt"); } @TestMetadata("extractIntegerLiteral.kt") public void testExtractIntegerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/extractIntegerLiteral.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/extractIntegerLiteral.kt"); } @TestMetadata("extractTrue.kt") public void testExtractTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/extractTrue.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/extractTrue.kt"); } @TestMetadata("fullContent.kt") public void testFullContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/fullContent.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/fullContent.kt"); } @TestMetadata("fullEntryWithBlockExpr.kt") public void testFullEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/fullEntryWithBlockExpr.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/fullEntryWithBlockExpr.kt"); } @TestMetadata("fullEntryWithSimpleName.kt") public void testFullEntryWithSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/fullEntryWithSimpleName.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/fullEntryWithSimpleName.kt"); } @TestMetadata("multipleEntriesWithPrefix.kt") public void testMultipleEntriesWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithPrefix.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithPrefix.kt"); } @TestMetadata("multipleEntriesWithSubstring.kt") public void testMultipleEntriesWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithSubstring.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithSubstring.kt"); } @TestMetadata("multipleEntriesWithSuffix.kt") public void testMultipleEntriesWithSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithSuffix.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/multipleEntriesWithSuffix.kt"); } @TestMetadata("rawTemplateWithSubstring.kt") public void testRawTemplateWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/rawTemplateWithSubstring.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/rawTemplateWithSubstring.kt"); } @TestMetadata("singleEntryPrefix.kt") public void testSingleEntryPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/singleEntryPrefix.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/singleEntryPrefix.kt"); } @TestMetadata("singleEntrySubstring.kt") public void testSingleEntrySubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/singleEntrySubstring.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/singleEntrySubstring.kt"); } @TestMetadata("singleEntrySuffix.kt") public void testSingleEntrySuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/stringTemplates/singleEntrySuffix.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/stringTemplates/singleEntrySuffix.kt"); } } @@ -2926,110 +2651,97 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/extractFunction/typeParameters"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("localClassInBound.kt") public void testLocalClassInBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/localClassInBound.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/localClassInBound.kt"); } @TestMetadata("localClassInTypeConstraint.kt") public void testLocalClassInTypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/localClassInTypeConstraint.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/localClassInTypeConstraint.kt"); } @TestMetadata("noVarianceInFun.kt") public void testNoVarianceInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/noVarianceInFun.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/noVarianceInFun.kt"); } @TestMetadata("simpleTypeParameter.kt") public void testSimpleTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/simpleTypeParameter.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/simpleTypeParameter.kt"); } @TestMetadata("simpleTypeParameterWithConstraint.kt") public void testSimpleTypeParameterWithConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/simpleTypeParameterWithConstraint.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/simpleTypeParameterWithConstraint.kt"); } @TestMetadata("typeParamInArgument.kt") public void testTypeParamInArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParamInArgument.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParamInArgument.kt"); } @TestMetadata("typeParameterNotResolvableInTargetScope.kt") public void testTypeParameterNotResolvableInTargetScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParameterNotResolvableInTargetScope.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParameterNotResolvableInTargetScope.kt"); } @TestMetadata("typeParameterRef.kt") public void testTypeParameterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParameterRef.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParameterRef.kt"); } @TestMetadata("typeParameterRefCanOmit.kt") public void testTypeParameterRefCanOmit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParameterRefCanOmit.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParameterRefCanOmit.kt"); } @TestMetadata("typeParameterResolvableInTargetScope.kt") public void testTypeParameterResolvableInTargetScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParameterResolvableInTargetScope.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParameterResolvableInTargetScope.kt"); } @TestMetadata("typeParametersAndConstraintsCombined1.kt") public void testTypeParametersAndConstraintsCombined1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersAndConstraintsCombined1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersAndConstraintsCombined1.kt"); } @TestMetadata("typeParametersAndConstraintsCombined2.kt") public void testTypeParametersAndConstraintsCombined2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersAndConstraintsCombined2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersAndConstraintsCombined2.kt"); } @TestMetadata("typeParametersAndConstraintsCombined3.kt") public void testTypeParametersAndConstraintsCombined3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersAndConstraintsCombined3.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersAndConstraintsCombined3.kt"); } @TestMetadata("typeParametersCombined1.kt") public void testTypeParametersCombined1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombined1.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombined1.kt"); } @TestMetadata("typeParametersCombined2.kt") public void testTypeParametersCombined2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombined2.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombined2.kt"); } @TestMetadata("typeParametersCombined3.kt") public void testTypeParametersCombined3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombined3.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombined3.kt"); } @TestMetadata("typeParametersCombinedAndThis.kt") public void testTypeParametersCombinedAndThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombinedAndThis.kt"); - doExtractFunctionTest(fileName); + runTest("idea/testData/refactoring/extractFunction/typeParameters/typeParametersCombinedAndThis.kt"); } } } @@ -3038,232 +2750,204 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceProperty extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroducePropertyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("extractExtensionWithInitializer.kt") public void testExtractExtensionWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractExtensionWithInitializer.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractExtensionWithInitializer.kt"); } @TestMetadata("extractFromDefaultValueInConstructor.kt") public void testExtractFromDefaultValueInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractFromDefaultValueInConstructor.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractFromDefaultValueInConstructor.kt"); } @TestMetadata("extractFromDefaultValueInFun.kt") public void testExtractFromDefaultValueInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractFromDefaultValueInFun.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractFromDefaultValueInFun.kt"); } @TestMetadata("extractLazyExtension.kt") public void testExtractLazyExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyExtension.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyExtension.kt"); } @TestMetadata("extractLazyMultipleExpressions.kt") public void testExtractLazyMultipleExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyMultipleExpressions.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyMultipleExpressions.kt"); } @TestMetadata("extractLazyToClass.kt") public void testExtractLazyToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyToClass.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyToClass.kt"); } @TestMetadata("extractLazyToFile.kt") public void testExtractLazyToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyToFile.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyToFile.kt"); } @TestMetadata("extractLazyToTrait.kt") public void testExtractLazyToTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyToTrait.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyToTrait.kt"); } @TestMetadata("extractLazyWithBlock.kt") public void testExtractLazyWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyWithBlock.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyWithBlock.kt"); } @TestMetadata("extractLazyWithCallSiteReturn.kt") public void testExtractLazyWithCallSiteReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractLazyWithCallSiteReturn.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractLazyWithCallSiteReturn.kt"); } @TestMetadata("extractToClassWithNameClash.kt") public void testExtractToClassWithNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractToClassWithNameClash.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractToClassWithNameClash.kt"); } @TestMetadata("extractToClassWithNameClashAndAnonymousInitializer.kt") public void testExtractToClassWithNameClashAndAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt"); } @TestMetadata("extractToFileWithNameClash.kt") public void testExtractToFileWithNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractToFileWithNameClash.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractToFileWithNameClash.kt"); } @TestMetadata("extractToFunction.kt") public void testExtractToFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractToFunction.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractToFunction.kt"); } @TestMetadata("extractUnit.kt") public void testExtractUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractUnit.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractUnit.kt"); } @TestMetadata("extractWithGetterMultipleExpressions.kt") public void testExtractWithGetterMultipleExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithGetterMultipleExpressions.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithGetterMultipleExpressions.kt"); } @TestMetadata("extractWithGetterToClass.kt") public void testExtractWithGetterToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithGetterToClass.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithGetterToClass.kt"); } @TestMetadata("extractWithGetterToFile.kt") public void testExtractWithGetterToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithGetterToFile.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithGetterToFile.kt"); } @TestMetadata("extractWithGetterToTrait.kt") public void testExtractWithGetterToTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithGetterToTrait.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithGetterToTrait.kt"); } @TestMetadata("extractWithInitializerAndBlock.kt") public void testExtractWithInitializerAndBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerAndBlock.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerAndBlock.kt"); } @TestMetadata("extractWithInitializerAndCallSiteReturn.kt") public void testExtractWithInitializerAndCallSiteReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerAndCallSiteReturn.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerAndCallSiteReturn.kt"); } @TestMetadata("extractWithInitializerAndSingleElementBlock.kt") public void testExtractWithInitializerAndSingleElementBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerAndSingleElementBlock.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerAndSingleElementBlock.kt"); } @TestMetadata("extractWithInitializerMultipleExpressions.kt") public void testExtractWithInitializerMultipleExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerMultipleExpressions.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerMultipleExpressions.kt"); } @TestMetadata("extractWithInitializerToClass.kt") public void testExtractWithInitializerToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerToClass.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerToClass.kt"); } @TestMetadata("extractWithInitializerToFile.kt") public void testExtractWithInitializerToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerToFile.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerToFile.kt"); } @TestMetadata("extractWithInitializerToTrait.kt") public void testExtractWithInitializerToTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithInitializerToTrait.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithInitializerToTrait.kt"); } @TestMetadata("extractWithParams.kt") public void testExtractWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/extractWithParams.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/extractWithParams.kt"); } @TestMetadata("kt21530.kt") public void testKt21530() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/kt21530.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/kt21530.kt"); } @TestMetadata("primaryConstructorParameterReference.kt") public void testPrimaryConstructorParameterReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/primaryConstructorParameterReference.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/primaryConstructorParameterReference.kt"); } @TestMetadata("replaceDuplicates.kt") public void testReplaceDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/replaceDuplicates.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/replaceDuplicates.kt"); } @TestMetadata("syntaxErrors.kt") public void testSyntaxErrors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/syntaxErrors.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/syntaxErrors.kt"); } @TestMetadata("typeParameterNotResolvableInTargetScope.kt") public void testTypeParameterNotResolvableInTargetScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/typeParameterNotResolvableInTargetScope.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/typeParameterNotResolvableInTargetScope.kt"); } @TestMetadata("typeParameterResolvableInTargetScope.kt") public void testTypeParameterResolvableInTargetScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/typeParameterResolvableInTargetScope.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/typeParameterResolvableInTargetScope.kt"); } @TestMetadata("idea/testData/refactoring/introduceProperty/script") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroducePropertyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ClassInScript.kts") public void testClassInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/script/ClassInScript.kts"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/script/ClassInScript.kts"); } @TestMetadata("ExpressionPart.kts") public void testExpressionPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/script/ExpressionPart.kts"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/script/ExpressionPart.kts"); } @TestMetadata("TopLevelExpression.kts") public void testTopLevelExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/script/TopLevelExpression.kts"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/script/TopLevelExpression.kts"); } } @@ -3271,104 +2955,92 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroducePropertyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceProperty/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("brokenEntryWithBlockExpr.kt") public void testBrokenEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/brokenEntryWithBlockExpr.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/brokenEntryWithBlockExpr.kt"); } @TestMetadata("brokenEntryWithExpr.kt") public void testBrokenEntryWithExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/brokenEntryWithExpr.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/brokenEntryWithExpr.kt"); } @TestMetadata("brokenEscapeEntry.kt") public void testBrokenEscapeEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/brokenEscapeEntry.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/brokenEscapeEntry.kt"); } @TestMetadata("extractFalse.kt") public void testExtractFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/extractFalse.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/extractFalse.kt"); } @TestMetadata("extractIntegerLiteral.kt") public void testExtractIntegerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/extractIntegerLiteral.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/extractIntegerLiteral.kt"); } @TestMetadata("extractTrue.kt") public void testExtractTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/extractTrue.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/extractTrue.kt"); } @TestMetadata("fullContent.kt") public void testFullContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/fullContent.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/fullContent.kt"); } @TestMetadata("fullEntryWithBlockExpr.kt") public void testFullEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/fullEntryWithBlockExpr.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/fullEntryWithBlockExpr.kt"); } @TestMetadata("fullEntryWithSimpleName.kt") public void testFullEntryWithSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/fullEntryWithSimpleName.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/fullEntryWithSimpleName.kt"); } @TestMetadata("multipleEntriesWithPrefix.kt") public void testMultipleEntriesWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/multipleEntriesWithPrefix.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/multipleEntriesWithPrefix.kt"); } @TestMetadata("multipleEntriesWithSubstring.kt") public void testMultipleEntriesWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/multipleEntriesWithSubstring.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/multipleEntriesWithSubstring.kt"); } @TestMetadata("multipleEntriesWithSuffix.kt") public void testMultipleEntriesWithSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/multipleEntriesWithSuffix.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/multipleEntriesWithSuffix.kt"); } @TestMetadata("rawTemplateWithSubstring.kt") public void testRawTemplateWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/rawTemplateWithSubstring.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/rawTemplateWithSubstring.kt"); } @TestMetadata("singleEntryPrefix.kt") public void testSingleEntryPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/singleEntryPrefix.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/singleEntryPrefix.kt"); } @TestMetadata("singleEntrySubstring.kt") public void testSingleEntrySubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/singleEntrySubstring.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/singleEntrySubstring.kt"); } @TestMetadata("singleEntrySuffix.kt") public void testSingleEntrySuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceProperty/stringTemplates/singleEntrySuffix.kt"); - doIntroducePropertyTest(fileName); + runTest("idea/testData/refactoring/introduceProperty/stringTemplates/singleEntrySuffix.kt"); } } } @@ -3377,358 +3049,309 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceParameter extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceSimpleParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("annotationArgument.kt") public void testAnnotationArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/annotationArgument.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/annotationArgument.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/assignment.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/assignment.kt"); } @TestMetadata("avoidClassDuplicatingParameters.kt") public void testAvoidClassDuplicatingParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/avoidClassDuplicatingParameters.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/avoidClassDuplicatingParameters.kt"); } @TestMetadata("avoidFunDuplicatingParameters.kt") public void testAvoidFunDuplicatingParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/avoidFunDuplicatingParameters.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/avoidFunDuplicatingParameters.kt"); } @TestMetadata("classInAnonymousInitializer.kt") public void testClassInAnonymousInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classInAnonymousInitializer.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classInAnonymousInitializer.kt"); } @TestMetadata("classInPropertyInitializer.kt") public void testClassInPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classInPropertyInitializer.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classInPropertyInitializer.kt"); } @TestMetadata("classMultipleUsages1.kt") public void testClassMultipleUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classMultipleUsages1.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classMultipleUsages1.kt"); } @TestMetadata("classMultipleUsages2.kt") public void testClassMultipleUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classMultipleUsages2.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classMultipleUsages2.kt"); } @TestMetadata("classMultipleUsagesOutsideScope.kt") public void testClassMultipleUsagesOutsideScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classMultipleUsagesOutsideScope.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classMultipleUsagesOutsideScope.kt"); } @TestMetadata("classMultipleUsagesSingleReplace1.kt") public void testClassMultipleUsagesSingleReplace1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classMultipleUsagesSingleReplace1.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classMultipleUsagesSingleReplace1.kt"); } @TestMetadata("classMultipleUsagesSingleReplace2.kt") public void testClassMultipleUsagesSingleReplace2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classMultipleUsagesSingleReplace2.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classMultipleUsagesSingleReplace2.kt"); } @TestMetadata("classNoParams.kt") public void testClassNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classNoParams.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classNoParams.kt"); } @TestMetadata("classParameterInFunctionBody.kt") public void testClassParameterInFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classParameterInFunctionBody.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classParameterInFunctionBody.kt"); } @TestMetadata("classParameterUsedOutside.kt") public void testClassParameterUsedOutside() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classParameterUsedOutside.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classParameterUsedOutside.kt"); } @TestMetadata("classUnusedParameter.kt") public void testClassUnusedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classUnusedParameter.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classUnusedParameter.kt"); } @TestMetadata("classUsedParameter.kt") public void testClassUsedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/classUsedParameter.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/classUsedParameter.kt"); } @TestMetadata("defaultValueInParens.kt") public void testDefaultValueInParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/defaultValueInParens.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/defaultValueInParens.kt"); } @TestMetadata("defaultValueNoTempVar.kt") public void testDefaultValueNoTempVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/defaultValueNoTempVar.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/defaultValueNoTempVar.kt"); } @TestMetadata("forbiddenUsages.kt") public void testForbiddenUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/forbiddenUsages.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/forbiddenUsages.kt"); } @TestMetadata("foreignParameterRef.kt") public void testForeignParameterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/foreignParameterRef.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/foreignParameterRef.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/fun.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/fun.kt"); } @TestMetadata("functionMultipleUnusedParameters.kt") public void testFunctionMultipleUnusedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionMultipleUnusedParameters.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionMultipleUnusedParameters.kt"); } @TestMetadata("functionMultipleUsages.kt") public void testFunctionMultipleUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionMultipleUsages.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionMultipleUsages.kt"); } @TestMetadata("functionMultipleUsagesSingleReplace.kt") public void testFunctionMultipleUsagesSingleReplace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionMultipleUsagesSingleReplace.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionMultipleUsagesSingleReplace.kt"); } @TestMetadata("functionUnusedParameter.kt") public void testFunctionUnusedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionUnusedParameter.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionUnusedParameter.kt"); } @TestMetadata("functionUsedParameter.kt") public void testFunctionUsedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionUsedParameter.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionUsedParameter.kt"); } @TestMetadata("functionWithApproximatedType.kt") public void testFunctionWithApproximatedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionWithApproximatedType.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionWithApproximatedType.kt"); } @TestMetadata("functionWithDefaultValue.kt") public void testFunctionWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/functionWithDefaultValue.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/functionWithDefaultValue.kt"); } @TestMetadata("inDefaultValue.kt") public void testInDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/inDefaultValue.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/inDefaultValue.kt"); } @TestMetadata("lambdaArgument.kt") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/lambdaArgument.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/lambdaArgument.kt"); } @TestMetadata("partialSubstitution.kt") public void testPartialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/partialSubstitution.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/partialSubstitution.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/propertyAccessor.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/propertyAccessor.kt"); } @TestMetadata("return.kt") public void testReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/return.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/return.kt"); } @TestMetadata("secondaryConstructorWithDefaultValue.kt") public void testSecondaryConstructorWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/secondaryConstructorWithDefaultValue.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/secondaryConstructorWithDefaultValue.kt"); } @TestMetadata("simpleNameWithDefaultValueSubstitution.kt") public void testSimpleNameWithDefaultValueSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/simpleNameWithDefaultValueSubstitution.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/simpleNameWithDefaultValueSubstitution.kt"); } @TestMetadata("substituteBinaryExpressions.kt") public void testSubstituteBinaryExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteBinaryExpressions.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteBinaryExpressions.kt"); } @TestMetadata("substituteCallExpressions.kt") public void testSubstituteCallExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteCallExpressions.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteCallExpressions.kt"); } @TestMetadata("substituteDelegationCallsNoTempVar.kt") public void testSubstituteDelegationCallsNoTempVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteDelegationCallsNoTempVar.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteDelegationCallsNoTempVar.kt"); } @TestMetadata("substituteDoubleReceiver.kt") public void testSubstituteDoubleReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteDoubleReceiver.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteDoubleReceiver.kt"); } @TestMetadata("substituteExplicitThisInMember.kt") public void testSubstituteExplicitThisInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteExplicitThisInMember.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteExplicitThisInMember.kt"); } @TestMetadata("substituteImplicitThisInMember.kt") public void testSubstituteImplicitThisInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteImplicitThisInMember.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteImplicitThisInMember.kt"); } @TestMetadata("substituteInPrimaryConstructorCall.kt") public void testSubstituteInPrimaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteInPrimaryConstructorCall.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteInPrimaryConstructorCall.kt"); } @TestMetadata("substituteInSecondaryConstructorCall.kt") public void testSubstituteInSecondaryConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteInSecondaryConstructorCall.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteInSecondaryConstructorCall.kt"); } @TestMetadata("substituteIncrement.kt") public void testSubstituteIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteIncrement.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteIncrement.kt"); } @TestMetadata("substituteInfixCall.kt") public void testSubstituteInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/substituteInfixCall.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/substituteInfixCall.kt"); } @TestMetadata("superCallArgument.kt") public void testSuperCallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/superCallArgument.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/superCallArgument.kt"); } @TestMetadata("throw.kt") public void testThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/throw.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/throw.kt"); } @TestMetadata("unusedDispatchReceiver.kt") public void testUnusedDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/unusedDispatchReceiver.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/unusedDispatchReceiver.kt"); } @TestMetadata("unusedExtensionReceiver.kt") public void testUnusedExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/unusedExtensionReceiver.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/unusedExtensionReceiver.kt"); } @TestMetadata("valueAtCallSite.kt") public void testValueAtCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/valueAtCallSite.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/valueAtCallSite.kt"); } @TestMetadata("valueAtCallSiteMultipleUsages.kt") public void testValueAtCallSiteMultipleUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/valueAtCallSiteMultipleUsages.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/valueAtCallSiteMultipleUsages.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/varargs.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/varargs.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/while.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/while.kt"); } @TestMetadata("idea/testData/refactoring/introduceParameter/multiline") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiline extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceSimpleParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/multiline"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("multilineBinaryExpression.kt") public void testMultilineBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpression.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpression.kt"); } @TestMetadata("multilineBinaryExpressionWithComments.kt") public void testMultilineBinaryExpressionWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpressionWithComments.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/multiline/multilineBinaryExpressionWithComments.kt"); } @TestMetadata("multilineNestedBinaryExpression1.kt") public void testMultilineNestedBinaryExpression1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression1.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression1.kt"); } @TestMetadata("multilineNestedBinaryExpression2.kt") public void testMultilineNestedBinaryExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression2.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/multiline/multilineNestedBinaryExpression2.kt"); } } @@ -3736,26 +3359,27 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Script extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceSimpleParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/script"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("ExpressionPart.kts") public void testExpressionPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/script/ExpressionPart.kts"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/script/ExpressionPart.kts"); } @TestMetadata("FunInScript.kts") public void testFunInScript() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/script/FunInScript.kts"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/script/FunInScript.kts"); } @TestMetadata("TopLevelExpression.kts") public void testTopLevelExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/script/TopLevelExpression.kts"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/script/TopLevelExpression.kts"); } } @@ -3763,104 +3387,92 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceSimpleParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("brokenEntryWithBlockExpr.kt") public void testBrokenEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/brokenEntryWithBlockExpr.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/brokenEntryWithBlockExpr.kt"); } @TestMetadata("brokenEntryWithExpr.kt") public void testBrokenEntryWithExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/brokenEntryWithExpr.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/brokenEntryWithExpr.kt"); } @TestMetadata("brokenEscapeEntry.kt") public void testBrokenEscapeEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/brokenEscapeEntry.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/brokenEscapeEntry.kt"); } @TestMetadata("extractFalse.kt") public void testExtractFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/extractFalse.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/extractFalse.kt"); } @TestMetadata("extractIntegerLiteral.kt") public void testExtractIntegerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/extractIntegerLiteral.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/extractIntegerLiteral.kt"); } @TestMetadata("extractTrue.kt") public void testExtractTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/extractTrue.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/extractTrue.kt"); } @TestMetadata("fullContent.kt") public void testFullContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/fullContent.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/fullContent.kt"); } @TestMetadata("fullEntryWithBlockExpr.kt") public void testFullEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/fullEntryWithBlockExpr.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/fullEntryWithBlockExpr.kt"); } @TestMetadata("fullEntryWithSimpleName.kt") public void testFullEntryWithSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/fullEntryWithSimpleName.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/fullEntryWithSimpleName.kt"); } @TestMetadata("multipleEntriesWithPrefix.kt") public void testMultipleEntriesWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/multipleEntriesWithPrefix.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/multipleEntriesWithPrefix.kt"); } @TestMetadata("multipleEntriesWithSubstring.kt") public void testMultipleEntriesWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/multipleEntriesWithSubstring.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/multipleEntriesWithSubstring.kt"); } @TestMetadata("multipleEntriesWithSuffix.kt") public void testMultipleEntriesWithSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/multipleEntriesWithSuffix.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/multipleEntriesWithSuffix.kt"); } @TestMetadata("rawTemplateWithSubstring.kt") public void testRawTemplateWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/rawTemplateWithSubstring.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/rawTemplateWithSubstring.kt"); } @TestMetadata("singleEntryPrefix.kt") public void testSingleEntryPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/singleEntryPrefix.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/singleEntryPrefix.kt"); } @TestMetadata("singleEntrySubstring.kt") public void testSingleEntrySubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/singleEntrySubstring.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/singleEntrySubstring.kt"); } @TestMetadata("singleEntrySuffix.kt") public void testSingleEntrySuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/stringTemplates/singleEntrySuffix.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/stringTemplates/singleEntrySuffix.kt"); } } @@ -3868,20 +3480,22 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VariableConversion extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceSimpleParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVariableConversion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceParameter/variableConversion"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("caretAtIdentifier.kt") public void testCaretAtIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/variableConversion/caretAtIdentifier.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/variableConversion/caretAtIdentifier.kt"); } @TestMetadata("fullSelection.kt") public void testFullSelection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceParameter/variableConversion/fullSelection.kt"); - doIntroduceSimpleParameterTest(fileName); + runTest("idea/testData/refactoring/introduceParameter/variableConversion/fullSelection.kt"); } } } @@ -3890,94 +3504,89 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceLambdaParameter extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceLambdaParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceLambdaParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("lambdaArgument.kt") public void testLambdaArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaArgument.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaArgument.kt"); } @TestMetadata("lambdaParamInPrimaryConstructor.kt") public void testLambdaParamInPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamInPrimaryConstructor.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamInPrimaryConstructor.kt"); } @TestMetadata("lambdaParamMultiline.kt") public void testLambdaParamMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamMultiline.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamMultiline.kt"); } @TestMetadata("lambdaParamNoDefaultValue.kt") public void testLambdaParamNoDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamNoDefaultValue.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamNoDefaultValue.kt"); } @TestMetadata("lambdaParamNoDefaultValueSecondLambda.kt") public void testLambdaParamNoDefaultValueSecondLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamNoDefaultValueSecondLambda.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamNoDefaultValueSecondLambda.kt"); } @TestMetadata("lambdaParamNoParams.kt") public void testLambdaParamNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamNoParams.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamNoParams.kt"); } @TestMetadata("lambdaParamOfNothing.kt") public void testLambdaParamOfNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamOfNothing.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamOfNothing.kt"); } @TestMetadata("lambdaParamOfUnit.kt") public void testLambdaParamOfUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamOfUnit.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamOfUnit.kt"); } @TestMetadata("lambdaParamWithDefaultValue.kt") public void testLambdaParamWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/lambdaParamWithDefaultValue.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/lambdaParamWithDefaultValue.kt"); } @TestMetadata("idea/testData/refactoring/introduceLambdaParameter/multiline") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiline extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceLambdaParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter/multiline"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("multilineBinaryExpression.kt") public void testMultilineBinaryExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpression.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpression.kt"); } @TestMetadata("multilineBinaryExpressionWithComments.kt") public void testMultilineBinaryExpressionWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpressionWithComments.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineBinaryExpressionWithComments.kt"); } @TestMetadata("multilineNestedBinaryExpression1.kt") public void testMultilineNestedBinaryExpression1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression1.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression1.kt"); } @TestMetadata("multilineNestedBinaryExpression2.kt") public void testMultilineNestedBinaryExpression2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression2.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/multiline/multilineNestedBinaryExpression2.kt"); } } @@ -3985,104 +3594,92 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceLambdaParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceLambdaParameter/stringTemplates"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("brokenEntryWithBlockExpr.kt") public void testBrokenEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/brokenEntryWithBlockExpr.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/brokenEntryWithBlockExpr.kt"); } @TestMetadata("brokenEntryWithExpr.kt") public void testBrokenEntryWithExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/brokenEntryWithExpr.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/brokenEntryWithExpr.kt"); } @TestMetadata("brokenEscapeEntry.kt") public void testBrokenEscapeEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/brokenEscapeEntry.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/brokenEscapeEntry.kt"); } @TestMetadata("extractFalse.kt") public void testExtractFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/extractFalse.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/extractFalse.kt"); } @TestMetadata("extractIntegerLiteral.kt") public void testExtractIntegerLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/extractIntegerLiteral.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/extractIntegerLiteral.kt"); } @TestMetadata("extractTrue.kt") public void testExtractTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/extractTrue.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/extractTrue.kt"); } @TestMetadata("fullContent.kt") public void testFullContent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/fullContent.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/fullContent.kt"); } @TestMetadata("fullEntryWithBlockExpr.kt") public void testFullEntryWithBlockExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/fullEntryWithBlockExpr.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/fullEntryWithBlockExpr.kt"); } @TestMetadata("fullEntryWithSimpleName.kt") public void testFullEntryWithSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/fullEntryWithSimpleName.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/fullEntryWithSimpleName.kt"); } @TestMetadata("multipleEntriesWithPrefix.kt") public void testMultipleEntriesWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/multipleEntriesWithPrefix.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/multipleEntriesWithPrefix.kt"); } @TestMetadata("multipleEntriesWithSubstring.kt") public void testMultipleEntriesWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/multipleEntriesWithSubstring.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/multipleEntriesWithSubstring.kt"); } @TestMetadata("multipleEntriesWithSuffix.kt") public void testMultipleEntriesWithSuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/multipleEntriesWithSuffix.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/multipleEntriesWithSuffix.kt"); } @TestMetadata("rawTemplateWithSubstring.kt") public void testRawTemplateWithSubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/rawTemplateWithSubstring.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/rawTemplateWithSubstring.kt"); } @TestMetadata("singleEntryPrefix.kt") public void testSingleEntryPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/singleEntryPrefix.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/singleEntryPrefix.kt"); } @TestMetadata("singleEntrySubstring.kt") public void testSingleEntrySubstring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/singleEntrySubstring.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/singleEntrySubstring.kt"); } @TestMetadata("singleEntrySuffix.kt") public void testSingleEntrySuffix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/singleEntrySuffix.kt"); - doIntroduceLambdaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceLambdaParameter/stringTemplates/singleEntrySuffix.kt"); } } } @@ -4091,20 +3688,22 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceJavaParameter extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceJavaParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceJavaParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceJavaParameter"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("javaMethod.java") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceJavaParameter/javaMethod.java"); - doIntroduceJavaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceJavaParameter/javaMethod.java"); } @TestMetadata("javaMethodOverridingKotlinFunctionWithUsages.java") public void testJavaMethodOverridingKotlinFunctionWithUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceJavaParameter/javaMethodOverridingKotlinFunctionWithUsages.java"); - doIntroduceJavaParameterTest(fileName); + runTest("idea/testData/refactoring/introduceJavaParameter/javaMethodOverridingKotlinFunctionWithUsages.java"); } } @@ -4112,44 +3711,42 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceTypeParameter extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceTypeParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceTypeParameter"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("duplicates.kt") public void testDuplicates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeParameter/duplicates.kt"); - doIntroduceTypeParameterTest(fileName); + runTest("idea/testData/refactoring/introduceTypeParameter/duplicates.kt"); } @TestMetadata("functionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeParameter/functionType.kt"); - doIntroduceTypeParameterTest(fileName); + runTest("idea/testData/refactoring/introduceTypeParameter/functionType.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeParameter/inClass.kt"); - doIntroduceTypeParameterTest(fileName); + runTest("idea/testData/refactoring/introduceTypeParameter/inClass.kt"); } @TestMetadata("inProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeParameter/inProperty.kt"); - doIntroduceTypeParameterTest(fileName); + runTest("idea/testData/refactoring/introduceTypeParameter/inProperty.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeParameter/nullableType.kt"); - doIntroduceTypeParameterTest(fileName); + runTest("idea/testData/refactoring/introduceTypeParameter/nullableType.kt"); } @TestMetadata("userType.kt") public void testUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeParameter/userType.kt"); - doIntroduceTypeParameterTest(fileName); + runTest("idea/testData/refactoring/introduceTypeParameter/userType.kt"); } } @@ -4157,170 +3754,147 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntroduceTypeAlias extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doIntroduceTypeAliasTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIntroduceTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/introduceTypeAlias"), Pattern.compile("^(.+)\\.(kt|kts)$"), TargetBackend.ANY, true); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/callableReference.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/callableReference.kt"); } @TestMetadata("callableReferenceSelector.kt") public void testCallableReferenceSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/callableReferenceSelector.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/callableReferenceSelector.kt"); } @TestMetadata("classLiteral.kt") public void testClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/classLiteral.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/classLiteral.kt"); } @TestMetadata("constructorCalls.kt") public void testConstructorCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/constructorCalls.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/constructorCalls.kt"); } @TestMetadata("emptyName.kt") public void testEmptyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/emptyName.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/emptyName.kt"); } @TestMetadata("entireTypeExtracted.kt") public void testEntireTypeExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/entireTypeExtracted.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/entireTypeExtracted.kt"); } @TestMetadata("equivalentNestedTypeElements.kt") public void testEquivalentNestedTypeElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/equivalentNestedTypeElements.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/equivalentNestedTypeElements.kt"); } @TestMetadata("existingTypeClash.kt") public void testExistingTypeClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/existingTypeClash.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/existingTypeClash.kt"); } @TestMetadata("functionTypeDuplicatesNoTypeParameters.kt") public void testFunctionTypeDuplicatesNoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/functionTypeDuplicatesNoTypeParameters.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/functionTypeDuplicatesNoTypeParameters.kt"); } @TestMetadata("functionTypeDuplicatesWithTypeParameters.kt") public void testFunctionTypeDuplicatesWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/functionTypeDuplicatesWithTypeParameters.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/functionTypeDuplicatesWithTypeParameters.kt"); } @TestMetadata("functionalType.kt") public void testFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/functionalType.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/functionalType.kt"); } @TestMetadata("localTypeExtracted.kt") public void testLocalTypeExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/localTypeExtracted.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/localTypeExtracted.kt"); } @TestMetadata("localWithVisibility.kt") public void testLocalWithVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/localWithVisibility.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/localWithVisibility.kt"); } @TestMetadata("nestedTypesExtracted.kt") public void testNestedTypesExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/nestedTypesExtracted.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/nestedTypesExtracted.kt"); } @TestMetadata("noTypeElement.kt") public void testNoTypeElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/noTypeElement.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/noTypeElement.kt"); } @TestMetadata("nonIdentifierName.kt") public void testNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/nonIdentifierName.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/nonIdentifierName.kt"); } @TestMetadata("nullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/nullableType.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/nullableType.kt"); } @TestMetadata("privateTypeAlias.kt") public void testPrivateTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/privateTypeAlias.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/privateTypeAlias.kt"); } @TestMetadata("protectedInFile.kt") public void testProtectedInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/protectedInFile.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/protectedInFile.kt"); } @TestMetadata("skipQualifiers.kt") public void testSkipQualifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/skipQualifiers.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/skipQualifiers.kt"); } @TestMetadata("suggestedName.kt") public void testSuggestedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/suggestedName.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/suggestedName.kt"); } @TestMetadata("topLevelTypeAlias.kt") public void testTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/topLevelTypeAlias.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/topLevelTypeAlias.kt"); } @TestMetadata("typeConstructor.kt") public void testTypeConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/typeConstructor.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/typeConstructor.kt"); } @TestMetadata("typesExtractedWithFunctionalType.kt") public void testTypesExtractedWithFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/typesExtractedWithFunctionalType.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/typesExtractedWithFunctionalType.kt"); } @TestMetadata("unmatchedNullability.kt") public void testUnmatchedNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/unmatchedNullability.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/unmatchedNullability.kt"); } @TestMetadata("userTypeDuplicatesNoTypeParameters.kt") public void testUserTypeDuplicatesNoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/userTypeDuplicatesNoTypeParameters.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/userTypeDuplicatesNoTypeParameters.kt"); } @TestMetadata("userTypeDuplicatesWithTypeParameters.kt") public void testUserTypeDuplicatesWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/introduceTypeAlias/userTypeDuplicatesWithTypeParameters.kt"); - doIntroduceTypeAliasTest(fileName); + runTest("idea/testData/refactoring/introduceTypeAlias/userTypeDuplicatesWithTypeParameters.kt"); } } @@ -4328,34 +3902,33 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtractSuperclass extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractSuperclassTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addSuperclassNoSecondaryConstructors.kt") public void testAddSuperclassNoSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/addSuperclassNoSecondaryConstructors.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/addSuperclassNoSecondaryConstructors.kt"); } @TestMetadata("addSuperclassOnlySecondaryConstructors.kt") public void testAddSuperclassOnlySecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/addSuperclassOnlySecondaryConstructors.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/addSuperclassOnlySecondaryConstructors.kt"); } @TestMetadata("addSuperclassPrimaryConstructor.kt") public void testAddSuperclassPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/addSuperclassPrimaryConstructor.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/addSuperclassPrimaryConstructor.kt"); } @TestMetadata("addTypeParameters.kt") public void testAddTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/addTypeParameters.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/addTypeParameters.kt"); } @TestMetadata("addTypeParametersWithAbstract.kt") public void testAddTypeParametersWithAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/addTypeParametersWithAbstract.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/addTypeParametersWithAbstract.kt"); } public void testAllFilesPresentInExtractSuperclass() throws Exception { @@ -4364,68 +3937,57 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/annotation.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/annotation.kt"); } @TestMetadata("dropPropertyParameterModifiers.kt") public void testDropPropertyParameterModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/dropPropertyParameterModifiers.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/dropPropertyParameterModifiers.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/enum.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/enum.kt"); } @TestMetadata("interface.kt") public void testInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/interface.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/interface.kt"); } @TestMetadata("noWarningOnVisibilityInsideAbstractedMember.kt") public void testNoWarningOnVisibilityInsideAbstractedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/noWarningOnVisibilityInsideAbstractedMember.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/noWarningOnVisibilityInsideAbstractedMember.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/privateClass.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/privateClass.kt"); } @TestMetadata("privateMember.kt") public void testPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/privateMember.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/privateMember.kt"); } @TestMetadata("privateMemberWithUsages.kt") public void testPrivateMemberWithUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/privateMemberWithUsages.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/privateMemberWithUsages.kt"); } @TestMetadata("reformatModifierList.kt") public void testReformatModifierList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/reformatModifierList.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/reformatModifierList.kt"); } @TestMetadata("replaceSuperclass.kt") public void testReplaceSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/replaceSuperclass.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/replaceSuperclass.kt"); } @TestMetadata("specialName.kt") public void testSpecialName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractSuperclass/specialName.kt"); - doExtractSuperclassTest(fileName); + runTest("idea/testData/refactoring/extractSuperclass/specialName.kt"); } } @@ -4433,28 +3995,28 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtractInterface extends AbstractExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doExtractInterfaceTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addInterface.kt") public void testAddInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/addInterface.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/addInterface.kt"); } @TestMetadata("addInterfaceWithAbstract.kt") public void testAddInterfaceWithAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/addInterfaceWithAbstract.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/addInterfaceWithAbstract.kt"); } @TestMetadata("addTypeParameters.kt") public void testAddTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/addTypeParameters.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/addTypeParameters.kt"); } @TestMetadata("addTypeParametersWithAbstract.kt") public void testAddTypeParametersWithAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/addTypeParametersWithAbstract.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/addTypeParametersWithAbstract.kt"); } public void testAllFilesPresentInExtractInterface() throws Exception { @@ -4463,32 +4025,27 @@ public class ExtractionTestGenerated extends AbstractExtractionTest { @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/annotation.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/annotation.kt"); } @TestMetadata("dropFinal.kt") public void testDropFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/dropFinal.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/dropFinal.kt"); } @TestMetadata("noWarningOnVisibilityInsideAbstractedMember.kt") public void testNoWarningOnVisibilityInsideAbstractedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/noWarningOnVisibilityInsideAbstractedMember.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/noWarningOnVisibilityInsideAbstractedMember.kt"); } @TestMetadata("privateMemberWithUsages.kt") public void testPrivateMemberWithUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/privateMemberWithUsages.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/privateMemberWithUsages.kt"); } @TestMetadata("specialName.kt") public void testSpecialName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractInterface/specialName.kt"); - doExtractInterfaceTest(fileName); + runTest("idea/testData/refactoring/extractInterface/specialName.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java index 7ea6c572e03..39d57cfd983 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MoveTestGenerated.java @@ -21,859 +21,721 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MoveTestGenerated extends AbstractMoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMove() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/move"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("java/moveClass/callableReferences/nestedToAnotherClass/nestedToAnotherClass.test") public void testJava_moveClass_callableReferences_nestedToAnotherClass_NestedToAnotherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToAnotherClass/nestedToAnotherClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToAnotherClass/nestedToAnotherClass.test"); } @TestMetadata("java/moveClass/callableReferences/nestedToAnotherClassAndAnotherPackage/nestedToAnotherClassAndAnotherPackage.test") public void testJava_moveClass_callableReferences_nestedToAnotherClassAndAnotherPackage_NestedToAnotherClassAndAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToAnotherClassAndAnotherPackage/nestedToAnotherClassAndAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToAnotherClassAndAnotherPackage/nestedToAnotherClassAndAnotherPackage.test"); } @TestMetadata("java/moveClass/callableReferences/nestedToTopLevel/nestedToTopLevel.test") public void testJava_moveClass_callableReferences_nestedToTopLevel_NestedToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToTopLevel/nestedToTopLevel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToTopLevel/nestedToTopLevel.test"); } @TestMetadata("java/moveClass/callableReferences/nestedToTopLevelAndAnotherPackage/nestedToTopLevelAndAnotherPackage.test") public void testJava_moveClass_callableReferences_nestedToTopLevelAndAnotherPackage_NestedToTopLevelAndAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToTopLevelAndAnotherPackage/nestedToTopLevelAndAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/callableReferences/nestedToTopLevelAndAnotherPackage/nestedToTopLevelAndAnotherPackage.test"); } @TestMetadata("java/moveClass/moveAsMember/moveClassToExternalNestedClass/moveClassToExternalNestedClass.test") public void testJava_moveClass_moveAsMember_moveClassToExternalNestedClass_MoveClassToExternalNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToExternalNestedClass/moveClassToExternalNestedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToExternalNestedClass/moveClassToExternalNestedClass.test"); } @TestMetadata("java/moveClass/moveAsMember/moveClassToNestedSiblingClass/moveClassToNestedSiblingClass.test") public void testJava_moveClass_moveAsMember_moveClassToNestedSiblingClass_MoveClassToNestedSiblingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToNestedSiblingClass/moveClassToNestedSiblingClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToNestedSiblingClass/moveClassToNestedSiblingClass.test"); } @TestMetadata("java/moveClass/moveAsMember/moveClassToTopLevelClass/moveClassToTopLevelClass.test") public void testJava_moveClass_moveAsMember_moveClassToTopLevelClass_MoveClassToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClass/moveClassToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClass/moveClassToTopLevelClass.test"); } @TestMetadata("java/moveClass/moveAsMember/moveClassToTopLevelClassAndMakePackageLocal/moveClassToTopLevelClassAndMakePackageLocal.test") public void testJava_moveClass_moveAsMember_moveClassToTopLevelClassAndMakePackageLocal_MoveClassToTopLevelClassAndMakePackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClassAndMakePackageLocal/moveClassToTopLevelClassAndMakePackageLocal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClassAndMakePackageLocal/moveClassToTopLevelClassAndMakePackageLocal.test"); } @TestMetadata("java/moveClass/moveAsMember/moveClassToTopLevelClassAndMakePrivate/moveClassToTopLevelClassAndMakePrivate.test") public void testJava_moveClass_moveAsMember_moveClassToTopLevelClassAndMakePrivate_MoveClassToTopLevelClassAndMakePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClassAndMakePrivate/moveClassToTopLevelClassAndMakePrivate.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClassAndMakePrivate/moveClassToTopLevelClassAndMakePrivate.test"); } @TestMetadata("java/moveClass/moveAsMember/moveClassToTopLevelClassOfAnotherPackage/moveClassToTopLevelClassOfAnotherPackage.test") public void testJava_moveClass_moveAsMember_moveClassToTopLevelClassOfAnotherPackage_MoveClassToTopLevelClassOfAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClassOfAnotherPackage/moveClassToTopLevelClassOfAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveAsMember/moveClassToTopLevelClassOfAnotherPackage/moveClassToTopLevelClassOfAnotherPackage.test"); } @TestMetadata("java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInAnotherPackage/moveNestedClassToTopLevelInAnotherPackage.test") public void testJava_moveClass_moveInnerToTop_moveNestedClassToTopLevelInAnotherPackage_MoveNestedClassToTopLevelInAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInAnotherPackage/moveNestedClassToTopLevelInAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInAnotherPackage/moveNestedClassToTopLevelInAnotherPackage.test"); } @TestMetadata("java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackage/moveNestedClassToTopLevelInTheSamePackage.test") public void testJava_moveClass_moveInnerToTop_moveNestedClassToTopLevelInTheSamePackage_MoveNestedClassToTopLevelInTheSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackage/moveNestedClassToTopLevelInTheSamePackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackage/moveNestedClassToTopLevelInTheSamePackage.test"); } @TestMetadata("java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance.test") public void testJava_moveClass_moveInnerToTop_moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance_MoveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstance.test"); } @TestMetadata("java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda.test") public void testJava_moveClass_moveInnerToTop_moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda_MoveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda/moveNestedClassToTopLevelInTheSamePackageAndAddOuterInstanceWithLambda.test"); } @TestMetadata("java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndRename/moveNestedClassToTopLevelInTheSamePackageAndRename.test") public void testJava_moveClass_moveInnerToTop_moveNestedClassToTopLevelInTheSamePackageAndRename_MoveNestedClassToTopLevelInTheSamePackageAndRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndRename/moveNestedClassToTopLevelInTheSamePackageAndRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveInnerToTop/moveNestedClassToTopLevelInTheSamePackageAndRename/moveNestedClassToTopLevelInTheSamePackageAndRename.test"); } @TestMetadata("java/moveClass/moveTop/moveTopLevelClassToAnotherPackage/moveTopLevelClassToAnotherPackage.test") public void testJava_moveClass_moveTop_moveTopLevelClassToAnotherPackage_MoveTopLevelClassToAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveTop/moveTopLevelClassToAnotherPackage/moveTopLevelClassToAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveTop/moveTopLevelClassToAnotherPackage/moveTopLevelClassToAnotherPackage.test"); } @TestMetadata("java/moveClass/moveTopToInner/moveTopLevelClassToNestedClass/moveTopLevelClassToTopLevelClass.test") public void testJava_moveClass_moveTopToInner_moveTopLevelClassToNestedClass_MoveTopLevelClassToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveTopToInner/moveTopLevelClassToNestedClass/moveTopLevelClassToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveTopToInner/moveTopLevelClassToNestedClass/moveTopLevelClassToTopLevelClass.test"); } @TestMetadata("java/moveClass/moveTopToInner/moveTopLevelClassToTopLevelClass/moveTopLevelClassToTopLevelClass.test") public void testJava_moveClass_moveTopToInner_moveTopLevelClassToTopLevelClass_MoveTopLevelClassToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveTopToInner/moveTopLevelClassToTopLevelClass/moveTopLevelClassToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveTopToInner/moveTopLevelClassToTopLevelClass/moveTopLevelClassToTopLevelClass.test"); } @TestMetadata("java/moveClass/moveTopToInner/moveTopLevelClassToTopLevelClassOfAnotherPackage/moveTopLevelClassToTopLevelClassOfAnotherPackage.test") public void testJava_moveClass_moveTopToInner_moveTopLevelClassToTopLevelClassOfAnotherPackage_MoveTopLevelClassToTopLevelClassOfAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveClass/moveTopToInner/moveTopLevelClassToTopLevelClassOfAnotherPackage/moveTopLevelClassToTopLevelClassOfAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveClass/moveTopToInner/moveTopLevelClassToTopLevelClassOfAnotherPackage/moveTopLevelClassToTopLevelClassOfAnotherPackage.test"); } @TestMetadata("java/moveField/moveFieldToExternalNestedClass/moveFieldToExternalNestedClass.test") public void testJava_moveField_moveFieldToExternalNestedClass_MoveFieldToExternalNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveField/moveFieldToExternalNestedClass/moveFieldToExternalNestedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveField/moveFieldToExternalNestedClass/moveFieldToExternalNestedClass.test"); } @TestMetadata("java/moveField/moveFieldToNestedSiblingClass/moveFieldToNestedSiblingClass.test") public void testJava_moveField_moveFieldToNestedSiblingClass_MoveFieldToNestedSiblingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveField/moveFieldToNestedSiblingClass/moveFieldToNestedSiblingClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveField/moveFieldToNestedSiblingClass/moveFieldToNestedSiblingClass.test"); } @TestMetadata("java/moveField/moveFieldToTopLevelClass/moveFieldToTopLevelClass.test") public void testJava_moveField_moveFieldToTopLevelClass_MoveFieldToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClass/moveFieldToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClass/moveFieldToTopLevelClass.test"); } @TestMetadata("java/moveField/moveFieldToTopLevelClassAndMakePackageLocal/moveFieldToTopLevelClassAndMakePackageLocal.test") public void testJava_moveField_moveFieldToTopLevelClassAndMakePackageLocal_MoveFieldToTopLevelClassAndMakePackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClassAndMakePackageLocal/moveFieldToTopLevelClassAndMakePackageLocal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClassAndMakePackageLocal/moveFieldToTopLevelClassAndMakePackageLocal.test"); } @TestMetadata("java/moveField/moveFieldToTopLevelClassAndMakePrivate/moveFieldToTopLevelClassAndMakePrivate.test") public void testJava_moveField_moveFieldToTopLevelClassAndMakePrivate_MoveFieldToTopLevelClassAndMakePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClassAndMakePrivate/moveFieldToTopLevelClassAndMakePrivate.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClassAndMakePrivate/moveFieldToTopLevelClassAndMakePrivate.test"); } @TestMetadata("java/moveField/moveFieldToTopLevelClassOfAnotherPackage/moveFieldToTopLevelClassOfAnotherPackage.test") public void testJava_moveField_moveFieldToTopLevelClassOfAnotherPackage_MoveFieldToTopLevelClassOfAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClassOfAnotherPackage/moveFieldToTopLevelClassOfAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveField/moveFieldToTopLevelClassOfAnotherPackage/moveFieldToTopLevelClassOfAnotherPackage.test"); } @TestMetadata("java/moveFile/moveFileToAnotherPackage/moveFileToAnotherPackage.test") public void testJava_moveFile_moveFileToAnotherPackage_MoveFileToAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveFile/moveFileToAnotherPackage/moveFileToAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveFile/moveFileToAnotherPackage/moveFileToAnotherPackage.test"); } @TestMetadata("java/moveMethod/callableReferences/staticMethodToTopLevelClass/staticMethodToTopLevelClass.test") public void testJava_moveMethod_callableReferences_staticMethodToTopLevelClass_StaticMethodToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/callableReferences/staticMethodToTopLevelClass/staticMethodToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/callableReferences/staticMethodToTopLevelClass/staticMethodToTopLevelClass.test"); } @TestMetadata("java/moveMethod/callableReferences/staticMethodToTopLevelClassInAnotherPackage/staticMethodToTopLevelClassInAnotherPackage.test") public void testJava_moveMethod_callableReferences_staticMethodToTopLevelClassInAnotherPackage_StaticMethodToTopLevelClassInAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/callableReferences/staticMethodToTopLevelClassInAnotherPackage/staticMethodToTopLevelClassInAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/callableReferences/staticMethodToTopLevelClassInAnotherPackage/staticMethodToTopLevelClassInAnotherPackage.test"); } @TestMetadata("java/moveMethod/moveMethodToExternalNestedClass/moveMethodToExternalNestedClass.test") public void testJava_moveMethod_moveMethodToExternalNestedClass_MoveMethodToExternalNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/moveMethodToExternalNestedClass/moveMethodToExternalNestedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/moveMethodToExternalNestedClass/moveMethodToExternalNestedClass.test"); } @TestMetadata("java/moveMethod/moveMethodToNestedSiblingClass/moveMethodToNestedSiblingClass.test") public void testJava_moveMethod_moveMethodToNestedSiblingClass_MoveMethodToNestedSiblingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/moveMethodToNestedSiblingClass/moveMethodToNestedSiblingClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/moveMethodToNestedSiblingClass/moveMethodToNestedSiblingClass.test"); } @TestMetadata("java/moveMethod/moveMethodToTopLevelClass/moveMethodToTopLevelClass.test") public void testJava_moveMethod_moveMethodToTopLevelClass_MoveMethodToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClass/moveMethodToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClass/moveMethodToTopLevelClass.test"); } @TestMetadata("java/moveMethod/moveMethodToTopLevelClassAndMakePackageLocal/moveMethodToTopLevelClassAndMakePackageLocal.test") public void testJava_moveMethod_moveMethodToTopLevelClassAndMakePackageLocal_MoveMethodToTopLevelClassAndMakePackageLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClassAndMakePackageLocal/moveMethodToTopLevelClassAndMakePackageLocal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClassAndMakePackageLocal/moveMethodToTopLevelClassAndMakePackageLocal.test"); } @TestMetadata("java/moveMethod/moveMethodToTopLevelClassAndMakePrivate/moveMethodToTopLevelClassAndMakePrivate.test") public void testJava_moveMethod_moveMethodToTopLevelClassAndMakePrivate_MoveMethodToTopLevelClassAndMakePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClassAndMakePrivate/moveMethodToTopLevelClassAndMakePrivate.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClassAndMakePrivate/moveMethodToTopLevelClassAndMakePrivate.test"); } @TestMetadata("java/moveMethod/moveMethodToTopLevelClassOfAnotherPackage/moveMethodToTopLevelClassOfAnotherPackage.test") public void testJava_moveMethod_moveMethodToTopLevelClassOfAnotherPackage_MoveMethodToTopLevelClassOfAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClassOfAnotherPackage/moveMethodToTopLevelClassOfAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/moveMethod/moveMethodToTopLevelClassOfAnotherPackage/moveMethodToTopLevelClassOfAnotherPackage.test"); } @TestMetadata("java/movePackage/movePackageToAnotherPackage/movePackageToAnotherPackage.test") public void testJava_movePackage_movePackageToAnotherPackage_MovePackageToAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/java/movePackage/movePackageToAnotherPackage/movePackageToAnotherPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/java/movePackage/movePackageToAnotherPackage/movePackageToAnotherPackage.test"); } @TestMetadata("kotlin/changePackage/addExtensionImport/addExtensionImport.test") public void testKotlin_changePackage_addExtensionImport_AddExtensionImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/changePackage/addExtensionImport/addExtensionImport.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/changePackage/addExtensionImport/addExtensionImport.test"); } @TestMetadata("kotlin/changePackage/changeToDefaultPackage/changeToDefaultPackage.test") public void testKotlin_changePackage_changeToDefaultPackage_ChangeToDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/changePackage/changeToDefaultPackage/changeToDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/changePackage/changeToDefaultPackage/changeToDefaultPackage.test"); } @TestMetadata("kotlin/changePackage/changeToNonDefaultPackage/changeToNonDefaultPackage.test") public void testKotlin_changePackage_changeToNonDefaultPackage_ChangeToNonDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/changePackage/changeToNonDefaultPackage/changeToNonDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/changePackage/changeToNonDefaultPackage/changeToNonDefaultPackage.test"); } @TestMetadata("kotlin/changePackage/headerClasses/headerClasses.test") public void testKotlin_changePackage_headerClasses_HeaderClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/changePackage/headerClasses/headerClasses.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/changePackage/headerClasses/headerClasses.test"); } @TestMetadata("kotlin/moveDirectory/moveDirectoryWithPackageDirectiveChange/moveDirectoryWithPackageDirectiveChange.test") public void testKotlin_moveDirectory_moveDirectoryWithPackageDirectiveChange_MoveDirectoryWithPackageDirectiveChange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveDirectory/moveDirectoryWithPackageDirectiveChange/moveDirectoryWithPackageDirectiveChange.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveDirectory/moveDirectoryWithPackageDirectiveChange/moveDirectoryWithPackageDirectiveChange.test"); } @TestMetadata("kotlin/moveDirectoryWithQuotation/moveDirectoryWithQuotation.test") public void testKotlin_moveDirectoryWithQuotation_MoveDirectoryWithQuotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveDirectoryWithQuotation/moveDirectoryWithQuotation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveDirectoryWithQuotation/moveDirectoryWithQuotation.test"); } @TestMetadata("kotlin/moveFile/addExtensionImport/addExtensionImport.test") public void testKotlin_moveFile_addExtensionImport_AddExtensionImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/addExtensionImport/addExtensionImport.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/addExtensionImport/addExtensionImport.test"); } @TestMetadata("kotlin/moveFile/callableReferences/callableReferences.test") public void testKotlin_moveFile_callableReferences_CallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/callableReferences/callableReferences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/callableReferences/callableReferences.test"); } @TestMetadata("kotlin/moveFile/internalReferences/internalReferences.test") public void testKotlin_moveFile_internalReferences_InternalReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/internalReferences/internalReferences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/internalReferences/internalReferences.test"); } @TestMetadata("kotlin/moveFile/keepImportAliasRefs/keepImportAliasRefs.test") public void testKotlin_moveFile_keepImportAliasRefs_KeepImportAliasRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/keepImportAliasRefs/keepImportAliasRefs.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/keepImportAliasRefs/keepImportAliasRefs.test"); } @TestMetadata("kotlin/moveFile/moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir/moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir.test") public void testKotlin_moveFile_moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir_MoveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir/moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir/moveFileAndDirWithJavaFileReferringToPackageFragementWithUnmatchedDir.test"); } @TestMetadata("kotlin/moveFile/moveFileToFile/moveFileToFile.test") public void testKotlin_moveFile_moveFileToFile_MoveFileToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveFileToFile/moveFileToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileToFile/moveFileToFile.test"); } @TestMetadata("kotlin/moveFile/moveFileWithoutDeclarations/moveFileWithoutDeclarations.test") public void testKotlin_moveFile_moveFileWithoutDeclarations_MoveFileWithoutDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithoutDeclarations/moveFileWithoutDeclarations.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithoutDeclarations/moveFileWithoutDeclarations.test"); } @TestMetadata("kotlin/moveFile/moveFileWithoutPackageRename/moveFileWithoutPackageRename.test") public void testKotlin_moveFile_moveFileWithoutPackageRename_MoveFileWithoutPackageRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithoutPackageRename/moveFileWithoutPackageRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithoutPackageRename/moveFileWithoutPackageRename.test"); } @TestMetadata("kotlin/moveFile/moveFileWithPackageRename/moveFileWithPackageRename.test") public void testKotlin_moveFile_moveFileWithPackageRename_MoveFileWithPackageRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithPackageRename/moveFileWithPackageRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveFileWithPackageRename/moveFileWithPackageRename.test"); } @TestMetadata("kotlin/moveFile/moveLastFileInPackageWithPackageRename/moveLastFileInPackageWithPackageRename.test") public void testKotlin_moveFile_moveLastFileInPackageWithPackageRename_MoveLastFileInPackageWithPackageRename() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveLastFileInPackageWithPackageRename/moveLastFileInPackageWithPackageRename.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveLastFileInPackageWithPackageRename/moveLastFileInPackageWithPackageRename.test"); } @TestMetadata("kotlin/moveFile/moveMultipleFIles/moveMultipleFiles.test") public void testKotlin_moveFile_moveMultipleFIles_MoveMultipleFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/moveMultipleFIles/moveMultipleFiles.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/moveMultipleFIles/moveMultipleFiles.test"); } @TestMetadata("kotlin/moveFile/packageWithQuotation/moveFileToPackageWithQuotation.test") public void testKotlin_moveFile_packageWithQuotation_MoveFileToPackageWithQuotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/packageWithQuotation/moveFileToPackageWithQuotation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/packageWithQuotation/moveFileToPackageWithQuotation.test"); } @TestMetadata("kotlin/moveFile/selfReferenceInImport/selfReferenceInImport.test") public void testKotlin_moveFile_selfReferenceInImport_SelfReferenceInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/selfReferenceInImport/selfReferenceInImport.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/selfReferenceInImport/selfReferenceInImport.test"); } @TestMetadata("kotlin/moveFile/typeRefWithArguments/typeRefWithArguments.test") public void testKotlin_moveFile_typeRefWithArguments_TypeRefWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveFile/typeRefWithArguments/typeRefWithArguments.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveFile/typeRefWithArguments/typeRefWithArguments.test"); } @TestMetadata("kotlin/moveNestedClass/callableReferences/nestedToAnotherClass/nestedToAnotherClass.test") public void testKotlin_moveNestedClass_callableReferences_nestedToAnotherClass_NestedToAnotherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/callableReferences/nestedToAnotherClass/nestedToAnotherClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/callableReferences/nestedToAnotherClass/nestedToAnotherClass.test"); } @TestMetadata("kotlin/moveNestedClass/callableReferences/nestedToTopLevel/nestedToTopLevel.test") public void testKotlin_moveNestedClass_callableReferences_nestedToTopLevel_NestedToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/callableReferences/nestedToTopLevel/nestedToTopLevel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/callableReferences/nestedToTopLevel/nestedToTopLevel.test"); } @TestMetadata("kotlin/moveNestedClass/deepInnerToTopLevelWithOuterOuterThis/deepInnerToTopLevelWithOuterOuterThis.test") public void testKotlin_moveNestedClass_deepInnerToTopLevelWithOuterOuterThis_DeepInnerToTopLevelWithOuterOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/deepInnerToTopLevelWithOuterOuterThis/deepInnerToTopLevelWithOuterOuterThis.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/deepInnerToTopLevelWithOuterOuterThis/deepInnerToTopLevelWithOuterOuterThis.test"); } @TestMetadata("kotlin/moveNestedClass/deepInnerToTopLevelWithThis/deepInnerToTopLevelWithThis.test") public void testKotlin_moveNestedClass_deepInnerToTopLevelWithThis_DeepInnerToTopLevelWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/deepInnerToTopLevelWithThis/deepInnerToTopLevelWithThis.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/deepInnerToTopLevelWithThis/deepInnerToTopLevelWithThis.test"); } @TestMetadata("kotlin/moveNestedClass/deepNonInnerToTopLevel/deepNonInnerToTopLevel.test") public void testKotlin_moveNestedClass_deepNonInnerToTopLevel_DeepNonInnerToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/deepNonInnerToTopLevel/deepNonInnerToTopLevel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/deepNonInnerToTopLevel/deepNonInnerToTopLevel.test"); } @TestMetadata("kotlin/moveNestedClass/deepPrivateClass/deepPrivateClass.test") public void testKotlin_moveNestedClass_deepPrivateClass_DeepPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/deepPrivateClass/deepPrivateClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/deepPrivateClass/deepPrivateClass.test"); } @TestMetadata("kotlin/moveNestedClass/deepProtectedClass/deepProtectedClass.test") public void testKotlin_moveNestedClass_deepProtectedClass_DeepProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/deepProtectedClass/deepProtectedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/deepProtectedClass/deepProtectedClass.test"); } @TestMetadata("kotlin/moveNestedClass/dropEmptyCompanion/dropEmptyCompanion.test") public void testKotlin_moveNestedClass_dropEmptyCompanion_DropEmptyCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/dropEmptyCompanion/dropEmptyCompanion.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/dropEmptyCompanion/dropEmptyCompanion.test"); } @TestMetadata("kotlin/moveNestedClass/innerToTopLevelAddInstanceParam/innerToTopLevelAddInstanceParam.test") public void testKotlin_moveNestedClass_innerToTopLevelAddInstanceParam_InnerToTopLevelAddInstanceParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelAddInstanceParam/innerToTopLevelAddInstanceParam.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelAddInstanceParam/innerToTopLevelAddInstanceParam.test"); } @TestMetadata("kotlin/moveNestedClass/innerToTopLevelNoThis/innerToTopLevelNoThis.test") public void testKotlin_moveNestedClass_innerToTopLevelNoThis_InnerToTopLevelNoThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelNoThis/innerToTopLevelNoThis.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelNoThis/innerToTopLevelNoThis.test"); } @TestMetadata("kotlin/moveNestedClass/innerToTopLevelWithThis/innerToTopLevelWithThis.test") public void testKotlin_moveNestedClass_innerToTopLevelWithThis_InnerToTopLevelWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelWithThis/innerToTopLevelWithThis.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelWithThis/innerToTopLevelWithThis.test"); } @TestMetadata("kotlin/moveNestedClass/innerToTopLevelWithThisOuterRefConflicts/innerToTopLevelWithThisOuterRefConflicts.test") public void testKotlin_moveNestedClass_innerToTopLevelWithThisOuterRefConflicts_InnerToTopLevelWithThisOuterRefConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelWithThisOuterRefConflicts/innerToTopLevelWithThisOuterRefConflicts.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/innerToTopLevelWithThisOuterRefConflicts/innerToTopLevelWithThisOuterRefConflicts.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToOuterClass1/nonInnerToOuterClass1.test") public void testKotlin_moveNestedClass_nonInnerToOuterClass1_NonInnerToOuterClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToOuterClass1/nonInnerToOuterClass1.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToOuterClass1/nonInnerToOuterClass1.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToOuterClass2/nonInnerToOuterClass2.test") public void testKotlin_moveNestedClass_nonInnerToOuterClass2_NonInnerToOuterClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToOuterClass2/nonInnerToOuterClass2.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToOuterClass2/nonInnerToOuterClass2.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver/nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver.test") public void testKotlin_moveNestedClass_nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver_NonInnerToSubclassWithCompanionAsImplicitDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver/nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver/nonInnerToSubclassWithCompanionAsImplicitDispatchReceiver.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToTopLevel/nonInnerToTopLevel.test") public void testKotlin_moveNestedClass_nonInnerToTopLevel_NonInnerToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevel/nonInnerToTopLevel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevel/nonInnerToTopLevel.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToTopLevelClass/nonInnerToTopLevelClass.test") public void testKotlin_moveNestedClass_nonInnerToTopLevelClass_NonInnerToTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevelClass/nonInnerToTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevelClass/nonInnerToTopLevelClass.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToTopLevelCompanionConflict/nonInnerToTopLevelCompanionConflict.test") public void testKotlin_moveNestedClass_nonInnerToTopLevelCompanionConflict_NonInnerToTopLevelCompanionConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevelCompanionConflict/nonInnerToTopLevelCompanionConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevelCompanionConflict/nonInnerToTopLevelCompanionConflict.test"); } @TestMetadata("kotlin/moveNestedClass/nonInnerToTopLevelPrivateClass/nonInnerToTopLevelPrivateClass.test") public void testKotlin_moveNestedClass_nonInnerToTopLevelPrivateClass_NonInnerToTopLevelPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevelPrivateClass/nonInnerToTopLevelPrivateClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/nonInnerToTopLevelPrivateClass/nonInnerToTopLevelPrivateClass.test"); } @TestMetadata("kotlin/moveNestedClass/objectToTopLevel/objectToTopLevel.test") public void testKotlin_moveNestedClass_objectToTopLevel_ObjectToTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/objectToTopLevel/objectToTopLevel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/objectToTopLevel/objectToTopLevel.test"); } @TestMetadata("kotlin/moveNestedClass/privateClass/privateClass.test") public void testKotlin_moveNestedClass_privateClass_PrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/privateClass/privateClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/privateClass/privateClass.test"); } @TestMetadata("kotlin/moveNestedClass/protectedClass/protectedClass.test") public void testKotlin_moveNestedClass_protectedClass_ProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/protectedClass/protectedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/protectedClass/protectedClass.test"); } @TestMetadata("kotlin/moveNestedClass/protectedClassNoConflicts/protectedClass.test") public void testKotlin_moveNestedClass_protectedClassNoConflicts_ProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveNestedClass/protectedClassNoConflicts/protectedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveNestedClass/protectedClassNoConflicts/protectedClass.test"); } @TestMetadata("kotlin/movePackage/movePackage/movePackage.test") public void testKotlin_movePackage_movePackage_MovePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/movePackage/movePackage/movePackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/movePackage/movePackage/movePackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceAndTargetWithFqNames/differentSourceAndTargetWithFqNames.test") public void testKotlin_moveTopLevelDeclarations_callsAndCallableRefs_internalUsages_differentSourceAndTargetWithFqNames_DifferentSourceAndTargetWithFqNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceAndTargetWithFqNames/differentSourceAndTargetWithFqNames.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceAndTargetWithFqNames/differentSourceAndTargetWithFqNames.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceAndTargetWithImports/differentSourceAndTargetWithImports.test") public void testKotlin_moveTopLevelDeclarations_callsAndCallableRefs_internalUsages_differentSourceAndTargetWithImports_DifferentSourceAndTargetWithImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceAndTargetWithImports/differentSourceAndTargetWithImports.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceAndTargetWithImports/differentSourceAndTargetWithImports.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceWithFqNames/differentSourceWithFqNames.test") public void testKotlin_moveTopLevelDeclarations_callsAndCallableRefs_internalUsages_differentSourceWithFqNames_DifferentSourceWithFqNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceWithFqNames/differentSourceWithFqNames.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceWithFqNames/differentSourceWithFqNames.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceWithImports/differentSourceWithImports.test") public void testKotlin_moveTopLevelDeclarations_callsAndCallableRefs_internalUsages_differentSourceWithImports_DifferentSourceWithImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceWithImports/differentSourceWithImports.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentSourceWithImports/differentSourceWithImports.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentTarget/differentTarget.test") public void testKotlin_moveTopLevelDeclarations_callsAndCallableRefs_internalUsages_differentTarget_DifferentTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentTarget/differentTarget.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentTarget/differentTarget.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentTargetWithFqNames/differentTargetWithFqNames.test") public void testKotlin_moveTopLevelDeclarations_callsAndCallableRefs_internalUsages_differentTargetWithFqNames_DifferentTargetWithFqNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentTargetWithFqNames/differentTargetWithFqNames.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/callsAndCallableRefs/internalUsages/differentTargetWithFqNames/differentTargetWithFqNames.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/classAlreadyInaccessible/classAlreadyInaccessible.test") public void testKotlin_moveTopLevelDeclarations_classAlreadyInaccessible_ClassAlreadyInaccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/classAlreadyInaccessible/classAlreadyInaccessible.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/classAlreadyInaccessible/classAlreadyInaccessible.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/functionAlreadyInaccessible/functionAlreadyInaccessible.test") public void testKotlin_moveTopLevelDeclarations_functionAlreadyInaccessible_FunctionAlreadyInaccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/functionAlreadyInaccessible/functionAlreadyInaccessible.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/functionAlreadyInaccessible/functionAlreadyInaccessible.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentSource/differentSource.test") public void testKotlin_moveTopLevelDeclarations_implicitInvokeCalls_differentSource_DifferentSource() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentSource/differentSource.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentSource/differentSource.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentSourceAndTarget/differentSourceAndTarget.test") public void testKotlin_moveTopLevelDeclarations_implicitInvokeCalls_differentSourceAndTarget_DifferentSourceAndTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentSourceAndTarget/differentSourceAndTarget.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentSourceAndTarget/differentSourceAndTarget.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentTarget/differentTarget.test") public void testKotlin_moveTopLevelDeclarations_implicitInvokeCalls_differentTarget_DifferentTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentTarget/differentTarget.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/implicitInvokeCalls/differentTarget/differentTarget.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/classWithInitializer/delegateInObject.test") public void testKotlin_moveTopLevelDeclarations_misc_classWithInitializer_DelegateInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/classWithInitializer/delegateInObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/classWithInitializer/delegateInObject.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/companionExtensionMemberRef/companionExtensionMemberRef.test") public void testKotlin_moveTopLevelDeclarations_misc_companionExtensionMemberRef_CompanionExtensionMemberRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionExtensionMemberRef/companionExtensionMemberRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionExtensionMemberRef/companionExtensionMemberRef.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/companionMemberRefDelegation/companionMemberRefDelegation.test") public void testKotlin_moveTopLevelDeclarations_misc_companionMemberRefDelegation_CompanionMemberRefDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionMemberRefDelegation/companionMemberRefDelegation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionMemberRefDelegation/companionMemberRefDelegation.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/companionMemberRefFakeOverride/companionMemberRefFakeOverride.test") public void testKotlin_moveTopLevelDeclarations_misc_companionMemberRefFakeOverride_CompanionMemberRefFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionMemberRefFakeOverride/companionMemberRefFakeOverride.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionMemberRefFakeOverride/companionMemberRefFakeOverride.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/companionMemberRefWithJavaParent/companionMemberRefWithJavaParent.test") public void testKotlin_moveTopLevelDeclarations_misc_companionMemberRefWithJavaParent_CompanionMemberRefWithJavaParent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionMemberRefWithJavaParent/companionMemberRefWithJavaParent.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/companionMemberRefWithJavaParent/companionMemberRefWithJavaParent.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/delegateInObject/delegateInObject.test") public void testKotlin_moveTopLevelDeclarations_misc_delegateInObject_DelegateInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/delegateInObject/delegateInObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/delegateInObject/delegateInObject.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/facadeClassChangeInTheSamePackage/facadeClassChangeInTheSamePackage.test") public void testKotlin_moveTopLevelDeclarations_misc_facadeClassChangeInTheSamePackage_FacadeClassChangeInTheSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/facadeClassChangeInTheSamePackage/facadeClassChangeInTheSamePackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/facadeClassChangeInTheSamePackage/facadeClassChangeInTheSamePackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/fakeOverrideInObject/fakeOverrideInObject.test") public void testKotlin_moveTopLevelDeclarations_misc_fakeOverrideInObject_FakeOverrideInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/fakeOverrideInObject/fakeOverrideInObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/fakeOverrideInObject/fakeOverrideInObject.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/functionAndPropertyWithSameName/functionAndPropertyWithSameName.test") public void testKotlin_moveTopLevelDeclarations_misc_functionAndPropertyWithSameName_FunctionAndPropertyWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/functionAndPropertyWithSameName/functionAndPropertyWithSameName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/functionAndPropertyWithSameName/functionAndPropertyWithSameName.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/internalReferences/internalReferences.test") public void testKotlin_moveTopLevelDeclarations_misc_internalReferences_InternalReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/internalReferences/internalReferences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/internalReferences/internalReferences.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/kt17032/kt17032.test") public void testKotlin_moveTopLevelDeclarations_misc_kt17032_Kt17032() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/kt17032/kt17032.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/kt17032/kt17032.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/moveClassFromDefaultPackage/moveClassFromDefaultPackage.test") public void testKotlin_moveTopLevelDeclarations_misc_moveClassFromDefaultPackage_MoveClassFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveClassFromDefaultPackage/moveClassFromDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveClassFromDefaultPackage/moveClassFromDefaultPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/moveClassToDefaultPackage/moveClassToDefaultPackage.test") public void testKotlin_moveTopLevelDeclarations_misc_moveClassToDefaultPackage_MoveClassToDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveClassToDefaultPackage/moveClassToDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveClassToDefaultPackage/moveClassToDefaultPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/moveClassWithImportsRetained/moveClassWithImportsRetained.test") public void testKotlin_moveTopLevelDeclarations_misc_moveClassWithImportsRetained_MoveClassWithImportsRetained() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveClassWithImportsRetained/moveClassWithImportsRetained.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveClassWithImportsRetained/moveClassWithImportsRetained.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/moveFromDefaultPackage/moveFromDefaultPackage.test") public void testKotlin_moveTopLevelDeclarations_misc_moveFromDefaultPackage_MoveFromDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveFromDefaultPackage/moveFromDefaultPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveFromDefaultPackage/moveFromDefaultPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/moveFunctionWithImportsRetained/moveFunctionWithImportsRetained.test") public void testKotlin_moveTopLevelDeclarations_misc_moveFunctionWithImportsRetained_MoveFunctionWithImportsRetained() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveFunctionWithImportsRetained/moveFunctionWithImportsRetained.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/moveFunctionWithImportsRetained/moveFunctionWithImportsRetained.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/mutualDependency/mutualDependency.test") public void testKotlin_moveTopLevelDeclarations_misc_mutualDependency_MutualDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/mutualDependency/mutualDependency.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/mutualDependency/mutualDependency.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/nonCodeUsagesWithQuotedName/nonCodeUsageWithQuotedName.test") public void testKotlin_moveTopLevelDeclarations_misc_nonCodeUsagesWithQuotedName_NonCodeUsageWithQuotedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/nonCodeUsagesWithQuotedName/nonCodeUsageWithQuotedName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/nonCodeUsagesWithQuotedName/nonCodeUsageWithQuotedName.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/protectedConstructorRefInSuperListEntry/protectedConstructorRefInSuperListEntry.test") public void testKotlin_moveTopLevelDeclarations_misc_protectedConstructorRefInSuperListEntry_ProtectedConstructorRefInSuperListEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/protectedConstructorRefInSuperListEntry/protectedConstructorRefInSuperListEntry.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/protectedConstructorRefInSuperListEntry/protectedConstructorRefInSuperListEntry.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/protectedMembersExternalRefs/protectedMembersExternalRefs.test") public void testKotlin_moveTopLevelDeclarations_misc_protectedMembersExternalRefs_ProtectedMembersExternalRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/protectedMembersExternalRefs/protectedMembersExternalRefs.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/protectedMembersExternalRefs/protectedMembersExternalRefs.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/protectedMembersInternalRefs/protectedMembersInternalRefs.test") public void testKotlin_moveTopLevelDeclarations_misc_protectedMembersInternalRefs_ProtectedMembersInternalRefs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/protectedMembersInternalRefs/protectedMembersInternalRefs.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/protectedMembersInternalRefs/protectedMembersInternalRefs.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/sealedClassWithAllSubclasses/sealedClassWithAllSubclasses.test") public void testKotlin_moveTopLevelDeclarations_misc_sealedClassWithAllSubclasses_SealedClassWithAllSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithAllSubclasses/sealedClassWithAllSubclasses.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithAllSubclasses/sealedClassWithAllSubclasses.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test") public void testKotlin_moveTopLevelDeclarations_misc_sealedClassWithSkippedSubclasses_SealedClassWithSkippedSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedClassWithSkippedSubclasses/sealedClassWithSkippedSubclasses.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test") public void testKotlin_moveTopLevelDeclarations_misc_sealedSubclassWithSkippedRoot_SealedSubclassWithSkippedRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/sealedSubclassWithSkippedRoot/sealedSubclassWithSkippedRoot.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/selfReferences/selfReferences.test") public void testKotlin_moveTopLevelDeclarations_misc_selfReferences_SelfReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/selfReferences/selfReferences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/selfReferences/selfReferences.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/shortenCompanionObject2/shortenCompanionObject.test") public void testKotlin_moveTopLevelDeclarations_misc_shortenCompanionObject2_ShortenCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/shortenCompanionObject2/shortenCompanionObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/shortenCompanionObject2/shortenCompanionObject.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/shortenStringTemplateEntry/shortenStringTemplateEntry.test") public void testKotlin_moveTopLevelDeclarations_misc_shortenStringTemplateEntry_ShortenStringTemplateEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/shortenStringTemplateEntry/shortenStringTemplateEntry.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/shortenStringTemplateEntry/shortenStringTemplateEntry.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/singletonsAndStatics.test") public void testKotlin_moveTopLevelDeclarations_misc_singletonsAndStatics_SingletonsAndStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/singletonsAndStatics.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/singletonsAndStatics/singletonsAndStatics.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/superReferences/superReferences.test") public void testKotlin_moveTopLevelDeclarations_misc_superReferences_SuperReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/superReferences/superReferences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/superReferences/superReferences.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/syntheticMembers/syntheticMembers.test") public void testKotlin_moveTopLevelDeclarations_misc_syntheticMembers_SyntheticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/syntheticMembers/syntheticMembers.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/syntheticMembers/syntheticMembers.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/misc/unaffectedQualifiedReferences/unaffectedQualifiedReferences.test") public void testKotlin_moveTopLevelDeclarations_misc_unaffectedQualifiedReferences_UnaffectedQualifiedReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/unaffectedQualifiedReferences/unaffectedQualifiedReferences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/misc/unaffectedQualifiedReferences/unaffectedQualifiedReferences.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveClassToFile/moveClassToFile.test") public void testKotlin_moveTopLevelDeclarations_moveClassToFile_MoveClassToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveClassToFile/moveClassToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveClassToFile/moveClassToFile.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveClassToNewFileAndQuotePackage/moveClassToNewFileAndQuotePackage.test") public void testKotlin_moveTopLevelDeclarations_moveClassToNewFileAndQuotePackage_MoveClassToNewFileAndQuotePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveClassToNewFileAndQuotePackage/moveClassToNewFileAndQuotePackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveClassToNewFileAndQuotePackage/moveClassToNewFileAndQuotePackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveClassToPackage/moveClassToPackage.test") public void testKotlin_moveTopLevelDeclarations_moveClassToPackage_MoveClassToPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveClassToPackage/moveClassToPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveClassToPackage/moveClassToPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveExtensionFunctionToFil/moveExtensionFunctionToFile.test") public void testKotlin_moveTopLevelDeclarations_moveExtensionFunctionToFil_MoveExtensionFunctionToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveExtensionFunctionToFil/moveExtensionFunctionToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveExtensionFunctionToFil/moveExtensionFunctionToFile.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveExtensionPropertyToFile/moveExtensionPropertyToFile.test") public void testKotlin_moveTopLevelDeclarations_moveExtensionPropertyToFile_MoveExtensionPropertyToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveExtensionPropertyToFile/moveExtensionPropertyToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveExtensionPropertyToFile/moveExtensionPropertyToFile.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveFunctionToFile/moveFunctionToFile.test") public void testKotlin_moveTopLevelDeclarations_moveFunctionToFile_MoveFunctionToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveFunctionToFile/moveFunctionToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveFunctionToFile/moveFunctionToFile.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveFunctionToPackage/moveFunctionToPackage.test") public void testKotlin_moveTopLevelDeclarations_moveFunctionToPackage_MoveFunctionToPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveFunctionToPackage/moveFunctionToPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveFunctionToPackage/moveFunctionToPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveFunctionToPackageUsedInJava/moveFunctionToPackageUsedInJava.test") public void testKotlin_moveTopLevelDeclarations_moveFunctionToPackageUsedInJava_MoveFunctionToPackageUsedInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveFunctionToPackageUsedInJava/moveFunctionToPackageUsedInJava.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveFunctionToPackageUsedInJava/moveFunctionToPackageUsedInJava.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveObjectToFile/moveObjectToFile.test") public void testKotlin_moveTopLevelDeclarations_moveObjectToFile_MoveObjectToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveObjectToFile/moveObjectToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveObjectToFile/moveObjectToFile.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveObjectToPackage/moveObjectToPackage.test") public void testKotlin_moveTopLevelDeclarations_moveObjectToPackage_MoveObjectToPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveObjectToPackage/moveObjectToPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveObjectToPackage/moveObjectToPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/moveOnlyFunctionToPackageUsedInJava/moveOnlyFunctionToPackageUsedInJava.test") public void testKotlin_moveTopLevelDeclarations_moveOnlyFunctionToPackageUsedInJava_MoveOnlyFunctionToPackageUsedInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveOnlyFunctionToPackageUsedInJava/moveOnlyFunctionToPackageUsedInJava.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/moveOnlyFunctionToPackageUsedInJava/moveOnlyFunctionToPackageUsedInJava.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/movePrivateClassWithUsagesInBothAccessors/movePrivateClassWithusagesInBothAccessors.test") public void testKotlin_moveTopLevelDeclarations_movePrivateClassWithUsagesInBothAccessors_MovePrivateClassWithusagesInBothAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivateClassWithUsagesInBothAccessors/movePrivateClassWithusagesInBothAccessors.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivateClassWithUsagesInBothAccessors/movePrivateClassWithusagesInBothAccessors.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/movePrivateFun/movePrivateFun.test") public void testKotlin_moveTopLevelDeclarations_movePrivateFun_MovePrivateFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivateFun/movePrivateFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivateFun/movePrivateFun.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/movePrivateProperty/movePrivateProperty.test") public void testKotlin_moveTopLevelDeclarations_movePrivateProperty_MovePrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivateProperty/movePrivateProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivateProperty/movePrivateProperty.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test") public void testKotlin_moveTopLevelDeclarations_movePrivatePropertyWithDefaultAccessors_MovePrivatePropertyWithDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePrivatePropertyWithDefaultAccessors/movePrivatePropertyWithDefaultAccessors.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/movePropertyToFile/movePropertyToFile.test") public void testKotlin_moveTopLevelDeclarations_movePropertyToFile_MovePropertyToFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePropertyToFile/movePropertyToFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePropertyToFile/movePropertyToFile.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/movePropertyToPackage/movePropertyToPackage.test") public void testKotlin_moveTopLevelDeclarations_movePropertyToPackage_MovePropertyToPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePropertyToPackage/movePropertyToPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/movePropertyToPackage/movePropertyToPackage.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/objectAlreadyInaccessible/objectAlreadyInaccessible.test") public void testKotlin_moveTopLevelDeclarations_objectAlreadyInaccessible_ObjectAlreadyInaccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/objectAlreadyInaccessible/objectAlreadyInaccessible.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/objectAlreadyInaccessible/objectAlreadyInaccessible.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/propertyAlreadyInaccessible/propertyAlreadyInaccessible.test") public void testKotlin_moveTopLevelDeclarations_propertyAlreadyInaccessible_PropertyAlreadyInaccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/propertyAlreadyInaccessible/propertyAlreadyInaccessible.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/propertyAlreadyInaccessible/propertyAlreadyInaccessible.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/protectedMemberUsageWithSuper/protectedMemberUsageWithSuper.test") public void testKotlin_moveTopLevelDeclarations_protectedMemberUsageWithSuper_ProtectedMemberUsageWithSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/protectedMemberUsageWithSuper/protectedMemberUsageWithSuper.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/protectedMemberUsageWithSuper/protectedMemberUsageWithSuper.test"); } @TestMetadata("kotlin/moveTopLevelDeclarations/protectedMemberUsageWithThis/protectedMemberUsageWithThis.test") public void testKotlin_moveTopLevelDeclarations_protectedMemberUsageWithThis_ProtectedMemberUsageWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/protectedMemberUsageWithThis/protectedMemberUsageWithThis.test"); - doTest(fileName); + runTest("idea/testData/refactoring/move/kotlin/moveTopLevelDeclarations/protectedMemberUsageWithThis/protectedMemberUsageWithThis.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java index 9f99aef6f38..aa73487620c 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/move/MultiModuleMoveTestGenerated.java @@ -21,85 +21,76 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiModuleMoveTestGenerated extends AbstractMultiModuleMoveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMoveMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/moveMultiModule"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("moveDirectoryKeepPackageDirective/moveDirectoryKeepPackageDirective.test") public void testMoveDirectoryKeepPackageDirective_MoveDirectoryKeepPackageDirective() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveDirectoryKeepPackageDirective/moveDirectoryKeepPackageDirective.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveDirectoryKeepPackageDirective/moveDirectoryKeepPackageDirective.test"); } @TestMetadata("moveDirectoryToUnrelatedModuleConflict/moveDirectoryToUnrelatedModuleConflict.test") public void testMoveDirectoryToUnrelatedModuleConflict_MoveDirectoryToUnrelatedModuleConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveDirectoryToUnrelatedModuleConflict/moveDirectoryToUnrelatedModuleConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveDirectoryToUnrelatedModuleConflict/moveDirectoryToUnrelatedModuleConflict.test"); } @TestMetadata("moveFileToNonSrc/moveFileToNonSrc.test") public void testMoveFileToNonSrc_MoveFileToNonSrc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveFileToNonSrc/moveFileToNonSrc.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveFileToNonSrc/moveFileToNonSrc.test"); } @TestMetadata("moveFileWithDeclarationsToUnrelatedModuleConflict/moveFileWithDeclarationsToUnrelatedModuleConflict.test") public void testMoveFileWithDeclarationsToUnrelatedModuleConflict_MoveFileWithDeclarationsToUnrelatedModuleConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveFileWithDeclarationsToUnrelatedModuleConflict/moveFileWithDeclarationsToUnrelatedModuleConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveFileWithDeclarationsToUnrelatedModuleConflict/moveFileWithDeclarationsToUnrelatedModuleConflict.test"); } @TestMetadata("moveFromJsModuleToJvmModule/moveFromJsModuleToJvmModule.test") public void testMoveFromJsModuleToJvmModule_MoveFromJsModuleToJvmModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveFromJsModuleToJvmModule/moveFromJsModuleToJvmModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveFromJsModuleToJvmModule/moveFromJsModuleToJvmModule.test"); } @TestMetadata("moveFromJvmModuleToJsModule/moveFromJvmModuleToJsModule.test") public void testMoveFromJvmModuleToJsModule_MoveFromJvmModuleToJsModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveFromJvmModuleToJsModule/moveFromJvmModuleToJsModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveFromJvmModuleToJsModule/moveFromJvmModuleToJsModule.test"); } @TestMetadata("moveInternalToAnotherModule/moveInternalToAnotherModule.test") public void testMoveInternalToAnotherModule_MoveInternalToAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveInternalToAnotherModule/moveInternalToAnotherModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveInternalToAnotherModule/moveInternalToAnotherModule.test"); } @TestMetadata("moveJdkDependentToJsModule/moveJdkDependentToJsModule.test") public void testMoveJdkDependentToJsModule_MoveJdkDependentToJsModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveJdkDependentToJsModule/moveJdkDependentToJsModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveJdkDependentToJsModule/moveJdkDependentToJsModule.test"); } @TestMetadata("moveMultipleFilesToUnrelatedModuleConflict/moveMultipleFilesToUnrelatedModuleConflict.test") public void testMoveMultipleFilesToUnrelatedModuleConflict_MoveMultipleFilesToUnrelatedModuleConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveMultipleFilesToUnrelatedModuleConflict/moveMultipleFilesToUnrelatedModuleConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveMultipleFilesToUnrelatedModuleConflict/moveMultipleFilesToUnrelatedModuleConflict.test"); } @TestMetadata("movePackageToUnrelatedModuleConflict/movePackageToUnrelatedModuleConflict.test") public void testMovePackageToUnrelatedModuleConflict_MovePackageToUnrelatedModuleConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/movePackageToUnrelatedModuleConflict/movePackageToUnrelatedModuleConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/movePackageToUnrelatedModuleConflict/movePackageToUnrelatedModuleConflict.test"); } @TestMetadata("moveToModuleWithoutLibConflict/moveToModuleWithoutLibConflict.test") public void testMoveToModuleWithoutLibConflict_MoveToModuleWithoutLibConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveToModuleWithoutLibConflict/moveToModuleWithoutLibConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveToModuleWithoutLibConflict/moveToModuleWithoutLibConflict.test"); } @TestMetadata("moveToUnrelatedModuleConflict/moveToUnrelatedModuleConflict.test") public void testMoveToUnrelatedModuleConflict_MoveToUnrelatedModuleConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/moveToUnrelatedModuleConflict/moveToUnrelatedModuleConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/moveToUnrelatedModuleConflict/moveToUnrelatedModuleConflict.test"); } @TestMetadata("visibilityConflictInImport/visibilityConflictInImport.test") public void testVisibilityConflictInImport_VisibilityConflictInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/moveMultiModule/visibilityConflictInImport/visibilityConflictInImport.test"); - doTest(fileName); + runTest("idea/testData/refactoring/moveMultiModule/visibilityConflictInImport/visibilityConflictInImport.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/pullUp/PullUpTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/pullUp/PullUpTestGenerated.java index 67f39ef099b..a23cf0243a4 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/pullUp/PullUpTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/pullUp/PullUpTestGenerated.java @@ -23,16 +23,18 @@ public class PullUpTestGenerated extends AbstractPullUpTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class K2K extends AbstractPullUpTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doKotlinTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractFromInterfaceToInterface.kt") public void testAbstractFromInterfaceToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/abstractFromInterfaceToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/abstractFromInterfaceToInterface.kt"); } @TestMetadata("accidentalOverrides.kt") public void testAccidentalOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/accidentalOverrides.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/accidentalOverrides.kt"); } public void testAllFilesPresentInK2K() throws Exception { @@ -41,320 +43,267 @@ public class PullUpTestGenerated extends AbstractPullUpTest { @TestMetadata("clashWithSuper.kt") public void testClashWithSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/clashWithSuper.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/clashWithSuper.kt"); } @TestMetadata("constructorParametersToInterface.kt") public void testConstructorParametersToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersToInterface.kt"); } @TestMetadata("constructorParametersToSuperClass.kt") public void testConstructorParametersToSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersToSuperClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersToSuperClass.kt"); } @TestMetadata("constructorParametersToSuperClassAndMakeAbstract.kt") public void testConstructorParametersToSuperClassAndMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersToSuperClassAndMakeAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersToSuperClassAndMakeAbstract.kt"); } @TestMetadata("constructorParametersWithDefaultValue1.kt") public void testConstructorParametersWithDefaultValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersWithDefaultValue1.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersWithDefaultValue1.kt"); } @TestMetadata("constructorParametersWithDefaultValue2.kt") public void testConstructorParametersWithDefaultValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersWithDefaultValue2.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersWithDefaultValue2.kt"); } @TestMetadata("constructorParametersWithNamedArgs.kt") public void testConstructorParametersWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersWithNamedArgs.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersWithNamedArgs.kt"); } @TestMetadata("constructorParametersWithNamedArgsAndDefault.kt") public void testConstructorParametersWithNamedArgsAndDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersWithNamedArgsAndDefault.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersWithNamedArgsAndDefault.kt"); } @TestMetadata("constructorParametersWithVararg.kt") public void testConstructorParametersWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/constructorParametersWithVararg.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/constructorParametersWithVararg.kt"); } @TestMetadata("defaultValuesInOverride.kt") public void testDefaultValuesInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/defaultValuesInOverride.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/defaultValuesInOverride.kt"); } @TestMetadata("dropFinal.kt") public void testDropFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/dropFinal.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/dropFinal.kt"); } @TestMetadata("dropModifierWhenMovingSideOverride.kt") public void testDropModifierWhenMovingSideOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverride.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverride.kt"); } @TestMetadata("dropModifierWhenMovingSideOverrideWithAbstract.kt") public void testDropModifierWhenMovingSideOverrideWithAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverrideWithAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverrideWithAbstract.kt"); } @TestMetadata("dropModifierWhenMovingSideOverrideWithSuperEntry.kt") public void testDropModifierWhenMovingSideOverrideWithSuperEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverrideWithSuperEntry.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverrideWithSuperEntry.kt"); } @TestMetadata("dropModifierWhenMovingSideOverrideWithSuperEntryAndAbstract.kt") public void testDropModifierWhenMovingSideOverrideWithSuperEntryAndAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverrideWithSuperEntryAndAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/dropModifierWhenMovingSideOverrideWithSuperEntryAndAbstract.kt"); } @TestMetadata("fromClassToClass.kt") public void testFromClassToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/fromClassToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/fromClassToClass.kt"); } @TestMetadata("fromClassToClassMakeAbstract.kt") public void testFromClassToClassMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/fromClassToClassMakeAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/fromClassToClassMakeAbstract.kt"); } @TestMetadata("fromClassToClassWithGenerics.kt") public void testFromClassToClassWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/fromClassToClassWithGenerics.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/fromClassToClassWithGenerics.kt"); } @TestMetadata("fromClassToInterface.kt") public void testFromClassToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/fromClassToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/fromClassToInterface.kt"); } @TestMetadata("fromClassToInterfaceMakeAbstract.kt") public void testFromClassToInterfaceMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/fromClassToInterfaceMakeAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/fromClassToInterfaceMakeAbstract.kt"); } @TestMetadata("implicitCompanionUsages.kt") public void testImplicitCompanionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/implicitCompanionUsages.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/implicitCompanionUsages.kt"); } @TestMetadata("inaccessibleMemberUsed.kt") public void testInaccessibleMemberUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/inaccessibleMemberUsed.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/inaccessibleMemberUsed.kt"); } @TestMetadata("initializerInConstructor.kt") public void testInitializerInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/initializerInConstructor.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/initializerInConstructor.kt"); } @TestMetadata("initializerInMultipleConstructorsEq.kt") public void testInitializerInMultipleConstructorsEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/initializerInMultipleConstructorsEq.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/initializerInMultipleConstructorsEq.kt"); } @TestMetadata("initializerInMultipleConstructorsNonEq.kt") public void testInitializerInMultipleConstructorsNonEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/initializerInMultipleConstructorsNonEq.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/initializerInMultipleConstructorsNonEq.kt"); } @TestMetadata("innerClassToInterface.kt") public void testInnerClassToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/innerClassToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/innerClassToInterface.kt"); } @TestMetadata("moveAllSuperInterfaces.kt") public void testMoveAllSuperInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/moveAllSuperInterfaces.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/moveAllSuperInterfaces.kt"); } @TestMetadata("moveAllSuperInterfacesWithGenerics.kt") public void testMoveAllSuperInterfacesWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/moveAllSuperInterfacesWithGenerics.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/moveAllSuperInterfacesWithGenerics.kt"); } @TestMetadata("moveSuperInterfaces.kt") public void testMoveSuperInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/moveSuperInterfaces.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/moveSuperInterfaces.kt"); } @TestMetadata("moveSuperInterfacesToEmptySpecifierList.kt") public void testMoveSuperInterfacesToEmptySpecifierList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/moveSuperInterfacesToEmptySpecifierList.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/moveSuperInterfacesToEmptySpecifierList.kt"); } @TestMetadata("moveSuperInterfaceToItSelf.kt") public void testMoveSuperInterfaceToItSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/moveSuperInterfaceToItSelf.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/moveSuperInterfaceToItSelf.kt"); } @TestMetadata("multipleInitializersInConstructorsEq.kt") public void testMultipleInitializersInConstructorsEq() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/multipleInitializersInConstructorsEq.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/multipleInitializersInConstructorsEq.kt"); } @TestMetadata("noCaret.kt") public void testNoCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/noCaret.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/noCaret.kt"); } @TestMetadata("noClashWithAbstractSuper.kt") public void testNoClashWithAbstractSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/noClashWithAbstractSuper.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/noClashWithAbstractSuper.kt"); } @TestMetadata("noInitializationInInterface.kt") public void testNoInitializationInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/noInitializationInInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/noInitializationInInterface.kt"); } @TestMetadata("noSuperClass.kt") public void testNoSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/noSuperClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/noSuperClass.kt"); } @TestMetadata("noVisibilityCheckBetweenMovedMembers.kt") public void testNoVisibilityCheckBetweenMovedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/noVisibilityCheckBetweenMovedMembers.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/noVisibilityCheckBetweenMovedMembers.kt"); } @TestMetadata("outsideOfClass.kt") public void testOutsideOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/outsideOfClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/outsideOfClass.kt"); } @TestMetadata("parameterNameConflict.kt") public void testParameterNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/parameterNameConflict.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/parameterNameConflict.kt"); } @TestMetadata("parametersInPrimaryInitializer.kt") public void testParametersInPrimaryInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/parametersInPrimaryInitializer.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/parametersInPrimaryInitializer.kt"); } @TestMetadata("privateMemberWithUsagesToClass.kt") public void testPrivateMemberWithUsagesToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/privateMemberWithUsagesToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/privateMemberWithUsagesToClass.kt"); } @TestMetadata("privateMemberWithUsagesToInterface.kt") public void testPrivateMemberWithUsagesToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/privateMemberWithUsagesToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/privateMemberWithUsagesToInterface.kt"); } @TestMetadata("propertyDependenceSatisfied.kt") public void testPropertyDependenceSatisfied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/propertyDependenceSatisfied.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/propertyDependenceSatisfied.kt"); } @TestMetadata("propertyDependenceUnsatisfied.kt") public void testPropertyDependenceUnsatisfied() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/propertyDependenceUnsatisfied.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/propertyDependenceUnsatisfied.kt"); } @TestMetadata("propertyWithoutLightMethod.kt") public void testPropertyWithoutLightMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/propertyWithoutLightMethod.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/propertyWithoutLightMethod.kt"); } @TestMetadata("publicToInterface.kt") public void testPublicToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/publicToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/publicToInterface.kt"); } @TestMetadata("reformatModifierList.kt") public void testReformatModifierList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/reformatModifierList.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/reformatModifierList.kt"); } @TestMetadata("removeVisibilityOnOverride.kt") public void testRemoveVisibilityOnOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/removeVisibilityOnOverride.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/removeVisibilityOnOverride.kt"); } @TestMetadata("skipFakeOverrides.kt") public void testSkipFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/skipFakeOverrides.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/skipFakeOverrides.kt"); } @TestMetadata("spaceAfterModifier.kt") public void testSpaceAfterModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/spaceAfterModifier.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/spaceAfterModifier.kt"); } @TestMetadata("superToThis.kt") public void testSuperToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/superToThis.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/superToThis.kt"); } @TestMetadata("toIndirectSuperClass.kt") public void testToIndirectSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/toIndirectSuperClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/toIndirectSuperClass.kt"); } @TestMetadata("usedPrivateToClass.kt") public void testUsedPrivateToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2k/usedPrivateToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2k/usedPrivateToClass.kt"); } } @@ -362,80 +311,72 @@ public class PullUpTestGenerated extends AbstractPullUpTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class K2J extends AbstractPullUpTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doKotlinTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInK2J() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/pullUp/k2j"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY); } @TestMetadata("constructorParameterToClass.kt") public void testConstructorParameterToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/constructorParameterToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/constructorParameterToClass.kt"); } @TestMetadata("defaultValuesInOverride.kt") public void testDefaultValuesInOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/defaultValuesInOverride.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/defaultValuesInOverride.kt"); } @TestMetadata("fromClassToClass.kt") public void testFromClassToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/fromClassToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/fromClassToClass.kt"); } @TestMetadata("fromClassToClassAndMakeAbstract.kt") public void testFromClassToClassAndMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/fromClassToClassAndMakeAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/fromClassToClassAndMakeAbstract.kt"); } @TestMetadata("fromClassToClassWithGenerics.kt") public void testFromClassToClassWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/fromClassToClassWithGenerics.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/fromClassToClassWithGenerics.kt"); } @TestMetadata("fromClassToInterface.kt") public void testFromClassToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/fromClassToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/fromClassToInterface.kt"); } @TestMetadata("fromClassToNestedClass.kt") public void testFromClassToNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/fromClassToNestedClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/fromClassToNestedClass.kt"); } @TestMetadata("moveSuperInterfacesToClass.kt") public void testMoveSuperInterfacesToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/moveSuperInterfacesToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/moveSuperInterfacesToClass.kt"); } @TestMetadata("moveSuperInterfacesToInterface.kt") public void testMoveSuperInterfacesToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/moveSuperInterfacesToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/moveSuperInterfacesToInterface.kt"); } @TestMetadata("moveSuperInterfacesWithGenerics.kt") public void testMoveSuperInterfacesWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/moveSuperInterfacesWithGenerics.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/moveSuperInterfacesWithGenerics.kt"); } @TestMetadata("publicToInterface.kt") public void testPublicToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/publicToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/publicToInterface.kt"); } @TestMetadata("usedPrivateToClass.kt") public void testUsedPrivateToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/k2j/usedPrivateToClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pullUp/k2j/usedPrivateToClass.kt"); } } @@ -443,62 +384,57 @@ public class PullUpTestGenerated extends AbstractPullUpTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class J2K extends AbstractPullUpTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJavaTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJ2K() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/pullUp/j2k"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY); } @TestMetadata("fromClassToClass.java") public void testFromClassToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/fromClassToClass.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/fromClassToClass.java"); } @TestMetadata("fromClassToClassAndMakeAbstract.java") public void testFromClassToClassAndMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/fromClassToClassAndMakeAbstract.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/fromClassToClassAndMakeAbstract.java"); } @TestMetadata("fromClassToClassWithGenerics.java") public void testFromClassToClassWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/fromClassToClassWithGenerics.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/fromClassToClassWithGenerics.java"); } @TestMetadata("fromClassToInterface.java") public void testFromClassToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/fromClassToInterface.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/fromClassToInterface.java"); } @TestMetadata("fromClassToInterfaceWithConflicts.java") public void testFromClassToInterfaceWithConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/fromClassToInterfaceWithConflicts.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/fromClassToInterfaceWithConflicts.java"); } @TestMetadata("fromClassToNestedClass.java") public void testFromClassToNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/fromClassToNestedClass.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/fromClassToNestedClass.java"); } @TestMetadata("moveSuperInterfacesToClass.java") public void testMoveSuperInterfacesToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/moveSuperInterfacesToClass.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/moveSuperInterfacesToClass.java"); } @TestMetadata("moveSuperInterfacesToInterface.java") public void testMoveSuperInterfacesToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/moveSuperInterfacesToInterface.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/moveSuperInterfacesToInterface.java"); } @TestMetadata("moveSuperInterfacesWithGenerics.java") public void testMoveSuperInterfacesWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pullUp/j2k/moveSuperInterfacesWithGenerics.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pullUp/j2k/moveSuperInterfacesWithGenerics.java"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/pushDown/PushDownTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/pushDown/PushDownTestGenerated.java index 602971e5762..a0c1bd16120 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/pushDown/PushDownTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/pushDown/PushDownTestGenerated.java @@ -23,10 +23,13 @@ public class PushDownTestGenerated extends AbstractPushDownTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class K2K extends AbstractPushDownTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doKotlinTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accidentalOverrides.kt") public void testAccidentalOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/accidentalOverrides.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/accidentalOverrides.kt"); } public void testAllFilesPresentInK2K() throws Exception { @@ -35,116 +38,97 @@ public class PushDownTestGenerated extends AbstractPushDownTest { @TestMetadata("clashingMembers.kt") public void testClashingMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/clashingMembers.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/clashingMembers.kt"); } @TestMetadata("classToInterface.kt") public void testClassToInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/classToInterface.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/classToInterface.kt"); } @TestMetadata("conflictingSuperCall.kt") public void testConflictingSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/conflictingSuperCall.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/conflictingSuperCall.kt"); } @TestMetadata("dropVisibilityOnGeneratedOverride.kt") public void testDropVisibilityOnGeneratedOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/dropVisibilityOnGeneratedOverride.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/dropVisibilityOnGeneratedOverride.kt"); } @TestMetadata("finalClass.kt") public void testFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/finalClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/finalClass.kt"); } @TestMetadata("implicitCompanionUsages.kt") public void testImplicitCompanionUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/implicitCompanionUsages.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/implicitCompanionUsages.kt"); } @TestMetadata("liftPrivate.kt") public void testLiftPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/liftPrivate.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/liftPrivate.kt"); } @TestMetadata("noCaret.kt") public void testNoCaret() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/noCaret.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/noCaret.kt"); } @TestMetadata("objectDeclaration.kt") public void testObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/objectDeclaration.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/objectDeclaration.kt"); } @TestMetadata("outsideOfClass.kt") public void testOutsideOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/outsideOfClass.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/outsideOfClass.kt"); } @TestMetadata("pushClassMembers.kt") public void testPushClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushClassMembers.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushClassMembers.kt"); } @TestMetadata("pushClassMembersAndMakeAbstract.kt") public void testPushClassMembersAndMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushClassMembersAndMakeAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushClassMembersAndMakeAbstract.kt"); } @TestMetadata("pushClassMembersWithGenerics.kt") public void testPushClassMembersWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushClassMembersWithGenerics.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushClassMembersWithGenerics.kt"); } @TestMetadata("pushInterfaceMembers.kt") public void testPushInterfaceMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushInterfaceMembers.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushInterfaceMembers.kt"); } @TestMetadata("pushInterfaceMembersAndMakeAbstract.kt") public void testPushInterfaceMembersAndMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushInterfaceMembersAndMakeAbstract.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushInterfaceMembersAndMakeAbstract.kt"); } @TestMetadata("pushMembersUsingPrivates.kt") public void testPushMembersUsingPrivates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushMembersUsingPrivates.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushMembersUsingPrivates.kt"); } @TestMetadata("pushMembersWithExternalUsages.kt") public void testPushMembersWithExternalUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushMembersWithExternalUsages.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushMembersWithExternalUsages.kt"); } @TestMetadata("pushSuperInterfaces.kt") public void testPushSuperInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushSuperInterfaces.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushSuperInterfaces.kt"); } @TestMetadata("pushSuperInterfacesWithGenerics.kt") public void testPushSuperInterfacesWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2k/pushSuperInterfacesWithGenerics.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2k/pushSuperInterfacesWithGenerics.kt"); } } @@ -152,14 +136,17 @@ public class PushDownTestGenerated extends AbstractPushDownTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class K2J extends AbstractPushDownTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doKotlinTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInK2J() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/pushDown/k2j"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY); } @TestMetadata("kotlinToJava.kt") public void testKotlinToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/k2j/kotlinToJava.kt"); - doKotlinTest(fileName); + runTest("idea/testData/refactoring/pushDown/k2j/kotlinToJava.kt"); } } @@ -167,32 +154,32 @@ public class PushDownTestGenerated extends AbstractPushDownTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class J2K extends AbstractPushDownTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJavaTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJ2K() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/pushDown/j2k"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY); } @TestMetadata("fromClass.java") public void testFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/j2k/fromClass.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pushDown/j2k/fromClass.java"); } @TestMetadata("fromClassAndMakeAbstract.java") public void testFromClassAndMakeAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/j2k/fromClassAndMakeAbstract.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pushDown/j2k/fromClassAndMakeAbstract.java"); } @TestMetadata("fromClassUsageConflicts.java") public void testFromClassUsageConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/j2k/fromClassUsageConflicts.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pushDown/j2k/fromClassUsageConflicts.java"); } @TestMetadata("fromInterface.java") public void testFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/pushDown/j2k/fromInterface.java"); - doJavaTest(fileName); + runTest("idea/testData/refactoring/pushDown/j2k/fromInterface.java"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/MultiModuleRenameTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/MultiModuleRenameTestGenerated.java index e6f081b03d3..ac21287603f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/MultiModuleRenameTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/MultiModuleRenameTestGenerated.java @@ -21,151 +21,131 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiModuleRenameTestGenerated extends AbstractMultiModuleRenameTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenameMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/renameMultiModule"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("fileNotUnderSourceRootWithNamesakeUnderSourceRoot/fileNotUnderSourceRootWithNamesakeUnderSourceRoot.test") public void testFileNotUnderSourceRootWithNamesakeUnderSourceRoot_FileNotUnderSourceRootWithNamesakeUnderSourceRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/fileNotUnderSourceRootWithNamesakeUnderSourceRoot/fileNotUnderSourceRootWithNamesakeUnderSourceRoot.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/fileNotUnderSourceRootWithNamesakeUnderSourceRoot/fileNotUnderSourceRootWithNamesakeUnderSourceRoot.test"); } @TestMetadata("headerAndImplClassByImplTypeAlias/headerAndImplClassByImplTypeAlias.test") public void testHeaderAndImplClassByImplTypeAlias_HeaderAndImplClassByImplTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headerAndImplClassByImplTypeAlias/headerAndImplClassByImplTypeAlias.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headerAndImplClassByImplTypeAlias/headerAndImplClassByImplTypeAlias.test"); } @TestMetadata("headerAndImplTypeAliasByImplClass/headerAndImplTypeAliasByImplClass.test") public void testHeaderAndImplTypeAliasByImplClass_HeaderAndImplTypeAliasByImplClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headerAndImplTypeAliasByImplClass/headerAndImplTypeAliasByImplClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headerAndImplTypeAliasByImplClass/headerAndImplTypeAliasByImplClass.test"); } @TestMetadata("headersAndImplsByHeaderClass/headersAndImplsByHeaderClass.test") public void testHeadersAndImplsByHeaderClass_HeadersAndImplsByHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClass/headersAndImplsByHeaderClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClass/headersAndImplsByHeaderClass.test"); } @TestMetadata("headersAndImplsByHeaderClassMemberFun/headersAndImplsByHeaderClassMemberFun.test") public void testHeadersAndImplsByHeaderClassMemberFun_HeadersAndImplsByHeaderClassMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassMemberFun/headersAndImplsByHeaderClassMemberFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassMemberFun/headersAndImplsByHeaderClassMemberFun.test"); } @TestMetadata("headersAndImplsByHeaderClassMemberFunParameter/headersAndImplsByHeaderClassMemberFunParameter.test") public void testHeadersAndImplsByHeaderClassMemberFunParameter_HeadersAndImplsByHeaderClassMemberFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassMemberFunParameter/headersAndImplsByHeaderClassMemberFunParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassMemberFunParameter/headersAndImplsByHeaderClassMemberFunParameter.test"); } @TestMetadata("headersAndImplsByHeaderClassMemberVal/headersAndImplsByHeaderClassMemberVal.test") public void testHeadersAndImplsByHeaderClassMemberVal_HeadersAndImplsByHeaderClassMemberVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassMemberVal/headersAndImplsByHeaderClassMemberVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassMemberVal/headersAndImplsByHeaderClassMemberVal.test"); } @TestMetadata("headersAndImplsByHeaderClassPrimaryConstructorParameter/headersAndImplsByHeaderClassPrimaryConstructorParameter.test") public void testHeadersAndImplsByHeaderClassPrimaryConstructorParameter_HeadersAndImplsByHeaderClassPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassPrimaryConstructorParameter/headersAndImplsByHeaderClassPrimaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassPrimaryConstructorParameter/headersAndImplsByHeaderClassPrimaryConstructorParameter.test"); } @TestMetadata("headersAndImplsByHeaderClassSecondaryConstructorParameter/headersAndImplsByHeaderClassSecondaryConstructorParameter.test") public void testHeadersAndImplsByHeaderClassSecondaryConstructorParameter_HeadersAndImplsByHeaderClassSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassSecondaryConstructorParameter/headersAndImplsByHeaderClassSecondaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderClassSecondaryConstructorParameter/headersAndImplsByHeaderClassSecondaryConstructorParameter.test"); } @TestMetadata("headersAndImplsByHeaderFun/headersAndImplsByHeaderFun.test") public void testHeadersAndImplsByHeaderFun_HeadersAndImplsByHeaderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderFun/headersAndImplsByHeaderFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderFun/headersAndImplsByHeaderFun.test"); } @TestMetadata("headersAndImplsByHeaderFunParameter/headersAndImplsByHeaderFunParameter.test") public void testHeadersAndImplsByHeaderFunParameter_HeadersAndImplsByHeaderFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderFunParameter/headersAndImplsByHeaderFunParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderFunParameter/headersAndImplsByHeaderFunParameter.test"); } @TestMetadata("headersAndImplsByHeaderVal/headersAndImplsByHeaderVal.test") public void testHeadersAndImplsByHeaderVal_HeadersAndImplsByHeaderVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderVal/headersAndImplsByHeaderVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByHeaderVal/headersAndImplsByHeaderVal.test"); } @TestMetadata("headersAndImplsByImplClass/headersAndImplsByImplClass.test") public void testHeadersAndImplsByImplClass_HeadersAndImplsByImplClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClass/headersAndImplsByImplClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClass/headersAndImplsByImplClass.test"); } @TestMetadata("headersAndImplsByImplClassMemberFun/headersAndImplsByImplClassMemberFun.test") public void testHeadersAndImplsByImplClassMemberFun_HeadersAndImplsByImplClassMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassMemberFun/headersAndImplsByImplClassMemberFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassMemberFun/headersAndImplsByImplClassMemberFun.test"); } @TestMetadata("headersAndImplsByImplClassMemberFunParameter/headersAndImplsByImplClassMemberFunParameter.test") public void testHeadersAndImplsByImplClassMemberFunParameter_HeadersAndImplsByImplClassMemberFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassMemberFunParameter/headersAndImplsByImplClassMemberFunParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassMemberFunParameter/headersAndImplsByImplClassMemberFunParameter.test"); } @TestMetadata("headersAndImplsByImplClassMemberVal/headersAndImplsByImplClassMemberVal.test") public void testHeadersAndImplsByImplClassMemberVal_HeadersAndImplsByImplClassMemberVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassMemberVal/headersAndImplsByImplClassMemberVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassMemberVal/headersAndImplsByImplClassMemberVal.test"); } @TestMetadata("headersAndImplsByImplClassPrimaryConstructorParameter/headersAndImplsByImplClassPrimaryConstructorParameter.test") public void testHeadersAndImplsByImplClassPrimaryConstructorParameter_HeadersAndImplsByImplClassPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassPrimaryConstructorParameter/headersAndImplsByImplClassPrimaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassPrimaryConstructorParameter/headersAndImplsByImplClassPrimaryConstructorParameter.test"); } @TestMetadata("headersAndImplsByImplClassSecondaryConstructorParameter/headersAndImplsByImplClassSecondaryConstructorParameter.test") public void testHeadersAndImplsByImplClassSecondaryConstructorParameter_HeadersAndImplsByImplClassSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassSecondaryConstructorParameter/headersAndImplsByImplClassSecondaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplClassSecondaryConstructorParameter/headersAndImplsByImplClassSecondaryConstructorParameter.test"); } @TestMetadata("headersAndImplsByImplFun/headersAndImplsByImplFun.test") public void testHeadersAndImplsByImplFun_HeadersAndImplsByImplFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplFun/headersAndImplsByImplFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplFun/headersAndImplsByImplFun.test"); } @TestMetadata("headersAndImplsByImplFunParameter/headersAndImplsByImplFunParameter.test") public void testHeadersAndImplsByImplFunParameter_HeadersAndImplsByImplFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplFunParameter/headersAndImplsByImplFunParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplFunParameter/headersAndImplsByImplFunParameter.test"); } @TestMetadata("headersAndImplsByImplVal/headersAndImplsByImplVal.test") public void testHeadersAndImplsByImplVal_HeadersAndImplsByImplVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplVal/headersAndImplsByImplVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/headersAndImplsByImplVal/headersAndImplsByImplVal.test"); } @TestMetadata("implClassAndTypeAliasByHeaderClass/implClassAndTypeAliasByHeaderClass.test") public void testImplClassAndTypeAliasByHeaderClass_ImplClassAndTypeAliasByHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/implClassAndTypeAliasByHeaderClass/implClassAndTypeAliasByHeaderClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/implClassAndTypeAliasByHeaderClass/implClassAndTypeAliasByHeaderClass.test"); } @TestMetadata("suspendFunImplInImplModule/suspendFunImplInImplModule.test") public void testSuspendFunImplInImplModule_SuspendFunImplInImplModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/suspendFunImplInImplModule/suspendFunImplInImplModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/suspendFunImplInImplModule/suspendFunImplInImplModule.test"); } @TestMetadata("suspendFunInCommonModule/suspendFunInCommonModule.test") public void testSuspendFunInCommonModule_SuspendFunInCommonModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/renameMultiModule/suspendFunInCommonModule/suspendFunInCommonModule.test"); - doTest(fileName); + runTest("idea/testData/refactoring/renameMultiModule/suspendFunInCommonModule/suspendFunInCommonModule.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/RenameTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/RenameTestGenerated.java index 19b0766de66..d579d4aee4e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/RenameTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/rename/RenameTestGenerated.java @@ -21,1363 +21,1141 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class RenameTestGenerated extends AbstractRenameTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRename() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/rename"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("ambiguousClassFunImportRenameClass/ambiguousClassFunImportRenameClass.test") public void testAmbiguousClassFunImportRenameClass_AmbiguousClassFunImportRenameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/ambiguousClassFunImportRenameClass/ambiguousClassFunImportRenameClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/ambiguousClassFunImportRenameClass/ambiguousClassFunImportRenameClass.test"); } @TestMetadata("ambiguousClassFunImportRenameFun/ambiguousClassFunImportRenameFun.test") public void testAmbiguousClassFunImportRenameFun_AmbiguousClassFunImportRenameFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/ambiguousClassFunImportRenameFun/ambiguousClassFunImportRenameFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/ambiguousClassFunImportRenameFun/ambiguousClassFunImportRenameFun.test"); } @TestMetadata("automaticRenamer/simple.test") public void testAutomaticRenamer_Simple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamer/simple.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamer/simple.test"); } @TestMetadata("automaticRenamerForJavaClass/javaClass.test") public void testAutomaticRenamerForJavaClass_JavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerForJavaClass/javaClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerForJavaClass/javaClass.test"); } @TestMetadata("automaticRenamerJavaParameter/parameter.test") public void testAutomaticRenamerJavaParameter_Parameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerJavaParameter/parameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerJavaParameter/parameter.test"); } @TestMetadata("automaticRenamerKotlinTestClass/automaticRenamerKotlinTestClass.test") public void testAutomaticRenamerKotlinTestClass_AutomaticRenamerKotlinTestClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerKotlinTestClass/automaticRenamerKotlinTestClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerKotlinTestClass/automaticRenamerKotlinTestClass.test"); } @TestMetadata("automaticRenamerKotlinTestClassForFacade/automaticRenamerKotlinTestClassForFacade.test") public void testAutomaticRenamerKotlinTestClassForFacade_AutomaticRenamerKotlinTestClassForFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerKotlinTestClassForFacade/automaticRenamerKotlinTestClassForFacade.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerKotlinTestClassForFacade/automaticRenamerKotlinTestClassForFacade.test"); } @TestMetadata("automaticRenamerOverloads/package.test") public void testAutomaticRenamerOverloads_Package() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloads/package.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloads/package.test"); } @TestMetadata("automaticRenamerOverloadsAmbiguousImport/automaticRenamerOverloadsAmbiguousImport.test") public void testAutomaticRenamerOverloadsAmbiguousImport_AutomaticRenamerOverloadsAmbiguousImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloadsAmbiguousImport/automaticRenamerOverloadsAmbiguousImport.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloadsAmbiguousImport/automaticRenamerOverloadsAmbiguousImport.test"); } @TestMetadata("automaticRenamerOverloadsClass/class.test") public void testAutomaticRenamerOverloadsClass_Class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloadsClass/class.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloadsClass/class.test"); } @TestMetadata("automaticRenamerOverloadsExtensionAndMember/automaticRenamerOverloadsExtensionAndMember.test") public void testAutomaticRenamerOverloadsExtensionAndMember_AutomaticRenamerOverloadsExtensionAndMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloadsExtensionAndMember/automaticRenamerOverloadsExtensionAndMember.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloadsExtensionAndMember/automaticRenamerOverloadsExtensionAndMember.test"); } @TestMetadata("automaticRenamerOverloadsJavaClass/overloads.test") public void testAutomaticRenamerOverloadsJavaClass_Overloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloadsJavaClass/overloads.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloadsJavaClass/overloads.test"); } @TestMetadata("automaticRenamerOverloadsMemberAndExtension/automaticRenamerOverloadsMemberAndExtension.test") public void testAutomaticRenamerOverloadsMemberAndExtension_AutomaticRenamerOverloadsMemberAndExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloadsMemberAndExtension/automaticRenamerOverloadsMemberAndExtension.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloadsMemberAndExtension/automaticRenamerOverloadsMemberAndExtension.test"); } @TestMetadata("automaticRenamerOverloadsObject/object.test") public void testAutomaticRenamerOverloadsObject_Object() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerOverloadsObject/object.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerOverloadsObject/object.test"); } @TestMetadata("automaticRenamerParameter/parameter.test") public void testAutomaticRenamerParameter_Parameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerParameter/parameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerParameter/parameter.test"); } @TestMetadata("automaticRenamerParameterInExtension/parameter.test") public void testAutomaticRenamerParameterInExtension_Parameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticRenamerParameterInExtension/parameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticRenamerParameterInExtension/parameter.test"); } @TestMetadata("automaticVariableRenamerWithQuotation/automaticVariableRenamerWithQuotation.test") public void testAutomaticVariableRenamerWithQuotation_AutomaticVariableRenamerWithQuotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/automaticVariableRenamerWithQuotation/automaticVariableRenamerWithQuotation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/automaticVariableRenamerWithQuotation/automaticVariableRenamerWithQuotation.test"); } @TestMetadata("clashOfNestedWithOuterClass/clashOfNestedWithOuterClass.test") public void testClashOfNestedWithOuterClass_ClashOfNestedWithOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/clashOfNestedWithOuterClass/clashOfNestedWithOuterClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/clashOfNestedWithOuterClass/clashOfNestedWithOuterClass.test"); } @TestMetadata("clashParameterWithProperty/clashParameterWithProperty.test") public void testClashParameterWithProperty_ClashParameterWithProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/clashParameterWithProperty/clashParameterWithProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/clashParameterWithProperty/clashParameterWithProperty.test"); } @TestMetadata("clashWithInnerClass/clashWithInnerClass.test") public void testClashWithInnerClass_ClashWithInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/clashWithInnerClass/clashWithInnerClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/clashWithInnerClass/clashWithInnerClass.test"); } @TestMetadata("clashWithNestedClass/clashWithNestedClass.test") public void testClashWithNestedClass_ClashWithNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/clashWithNestedClass/clashWithNestedClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/clashWithNestedClass/clashWithNestedClass.test"); } @TestMetadata("clashWithOuterClass/clashWithOuterClass.test") public void testClashWithOuterClass_ClashWithOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/clashWithOuterClass/clashWithOuterClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/clashWithOuterClass/clashWithOuterClass.test"); } @TestMetadata("classAndTypeAliasRedeclaration/classAndTypeAliasRedeclaration.test") public void testClassAndTypeAliasRedeclaration_ClassAndTypeAliasRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/classAndTypeAliasRedeclaration/classAndTypeAliasRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/classAndTypeAliasRedeclaration/classAndTypeAliasRedeclaration.test"); } @TestMetadata("classByPrimaryConstructor/classByPrimaryConstructor.test") public void testClassByPrimaryConstructor_ClassByPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/classByPrimaryConstructor/classByPrimaryConstructor.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/classByPrimaryConstructor/classByPrimaryConstructor.test"); } @TestMetadata("classByPrimaryConstructorWithSpace/classByPrimaryConstructorWithSpace.test") public void testClassByPrimaryConstructorWithSpace_ClassByPrimaryConstructorWithSpace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/classByPrimaryConstructorWithSpace/classByPrimaryConstructorWithSpace.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/classByPrimaryConstructorWithSpace/classByPrimaryConstructorWithSpace.test"); } @TestMetadata("classUsagesInTextFiles/classUsagesInTextFiles.test") public void testClassUsagesInTextFiles_ClassUsagesInTextFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/classUsagesInTextFiles/classUsagesInTextFiles.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/classUsagesInTextFiles/classUsagesInTextFiles.test"); } @TestMetadata("companionObject/companionObject.test") public void testCompanionObject_CompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/companionObject/companionObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/companionObject/companionObject.test"); } @TestMetadata("companionObjectWithDefaultName/companionObject.test") public void testCompanionObjectWithDefaultName_CompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/companionObjectWithDefaultName/companionObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/companionObjectWithDefaultName/companionObject.test"); } @TestMetadata("companionObjectWithNameMatchingClass/companionObject.test") public void testCompanionObjectWithNameMatchingClass_CompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/companionObjectWithNameMatchingClass/companionObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/companionObjectWithNameMatchingClass/companionObject.test"); } @TestMetadata("companionShortRef/companionShortRef.test") public void testCompanionShortRef_CompanionShortRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/companionShortRef/companionShortRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/companionShortRef/companionShortRef.test"); } @TestMetadata("dataClassComponentN/dataClassComponentN.test") public void testDataClassComponentN_DataClassComponentN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/dataClassComponentN/dataClassComponentN.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/dataClassComponentN/dataClassComponentN.test"); } @TestMetadata("dataClassCopy/dataClassCopy.test") public void testDataClassCopy_DataClassCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/dataClassCopy/dataClassCopy.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/dataClassCopy/dataClassCopy.test"); } @TestMetadata("enumValueOf/enumValueOf.test") public void testEnumValueOf_EnumValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/enumValueOf/enumValueOf.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/enumValueOf/enumValueOf.test"); } @TestMetadata("funTextOccurrences/funTextOccurrences.test") public void testFunTextOccurrences_FunTextOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/funTextOccurrences/funTextOccurrences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/funTextOccurrences/funTextOccurrences.test"); } @TestMetadata("funWithLabeledReturns/funWithLabeledReturns.test") public void testFunWithLabeledReturns_FunWithLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/funWithLabeledReturns/funWithLabeledReturns.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/funWithLabeledReturns/funWithLabeledReturns.test"); } @TestMetadata("importAlias/importAlias.test") public void testImportAlias_ImportAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/importAlias/importAlias.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/importAlias/importAlias.test"); } @TestMetadata("importAliasByRef/importAliasByRef.test") public void testImportAliasByRef_ImportAliasByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/importAliasByRef/importAliasByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/importAliasByRef/importAliasByRef.test"); } @TestMetadata("javaClassImportAliasByRef/javaClassImportAliasByRef.test") public void testJavaClassImportAliasByRef_JavaClassImportAliasByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/javaClassImportAliasByRef/javaClassImportAliasByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/javaClassImportAliasByRef/javaClassImportAliasByRef.test"); } @TestMetadata("javaEnumValueOf/javaEnumValueOf.test") public void testJavaEnumValueOf_JavaEnumValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/javaEnumValueOf/javaEnumValueOf.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/javaEnumValueOf/javaEnumValueOf.test"); } @TestMetadata("labeledAnonymousFunByLabel/labeledLambdaByLabel.test") public void testLabeledAnonymousFunByLabel_LabeledLambdaByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledAnonymousFunByLabel/labeledLambdaByLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledAnonymousFunByLabel/labeledLambdaByLabel.test"); } @TestMetadata("labeledLambdaByLabel/labeledLambdaByLabel.test") public void testLabeledLambdaByLabel_LabeledLambdaByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaByLabel/labeledLambdaByLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaByLabel/labeledLambdaByLabel.test"); } @TestMetadata("labeledLambdaByLabelRef/labeledLambdaByLabelRef.test") public void testLabeledLambdaByLabelRef_LabeledLambdaByLabelRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaByLabelRef/labeledLambdaByLabelRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaByLabelRef/labeledLambdaByLabelRef.test"); } @TestMetadata("labeledLambdaByLabelRefAfterLabel/labeledLambdaByLabelRefAfterLabel.test") public void testLabeledLambdaByLabelRefAfterLabel_LabeledLambdaByLabelRefAfterLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaByLabelRefAfterLabel/labeledLambdaByLabelRefAfterLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaByLabelRefAfterLabel/labeledLambdaByLabelRefAfterLabel.test"); } @TestMetadata("labeledLambdaByLabelRefBeforeLabel/labeledLambdaByLabelRefBeforeLabel.test") public void testLabeledLambdaByLabelRefBeforeLabel_LabeledLambdaByLabelRefBeforeLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaByLabelRefBeforeLabel/labeledLambdaByLabelRefBeforeLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaByLabelRefBeforeLabel/labeledLambdaByLabelRefBeforeLabel.test"); } @TestMetadata("labeledLambdaByLabelWithParens/labeledLambdaByLabelWithParens.test") public void testLabeledLambdaByLabelWithParens_LabeledLambdaByLabelWithParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaByLabelWithParens/labeledLambdaByLabelWithParens.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaByLabelWithParens/labeledLambdaByLabelWithParens.test"); } @TestMetadata("labeledLambdaByLabelWithSameName/labeledLambdaByLabelWithSameName.test") public void testLabeledLambdaByLabelWithSameName_LabeledLambdaByLabelWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaByLabelWithSameName/labeledLambdaByLabelWithSameName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaByLabelWithSameName/labeledLambdaByLabelWithSameName.test"); } @TestMetadata("labeledLambdaWithMultipleLabels/labeledLambdaWithMultipleLabels.test") public void testLabeledLambdaWithMultipleLabels_LabeledLambdaWithMultipleLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLambdaWithMultipleLabels/labeledLambdaWithMultipleLabels.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLambdaWithMultipleLabels/labeledLambdaWithMultipleLabels.test"); } @TestMetadata("labeledLoopByLabel/labeledLoopByLabel.test") public void testLabeledLoopByLabel_LabeledLoopByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLoopByLabel/labeledLoopByLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLoopByLabel/labeledLoopByLabel.test"); } @TestMetadata("labeledLoopByLabelRefInBreak/labeledLoopByLabelRefInBreak.test") public void testLabeledLoopByLabelRefInBreak_LabeledLoopByLabelRefInBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLoopByLabelRefInBreak/labeledLoopByLabelRefInBreak.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLoopByLabelRefInBreak/labeledLoopByLabelRefInBreak.test"); } @TestMetadata("labeledLoopByLabelRefInContinue/labeledLoopByLabelRefInContinue.test") public void testLabeledLoopByLabelRefInContinue_LabeledLoopByLabelRefInContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledLoopByLabelRefInContinue/labeledLoopByLabelRefInContinue.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledLoopByLabelRefInContinue/labeledLoopByLabelRefInContinue.test"); } @TestMetadata("labeledReturnInAnonymousFun/labeledReturnInAnonymousFun.test") public void testLabeledReturnInAnonymousFun_LabeledReturnInAnonymousFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledReturnInAnonymousFun/labeledReturnInAnonymousFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledReturnInAnonymousFun/labeledReturnInAnonymousFun.test"); } @TestMetadata("labeledReturnInAnonymousFunBeforeWhitespace/labeledReturnInAnonymousFunBeforeWhitespace.test") public void testLabeledReturnInAnonymousFunBeforeWhitespace_LabeledReturnInAnonymousFunBeforeWhitespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledReturnInAnonymousFunBeforeWhitespace/labeledReturnInAnonymousFunBeforeWhitespace.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledReturnInAnonymousFunBeforeWhitespace/labeledReturnInAnonymousFunBeforeWhitespace.test"); } @TestMetadata("labeledReturnInLambda/labeledReturnInLambda.test") public void testLabeledReturnInLambda_LabeledReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledReturnInLambda/labeledReturnInLambda.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledReturnInLambda/labeledReturnInLambda.test"); } @TestMetadata("labeledReturnInLambdaAfterLabel/labeledReturnInLambdaAfterLabel.test") public void testLabeledReturnInLambdaAfterLabel_LabeledReturnInLambdaAfterLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledReturnInLambdaAfterLabel/labeledReturnInLambdaAfterLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledReturnInLambdaAfterLabel/labeledReturnInLambdaAfterLabel.test"); } @TestMetadata("labeledReturnInLambdaBeforeLabel/labeledReturnInLambdaBeforeLabel.test") public void testLabeledReturnInLambdaBeforeLabel_LabeledReturnInLambdaBeforeLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/labeledReturnInLambdaBeforeLabel/labeledReturnInLambdaBeforeLabel.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/labeledReturnInLambdaBeforeLabel/labeledReturnInLambdaBeforeLabel.test"); } @TestMetadata("lambdaParameterRedeclaration/lambdaParameterRedeclaration.test") public void testLambdaParameterRedeclaration_LambdaParameterRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/lambdaParameterRedeclaration/lambdaParameterRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/lambdaParameterRedeclaration/lambdaParameterRedeclaration.test"); } @TestMetadata("memberFunctionRedeclaration/memberFunctionRedeclaration.test") public void testMemberFunctionRedeclaration_MemberFunctionRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/memberFunctionRedeclaration/memberFunctionRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/memberFunctionRedeclaration/memberFunctionRedeclaration.test"); } @TestMetadata("memberPropertyRedeclaration/memberPropertyRedeclaration.test") public void testMemberPropertyRedeclaration_MemberPropertyRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/memberPropertyRedeclaration/memberPropertyRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/memberPropertyRedeclaration/memberPropertyRedeclaration.test"); } @TestMetadata("memberPropertyShadowedByLocalVar/memberPropertyShadowedByLocalVar.test") public void testMemberPropertyShadowedByLocalVar_MemberPropertyShadowedByLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/memberPropertyShadowedByLocalVar/memberPropertyShadowedByLocalVar.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/memberPropertyShadowedByLocalVar/memberPropertyShadowedByLocalVar.test"); } @TestMetadata("memberPropertyWithInnerInstanceProperty/memberPropertyWithInnerInstanceProperty.test") public void testMemberPropertyWithInnerInstanceProperty_MemberPropertyWithInnerInstanceProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/memberPropertyWithInnerInstanceProperty/memberPropertyWithInnerInstanceProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/memberPropertyWithInnerInstanceProperty/memberPropertyWithInnerInstanceProperty.test"); } @TestMetadata("memberPropertyWithOuterInstanceProperty/memberPropertyWithOuterInstanceProperty.test") public void testMemberPropertyWithOuterInstanceProperty_MemberPropertyWithOuterInstanceProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/memberPropertyWithOuterInstanceProperty/memberPropertyWithOuterInstanceProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/memberPropertyWithOuterInstanceProperty/memberPropertyWithOuterInstanceProperty.test"); } @TestMetadata("nestedClassRedeclaration/nestedClassRedeclaration.test") public void testNestedClassRedeclaration_NestedClassRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/nestedClassRedeclaration/nestedClassRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/nestedClassRedeclaration/nestedClassRedeclaration.test"); } @TestMetadata("nonCodePropertyAccessorUsages/nonCodePropertyAccessorUsages.test") public void testNonCodePropertyAccessorUsages_NonCodePropertyAccessorUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/nonCodePropertyAccessorUsages/nonCodePropertyAccessorUsages.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/nonCodePropertyAccessorUsages/nonCodePropertyAccessorUsages.test"); } @TestMetadata("nonPrivateTopLevelDeclarationsConflict/nonPrivateTopLevelDeclarationsNoConflict.test") public void testNonPrivateTopLevelDeclarationsConflict_NonPrivateTopLevelDeclarationsNoConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/nonPrivateTopLevelDeclarationsConflict/nonPrivateTopLevelDeclarationsNoConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/nonPrivateTopLevelDeclarationsConflict/nonPrivateTopLevelDeclarationsNoConflict.test"); } @TestMetadata("nonQuotedToQuoted/nonQuotedToQuoted.test") public void testNonQuotedToQuoted_NonQuotedToQuoted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/nonQuotedToQuoted/nonQuotedToQuoted.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/nonQuotedToQuoted/nonQuotedToQuoted.test"); } @TestMetadata("noShadowingConflictForSiblingDeclarations/noShadowingConflictForSiblingDeclarations.test") public void testNoShadowingConflictForSiblingDeclarations_NoShadowingConflictForSiblingDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/noShadowingConflictForSiblingDeclarations/noShadowingConflictForSiblingDeclarations.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/noShadowingConflictForSiblingDeclarations/noShadowingConflictForSiblingDeclarations.test"); } @TestMetadata("objectAlias/objectAlias.test") public void testObjectAlias_ObjectAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/objectAlias/objectAlias.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/objectAlias/objectAlias.test"); } @TestMetadata("objectAliasByRef/objectAliasByRef.test") public void testObjectAliasByRef_ObjectAliasByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/objectAliasByRef/objectAliasByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/objectAliasByRef/objectAliasByRef.test"); } @TestMetadata("objectFunctionImportAliasByRef/objectFunctionImportAliasByRef.test") public void testObjectFunctionImportAliasByRef_ObjectFunctionImportAliasByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/objectFunctionImportAliasByRef/objectFunctionImportAliasByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/objectFunctionImportAliasByRef/objectFunctionImportAliasByRef.test"); } @TestMetadata("objectPropertyImportAliasByRef/objectPropertyImportAliasByRef.test") public void testObjectPropertyImportAliasByRef_ObjectPropertyImportAliasByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/objectPropertyImportAliasByRef/objectPropertyImportAliasByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/objectPropertyImportAliasByRef/objectPropertyImportAliasByRef.test"); } @TestMetadata("overloadsWithDifferentOrigins/overloadsWithDifferentOrigins.test") public void testOverloadsWithDifferentOrigins_OverloadsWithDifferentOrigins() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/overloadsWithDifferentOrigins/overloadsWithDifferentOrigins.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/overloadsWithDifferentOrigins/overloadsWithDifferentOrigins.test"); } @TestMetadata("overloadsWithSameOrigin/overloadsWithSameOrigin.test") public void testOverloadsWithSameOrigin_OverloadsWithSameOrigin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/overloadsWithSameOrigin/overloadsWithSameOrigin.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/overloadsWithSameOrigin/overloadsWithSameOrigin.test"); } @TestMetadata("paramererAsReceiverWithNewNameAsSelector/parameterAsReceiverWithNewNameAsSelector.test") public void testParamererAsReceiverWithNewNameAsSelector_ParameterAsReceiverWithNewNameAsSelector() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/paramererAsReceiverWithNewNameAsSelector/parameterAsReceiverWithNewNameAsSelector.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/paramererAsReceiverWithNewNameAsSelector/parameterAsReceiverWithNewNameAsSelector.test"); } @TestMetadata("parameterHierarchyLeaf/parameterHierarchyLeaf.test") public void testParameterHierarchyLeaf_ParameterHierarchyLeaf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/parameterHierarchyLeaf/parameterHierarchyLeaf.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/parameterHierarchyLeaf/parameterHierarchyLeaf.test"); } @TestMetadata("parameterHierarchyMiddle/parameterHierarchyMiddle.test") public void testParameterHierarchyMiddle_ParameterHierarchyMiddle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/parameterHierarchyMiddle/parameterHierarchyMiddle.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/parameterHierarchyMiddle/parameterHierarchyMiddle.test"); } @TestMetadata("parameterHierarchyRoot/parameterHierarchyRoot.test") public void testParameterHierarchyRoot_ParameterHierarchyRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/parameterHierarchyRoot/parameterHierarchyRoot.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/parameterHierarchyRoot/parameterHierarchyRoot.test"); } @TestMetadata("parameterRedeclaration/parameterRedeclaration.test") public void testParameterRedeclaration_ParameterRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/parameterRedeclaration/parameterRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/parameterRedeclaration/parameterRedeclaration.test"); } @TestMetadata("parameterTextOccurrences/parameterTextOccurrences.test") public void testParameterTextOccurrences_ParameterTextOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/parameterTextOccurrences/parameterTextOccurrences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/parameterTextOccurrences/parameterTextOccurrences.test"); } @TestMetadata("parameterWithQuotation/parameterWithQuotation.test") public void testParameterWithQuotation_ParameterWithQuotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/parameterWithQuotation/parameterWithQuotation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/parameterWithQuotation/parameterWithQuotation.test"); } @TestMetadata("primaryConstructorParameterRedeclaration/primaryConstructorParameterRedeclaration.test") public void testPrimaryConstructorParameterRedeclaration_PrimaryConstructorParameterRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/primaryConstructorParameterRedeclaration/primaryConstructorParameterRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/primaryConstructorParameterRedeclaration/primaryConstructorParameterRedeclaration.test"); } @TestMetadata("privateAndNonPrivateTopLevelDeclarationsNoConflict/privateAndNonPrivateTopLevelDeclarationsNoConflict.test") public void testPrivateAndNonPrivateTopLevelDeclarationsNoConflict_PrivateAndNonPrivateTopLevelDeclarationsNoConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/privateAndNonPrivateTopLevelDeclarationsNoConflict/privateAndNonPrivateTopLevelDeclarationsNoConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/privateAndNonPrivateTopLevelDeclarationsNoConflict/privateAndNonPrivateTopLevelDeclarationsNoConflict.test"); } @TestMetadata("privateFunInMultifileFacade/privateFunInMultifileFacade.test") public void testPrivateFunInMultifileFacade_PrivateFunInMultifileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/privateFunInMultifileFacade/privateFunInMultifileFacade.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/privateFunInMultifileFacade/privateFunInMultifileFacade.test"); } @TestMetadata("privateTopLevelDeclarationsNoConflict/privateTopLevelDeclarationsNoConflict.test") public void testPrivateTopLevelDeclarationsNoConflict_PrivateTopLevelDeclarationsNoConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/privateTopLevelDeclarationsNoConflict/privateTopLevelDeclarationsNoConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/privateTopLevelDeclarationsNoConflict/privateTopLevelDeclarationsNoConflict.test"); } @TestMetadata("propertyAccidentalOverrideSubclass/propertyAccidentalOverrideSubclass.test") public void testPropertyAccidentalOverrideSubclass_PropertyAccidentalOverrideSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/propertyAccidentalOverrideSubclass/propertyAccidentalOverrideSubclass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/propertyAccidentalOverrideSubclass/propertyAccidentalOverrideSubclass.test"); } @TestMetadata("propertyAccidentalOverrideSuperclass/propertyAccidentalOverrideSuperclass.test") public void testPropertyAccidentalOverrideSuperclass_PropertyAccidentalOverrideSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/propertyAccidentalOverrideSuperclass/propertyAccidentalOverrideSuperclass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/propertyAccidentalOverrideSuperclass/propertyAccidentalOverrideSuperclass.test"); } @TestMetadata("propertyParameterAccidentalOverrideSubclass/propertyParameterAccidentalOverrideSubclass.test") public void testPropertyParameterAccidentalOverrideSubclass_PropertyParameterAccidentalOverrideSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/propertyParameterAccidentalOverrideSubclass/propertyParameterAccidentalOverrideSubclass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/propertyParameterAccidentalOverrideSubclass/propertyParameterAccidentalOverrideSubclass.test"); } @TestMetadata("propertyParameterAccidentalOverrideSuperclass/propertyParameterAccidentalOverrideSuperclass.test") public void testPropertyParameterAccidentalOverrideSuperclass_PropertyParameterAccidentalOverrideSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/propertyParameterAccidentalOverrideSuperclass/propertyParameterAccidentalOverrideSuperclass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/propertyParameterAccidentalOverrideSuperclass/propertyParameterAccidentalOverrideSuperclass.test"); } @TestMetadata("propertyParameterRedeclaredByProperty/propertyParameterRedeclaredByProperty.test") public void testPropertyParameterRedeclaredByProperty_PropertyParameterRedeclaredByProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/propertyParameterRedeclaredByProperty/propertyParameterRedeclaredByProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/propertyParameterRedeclaredByProperty/propertyParameterRedeclaredByProperty.test"); } @TestMetadata("propertyRedeclaredByPropertyParameter/propertyRedeclaredByPropertyParameter.test") public void testPropertyRedeclaredByPropertyParameter_PropertyRedeclaredByPropertyParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/propertyRedeclaredByPropertyParameter/propertyRedeclaredByPropertyParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/propertyRedeclaredByPropertyParameter/propertyRedeclaredByPropertyParameter.test"); } @TestMetadata("quotedToNonQuoted/quotedToNonQuoted.test") public void testQuotedToNonQuoted_QuotedToNonQuoted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/quotedToNonQuoted/quotedToNonQuoted.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/quotedToNonQuoted/quotedToNonQuoted.test"); } @TestMetadata("quotedToNonQuotedCaretAtTheEnd/quotedToNonQuotedCaretAtTheEnd.test") public void testQuotedToNonQuotedCaretAtTheEnd_QuotedToNonQuotedCaretAtTheEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/quotedToNonQuotedCaretAtTheEnd/quotedToNonQuotedCaretAtTheEnd.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/quotedToNonQuotedCaretAtTheEnd/quotedToNonQuotedCaretAtTheEnd.test"); } @TestMetadata("renameArgumentsWhenParameterRenamed/parameter.test") public void testRenameArgumentsWhenParameterRenamed_Parameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameArgumentsWhenParameterRenamed/parameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameArgumentsWhenParameterRenamed/parameter.test"); } @TestMetadata("renameBundle/renameBundle.test") public void testRenameBundle_RenameBundle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameBundle/renameBundle.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameBundle/renameBundle.test"); } @TestMetadata("renameBundleProperty/renameBundleProperty.test") public void testRenameBundleProperty_RenameBundleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameBundleProperty/renameBundleProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameBundleProperty/renameBundleProperty.test"); } @TestMetadata("renameClassByRefInConstructorDelegationCall/renameClassByRefInConstructorDelegationCall.test") public void testRenameClassByRefInConstructorDelegationCall_RenameClassByRefInConstructorDelegationCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameClassByRefInConstructorDelegationCall/renameClassByRefInConstructorDelegationCall.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameClassByRefInConstructorDelegationCall/renameClassByRefInConstructorDelegationCall.test"); } @TestMetadata("renameClassTypeParameterRedeclaration/renameClassTypeParameterRedeclaration.test") public void testRenameClassTypeParameterRedeclaration_RenameClassTypeParameterRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameClassTypeParameterRedeclaration/renameClassTypeParameterRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameClassTypeParameterRedeclaration/renameClassTypeParameterRedeclaration.test"); } @TestMetadata("renameClassTypeParameterRedeclarationWithOuterScope/renameClassTypeParameterRedeclarationWithOuterScope.test") public void testRenameClassTypeParameterRedeclarationWithOuterScope_RenameClassTypeParameterRedeclarationWithOuterScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameClassTypeParameterRedeclarationWithOuterScope/renameClassTypeParameterRedeclarationWithOuterScope.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameClassTypeParameterRedeclarationWithOuterScope/renameClassTypeParameterRedeclarationWithOuterScope.test"); } @TestMetadata("renameClassWithAutoVarConventions/renameClassWithAutoVarConventions.test") public void testRenameClassWithAutoVarConventions_RenameClassWithAutoVarConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameClassWithAutoVarConventions/renameClassWithAutoVarConventions.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameClassWithAutoVarConventions/renameClassWithAutoVarConventions.test"); } @TestMetadata("renameCompareTo/compareTo.test") public void testRenameCompareTo_CompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameCompareTo/compareTo.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameCompareTo/compareTo.test"); } @TestMetadata("renameContains/contains.test") public void testRenameContains_Contains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameContains/contains.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameContains/contains.test"); } @TestMetadata("renameContainsWithConflicts/containsWithConflicts.test") public void testRenameContainsWithConflicts_ContainsWithConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameContainsWithConflicts/containsWithConflicts.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameContainsWithConflicts/containsWithConflicts.test"); } @TestMetadata("renamedClassShadowingImplicitlyImportedClassUsage/renamedClassShadowingImplicitlyImportedClassUsage.test") public void testRenamedClassShadowingImplicitlyImportedClassUsage_RenamedClassShadowingImplicitlyImportedClassUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamedClassShadowingImplicitlyImportedClassUsage/renamedClassShadowingImplicitlyImportedClassUsage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamedClassShadowingImplicitlyImportedClassUsage/renamedClassShadowingImplicitlyImportedClassUsage.test"); } @TestMetadata("renamedClassShadowingImportedClassUsage/renamedClassShadowingImportedClassUsage.test") public void testRenamedClassShadowingImportedClassUsage_RenamedClassShadowingImportedClassUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamedClassShadowingImportedClassUsage/renamedClassShadowingImportedClassUsage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamedClassShadowingImportedClassUsage/renamedClassShadowingImportedClassUsage.test"); } @TestMetadata("renameDefaultJavaAnnotationMethod/renameDefaultJavaAnnotationMethod.test") public void testRenameDefaultJavaAnnotationMethod_RenameDefaultJavaAnnotationMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameDefaultJavaAnnotationMethod/renameDefaultJavaAnnotationMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameDefaultJavaAnnotationMethod/renameDefaultJavaAnnotationMethod.test"); } @TestMetadata("renameDefaultKotlinAnnotationMethod/renameDefaultKotlinAnnotationMethod.test") public void testRenameDefaultKotlinAnnotationMethod_RenameDefaultKotlinAnnotationMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameDefaultKotlinAnnotationMethod/renameDefaultKotlinAnnotationMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameDefaultKotlinAnnotationMethod/renameDefaultKotlinAnnotationMethod.test"); } @TestMetadata("renameEmptyKotlinFile/renameFile.test") public void testRenameEmptyKotlinFile_RenameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameEmptyKotlinFile/renameFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameEmptyKotlinFile/renameFile.test"); } @TestMetadata("renameEquals/equals.test") public void testRenameEquals_Equals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameEquals/equals.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameEquals/equals.test"); } @TestMetadata("renameExplicitComponentFunction/explicitComponentFunction.test") public void testRenameExplicitComponentFunction_ExplicitComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameExplicitComponentFunction/explicitComponentFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameExplicitComponentFunction/explicitComponentFunction.test"); } @TestMetadata("renameFieldIdentifier/fieldIdentifier.test") public void testRenameFieldIdentifier_FieldIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameFieldIdentifier/fieldIdentifier.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameFieldIdentifier/fieldIdentifier.test"); } @TestMetadata("renameFunctionTypeParameterRedeclaration/renameFunctionTypeParameterRedeclaration.test") public void testRenameFunctionTypeParameterRedeclaration_RenameFunctionTypeParameterRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameFunctionTypeParameterRedeclaration/renameFunctionTypeParameterRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameFunctionTypeParameterRedeclaration/renameFunctionTypeParameterRedeclaration.test"); } @TestMetadata("renameFunctionTypeParameterRedeclarationWithOuterScope/renameFunctionTypeParameterRedeclarationWithOuterScope.test") public void testRenameFunctionTypeParameterRedeclarationWithOuterScope_RenameFunctionTypeParameterRedeclarationWithOuterScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameFunctionTypeParameterRedeclarationWithOuterScope/renameFunctionTypeParameterRedeclarationWithOuterScope.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameFunctionTypeParameterRedeclarationWithOuterScope/renameFunctionTypeParameterRedeclarationWithOuterScope.test"); } @TestMetadata("renameGet/get.test") public void testRenameGet_Get() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameGet/get.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameGet/get.test"); } @TestMetadata("renameInc/inc.test") public void testRenameInc_Inc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameInc/inc.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameInc/inc.test"); } @TestMetadata("renameInvoke/invoke.test") public void testRenameInvoke_Invoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameInvoke/invoke.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameInvoke/invoke.test"); } @TestMetadata("renameIterator/iterator.test") public void testRenameIterator_Iterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameIterator/iterator.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameIterator/iterator.test"); } @TestMetadata("renameJavaClass/renameJavaClass.test") public void testRenameJavaClass_RenameJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaClass/renameJavaClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaClass/renameJavaClass.test"); } @TestMetadata("renameJavaClassWithKtConstructorDelegation/renameJavaClassWithKtConstructorDelegation.test") public void testRenameJavaClassWithKtConstructorDelegation_RenameJavaClassWithKtConstructorDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaClassWithKtConstructorDelegation/renameJavaClassWithKtConstructorDelegation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaClassWithKtConstructorDelegation/renameJavaClassWithKtConstructorDelegation.test"); } @TestMetadata("renameJavaInterface/renameJavaInterface.test") public void testRenameJavaInterface_RenameJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaInterface/renameJavaInterface.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaInterface/renameJavaInterface.test"); } @TestMetadata("renameJavaMethod/javaBaseMethod.test") public void testRenameJavaMethod_JavaBaseMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaMethod/javaBaseMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaMethod/javaBaseMethod.test"); } @TestMetadata("renameJavaMethod/kotlinOverridenMethod.test") public void testRenameJavaMethod_KotlinOverridenMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaMethod/kotlinOverridenMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaMethod/kotlinOverridenMethod.test"); } @TestMetadata("renameJavaMethodToKtKeyword/renameJavaMethodToKtKeyword.test") public void testRenameJavaMethodToKtKeyword_RenameJavaMethodToKtKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaMethodToKtKeyword/renameJavaMethodToKtKeyword.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaMethodToKtKeyword/renameJavaMethodToKtKeyword.test"); } @TestMetadata("renameJavaSyntheticIsPropertyByGetterRef/renameJavaSyntheticIsPropertyByGetterRef.test") public void testRenameJavaSyntheticIsPropertyByGetterRef_RenameJavaSyntheticIsPropertyByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaSyntheticIsPropertyByGetterRef/renameJavaSyntheticIsPropertyByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaSyntheticIsPropertyByGetterRef/renameJavaSyntheticIsPropertyByGetterRef.test"); } @TestMetadata("renameJavaSyntheticPropertyByGetterRef/renameJavaSyntheticPropertyByGetterRef.test") public void testRenameJavaSyntheticPropertyByGetterRef_RenameJavaSyntheticPropertyByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaSyntheticPropertyByGetterRef/renameJavaSyntheticPropertyByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaSyntheticPropertyByGetterRef/renameJavaSyntheticPropertyByGetterRef.test"); } @TestMetadata("renameJavaSyntheticPropertyByGetterSetterRef/renameJavaSyntheticPropertyByGetterSetterRef.test") public void testRenameJavaSyntheticPropertyByGetterSetterRef_RenameJavaSyntheticPropertyByGetterSetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaSyntheticPropertyByGetterSetterRef/renameJavaSyntheticPropertyByGetterSetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaSyntheticPropertyByGetterSetterRef/renameJavaSyntheticPropertyByGetterSetterRef.test"); } @TestMetadata("renameJavaSyntheticPropertyBySetterRef/renameJavaSyntheticPropertyBySetterRef.test") public void testRenameJavaSyntheticPropertyBySetterRef_RenameJavaSyntheticPropertyBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameJavaSyntheticPropertyBySetterRef/renameJavaSyntheticPropertyBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameJavaSyntheticPropertyBySetterRef/renameJavaSyntheticPropertyBySetterRef.test"); } @TestMetadata("renameKotlinBaseMethod/javaWrapperForBaseFunction.test") public void testRenameKotlinBaseMethod_JavaWrapperForBaseFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForBaseFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForBaseFunction.test"); } @TestMetadata("renameKotlinBaseMethod/javaWrapperForOverridenFunctionWithKotlinBase.test") public void testRenameKotlinBaseMethod_JavaWrapperForOverridenFunctionWithKotlinBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForOverridenFunctionWithKotlinBase.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/javaWrapperForOverridenFunctionWithKotlinBase.test"); } @TestMetadata("renameKotlinBaseMethod/kotlinBaseFunction.test") public void testRenameKotlinBaseMethod_KotlinBaseFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinBaseMethod/kotlinBaseFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinBaseMethod/kotlinBaseFunction.test"); } @TestMetadata("renameKotlinClass/javaWrapperForKotlinClass.test") public void testRenameKotlinClass_JavaWrapperForKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClass/javaWrapperForKotlinClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClass/javaWrapperForKotlinClass.test"); } @TestMetadata("renameKotlinClass/kotlinClass.test") public void testRenameKotlinClass_KotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClass/kotlinClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClass/kotlinClass.test"); } @TestMetadata("renameKotlinClassByConstructorRef/kotlinClass.test") public void testRenameKotlinClassByConstructorRef_KotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClassByConstructorRef/kotlinClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClassByConstructorRef/kotlinClass.test"); } @TestMetadata("renameKotlinClassConstructor/renameKotlinConstructor.test") public void testRenameKotlinClassConstructor_RenameKotlinConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClassConstructor/renameKotlinConstructor.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClassConstructor/renameKotlinConstructor.test"); } @TestMetadata("renameKotlinClassSecondaryConstructor/renameKotlinSecondaryConstructor.test") public void testRenameKotlinClassSecondaryConstructor_RenameKotlinSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClassSecondaryConstructor/renameKotlinSecondaryConstructor.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClassSecondaryConstructor/renameKotlinSecondaryConstructor.test"); } @TestMetadata("renameKotlinClassWithFile/javaClassWrapper.test") public void testRenameKotlinClassWithFile_JavaClassWrapper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClassWithFile/javaClassWrapper.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClassWithFile/javaClassWrapper.test"); } @TestMetadata("renameKotlinClassWithFile/kotlinClass.test") public void testRenameKotlinClassWithFile_KotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinClassWithFile/kotlinClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinClassWithFile/kotlinClass.test"); } @TestMetadata("renameKotlinDataClassParameter/renameKotlinDataClassParameter.test") public void testRenameKotlinDataClassParameter_RenameKotlinDataClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinDataClassParameter/renameKotlinDataClassParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinDataClassParameter/renameKotlinDataClassParameter.test"); } @TestMetadata("renameKotlinEnum/renameKotlinEnum.test") public void testRenameKotlinEnum_RenameKotlinEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinEnum/renameKotlinEnum.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinEnum/renameKotlinEnum.test"); } @TestMetadata("renameKotlinEnumConstByJavaRef/renameKotlinEnumConstByJavaRef.test") public void testRenameKotlinEnumConstByJavaRef_RenameKotlinEnumConstByJavaRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinEnumConstByJavaRef/renameKotlinEnumConstByJavaRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinEnumConstByJavaRef/renameKotlinEnumConstByJavaRef.test"); } @TestMetadata("renameKotlinEnumEntry/renameKotlinEnumEntry.test") public void testRenameKotlinEnumEntry_RenameKotlinEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinEnumEntry/renameKotlinEnumEntry.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinEnumEntry/renameKotlinEnumEntry.test"); } @TestMetadata("renameKotlinFacadeClassViaTopLevelClass/renameKotlinFacadeClassViaTopLevelClass.test") public void testRenameKotlinFacadeClassViaTopLevelClass_RenameKotlinFacadeClassViaTopLevelClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassViaTopLevelClass/renameKotlinFacadeClassViaTopLevelClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassViaTopLevelClass/renameKotlinFacadeClassViaTopLevelClass.test"); } @TestMetadata("renameKotlinFacadeClassWithDefaultNameAndCommentsByRef/renameKotlinFacadeClassWithDefaultNameByRef.test") public void testRenameKotlinFacadeClassWithDefaultNameAndCommentsByRef_RenameKotlinFacadeClassWithDefaultNameByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameAndCommentsByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameAndCommentsByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); } @TestMetadata("renameKotlinFacadeClassWithDefaultNameAndJvmMultifileClassByRef/renameKotlinFacadeClassWithDefaultNameByRef.test") public void testRenameKotlinFacadeClassWithDefaultNameAndJvmMultifileClassByRef_RenameKotlinFacadeClassWithDefaultNameByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameAndJvmMultifileClassByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameAndJvmMultifileClassByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); } @TestMetadata("renameKotlinFacadeClassWithDefaultNameByRef/renameKotlinFacadeClassWithDefaultNameByRef.test") public void testRenameKotlinFacadeClassWithDefaultNameByRef_RenameKotlinFacadeClassWithDefaultNameByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); } @TestMetadata("renameKotlinFacadeClassWithDefaultNameViaFileNameByRef/renameKotlinFacadeClassWithDefaultNameByRef.test") public void testRenameKotlinFacadeClassWithDefaultNameViaFileNameByRef_RenameKotlinFacadeClassWithDefaultNameByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameViaFileNameByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassWithDefaultNameViaFileNameByRef/renameKotlinFacadeClassWithDefaultNameByRef.test"); } @TestMetadata("renameKotlinFacadeClassWithJvmNameByRef/renameKotlinFacadeClassWithJvmNameByRef.test") public void testRenameKotlinFacadeClassWithJvmNameByRef_RenameKotlinFacadeClassWithJvmNameByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassWithJvmNameByRef/renameKotlinFacadeClassWithJvmNameByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassWithJvmNameByRef/renameKotlinFacadeClassWithJvmNameByRef.test"); } @TestMetadata("renameKotlinFacadeClassWithJvmNameToDefaultByRef/renameKotlinFacadeClassWithJvmNameByRef.test") public void testRenameKotlinFacadeClassWithJvmNameToDefaultByRef_RenameKotlinFacadeClassWithJvmNameByRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFacadeClassWithJvmNameToDefaultByRef/renameKotlinFacadeClassWithJvmNameByRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFacadeClassWithJvmNameToDefaultByRef/renameKotlinFacadeClassWithJvmNameByRef.test"); } @TestMetadata("renameKotlinFile/renameFile.test") public void testRenameKotlinFile_RenameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFile/renameFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFile/renameFile.test"); } @TestMetadata("renameKotlinFunctionInEnum/renameKotlinFunctionInEnum.test") public void testRenameKotlinFunctionInEnum_RenameKotlinFunctionInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFunctionInEnum/renameKotlinFunctionInEnum.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFunctionInEnum/renameKotlinFunctionInEnum.test"); } @TestMetadata("renameKotlinFunctionInEnum/renameKotlinFunctionInEnumFromSubclass.test") public void testRenameKotlinFunctionInEnum_RenameKotlinFunctionInEnumFromSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFunctionInEnum/renameKotlinFunctionInEnumFromSubclass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFunctionInEnum/renameKotlinFunctionInEnumFromSubclass.test"); } @TestMetadata("renameKotlinFunWithJvmName/renameKotlinFunWithJvmName.test") public void testRenameKotlinFunWithJvmName_RenameKotlinFunWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFunWithJvmName/renameKotlinFunWithJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFunWithJvmName/renameKotlinFunWithJvmName.test"); } @TestMetadata("renameKotlinFunWithJvmNameByJavaRef/renameKotlinFunWithJvmNameByJavaRef.test") public void testRenameKotlinFunWithJvmNameByJavaRef_RenameKotlinFunWithJvmNameByJavaRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFunWithJvmNameByJavaRef/renameKotlinFunWithJvmNameByJavaRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFunWithJvmNameByJavaRef/renameKotlinFunWithJvmNameByJavaRef.test"); } @TestMetadata("renameKotlinFunWithJvmNameToDefaultByJavaRef/renameKotlinFunWithJvmNameToDefaultByJavaRef.test") public void testRenameKotlinFunWithJvmNameToDefaultByJavaRef_RenameKotlinFunWithJvmNameToDefaultByJavaRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinFunWithJvmNameToDefaultByJavaRef/renameKotlinFunWithJvmNameToDefaultByJavaRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinFunWithJvmNameToDefaultByJavaRef/renameKotlinFunWithJvmNameToDefaultByJavaRef.test"); } @TestMetadata("renameKotlinMethod/javaWrapperForKotlinMethod.test") public void testRenameKotlinMethod_JavaWrapperForKotlinMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinMethod/javaWrapperForKotlinMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinMethod/javaWrapperForKotlinMethod.test"); } @TestMetadata("renameKotlinMethod/renameKotlinMethod.test") public void testRenameKotlinMethod_RenameKotlinMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinMethod/renameKotlinMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinMethod/renameKotlinMethod.test"); } @TestMetadata("renameKotlinMethodWithEscapedName/renameKotlinMethodWithEscapedName.test") public void testRenameKotlinMethodWithEscapedName_RenameKotlinMethodWithEscapedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinMethodWithEscapedName/renameKotlinMethodWithEscapedName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinMethodWithEscapedName/renameKotlinMethodWithEscapedName.test"); } @TestMetadata("renameKotlinMultifileFacadeClassWithJvmNameByRef/renameKotlinMultifileFacadeClassWithJvmName.test") public void testRenameKotlinMultifileFacadeClassWithJvmNameByRef_RenameKotlinMultifileFacadeClassWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinMultifileFacadeClassWithJvmNameByRef/renameKotlinMultifileFacadeClassWithJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinMultifileFacadeClassWithJvmNameByRef/renameKotlinMultifileFacadeClassWithJvmName.test"); } @TestMetadata("renameKotlinPackage/renameInOtherFile.test") public void testRenameKotlinPackage_RenameInOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPackage/renameInOtherFile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPackage/renameInOtherFile.test"); } @TestMetadata("renameKotlinPackage/renameKotlinPackage.test") public void testRenameKotlinPackage_RenameKotlinPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPackage/renameKotlinPackage.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPackage/renameKotlinPackage.test"); } @TestMetadata("renameKotlinPackageFunctionFromJava/renameKotlinPackageFunctionFromJava.test") public void testRenameKotlinPackageFunctionFromJava_RenameKotlinPackageFunctionFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPackageFunctionFromJava/renameKotlinPackageFunctionFromJava.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPackageFunctionFromJava/renameKotlinPackageFunctionFromJava.test"); } @TestMetadata("renameKotlinPackageFunctionFromJavaNewFacade/renameKotlinPackageFunctionFromJava.test") public void testRenameKotlinPackageFunctionFromJavaNewFacade_RenameKotlinPackageFunctionFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPackageFunctionFromJavaNewFacade/renameKotlinPackageFunctionFromJava.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPackageFunctionFromJavaNewFacade/renameKotlinPackageFunctionFromJava.test"); } @TestMetadata("renameKotlinParameterWithGetterJvmName/renameKotlinParameterWithGetterJvmName.test") public void testRenameKotlinParameterWithGetterJvmName_RenameKotlinParameterWithGetterJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmName/renameKotlinParameterWithGetterJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmName/renameKotlinParameterWithGetterJvmName.test"); } @TestMetadata("renameKotlinParameterWithGetterJvmNameByGetterRef/renameKotlinParameterWithGetterJvmNameByGetterRef.test") public void testRenameKotlinParameterWithGetterJvmNameByGetterRef_RenameKotlinParameterWithGetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmNameByGetterRef/renameKotlinParameterWithGetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmNameByGetterRef/renameKotlinParameterWithGetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinParameterWithGetterJvmNameBySetterRef/renameKotlinParameterWithGetterJvmNameBySetterRef.test") public void testRenameKotlinParameterWithGetterJvmNameBySetterRef_RenameKotlinParameterWithGetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmNameBySetterRef/renameKotlinParameterWithGetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmNameBySetterRef/renameKotlinParameterWithGetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinParameterWithGetterJvmNameToDefaultByGetterRef/renameKotlinParameterWithGetterJvmNameByGetterRef.test") public void testRenameKotlinParameterWithGetterJvmNameToDefaultByGetterRef_RenameKotlinParameterWithGetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmNameToDefaultByGetterRef/renameKotlinParameterWithGetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterJvmNameToDefaultByGetterRef/renameKotlinParameterWithGetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinParameterWithGetterSetterJvmName/renameKotlinParameterWithGetterSetterJvmName.test") public void testRenameKotlinParameterWithGetterSetterJvmName_RenameKotlinParameterWithGetterSetterJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmName/renameKotlinParameterWithGetterSetterJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmName/renameKotlinParameterWithGetterSetterJvmName.test"); } @TestMetadata("renameKotlinParameterWithGetterSetterJvmNameByGetterRef/renameKotlinParameterWithGetterSetterJvmNameByGetterRef.test") public void testRenameKotlinParameterWithGetterSetterJvmNameByGetterRef_RenameKotlinParameterWithGetterSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameByGetterRef/renameKotlinParameterWithGetterSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameByGetterRef/renameKotlinParameterWithGetterSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinParameterWithGetterSetterJvmNameBySetterRef/renameKotlinParameterWithGetterSetterJvmNameBySetterRef.test") public void testRenameKotlinParameterWithGetterSetterJvmNameBySetterRef_RenameKotlinParameterWithGetterSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameBySetterRef/renameKotlinParameterWithGetterSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameBySetterRef/renameKotlinParameterWithGetterSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinParameterWithGetterSetterJvmNameToDefaultByGetterRef/renameKotlinParameterWithGetterSetterJvmNameByGetterRef.test") public void testRenameKotlinParameterWithGetterSetterJvmNameToDefaultByGetterRef_RenameKotlinParameterWithGetterSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameToDefaultByGetterRef/renameKotlinParameterWithGetterSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameToDefaultByGetterRef/renameKotlinParameterWithGetterSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinParameterWithGetterSetterJvmNameToDefaultBySetterRef/renameKotlinParameterWithGetterSetterJvmNameBySetterRef.test") public void testRenameKotlinParameterWithGetterSetterJvmNameToDefaultBySetterRef_RenameKotlinParameterWithGetterSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameToDefaultBySetterRef/renameKotlinParameterWithGetterSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithGetterSetterJvmNameToDefaultBySetterRef/renameKotlinParameterWithGetterSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinParameterWithSetterJvmName/renameKotlinParameterWithSetterJvmName.test") public void testRenameKotlinParameterWithSetterJvmName_RenameKotlinParameterWithSetterJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmName/renameKotlinParameterWithSetterJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmName/renameKotlinParameterWithSetterJvmName.test"); } @TestMetadata("renameKotlinParameterWithSetterJvmNameByGetterRef/renameKotlinParameterWithSetterJvmNameByGetterRef.test") public void testRenameKotlinParameterWithSetterJvmNameByGetterRef_RenameKotlinParameterWithSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmNameByGetterRef/renameKotlinParameterWithSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmNameByGetterRef/renameKotlinParameterWithSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinParameterWithSetterJvmNameBySetterRef/renameKotlinParameterWithSetterJvmNameBySetterRef.test") public void testRenameKotlinParameterWithSetterJvmNameBySetterRef_RenameKotlinParameterWithSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmNameBySetterRef/renameKotlinParameterWithSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmNameBySetterRef/renameKotlinParameterWithSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinParameterWithSetterJvmNameToDefaultBySetterRef/renameKotlinParameterWithSetterJvmNameBySetterRef.test") public void testRenameKotlinParameterWithSetterJvmNameToDefaultBySetterRef_RenameKotlinParameterWithSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmNameToDefaultBySetterRef/renameKotlinParameterWithSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinParameterWithSetterJvmNameToDefaultBySetterRef/renameKotlinParameterWithSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPrimaryConstructorProperty/renameKotlinPrimaryConstructorProperty.test") public void testRenameKotlinPrimaryConstructorProperty_RenameKotlinPrimaryConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPrimaryConstructorProperty/renameKotlinPrimaryConstructorProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPrimaryConstructorProperty/renameKotlinPrimaryConstructorProperty.test"); } @TestMetadata("renameKotlinPrimaryConstructorPropertyFromOverride/renameKotlinPrimaryConstructorPropertyFromOverride.test") public void testRenameKotlinPrimaryConstructorPropertyFromOverride_RenameKotlinPrimaryConstructorPropertyFromOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPrimaryConstructorPropertyFromOverride/renameKotlinPrimaryConstructorPropertyFromOverride.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPrimaryConstructorPropertyFromOverride/renameKotlinPrimaryConstructorPropertyFromOverride.test"); } @TestMetadata("renameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef_RenameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithCustomGetterSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef_RenameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithCustomGetterSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterJvmName/renameKotlinPropertyWithGetterJvmName.test") public void testRenameKotlinPropertyWithGetterJvmName_RenameKotlinPropertyWithGetterJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmName/renameKotlinPropertyWithGetterJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmName/renameKotlinPropertyWithGetterJvmName.test"); } @TestMetadata("renameKotlinPropertyWithGetterJvmNameByGetterRef/renameKotlinPropertyWithGetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithGetterJvmNameByGetterRef_RenameKotlinPropertyWithGetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmNameByGetterRef/renameKotlinPropertyWithGetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmNameByGetterRef/renameKotlinPropertyWithGetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterJvmNameBySetterRef/renameKotlinPropertyWithGetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithGetterJvmNameBySetterRef_RenameKotlinPropertyWithGetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmNameBySetterRef/renameKotlinPropertyWithGetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmNameBySetterRef/renameKotlinPropertyWithGetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterJvmNameToDefaultByGetterRef/renameKotlinPropertyWithGetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithGetterJvmNameToDefaultByGetterRef_RenameKotlinPropertyWithGetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmNameToDefaultByGetterRef/renameKotlinPropertyWithGetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterJvmNameToDefaultByGetterRef/renameKotlinPropertyWithGetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterSetterJvmName/renameKotlinPropertyWithGetterSetterJvmName.test") public void testRenameKotlinPropertyWithGetterSetterJvmName_RenameKotlinPropertyWithGetterSetterJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmName/renameKotlinPropertyWithGetterSetterJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmName/renameKotlinPropertyWithGetterSetterJvmName.test"); } @TestMetadata("renameKotlinPropertyWithGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithGetterSetterJvmNameByGetterRef_RenameKotlinPropertyWithGetterSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithGetterSetterJvmNameBySetterRef_RenameKotlinPropertyWithGetterSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterSetterJvmNameToDefaultByGetterRef/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithGetterSetterJvmNameToDefaultByGetterRef_RenameKotlinPropertyWithGetterSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameToDefaultByGetterRef/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameToDefaultByGetterRef/renameKotlinPropertyWithGetterSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithGetterSetterJvmNameToDefaultBySetterRef/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithGetterSetterJvmNameToDefaultBySetterRef_RenameKotlinPropertyWithGetterSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameToDefaultBySetterRef/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithGetterSetterJvmNameToDefaultBySetterRef/renameKotlinPropertyWithGetterSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPropertyWithJvmField/renameKotlinPropertyWithJvmField.test") public void testRenameKotlinPropertyWithJvmField_RenameKotlinPropertyWithJvmField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithJvmField/renameKotlinPropertyWithJvmField.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithJvmField/renameKotlinPropertyWithJvmField.test"); } @TestMetadata("renameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef_RenameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef/renameKotlinPropertyWithMatchingGetterSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef_RenameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef/renameKotlinPropertyWithMatchingGetterSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPropertyWithSetterJvmName/renameKotlinPropertyWithSetterJvmName.test") public void testRenameKotlinPropertyWithSetterJvmName_RenameKotlinPropertyWithSetterJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmName/renameKotlinPropertyWithSetterJvmName.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmName/renameKotlinPropertyWithSetterJvmName.test"); } @TestMetadata("renameKotlinPropertyWithSetterJvmNameByGetterRef/renameKotlinPropertyWithSetterJvmNameByGetterRef.test") public void testRenameKotlinPropertyWithSetterJvmNameByGetterRef_RenameKotlinPropertyWithSetterJvmNameByGetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmNameByGetterRef/renameKotlinPropertyWithSetterJvmNameByGetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmNameByGetterRef/renameKotlinPropertyWithSetterJvmNameByGetterRef.test"); } @TestMetadata("renameKotlinPropertyWithSetterJvmNameBySetterRef/renameKotlinPropertyWithSetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithSetterJvmNameBySetterRef_RenameKotlinPropertyWithSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmNameBySetterRef/renameKotlinPropertyWithSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmNameBySetterRef/renameKotlinPropertyWithSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinPropertyWithSetterJvmNameToDefaultBySetterRef/renameKotlinPropertyWithSetterJvmNameBySetterRef.test") public void testRenameKotlinPropertyWithSetterJvmNameToDefaultBySetterRef_RenameKotlinPropertyWithSetterJvmNameBySetterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmNameToDefaultBySetterRef/renameKotlinPropertyWithSetterJvmNameBySetterRef.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinPropertyWithSetterJvmNameToDefaultBySetterRef/renameKotlinPropertyWithSetterJvmNameBySetterRef.test"); } @TestMetadata("renameKotlinStaticMethod/renameKotlinStaticMethod.test") public void testRenameKotlinStaticMethod_RenameKotlinStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinStaticMethod/renameKotlinStaticMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinStaticMethod/renameKotlinStaticMethod.test"); } @TestMetadata("renameKotlinStaticMethodWithJvmOverloads/renameKotlinStaticMethodWithJvmOverloads.test") public void testRenameKotlinStaticMethodWithJvmOverloads_RenameKotlinStaticMethodWithJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinStaticMethodWithJvmOverloads/renameKotlinStaticMethodWithJvmOverloads.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinStaticMethodWithJvmOverloads/renameKotlinStaticMethodWithJvmOverloads.test"); } @TestMetadata("renameKotlinStaticProperty/renameKotlinStaticProperty.test") public void testRenameKotlinStaticProperty_RenameKotlinStaticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinStaticProperty/renameKotlinStaticProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinStaticProperty/renameKotlinStaticProperty.test"); } @TestMetadata("renameKotlinTopLevelVarProperty/renameTopLevelVarProperty.test") public void testRenameKotlinTopLevelVarProperty_RenameTopLevelVarProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinTopLevelVarProperty/renameTopLevelVarProperty.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinTopLevelVarProperty/renameTopLevelVarProperty.test"); } @TestMetadata("renameKotlinValProperty/renameAsJavaGetterForExplicitGetter.test") public void testRenameKotlinValProperty_RenameAsJavaGetterForExplicitGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinValProperty/renameAsJavaGetterForExplicitGetter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinValProperty/renameAsJavaGetterForExplicitGetter.test"); } @TestMetadata("renameKotlinValProperty/renameBase.test") public void testRenameKotlinValProperty_RenameBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinValProperty/renameBase.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinValProperty/renameBase.test"); } @TestMetadata("renameKotlinValProperty/renameOverriden.test") public void testRenameKotlinValProperty_RenameOverriden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinValProperty/renameOverriden.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinValProperty/renameOverriden.test"); } @TestMetadata("renameKotlinValPropertyInCompanionObject/renameKotlinValPropertyInCompanionObject.test") public void testRenameKotlinValPropertyInCompanionObject_RenameKotlinValPropertyInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinValPropertyInCompanionObject/renameKotlinValPropertyInCompanionObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinValPropertyInCompanionObject/renameKotlinValPropertyInCompanionObject.test"); } @TestMetadata("renameKotlinValPropertyInObject/renameKotlinValPropertyInObject.test") public void testRenameKotlinValPropertyInObject_RenameKotlinValPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinValPropertyInObject/renameKotlinValPropertyInObject.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinValPropertyInObject/renameKotlinValPropertyInObject.test"); } @TestMetadata("renameKotlinVarProperty/renameAsJavaGetter.test") public void testRenameKotlinVarProperty_RenameAsJavaGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinVarProperty/renameAsJavaGetter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinVarProperty/renameAsJavaGetter.test"); } @TestMetadata("renameKotlinVarProperty/renameAsJavaSetter.test") public void testRenameKotlinVarProperty_RenameAsJavaSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinVarProperty/renameAsJavaSetter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinVarProperty/renameAsJavaSetter.test"); } @TestMetadata("renameKotlinVarProperty/renameBase.test") public void testRenameKotlinVarProperty_RenameBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinVarProperty/renameBase.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinVarProperty/renameBase.test"); } @TestMetadata("renameKotlinVarProperty/renameOverriden.test") public void testRenameKotlinVarProperty_RenameOverriden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameKotlinVarProperty/renameOverriden.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameKotlinVarProperty/renameOverriden.test"); } @TestMetadata("renameOverriddenPropertyViaJavaGetter/renameOverriddenPropertyViaJavaGetter.test") public void testRenameOverriddenPropertyViaJavaGetter_RenameOverriddenPropertyViaJavaGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameOverriddenPropertyViaJavaGetter/renameOverriddenPropertyViaJavaGetter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameOverriddenPropertyViaJavaGetter/renameOverriddenPropertyViaJavaGetter.test"); } @TestMetadata("renameOverriddenPropertyViaJavaSetter/renameOverriddenPropertyViaJavaSetter.test") public void testRenameOverriddenPropertyViaJavaSetter_RenameOverriddenPropertyViaJavaSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameOverriddenPropertyViaJavaSetter/renameOverriddenPropertyViaJavaSetter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameOverriddenPropertyViaJavaSetter/renameOverriddenPropertyViaJavaSetter.test"); } @TestMetadata("renamePackageFqNameStarImport/renamePackageFqNameStarImport.test") public void testRenamePackageFqNameStarImport_RenamePackageFqNameStarImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamePackageFqNameStarImport/renamePackageFqNameStarImport.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamePackageFqNameStarImport/renamePackageFqNameStarImport.test"); } @TestMetadata("renamePackageWithQuotation/renamePackageWithQuotation.test") public void testRenamePackageWithQuotation_RenamePackageWithQuotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamePackageWithQuotation/renamePackageWithQuotation.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamePackageWithQuotation/renamePackageWithQuotation.test"); } @TestMetadata("renamePlus/plus.test") public void testRenamePlus_Plus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamePlus/plus.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamePlus/plus.test"); } @TestMetadata("renamePlusAssign/plusAssign.test") public void testRenamePlusAssign_PlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamePlusAssign/plusAssign.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamePlusAssign/plusAssign.test"); } @TestMetadata("renamePropertyInEnumCompanionWithEntryConflict/renameKotlinPropertyInEnumCompanionWithEntryConflict.test") public void testRenamePropertyInEnumCompanionWithEntryConflict_RenameKotlinPropertyInEnumCompanionWithEntryConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renamePropertyInEnumCompanionWithEntryConflict/renameKotlinPropertyInEnumCompanionWithEntryConflict.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renamePropertyInEnumCompanionWithEntryConflict/renameKotlinPropertyInEnumCompanionWithEntryConflict.test"); } @TestMetadata("renameSet/set.test") public void testRenameSet_Set() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameSet/set.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameSet/set.test"); } @TestMetadata("renameSynthesizedComponentFunction/synthesizedComponentFunction.test") public void testRenameSynthesizedComponentFunction_SynthesizedComponentFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameSynthesizedComponentFunction/synthesizedComponentFunction.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameSynthesizedComponentFunction/synthesizedComponentFunction.test"); } @TestMetadata("renameUnaryMinus/unaryMinus.test") public void testRenameUnaryMinus_UnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/renameUnaryMinus/unaryMinus.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/renameUnaryMinus/unaryMinus.test"); } @TestMetadata("samConstructorTypeAlias/samConstructorTypeAlias.test") public void testSamConstructorTypeAlias_SamConstructorTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/samConstructorTypeAlias/samConstructorTypeAlias.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/samConstructorTypeAlias/samConstructorTypeAlias.test"); } @TestMetadata("secondaryCnstructorParameterRedeclaration/secondaryConstructorParameterRedeclaration.test") public void testSecondaryCnstructorParameterRedeclaration_SecondaryConstructorParameterRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/secondaryCnstructorParameterRedeclaration/secondaryConstructorParameterRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/secondaryCnstructorParameterRedeclaration/secondaryConstructorParameterRedeclaration.test"); } @TestMetadata("syntheticPropertyUsages1/renameGetMethod.test") public void testSyntheticPropertyUsages1_RenameGetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/syntheticPropertyUsages1/renameGetMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/syntheticPropertyUsages1/renameGetMethod.test"); } @TestMetadata("syntheticPropertyUsages2/renameSetMethod.test") public void testSyntheticPropertyUsages2_RenameSetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/syntheticPropertyUsages2/renameSetMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/syntheticPropertyUsages2/renameSetMethod.test"); } @TestMetadata("syntheticPropertyUsages3/renameSetMethod.test") public void testSyntheticPropertyUsages3_RenameSetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/syntheticPropertyUsages3/renameSetMethod.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/syntheticPropertyUsages3/renameSetMethod.test"); } @TestMetadata("topLevelClassRedeclaration/topLevelClassRedeclaration.test") public void testTopLevelClassRedeclaration_TopLevelClassRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/topLevelClassRedeclaration/topLevelClassRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/topLevelClassRedeclaration/topLevelClassRedeclaration.test"); } @TestMetadata("topLevelFunctionRedeclaration/topLevelFunctionRedeclaration.test") public void testTopLevelFunctionRedeclaration_TopLevelFunctionRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/topLevelFunctionRedeclaration/topLevelFunctionRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/topLevelFunctionRedeclaration/topLevelFunctionRedeclaration.test"); } @TestMetadata("topLevelPropertyRedeclaration/topLevelPropertyRedeclaration.test") public void testTopLevelPropertyRedeclaration_TopLevelPropertyRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/topLevelPropertyRedeclaration/topLevelPropertyRedeclaration.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/topLevelPropertyRedeclaration/topLevelPropertyRedeclaration.test"); } @TestMetadata("valTextOccurrences/valTextOccurrences.test") public void testValTextOccurrences_ValTextOccurrences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/valTextOccurrences/valTextOccurrences.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/valTextOccurrences/valTextOccurrences.test"); } @TestMetadata("varInDoWhile/varInDoWhile.test") public void testVarInDoWhile_VarInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/rename/varInDoWhile/varInDoWhile.test"); - doTest(fileName); + runTest("idea/testData/refactoring/rename/varInDoWhile/varInDoWhile.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/MultiModuleSafeDeleteTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/MultiModuleSafeDeleteTestGenerated.java index 954c8a90845..b82d2d055f2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/MultiModuleSafeDeleteTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/MultiModuleSafeDeleteTestGenerated.java @@ -21,139 +21,121 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiModuleSafeDeleteTestGenerated extends AbstractMultiModuleSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSafeDeleteMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/refactoring/safeDeleteMultiModule"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY); } @TestMetadata("byHeaderClass/byHeaderClass.test") public void testByHeaderClass_ByHeaderClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClass/byHeaderClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClass/byHeaderClass.test"); } @TestMetadata("byHeaderClassMemberFun/byHeaderClassMemberFun.test") public void testByHeaderClassMemberFun_ByHeaderClassMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassMemberFun/byHeaderClassMemberFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassMemberFun/byHeaderClassMemberFun.test"); } @TestMetadata("byHeaderClassMemberFunParameter/byHeaderClassMemberFunParameter.test") public void testByHeaderClassMemberFunParameter_ByHeaderClassMemberFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassMemberFunParameter/byHeaderClassMemberFunParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassMemberFunParameter/byHeaderClassMemberFunParameter.test"); } @TestMetadata("byHeaderClassMemberVal/byHeaderClassMemberVal.test") public void testByHeaderClassMemberVal_ByHeaderClassMemberVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassMemberVal/byHeaderClassMemberVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassMemberVal/byHeaderClassMemberVal.test"); } @TestMetadata("byHeaderClassPrimaryConstructorParameter/headersAndImplsByHeaderClassPrimaryConstructorParameter.test") public void testByHeaderClassPrimaryConstructorParameter_HeadersAndImplsByHeaderClassPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassPrimaryConstructorParameter/headersAndImplsByHeaderClassPrimaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassPrimaryConstructorParameter/headersAndImplsByHeaderClassPrimaryConstructorParameter.test"); } @TestMetadata("byHeaderClassSecondaryConstructor/byHeaderClassSecondaryConstructor.test") public void testByHeaderClassSecondaryConstructor_ByHeaderClassSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassSecondaryConstructor/byHeaderClassSecondaryConstructor.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassSecondaryConstructor/byHeaderClassSecondaryConstructor.test"); } @TestMetadata("byHeaderClassSecondaryConstructorParameter/headersAndImplsByHeaderClassSecondaryConstructorParameter.test") public void testByHeaderClassSecondaryConstructorParameter_HeadersAndImplsByHeaderClassSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassSecondaryConstructorParameter/headersAndImplsByHeaderClassSecondaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderClassSecondaryConstructorParameter/headersAndImplsByHeaderClassSecondaryConstructorParameter.test"); } @TestMetadata("byHeaderFun/byHeaderFun.test") public void testByHeaderFun_ByHeaderFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderFun/byHeaderFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderFun/byHeaderFun.test"); } @TestMetadata("byHeaderFunParamerer/byHeaderFunParameter.test") public void testByHeaderFunParamerer_ByHeaderFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderFunParamerer/byHeaderFunParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderFunParamerer/byHeaderFunParameter.test"); } @TestMetadata("byHeaderFunVarargParamerer/byHeaderFunVarargParameter.test") public void testByHeaderFunVarargParamerer_ByHeaderFunVarargParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderFunVarargParamerer/byHeaderFunVarargParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderFunVarargParamerer/byHeaderFunVarargParameter.test"); } @TestMetadata("byHeaderVal/byHeaderVal.test") public void testByHeaderVal_ByHeaderVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byHeaderVal/byHeaderVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byHeaderVal/byHeaderVal.test"); } @TestMetadata("byImplClass/byImplClass.test") public void testByImplClass_ByImplClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClass/byImplClass.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClass/byImplClass.test"); } @TestMetadata("byImplClassMemberFun/byImplClassMemberFun.test") public void testByImplClassMemberFun_ByImplClassMemberFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClassMemberFun/byImplClassMemberFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClassMemberFun/byImplClassMemberFun.test"); } @TestMetadata("byImplClassMemberFunParameterLiftingToHeader/byImplClassMemberFunParameterLiftingToHeader.test") public void testByImplClassMemberFunParameterLiftingToHeader_ByImplClassMemberFunParameterLiftingToHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClassMemberFunParameterLiftingToHeader/byImplClassMemberFunParameterLiftingToHeader.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClassMemberFunParameterLiftingToHeader/byImplClassMemberFunParameterLiftingToHeader.test"); } @TestMetadata("byImplClassMemberVal/byImplClassMemberVal.test") public void testByImplClassMemberVal_ByImplClassMemberVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClassMemberVal/byImplClassMemberVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClassMemberVal/byImplClassMemberVal.test"); } @TestMetadata("byImplClassPrimaryConstructorParameterLiftingToHeader/headersAndImplsByImplClassPrimaryConstructorParameter.test") public void testByImplClassPrimaryConstructorParameterLiftingToHeader_HeadersAndImplsByImplClassPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClassPrimaryConstructorParameterLiftingToHeader/headersAndImplsByImplClassPrimaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClassPrimaryConstructorParameterLiftingToHeader/headersAndImplsByImplClassPrimaryConstructorParameter.test"); } @TestMetadata("byImplClassSecondaryConstructor/byImplClassSecondaryConstructor.test") public void testByImplClassSecondaryConstructor_ByImplClassSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClassSecondaryConstructor/byImplClassSecondaryConstructor.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClassSecondaryConstructor/byImplClassSecondaryConstructor.test"); } @TestMetadata("byImplClassSecondaryConstructorParameterLiftingToHeader/headersAndImplsByImplClassSecondaryConstructorParameter.test") public void testByImplClassSecondaryConstructorParameterLiftingToHeader_HeadersAndImplsByImplClassSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplClassSecondaryConstructorParameterLiftingToHeader/headersAndImplsByImplClassSecondaryConstructorParameter.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplClassSecondaryConstructorParameterLiftingToHeader/headersAndImplsByImplClassSecondaryConstructorParameter.test"); } @TestMetadata("byImplFun/byImplFun.test") public void testByImplFun_ByImplFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplFun/byImplFun.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplFun/byImplFun.test"); } @TestMetadata("byImplFunParamererLiftingToHeader/byImplFunParameterLiftingToHeader.test") public void testByImplFunParamererLiftingToHeader_ByImplFunParameterLiftingToHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplFunParamererLiftingToHeader/byImplFunParameterLiftingToHeader.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplFunParamererLiftingToHeader/byImplFunParameterLiftingToHeader.test"); } @TestMetadata("byImplFunParamererNoLiftingToHeader/byImplFunParameterNoLiftingToHeader.test") public void testByImplFunParamererNoLiftingToHeader_ByImplFunParameterNoLiftingToHeader() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplFunParamererNoLiftingToHeader/byImplFunParameterNoLiftingToHeader.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplFunParamererNoLiftingToHeader/byImplFunParameterNoLiftingToHeader.test"); } @TestMetadata("byImplVal/byImplVal.test") public void testByImplVal_ByImplVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDeleteMultiModule/byImplVal/byImplVal.test"); - doTest(fileName); + runTest("idea/testData/refactoring/safeDeleteMultiModule/byImplVal/byImplVal.test"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/SafeDeleteTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/SafeDeleteTestGenerated.java index 7cbdc0d5d28..54f2dfab935 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/SafeDeleteTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/refactoring/safeDelete/SafeDeleteTestGenerated.java @@ -23,92 +23,82 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinClass extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doClassTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("class1.kt") public void testClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/class1.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/class1.kt"); } @TestMetadata("class2.kt") public void testClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/class2.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/class2.kt"); } @TestMetadata("classInString.kt") public void testClassInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/classInString.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/classInString.kt"); } @TestMetadata("classWithExternalConstructructorUsage.kt") public void testClassWithExternalConstructructorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/classWithExternalConstructructorUsage.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/classWithExternalConstructructorUsage.kt"); } @TestMetadata("classWithInternalConstructructorUsage.kt") public void testClassWithInternalConstructructorUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/classWithInternalConstructructorUsage.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/classWithInternalConstructructorUsage.kt"); } @TestMetadata("enumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/enumEntry.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/enumEntry.kt"); } @TestMetadata("localClass1.kt") public void testLocalClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/localClass1.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/localClass1.kt"); } @TestMetadata("localClass2.kt") public void testLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/localClass2.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/localClass2.kt"); } @TestMetadata("nestedClass1.kt") public void testNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/nestedClass1.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/nestedClass1.kt"); } @TestMetadata("nestedClass2.kt") public void testNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/nestedClass2.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/nestedClass2.kt"); } @TestMetadata("noUsages.kt") public void testNoUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/noUsages.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/noUsages.kt"); } @TestMetadata("trait1.kt") public void testTrait1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/trait1.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/trait1.kt"); } @TestMetadata("trait2.kt") public void testTrait2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/trait2.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/trait2.kt"); } @TestMetadata("unsafeImport.kt") public void testUnsafeImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/unsafeImport.kt"); - doClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClass/unsafeImport.kt"); } } @@ -116,14 +106,17 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinClassWithJava extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doClassTestWithJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinClassWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteClass/kotlinClassWithJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classWithDelegationCalls.kt") public void testClassWithDelegationCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/kotlinClassWithJava/classWithDelegationCalls.kt"); - doClassTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/kotlinClassWithJava/classWithDelegationCalls.kt"); } } @@ -131,26 +124,27 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaClassWithKotlin extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJavaClassTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaClassWithKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ImportJavaClassToKotlin.java") public void testImportJavaClassToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin/ImportJavaClassToKotlin.java"); - doJavaClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin/ImportJavaClassToKotlin.java"); } @TestMetadata("javaInterfaceInSuperTypeList.java") public void testJavaInterfaceInSuperTypeList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin/javaInterfaceInSuperTypeList.java"); - doJavaClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin/javaInterfaceInSuperTypeList.java"); } @TestMetadata("javaInterfaceInSuperTypeListLast.java") public void testJavaInterfaceInSuperTypeListLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin/javaInterfaceInSuperTypeListLast.java"); - doJavaClassTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteClass/javaClassWithKotlin/javaInterfaceInSuperTypeListLast.java"); } } @@ -158,68 +152,62 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinObject extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doObjectTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/anonymousObject.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/anonymousObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/companionObject.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/companionObject.kt"); } @TestMetadata("localObject1.kt") public void testLocalObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/localObject1.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/localObject1.kt"); } @TestMetadata("localObject2.kt") public void testLocalObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/localObject2.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/localObject2.kt"); } @TestMetadata("nestedObject1.kt") public void testNestedObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/nestedObject1.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/nestedObject1.kt"); } @TestMetadata("nestedObject2.kt") public void testNestedObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/nestedObject2.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/nestedObject2.kt"); } @TestMetadata("noUsages.kt") public void testNoUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/noUsages.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/noUsages.kt"); } @TestMetadata("object1.kt") public void testObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/object1.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/object1.kt"); } @TestMetadata("object2.kt") public void testObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/object2.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/object2.kt"); } @TestMetadata("unsafeImport.kt") public void testUnsafeImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/unsafeImport.kt"); - doObjectTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteObject/kotlinObject/unsafeImport.kt"); } } @@ -227,110 +215,97 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinFunction extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doFunctionTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("fun1.kt") public void testFun1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/fun1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/fun1.kt"); } @TestMetadata("fun2.kt") public void testFun2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/fun2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/fun2.kt"); } @TestMetadata("funExt1.kt") public void testFunExt1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/funExt1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/funExt1.kt"); } @TestMetadata("funExt2.kt") public void testFunExt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/funExt2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/funExt2.kt"); } @TestMetadata("implement1.kt") public void testImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/implement1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/implement1.kt"); } @TestMetadata("implement2.kt") public void testImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/implement2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/implement2.kt"); } @TestMetadata("localFun1.kt") public void testLocalFun1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFun1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFun1.kt"); } @TestMetadata("localFun2.kt") public void testLocalFun2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFun2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFun2.kt"); } @TestMetadata("localFunExt1.kt") public void testLocalFunExt1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFunExt1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFunExt1.kt"); } @TestMetadata("localFunExt2.kt") public void testLocalFunExt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFunExt2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/localFunExt2.kt"); } @TestMetadata("noUsages.kt") public void testNoUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/noUsages.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/noUsages.kt"); } @TestMetadata("override1.kt") public void testOverride1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/override1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/override1.kt"); } @TestMetadata("override2.kt") public void testOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/override2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/override2.kt"); } @TestMetadata("overrideAndImplement1.kt") public void testOverrideAndImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideAndImplement1.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideAndImplement1.kt"); } @TestMetadata("overrideAndImplement2.kt") public void testOverrideAndImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideAndImplement2.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideAndImplement2.kt"); } @TestMetadata("overrideAndImplement3.kt") public void testOverrideAndImplement3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideAndImplement3.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideAndImplement3.kt"); } @TestMetadata("overrideWithUsages.kt") public void testOverrideWithUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideWithUsages.kt"); - doFunctionTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunction/overrideWithUsages.kt"); } } @@ -338,80 +313,72 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinFunctionWithJava extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doFunctionTestWithJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinFunctionWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("funExt.kt") public void testFunExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/funExt.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/funExt.kt"); } @TestMetadata("implement1.kt") public void testImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement1.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement1.kt"); } @TestMetadata("implement2.kt") public void testImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement2.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement2.kt"); } @TestMetadata("implement3.kt") public void testImplement3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement3.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement3.kt"); } @TestMetadata("implement4.kt") public void testImplement4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement4.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/implement4.kt"); } @TestMetadata("override1.kt") public void testOverride1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/override1.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/override1.kt"); } @TestMetadata("override2.kt") public void testOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/override2.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/override2.kt"); } @TestMetadata("override3.kt") public void testOverride3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/override3.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/override3.kt"); } @TestMetadata("overrideAndImplement1.kt") public void testOverrideAndImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/overrideAndImplement1.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/overrideAndImplement1.kt"); } @TestMetadata("overrideAndImplement2.kt") public void testOverrideAndImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/overrideAndImplement2.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/overrideAndImplement2.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/secondaryConstructor.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/secondaryConstructor.kt"); } @TestMetadata("usageInOverrideToDelete.kt") public void testUsageInOverrideToDelete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/usageInOverrideToDelete.kt"); - doFunctionTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/kotlinFunctionWithJava/usageInOverrideToDelete.kt"); } } @@ -419,20 +386,22 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaFunctionWithKotlin extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJavaMethodTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaFunctionWithKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("mixedHierarchy1.kt") public void testMixedHierarchy1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin/mixedHierarchy1.kt"); - doJavaMethodTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin/mixedHierarchy1.kt"); } @TestMetadata("mixedHierarchy2.kt") public void testMixedHierarchy2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin/mixedHierarchy2.kt"); - doJavaMethodTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteFunction/javaFunctionWithKotlin/mixedHierarchy2.kt"); } } @@ -440,152 +409,132 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinProperty extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doPropertyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implement1.kt") public void testImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement1.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement1.kt"); } @TestMetadata("implement2.kt") public void testImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement2.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement2.kt"); } @TestMetadata("implement3.kt") public void testImplement3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement3.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement3.kt"); } @TestMetadata("implement4.kt") public void testImplement4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement4.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement4.kt"); } @TestMetadata("implement5.kt") public void testImplement5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement5.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement5.kt"); } @TestMetadata("implement6.kt") public void testImplement6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement6.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement6.kt"); } @TestMetadata("implement7.kt") public void testImplement7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement7.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement7.kt"); } @TestMetadata("implement8.kt") public void testImplement8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement8.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/implement8.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/localVar.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/localVar.kt"); } @TestMetadata("noUsages.kt") public void testNoUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/noUsages.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/noUsages.kt"); } @TestMetadata("override1.kt") public void testOverride1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override1.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override1.kt"); } @TestMetadata("override2.kt") public void testOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override2.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override2.kt"); } @TestMetadata("override3.kt") public void testOverride3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override3.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override3.kt"); } @TestMetadata("override4.kt") public void testOverride4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override4.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/override4.kt"); } @TestMetadata("overrideAndImplement1.kt") public void testOverrideAndImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement1.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement1.kt"); } @TestMetadata("overrideAndImplement2.kt") public void testOverrideAndImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement2.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement2.kt"); } @TestMetadata("overrideAndImplement3.kt") public void testOverrideAndImplement3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement3.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement3.kt"); } @TestMetadata("overrideAndImplement4.kt") public void testOverrideAndImplement4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement4.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideAndImplement4.kt"); } @TestMetadata("overrideWithUsages.kt") public void testOverrideWithUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideWithUsages.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/overrideWithUsages.kt"); } @TestMetadata("property1.kt") public void testProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/property1.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/property1.kt"); } @TestMetadata("property2.kt") public void testProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/property2.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/property2.kt"); } @TestMetadata("propertyExt1.kt") public void testPropertyExt1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/propertyExt1.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/propertyExt1.kt"); } @TestMetadata("propertyExt2.kt") public void testPropertyExt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/propertyExt2.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/propertyExt2.kt"); } @TestMetadata("propertyInLocalObject.kt") public void testPropertyInLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/propertyInLocalObject.kt"); - doPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinProperty/propertyInLocalObject.kt"); } } @@ -593,80 +542,72 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinPropertyWithJava extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doPropertyTestWithJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinPropertyWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("implement1.kt") public void testImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement1.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement1.kt"); } @TestMetadata("implement2.kt") public void testImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement2.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement2.kt"); } @TestMetadata("implement3.kt") public void testImplement3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement3.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement3.kt"); } @TestMetadata("implement4.kt") public void testImplement4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement4.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/implement4.kt"); } @TestMetadata("override1.kt") public void testOverride1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override1.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override1.kt"); } @TestMetadata("override2.kt") public void testOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override2.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override2.kt"); } @TestMetadata("override3.kt") public void testOverride3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override3.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override3.kt"); } @TestMetadata("override4.kt") public void testOverride4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override4.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/override4.kt"); } @TestMetadata("overrideAndImplement1.kt") public void testOverrideAndImplement1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/overrideAndImplement1.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/overrideAndImplement1.kt"); } @TestMetadata("overrideAndImplement2.kt") public void testOverrideAndImplement2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/overrideAndImplement2.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/overrideAndImplement2.kt"); } @TestMetadata("propertyExt.kt") public void testPropertyExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/propertyExt.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/propertyExt.kt"); } @TestMetadata("usageInOverrideToDelete.kt") public void testUsageInOverrideToDelete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/usageInOverrideToDelete.kt"); - doPropertyTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/kotlinPropertyWithJava/usageInOverrideToDelete.kt"); } } @@ -674,44 +615,42 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaPropertyWithKotlin extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doJavaPropertyTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaPropertyWithKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("middleJava1.kt") public void testMiddleJava1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava1.kt"); - doJavaPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava1.kt"); } @TestMetadata("middleJava2.kt") public void testMiddleJava2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava2.kt"); - doJavaPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava2.kt"); } @TestMetadata("middleJava3.kt") public void testMiddleJava3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava3.kt"); - doJavaPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava3.kt"); } @TestMetadata("middleJava4.kt") public void testMiddleJava4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava4.kt"); - doJavaPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava4.kt"); } @TestMetadata("middleJava5.kt") public void testMiddleJava5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava5.kt"); - doJavaPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava5.kt"); } @TestMetadata("middleJava6.kt") public void testMiddleJava6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava6.kt"); - doJavaPropertyTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteProperty/javaPropertyWithKotlin/middleJava6.kt"); } } @@ -719,20 +658,22 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinTypeAlias extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTypeAliasTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinTypeAlias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias/simple.kt"); - doTypeAliasTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias/simple.kt"); } @TestMetadata("used.kt") public void testUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias/used.kt"); - doTypeAliasTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeAlias/kotlinTypeAlias/used.kt"); } } @@ -740,104 +681,92 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinTypeParameter extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTypeParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("internalUsages1.kt") public void testInternalUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages1.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages1.kt"); } @TestMetadata("internalUsages2.kt") public void testInternalUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages2.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages2.kt"); } @TestMetadata("internalUsages3.kt") public void testInternalUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages3.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages3.kt"); } @TestMetadata("internalUsages4.kt") public void testInternalUsages4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages4.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages4.kt"); } @TestMetadata("internalUsages5.kt") public void testInternalUsages5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages5.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/internalUsages5.kt"); } @TestMetadata("safeUsagesWithConstraint1.kt") public void testSafeUsagesWithConstraint1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/safeUsagesWithConstraint1.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/safeUsagesWithConstraint1.kt"); } @TestMetadata("safeUsagesWithConstraint2.kt") public void testSafeUsagesWithConstraint2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/safeUsagesWithConstraint2.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/safeUsagesWithConstraint2.kt"); } @TestMetadata("subclass1.kt") public void testSubclass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subclass1.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subclass1.kt"); } @TestMetadata("subclass2.kt") public void testSubclass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subclass2.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subclass2.kt"); } @TestMetadata("subst1.kt") public void testSubst1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst1.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst1.kt"); } @TestMetadata("subst2.kt") public void testSubst2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst2.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst2.kt"); } @TestMetadata("subst3.kt") public void testSubst3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst3.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst3.kt"); } @TestMetadata("subst4.kt") public void testSubst4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst4.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst4.kt"); } @TestMetadata("subst5.kt") public void testSubst5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst5.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst5.kt"); } @TestMetadata("subst6.kt") public void testSubst6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst6.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst6.kt"); } @TestMetadata("subst7.kt") public void testSubst7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst7.kt"); - doTypeParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameter/subst7.kt"); } } @@ -845,110 +774,97 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinTypeParameterWithJava extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTypeParameterTestWithJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinTypeParameterWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("internalUsages1.kt") public void testInternalUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages1.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages1.kt"); } @TestMetadata("internalUsages2.kt") public void testInternalUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages2.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages2.kt"); } @TestMetadata("internalUsages3.kt") public void testInternalUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages3.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages3.kt"); } @TestMetadata("internalUsages4.kt") public void testInternalUsages4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages4.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages4.kt"); } @TestMetadata("internalUsages5.kt") public void testInternalUsages5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages5.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/internalUsages5.kt"); } @TestMetadata("rawType.kt") public void testRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/rawType.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/rawType.kt"); } @TestMetadata("safeUsagesWithConstraint1.kt") public void testSafeUsagesWithConstraint1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/safeUsagesWithConstraint1.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/safeUsagesWithConstraint1.kt"); } @TestMetadata("safeUsagesWithConstraint2.kt") public void testSafeUsagesWithConstraint2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/safeUsagesWithConstraint2.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/safeUsagesWithConstraint2.kt"); } @TestMetadata("subclass1.kt") public void testSubclass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subclass1.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subclass1.kt"); } @TestMetadata("subclass2.kt") public void testSubclass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subclass2.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subclass2.kt"); } @TestMetadata("subst1.kt") public void testSubst1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst1.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst1.kt"); } @TestMetadata("subst2.kt") public void testSubst2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst2.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst2.kt"); } @TestMetadata("subst3.kt") public void testSubst3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst3.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst3.kt"); } @TestMetadata("subst4.kt") public void testSubst4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst4.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst4.kt"); } @TestMetadata("subst5.kt") public void testSubst5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst5.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst5.kt"); } @TestMetadata("subst6.kt") public void testSubst6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst6.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst6.kt"); } @TestMetadata("subst7.kt") public void testSubst7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst7.kt"); - doTypeParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteTypeParameter/kotlinTypeParameterWithJava/subst7.kt"); } } @@ -956,200 +872,172 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinValueParameter extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doValueParameterTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinValueParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dataClassComponent.kt") public void testDataClassComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/dataClassComponent.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/dataClassComponent.kt"); } @TestMetadata("defaultParam1.kt") public void testDefaultParam1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/defaultParam1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/defaultParam1.kt"); } @TestMetadata("defaultParam2.kt") public void testDefaultParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/defaultParam2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/defaultParam2.kt"); } @TestMetadata("extNamedParam1.kt") public void testExtNamedParam1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/extNamedParam1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/extNamedParam1.kt"); } @TestMetadata("extNamedParam2.kt") public void testExtNamedParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/extNamedParam2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/extNamedParam2.kt"); } @TestMetadata("hierarchyWithSafeUsages1.kt") public void testHierarchyWithSafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages1.kt"); } @TestMetadata("hierarchyWithSafeUsages2.kt") public void testHierarchyWithSafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages2.kt"); } @TestMetadata("hierarchyWithSafeUsages3.kt") public void testHierarchyWithSafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages3.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages3.kt"); } @TestMetadata("hierarchyWithSafeUsages4.kt") public void testHierarchyWithSafeUsages4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages4.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages4.kt"); } @TestMetadata("hierarchyWithSafeUsages5.kt") public void testHierarchyWithSafeUsages5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages5.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithSafeUsages5.kt"); } @TestMetadata("hierarchyWithUnsafeUsages1.kt") public void testHierarchyWithUnsafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages1.kt"); } @TestMetadata("hierarchyWithUnsafeUsages2.kt") public void testHierarchyWithUnsafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages2.kt"); } @TestMetadata("hierarchyWithUnsafeUsages3.kt") public void testHierarchyWithUnsafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages3.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages3.kt"); } @TestMetadata("hierarchyWithUnsafeUsages4.kt") public void testHierarchyWithUnsafeUsages4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages4.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages4.kt"); } @TestMetadata("hierarchyWithUnsafeUsages5.kt") public void testHierarchyWithUnsafeUsages5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages5.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages5.kt"); } @TestMetadata("hierarchyWithUnsafeUsages6.kt") public void testHierarchyWithUnsafeUsages6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages6.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages6.kt"); } @TestMetadata("hierarchyWithUnsafeUsages7.kt") public void testHierarchyWithUnsafeUsages7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages7.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages7.kt"); } @TestMetadata("hierarchyWithUnsafeUsages8.kt") public void testHierarchyWithUnsafeUsages8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages8.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/hierarchyWithUnsafeUsages8.kt"); } @TestMetadata("internalUsage1.kt") public void testInternalUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/internalUsage1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/internalUsage1.kt"); } @TestMetadata("internalUsage2.kt") public void testInternalUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/internalUsage2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/internalUsage2.kt"); } @TestMetadata("lambdaArg.kt") public void testLambdaArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/lambdaArg.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/lambdaArg.kt"); } @TestMetadata("lambdaArgExt.kt") public void testLambdaArgExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/lambdaArgExt.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/lambdaArgExt.kt"); } @TestMetadata("namedParam1.kt") public void testNamedParam1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/namedParam1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/namedParam1.kt"); } @TestMetadata("namedParam2.kt") public void testNamedParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/namedParam2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/namedParam2.kt"); } @TestMetadata("propertyParam1.kt") public void testPropertyParam1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/propertyParam1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/propertyParam1.kt"); } @TestMetadata("propertyParam2.kt") public void testPropertyParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/propertyParam2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/propertyParam2.kt"); } @TestMetadata("safeUsages1.kt") public void testSafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsages1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsages1.kt"); } @TestMetadata("safeUsages2.kt") public void testSafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsages2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsages2.kt"); } @TestMetadata("safeUsages3.kt") public void testSafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsages3.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsages3.kt"); } @TestMetadata("safeUsagesExt1.kt") public void testSafeUsagesExt1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsagesExt1.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsagesExt1.kt"); } @TestMetadata("safeUsagesExt2.kt") public void testSafeUsagesExt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsagesExt2.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/safeUsagesExt2.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/setter.kt"); - doValueParameterTest(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameter/setter.kt"); } } @@ -1157,176 +1045,152 @@ public class SafeDeleteTestGenerated extends AbstractSafeDeleteTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinValueParameterWithJava extends AbstractSafeDeleteTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doValueParameterTestWithJava, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinValueParameterWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("dataClassComponent.kt") public void testDataClassComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/dataClassComponent.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/dataClassComponent.kt"); } @TestMetadata("hierarchyWithSafeUsages1.kt") public void testHierarchyWithSafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages1.kt"); } @TestMetadata("hierarchyWithSafeUsages2.kt") public void testHierarchyWithSafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages2.kt"); } @TestMetadata("hierarchyWithSafeUsages3.kt") public void testHierarchyWithSafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages3.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages3.kt"); } @TestMetadata("hierarchyWithSafeUsages4.kt") public void testHierarchyWithSafeUsages4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages4.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages4.kt"); } @TestMetadata("hierarchyWithSafeUsages5.kt") public void testHierarchyWithSafeUsages5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages5.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithSafeUsages5.kt"); } @TestMetadata("hierarchyWithUnsafeUsages1.kt") public void testHierarchyWithUnsafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages1.kt"); } @TestMetadata("hierarchyWithUnsafeUsages2.kt") public void testHierarchyWithUnsafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages2.kt"); } @TestMetadata("hierarchyWithUnsafeUsages3.kt") public void testHierarchyWithUnsafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages3.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages3.kt"); } @TestMetadata("hierarchyWithUnsafeUsages4.kt") public void testHierarchyWithUnsafeUsages4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages4.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages4.kt"); } @TestMetadata("hierarchyWithUnsafeUsages5.kt") public void testHierarchyWithUnsafeUsages5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages5.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/hierarchyWithUnsafeUsages5.kt"); } @TestMetadata("internalUsage1.kt") public void testInternalUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/internalUsage1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/internalUsage1.kt"); } @TestMetadata("internalUsage2.kt") public void testInternalUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/internalUsage2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/internalUsage2.kt"); } @TestMetadata("lambdaArg.kt") public void testLambdaArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/lambdaArg.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/lambdaArg.kt"); } @TestMetadata("lambdaArgExt.kt") public void testLambdaArgExt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/lambdaArgExt.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/lambdaArgExt.kt"); } @TestMetadata("mixedHierarchy1.kt") public void testMixedHierarchy1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchy1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchy1.kt"); } @TestMetadata("mixedHierarchy2.kt") public void testMixedHierarchy2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchy2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchy2.kt"); } @TestMetadata("mixedHierarchy3.kt") public void testMixedHierarchy3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchy3.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchy3.kt"); } @TestMetadata("mixedHierarchyWithUnsafeUsages1.kt") public void testMixedHierarchyWithUnsafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchyWithUnsafeUsages1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchyWithUnsafeUsages1.kt"); } @TestMetadata("mixedHierarchyWithUnsafeUsages2.kt") public void testMixedHierarchyWithUnsafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchyWithUnsafeUsages2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchyWithUnsafeUsages2.kt"); } @TestMetadata("mixedHierarchyWithUnsafeUsages3.kt") public void testMixedHierarchyWithUnsafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchyWithUnsafeUsages3.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/mixedHierarchyWithUnsafeUsages3.kt"); } @TestMetadata("propertyParam1.kt") public void testPropertyParam1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/propertyParam1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/propertyParam1.kt"); } @TestMetadata("propertyParam2.kt") public void testPropertyParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/propertyParam2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/propertyParam2.kt"); } @TestMetadata("safeUsages1.kt") public void testSafeUsages1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsages1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsages1.kt"); } @TestMetadata("safeUsages2.kt") public void testSafeUsages2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsages2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsages2.kt"); } @TestMetadata("safeUsages3.kt") public void testSafeUsages3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsages3.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsages3.kt"); } @TestMetadata("safeUsagesExt1.kt") public void testSafeUsagesExt1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsagesExt1.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsagesExt1.kt"); } @TestMetadata("safeUsagesExt2.kt") public void testSafeUsagesExt2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsagesExt2.kt"); - doValueParameterTestWithJava(fileName); + runTest("idea/testData/refactoring/safeDelete/deleteValueParameter/kotlinValueParameterWithJava/safeUsagesExt2.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/repl/IdeReplCompletionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/repl/IdeReplCompletionTestGenerated.java index 1f408a35ac7..485f9ffbd3f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/repl/IdeReplCompletionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/repl/IdeReplCompletionTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IdeReplCompletionTestGenerated extends AbstractIdeReplCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompletion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/repl/completion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("builtInMember.kt") public void testBuiltInMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/builtInMember.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/builtInMember.kt"); } @TestMetadata("definedClass.kt") public void testDefinedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/definedClass.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/definedClass.kt"); } @TestMetadata("definedClassMember.kt") public void testDefinedClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/definedClassMember.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/definedClassMember.kt"); } @TestMetadata("definedExtension.kt") public void testDefinedExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/definedExtension.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/definedExtension.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/functions.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/functions.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/stdlib.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/stdlib.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/repl/completion/variables.kt"); - doTest(fileName); + runTest("idea/testData/repl/completion/variables.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/AdditionalResolveDescriptorRendererTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/AdditionalResolveDescriptorRendererTestGenerated.java index 3f44d8a769c..d95c5c36b66 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/AdditionalResolveDescriptorRendererTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/AdditionalResolveDescriptorRendererTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AdditionalResolveDescriptorRendererTestGenerated extends AbstractAdditionalResolveDescriptorRendererTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAdditionalLazyResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/additionalLazyResolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectInBaseConstructor.kt") public void testAnonymousObjectInBaseConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInBaseConstructor.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/anonymousObjectInBaseConstructor.kt"); } @TestMetadata("anonymousObjectInClassInitializer.kt") public void testAnonymousObjectInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt"); } @TestMetadata("anonymousObjectInClassParameterInitializer.kt") public void testAnonymousObjectInClassParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassParameterInitializer.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassParameterInitializer.kt"); } @TestMetadata("functionLiteralInBaseConstructor.kt") public void testFunctionLiteralInBaseConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/functionLiteralInBaseConstructor.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/functionLiteralInBaseConstructor.kt"); } @TestMetadata("localClassInClassInitializer.kt") public void testLocalClassInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt"); } @TestMetadata("localClassInClosureInClassParameterInitializer.kt") public void testLocalClassInClosureInClassParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localClassInClosureInClassParameterInitializer.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/localClassInClosureInClassParameterInitializer.kt"); } @TestMetadata("localObjectInClassInitializer.kt") public void testLocalObjectInClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt"); } @TestMetadata("localObjectInClosureInClassParameterInitializer.kt") public void testLocalObjectInClosureInClassParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/additionalLazyResolve/localObjectInClosureInClassParameterInitializer.kt"); - doTest(fileName); + runTest("idea/testData/resolve/additionalLazyResolve/localObjectInClosureInClassParameterInitializer.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/PartialBodyResolveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/PartialBodyResolveTestGenerated.java index 5fa9fc43d34..cfe6a874b16 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/PartialBodyResolveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/PartialBodyResolveTestGenerated.java @@ -21,445 +21,376 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class PartialBodyResolveTestGenerated extends AbstractPartialBodyResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPartialBodyResolve() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/partialBodyResolve"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/AnonymousObjects.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/AnonymousObjects.kt"); } @TestMetadata("As.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/As.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/As.kt"); } @TestMetadata("BangBang.kt") public void testBangBang() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/BangBang.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/BangBang.kt"); } @TestMetadata("BangBangHasPlatformTypeBug.kt") public void testBangBangHasPlatformTypeBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/BangBangHasPlatformTypeBug.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/BangBangHasPlatformTypeBug.kt"); } @TestMetadata("BangBangInIfCondition.kt") public void testBangBangInIfCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/BangBangInIfCondition.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/BangBangInIfCondition.kt"); } @TestMetadata("ClassInitializerHasNoValue.kt") public void testClassInitializerHasNoValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/ClassInitializerHasNoValue.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/ClassInitializerHasNoValue.kt"); } @TestMetadata("DeclarationsBefore.kt") public void testDeclarationsBefore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/DeclarationsBefore.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/DeclarationsBefore.kt"); } @TestMetadata("DoWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/DoWhile.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/DoWhile.kt"); } @TestMetadata("Elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/Elvis.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/Elvis.kt"); } @TestMetadata("ElvisReturn.kt") public void testElvisReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/ElvisReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/ElvisReturn.kt"); } @TestMetadata("ExpressionBodyExplicitType.kt") public void testExpressionBodyExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/ExpressionBodyExplicitType.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/ExpressionBodyExplicitType.kt"); } @TestMetadata("For1.kt") public void testFor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/For1.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/For1.kt"); } @TestMetadata("For2.kt") public void testFor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/For2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/For2.kt"); } @TestMetadata("IfBranchesAutoCasts.kt") public void testIfBranchesAutoCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfBranchesAutoCasts.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfBranchesAutoCasts.kt"); } @TestMetadata("IfBranchesAutoCasts2.kt") public void testIfBranchesAutoCasts2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfBranchesAutoCasts2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfBranchesAutoCasts2.kt"); } @TestMetadata("IfBranchesSmartCast.kt") public void testIfBranchesSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfBranchesSmartCast.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfBranchesSmartCast.kt"); } @TestMetadata("IfCallWithConditionReturn.kt") public void testIfCallWithConditionReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfCallWithConditionReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfCallWithConditionReturn.kt"); } @TestMetadata("IfEqAutoCast.kt") public void testIfEqAutoCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfEqAutoCast.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfEqAutoCast.kt"); } @TestMetadata("IfIsReturn.kt") public void testIfIsReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfIsReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfIsReturn.kt"); } @TestMetadata("IfNegatedNotNullReturn.kt") public void testIfNegatedNotNullReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNegatedNotNullReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNegatedNotNullReturn.kt"); } @TestMetadata("IfNotIsError.kt") public void testIfNotIsError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsError.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsError.kt"); } @TestMetadata("IfNotIsErrorQualifier.kt") public void testIfNotIsErrorQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsErrorQualifier.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsErrorQualifier.kt"); } @TestMetadata("IfNotIsErrorVariable.kt") public void testIfNotIsErrorVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsErrorVariable.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsErrorVariable.kt"); } @TestMetadata("IfNotIsMyError.kt") public void testIfNotIsMyError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsMyError.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsMyError.kt"); } @TestMetadata("IfNotIsMyErrorWithAliasImport.kt") public void testIfNotIsMyErrorWithAliasImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsMyErrorWithAliasImport.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsMyErrorWithAliasImport.kt"); } @TestMetadata("IfNotIsNothingProp.kt") public void testIfNotIsNothingProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsNothingProp.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsNothingProp.kt"); } @TestMetadata("IfNotIsReturn.kt") public void testIfNotIsReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsReturn.kt"); } @TestMetadata("IfNotIsReturn2.kt") public void testIfNotIsReturn2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsReturn2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsReturn2.kt"); } @TestMetadata("IfNotIsThrow.kt") public void testIfNotIsThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotIsThrow.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotIsThrow.kt"); } @TestMetadata("IfNotNullElseReturn.kt") public void testIfNotNullElseReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNotNullElseReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNotNullElseReturn.kt"); } @TestMetadata("IfNullAlwaysExits.kt") public void testIfNullAlwaysExits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullAlwaysExits.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullAlwaysExits.kt"); } @TestMetadata("IfNullAndNullReturn.kt") public void testIfNullAndNullReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullAndNullReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullAndNullReturn.kt"); } @TestMetadata("IfNullBreak.kt") public void testIfNullBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullBreak.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullBreak.kt"); } @TestMetadata("IfNullConditionalReturn.kt") public void testIfNullConditionalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullConditionalReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullConditionalReturn.kt"); } @TestMetadata("IfNullConditionalReturnWithElse.kt") public void testIfNullConditionalReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullConditionalReturnWithElse.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullConditionalReturnWithElse.kt"); } @TestMetadata("IfNullContinue.kt") public void testIfNullContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullContinue.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullContinue.kt"); } @TestMetadata("IfNullDoWhileWithBreak.kt") public void testIfNullDoWhileWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullDoWhileWithBreak.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullDoWhileWithBreak.kt"); } @TestMetadata("IfNullElseReturn.kt") public void testIfNullElseReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullElseReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullElseReturn.kt"); } @TestMetadata("IfNullElvisReturn.kt") public void testIfNullElvisReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullElvisReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullElvisReturn.kt"); } @TestMetadata("IfNullForWithReturn.kt") public void testIfNullForWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullForWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullForWithReturn.kt"); } @TestMetadata("IfNullOrNullReturn.kt") public void testIfNullOrNullReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullOrNullReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullOrNullReturn.kt"); } @TestMetadata("IfNullPrint.kt") public void testIfNullPrint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullPrint.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullPrint.kt"); } @TestMetadata("IfNullReturn.kt") public void testIfNullReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullReturn.kt"); } @TestMetadata("IfNullWhileTrueWithBreak.kt") public void testIfNullWhileTrueWithBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullWhileTrueWithBreak.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullWhileTrueWithBreak.kt"); } @TestMetadata("IfNullWhileWithReturn.kt") public void testIfNullWhileWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfNullWhileWithReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfNullWhileWithReturn.kt"); } @TestMetadata("IfReturn.kt") public void testIfReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IfReturn.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IfReturn.kt"); } @TestMetadata("InIfExpressionElse.kt") public void testInIfExpressionElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/InIfExpressionElse.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/InIfExpressionElse.kt"); } @TestMetadata("InsideAnonymousObject.kt") public void testInsideAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/InsideAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/InsideAnonymousObject.kt"); } @TestMetadata("IntConstantTypeBug.kt") public void testIntConstantTypeBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IntConstantTypeBug.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/IntConstantTypeBug.kt"); } @TestMetadata("LabeledBreak.kt") public void testLabeledBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LabeledBreak.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LabeledBreak.kt"); } @TestMetadata("LabeledContinue.kt") public void testLabeledContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LabeledContinue.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LabeledContinue.kt"); } @TestMetadata("Lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/Lambda.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/Lambda.kt"); } @TestMetadata("LambdaInCurrentStatement.kt") public void testLambdaInCurrentStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LambdaInCurrentStatement.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LambdaInCurrentStatement.kt"); } @TestMetadata("LambdaReturnsNothing2.kt") public void testLambdaReturnsNothing2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LambdaReturnsNothing2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LambdaReturnsNothing2.kt"); } @TestMetadata("LocalClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LocalClass.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LocalClass.kt"); } @TestMetadata("LocalFun.kt") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LocalFun.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LocalFun.kt"); } @TestMetadata("LocalNothingFun.kt") public void testLocalNothingFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LocalNothingFun.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/LocalNothingFun.kt"); } @TestMetadata("MutliDeclaration.kt") public void testMutliDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/MutliDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/MutliDeclaration.kt"); } @TestMetadata("NestedLoop.kt") public void testNestedLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/NestedLoop.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/NestedLoop.kt"); } @TestMetadata("OutOfBodyResolve.kt") public void testOutOfBodyResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/OutOfBodyResolve.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/OutOfBodyResolve.kt"); } @TestMetadata("PropertyAccessorBody.kt") public void testPropertyAccessorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/PropertyAccessorBody.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/PropertyAccessorBody.kt"); } @TestMetadata("PropertyByDelegate.kt") public void testPropertyByDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/PropertyByDelegate.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/PropertyByDelegate.kt"); } @TestMetadata("ReturnLambda.kt") public void testReturnLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/ReturnLambda.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/ReturnLambda.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/Simple.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/Simple.kt"); } @TestMetadata("SmartCastInTheSameStatement.kt") public void testSmartCastInTheSameStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/SmartCastInTheSameStatement.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/SmartCastInTheSameStatement.kt"); } @TestMetadata("SmartCastOfThis1.kt") public void testSmartCastOfThis1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/SmartCastOfThis1.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/SmartCastOfThis1.kt"); } @TestMetadata("SmartCastOfThis2.kt") public void testSmartCastOfThis2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/SmartCastOfThis2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/SmartCastOfThis2.kt"); } @TestMetadata("SmartCastPointsResolveRequired1.kt") public void testSmartCastPointsResolveRequired1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/SmartCastPointsResolveRequired1.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/SmartCastPointsResolveRequired1.kt"); } @TestMetadata("SmartCastPointsResolveRequired2.kt") public void testSmartCastPointsResolveRequired2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/SmartCastPointsResolveRequired2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/SmartCastPointsResolveRequired2.kt"); } @TestMetadata("ThisQualifiedAutoCast.kt") public void testThisQualifiedAutoCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/ThisQualifiedAutoCast.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/ThisQualifiedAutoCast.kt"); } @TestMetadata("While.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/While.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/While.kt"); } @TestMetadata("WhileTrue.kt") public void testWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/WhileTrue.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/WhileTrue.kt"); } @TestMetadata("WhileTrueCondition.kt") public void testWhileTrueCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/WhileTrueCondition.kt"); - doTest(fileName); + runTest("idea/testData/resolve/partialBodyResolve/WhileTrueCondition.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInJavaTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInJavaTestGenerated.java index 398e72e0656..f783f012095 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInJavaTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInJavaTestGenerated.java @@ -23,80 +23,72 @@ public class ReferenceResolveInJavaTestGenerated extends AbstractReferenceResolv @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryAndSource extends AbstractReferenceResolveInJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryAndSource() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/referenceInJava/binaryAndSource"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Class.java") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Class.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Class.java"); } @TestMetadata("ClassObjectField.java") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/ClassObjectField.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/ClassObjectField.java"); } @TestMetadata("Constructor.java") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Constructor.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Constructor.java"); } @TestMetadata("EnumEntry.java") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/EnumEntry.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/EnumEntry.java"); } @TestMetadata("Field.java") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Field.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Field.java"); } @TestMetadata("FileFacade.java") public void testFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/FileFacade.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/FileFacade.java"); } @TestMetadata("Getter.java") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Getter.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Getter.java"); } @TestMetadata("Method.java") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Method.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Method.java"); } @TestMetadata("MethodOfDeeplyNested.java") public void testMethodOfDeeplyNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/MethodOfDeeplyNested.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/MethodOfDeeplyNested.java"); } @TestMetadata("MethodWithParameters.java") public void testMethodWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/MethodWithParameters.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/MethodWithParameters.java"); } @TestMetadata("ObjectInstance.java") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/ObjectInstance.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/ObjectInstance.java"); } @TestMetadata("PlatformStaticFun.java") public void testPlatformStaticFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/PlatformStaticFun.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/PlatformStaticFun.java"); } } @@ -104,38 +96,37 @@ public class ReferenceResolveInJavaTestGenerated extends AbstractReferenceResolv @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SourceOnly extends AbstractReferenceResolveInJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSourceOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/referenceInJava/sourceOnly"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationParameterReference.java") public void testAnnotationParameterReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/sourceOnly/AnnotationParameterReference.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/sourceOnly/AnnotationParameterReference.java"); } @TestMetadata("AutoGeneratedOverloads.java") public void testAutoGeneratedOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/sourceOnly/AutoGeneratedOverloads.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/sourceOnly/AutoGeneratedOverloads.java"); } @TestMetadata("ClassObjectStaticField.java") public void testClassObjectStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/sourceOnly/ClassObjectStaticField.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/sourceOnly/ClassObjectStaticField.java"); } @TestMetadata("DelegatedMethodFromTraitNoImpl.java") public void testDelegatedMethodFromTraitNoImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/sourceOnly/DelegatedMethodFromTraitNoImpl.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/sourceOnly/DelegatedMethodFromTraitNoImpl.java"); } @TestMetadata("DelegatedMethodFromTraitWithImpl.java") public void testDelegatedMethodFromTraitWithImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/sourceOnly/DelegatedMethodFromTraitWithImpl.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/sourceOnly/DelegatedMethodFromTraitWithImpl.java"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInLibrarySourcesTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInLibrarySourcesTestGenerated.java index 47fd3e19f09..1f790a20028 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInLibrarySourcesTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveInLibrarySourcesTestGenerated.java @@ -21,31 +21,31 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ReferenceResolveInLibrarySourcesTestGenerated extends AbstractReferenceResolveInLibrarySourcesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferenceInLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/referenceInLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("builtInNumber.kt") public void testBuiltInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInLib/builtInNumber.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInLib/builtInNumber.kt"); } @TestMetadata("inLibrarySource.kt") public void testInLibrarySource() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInLib/inLibrarySource.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInLib/inLibrarySource.kt"); } @TestMetadata("toFunParameter.kt") public void testToFunParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInLib/toFunParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInLib/toFunParameter.kt"); } @TestMetadata("toLocalFun.kt") public void testToLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInLib/toLocalFun.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInLib/toLocalFun.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveTestGenerated.java index cd3fd01d884..44523a58352 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveTestGenerated.java @@ -21,504 +21,436 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationForClass.kt") public void testAnnotationForClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/AnnotationForClass.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/AnnotationForClass.kt"); } @TestMetadata("AnnotationInsideFunction.kt") public void testAnnotationInsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/AnnotationInsideFunction.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/AnnotationInsideFunction.kt"); } @TestMetadata("AnnotationOnFile.kt") public void testAnnotationOnFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/AnnotationOnFile.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/AnnotationOnFile.kt"); } @TestMetadata("AnnotationOnFileWithImport.kt") public void testAnnotationOnFileWithImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/AnnotationOnFileWithImport.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/AnnotationOnFileWithImport.kt"); } @TestMetadata("AnnotationParameter.kt") public void testAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/AnnotationParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/AnnotationParameter.kt"); } @TestMetadata("AnnotationTypeParameter.kt") public void testAnnotationTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/AnnotationTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/AnnotationTypeParameter.kt"); } @TestMetadata("ClassInTypeConstraint.kt") public void testClassInTypeConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ClassInTypeConstraint.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ClassInTypeConstraint.kt"); } @TestMetadata("ClassNameBeforeDot.kt") public void testClassNameBeforeDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ClassNameBeforeDot.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ClassNameBeforeDot.kt"); } @TestMetadata("ClassObjectClassLiteralReference.kt") public void testClassObjectClassLiteralReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ClassObjectClassLiteralReference.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ClassObjectClassLiteralReference.kt"); } @TestMetadata("ClassObjectClassLiteralReferenceWithField.kt") public void testClassObjectClassLiteralReferenceWithField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ClassObjectClassLiteralReferenceWithField.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ClassObjectClassLiteralReferenceWithField.kt"); } @TestMetadata("ClassQualifierForNestedClassConstructorCall.kt") public void testClassQualifierForNestedClassConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ClassQualifierForNestedClassConstructorCall.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ClassQualifierForNestedClassConstructorCall.kt"); } @TestMetadata("ClassReferenceInImport.kt") public void testClassReferenceInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ClassReferenceInImport.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ClassReferenceInImport.kt"); } @TestMetadata("CollectionLiteralLeft.kt") public void testCollectionLiteralLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/CollectionLiteralLeft.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/CollectionLiteralLeft.kt"); } @TestMetadata("CollectionLiteralRight.kt") public void testCollectionLiteralRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/CollectionLiteralRight.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/CollectionLiteralRight.kt"); } @TestMetadata("CoroutineSuspensionPoint.kt") public void testCoroutineSuspensionPoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/CoroutineSuspensionPoint.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/CoroutineSuspensionPoint.kt"); } @TestMetadata("CtrlClickResolve.kt") public void testCtrlClickResolve() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/CtrlClickResolve.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/CtrlClickResolve.kt"); } @TestMetadata("DataClassCopy.kt") public void testDataClassCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/DataClassCopy.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/DataClassCopy.kt"); } @TestMetadata("DefaultObjectAsExtensionReceiverForFunction.kt") public void testDefaultObjectAsExtensionReceiverForFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForFunction.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForFunction.kt"); } @TestMetadata("DefaultObjectAsExtensionReceiverForProperty.kt") public void testDefaultObjectAsExtensionReceiverForProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForProperty.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/DefaultObjectAsExtensionReceiverForProperty.kt"); } @TestMetadata("DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt") public void testDefaultObjectAsReceiverForExtensionFunctionOnSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/DefaultObjectAsReceiverForExtensionFunctionOnSuperType.kt"); } @TestMetadata("DefaultObjectAsReceiverForMemberPropertyInSuperType.kt") public void testDefaultObjectAsReceiverForMemberPropertyInSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/DefaultObjectAsReceiverForMemberPropertyInSuperType.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/DefaultObjectAsReceiverForMemberPropertyInSuperType.kt"); } @TestMetadata("DefaultObjectInShortReferenceFormCall.kt") public void testDefaultObjectInShortReferenceFormCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/DefaultObjectInShortReferenceFormCall.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/DefaultObjectInShortReferenceFormCall.kt"); } @TestMetadata("EnumValues.kt") public void testEnumValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/EnumValues.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/EnumValues.kt"); } @TestMetadata("FakeJavaLang1.kt") public void testFakeJavaLang1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/FakeJavaLang1.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/FakeJavaLang1.kt"); } @TestMetadata("FakeJavaLang2.kt") public void testFakeJavaLang2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/FakeJavaLang2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/FakeJavaLang2.kt"); } @TestMetadata("FakeJavaLang3.kt") public void testFakeJavaLang3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/FakeJavaLang3.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/FakeJavaLang3.kt"); } @TestMetadata("FakeJavaLang4.kt") public void testFakeJavaLang4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/FakeJavaLang4.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/FakeJavaLang4.kt"); } @TestMetadata("fileRefInRawStringLiteral.kt") public void testFileRefInRawStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/fileRefInRawStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/fileRefInRawStringLiteral.kt"); } @TestMetadata("fileRefInStringLiteral.kt") public void testFileRefInStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/fileRefInStringLiteral.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/fileRefInStringLiteral.kt"); } @TestMetadata("GenericFunctionParameter.kt") public void testGenericFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/GenericFunctionParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/GenericFunctionParameter.kt"); } @TestMetadata("GenericTypeInFunctionParameter.kt") public void testGenericTypeInFunctionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/GenericTypeInFunctionParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/GenericTypeInFunctionParameter.kt"); } @TestMetadata("ImportFromRootScope.kt") public void testImportFromRootScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ImportFromRootScope.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ImportFromRootScope.kt"); } @TestMetadata("InClassParameter.kt") public void testInClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InClassParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InClassParameter.kt"); } @TestMetadata("InClassParameterField.kt") public void testInClassParameterField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InClassParameterField.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InClassParameterField.kt"); } @TestMetadata("InEnumEntry.kt") public void testInEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InEnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InEnumEntry.kt"); } @TestMetadata("InFunctionParameterType.kt") public void testInFunctionParameterType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InFunctionParameterType.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InFunctionParameterType.kt"); } @TestMetadata("InMethodParameter.kt") public void testInMethodParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InMethodParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InMethodParameter.kt"); } @TestMetadata("InObjectClassObject.kt") public void testInObjectClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InObjectClassObject.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InObjectClassObject.kt"); } @TestMetadata("InSecondClassObject.kt") public void testInSecondClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/InSecondClassObject.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/InSecondClassObject.kt"); } @TestMetadata("JavaAnnotationParameter.kt") public void testJavaAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaAnnotationParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/JavaAnnotationParameter.kt"); } @TestMetadata("JavaConstructorNotNullParameter.kt") public void testJavaConstructorNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaConstructorNotNullParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/JavaConstructorNotNullParameter.kt"); } @TestMetadata("JavaEnumEntry.kt") public void testJavaEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaEnumEntry.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/JavaEnumEntry.kt"); } @TestMetadata("JavaEnumValueOf.kt") public void testJavaEnumValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaEnumValueOf.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/JavaEnumValueOf.kt"); } @TestMetadata("JavaParameter.kt") public void testJavaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/JavaParameter.kt"); } @TestMetadata("JavaReference.kt") public void testJavaReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/JavaReference.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/JavaReference.kt"); } @TestMetadata("MultiDeclarationExtension.kt") public void testMultiDeclarationExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/MultiDeclarationExtension.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/MultiDeclarationExtension.kt"); } @TestMetadata("MultiDeclarationMember.kt") public void testMultiDeclarationMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/MultiDeclarationMember.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/MultiDeclarationMember.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/NamedClassObject.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/NamedClassObject.kt"); } @TestMetadata("PackageReference.kt") public void testPackageReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/PackageReference.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/PackageReference.kt"); } @TestMetadata("PackageReferenceInImport.kt") public void testPackageReferenceInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/PackageReferenceInImport.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/PackageReferenceInImport.kt"); } @TestMetadata("PropertyPlaceInClassObjectInObject.kt") public void testPropertyPlaceInClassObjectInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/PropertyPlaceInClassObjectInObject.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/PropertyPlaceInClassObjectInObject.kt"); } @TestMetadata("ReferenceInClassWhereConstraint.kt") public void testReferenceInClassWhereConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ReferenceInClassWhereConstraint.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ReferenceInClassWhereConstraint.kt"); } @TestMetadata("ReferenceInFunWhereConstraint.kt") public void testReferenceInFunWhereConstraint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ReferenceInFunWhereConstraint.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ReferenceInFunWhereConstraint.kt"); } @TestMetadata("ReferenceToSam.kt") public void testReferenceToSam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ReferenceToSam.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ReferenceToSam.kt"); } @TestMetadata("ResolveClass.kt") public void testResolveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ResolveClass.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ResolveClass.kt"); } @TestMetadata("ResolvePackageInProperty.kt") public void testResolvePackageInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ResolvePackageInProperty.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ResolvePackageInProperty.kt"); } @TestMetadata("SamAdapter.kt") public void testSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/SamAdapter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/SamAdapter.kt"); } @TestMetadata("SamConstructor.kt") public void testSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/SamConstructor.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/SamConstructor.kt"); } @TestMetadata("SamConstructorTypeArguments.kt") public void testSamConstructorTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/SamConstructorTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/SamConstructorTypeArguments.kt"); } @TestMetadata("SeveralOverrides.kt") public void testSeveralOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/SeveralOverrides.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/SeveralOverrides.kt"); } @TestMetadata("SyntheticProperty.kt") public void testSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/SyntheticProperty.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/SyntheticProperty.kt"); } @TestMetadata("TypeAlias.kt") public void testTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeAlias.kt"); } @TestMetadata("TypeAliasAsSupertypeConstructor.kt") public void testTypeAliasAsSupertypeConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeAliasAsSupertypeConstructor.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeAliasAsSupertypeConstructor.kt"); } @TestMetadata("TypeAliasRHS.kt") public void testTypeAliasRHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeAliasRHS.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeAliasRHS.kt"); } @TestMetadata("TypeArgumentBeforeDot.kt") public void testTypeArgumentBeforeDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentBeforeDot.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeArgumentBeforeDot.kt"); } @TestMetadata("TypeArgumentBeforeDot2.kt") public void testTypeArgumentBeforeDot2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentBeforeDot2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeArgumentBeforeDot2.kt"); } @TestMetadata("TypeArgumentUnresolvedClass.kt") public void testTypeArgumentUnresolvedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentUnresolvedClass.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeArgumentUnresolvedClass.kt"); } @TestMetadata("TypeArgumentUnresolvedConstructor.kt") public void testTypeArgumentUnresolvedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentUnresolvedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeArgumentUnresolvedConstructor.kt"); } @TestMetadata("TypeArgumentWrongNumber.kt") public void testTypeArgumentWrongNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeArgumentWrongNumber.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeArgumentWrongNumber.kt"); } @TestMetadata("TypeParameterInAnonymousObject.kt") public void testTypeParameterInAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeParameterInAnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeParameterInAnonymousObject.kt"); } @TestMetadata("TypeParameterInFunctionLiteral.kt") public void testTypeParameterInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/TypeParameterInFunctionLiteral.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/TypeParameterInFunctionLiteral.kt"); } @TestMetadata("ValueParameter.kt") public void testValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/ValueParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/ValueParameter.kt"); } @TestMetadata("WrongNumberOfTypeArguments.kt") public void testWrongNumberOfTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/WrongNumberOfTypeArguments.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/WrongNumberOfTypeArguments.kt"); } @TestMetadata("WrongNumberOfTypeArguments2.kt") public void testWrongNumberOfTypeArguments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/WrongNumberOfTypeArguments2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/WrongNumberOfTypeArguments2.kt"); } @TestMetadata("WrongNumberOfTypeArgumentsInSupertype.kt") public void testWrongNumberOfTypeArgumentsInSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/WrongNumberOfTypeArgumentsInSupertype.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/WrongNumberOfTypeArgumentsInSupertype.kt"); } @TestMetadata("idea/testData/resolve/references/delegatedPropertyAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedPropertyAccessors extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDelegatedPropertyAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/delegatedPropertyAccessors"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/unresolved.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/unresolved.kt"); } @TestMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inSource") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InSource extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInSource() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/delegatedPropertyAccessors/inSource"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("getExtension.kt") public void testGetExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getExtension.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getExtension.kt"); } @TestMetadata("getMember.kt") public void testGetMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getMember.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getMember.kt"); } @TestMetadata("getMultipleDeclarations.kt") public void testGetMultipleDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getMultipleDeclarations.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getMultipleDeclarations.kt"); } @TestMetadata("getOneFakeOverride.kt") public void testGetOneFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getOneFakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/inSource/getOneFakeOverride.kt"); } } @@ -526,20 +458,22 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InStandardLibrary extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInStandardLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/delegatedPropertyAccessors/inStandardLibrary"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lazy.kt") public void testLazy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inStandardLibrary/lazy.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/inStandardLibrary/lazy.kt"); } @TestMetadata("notNull.kt") public void testNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/delegatedPropertyAccessors/inStandardLibrary/notNull.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/delegatedPropertyAccessors/inStandardLibrary/notNull.kt"); } } } @@ -548,34 +482,39 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForLoopIn extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForLoopIn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/forLoopIn"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("unresolvedIterator.kt") public void testUnresolvedIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/unresolvedIterator.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/unresolvedIterator.kt"); } @TestMetadata("idea/testData/resolve/references/forLoopIn/inBuiltIns") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InBuiltIns extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/forLoopIn/inBuiltIns"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/inBuiltIns/extension.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/inBuiltIns/extension.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/inBuiltIns/member.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/inBuiltIns/member.kt"); } } @@ -583,14 +522,17 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InLibrary extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/forLoopIn/inLibrary"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/inLibrary/extension.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/inLibrary/extension.kt"); } } @@ -598,10 +540,13 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InSource extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("allExtensions.kt") public void testAllExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/inSource/allExtensions.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/inSource/allExtensions.kt"); } public void testAllFilesPresentInInSource() throws Exception { @@ -610,14 +555,12 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest @TestMetadata("allMembers.kt") public void testAllMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/inSource/allMembers.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/inSource/allMembers.kt"); } @TestMetadata("nextMissing.kt") public void testNextMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/forLoopIn/inSource/nextMissing.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/forLoopIn/inSource/nextMissing.kt"); } } } @@ -626,62 +569,57 @@ public class ReferenceResolveTestGenerated extends AbstractReferenceResolveTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractReferenceResolveTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/references/invoke"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("lambdaAndParens.kt") public void testLambdaAndParens() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/lambdaAndParens.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/lambdaAndParens.kt"); } @TestMetadata("lambdaNoPar.kt") public void testLambdaNoPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/lambdaNoPar.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/lambdaNoPar.kt"); } @TestMetadata("lambdaNoParLabel.kt") public void testLambdaNoParLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/lambdaNoParLabel.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/lambdaNoParLabel.kt"); } @TestMetadata("lambdaNoParRCurly.kt") public void testLambdaNoParRCurly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/lambdaNoParRCurly.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/lambdaNoParRCurly.kt"); } @TestMetadata("noParams.kt") public void testNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/noParams.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/noParams.kt"); } @TestMetadata("noParamsRPar.kt") public void testNoParamsRPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/noParamsRPar.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/noParamsRPar.kt"); } @TestMetadata("nonemptyLambdaRPar.kt") public void testNonemptyLambdaRPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/nonemptyLambdaRPar.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/nonemptyLambdaRPar.kt"); } @TestMetadata("oneParam.kt") public void testOneParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/oneParam.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/oneParam.kt"); } @TestMetadata("oneParamRPar.kt") public void testOneParamRPar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/references/invoke/oneParamRPar.kt"); - doTest(fileName); + runTest("idea/testData/resolve/references/invoke/oneParamRPar.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveWithLibTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveWithLibTestGenerated.java index 728726b3201..99c5ce6d742 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveWithLibTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceResolveWithLibTestGenerated.java @@ -21,85 +21,76 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ReferenceResolveWithLibTestGenerated extends AbstractReferenceResolveWithLibTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferenceWithLib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/referenceWithLib"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("delegatedPropertyWithTypeParameters.kt") public void testDelegatedPropertyWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParameters.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/delegatedPropertyWithTypeParameters.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/fakeOverride.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/fakeOverride.kt"); } @TestMetadata("fakeOverride2.kt") public void testFakeOverride2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/fakeOverride2.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/fakeOverride2.kt"); } @TestMetadata("innerClassFromLib.kt") public void testInnerClassFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/innerClassFromLib.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/innerClassFromLib.kt"); } @TestMetadata("iteratorWithTypeParameter.kt") public void testIteratorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/iteratorWithTypeParameter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/iteratorWithTypeParameter.kt"); } @TestMetadata("multiDeclarationWithTypeParameters.kt") public void testMultiDeclarationWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/multiDeclarationWithTypeParameters.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/multiDeclarationWithTypeParameters.kt"); } @TestMetadata("nestedClassFromLib.kt") public void testNestedClassFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/nestedClassFromLib.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/nestedClassFromLib.kt"); } @TestMetadata("overloadFun.kt") public void testOverloadFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/overloadFun.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/overloadFun.kt"); } @TestMetadata("overridingFunctionWithSamAdapter.kt") public void testOverridingFunctionWithSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/overridingFunctionWithSamAdapter.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/overridingFunctionWithSamAdapter.kt"); } @TestMetadata("packageOfLibDeclaration.kt") public void testPackageOfLibDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/packageOfLibDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/packageOfLibDeclaration.kt"); } @TestMetadata("referenceToRootJavaClassFromLib.kt") public void testReferenceToRootJavaClassFromLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/referenceToRootJavaClassFromLib.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/referenceToRootJavaClassFromLib.kt"); } @TestMetadata("sameNameInLib.kt") public void testSameNameInLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/sameNameInLib.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/sameNameInLib.kt"); } @TestMetadata("setWithTypeParameters.kt") public void testSetWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceWithLib/setWithTypeParameters.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceWithLib/setWithTypeParameters.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToCompiledKotlinResolveInJavaTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToCompiledKotlinResolveInJavaTestGenerated.java index 422e3c70cc4..9414f7dad7e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToCompiledKotlinResolveInJavaTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToCompiledKotlinResolveInJavaTestGenerated.java @@ -21,79 +21,71 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ReferenceToCompiledKotlinResolveInJavaTestGenerated extends AbstractReferenceToCompiledKotlinResolveInJavaTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryAndSource() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/referenceInJava/binaryAndSource"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Class.java") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Class.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Class.java"); } @TestMetadata("ClassObjectField.java") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/ClassObjectField.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/ClassObjectField.java"); } @TestMetadata("Constructor.java") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Constructor.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Constructor.java"); } @TestMetadata("EnumEntry.java") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/EnumEntry.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/EnumEntry.java"); } @TestMetadata("Field.java") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Field.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Field.java"); } @TestMetadata("FileFacade.java") public void testFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/FileFacade.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/FileFacade.java"); } @TestMetadata("Getter.java") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Getter.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Getter.java"); } @TestMetadata("Method.java") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/Method.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/Method.java"); } @TestMetadata("MethodOfDeeplyNested.java") public void testMethodOfDeeplyNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/MethodOfDeeplyNested.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/MethodOfDeeplyNested.java"); } @TestMetadata("MethodWithParameters.java") public void testMethodWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/MethodWithParameters.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/MethodWithParameters.java"); } @TestMetadata("ObjectInstance.java") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/ObjectInstance.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/ObjectInstance.java"); } @TestMetadata("PlatformStaticFun.java") public void testPlatformStaticFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceInJava/binaryAndSource/PlatformStaticFun.java"); - doTest(fileName); + runTest("idea/testData/resolve/referenceInJava/binaryAndSource/PlatformStaticFun.java"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToJavaWithWrongFileStructureTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToJavaWithWrongFileStructureTestGenerated.java index c5ca27a9fc0..50c7f2fc058 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToJavaWithWrongFileStructureTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/resolve/ReferenceToJavaWithWrongFileStructureTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ReferenceToJavaWithWrongFileStructureTestGenerated extends AbstractReferenceToJavaWithWrongFileStructureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReferenceToJavaWithWrongFileStructure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/resolve/referenceToJavaWithWrongFileStructure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("ClassStatics.kt") public void testClassStatics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceToJavaWithWrongFileStructure/ClassStatics.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceToJavaWithWrongFileStructure/ClassStatics.kt"); } @TestMetadata("SimpleClass.kt") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/resolve/referenceToJavaWithWrongFileStructure/SimpleClass.kt"); - doTest(fileName); + runTest("idea/testData/resolve/referenceToJavaWithWrongFileStructure/SimpleClass.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java index 96cc0046997..1e2dd1c9ca5 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/scratch/ScratchRunActionTestGenerated.java @@ -23,68 +23,62 @@ public class ScratchRunActionTestGenerated extends AbstractScratchRunActionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Compiling extends AbstractScratchRunActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doCompilingTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/scratch"), Pattern.compile("^(.+)\\.kts$"), TargetBackend.ANY, false); } @TestMetadata("for.kts") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/for.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/for.kts"); } @TestMetadata("generics.kts") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/generics.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/generics.kts"); } @TestMetadata("klass.kts") public void testKlass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/klass.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/klass.kts"); } @TestMetadata("simple.kts") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/simple.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/simple.kts"); } @TestMetadata("simpleFun.kts") public void testSimpleFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/simpleFun.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/simpleFun.kts"); } @TestMetadata("stdlibFun.kts") public void testStdlibFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/stdlibFun.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/stdlibFun.kts"); } @TestMetadata("unresolved.kts") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/unresolved.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/unresolved.kts"); } @TestMetadata("userOutput.kts") public void testUserOutput() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/userOutput.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/userOutput.kts"); } @TestMetadata("var.kts") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/var.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/var.kts"); } @TestMetadata("when.kts") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/when.kts"); - doCompilingTest(fileName); + runTest("idea/testData/scratch/when.kts"); } } @@ -92,68 +86,62 @@ public class ScratchRunActionTestGenerated extends AbstractScratchRunActionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Repl extends AbstractScratchRunActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doReplTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRepl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/scratch"), Pattern.compile("^(.+)\\.kts$"), TargetBackend.ANY, false); } @TestMetadata("for.kts") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/for.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/for.kts"); } @TestMetadata("generics.kts") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/generics.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/generics.kts"); } @TestMetadata("klass.kts") public void testKlass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/klass.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/klass.kts"); } @TestMetadata("simple.kts") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/simple.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/simple.kts"); } @TestMetadata("simpleFun.kts") public void testSimpleFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/simpleFun.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/simpleFun.kts"); } @TestMetadata("stdlibFun.kts") public void testStdlibFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/stdlibFun.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/stdlibFun.kts"); } @TestMetadata("unresolved.kts") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/unresolved.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/unresolved.kts"); } @TestMetadata("userOutput.kts") public void testUserOutput() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/userOutput.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/userOutput.kts"); } @TestMetadata("var.kts") public void testVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/var.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/var.kts"); } @TestMetadata("when.kts") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/when.kts"); - doReplTest(fileName); + runTest("idea/testData/scratch/when.kts"); } } @@ -161,20 +149,22 @@ public class ScratchRunActionTestGenerated extends AbstractScratchRunActionTest @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiFile extends AbstractScratchRunActionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doMultiFileTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/scratch/multiFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("inlineFun") public void testInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/multiFile/inlineFun/"); - doMultiFileTest(fileName); + runTest("idea/testData/scratch/multiFile/inlineFun/"); } @TestMetadata("javaDep") public void testJavaDep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/scratch/multiFile/javaDep/"); - doMultiFileTest(fileName); + runTest("idea/testData/scratch/multiFile/javaDep/"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationCompletionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationCompletionTestGenerated.java index 8a3ac132a63..4afe41afbf2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationCompletionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationCompletionTestGenerated.java @@ -21,19 +21,21 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ScriptConfigurationCompletionTestGenerated extends AbstractScriptConfigurationCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompletion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/script/definition/completion"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("conflictingModule") public void testConflictingModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/completion/conflictingModule/"); - doTest(fileName); + runTest("idea/testData/script/definition/completion/conflictingModule/"); } @TestMetadata("conflictingModuleJavaLib") public void testConflictingModuleJavaLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/completion/conflictingModuleJavaLib/"); - doTest(fileName); + runTest("idea/testData/script/definition/completion/conflictingModuleJavaLib/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationHighlightingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationHighlightingTestGenerated.java index 8dc36e13c01..7e9bd6415ce 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationHighlightingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationHighlightingTestGenerated.java @@ -21,16 +21,18 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ScriptConfigurationHighlightingTestGenerated extends AbstractScriptConfigurationHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("acceptedAnnotations") public void testAcceptedAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/acceptedAnnotations/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/acceptedAnnotations/"); } @TestMetadata("additionalImports") public void testAdditionalImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/additionalImports/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/additionalImports/"); } public void testAllFilesPresentInHighlighting() throws Exception { @@ -39,91 +41,76 @@ public class ScriptConfigurationHighlightingTestGenerated extends AbstractScript @TestMetadata("asyncResolver") public void testAsyncResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/asyncResolver/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/asyncResolver/"); } @TestMetadata("conflictingModule") public void testConflictingModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/conflictingModule/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/conflictingModule/"); } @TestMetadata("customBaseClass") public void testCustomBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/customBaseClass/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/customBaseClass/"); } @TestMetadata("customLibrary") public void testCustomLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/customLibrary/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/customLibrary/"); } @TestMetadata("doNotSpeakAboutJava") public void testDoNotSpeakAboutJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/doNotSpeakAboutJava/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/doNotSpeakAboutJava/"); } @TestMetadata("doNotSpeakAboutJavaLegacy") public void testDoNotSpeakAboutJavaLegacy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/doNotSpeakAboutJavaLegacy/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/doNotSpeakAboutJavaLegacy/"); } @TestMetadata("emptyAsyncResolver") public void testEmptyAsyncResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/emptyAsyncResolver/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/emptyAsyncResolver/"); } @TestMetadata("errorResolver") public void testErrorResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/errorResolver/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/errorResolver/"); } @TestMetadata("javaNestedClass") public void testJavaNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/javaNestedClass/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/javaNestedClass/"); } @TestMetadata("multiModule") public void testMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/multiModule/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/multiModule/"); } @TestMetadata("noResolver") public void testNoResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/noResolver/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/noResolver/"); } @TestMetadata("propertyAccessor") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/propertyAccessor/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/propertyAccessor/"); } @TestMetadata("propertyAccessorFromModule") public void testPropertyAccessorFromModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/propertyAccessorFromModule/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/propertyAccessorFromModule/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/simple/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/simple/"); } @TestMetadata("throwingResolver") public void testThrowingResolver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/highlighting/throwingResolver/"); - doTest(fileName); + runTest("idea/testData/script/definition/highlighting/throwingResolver/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationNavigationTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationNavigationTestGenerated.java index 9c2a5b5154c..624c6dfc151 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationNavigationTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/script/ScriptConfigurationNavigationTestGenerated.java @@ -21,55 +21,51 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ScriptConfigurationNavigationTestGenerated extends AbstractScriptConfigurationNavigationTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNavigation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/script/definition/navigation"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("conflictingModule") public void testConflictingModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/conflictingModule/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/conflictingModule/"); } @TestMetadata("customBaseClass") public void testCustomBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/customBaseClass/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/customBaseClass/"); } @TestMetadata("javaLib") public void testJavaLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/javaLib/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/javaLib/"); } @TestMetadata("javaLibWithSources") public void testJavaLibWithSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/javaLibWithSources/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/javaLibWithSources/"); } @TestMetadata("kotlinLib") public void testKotlinLib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/kotlinLib/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/kotlinLib/"); } @TestMetadata("kotlinLibWithSources") public void testKotlinLibWithSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/kotlinLibWithSources/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/kotlinLibWithSources/"); } @TestMetadata("stdlib") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/stdlib/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/stdlib/"); } @TestMetadata("stdlibWithSources") public void testStdlibWithSources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/script/definition/navigation/stdlibWithSources/"); - doTest(fileName); + runTest("idea/testData/script/definition/navigation/stdlibWithSources/"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerLeafGroupingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerLeafGroupingTestGenerated.java index 90781756c0a..b543b1b16d2 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerLeafGroupingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerLeafGroupingTestGenerated.java @@ -21,355 +21,301 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SlicerLeafGroupingTestGenerated extends AbstractSlicerLeafGroupingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInflow() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/slicer/inflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY); } @TestMetadata("anonymousFunBodyExpression.kt") public void testAnonymousFunBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/anonymousFunBodyExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/anonymousFunBodyExpression.kt"); } @TestMetadata("anonymousFunReturnExpression.kt") public void testAnonymousFunReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/anonymousFunReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/anonymousFunReturnExpression.kt"); } @TestMetadata("cast.kt") public void testCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/cast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/cast.kt"); } @TestMetadata("compositeAssignments.kt") public void testCompositeAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/compositeAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/compositeAssignments.kt"); } @TestMetadata("defaultGetterFieldInSetter.kt") public void testDefaultGetterFieldInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/defaultGetterFieldInSetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/defaultGetterFieldInSetter.kt"); } @TestMetadata("delegateGetter.kt") public void testDelegateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/delegateGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/delegateGetter.kt"); } @TestMetadata("delegateToJavaGetter.kt") public void testDelegateToJavaGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/delegateToJavaGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/delegateToJavaGetter.kt"); } @TestMetadata("diamondHierarchyJKMiddleClassFun.kt") public void testDiamondHierarchyJKMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKMiddleClassFun.kt"); } @TestMetadata("diamondHierarchyJKMiddleInterfaceFun.kt") public void testDiamondHierarchyJKMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKMiddleInterfaceFun.kt"); } @TestMetadata("diamondHierarchyJKRootInterfaceFun.kt") public void testDiamondHierarchyJKRootInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKRootInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKRootInterfaceFun.kt"); } @TestMetadata("diamondHierarchyMiddleClassFun.kt") public void testDiamondHierarchyMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyMiddleClassFun.kt"); } @TestMetadata("diamondHierarchyMiddleInterfaceFun.kt") public void testDiamondHierarchyMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyMiddleInterfaceFun.kt"); } @TestMetadata("diamondHierarchyRootInterfaceFun.kt") public void testDiamondHierarchyRootInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyRootInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyRootInterfaceFun.kt"); } @TestMetadata("doubleLambdaResult.kt") public void testDoubleLambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/doubleLambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/doubleLambdaResult.kt"); } @TestMetadata("funParamerer.kt") public void testFunParamerer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funParamerer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funParamerer.kt"); } @TestMetadata("funParamererWithDefault.kt") public void testFunParamererWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funParamererWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funParamererWithDefault.kt"); } @TestMetadata("funResultViaCallableRef.kt") public void testFunResultViaCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRef.kt"); } @TestMetadata("funResultViaCallableRefWithAssignment.kt") public void testFunResultViaCallableRefWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRefWithAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRefWithAssignment.kt"); } @TestMetadata("funResultViaCallableRefWithDirectCall.kt") public void testFunResultViaCallableRefWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRefWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRefWithDirectCall.kt"); } @TestMetadata("funWithExpressionBody.kt") public void testFunWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funWithExpressionBody.kt"); } @TestMetadata("funWithReturnExpressions.kt") public void testFunWithReturnExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funWithReturnExpressions.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funWithReturnExpressions.kt"); } @TestMetadata("getterAndSetterUsingField.kt") public void testGetterAndSetterUsingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterAndSetterUsingField.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterAndSetterUsingField.kt"); } @TestMetadata("getterExpressionBody.kt") public void testGetterExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterExpressionBody.kt"); } @TestMetadata("getterReturnExpression.kt") public void testGetterReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterReturnExpression.kt"); } @TestMetadata("ifExpression.kt") public void testIfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/ifExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/ifExpression.kt"); } @TestMetadata("lambdaResult.kt") public void testLambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResult.kt"); } @TestMetadata("lambdaResultWithAssignments.kt") public void testLambdaResultWithAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithAssignments.kt"); } @TestMetadata("lambdaResultWithDirectCall.kt") public void testLambdaResultWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithDirectCall.kt"); } @TestMetadata("lambdaResultWithDirectCallViaAssignment.kt") public void testLambdaResultWithDirectCallViaAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithDirectCallViaAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithDirectCallViaAssignment.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/localVal.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/localVar.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/localVar.kt"); } @TestMetadata("memberValWithInitializer.kt") public void testMemberValWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberValWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberValWithInitializer.kt"); } @TestMetadata("memberValWithSplitInitializer.kt") public void testMemberValWithSplitInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberValWithSplitInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberValWithSplitInitializer.kt"); } @TestMetadata("memberVarWithInitializer.kt") public void testMemberVarWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberVarWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberVarWithInitializer.kt"); } @TestMetadata("memberVarWithSplitInitializer.kt") public void testMemberVarWithSplitInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberVarWithSplitInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberVarWithSplitInitializer.kt"); } @TestMetadata("noFieldInGetter.kt") public void testNoFieldInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/noFieldInGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/noFieldInGetter.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/nonLocalReturn.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/nonLocalReturn.kt"); } @TestMetadata("notNullAssertion.kt") public void testNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/notNullAssertion.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/notNullAssertion.kt"); } @TestMetadata("nullsAndNotNulls.kt") public void testNullsAndNotNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/nullsAndNotNulls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/nullsAndNotNulls.kt"); } @TestMetadata("overridingFunctionResult.kt") public void testOverridingFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingFunctionResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingFunctionResult.kt"); } @TestMetadata("overridingParameter.kt") public void testOverridingParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingParameter.kt"); } @TestMetadata("overridingPropertyGetterResult.kt") public void testOverridingPropertyGetterResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingPropertyGetterResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingPropertyGetterResult.kt"); } @TestMetadata("overridingPropertyResult.kt") public void testOverridingPropertyResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingPropertyResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingPropertyResult.kt"); } @TestMetadata("primaryConstructorParameter.kt") public void testPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/primaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/primaryConstructorParameter.kt"); } @TestMetadata("primaryConstructorParameterWithDefault.kt") public void testPrimaryConstructorParameterWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/primaryConstructorParameterWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/primaryConstructorParameterWithDefault.kt"); } @TestMetadata("qualifiedAssignmentsForQualifiedRef.kt") public void testQualifiedAssignmentsForQualifiedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/qualifiedAssignmentsForQualifiedRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/qualifiedAssignmentsForQualifiedRef.kt"); } @TestMetadata("qualifiedAssignmentsForSimpleRef.kt") public void testQualifiedAssignmentsForSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/qualifiedAssignmentsForSimpleRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/qualifiedAssignmentsForSimpleRef.kt"); } @TestMetadata("safeCast.kt") public void testSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/safeCast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/safeCast.kt"); } @TestMetadata("secondaryConstructorParameter.kt") public void testSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/secondaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/secondaryConstructorParameter.kt"); } @TestMetadata("secondaryConstructorParameterWithDefault.kt") public void testSecondaryConstructorParameterWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/secondaryConstructorParameterWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/secondaryConstructorParameterWithDefault.kt"); } @TestMetadata("settersViaDelegateForQualifiedRef.kt") public void testSettersViaDelegateForQualifiedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaDelegateForQualifiedRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaDelegateForQualifiedRef.kt"); } @TestMetadata("settersViaDelegateForSimpleRef.kt") public void testSettersViaDelegateForSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaDelegateForSimpleRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaDelegateForSimpleRef.kt"); } @TestMetadata("settersViaJavaDelegate.kt") public void testSettersViaJavaDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaJavaDelegate.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaJavaDelegate.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/topLevelVar.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/topLevelVar.kt"); } @TestMetadata("valParameter.kt") public void testValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/valParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/valParameter.kt"); } @TestMetadata("varParameter.kt") public void testVarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/varParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/varParameter.kt"); } @TestMetadata("whenExpression.kt") public void testWhenExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/whenExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/whenExpression.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerNullnessGroupingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerNullnessGroupingTestGenerated.java index 6ee716bd43f..4f5bdf4db99 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerNullnessGroupingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerNullnessGroupingTestGenerated.java @@ -21,355 +21,301 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SlicerNullnessGroupingTestGenerated extends AbstractSlicerNullnessGroupingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInflow() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/slicer/inflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY); } @TestMetadata("anonymousFunBodyExpression.kt") public void testAnonymousFunBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/anonymousFunBodyExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/anonymousFunBodyExpression.kt"); } @TestMetadata("anonymousFunReturnExpression.kt") public void testAnonymousFunReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/anonymousFunReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/anonymousFunReturnExpression.kt"); } @TestMetadata("cast.kt") public void testCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/cast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/cast.kt"); } @TestMetadata("compositeAssignments.kt") public void testCompositeAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/compositeAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/compositeAssignments.kt"); } @TestMetadata("defaultGetterFieldInSetter.kt") public void testDefaultGetterFieldInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/defaultGetterFieldInSetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/defaultGetterFieldInSetter.kt"); } @TestMetadata("delegateGetter.kt") public void testDelegateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/delegateGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/delegateGetter.kt"); } @TestMetadata("delegateToJavaGetter.kt") public void testDelegateToJavaGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/delegateToJavaGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/delegateToJavaGetter.kt"); } @TestMetadata("diamondHierarchyJKMiddleClassFun.kt") public void testDiamondHierarchyJKMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKMiddleClassFun.kt"); } @TestMetadata("diamondHierarchyJKMiddleInterfaceFun.kt") public void testDiamondHierarchyJKMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKMiddleInterfaceFun.kt"); } @TestMetadata("diamondHierarchyJKRootInterfaceFun.kt") public void testDiamondHierarchyJKRootInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKRootInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKRootInterfaceFun.kt"); } @TestMetadata("diamondHierarchyMiddleClassFun.kt") public void testDiamondHierarchyMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyMiddleClassFun.kt"); } @TestMetadata("diamondHierarchyMiddleInterfaceFun.kt") public void testDiamondHierarchyMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyMiddleInterfaceFun.kt"); } @TestMetadata("diamondHierarchyRootInterfaceFun.kt") public void testDiamondHierarchyRootInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyRootInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyRootInterfaceFun.kt"); } @TestMetadata("doubleLambdaResult.kt") public void testDoubleLambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/doubleLambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/doubleLambdaResult.kt"); } @TestMetadata("funParamerer.kt") public void testFunParamerer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funParamerer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funParamerer.kt"); } @TestMetadata("funParamererWithDefault.kt") public void testFunParamererWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funParamererWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funParamererWithDefault.kt"); } @TestMetadata("funResultViaCallableRef.kt") public void testFunResultViaCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRef.kt"); } @TestMetadata("funResultViaCallableRefWithAssignment.kt") public void testFunResultViaCallableRefWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRefWithAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRefWithAssignment.kt"); } @TestMetadata("funResultViaCallableRefWithDirectCall.kt") public void testFunResultViaCallableRefWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRefWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRefWithDirectCall.kt"); } @TestMetadata("funWithExpressionBody.kt") public void testFunWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funWithExpressionBody.kt"); } @TestMetadata("funWithReturnExpressions.kt") public void testFunWithReturnExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funWithReturnExpressions.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funWithReturnExpressions.kt"); } @TestMetadata("getterAndSetterUsingField.kt") public void testGetterAndSetterUsingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterAndSetterUsingField.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterAndSetterUsingField.kt"); } @TestMetadata("getterExpressionBody.kt") public void testGetterExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterExpressionBody.kt"); } @TestMetadata("getterReturnExpression.kt") public void testGetterReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterReturnExpression.kt"); } @TestMetadata("ifExpression.kt") public void testIfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/ifExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/ifExpression.kt"); } @TestMetadata("lambdaResult.kt") public void testLambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResult.kt"); } @TestMetadata("lambdaResultWithAssignments.kt") public void testLambdaResultWithAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithAssignments.kt"); } @TestMetadata("lambdaResultWithDirectCall.kt") public void testLambdaResultWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithDirectCall.kt"); } @TestMetadata("lambdaResultWithDirectCallViaAssignment.kt") public void testLambdaResultWithDirectCallViaAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithDirectCallViaAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithDirectCallViaAssignment.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/localVal.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/localVar.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/localVar.kt"); } @TestMetadata("memberValWithInitializer.kt") public void testMemberValWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberValWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberValWithInitializer.kt"); } @TestMetadata("memberValWithSplitInitializer.kt") public void testMemberValWithSplitInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberValWithSplitInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberValWithSplitInitializer.kt"); } @TestMetadata("memberVarWithInitializer.kt") public void testMemberVarWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberVarWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberVarWithInitializer.kt"); } @TestMetadata("memberVarWithSplitInitializer.kt") public void testMemberVarWithSplitInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberVarWithSplitInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberVarWithSplitInitializer.kt"); } @TestMetadata("noFieldInGetter.kt") public void testNoFieldInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/noFieldInGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/noFieldInGetter.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/nonLocalReturn.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/nonLocalReturn.kt"); } @TestMetadata("notNullAssertion.kt") public void testNotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/notNullAssertion.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/notNullAssertion.kt"); } @TestMetadata("nullsAndNotNulls.kt") public void testNullsAndNotNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/nullsAndNotNulls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/nullsAndNotNulls.kt"); } @TestMetadata("overridingFunctionResult.kt") public void testOverridingFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingFunctionResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingFunctionResult.kt"); } @TestMetadata("overridingParameter.kt") public void testOverridingParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingParameter.kt"); } @TestMetadata("overridingPropertyGetterResult.kt") public void testOverridingPropertyGetterResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingPropertyGetterResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingPropertyGetterResult.kt"); } @TestMetadata("overridingPropertyResult.kt") public void testOverridingPropertyResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingPropertyResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingPropertyResult.kt"); } @TestMetadata("primaryConstructorParameter.kt") public void testPrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/primaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/primaryConstructorParameter.kt"); } @TestMetadata("primaryConstructorParameterWithDefault.kt") public void testPrimaryConstructorParameterWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/primaryConstructorParameterWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/primaryConstructorParameterWithDefault.kt"); } @TestMetadata("qualifiedAssignmentsForQualifiedRef.kt") public void testQualifiedAssignmentsForQualifiedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/qualifiedAssignmentsForQualifiedRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/qualifiedAssignmentsForQualifiedRef.kt"); } @TestMetadata("qualifiedAssignmentsForSimpleRef.kt") public void testQualifiedAssignmentsForSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/qualifiedAssignmentsForSimpleRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/qualifiedAssignmentsForSimpleRef.kt"); } @TestMetadata("safeCast.kt") public void testSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/safeCast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/safeCast.kt"); } @TestMetadata("secondaryConstructorParameter.kt") public void testSecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/secondaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/secondaryConstructorParameter.kt"); } @TestMetadata("secondaryConstructorParameterWithDefault.kt") public void testSecondaryConstructorParameterWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/secondaryConstructorParameterWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/secondaryConstructorParameterWithDefault.kt"); } @TestMetadata("settersViaDelegateForQualifiedRef.kt") public void testSettersViaDelegateForQualifiedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaDelegateForQualifiedRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaDelegateForQualifiedRef.kt"); } @TestMetadata("settersViaDelegateForSimpleRef.kt") public void testSettersViaDelegateForSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaDelegateForSimpleRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaDelegateForSimpleRef.kt"); } @TestMetadata("settersViaJavaDelegate.kt") public void testSettersViaJavaDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaJavaDelegate.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaJavaDelegate.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/topLevelVar.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/topLevelVar.kt"); } @TestMetadata("valParameter.kt") public void testValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/valParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/valParameter.kt"); } @TestMetadata("varParameter.kt") public void testVarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/varParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/varParameter.kt"); } @TestMetadata("whenExpression.kt") public void testWhenExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/whenExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/whenExpression.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerTreeTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerTreeTestGenerated.java index 1c52a6da87f..a3cb357d18e 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerTreeTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/slicer/SlicerTreeTestGenerated.java @@ -21,679 +21,571 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SlicerTreeTestGenerated extends AbstractSlicerTreeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSlicer() throws Exception { KotlinTestUtils.assertAllTestsPresentInSingleGeneratedClass(this.getClass(), new File("idea/testData/slicer"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY); } @TestMetadata("inflow/anonymousFunBodyExpression.kt") public void testInflow_AnonymousFunBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/anonymousFunBodyExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/anonymousFunBodyExpression.kt"); } @TestMetadata("inflow/anonymousFunReturnExpression.kt") public void testInflow_AnonymousFunReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/anonymousFunReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/anonymousFunReturnExpression.kt"); } @TestMetadata("inflow/cast.kt") public void testInflow_Cast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/cast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/cast.kt"); } @TestMetadata("inflow/compositeAssignments.kt") public void testInflow_CompositeAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/compositeAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/compositeAssignments.kt"); } @TestMetadata("inflow/defaultGetterFieldInSetter.kt") public void testInflow_DefaultGetterFieldInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/defaultGetterFieldInSetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/defaultGetterFieldInSetter.kt"); } @TestMetadata("inflow/delegateGetter.kt") public void testInflow_DelegateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/delegateGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/delegateGetter.kt"); } @TestMetadata("inflow/delegateToJavaGetter.kt") public void testInflow_DelegateToJavaGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/delegateToJavaGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/delegateToJavaGetter.kt"); } @TestMetadata("inflow/diamondHierarchyJKMiddleClassFun.kt") public void testInflow_DiamondHierarchyJKMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKMiddleClassFun.kt"); } @TestMetadata("inflow/diamondHierarchyJKMiddleInterfaceFun.kt") public void testInflow_DiamondHierarchyJKMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKMiddleInterfaceFun.kt"); } @TestMetadata("inflow/diamondHierarchyJKRootInterfaceFun.kt") public void testInflow_DiamondHierarchyJKRootInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyJKRootInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyJKRootInterfaceFun.kt"); } @TestMetadata("inflow/diamondHierarchyMiddleClassFun.kt") public void testInflow_DiamondHierarchyMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyMiddleClassFun.kt"); } @TestMetadata("inflow/diamondHierarchyMiddleInterfaceFun.kt") public void testInflow_DiamondHierarchyMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyMiddleInterfaceFun.kt"); } @TestMetadata("inflow/diamondHierarchyRootInterfaceFun.kt") public void testInflow_DiamondHierarchyRootInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/diamondHierarchyRootInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/diamondHierarchyRootInterfaceFun.kt"); } @TestMetadata("inflow/doubleLambdaResult.kt") public void testInflow_DoubleLambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/doubleLambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/doubleLambdaResult.kt"); } @TestMetadata("inflow/funParamerer.kt") public void testInflow_FunParamerer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funParamerer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funParamerer.kt"); } @TestMetadata("inflow/funParamererWithDefault.kt") public void testInflow_FunParamererWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funParamererWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funParamererWithDefault.kt"); } @TestMetadata("inflow/funResultViaCallableRef.kt") public void testInflow_FunResultViaCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRef.kt"); } @TestMetadata("inflow/funResultViaCallableRefWithAssignment.kt") public void testInflow_FunResultViaCallableRefWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRefWithAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRefWithAssignment.kt"); } @TestMetadata("inflow/funResultViaCallableRefWithDirectCall.kt") public void testInflow_FunResultViaCallableRefWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funResultViaCallableRefWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funResultViaCallableRefWithDirectCall.kt"); } @TestMetadata("inflow/funWithExpressionBody.kt") public void testInflow_FunWithExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funWithExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funWithExpressionBody.kt"); } @TestMetadata("inflow/funWithReturnExpressions.kt") public void testInflow_FunWithReturnExpressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/funWithReturnExpressions.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/funWithReturnExpressions.kt"); } @TestMetadata("inflow/getterAndSetterUsingField.kt") public void testInflow_GetterAndSetterUsingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterAndSetterUsingField.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterAndSetterUsingField.kt"); } @TestMetadata("inflow/getterExpressionBody.kt") public void testInflow_GetterExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterExpressionBody.kt"); } @TestMetadata("inflow/getterReturnExpression.kt") public void testInflow_GetterReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/getterReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/getterReturnExpression.kt"); } @TestMetadata("inflow/ifExpression.kt") public void testInflow_IfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/ifExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/ifExpression.kt"); } @TestMetadata("inflow/lambdaResult.kt") public void testInflow_LambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResult.kt"); } @TestMetadata("inflow/lambdaResultWithAssignments.kt") public void testInflow_LambdaResultWithAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithAssignments.kt"); } @TestMetadata("inflow/lambdaResultWithDirectCall.kt") public void testInflow_LambdaResultWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithDirectCall.kt"); } @TestMetadata("inflow/lambdaResultWithDirectCallViaAssignment.kt") public void testInflow_LambdaResultWithDirectCallViaAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/lambdaResultWithDirectCallViaAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/lambdaResultWithDirectCallViaAssignment.kt"); } @TestMetadata("inflow/localVal.kt") public void testInflow_LocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/localVal.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/localVal.kt"); } @TestMetadata("inflow/localVar.kt") public void testInflow_LocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/localVar.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/localVar.kt"); } @TestMetadata("inflow/memberValWithInitializer.kt") public void testInflow_MemberValWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberValWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberValWithInitializer.kt"); } @TestMetadata("inflow/memberValWithSplitInitializer.kt") public void testInflow_MemberValWithSplitInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberValWithSplitInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberValWithSplitInitializer.kt"); } @TestMetadata("inflow/memberVarWithInitializer.kt") public void testInflow_MemberVarWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberVarWithInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberVarWithInitializer.kt"); } @TestMetadata("inflow/memberVarWithSplitInitializer.kt") public void testInflow_MemberVarWithSplitInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/memberVarWithSplitInitializer.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/memberVarWithSplitInitializer.kt"); } @TestMetadata("inflow/noFieldInGetter.kt") public void testInflow_NoFieldInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/noFieldInGetter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/noFieldInGetter.kt"); } @TestMetadata("inflow/nonLocalReturn.kt") public void testInflow_NonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/nonLocalReturn.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/nonLocalReturn.kt"); } @TestMetadata("inflow/notNullAssertion.kt") public void testInflow_NotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/notNullAssertion.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/notNullAssertion.kt"); } @TestMetadata("inflow/nullsAndNotNulls.kt") public void testInflow_NullsAndNotNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/nullsAndNotNulls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/nullsAndNotNulls.kt"); } @TestMetadata("inflow/overridingFunctionResult.kt") public void testInflow_OverridingFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingFunctionResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingFunctionResult.kt"); } @TestMetadata("inflow/overridingParameter.kt") public void testInflow_OverridingParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingParameter.kt"); } @TestMetadata("inflow/overridingPropertyGetterResult.kt") public void testInflow_OverridingPropertyGetterResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingPropertyGetterResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingPropertyGetterResult.kt"); } @TestMetadata("inflow/overridingPropertyResult.kt") public void testInflow_OverridingPropertyResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/overridingPropertyResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/overridingPropertyResult.kt"); } @TestMetadata("inflow/primaryConstructorParameter.kt") public void testInflow_PrimaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/primaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/primaryConstructorParameter.kt"); } @TestMetadata("inflow/primaryConstructorParameterWithDefault.kt") public void testInflow_PrimaryConstructorParameterWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/primaryConstructorParameterWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/primaryConstructorParameterWithDefault.kt"); } @TestMetadata("inflow/qualifiedAssignmentsForQualifiedRef.kt") public void testInflow_QualifiedAssignmentsForQualifiedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/qualifiedAssignmentsForQualifiedRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/qualifiedAssignmentsForQualifiedRef.kt"); } @TestMetadata("inflow/qualifiedAssignmentsForSimpleRef.kt") public void testInflow_QualifiedAssignmentsForSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/qualifiedAssignmentsForSimpleRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/qualifiedAssignmentsForSimpleRef.kt"); } @TestMetadata("inflow/safeCast.kt") public void testInflow_SafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/safeCast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/safeCast.kt"); } @TestMetadata("inflow/secondaryConstructorParameter.kt") public void testInflow_SecondaryConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/secondaryConstructorParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/secondaryConstructorParameter.kt"); } @TestMetadata("inflow/secondaryConstructorParameterWithDefault.kt") public void testInflow_SecondaryConstructorParameterWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/secondaryConstructorParameterWithDefault.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/secondaryConstructorParameterWithDefault.kt"); } @TestMetadata("inflow/settersViaDelegateForQualifiedRef.kt") public void testInflow_SettersViaDelegateForQualifiedRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaDelegateForQualifiedRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaDelegateForQualifiedRef.kt"); } @TestMetadata("inflow/settersViaDelegateForSimpleRef.kt") public void testInflow_SettersViaDelegateForSimpleRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaDelegateForSimpleRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaDelegateForSimpleRef.kt"); } @TestMetadata("inflow/settersViaJavaDelegate.kt") public void testInflow_SettersViaJavaDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/settersViaJavaDelegate.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/settersViaJavaDelegate.kt"); } @TestMetadata("inflow/topLevelVal.kt") public void testInflow_TopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/topLevelVal.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/topLevelVal.kt"); } @TestMetadata("inflow/topLevelVar.kt") public void testInflow_TopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/topLevelVar.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/topLevelVar.kt"); } @TestMetadata("inflow/valParameter.kt") public void testInflow_ValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/valParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/valParameter.kt"); } @TestMetadata("inflow/varParameter.kt") public void testInflow_VarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/varParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/varParameter.kt"); } @TestMetadata("inflow/whenExpression.kt") public void testInflow_WhenExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/inflow/whenExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/inflow/whenExpression.kt"); } @TestMetadata("outflow/anonymousFunBodyExpression.kt") public void testOutflow_AnonymousFunBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/anonymousFunBodyExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/anonymousFunBodyExpression.kt"); } @TestMetadata("outflow/anonymousFunReturnExpression.kt") public void testOutflow_AnonymousFunReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/anonymousFunReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/anonymousFunReturnExpression.kt"); } @TestMetadata("outflow/callArgument.kt") public void testOutflow_CallArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/callArgument.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/callArgument.kt"); } @TestMetadata("outflow/callArgumentKJK.kt") public void testOutflow_CallArgumentKJK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/callArgumentKJK.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/callArgumentKJK.kt"); } @TestMetadata("outflow/cast.kt") public void testOutflow_Cast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/cast.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/cast.kt"); } @TestMetadata("outflow/defaultExplicitPrimaryConstructorCalls.kt") public void testOutflow_DefaultExplicitPrimaryConstructorCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/defaultExplicitPrimaryConstructorCalls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/defaultExplicitPrimaryConstructorCalls.kt"); } @TestMetadata("outflow/diamondHierarchyJKLeafClassFun.kt") public void testOutflow_DiamondHierarchyJKLeafClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/diamondHierarchyJKLeafClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/diamondHierarchyJKLeafClassFun.kt"); } @TestMetadata("outflow/diamondHierarchyJKMiddleClassFun.kt") public void testOutflow_DiamondHierarchyJKMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/diamondHierarchyJKMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/diamondHierarchyJKMiddleClassFun.kt"); } @TestMetadata("outflow/diamondHierarchyJKMiddleInterfaceFun.kt") public void testOutflow_DiamondHierarchyJKMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/diamondHierarchyJKMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/diamondHierarchyJKMiddleInterfaceFun.kt"); } @TestMetadata("outflow/diamondHierarchyLeafClassFun.kt") public void testOutflow_DiamondHierarchyLeafClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/diamondHierarchyLeafClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/diamondHierarchyLeafClassFun.kt"); } @TestMetadata("outflow/diamondHierarchyMiddleClassFun.kt") public void testOutflow_DiamondHierarchyMiddleClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/diamondHierarchyMiddleClassFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/diamondHierarchyMiddleClassFun.kt"); } @TestMetadata("outflow/diamondHierarchyMiddleInterfaceFun.kt") public void testOutflow_DiamondHierarchyMiddleInterfaceFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/diamondHierarchyMiddleInterfaceFun.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/diamondHierarchyMiddleInterfaceFun.kt"); } @TestMetadata("outflow/doubleLambdaResult.kt") public void testOutflow_DoubleLambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/doubleLambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/doubleLambdaResult.kt"); } @TestMetadata("outflow/explicitLambdaReturnExpression.kt") public void testOutflow_ExplicitLambdaReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/explicitLambdaReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/explicitLambdaReturnExpression.kt"); } @TestMetadata("outflow/extensionIndexingDereferences.kt") public void testOutflow_ExtensionIndexingDereferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/extensionIndexingDereferences.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/extensionIndexingDereferences.kt"); } @TestMetadata("outflow/forVariable.kt") public void testOutflow_ForVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/forVariable.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/forVariable.kt"); } @TestMetadata("outflow/funBodyExpression.kt") public void testOutflow_FunBodyExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/funBodyExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/funBodyExpression.kt"); } @TestMetadata("outflow/functionCalls.kt") public void testOutflow_FunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/functionCalls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/functionCalls.kt"); } @TestMetadata("outflow/funParameterUsages.kt") public void testOutflow_FunParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/funParameterUsages.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/funParameterUsages.kt"); } @TestMetadata("outflow/funResultViaCallableRef.kt") public void testOutflow_FunResultViaCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/funResultViaCallableRef.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/funResultViaCallableRef.kt"); } @TestMetadata("outflow/funResultViaCallableRefWithAssignment.kt") public void testOutflow_FunResultViaCallableRefWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/funResultViaCallableRefWithAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/funResultViaCallableRefWithAssignment.kt"); } @TestMetadata("outflow/funResultViaCallableRefWithDirectCall.kt") public void testOutflow_FunResultViaCallableRefWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/funResultViaCallableRefWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/funResultViaCallableRefWithDirectCall.kt"); } @TestMetadata("outflow/funReturnExpression.kt") public void testOutflow_FunReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/funReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/funReturnExpression.kt"); } @TestMetadata("outflow/getFunCalls.kt") public void testOutflow_GetFunCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/getFunCalls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/getFunCalls.kt"); } @TestMetadata("outflow/getterExpressionBody.kt") public void testOutflow_GetterExpressionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/getterExpressionBody.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/getterExpressionBody.kt"); } @TestMetadata("outflow/getterReturnExpression.kt") public void testOutflow_GetterReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/getterReturnExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/getterReturnExpression.kt"); } @TestMetadata("outflow/ifExpression.kt") public void testOutflow_IfExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/ifExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/ifExpression.kt"); } @TestMetadata("outflow/indexingDereferences.kt") public void testOutflow_IndexingDereferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/indexingDereferences.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/indexingDereferences.kt"); } @TestMetadata("outflow/jvmFieldMemberPropertyJavaUsages.kt") public void testOutflow_JvmFieldMemberPropertyJavaUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/jvmFieldMemberPropertyJavaUsages.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/jvmFieldMemberPropertyJavaUsages.kt"); } @TestMetadata("outflow/lambdaResult.kt") public void testOutflow_LambdaResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/lambdaResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/lambdaResult.kt"); } @TestMetadata("outflow/lambdaResultWithAssignments.kt") public void testOutflow_LambdaResultWithAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/lambdaResultWithAssignments.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/lambdaResultWithAssignments.kt"); } @TestMetadata("outflow/lambdaResultWithDirectCall.kt") public void testOutflow_LambdaResultWithDirectCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/lambdaResultWithDirectCall.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/lambdaResultWithDirectCall.kt"); } @TestMetadata("outflow/lambdaResultWithDirectCallViaAssignment.kt") public void testOutflow_LambdaResultWithDirectCallViaAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/lambdaResultWithDirectCallViaAssignment.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/lambdaResultWithDirectCallViaAssignment.kt"); } @TestMetadata("outflow/localVariableUsages.kt") public void testOutflow_LocalVariableUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/localVariableUsages.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/localVariableUsages.kt"); } @TestMetadata("outflow/memberPropertyUsages.kt") public void testOutflow_MemberPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/memberPropertyUsages.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/memberPropertyUsages.kt"); } @TestMetadata("outflow/nonLocalReturn.kt") public void testOutflow_NonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/nonLocalReturn.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/nonLocalReturn.kt"); } @TestMetadata("outflow/notNullAssertion.kt") public void testOutflow_NotNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/notNullAssertion.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/notNullAssertion.kt"); } @TestMetadata("outflow/operatorCallDereferences.kt") public void testOutflow_OperatorCallDereferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/operatorCallDereferences.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/operatorCallDereferences.kt"); } @TestMetadata("outflow/operatorFunCalls.kt") public void testOutflow_OperatorFunCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/operatorFunCalls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/operatorFunCalls.kt"); } @TestMetadata("outflow/overridingFunctionResult.kt") public void testOutflow_OverridingFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/overridingFunctionResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/overridingFunctionResult.kt"); } @TestMetadata("outflow/overridingFunctionResultWithJava.kt") public void testOutflow_OverridingFunctionResultWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/overridingFunctionResultWithJava.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/overridingFunctionResultWithJava.kt"); } @TestMetadata("outflow/overridingParameter.kt") public void testOutflow_OverridingParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/overridingParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/overridingParameter.kt"); } @TestMetadata("outflow/overridingPropertyGetterResult.kt") public void testOutflow_OverridingPropertyGetterResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/overridingPropertyGetterResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/overridingPropertyGetterResult.kt"); } @TestMetadata("outflow/overridingPropertyResult.kt") public void testOutflow_OverridingPropertyResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/overridingPropertyResult.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/overridingPropertyResult.kt"); } @TestMetadata("outflow/primaryConstructorCalls.kt") public void testOutflow_PrimaryConstructorCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/primaryConstructorCalls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/primaryConstructorCalls.kt"); } @TestMetadata("outflow/primaryConstructorParameterUsages.kt") public void testOutflow_PrimaryConstructorParameterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/primaryConstructorParameterUsages.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/primaryConstructorParameterUsages.kt"); } @TestMetadata("outflow/secondaryConstructorCalls.kt") public void testOutflow_SecondaryConstructorCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/secondaryConstructorCalls.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/secondaryConstructorCalls.kt"); } @TestMetadata("outflow/simpleCallDereferences.kt") public void testOutflow_SimpleCallDereferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/simpleCallDereferences.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/simpleCallDereferences.kt"); } @TestMetadata("outflow/topLevelPropertyUsages.kt") public void testOutflow_TopLevelPropertyUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/topLevelPropertyUsages.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/topLevelPropertyUsages.kt"); } @TestMetadata("outflow/usagesInLoopRange.kt") public void testOutflow_UsagesInLoopRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/usagesInLoopRange.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/usagesInLoopRange.kt"); } @TestMetadata("outflow/usagesInTemplates.kt") public void testOutflow_UsagesInTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/usagesInTemplates.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/usagesInTemplates.kt"); } @TestMetadata("outflow/valParameter.kt") public void testOutflow_ValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/valParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/valParameter.kt"); } @TestMetadata("outflow/varParameter.kt") public void testOutflow_VarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/varParameter.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/varParameter.kt"); } @TestMetadata("outflow/whenExpression.kt") public void testOutflow_WhenExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/slicer/outflow/whenExpression.kt"); - doTest(fileName); + runTest("idea/testData/slicer/outflow/whenExpression.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/structureView/KotlinFileStructureTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/structureView/KotlinFileStructureTestGenerated.java index e41cec3fd1c..d77feb260fc 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/structureView/KotlinFileStructureTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/structureView/KotlinFileStructureTestGenerated.java @@ -21,115 +21,101 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinFileStructureTestGenerated extends AbstractKotlinFileStructureTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFileStructure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/structureView/fileStructure"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObjectMembers.kt") public void testAnonymousObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/AnonymousObjectMembers.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/AnonymousObjectMembers.kt"); } @TestMetadata("CheckLocationForKotlin.kt") public void testCheckLocationForKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/CheckLocationForKotlin.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/CheckLocationForKotlin.kt"); } @TestMetadata("CheckMemberLocationForJava.kt") public void testCheckMemberLocationForJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/CheckMemberLocationForJava.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/CheckMemberLocationForJava.kt"); } @TestMetadata("DoNotShowParentsInLocationJava.kt") public void testDoNotShowParentsInLocationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/DoNotShowParentsInLocationJava.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/DoNotShowParentsInLocationJava.kt"); } @TestMetadata("EmptyFile.kt") public void testEmptyFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/EmptyFile.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/EmptyFile.kt"); } @TestMetadata("InheritedDelegationMethods.kt") public void testInheritedDelegationMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedDelegationMethods.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedDelegationMethods.kt"); } @TestMetadata("InheritedInnerClasses.kt") public void testInheritedInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedInnerClasses.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedInnerClasses.kt"); } @TestMetadata("InheritedJavaMembers.kt") public void testInheritedJavaMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedJavaMembers.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedJavaMembers.kt"); } @TestMetadata("InheritedLocalKotlin.kt") public void testInheritedLocalKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedLocalKotlin.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedLocalKotlin.kt"); } @TestMetadata("InheritedMembers.kt") public void testInheritedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedMembers.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedMembers.kt"); } @TestMetadata("InheritedMembersOfEnum.kt") public void testInheritedMembersOfEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedMembersOfEnum.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedMembersOfEnum.kt"); } @TestMetadata("InheritedMembersWithSubstitutedTypes.kt") public void testInheritedMembersWithSubstitutedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedMembersWithSubstitutedTypes.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedMembersWithSubstitutedTypes.kt"); } @TestMetadata("InheritedSAMConversion.kt") public void testInheritedSAMConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedSAMConversion.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedSAMConversion.kt"); } @TestMetadata("InheritedSynthesizedFromDataClass.kt") public void testInheritedSynthesizedFromDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/InheritedSynthesizedFromDataClass.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/InheritedSynthesizedFromDataClass.kt"); } @TestMetadata("LocalElements.kt") public void testLocalElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/LocalElements.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/LocalElements.kt"); } @TestMetadata("Render.kt") public void testRender() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/Render.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/Render.kt"); } @TestMetadata("SeveralClasses.kt") public void testSeveralClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/SeveralClasses.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/SeveralClasses.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/structureView/fileStructure/Simple.kt"); - doTest(fileName); + runTest("idea/testData/structureView/fileStructure/Simple.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/stubs/MultiFileHighlightingTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/stubs/MultiFileHighlightingTestGenerated.java index bcb0034630c..780dc3b2095 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/stubs/MultiFileHighlightingTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/stubs/MultiFileHighlightingTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class MultiFileHighlightingTestGenerated extends AbstractMultiFileHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiFileHighlighting() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/multiFileHighlighting"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, false); } @TestMetadata("annotatedParameter.kt") public void testAnnotatedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/annotatedParameter.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/annotatedParameter.kt"); } @TestMetadata("copyResolveBeforeParams.kt") public void testCopyResolveBeforeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/copyResolveBeforeParams.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/copyResolveBeforeParams.kt"); } @TestMetadata("delegatesReference.kt") public void testDelegatesReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/delegatesReference.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/delegatesReference.kt"); } @TestMetadata("enumReference.kt") public void testEnumReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/enumReference.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/enumReference.kt"); } @TestMetadata("missingDependencyClass.kt") public void testMissingDependencyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/missingDependencyClass.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/missingDependencyClass.kt"); } @TestMetadata("referencesFunWithUnspecifiedType.kt") public void testReferencesFunWithUnspecifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/referencesFunWithUnspecifiedType.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/referencesFunWithUnspecifiedType.kt"); } @TestMetadata("topLevelMembersReference.kt") public void testTopLevelMembersReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/multiFileHighlighting/topLevelMembersReference.kt"); - doTest(fileName); + runTest("idea/testData/multiFileHighlighting/topLevelMembersReference.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/stubs/ResolveByStubTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/stubs/ResolveByStubTestGenerated.java index d3cce1fefe3..55369efb542 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/stubs/ResolveByStubTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/stubs/ResolveByStubTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompiledKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,118 +33,109 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotatedAnnotation.kt") public void testAnnotatedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedAnnotation.kt"); } @TestMetadata("AnnotatedMethod.kt") public void testAnnotatedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotatedMethod.kt"); } @TestMetadata("AnnotationInAnnotationArguments.kt") public void testAnnotationInAnnotationArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt"); } @TestMetadata("EnumArgumentWithCustomToString.kt") public void testEnumArgumentWithCustomToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/EnumArgumentWithCustomToString.kt"); } @TestMetadata("MultiDimensionalArrayMethod.kt") public void testMultiDimensionalArrayMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/MultiDimensionalArrayMethod.kt"); } @TestMetadata("PrimitiveArrayArguments.kt") public void testPrimitiveArrayArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/PrimitiveArrayArguments.kt"); } @TestMetadata("SimpleAnnotation.kt") public void testSimpleAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/SimpleAnnotation.kt"); } @TestMetadata("TargetedAnnotation.kt") public void testTargetedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/TargetedAnnotation.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembers extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectPropertyField.kt") public void testClassObjectPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/ClassObjectPropertyField.kt"); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Constructor.kt"); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumArgument.kt"); } @TestMetadata("EnumEntry.kt") public void testEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/EnumEntry.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classMembers/Setter.kt"); } } @@ -148,98 +143,87 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationInClassObject.kt") public void testAnnotationInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/AnnotationInClassObject.kt"); } @TestMetadata("ClassInClassObject.kt") public void testClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassInClassObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObject.kt"); } @TestMetadata("ClassObjectInStaticNestedClass.kt") public void testClassObjectInStaticNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/ClassObjectInStaticNestedClass.kt"); } @TestMetadata("DataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DataClass.kt"); } @TestMetadata("Deprecated.kt") public void testDeprecated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Deprecated.kt"); } @TestMetadata("DollarsInAnnotationName.kt") public void testDollarsInAnnotationName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/DollarsInAnnotationName.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/EnumArgument.kt"); } @TestMetadata("MultipleAnnotations.kt") public void testMultipleAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/MultipleAnnotations.kt"); } @TestMetadata("NestedAnnotation.kt") public void testNestedAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedAnnotation.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/NestedClass.kt"); } @TestMetadata("Retention.kt") public void testRetention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Retention.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/Simple.kt"); } @TestMetadata("WithArgument.kt") public void testWithArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithArgument.kt"); } @TestMetadata("WithMultipleArguments.kt") public void testWithMultipleArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/classes/WithMultipleArguments.kt"); } } @@ -247,56 +231,52 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/DelegatedProperty.kt"); } @TestMetadata("EnumArgument.kt") public void testEnumArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArgument.kt"); } @TestMetadata("EnumArrayArgument.kt") public void testEnumArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/EnumArrayArgument.kt"); } @TestMetadata("Function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Function.kt"); } @TestMetadata("Getter.kt") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Getter.kt"); } @TestMetadata("PropertyField.kt") public void testPropertyField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/PropertyField.kt"); } @TestMetadata("Setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/Setter.kt"); } @TestMetadata("StringArrayArgument.kt") public void testStringArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/packageMembers/StringArrayArgument.kt"); } } @@ -304,80 +284,72 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/Constructor.kt"); } @TestMetadata("EnumConstructor.kt") public void testEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/EnumConstructor.kt"); } @TestMetadata("ExtensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunction.kt"); } @TestMetadata("ExtensionFunctionInClass.kt") public void testExtensionFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionFunctionInClass.kt"); } @TestMetadata("ExtensionPropertySetter.kt") public void testExtensionPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ExtensionPropertySetter.kt"); } @TestMetadata("FunctionInClass.kt") public void testFunctionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInClass.kt"); } @TestMetadata("FunctionInTrait.kt") public void testFunctionInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/FunctionInTrait.kt"); } @TestMetadata("InnerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/InnerClassConstructor.kt"); } @TestMetadata("ManyAnnotations.kt") public void testManyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/ManyAnnotations.kt"); } @TestMetadata("PropertySetterInClass.kt") public void testPropertySetterInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/PropertySetterInClass.kt"); } @TestMetadata("TopLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelFunction.kt"); } @TestMetadata("TopLevelPropertySetter.kt") public void testTopLevelPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/parameters/TopLevelPropertySetter.kt"); } } @@ -385,56 +357,52 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertiesWithoutBackingFields extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertiesWithoutBackingFields() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Class.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ClassObject.kt"); } @TestMetadata("ExtensionsWithSameNameClass.kt") public void testExtensionsWithSameNameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNameClass.kt"); } @TestMetadata("ExtensionsWithSameNamePackage.kt") public void testExtensionsWithSameNamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/ExtensionsWithSameNamePackage.kt"); } @TestMetadata("NestedTrait.kt") public void testNestedTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/NestedTrait.kt"); } @TestMetadata("TopLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TopLevel.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/Trait.kt"); } @TestMetadata("TraitClassObject.kt") public void testTraitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/propertiesWithoutBackingFields/TraitClassObject.kt"); } } @@ -442,56 +410,52 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassLiteralArgument.kt") public void testClassLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ClassLiteralArgument.kt"); } @TestMetadata("ReceiverParameter.kt") public void testReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/ReceiverParameter.kt"); } @TestMetadata("SimpleTypeAnnotation.kt") public void testSimpleTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SimpleTypeAnnotation.kt"); } @TestMetadata("SupertypesAndBounds.kt") public void testSupertypesAndBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/SupertypesAndBounds.kt"); } @TestMetadata("TypeAnnotationWithArguments.kt") public void testTypeAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeAnnotationWithArguments.kt"); } @TestMetadata("TypeArgument.kt") public void testTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeArgument.kt"); } @TestMetadata("TypeParameterAnnotation.kt") public void testTypeParameterAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotation.kt"); } @TestMetadata("TypeParameterAnnotationWithArguments.kt") public void testTypeParameterAnnotationWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/types/TypeParameterAnnotationWithArguments.kt"); } } @@ -499,26 +463,27 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithUseSiteTarget extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithUseSiteTarget() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DelegateTarget.kt") public void testDelegateTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/DelegateTarget.kt"); } @TestMetadata("FieldTarget.kt") public void testFieldTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/FieldTarget.kt"); } @TestMetadata("ReceiverTarget.kt") public void testReceiverTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/annotations/withUseSiteTarget/ReceiverTarget.kt"); } } } @@ -527,262 +492,229 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Class.kt"); } @TestMetadata("ClassInParam.kt") public void testClassInParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInParam.kt"); } @TestMetadata("ClassInnerClass.kt") public void testClassInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassInnerClass.kt"); } @TestMetadata("ClassMemberConflict.kt") public void testClassMemberConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassMemberConflict.kt"); } @TestMetadata("ClassOutParam.kt") public void testClassOutParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassOutParam.kt"); } @TestMetadata("ClassParam.kt") public void testClassParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParam.kt"); } @TestMetadata("ClassParamReferencesParam.kt") public void testClassParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam.kt"); } @TestMetadata("ClassParamReferencesParam2.kt") public void testClassParamReferencesParam2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesParam2.kt"); } @TestMetadata("ClassParamReferencesSelf.kt") public void testClassParamReferencesSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamReferencesSelf.kt"); } @TestMetadata("ClassParamUpperClassBound.kt") public void testClassParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassBound.kt"); } @TestMetadata("ClassParamUpperClassInterfaceBound.kt") public void testClassParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperClassInterfaceBound.kt"); } @TestMetadata("ClassParamUpperInterfaceBound.kt") public void testClassParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassParamUpperInterfaceBound.kt"); } @TestMetadata("ClassTwoParams.kt") public void testClassTwoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams.kt"); } @TestMetadata("ClassTwoParams2.kt") public void testClassTwoParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/ClassTwoParams2.kt"); } @TestMetadata("EnumWithGenericConstructorParameter.kt") public void testEnumWithGenericConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithGenericConstructorParameter.kt"); } @TestMetadata("EnumWithPrimitiveConstructorParameter.kt") public void testEnumWithPrimitiveConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/EnumWithPrimitiveConstructorParameter.kt"); } @TestMetadata("InheritClassSimple.kt") public void testInheritClassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassSimple.kt"); } @TestMetadata("InheritClassWithParam.kt") public void testInheritClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritClassWithParam.kt"); } @TestMetadata("InheritSubstitutedMethod.kt") public void testInheritSubstitutedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritSubstitutedMethod.kt"); } @TestMetadata("InheritTraitWithFunctionParam.kt") public void testInheritTraitWithFunctionParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithFunctionParam.kt"); } @TestMetadata("InheritTraitWithParam.kt") public void testInheritTraitWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InheritTraitWithParam.kt"); } @TestMetadata("InnerClassExtendInnerClass.kt") public void testInnerClassExtendInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerClassExtendInnerClass.kt"); } @TestMetadata("InnerGenericClass.kt") public void testInnerGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerGenericClass.kt"); } @TestMetadata("InnerTypes.kt") public void testInnerTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/InnerTypes.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObject.kt"); } @TestMetadata("NamedObjectInClass.kt") public void testNamedObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClass.kt"); } @TestMetadata("NamedObjectInClassObject.kt") public void testNamedObjectInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInClassObject.kt"); } @TestMetadata("NamedObjectInNamedObject.kt") public void testNamedObjectInNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectInNamedObject.kt"); } @TestMetadata("NamedObjectWithAnotherTopLevelProperty.kt") public void testNamedObjectWithAnotherTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NamedObjectWithAnotherTopLevelProperty.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClass.kt"); } @TestMetadata("NestedClassExtendNestedClass.kt") public void testNestedClassExtendNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedClassExtendNestedClass.kt"); } @TestMetadata("NestedGenericClass.kt") public void testNestedGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/NestedGenericClass.kt"); } @TestMetadata("RecursiveGeneric.kt") public void testRecursiveGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/RecursiveGeneric.kt"); } @TestMetadata("SingleAbstractMethod.kt") public void testSingleAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/SingleAbstractMethod.kt"); } @TestMetadata("Trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/Trait.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaBean extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaBean() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/class/javaBean"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("DifferentGetterAndSetter.kt") public void testDifferentGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/DifferentGetterAndSetter.kt"); } @TestMetadata("JavaBeanAbstractGetter.kt") public void testJavaBeanAbstractGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanAbstractGetter.kt"); } @TestMetadata("JavaBeanVal.kt") public void testJavaBeanVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVal.kt"); } @TestMetadata("JavaBeanVar.kt") public void testJavaBeanVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVar.kt"); } @TestMetadata("JavaBeanVarOfGenericType.kt") public void testJavaBeanVarOfGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/JavaBeanVarOfGenericType.kt"); } @TestMetadata("TwoSetters.kt") public void testTwoSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/class/javaBean/TwoSetters.kt"); } } } @@ -791,38 +723,37 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassFun extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classFun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassInParamUsedInFun.kt") public void testClassInParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassInParamUsedInFun.kt"); } @TestMetadata("ClassParamUsedInFun.kt") public void testClassParamUsedInFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/ClassParamUsedInFun.kt"); } @TestMetadata("FunDelegationToTraitImpl.kt") public void testFunDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunDelegationToTraitImpl.kt"); } @TestMetadata("FunInParamSuper.kt") public void testFunInParamSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/FunInParamSuper.kt"); } @TestMetadata("TraitOpenFun.kt") public void testTraitOpenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classFun/TraitOpenFun.kt"); } } @@ -830,86 +761,77 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/classObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectDeclaresVal.kt") public void testClassObjectDeclaresVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVal.kt"); } @TestMetadata("ClassObjectDeclaresVar.kt") public void testClassObjectDeclaresVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDeclaresVar.kt"); } @TestMetadata("ClassObjectDefaultVisibility.kt") public void testClassObjectDefaultVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectDefaultVisibility.kt"); } @TestMetadata("ClassObjectExplicitVisibility.kt") public void testClassObjectExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExplicitVisibility.kt"); } @TestMetadata("ClassObjectExtendsTrait.kt") public void testClassObjectExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTrait.kt"); } @TestMetadata("ClassObjectExtendsTraitWithTP.kt") public void testClassObjectExtendsTraitWithTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectExtendsTraitWithTP.kt"); } @TestMetadata("classObjectInClassStaticFields.kt") public void testClassObjectInClassStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInClassStaticFields.kt"); } @TestMetadata("classObjectInTraitStaticFields.kt") public void testClassObjectInTraitStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/classObjectInTraitStaticFields.kt"); } @TestMetadata("ClassObjectPropertyInClass.kt") public void testClassObjectPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/ClassObjectPropertyInClass.kt"); } @TestMetadata("Delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/Delegation.kt"); } @TestMetadata("InnerClassInClassObject.kt") public void testInnerClassInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/InnerClassInClassObject.kt"); } @TestMetadata("NamedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/NamedClassObject.kt"); } @TestMetadata("SimpleClassObject.kt") public void testSimpleClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/classObject/SimpleClassObject.kt"); } } @@ -917,124 +839,114 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Constructor0.kt") public void testConstructor0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor0.kt"); } @TestMetadata("Constructor1.kt") public void testConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1.kt"); } @TestMetadata("Constructor1WithParamDefaultValue.kt") public void testConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor1WithParamDefaultValue.kt"); } @TestMetadata("Constructor2WithOneParamDefaultValue.kt") public void testConstructor2WithOneParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/Constructor2WithOneParamDefaultValue.kt"); } @TestMetadata("ConstructorCollectionParameter.kt") public void testConstructorCollectionParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorCollectionParameter.kt"); } @TestMetadata("ConstructorGenericDeep.kt") public void testConstructorGenericDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericDeep.kt"); } @TestMetadata("ConstructorGenericSimple.kt") public void testConstructorGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericSimple.kt"); } @TestMetadata("ConstructorGenericUpperBound.kt") public void testConstructorGenericUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorGenericUpperBound.kt"); } @TestMetadata("ConstructorWithTwoDefArgs.kt") public void testConstructorWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoDefArgs.kt"); } @TestMetadata("ConstructorWithTwoTypeParameters.kt") public void testConstructorWithTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParameters.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOneIntValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.kt"); } @TestMetadata("ConstructorWithTwoTypeParametersAndOnePValueParameter.kt") public void testConstructorWithTwoTypeParametersAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.kt"); } @TestMetadata("ConstructorWithTypeParameter.kt") public void testConstructorWithTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParameter.kt"); } @TestMetadata("ConstructorWithTypeParametersEAndOnePValueParameter.kt") public void testConstructorWithTypeParametersEAndOnePValueParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.kt"); } @TestMetadata("InnerClassConstructorWithDefArgs.kt") public void testInnerClassConstructorWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/InnerClassConstructorWithDefArgs.kt"); } @TestMetadata("PrivateConstructor1WithParamDefaultValue.kt") public void testPrivateConstructor1WithParamDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/PrivateConstructor1WithParamDefaultValue.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/constructor/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ConstructorNonLastVararg.kt") public void testConstructorNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorNonLastVararg.kt"); } @TestMetadata("ConstructorVararg.kt") public void testConstructorVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/constructor/vararg/ConstructorVararg.kt"); } } } @@ -1043,14 +955,17 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/coroutines"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/coroutines/Basic.kt"); } } @@ -1058,32 +973,32 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/dataClass"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("MixedComponents.kt") public void testMixedComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/MixedComponents.kt"); } @TestMetadata("OneVal.kt") public void testOneVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/OneVal.kt"); } @TestMetadata("TwoVals.kt") public void testTwoVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVals.kt"); } @TestMetadata("TwoVars.kt") public void testTwoVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/dataClass/TwoVars.kt"); } } @@ -1091,44 +1006,42 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("enumVisibility.kt") public void testEnumVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumVisibility.kt"); } @TestMetadata("enumWithConstuctor.kt") public void testEnumWithConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithConstuctor.kt"); } @TestMetadata("enumWithInnerClasses.kt") public void testEnumWithInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/enumWithInnerClasses.kt"); } @TestMetadata("innerEnum.kt") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnum.kt"); } @TestMetadata("innerEnumExistingClassObject.kt") public void testInnerEnumExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/innerEnumExistingClassObject.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/enum/simpleEnum.kt"); } } @@ -1136,222 +1049,195 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FromLoadJava extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFromLoadJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ArrayTypeVariance.kt") public void testArrayTypeVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ArrayTypeVariance.kt"); } @TestMetadata("ClassDoesNotOverrideMethod.kt") public void testClassDoesNotOverrideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassDoesNotOverrideMethod.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassObject.kt"); } @TestMetadata("classObjectAnnotation.kt") public void testClassObjectAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/classObjectAnnotation.kt"); } @TestMetadata("ClassWithConstVal.kt") public void testClassWithConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithConstVal.kt"); } @TestMetadata("ClassWithTypeP.kt") public void testClassWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypeP.kt"); } @TestMetadata("ClassWithTypePExtendsIterableP.kt") public void testClassWithTypePExtendsIterableP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.kt"); } @TestMetadata("ClassWithTypePP.kt") public void testClassWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePP.kt"); } @TestMetadata("ClassWithTypePRefNext.kt") public void testClassWithTypePRefNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefNext.kt"); } @TestMetadata("ClassWithTypePRefSelf.kt") public void testClassWithTypePRefSelf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelf.kt"); } @TestMetadata("ClassWithTypePRefSelfAndClass.kt") public void testClassWithTypePRefSelfAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/enum.kt"); } @TestMetadata("FieldAsVar.kt") public void testFieldAsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldAsVar.kt"); } @TestMetadata("FieldOfArrayType.kt") public void testFieldOfArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FieldOfArrayType.kt"); } @TestMetadata("FinalFieldAsVal.kt") public void testFinalFieldAsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/FinalFieldAsVal.kt"); } @TestMetadata("genericFunction.kt") public void testGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/genericFunction.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypes.kt") public void testInheritMethodsDifferentReturnTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypes.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesGeneric.kt") public void testInheritMethodsDifferentReturnTypesGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InheritMethodsDifferentReturnTypesGeneric.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/InnerClass.kt"); } @TestMetadata("MethodTypePOneUpperBound.kt") public void testMethodTypePOneUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePOneUpperBound.kt"); } @TestMetadata("MethodTypePTwoUpperBounds.kt") public void testMethodTypePTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.kt"); } @TestMetadata("MethodWithTypeP.kt") public void testMethodWithTypeP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypeP.kt"); } @TestMetadata("MethodWithTypePP.kt") public void testMethodWithTypePP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePP.kt"); } @TestMetadata("MethodWithTypePRefClassP.kt") public void testMethodWithTypePRefClassP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethodWithTypePRefClassP.kt"); } @TestMetadata("MethosWithPRefTP.kt") public void testMethosWithPRefTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MethosWithPRefTP.kt"); } @TestMetadata("MyException.kt") public void testMyException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/MyException.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/NestedClass.kt"); } @TestMetadata("objectInClass.kt") public void testObjectInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectInClass.kt"); } @TestMetadata("objectMembers.kt") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/objectMembers.kt"); } @TestMetadata("packageLevelObject.kt") public void testPackageLevelObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/packageLevelObject.kt"); } @TestMetadata("RemoveRedundantProjectionKind.kt") public void testRemoveRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/RemoveRedundantProjectionKind.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/Simple.kt"); } @TestMetadata("TwoFields.kt") public void testTwoFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/TwoFields.kt"); } @TestMetadata("UnboundWildcard.kt") public void testUnboundWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/UnboundWildcard.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinSignature extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AllBoundsInWhen.kt") public void testAllBoundsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.kt"); } public void testAllFilesPresentInKotlinSignature() throws Exception { @@ -1360,102 +1246,90 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestMetadata("ArrayType.kt") public void testArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ArrayType.kt"); } @TestMetadata("ConstructorWithNewTypeParams.kt") public void testConstructorWithNewTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.kt"); } @TestMetadata("ConstructorWithParentTypeParams.kt") public void testConstructorWithParentTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.kt"); } @TestMetadata("ConstructorWithSeveralParams.kt") public void testConstructorWithSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithSeveralParams.kt"); } @TestMetadata("ConstructorWithoutParams.kt") public void testConstructorWithoutParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithoutParams.kt"); } @TestMetadata("CustomProjectionKind.kt") public void testCustomProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/CustomProjectionKind.kt"); } @TestMetadata("MethodWithFunctionTypes.kt") public void testMethodWithFunctionTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithFunctionTypes.kt"); } @TestMetadata("MethodWithGenerics.kt") public void testMethodWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithGenerics.kt"); } @TestMetadata("MethodWithMappedClasses.kt") public void testMethodWithMappedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithMappedClasses.kt"); } @TestMetadata("MethodWithTypeParameters.kt") public void testMethodWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.kt"); } @TestMetadata("MethodWithVararg.kt") public void testMethodWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/MethodWithVararg.kt"); } @TestMetadata("PropertyArrayTypes.kt") public void testPropertyArrayTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.kt"); } @TestMetadata("PropertyComplexTypes.kt") public void testPropertyComplexTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.kt"); } @TestMetadata("PropertySimpleType.kt") public void testPropertySimpleType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/PropertySimpleType.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/StarProjection.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Error extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddingNullability.kt") public void testAddingNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/AddingNullability.kt"); } public void testAllFilesPresentInError() throws Exception { @@ -1464,158 +1338,132 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestMetadata("ConflictingProjectionKind.kt") public void testConflictingProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ConflictingProjectionKind.kt"); } @TestMetadata("ExplicitFieldGettersAndSetters.kt") public void testExplicitFieldGettersAndSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExplicitFieldGettersAndSetters.kt"); } @TestMetadata("ExtraUpperBound.kt") public void testExtraUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.kt"); } @TestMetadata("MissingUpperBound.kt") public void testMissingUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.kt"); } @TestMetadata("NoFieldTypeRef.kt") public void testNoFieldTypeRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NoFieldTypeRef.kt"); } @TestMetadata("NotVarargReplacedWithVararg.kt") public void testNotVarargReplacedWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/NotVarargReplacedWithVararg.kt"); } @TestMetadata("RedundantProjectionKind.kt") public void testRedundantProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/RedundantProjectionKind.kt"); } @TestMetadata("ReturnTypeMissing.kt") public void testReturnTypeMissing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/ReturnTypeMissing.kt"); } @TestMetadata("SyntaxError.kt") public void testSyntaxError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxError.kt"); } @TestMetadata("SyntaxErrorInFieldAnnotation.kt") public void testSyntaxErrorInFieldAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/SyntaxErrorInFieldAnnotation.kt"); } @TestMetadata("VarargReplacedWithNotVararg.kt") public void testVarargReplacedWithNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/VarargReplacedWithNotVararg.kt"); } @TestMetadata("WrongFieldInitializer.kt") public void testWrongFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldInitializer.kt"); } @TestMetadata("WrongFieldMutability.kt") public void testWrongFieldMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldMutability.kt"); } @TestMetadata("WrongFieldName.kt") public void testWrongFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongFieldName.kt"); } @TestMetadata("WrongMethodName.kt") public void testWrongMethodName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongMethodName.kt"); } @TestMetadata("WrongProjectionKind.kt") public void testWrongProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongProjectionKind.kt"); } @TestMetadata("WrongReturnTypeStructure.kt") public void testWrongReturnTypeStructure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongReturnTypeStructure.kt"); } @TestMetadata("WrongTypeName1.kt") public void testWrongTypeName1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName1.kt"); } @TestMetadata("WrongTypeName2.kt") public void testWrongTypeName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName2.kt"); } @TestMetadata("WrongTypeName3.kt") public void testWrongTypeName3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeName3.kt"); } @TestMetadata("WrongTypeParameterBoundStructure1.kt") public void testWrongTypeParameterBoundStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.kt"); } @TestMetadata("WrongTypeParameterBoundStructure2.kt") public void testWrongTypeParameterBoundStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.kt"); } @TestMetadata("WrongTypeParametersCount.kt") public void testWrongTypeParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParametersCount.kt"); } @TestMetadata("WrongValueParameterStructure1.kt") public void testWrongValueParameterStructure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure1.kt"); } @TestMetadata("WrongValueParameterStructure2.kt") public void testWrongValueParameterStructure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParameterStructure2.kt"); } @TestMetadata("WrongValueParametersCount.kt") public void testWrongValueParametersCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/error/WrongValueParametersCount.kt"); } } @@ -1623,178 +1471,159 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Propagation extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropagation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("PropagateTypeArgumentNullable.kt") public void testPropagateTypeArgumentNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/PropagateTypeArgumentNullable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameter extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ChangeProjectionKind1.kt") public void testChangeProjectionKind1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind1.kt"); } @TestMetadata("ChangeProjectionKind2.kt") public void testChangeProjectionKind2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ChangeProjectionKind2.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritMutability.kt"); } @TestMetadata("InheritNotVararg.kt") public void testInheritNotVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVararg.kt"); } @TestMetadata("InheritNotVarargInteger.kt") public void testInheritNotVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargInteger.kt"); } @TestMetadata("InheritNotVarargNotNull.kt") public void testInheritNotVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargNotNull.kt"); } @TestMetadata("InheritNotVarargPrimitive.kt") public void testInheritNotVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNotVarargPrimitive.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritNullability.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritReadOnliness.kt"); } @TestMetadata("InheritVararg.kt") public void testInheritVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVararg.kt"); } @TestMetadata("InheritVarargInteger.kt") public void testInheritVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargInteger.kt"); } @TestMetadata("InheritVarargNotNull.kt") public void testInheritVarargNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargNotNull.kt"); } @TestMetadata("InheritVarargPrimitive.kt") public void testInheritVarargPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/InheritVarargPrimitive.kt"); } @TestMetadata("Kt3302.kt") public void testKt3302() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/Kt3302.kt"); } @TestMetadata("MutableToReadOnly.kt") public void testMutableToReadOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/MutableToReadOnly.kt"); } @TestMetadata("NotNullToNullable.kt") public void testNotNullToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NotNullToNullable.kt"); } @TestMetadata("NullableToNotNull.kt") public void testNullableToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNull.kt"); } @TestMetadata("NullableToNotNullKotlinSignature.kt") public void testNullableToNotNullKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/NullableToNotNullKotlinSignature.kt"); } @TestMetadata("OverrideWithErasedParameter.kt") public void testOverrideWithErasedParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/OverrideWithErasedParameter.kt"); } @TestMetadata("ReadOnlyToMutable.kt") public void testReadOnlyToMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/ReadOnlyToMutable.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/parameter/SubstitutedClassParameters.kt"); } } @@ -1802,40 +1631,38 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Return extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AddNotNullJavaSubtype.kt") public void testAddNotNullJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullJavaSubtype.kt"); } @TestMetadata("AddNotNullSameJavaType.kt") public void testAddNotNullSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNotNullSameJavaType.kt"); } @TestMetadata("AddNullabilityJavaSubtype.kt") public void testAddNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilityJavaSubtype.kt"); } @TestMetadata("AddNullabilitySameGenericType1.kt") public void testAddNullabilitySameGenericType1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType1.kt"); } @TestMetadata("AddNullabilitySameGenericType2.kt") public void testAddNullabilitySameGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameGenericType2.kt"); } @TestMetadata("AddNullabilitySameJavaType.kt") public void testAddNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/AddNullabilitySameJavaType.kt"); } public void testAllFilesPresentInReturn() throws Exception { @@ -1844,170 +1671,142 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestMetadata("CantMakeImmutableInSubclass.kt") public void testCantMakeImmutableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/CantMakeImmutableInSubclass.kt"); } @TestMetadata("DeeplySubstitutedClassParameter.kt") public void testDeeplySubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter.kt"); } @TestMetadata("DeeplySubstitutedClassParameter2.kt") public void testDeeplySubstitutedClassParameter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/DeeplySubstitutedClassParameter2.kt"); } @TestMetadata("HalfSubstitutedTypeParameters.kt") public void testHalfSubstitutedTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.kt"); } @TestMetadata("InheritNullabilityGenericSubclassSimple.kt") public void testInheritNullabilityGenericSubclassSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityGenericSubclassSimple.kt"); } @TestMetadata("InheritNullabilityJavaSubtype.kt") public void testInheritNullabilityJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilityJavaSubtype.kt"); } @TestMetadata("InheritNullabilitySameGenericType.kt") public void testInheritNullabilitySameGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameGenericType.kt"); } @TestMetadata("InheritNullabilitySameJavaType.kt") public void testInheritNullabilitySameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritNullabilitySameJavaType.kt"); } @TestMetadata("InheritProjectionKind.kt") public void testInheritProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritProjectionKind.kt"); } @TestMetadata("InheritReadOnlinessOfArgument.kt") public void testInheritReadOnlinessOfArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessOfArgument.kt"); } @TestMetadata("InheritReadOnlinessSameClass.kt") public void testInheritReadOnlinessSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSameClass.kt"); } @TestMetadata("InheritReadOnlinessSubclass.kt") public void testInheritReadOnlinessSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/InheritReadOnlinessSubclass.kt"); } @TestMetadata("SameProjectionKind.kt") public void testSameProjectionKind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SameProjectionKind.kt"); } @TestMetadata("SubclassFromGenericAndNot.kt") public void testSubclassFromGenericAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassFromGenericAndNot.kt"); } @TestMetadata("SubclassOfCollection.kt") public void testSubclassOfCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.kt"); } @TestMetadata("SubclassOfMapEntry.kt") public void testSubclassOfMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfMapEntry.kt"); } @TestMetadata("SubstitutedClassParameter.kt") public void testSubstitutedClassParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameter.kt"); } @TestMetadata("SubstitutedClassParameters.kt") public void testSubstitutedClassParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubstitutedClassParameters.kt"); } @TestMetadata("TwoSuperclassesConflictingProjectionKinds.kt") public void testTwoSuperclassesConflictingProjectionKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesConflictingProjectionKinds.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferMutability.kt") public void testTwoSuperclassesInvariantAndCovariantInferMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferMutability.kt"); } @TestMetadata("TwoSuperclassesInvariantAndCovariantInferNullability.kt") public void testTwoSuperclassesInvariantAndCovariantInferNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesInvariantAndCovariantInferNullability.kt"); } @TestMetadata("TwoSuperclassesMutableAndNot.kt") public void testTwoSuperclassesMutableAndNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesMutableAndNot.kt"); } @TestMetadata("TwoSuperclassesReturnJavaSubtype.kt") public void testTwoSuperclassesReturnJavaSubtype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnJavaSubtype.kt"); } @TestMetadata("TwoSuperclassesReturnSameJavaType.kt") public void testTwoSuperclassesReturnSameJavaType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesReturnSameJavaType.kt"); } @TestMetadata("TwoSuperclassesSupplementNotNull.kt") public void testTwoSuperclassesSupplementNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TwoSuperclassesSupplementNotNull.kt"); } @TestMetadata("TypeParamOfClass.kt") public void testTypeParamOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClass.kt"); } @TestMetadata("TypeParamOfClassSubstituted.kt") public void testTypeParamOfClassSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfClassSubstituted.kt"); } @TestMetadata("TypeParamOfFun.kt") public void testTypeParamOfFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/TypeParamOfFun.kt"); } } @@ -2015,62 +1814,57 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameter extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InheritMutability.kt") public void testInheritMutability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.kt"); } @TestMetadata("InheritNullability.kt") public void testInheritNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.kt"); } @TestMetadata("InheritReadOnliness.kt") public void testInheritReadOnliness() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.kt"); } @TestMetadata("TwoBounds.kt") public void testTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.kt"); } @TestMetadata("TwoSuperclasses.kt") public void testTwoSuperclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.kt"); } @TestMetadata("TwoTypeParameters.kt") public void testTwoTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.kt"); } @TestMetadata("UseParameterAsUpperBound.kt") public void testUseParameterAsUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.kt"); } @TestMetadata("UseParameterInUpperBound.kt") public void testUseParameterInUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.kt"); } @TestMetadata("UseParameterInUpperBoundWithKotlinSignature.kt") public void testUseParameterInUpperBoundWithKotlinSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.kt"); } } } @@ -2080,26 +1874,27 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Library extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLibrary() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("LoadIterable.kt") public void testLoadIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterable.kt"); } @TestMetadata("LoadIterator.kt") public void testLoadIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/LoadIterator.kt"); } @TestMetadata("Max.kt") public void testMax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/library/Max.kt"); } } @@ -2107,14 +1902,17 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modality extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInModality() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ModalityOfFakeOverrides.kt") public void testModalityOfFakeOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.kt"); } } @@ -2122,38 +1920,37 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNull extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNotNull() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NotNullField.kt") public void testNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullField.kt"); } @TestMetadata("NotNullIntArray.kt") public void testNotNullIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullIntArray.kt"); } @TestMetadata("NotNullMethod.kt") public void testNotNullMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullMethod.kt"); } @TestMetadata("NotNullObjectArray.kt") public void testNotNullObjectArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullObjectArray.kt"); } @TestMetadata("NotNullParameter.kt") public void testNotNullParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fromLoadJava/notNull/NotNullParameter.kt"); } } } @@ -2162,142 +1959,129 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Fun extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFun() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Assert.kt") public void testAssert() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/Assert.kt"); } @TestMetadata("DeclaredMemberOverridesDelegated.kt") public void testDeclaredMemberOverridesDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/DeclaredMemberOverridesDelegated.kt"); } @TestMetadata("InfixKeyword.kt") public void testInfixKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InfixKeyword.kt"); } @TestMetadata("InheritMethodsDifferentReturnTypesAndVisibilities.kt") public void testInheritMethodsDifferentReturnTypesAndVisibilities() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritMethodsDifferentReturnTypesAndVisibilities.kt"); } @TestMetadata("InheritValAndVar.kt") public void testInheritValAndVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValAndVar.kt"); } @TestMetadata("InheritValsDifferentTypes.kt") public void testInheritValsDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/InheritValsDifferentTypes.kt"); } @TestMetadata("NoSamAdapter.kt") public void testNoSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamAdapter.kt"); } @TestMetadata("NoSamConstructor.kt") public void testNoSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/NoSamConstructor.kt"); } @TestMetadata("OperatorKeyword.kt") public void testOperatorKeyword() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/OperatorKeyword.kt"); } @TestMetadata("PropagateDeepSubclass.kt") public void testPropagateDeepSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateDeepSubclass.kt"); } @TestMetadata("PropagateSubclassOfComparable.kt") public void testPropagateSubclassOfComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/PropagateSubclassOfComparable.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithTypeVariables extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunGenericParam.kt") public void testFunGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunGenericParam.kt"); } @TestMetadata("FunParamParam.kt") public void testFunParamParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParam.kt"); } @TestMetadata("FunParamParamErased.kt") public void testFunParamParamErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamParamErased.kt"); } @TestMetadata("FunParamReferencesParam.kt") public void testFunParamReferencesParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.kt"); } @TestMetadata("FunParamTwoUpperBounds.kt") public void testFunParamTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.kt"); } @TestMetadata("FunParamUpperClassBound.kt") public void testFunParamUpperClassBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.kt"); } @TestMetadata("FunParamUpperClassInterfaceBound.kt") public void testFunParamUpperClassInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.kt"); } @TestMetadata("FunParamUpperInterfaceBound.kt") public void testFunParamUpperInterfaceBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.kt"); } @TestMetadata("FunParamVaragParam.kt") public void testFunParamVaragParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunParamVaragParam.kt"); } @TestMetadata("FunTwoTypeParams.kt") public void testFunTwoTypeParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithTypeVariables/FunTwoTypeParams.kt"); } } @@ -2305,38 +2089,37 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericWithoutTypeVariables extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGenericWithoutTypeVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("FunClassParamNotNull.kt") public void testFunClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNotNull.kt"); } @TestMetadata("FunClassParamNullable.kt") public void testFunClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunClassParamNullable.kt"); } @TestMetadata("FunParamNullable.kt") public void testFunParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/FunParamNullable.kt"); } @TestMetadata("ReturnTypeClassParamNotNull.kt") public void testReturnTypeClassParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNotNull.kt"); } @TestMetadata("ReturnTypeClassParamNullable.kt") public void testReturnTypeClassParamNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/genericWithoutTypeVariables/ReturnTypeClassParamNullable.kt"); } } @@ -2344,104 +2127,92 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonGeneric extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNonGeneric() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassFun.kt") public void testClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFun.kt"); } @TestMetadata("ClassFunGetFoo.kt") public void testClassFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFoo.kt"); } @TestMetadata("ClassFunGetFooSetFoo.kt") public void testClassFunGetFooSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunGetFooSetFoo.kt"); } @TestMetadata("ClassFunSetFoo.kt") public void testClassFunSetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ClassFunSetFoo.kt"); } @TestMetadata("ExtFun.kt") public void testExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFun.kt"); } @TestMetadata("ExtFunInClass.kt") public void testExtFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ExtFunInClass.kt"); } @TestMetadata("FunDefaultArg.kt") public void testFunDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunDefaultArg.kt"); } @TestMetadata("FunParamNotNull.kt") public void testFunParamNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunParamNotNull.kt"); } @TestMetadata("FunVarargInt.kt") public void testFunVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInt.kt"); } @TestMetadata("FunVarargInteger.kt") public void testFunVarargInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/FunVarargInteger.kt"); } @TestMetadata("ModifierAbstract.kt") public void testModifierAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierAbstract.kt"); } @TestMetadata("ModifierOpen.kt") public void testModifierOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ModifierOpen.kt"); } @TestMetadata("NsFun.kt") public void testNsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFun.kt"); } @TestMetadata("NsFunGetFoo.kt") public void testNsFunGetFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/NsFunGetFoo.kt"); } @TestMetadata("ReturnTypeNotNull.kt") public void testReturnTypeNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNotNull.kt"); } @TestMetadata("ReturnTypeNullable.kt") public void testReturnTypeNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/nonGeneric/ReturnTypeNullable.kt"); } } @@ -2449,26 +2220,27 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/fun/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("nonLastVararg.kt") public void testNonLastVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/nonLastVararg.kt"); } @TestMetadata("VarargInt.kt") public void testVarargInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargInt.kt"); } @TestMetadata("VarargString.kt") public void testVarargString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/fun/vararg/VarargString.kt"); } } } @@ -2477,14 +2249,17 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("inlineFunction.kt") public void testInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/inline/inlineFunction.kt"); } } @@ -2492,44 +2267,42 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MemberOrder extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMemberOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/memberOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callablesNameClash.kt") public void testCallablesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/callablesNameClash.kt"); } @TestMetadata("enumEntries.kt") public void testEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/enumEntries.kt"); } @TestMetadata("extensionMembers.kt") public void testExtensionMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionMembers.kt"); } @TestMetadata("extensionPropertiesNameClash.kt") public void testExtensionPropertiesNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/extensionPropertiesNameClash.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/innerClasses.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/memberOrder/topLevelCallables.kt"); } } @@ -2537,26 +2310,27 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nested extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/nested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("deepInnerGeneric.kt") public void testDeepInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/deepInnerGeneric.kt"); } @TestMetadata("innerClassReferencesOuterTP.kt") public void testInnerClassReferencesOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/innerClassReferencesOuterTP.kt"); } @TestMetadata("membersReferenceOuterTP.kt") public void testMembersReferenceOuterTP() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/nested/membersReferenceOuterTP.kt"); } } @@ -2564,20 +2338,22 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("notnullTypeArgument.kt") public void testNotnullTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.kt"); } @TestMetadata("nullableTypeArgument.kt") public void testNullableTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.kt"); } } @@ -2585,274 +2361,239 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Prop extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVal.kt"); } @TestMetadata("ClassValAbstract.kt") public void testClassValAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassValAbstract.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ClassVar.kt"); } @TestMetadata("CollectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/CollectionSize.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Const.kt"); } @TestMetadata("Constants.kt") public void testConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/Constants.kt"); } @TestMetadata("ExtValClass.kt") public void testExtValClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValClass.kt"); } @TestMetadata("ExtValInClass.kt") public void testExtValInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInClass.kt"); } @TestMetadata("ExtValInt.kt") public void testExtValInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValInt.kt"); } @TestMetadata("ExtValIntCharSequence.kt") public void testExtValIntCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequence.kt"); } @TestMetadata("ExtValIntCharSequenceQ.kt") public void testExtValIntCharSequenceQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntCharSequenceQ.kt"); } @TestMetadata("ExtValIntListQOfIntInClass.kt") public void testExtValIntListQOfIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntListQOfIntInClass.kt"); } @TestMetadata("ExtValIntTInClass.kt") public void testExtValIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTInClass.kt"); } @TestMetadata("ExtValIntTQInClass.kt") public void testExtValIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValIntTQInClass.kt"); } @TestMetadata("ExtValTIntInClass.kt") public void testExtValTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtValTIntInClass.kt"); } @TestMetadata("ExtVarClass.kt") public void testExtVarClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarClass.kt"); } @TestMetadata("ExtVarInClass.kt") public void testExtVarInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInClass.kt"); } @TestMetadata("ExtVarInt.kt") public void testExtVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarInt.kt"); } @TestMetadata("ExtVarIntTInClass.kt") public void testExtVarIntTInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTInClass.kt"); } @TestMetadata("ExtVarIntTQInClass.kt") public void testExtVarIntTQInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarIntTQInClass.kt"); } @TestMetadata("ExtVarMapPQInt.kt") public void testExtVarMapPQInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarMapPQInt.kt"); } @TestMetadata("ExtVarTIntInClass.kt") public void testExtVarTIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTIntInClass.kt"); } @TestMetadata("ExtVarTQIntInClass.kt") public void testExtVarTQIntInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarTQIntInClass.kt"); } @TestMetadata("ExtVarl.kt") public void testExtVarl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/ExtVarl.kt"); } @TestMetadata("NsVal.kt") public void testNsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVal.kt"); } @TestMetadata("NsVar.kt") public void testNsVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/NsVar.kt"); } @TestMetadata("OverrideClassVal.kt") public void testOverrideClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideClassVal.kt"); } @TestMetadata("OverrideTraitVal.kt") public void testOverrideTraitVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/OverrideTraitVal.kt"); } @TestMetadata("PropFromSuperclass.kt") public void testPropFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/PropFromSuperclass.kt"); } @TestMetadata("TraitFinalVar.kt") public void testTraitFinalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitFinalVar.kt"); } @TestMetadata("TraitOpenVal.kt") public void testTraitOpenVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/TraitOpenVal.kt"); } @TestMetadata("VarDelegationToTraitImpl.kt") public void testVarDelegationToTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarDelegationToTraitImpl.kt"); } @TestMetadata("VarWithDelegated.kt") public void testVarWithDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/VarWithDelegated.kt"); } @TestMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultAccessors extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDefaultAccessors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassVal.kt") public void testClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVal.kt"); } @TestMetadata("ClassValParams.kt") public void testClassValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValParams.kt"); } @TestMetadata("ClassValWithGet.kt") public void testClassValWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassValWithGet.kt"); } @TestMetadata("ClassVar.kt") public void testClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVar.kt"); } @TestMetadata("ClassVarModality.kt") public void testClassVarModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarModality.kt"); } @TestMetadata("ClassVarParams.kt") public void testClassVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarParams.kt"); } @TestMetadata("ClassVarWithGet.kt") public void testClassVarWithGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithGet.kt"); } @TestMetadata("ClassVarWithSet.kt") public void testClassVarWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ClassVarWithSet.kt"); } @TestMetadata("ExtValLong.kt") public void testExtValLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtValLong.kt"); } @TestMetadata("ExtVarLong.kt") public void testExtVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/prop/defaultAccessors/ExtVarLong.kt"); } } } @@ -2861,194 +2602,167 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/type"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Any.kt"); } @TestMetadata("AnyQ.kt") public void testAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/AnyQ.kt"); } @TestMetadata("ArrayOfInNumber.kt") public void testArrayOfInNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInNumber.kt"); } @TestMetadata("ArrayOfInt.kt") public void testArrayOfInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInt.kt"); } @TestMetadata("ArrayOfInteger.kt") public void testArrayOfInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfInteger.kt"); } @TestMetadata("ArrayOfOutNumber.kt") public void testArrayOfOutNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutNumber.kt"); } @TestMetadata("ArrayOfOutT.kt") public void testArrayOfOutT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfOutT.kt"); } @TestMetadata("ArrayOfString.kt") public void testArrayOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ArrayOfString.kt"); } @TestMetadata("Function1IntString.kt") public void testFunction1IntString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Function1IntString.kt"); } @TestMetadata("Int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Int.kt"); } @TestMetadata("IntArray.kt") public void testIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntArray.kt"); } @TestMetadata("IntQ.kt") public void testIntQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/IntQ.kt"); } @TestMetadata("jlInteger.kt") public void testJlInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlInteger.kt"); } @TestMetadata("jlIntegerQ.kt") public void testJlIntegerQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlIntegerQ.kt"); } @TestMetadata("jlNumber.kt") public void testJlNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlNumber.kt"); } @TestMetadata("jlObject.kt") public void testJlObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObject.kt"); } @TestMetadata("jlObjectQ.kt") public void testJlObjectQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlObjectQ.kt"); } @TestMetadata("jlString.kt") public void testJlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlString.kt"); } @TestMetadata("jlStringQ.kt") public void testJlStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/jlStringQ.kt"); } @TestMetadata("ListOfAny.kt") public void testListOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAny.kt"); } @TestMetadata("ListOfAnyQ.kt") public void testListOfAnyQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfAnyQ.kt"); } @TestMetadata("ListOfStar.kt") public void testListOfStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfStar.kt"); } @TestMetadata("ListOfString.kt") public void testListOfString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfString.kt"); } @TestMetadata("ListOfjlString.kt") public void testListOfjlString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/ListOfjlString.kt"); } @TestMetadata("Nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Nothing.kt"); } @TestMetadata("NothingQ.kt") public void testNothingQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/NothingQ.kt"); } @TestMetadata("platform.kt") public void testPlatform() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/platform.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/String.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/String.kt"); } @TestMetadata("StringQ.kt") public void testStringQ() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/StringQ.kt"); } @TestMetadata("SuspendFunction.kt") public void testSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/SuspendFunction.kt"); } @TestMetadata("Unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/type/Unit.kt"); } } @@ -3056,32 +2770,32 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Annotations.kt"); } @TestMetadata("Basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Basic.kt"); } @TestMetadata("Generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/Generic.kt"); } @TestMetadata("TypeAliasToExtension.kt") public void testTypeAliasToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/typealias/TypeAliasToExtension.kt"); } } @@ -3089,74 +2803,67 @@ public class ResolveByStubTestGenerated extends AbstractResolveByStubTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Visibility extends AbstractResolveByStubTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVisibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/loadJava/compiledKotlin/visibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("InternalClass.kt") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalClass.kt"); } @TestMetadata("InternalConstructor.kt") public void testInternalConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalConstructor.kt"); } @TestMetadata("InternalTopLevelMembers.kt") public void testInternalTopLevelMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/InternalTopLevelMembers.kt"); } @TestMetadata("PrivateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClass.kt"); } @TestMetadata("PrivateClassMembers.kt") public void testPrivateClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateClassMembers.kt"); } @TestMetadata("PrivateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateToThis.kt"); } @TestMetadata("PrivateTopLevelFun.kt") public void testPrivateTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelFun.kt"); } @TestMetadata("PrivateTopLevelVal.kt") public void testPrivateTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PrivateTopLevelVal.kt"); } @TestMetadata("PropertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructor.kt"); } @TestMetadata("PropertyInConstructorExplicitVisibility.kt") public void testPropertyInConstructorExplicitVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/PropertyInConstructorExplicitVisibility.kt"); } @TestMetadata("TopLevelVarWithPrivateSetter.kt") public void testTopLevelVarWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/loadJava/compiledKotlin/visibility/TopLevelVarWithPrivateSetter.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/idea/stubs/StubBuilderTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/stubs/StubBuilderTestGenerated.java index 77715023394..3f68328adce 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/stubs/StubBuilderTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/stubs/StubBuilderTestGenerated.java @@ -21,229 +21,196 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class StubBuilderTestGenerated extends AbstractStubBuilderTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStubs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/stubs"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("AnnotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnnotationClass.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnnotationClass.kt"); } @TestMetadata("AnnotationOnClass.kt") public void testAnnotationOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnnotationOnClass.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnnotationOnClass.kt"); } @TestMetadata("AnnotationOnFunction.kt") public void testAnnotationOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnnotationOnFunction.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnnotationOnFunction.kt"); } @TestMetadata("AnnotationOnLocalFunction.kt") public void testAnnotationOnLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnnotationOnLocalFunction.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnnotationOnLocalFunction.kt"); } @TestMetadata("AnnotationWithValue.kt") public void testAnnotationWithValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnnotationWithValue.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnnotationWithValue.kt"); } @TestMetadata("AnnotationsOnPrimaryCtr.kt") public void testAnnotationsOnPrimaryCtr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnnotationsOnPrimaryCtr.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnnotationsOnPrimaryCtr.kt"); } @TestMetadata("AnonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/AnonymousObject.kt"); - doTest(fileName); + runTest("idea/testData/stubs/AnonymousObject.kt"); } @TestMetadata("ClassObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ClassObject.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ClassObject.kt"); } @TestMetadata("ClassProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ClassProperty.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ClassProperty.kt"); } @TestMetadata("ClassTypeParameters.kt") public void testClassTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ClassTypeParameters.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ClassTypeParameters.kt"); } @TestMetadata("Const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/Const.kt"); - doTest(fileName); + runTest("idea/testData/stubs/Const.kt"); } @TestMetadata("DanglingAnnotations.kt") public void testDanglingAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/DanglingAnnotations.kt"); - doTest(fileName); + runTest("idea/testData/stubs/DanglingAnnotations.kt"); } @TestMetadata("DynamicType.kt") public void testDynamicType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/DynamicType.kt"); - doTest(fileName); + runTest("idea/testData/stubs/DynamicType.kt"); } @TestMetadata("FilePackage.kt") public void testFilePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/FilePackage.kt"); - doTest(fileName); + runTest("idea/testData/stubs/FilePackage.kt"); } @TestMetadata("FunctionInNotNamedObject.kt") public void testFunctionInNotNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/FunctionInNotNamedObject.kt"); - doTest(fileName); + runTest("idea/testData/stubs/FunctionInNotNamedObject.kt"); } @TestMetadata("FunctionParameters.kt") public void testFunctionParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/FunctionParameters.kt"); - doTest(fileName); + runTest("idea/testData/stubs/FunctionParameters.kt"); } @TestMetadata("InnerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/InnerClass.kt"); - doTest(fileName); + runTest("idea/testData/stubs/InnerClass.kt"); } @TestMetadata("LocalClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/LocalClass.kt"); - doTest(fileName); + runTest("idea/testData/stubs/LocalClass.kt"); } @TestMetadata("LocalClassInLocalFunction.kt") public void testLocalClassInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/LocalClassInLocalFunction.kt"); - doTest(fileName); + runTest("idea/testData/stubs/LocalClassInLocalFunction.kt"); } @TestMetadata("LocalNamedObject.kt") public void testLocalNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/LocalNamedObject.kt"); - doTest(fileName); + runTest("idea/testData/stubs/LocalNamedObject.kt"); } @TestMetadata("ManyAnnotationsOnFunction.kt") public void testManyAnnotationsOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ManyAnnotationsOnFunction.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ManyAnnotationsOnFunction.kt"); } @TestMetadata("MembersInLocalClass.kt") public void testMembersInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/MembersInLocalClass.kt"); - doTest(fileName); + runTest("idea/testData/stubs/MembersInLocalClass.kt"); } @TestMetadata("MembersInLocalObject.kt") public void testMembersInLocalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/MembersInLocalObject.kt"); - doTest(fileName); + runTest("idea/testData/stubs/MembersInLocalObject.kt"); } @TestMetadata("NamedObject.kt") public void testNamedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/NamedObject.kt"); - doTest(fileName); + runTest("idea/testData/stubs/NamedObject.kt"); } @TestMetadata("NotStorePropertiesFrom.kt") public void testNotStorePropertiesFrom() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/NotStorePropertiesFrom.kt"); - doTest(fileName); + runTest("idea/testData/stubs/NotStorePropertiesFrom.kt"); } @TestMetadata("NotStorePropertyFromDelegate.kt") public void testNotStorePropertyFromDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/NotStorePropertyFromDelegate.kt"); - doTest(fileName); + runTest("idea/testData/stubs/NotStorePropertyFromDelegate.kt"); } @TestMetadata("NotStorePropertyFromInitializer.kt") public void testNotStorePropertyFromInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/NotStorePropertyFromInitializer.kt"); - doTest(fileName); + runTest("idea/testData/stubs/NotStorePropertyFromInitializer.kt"); } @TestMetadata("ObjectInInitializer.kt") public void testObjectInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ObjectInInitializer.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ObjectInInitializer.kt"); } @TestMetadata("ObjectInPropertyDelegate.kt") public void testObjectInPropertyDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ObjectInPropertyDelegate.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ObjectInPropertyDelegate.kt"); } @TestMetadata("PackageProperty.kt") public void testPackageProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/PackageProperty.kt"); - doTest(fileName); + runTest("idea/testData/stubs/PackageProperty.kt"); } @TestMetadata("ParametersWithFqName.kt") public void testParametersWithFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/ParametersWithFqName.kt"); - doTest(fileName); + runTest("idea/testData/stubs/ParametersWithFqName.kt"); } @TestMetadata("PropertyAsPropertyInitalizerInvalidCode.kt") public void testPropertyAsPropertyInitalizerInvalidCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/PropertyAsPropertyInitalizerInvalidCode.kt"); - doTest(fileName); + runTest("idea/testData/stubs/PropertyAsPropertyInitalizerInvalidCode.kt"); } @TestMetadata("QualifiedAnnotationOnFunction.kt") public void testQualifiedAnnotationOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/QualifiedAnnotationOnFunction.kt"); - doTest(fileName); + runTest("idea/testData/stubs/QualifiedAnnotationOnFunction.kt"); } @TestMetadata("SecondaryConstructors.kt") public void testSecondaryConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/SecondaryConstructors.kt"); - doTest(fileName); + runTest("idea/testData/stubs/SecondaryConstructors.kt"); } @TestMetadata("SimpleEnumBuild.kt") public void testSimpleEnumBuild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/SimpleEnumBuild.kt"); - doTest(fileName); + runTest("idea/testData/stubs/SimpleEnumBuild.kt"); } @TestMetadata("StarProjection.kt") public void testStarProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/StarProjection.kt"); - doTest(fileName); + runTest("idea/testData/stubs/StarProjection.kt"); } @TestMetadata("TypeAnnotation.kt") public void testTypeAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/stubs/TypeAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/stubs/TypeAnnotation.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/psi/patternMatching/PsiUnifierTestGenerated.java b/idea/tests/org/jetbrains/kotlin/psi/patternMatching/PsiUnifierTestGenerated.java index 971e1c2be30..6d71c37fd09 100644 --- a/idea/tests/org/jetbrains/kotlin/psi/patternMatching/PsiUnifierTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/psi/patternMatching/PsiUnifierTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -29,6 +33,10 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equivalence extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEquivalence() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -37,112 +45,104 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/break.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/continue.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/continue.kt"); } @TestMetadata("doWhileRuntime.kt") public void testDoWhileRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/doWhileRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/doWhileRuntime.kt"); } @TestMetadata("forRuntime.kt") public void testForRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/forRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/forRuntime.kt"); } @TestMetadata("ifElseRuntime.kt") public void testIfElseRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/ifElseRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/ifElseRuntime.kt"); } @TestMetadata("ifRuntime.kt") public void testIfRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/ifRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/ifRuntime.kt"); } @TestMetadata("labeledReturn.kt") public void testLabeledReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/labeledReturn.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/labeledReturn.kt"); } @TestMetadata("throwRuntime.kt") public void testThrowRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/throwRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/throwRuntime.kt"); } @TestMetadata("unitReturn.kt") public void testUnitReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/unitReturn.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/unitReturn.kt"); } @TestMetadata("valuedReturn.kt") public void testValuedReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/valuedReturn.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/valuedReturn.kt"); } @TestMetadata("whenWithSubjectRuntime.kt") public void testWhenWithSubjectRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/whenWithSubjectRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/whenWithSubjectRuntime.kt"); } @TestMetadata("whenWithoutSubjectRuntime.kt") public void testWhenWithoutSubjectRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/whenWithoutSubjectRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/whenWithoutSubjectRuntime.kt"); } @TestMetadata("whileRuntime.kt") public void testWhileRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/whileRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/whileRuntime.kt"); } @TestMetadata("idea/testData/unifier/equivalence/controlStructures/blocks") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Blocks extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBlocks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/controlStructures/blocks"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectsRuntime.kt") public void testAnonymousObjectsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/blocks/anonymousObjectsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/blocks/anonymousObjectsRuntime.kt"); } @TestMetadata("localFunctionsRuntime.kt") public void testLocalFunctionsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/blocks/localFunctionsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/blocks/localFunctionsRuntime.kt"); } @TestMetadata("localVarsRuntime.kt") public void testLocalVarsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/controlStructures/blocks/localVarsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/controlStructures/blocks/localVarsRuntime.kt"); } } } @@ -151,6 +151,10 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Declarations extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @@ -159,44 +163,42 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassesAndObjects extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassesAndObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/declarations/classesAndObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjectBody.kt") public void testAnonymousObjectBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/classesAndObjects/anonymousObjectBody.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/classesAndObjects/anonymousObjectBody.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/classesAndObjects/delegation.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/classesAndObjects/delegation.kt"); } @TestMetadata("emptyBody.kt") public void testEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/classesAndObjects/emptyBody.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/classesAndObjects/emptyBody.kt"); } @TestMetadata("localClassBody.kt") public void testLocalClassBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/classesAndObjects/localClassBody.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/classesAndObjects/localClassBody.kt"); } @TestMetadata("localObjectBody.kt") public void testLocalObjectBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/classesAndObjects/localObjectBody.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/classesAndObjects/localObjectBody.kt"); } @TestMetadata("members.kt") public void testMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt"); } } @@ -204,70 +206,69 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalCallables extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalCallables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/declarations/localCallables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("localExtensionFunctions.kt") public void testLocalExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/localExtensionFunctions.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/localExtensionFunctions.kt"); } @TestMetadata("localFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/localFunctions.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/localFunctions.kt"); } @TestMetadata("localVariables.kt") public void testLocalVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/localVariables.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/localVariables.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/multiDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/multiDeclaration.kt"); } @TestMetadata("idea/testData/unifier/equivalence/declarations/localCallables/lambdas") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lambdas extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLambdas() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/declarations/localCallables/lambdas"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multipleParamsRuntime.kt") public void testMultipleParamsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/multipleParamsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/multipleParamsRuntime.kt"); } @TestMetadata("noParams.kt") public void testNoParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/noParams.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/noParams.kt"); } @TestMetadata("receiverArgumentsRuntime.kt") public void testReceiverArgumentsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/receiverArgumentsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/receiverArgumentsRuntime.kt"); } @TestMetadata("singleParam.kt") public void testSingleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/singleParam.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/singleParam.kt"); } @TestMetadata("unitCoercion.kt") public void testUnitCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/unitCoercion.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/localCallables/lambdas/unitCoercion.kt"); } } } @@ -276,14 +277,17 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/declarations/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("boundsAndConstraints.kt") public void testBoundsAndConstraints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/declarations/typeParameters/boundsAndConstraints.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/declarations/typeParameters/boundsAndConstraints.kt"); } } } @@ -292,64 +296,64 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expressions extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/arrayAccess.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/arrayAccess.kt"); } @TestMetadata("const.kt") public void testConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/const.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/const.kt"); } @TestMetadata("qualifiedName.kt") public void testQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/qualifiedName.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/qualifiedName.kt"); } @TestMetadata("simpleNameRuntime.kt") public void testSimpleNameRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/simpleNameRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/simpleNameRuntime.kt"); } @TestMetadata("stringTemplate.kt") public void testStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/stringTemplate.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/stringTemplate.kt"); } @TestMetadata("idea/testData/unifier/equivalence/expressions/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("classRefRuntime.kt") public void testClassRefRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/callableReferences/classRefRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/callableReferences/classRefRuntime.kt"); } @TestMetadata("expressionReceivers.kt") public void testExpressionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/callableReferences/expressionReceivers.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/callableReferences/expressionReceivers.kt"); } @TestMetadata("functionRefRuntime.kt") public void testFunctionRefRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/callableReferences/functionRefRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/callableReferences/functionRefRuntime.kt"); } } @@ -357,68 +361,62 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Calls extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCalls() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/calls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callAndCalleeRuntime.kt") public void testCallAndCalleeRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/callAndCalleeRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/callAndCalleeRuntime.kt"); } @TestMetadata("callTypeArgumentsRuntime.kt") public void testCallTypeArgumentsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/callTypeArgumentsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/callTypeArgumentsRuntime.kt"); } @TestMetadata("callUnderSmartCast.kt") public void testCallUnderSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/callUnderSmartCast.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/callUnderSmartCast.kt"); } @TestMetadata("externalArgumentsRuntime.kt") public void testExternalArgumentsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/externalArgumentsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/externalArgumentsRuntime.kt"); } @TestMetadata("extraArguments.kt") public void testExtraArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/extraArguments.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/extraArguments.kt"); } @TestMetadata("implicitReceiverArgument.kt") public void testImplicitReceiverArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/implicitReceiverArgument.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/implicitReceiverArgument.kt"); } @TestMetadata("implicitThis.kt") public void testImplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/implicitThis.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/implicitThis.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/safeCall.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/safeCall.kt"); } @TestMetadata("unresolved.kt") public void testUnresolved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/unresolved.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/unresolved.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/calls/varargs.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/calls/varargs.kt"); } } @@ -426,26 +424,27 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("as.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/casts/as.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/casts/as.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/casts/is.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/casts/is.kt"); } @TestMetadata("safeAs.kt") public void testSafeAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/casts/safeAs.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/casts/safeAs.kt"); } } @@ -453,106 +452,99 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Conventions extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/conventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("containsRuntime.kt") public void testContainsRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/containsRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/containsRuntime.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/equals.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/equals.kt"); } @TestMetadata("getRuntime.kt") public void testGetRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/getRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/getRuntime.kt"); } @TestMetadata("inc.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/inc.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/inc.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/infixCall.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/infixCall.kt"); } @TestMetadata("lessThan.kt") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/lessThan.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/lessThan.kt"); } @TestMetadata("notContains.kt") public void testNotContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/notContains.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/notContains.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/notEquals.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/notEquals.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/plus.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/plus.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/unaryMinus.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/unaryMinus.kt"); } @TestMetadata("idea/testData/unifier/equivalence/expressions/conventions/assignments") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Assignments extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/conventions/assignments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("indexedPlusAssignRuntime.kt") public void testIndexedPlusAssignRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/assignments/indexedPlusAssignRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/assignments/indexedPlusAssignRuntime.kt"); } @TestMetadata("plusAndAssign.kt") public void testPlusAndAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssign.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssign.kt"); } @TestMetadata("plusAndAssignWithSet.kt") public void testPlusAndAssignWithSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssignWithSet.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssignWithSet.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAssign.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAssign.kt"); } @TestMetadata("setRuntime.kt") public void testSetRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/assignments/setRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/assignments/setRuntime.kt"); } } @@ -560,32 +552,32 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/conventions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("invokeOnCall.kt") public void testInvokeOnCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnCall.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnCall.kt"); } @TestMetadata("invokeOnConst.kt") public void testInvokeOnConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnConst.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnConst.kt"); } @TestMetadata("invokeOnQualified.kt") public void testInvokeOnQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnQualified.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnQualified.kt"); } @TestMetadata("invokeOnVar.kt") public void testInvokeOnVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnVar.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/conventions/invoke/invokeOnVar.kt"); } } } @@ -594,26 +586,27 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Misc extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMisc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/misc"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("misc1.kt") public void testMisc1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/misc/misc1.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/misc/misc1.kt"); } @TestMetadata("misc2.kt") public void testMisc2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/misc/misc2.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/misc/misc2.kt"); } @TestMetadata("misc3.kt") public void testMisc3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/misc/misc3.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/misc/misc3.kt"); } } @@ -621,32 +614,32 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("multipleSuperTypes.kt") public void testMultipleSuperTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/super/multipleSuperTypes.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/super/multipleSuperTypes.kt"); } @TestMetadata("qualifiedByClass1.kt") public void testQualifiedByClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/super/qualifiedByClass1.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/super/qualifiedByClass1.kt"); } @TestMetadata("qualifiedByClass2.kt") public void testQualifiedByClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/super/qualifiedByClass2.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/super/qualifiedByClass2.kt"); } @TestMetadata("qualifiedByClass3.kt") public void testQualifiedByClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/super/qualifiedByClass3.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/super/qualifiedByClass3.kt"); } } @@ -654,68 +647,62 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class This extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/expressions/this"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("anonymousObjects.kt") public void testAnonymousObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/anonymousObjects.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/anonymousObjects.kt"); } @TestMetadata("qualifiedByClass1.kt") public void testQualifiedByClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/qualifiedByClass1.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/qualifiedByClass1.kt"); } @TestMetadata("qualifiedByClass2.kt") public void testQualifiedByClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/qualifiedByClass2.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/qualifiedByClass2.kt"); } @TestMetadata("qualifiedByClass3.kt") public void testQualifiedByClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/qualifiedByClass3.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/qualifiedByClass3.kt"); } @TestMetadata("qualifiedByFunction1.kt") public void testQualifiedByFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/qualifiedByFunction1.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/qualifiedByFunction1.kt"); } @TestMetadata("qualifiedByFunction2.kt") public void testQualifiedByFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/qualifiedByFunction2.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/qualifiedByFunction2.kt"); } @TestMetadata("qualifiedByFunction3.kt") public void testQualifiedByFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/qualifiedByFunction3.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/qualifiedByFunction3.kt"); } @TestMetadata("simpleThis1Runtime.kt") public void testSimpleThis1Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/simpleThis1Runtime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/simpleThis1Runtime.kt"); } @TestMetadata("simpleThis2Runtime.kt") public void testSimpleThis2Runtime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/simpleThis2Runtime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/simpleThis2Runtime.kt"); } @TestMetadata("thisAsCallee.kt") public void testThisAsCallee() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/expressions/this/thisAsCallee.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/expressions/this/thisAsCallee.kt"); } } } @@ -724,44 +711,42 @@ public class PsiUnifierTestGenerated extends AbstractPsiUnifierTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractPsiUnifierTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/unifier/equivalence/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("function0.kt") public void testFunction0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/types/function0.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/types/function0.kt"); } @TestMetadata("function1.kt") public void testFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/types/function1.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/types/function1.kt"); } @TestMetadata("function2.kt") public void testFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/types/function2.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/types/function2.kt"); } @TestMetadata("nonNullable.kt") public void testNonNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/types/nonNullable.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/types/nonNullable.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/types/nullable.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/types/nullable.kt"); } @TestMetadata("userTypeRuntime.kt") public void testUserTypeRuntime() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/unifier/equivalence/types/userTypeRuntime.kt"); - doTest(fileName); + runTest("idea/testData/unifier/equivalence/types/userTypeRuntime.kt"); } } } diff --git a/idea/tests/org/jetbrains/kotlin/search/AnnotatedMembersSearchTestGenerated.java b/idea/tests/org/jetbrains/kotlin/search/AnnotatedMembersSearchTestGenerated.java index 92f25ee824c..b083e5bc1a8 100644 --- a/idea/tests/org/jetbrains/kotlin/search/AnnotatedMembersSearchTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/search/AnnotatedMembersSearchTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AnnotatedMembersSearchTestGenerated extends AbstractAnnotatedMembersSearchTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/search/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationAliased.kt") public void testAnnotationAliased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/annotationAliased.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/annotationAliased.kt"); } @TestMetadata("testAmbiguousNestedNonAnnotationClass.kt") public void testTestAmbiguousNestedNonAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testAmbiguousNestedNonAnnotationClass.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testAmbiguousNestedNonAnnotationClass.kt"); } @TestMetadata("testAmbiguousNestedPrivateAnnotationClass.kt") public void testTestAmbiguousNestedPrivateAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testAmbiguousNestedPrivateAnnotationClass.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testAmbiguousNestedPrivateAnnotationClass.kt"); } @TestMetadata("testAnnotationsOnClass.kt") public void testTestAnnotationsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testAnnotationsOnClass.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testAnnotationsOnClass.kt"); } @TestMetadata("testAnnotationsOnFunction.kt") public void testTestAnnotationsOnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testAnnotationsOnFunction.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testAnnotationsOnFunction.kt"); } @TestMetadata("testAnnotationsWithParameters.kt") public void testTestAnnotationsWithParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testAnnotationsWithParameters.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testAnnotationsWithParameters.kt"); } @TestMetadata("testDefaultImport.kt") public void testTestDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testDefaultImport.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testDefaultImport.kt"); } @TestMetadata("testNestedClassAsAnnotation.kt") public void testTestNestedClassAsAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testNestedClassAsAnnotation.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testNestedClassAsAnnotation.kt"); } @TestMetadata("testNestedPrivateAnnotationClass.kt") public void testTestNestedPrivateAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testNestedPrivateAnnotationClass.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testNestedPrivateAnnotationClass.kt"); } @TestMetadata("testTypeAlias.kt") public void testTestTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/annotations/testTypeAlias.kt"); - doTest(fileName); + runTest("idea/testData/search/annotations/testTypeAlias.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/search/InheritorsSearchTestGenerated.java b/idea/tests/org/jetbrains/kotlin/search/InheritorsSearchTestGenerated.java index fb43a821203..e5a5b4c19c9 100644 --- a/idea/tests/org/jetbrains/kotlin/search/InheritorsSearchTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/search/InheritorsSearchTestGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class InheritorsSearchTestGenerated extends AbstractInheritorsSearchTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/search/inheritance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/annotationClass.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/annotationClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/enum.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/enum.kt"); } @TestMetadata("interfaces.kt") public void testInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/interfaces.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/interfaces.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/object.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/object.kt"); } @TestMetadata("simpleClass.kt") public void testSimpleClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/simpleClass.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/simpleClass.kt"); } @TestMetadata("testInheritanceFromJavaClass.kt") public void testTestInheritanceFromJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/testInheritanceFromJavaClass.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/testInheritanceFromJavaClass.kt"); } @TestMetadata("testInheritanceFromKotlinClass.kt") public void testTestInheritanceFromKotlinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/search/inheritance/testInheritanceFromKotlinClass.kt"); - doTest(fileName); + runTest("idea/testData/search/inheritance/testInheritanceFromKotlinClass.kt"); } } diff --git a/idea/tests/org/jetbrains/kotlin/shortenRefs/ShortenRefsTestGenerated.java b/idea/tests/org/jetbrains/kotlin/shortenRefs/ShortenRefsTestGenerated.java index 9b5a4cf2e7c..823356723d7 100644 --- a/idea/tests/org/jetbrains/kotlin/shortenRefs/ShortenRefsTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/shortenRefs/ShortenRefsTestGenerated.java @@ -21,226 +21,199 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInShortenRefs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/annotation.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/annotation.kt"); } @TestMetadata("callableRefsOnCompanion.kt") public void testCallableRefsOnCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/callableRefsOnCompanion.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/callableRefsOnCompanion.kt"); } @TestMetadata("ClassNameConflict.kt") public void testClassNameConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/ClassNameConflict.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/ClassNameConflict.kt"); } @TestMetadata("ClassNameConflictNoPackageImport.kt") public void testClassNameConflictNoPackageImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/ClassNameConflictNoPackageImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/ClassNameConflictNoPackageImport.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/classObject.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/classObject.kt"); } @TestMetadata("descriptorsChangeAfterImportInsertion.kt") public void testDescriptorsChangeAfterImportInsertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/descriptorsChangeAfterImportInsertion.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/descriptorsChangeAfterImportInsertion.kt"); } @TestMetadata("extensionFunctionVarInvokedWithQualifier.kt") public void testExtensionFunctionVarInvokedWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/extensionFunctionVarInvokedWithQualifier.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/extensionFunctionVarInvokedWithQualifier.kt"); } @TestMetadata("hiddenByMoreSpecificDeclaration.kt") public void testHiddenByMoreSpecificDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/hiddenByMoreSpecificDeclaration.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/hiddenByMoreSpecificDeclaration.kt"); } @TestMetadata("InterfaceInExpression.kt") public void testInterfaceInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/InterfaceInExpression.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/InterfaceInExpression.kt"); } @TestMetadata("JavaStaticMethod.kt") public void testJavaStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/JavaStaticMethod.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/JavaStaticMethod.kt"); } @TestMetadata("KotlinRepeat.kt") public void testKotlinRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/KotlinRepeat.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/KotlinRepeat.kt"); } @TestMetadata("kt11633.kt") public void testKt11633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt11633.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt11633.kt"); } @TestMetadata("kt14370.kt") public void testKt14370() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt14370.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt14370.kt"); } @TestMetadata("noShortening.kt") public void testNoShortening() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/noShortening.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/noShortening.kt"); } @TestMetadata("PackagesToUseStarImports.kt") public void testPackagesToUseStarImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/PackagesToUseStarImports.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/PackagesToUseStarImports.kt"); } @TestMetadata("removeCompanionRefInCalleeExpression.kt") public void testRemoveCompanionRefInCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/removeCompanionRefInCalleeExpression.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/removeCompanionRefInCalleeExpression.kt"); } @TestMetadata("removeCompanionRefWithQualifiedReceiverInCalleeExpression.kt") public void testRemoveCompanionRefWithQualifiedReceiverInCalleeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/removeCompanionRefWithQualifiedReceiverInCalleeExpression.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/removeCompanionRefWithQualifiedReceiverInCalleeExpression.kt"); } @TestMetadata("shortCompanionRefInsideShortenedCall.kt") public void testShortCompanionRefInsideShortenedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/shortCompanionRefInsideShortenedCall.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/shortCompanionRefInsideShortenedCall.kt"); } @TestMetadata("UnresolvedOverload.kt") public void testUnresolvedOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/UnresolvedOverload.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/UnresolvedOverload.kt"); } @TestMetadata("idea/testData/shortenRefs/constructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/constructor"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("Ambiguous.kt") public void testAmbiguous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/Ambiguous.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/Ambiguous.kt"); } @TestMetadata("GenericType.kt") public void testGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/GenericType.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/GenericType.kt"); } @TestMetadata("LeaveQualified.kt") public void testLeaveQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/LeaveQualified.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/LeaveQualified.kt"); } @TestMetadata("LeaveQualified1.kt") public void testLeaveQualified1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/LeaveQualified1.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/LeaveQualified1.kt"); } @TestMetadata("LeaveQualified2.kt") public void testLeaveQualified2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/LeaveQualified2.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/LeaveQualified2.kt"); } @TestMetadata("LeaveQualified3.kt") public void testLeaveQualified3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/LeaveQualified3.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/LeaveQualified3.kt"); } @TestMetadata("LeaveQualified5.kt") public void testLeaveQualified5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/LeaveQualified5.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/LeaveQualified5.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/NestedClass.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/NestedClass.kt"); } @TestMetadata("NestedClassWithImport.kt") public void testNestedClassWithImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/NestedClassWithImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/NestedClassWithImport.kt"); } @TestMetadata("NoImportNeeded.kt") public void testNoImportNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/NoImportNeeded.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/NoImportNeeded.kt"); } @TestMetadata("NoImportNeeded2.kt") public void testNoImportNeeded2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/NoImportNeeded2.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/NoImportNeeded2.kt"); } @TestMetadata("NoImportNeeded3.kt") public void testNoImportNeeded3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/NoImportNeeded3.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/NoImportNeeded3.kt"); } @TestMetadata("SAMConstructorFromLambda.kt") public void testSAMConstructorFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/SAMConstructorFromLambda.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/SAMConstructorFromLambda.kt"); } @TestMetadata("String.kt") public void testString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/String.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/String.kt"); } @TestMetadata("WorksForClassNameRange.kt") public void testWorksForClassNameRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/WorksForClassNameRange.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/WorksForClassNameRange.kt"); } @TestMetadata("WorksForClassNameRange2.kt") public void testWorksForClassNameRange2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/constructor/WorksForClassNameRange2.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/constructor/WorksForClassNameRange2.kt"); } } @@ -248,26 +221,27 @@ public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Imports extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImports() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/imports"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("importGlobalCallables.kt") public void testImportGlobalCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/imports/importGlobalCallables.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/imports/importGlobalCallables.kt"); } @TestMetadata("leaveQualifiedConstructor.kt") public void testLeaveQualifiedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/imports/leaveQualifiedConstructor.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/imports/leaveQualifiedConstructor.kt"); } @TestMetadata("leaveQualifiedType.kt") public void testLeaveQualifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/imports/leaveQualifiedType.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/imports/leaveQualifiedType.kt"); } } @@ -275,62 +249,57 @@ public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/java"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("innerClassImport.kt") public void testInnerClassImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/innerClassImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/innerClassImport.kt"); } @TestMetadata("innerClassNoImports.kt") public void testInnerClassNoImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/innerClassNoImports.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/innerClassNoImports.kt"); } @TestMetadata("innerClassOnDemandImport.kt") public void testInnerClassOnDemandImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/innerClassOnDemandImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/innerClassOnDemandImport.kt"); } @TestMetadata("staticClassNoImports.kt") public void testStaticClassNoImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/staticClassNoImports.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/staticClassNoImports.kt"); } @TestMetadata("staticClassOnDemandImport.kt") public void testStaticClassOnDemandImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/staticClassOnDemandImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/staticClassOnDemandImport.kt"); } @TestMetadata("staticFieldNoImports.kt") public void testStaticFieldNoImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/staticFieldNoImports.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/staticFieldNoImports.kt"); } @TestMetadata("staticFieldOnDemandImport.kt") public void testStaticFieldOnDemandImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/staticFieldOnDemandImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/staticFieldOnDemandImport.kt"); } @TestMetadata("staticMethodNoImports.kt") public void testStaticMethodNoImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/staticMethodNoImports.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/staticMethodNoImports.kt"); } @TestMetadata("staticMethodOnDemandImport.kt") public void testStaticMethodOnDemandImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/java/staticMethodOnDemandImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/java/staticMethodOnDemandImport.kt"); } } @@ -338,38 +307,37 @@ public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kt21515 extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKt21515() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/kt21515"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("callableReferenceOnClass.kt") public void testCallableReferenceOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt21515/callableReferenceOnClass.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt21515/callableReferenceOnClass.kt"); } @TestMetadata("callableReferenceOnClassWithCompanion.kt") public void testCallableReferenceOnClassWithCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt21515/callableReferenceOnClassWithCompanion.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt21515/callableReferenceOnClassWithCompanion.kt"); } @TestMetadata("callableReferenceOnObject.kt") public void testCallableReferenceOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt21515/callableReferenceOnObject.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt21515/callableReferenceOnObject.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt21515/constructor.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt21515/constructor.kt"); } @TestMetadata("typeReference.kt") public void testTypeReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/kt21515/typeReference.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/kt21515/typeReference.kt"); } } @@ -377,56 +345,52 @@ public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class This extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/this"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("cantShortenThis.kt") public void testCantShortenThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/cantShortenThis.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/cantShortenThis.kt"); } @TestMetadata("cantShortenThisLabel.kt") public void testCantShortenThisLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/cantShortenThisLabel.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/cantShortenThisLabel.kt"); } @TestMetadata("shortenExtensionThis.kt") public void testShortenExtensionThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/shortenExtensionThis.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/shortenExtensionThis.kt"); } @TestMetadata("shortenThis.kt") public void testShortenThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/shortenThis.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/shortenThis.kt"); } @TestMetadata("shortenThisBothReceivers.kt") public void testShortenThisBothReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/shortenThisBothReceivers.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/shortenThisBothReceivers.kt"); } @TestMetadata("shortenThisLabel.kt") public void testShortenThisLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/shortenThisLabel.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/shortenThisLabel.kt"); } @TestMetadata("shortenThisWithLabel.kt") public void testShortenThisWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/shortenThisWithLabel.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/shortenThisWithLabel.kt"); } @TestMetadata("visitorConflict.kt") public void testVisitorConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/this/visitorConflict.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/this/visitorConflict.kt"); } } @@ -434,116 +398,102 @@ public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Type extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/type"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("ClassNameInsideArguments.kt") public void testClassNameInsideArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/ClassNameInsideArguments.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/ClassNameInsideArguments.kt"); } @TestMetadata("ClassNameInsideLambda.kt") public void testClassNameInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/ClassNameInsideLambda.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/ClassNameInsideLambda.kt"); } @TestMetadata("ClassSameNameAsPackage.kt") public void testClassSameNameAsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/ClassSameNameAsPackage.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/ClassSameNameAsPackage.kt"); } @TestMetadata("delegationSpecifier.kt") public void testDelegationSpecifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/delegationSpecifier.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/delegationSpecifier.kt"); } @TestMetadata("FunctionType.kt") public void testFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/FunctionType.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/FunctionType.kt"); } @TestMetadata("GenericType.kt") public void testGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/GenericType.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/GenericType.kt"); } @TestMetadata("GenericType2.kt") public void testGenericType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/GenericType2.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/GenericType2.kt"); } @TestMetadata("GenericType3.kt") public void testGenericType3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/GenericType3.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/GenericType3.kt"); } @TestMetadata("LeaveQualified.kt") public void testLeaveQualified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/LeaveQualified.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/LeaveQualified.kt"); } @TestMetadata("NestedClass.kt") public void testNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/NestedClass.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/NestedClass.kt"); } @TestMetadata("NestedClassRefInImport.kt") public void testNestedClassRefInImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/NestedClassRefInImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/NestedClassRefInImport.kt"); } @TestMetadata("NoImportNeeded.kt") public void testNoImportNeeded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/NoImportNeeded.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/NoImportNeeded.kt"); } @TestMetadata("NoImportNeeded2.kt") public void testNoImportNeeded2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/NoImportNeeded2.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/NoImportNeeded2.kt"); } @TestMetadata("NullableType.kt") public void testNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/NullableType.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/NullableType.kt"); } @TestMetadata("OtherClassWithThisNameImported.kt") public void testOtherClassWithThisNameImported() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/OtherClassWithThisNameImported.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/OtherClassWithThisNameImported.kt"); } @TestMetadata("SameClassTwice.kt") public void testSameClassTwice() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/SameClassTwice.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/SameClassTwice.kt"); } @TestMetadata("SimpleAddImport.kt") public void testSimpleAddImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/SimpleAddImport.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/SimpleAddImport.kt"); } @TestMetadata("TwoClassesSameNames.kt") public void testTwoClassesSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/type/TwoClassesSameNames.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/type/TwoClassesSameNames.kt"); } } @@ -551,32 +501,32 @@ public class ShortenRefsTestGenerated extends AbstractShortenRefsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractShortenRefsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/shortenRefs/typealias"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("TypeAliasAsCtor.kt") public void testTypeAliasAsCtor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/typealias/TypeAliasAsCtor.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/typealias/TypeAliasAsCtor.kt"); } @TestMetadata("TypeAliasAsObject.kt") public void testTypeAliasAsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/typealias/TypeAliasAsObject.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/typealias/TypeAliasAsObject.kt"); } @TestMetadata("TypeAliasAsType.kt") public void testTypeAliasAsType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/typealias/TypeAliasAsType.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/typealias/TypeAliasAsType.kt"); } @TestMetadata("TypeAliasAsTypeArgument.kt") public void testTypeAliasAsTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("idea/testData/shortenRefs/typealias/TypeAliasAsTypeArgument.kt"); - doTest(fileName); + runTest("idea/testData/shortenRefs/typealias/TypeAliasAsTypeArgument.kt"); } } } diff --git a/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterForWebDemoTestGenerated.java b/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterForWebDemoTestGenerated.java index 07363065b72..963bac421d3 100644 --- a/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterForWebDemoTestGenerated.java +++ b/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterForWebDemoTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFileOrElement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @@ -29,116 +33,102 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("annotationArrayArgument.java") public void testAnnotationArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationArrayArgument.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationArrayArgument.java"); } @TestMetadata("annotationDefault.java") public void testAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationDefault.java"); } @TestMetadata("annotationFromConstructorParamToProperty.java") public void testAnnotationFromConstructorParamToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.java"); } @TestMetadata("annotationInterface1.java") public void testAnnotationInterface1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface1.java"); } @TestMetadata("annotationInterface2.java") public void testAnnotationInterface2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface2.java"); } @TestMetadata("annotationInterface3.java") public void testAnnotationInterface3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface3.java"); } @TestMetadata("annotationInterface4.java") public void testAnnotationInterface4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface4.java"); } @TestMetadata("annotationUsages.java") public void testAnnotationUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationUsages.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationUsages.java"); } @TestMetadata("annotationsFromPropertyAccessors.java") public void testAnnotationsFromPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationsFromPropertyAccessors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationsFromPropertyAccessors.java"); } @TestMetadata("javaClassArgument.java") public void testJavaClassArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/javaClassArgument.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/javaClassArgument.java"); } @TestMetadata("javaClassArrayArgument.java") public void testJavaClassArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/javaClassArrayArgument.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/javaClassArrayArgument.java"); } @TestMetadata("jetbrainsNotNull.java") public void testJetbrainsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/jetbrainsNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/jetbrainsNotNull.java"); } @TestMetadata("jetbrainsNotNullChainExpr.java") public void testJetbrainsNotNullChainExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/jetbrainsNotNullChainExpr.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/jetbrainsNotNullChainExpr.java"); } @TestMetadata("jetbrainsNullable.java") public void testJetbrainsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/jetbrainsNullable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/jetbrainsNullable.java"); } @TestMetadata("modifiersToAnnotationsFromPropertyAccessors.java") public void testModifiersToAnnotationsFromPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/modifiersToAnnotationsFromPropertyAccessors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/modifiersToAnnotationsFromPropertyAccessors.java"); } @TestMetadata("primaryConstructorAnnotation.java") public void testPrimaryConstructorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/primaryConstructorAnnotation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/primaryConstructorAnnotation.java"); } @TestMetadata("serialVersionUID.java") public void testSerialVersionUID() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/serialVersionUID.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/serialVersionUID.java"); } @TestMetadata("suppressWarnings.java") public void testSuppressWarnings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/suppressWarnings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/suppressWarnings.java"); } } @@ -146,20 +136,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousBlock extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousBlock() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/anonymousBlock"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("oneAnonBlock.java") public void testOneAnonBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousBlock/oneAnonBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousBlock/oneAnonBlock.java"); } @TestMetadata("oneStaticAnonBlock.java") public void testOneStaticAnonBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.java"); } } @@ -167,20 +159,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousClass extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/anonymousClass"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("kt-13146.java") public void testKt_13146() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousClass/kt-13146.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousClass/kt-13146.java"); } @TestMetadata("localSelfReference.java") public void testLocalSelfReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousClass/localSelfReference.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousClass/localSelfReference.java"); } } @@ -188,26 +182,27 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayAccessExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayAccessExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/arrayAccessExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("expressionIndex.java") public void testExpressionIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayAccessExpression/expressionIndex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayAccessExpression/expressionIndex.java"); } @TestMetadata("intIndex.java") public void testIntIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayAccessExpression/intIndex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayAccessExpression/intIndex.java"); } @TestMetadata("variableIndex.java") public void testVariableIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayAccessExpression/variableIndex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayAccessExpression/variableIndex.java"); } } @@ -215,80 +210,72 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayInitializerExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayInitializerExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/arrayInitializerExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("doubleArray.java") public void testDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArray.java"); } @TestMetadata("doubleArrayWithVariables.java") public void testDoubleArrayWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArrayWithVariables.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArrayWithVariables.java"); } @TestMetadata("floatArray.java") public void testFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/floatArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/floatArray.java"); } @TestMetadata("intArrayWithLength.java") public void testIntArrayWithLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/intArrayWithLength.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/intArrayWithLength.java"); } @TestMetadata("javaLangDoubleArray.java") public void testJavaLangDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangDoubleArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangDoubleArray.java"); } @TestMetadata("javaLangFloatArray.java") public void testJavaLangFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangFloatArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangFloatArray.java"); } @TestMetadata("newByte.java") public void testNewByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/newByte.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/newByte.java"); } @TestMetadata("newInt.java") public void testNewInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/newInt.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/newInt.java"); } @TestMetadata("objectArrayWithLength.java") public void testObjectArrayWithLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/objectArrayWithLength.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/objectArrayWithLength.java"); } @TestMetadata("oneDim.java") public void testOneDim() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/oneDim.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/oneDim.java"); } @TestMetadata("oneDimWithVariables.java") public void testOneDimWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/oneDimWithVariables.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/oneDimWithVariables.java"); } @TestMetadata("twoDim.java") public void testTwoDim() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/twoDim.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/twoDim.java"); } } @@ -296,68 +283,62 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayType extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/arrayType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("arrayInitializationStatement.java") public void testArrayInitializationStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatement.java"); } @TestMetadata("arrayInitializationStatementWithDimension.java") public void testArrayInitializationStatementWithDimension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension.java"); } @TestMetadata("arrayInitializationStatementWithDimension3d.java") public void testArrayInitializationStatementWithDimension3d() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension3d.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension3d.java"); } @TestMetadata("arrayInitializationStatementWithDimensionExplicit.java") public void testArrayInitializationStatementWithDimensionExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimensionExplicit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimensionExplicit.java"); } @TestMetadata("d2StringEmptyArray.java") public void testD2StringEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/d2StringEmptyArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/d2StringEmptyArray.java"); } @TestMetadata("d3StringEmptyArray.java") public void testD3StringEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/d3StringEmptyArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/d3StringEmptyArray.java"); } @TestMetadata("longArray.java") public void testLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/longArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/longArray.java"); } @TestMetadata("methodArrayArgs.java") public void testMethodArrayArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/methodArrayArgs.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/methodArrayArgs.java"); } @TestMetadata("newIntArray.java") public void testNewIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/newIntArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/newIntArray.java"); } @TestMetadata("newStringArray.java") public void testNewStringArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/newStringArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/newStringArray.java"); } } @@ -365,38 +346,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssertStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssertStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/assertStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("assertNotNull.java") public void testAssertNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/assertNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/assertNotNull.java"); } @TestMetadata("onlyCondition.java") public void testOnlyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/onlyCondition.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/onlyCondition.java"); } @TestMetadata("onlyConditionWithBraces.java") public void testOnlyConditionWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/onlyConditionWithBraces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/onlyConditionWithBraces.java"); } @TestMetadata("withStringDetail.java") public void testWithStringDetail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/withStringDetail.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/withStringDetail.java"); } @TestMetadata("withStringDetail2.java") public void testWithStringDetail2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/withStringDetail2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/withStringDetail2.java"); } } @@ -404,116 +384,102 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssignmentExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignmentExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/assignmentExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("and.java") public void testAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/and.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/and.java"); } @TestMetadata("assignment.java") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/assignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/assignment.java"); } @TestMetadata("assignmentAsExpression.java") public void testAssignmentAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/assignmentAsExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/assignmentAsExpression.java"); } @TestMetadata("bitOperationPriority.java") public void testBitOperationPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriority.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriority.java"); } @TestMetadata("bitOperationPriorityComments.java") public void testBitOperationPriorityComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriorityComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriorityComments.java"); } @TestMetadata("divideAssign.java") public void testDivideAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/divideAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/divideAssign.java"); } @TestMetadata("minusAssign.java") public void testMinusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/minusAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/minusAssign.java"); } @TestMetadata("multiplyAssign.java") public void testMultiplyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/multiplyAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/multiplyAssign.java"); } @TestMetadata("nullability.java") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/nullability.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/nullability.java"); } @TestMetadata("nullability-settings.java") public void testNullability_settings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/nullability-settings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/nullability-settings.java"); } @TestMetadata("or.java") public void testOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/or.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/or.java"); } @TestMetadata("plusAssign.java") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/plusAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/plusAssign.java"); } @TestMetadata("reminder.java") public void testReminder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/reminder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/reminder.java"); } @TestMetadata("shiftLeft.java") public void testShiftLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/shiftLeft.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/shiftLeft.java"); } @TestMetadata("shiftRight.java") public void testShiftRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/shiftRight.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/shiftRight.java"); } @TestMetadata("simpleAssignment.java") public void testSimpleAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/simpleAssignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/simpleAssignment.java"); } @TestMetadata("unsignedRightShift.java") public void testUnsignedRightShift() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/unsignedRightShift.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/unsignedRightShift.java"); } @TestMetadata("xor.java") public void testXor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/xor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/xor.java"); } } @@ -521,128 +487,112 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/binaryExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("and.java") public void testAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/and.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/and.java"); } @TestMetadata("conditionalAnd.java") public void testConditionalAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/conditionalAnd.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/conditionalAnd.java"); } @TestMetadata("conditionalOr.java") public void testConditionalOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/conditionalOr.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/conditionalOr.java"); } @TestMetadata("divide.java") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/divide.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/divide.java"); } @TestMetadata("greaterThan.java") public void testGreaterThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/greaterThan.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/greaterThan.java"); } @TestMetadata("greaterThanEqual.java") public void testGreaterThanEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/greaterThanEqual.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/greaterThanEqual.java"); } @TestMetadata("lessThan.java") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/lessThan.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/lessThan.java"); } @TestMetadata("lessThanEqual.java") public void testLessThanEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/lessThanEqual.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/lessThanEqual.java"); } @TestMetadata("lhsObjectPlusString.java") public void testLhsObjectPlusString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/lhsObjectPlusString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/lhsObjectPlusString.java"); } @TestMetadata("minus.java") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/minus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/minus.java"); } @TestMetadata("multiplePlusMinus.java") public void testMultiplePlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/multiplePlusMinus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/multiplePlusMinus.java"); } @TestMetadata("multiply.java") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/multiply.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/multiply.java"); } @TestMetadata("or.java") public void testOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/or.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/or.java"); } @TestMetadata("orWithNewLine.java") public void testOrWithNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/orWithNewLine.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/orWithNewLine.java"); } @TestMetadata("plus.java") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/plus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/plus.java"); } @TestMetadata("remainder.java") public void testRemainder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/remainder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/remainder.java"); } @TestMetadata("shiftLeft.java") public void testShiftLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/shiftLeft.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/shiftLeft.java"); } @TestMetadata("shiftRight.java") public void testShiftRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/shiftRight.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/shiftRight.java"); } @TestMetadata("unsignedRightShift.java") public void testUnsignedRightShift() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/unsignedRightShift.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/unsignedRightShift.java"); } @TestMetadata("xor.java") public void testXor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/xor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/xor.java"); } } @@ -650,14 +600,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Blocks extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBlocks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/blocks"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Blocks.java") public void testBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/blocks/Blocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/blocks/Blocks.java"); } } @@ -665,74 +618,67 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxedType extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxedType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/boxedType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("boolean.java") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/boolean.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/boolean.java"); } @TestMetadata("Boxing.java") public void testBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/Boxing.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/Boxing.java"); } @TestMetadata("byte.java") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/byte.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/byte.java"); } @TestMetadata("character.java") public void testCharacter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/character.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/character.java"); } @TestMetadata("double.java") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/double.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/double.java"); } @TestMetadata("float.java") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/float.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/float.java"); } @TestMetadata("integer.java") public void testInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/integer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/integer.java"); } @TestMetadata("kt-671.java") public void testKt_671() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/kt-671.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/kt-671.java"); } @TestMetadata("long.java") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/long.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/long.java"); } @TestMetadata("object.java") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/object.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/object.java"); } @TestMetadata("short.java") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/short.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/short.java"); } } @@ -740,20 +686,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BreakStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBreakStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/breakStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("breakWithLabel.java") public void testBreakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/breakStatement/breakWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/breakStatement/breakWithLabel.java"); } @TestMetadata("breakWithoutLabel.java") public void testBreakWithoutLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/breakStatement/breakWithoutLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/breakStatement/breakWithoutLabel.java"); } } @@ -761,44 +709,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallChainExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallChainExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/callChainExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("libraryFieldCall.java") public void testLibraryFieldCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.java"); } @TestMetadata("libraryMethodCall.java") public void testLibraryMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.java"); } @TestMetadata("libraryMethodCallFromInstance.java") public void testLibraryMethodCallFromInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance.java"); } @TestMetadata("libraryMethodCallFromInstance-settings.java") public void testLibraryMethodCallFromInstance_settings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance-settings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance-settings.java"); } @TestMetadata("libraryStringFieldCall.java") public void testLibraryStringFieldCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryStringFieldCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryStringFieldCall.java"); } @TestMetadata("sout.java") public void testSout() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/sout.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/sout.java"); } } @@ -806,16 +752,18 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractClass.java") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/abstractClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/abstractClass.java"); } @TestMetadata("abstractClassShape.java") public void testAbstractClassShape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/abstractClassShape.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/abstractClassShape.java"); } public void testAllFilesPresentInClass() throws Exception { @@ -824,200 +772,167 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("anonymousClass.java") public void testAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/anonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/anonymousClass.java"); } @TestMetadata("class.java") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/class.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/class.java"); } @TestMetadata("ClassShadowing.java") public void testClassShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/ClassShadowing.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/ClassShadowing.java"); } @TestMetadata("classWithEmptyMethods.java") public void testClassWithEmptyMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/classWithEmptyMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/classWithEmptyMethods.java"); } @TestMetadata("classWithFields.java") public void testClassWithFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/classWithFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/classWithFields.java"); } @TestMetadata("classWithMultiplyFields.java") public void testClassWithMultiplyFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/classWithMultiplyFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/classWithMultiplyFields.java"); } @TestMetadata("emptyClass.java") public void testEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/emptyClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/emptyClass.java"); } @TestMetadata("extendsOneClassAndImplementsOneInterface.java") public void testExtendsOneClassAndImplementsOneInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsOneInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsOneInterface.java"); } @TestMetadata("extendsOneClassAndImplementsSeveralInterfaces.java") public void testExtendsOneClassAndImplementsSeveralInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsSeveralInterfaces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsSeveralInterfaces.java"); } @TestMetadata("finalClass.java") public void testFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/finalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/finalClass.java"); } @TestMetadata("genericClass.java") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/genericClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/genericClass.java"); } @TestMetadata("innerClassInInterface.java") public void testInnerClassInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerClassInInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerClassInInterface.java"); } @TestMetadata("innerEmptyClass.java") public void testInnerEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerEmptyClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerEmptyClass.java"); } @TestMetadata("innerEnum.java") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerEnum.java"); } @TestMetadata("innerInterface.java") public void testInnerInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerInterface.java"); } @TestMetadata("innerStaticClass.java") public void testInnerStaticClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerStaticClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerStaticClass.java"); } @TestMetadata("internalClass.java") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/internalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/internalClass.java"); } @TestMetadata("kt-639.java") public void testKt_639() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/kt-639.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/kt-639.java"); } @TestMetadata("notUtilityClass.java") public void testNotUtilityClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/notUtilityClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/notUtilityClass.java"); } @TestMetadata("oneStaticFieldOneNonStatic.java") public void testOneStaticFieldOneNonStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.java"); } @TestMetadata("oneStaticMethod.java") public void testOneStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/oneStaticMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/oneStaticMethod.java"); } @TestMetadata("oneStaticMethodOneNonStatic.java") public void testOneStaticMethodOneNonStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.java"); } @TestMetadata("pivateClass.java") public void testPivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/pivateClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/pivateClass.java"); } @TestMetadata("privateInit.java") public void testPrivateInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/privateInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/privateInit.java"); } @TestMetadata("protectedClass.java") public void testProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/protectedClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/protectedClass.java"); } @TestMetadata("publicClass.java") public void testPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/publicClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/publicClass.java"); } @TestMetadata("simpleInheritance.java") public void testSimpleInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/simpleInheritance.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/simpleInheritance.java"); } @TestMetadata("twoStaticMethod.java") public void testTwoStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/twoStaticMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/twoStaticMethod.java"); } @TestMetadata("utilityClass1.java") public void testUtilityClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass1.java"); } @TestMetadata("utilityClass2.java") public void testUtilityClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass2.java"); } @TestMetadata("utilityClass3.java") public void testUtilityClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass3.java"); } @TestMetadata("utilityClass4.java") public void testUtilityClass4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass4.java"); } @TestMetadata("utilityClass5.java") public void testUtilityClass5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass5.java"); } } @@ -1025,32 +940,32 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/classExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("complexExample.java") public void testComplexExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/complexExample.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/complexExample.java"); } @TestMetadata("objectClass.java") public void testObjectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/objectClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/objectClass.java"); } @TestMetadata("primitivesAndArrays.java") public void testPrimitivesAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/primitivesAndArrays.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/primitivesAndArrays.java"); } @TestMetadata("stringClass.java") public void testStringClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/stringClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/stringClass.java"); } } @@ -1058,50 +973,47 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Comments extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/comments"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("commentInsideCall.java") public void testCommentInsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/commentInsideCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/commentInsideCall.java"); } @TestMetadata("comments.java") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/comments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/comments.java"); } @TestMetadata("comments2.java") public void testComments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/comments2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/comments2.java"); } @TestMetadata("commentsForConstructors.java") public void testCommentsForConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/commentsForConstructors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/commentsForConstructors.java"); } @TestMetadata("fieldWithEndOfLineComment.java") public void testFieldWithEndOfLineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/fieldWithEndOfLineComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/fieldWithEndOfLineComment.java"); } @TestMetadata("fieldsInitializedFromParams.java") public void testFieldsInitializedFromParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.java"); } @TestMetadata("removeNoInspectionComment.java") public void testRemoveNoInspectionComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/removeNoInspectionComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/removeNoInspectionComment.java"); } } @@ -1109,20 +1021,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConditionalExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConditionalExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/conditionalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("multiline.java") public void testMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/conditionalExpression/multiline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/conditionalExpression/multiline.java"); } @TestMetadata("simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/conditionalExpression/simple.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/conditionalExpression/simple.java"); } } @@ -1130,16 +1044,18 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("allCallsPrimary.java") public void testAllCallsPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/allCallsPrimary.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/allCallsPrimary.java"); } @TestMetadata("allCallsPrimary2.java") public void testAllCallsPrimary2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/allCallsPrimary2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/allCallsPrimary2.java"); } public void testAllFilesPresentInConstructors() throws Exception { @@ -1148,236 +1064,197 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("artificialPrimary.java") public void testArtificialPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/artificialPrimary.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/artificialPrimary.java"); } @TestMetadata("chain.java") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/chain.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/chain.java"); } @TestMetadata("constructorAnnotations.java") public void testConstructorAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/constructorAnnotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/constructorAnnotations.java"); } @TestMetadata("customerBuilder.java") public void testCustomerBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/customerBuilder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/customerBuilder.java"); } @TestMetadata("fieldsInitializedFromParams1.java") public void testFieldsInitializedFromParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams1.java"); } @TestMetadata("fieldsInitializedFromParams2.java") public void testFieldsInitializedFromParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams2.java"); } @TestMetadata("fieldsInitializedFromParams3.java") public void testFieldsInitializedFromParams3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams3.java"); } @TestMetadata("fieldsInitializedFromParams4.java") public void testFieldsInitializedFromParams4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams4.java"); } @TestMetadata("fieldsInitializedFromParams5.java") public void testFieldsInitializedFromParams5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams5.java"); } @TestMetadata("fieldsInitializedFromParams6.java") public void testFieldsInitializedFromParams6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams6.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams6.java"); } @TestMetadata("fieldsInitializedFromParams7.java") public void testFieldsInitializedFromParams7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams7.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams7.java"); } @TestMetadata("fieldsInitializedFromParams8.java") public void testFieldsInitializedFromParams8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams8.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams8.java"); } @TestMetadata("fieldsInitializedFromParams9.java") public void testFieldsInitializedFromParams9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams9.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams9.java"); } @TestMetadata("fieldsInitializedFromParamsAnnotations.java") public void testFieldsInitializedFromParamsAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParamsAnnotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParamsAnnotations.java"); } @TestMetadata("genericIdentifier.java") public void testGenericIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/genericIdentifier.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/genericIdentifier.java"); } @TestMetadata("identifier.java") public void testIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/identifier.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/identifier.java"); } @TestMetadata("lineBreaksBetweenParameters.java") public void testLineBreaksBetweenParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.java"); } @TestMetadata("methodCallInFactoryFun.java") public void testMethodCallInFactoryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.java"); } @TestMetadata("nestedClassNameInParameterDefaults.java") public void testNestedClassNameInParameterDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.java"); } @TestMetadata("nestedClassNameInParameterDefaults2.java") public void testNestedClassNameInParameterDefaults2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.java"); } @TestMetadata("nestedClassNameInParameterDefaults3.java") public void testNestedClassNameInParameterDefaults3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.java"); } @TestMetadata("nestedClassNameInParameterDefaults4.java") public void testNestedClassNameInParameterDefaults4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.java"); } @TestMetadata("nestedClassNameInSuperParameters.java") public void testNestedClassNameInSuperParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.java"); } @TestMetadata("noPrimary.java") public void testNoPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/noPrimary.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/noPrimary.java"); } @TestMetadata("parameterDefaults1.java") public void testParameterDefaults1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults1.java"); } @TestMetadata("parameterDefaults2.java") public void testParameterDefaults2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults2.java"); } @TestMetadata("parameterDefaults3.java") public void testParameterDefaults3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults3.java"); } @TestMetadata("parameterDefaults4.java") public void testParameterDefaults4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults4.java"); } @TestMetadata("parameterDefaults5.java") public void testParameterDefaults5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults5.java"); } @TestMetadata("parameterModification.java") public void testParameterModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterModification.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterModification.java"); } @TestMetadata("privateConstructors.java") public void testPrivateConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/privateConstructors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/privateConstructors.java"); } @TestMetadata("qualifiedRefInFactoryFun.java") public void testQualifiedRefInFactoryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/qualifiedRefInFactoryFun.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/qualifiedRefInFactoryFun.java"); } @TestMetadata("secondaryConstructorWithDefaultValues.java") public void testSecondaryConstructorWithDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues.java"); } @TestMetadata("secondaryConstructorWithDefaultValues2.java") public void testSecondaryConstructorWithDefaultValues2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues2.java"); } @TestMetadata("secondaryConstructorsInInnerClass.java") public void testSecondaryConstructorsInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorsInInnerClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorsInInnerClass.java"); } @TestMetadata("secondaryConstructorsInNestedClass.java") public void testSecondaryConstructorsInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.java"); } @TestMetadata("secondaryConstructorsVisibility.java") public void testSecondaryConstructorsVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorsVisibility.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorsVisibility.java"); } @TestMetadata("staticFieldRefInFactoryFun.java") public void testStaticFieldRefInFactoryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.java"); } @TestMetadata("withManyDefaultParams.java") public void testWithManyDefaultParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/withManyDefaultParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/withManyDefaultParams.java"); } } @@ -1385,20 +1262,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ContinueStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContinueStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/continueStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("continueWithLabel.java") public void testContinueWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/continueStatement/continueWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/continueStatement/continueWithLabel.java"); } @TestMetadata("continueWithoutLabel.java") public void testContinueWithoutLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/continueStatement/continueWithoutLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/continueStatement/continueWithoutLabel.java"); } } @@ -1406,44 +1285,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/declarationStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("multiplyFinalIntDeclaration.java") public void testMultiplyFinalIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/multiplyFinalIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/multiplyFinalIntDeclaration.java"); } @TestMetadata("multiplyIntDeclaration.java") public void testMultiplyIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/multiplyIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/multiplyIntDeclaration.java"); } @TestMetadata("singleFinalIntDeclaration.java") public void testSingleFinalIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleFinalIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleFinalIntDeclaration.java"); } @TestMetadata("singleFinalStringDeclaration.java") public void testSingleFinalStringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleFinalStringDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleFinalStringDeclaration.java"); } @TestMetadata("singleIntDeclaration.java") public void testSingleIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleIntDeclaration.java"); } @TestMetadata("singleStringDeclaration.java") public void testSingleStringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleStringDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleStringDeclaration.java"); } } @@ -1451,22 +1328,23 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DetectProperties extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractPropertyPrivateSetter.java") public void testAbstractPropertyPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AbstractPropertyPrivateSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AbstractPropertyPrivateSetter.java"); } @TestMetadata("AccessInGetterWithThis.java") public void testAccessInGetterWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AccessInGetterWithThis.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AccessInGetterWithThis.java"); } @TestMetadata("AccessorsImplementInterface.java") public void testAccessorsImplementInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AccessorsImplementInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AccessorsImplementInterface.java"); } public void testAllFilesPresentInDetectProperties() throws Exception { @@ -1475,260 +1353,217 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("AnonymousClass.java") public void testAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AnonymousClass.java"); } @TestMetadata("AssignFieldInsideSetter.java") public void testAssignFieldInsideSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter.java"); } @TestMetadata("AssignFieldInsideSetter2.java") public void testAssignFieldInsideSetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter2.java"); } @TestMetadata("CannotDropOnlySetter.java") public void testCannotDropOnlySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/CannotDropOnlySetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/CannotDropOnlySetter.java"); } @TestMetadata("Comments.java") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/Comments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/Comments.java"); } @TestMetadata("DataClass.java") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DataClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DataClass.java"); } @TestMetadata("DataClassWithAnnotations.java") public void testDataClassWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.java"); } @TestMetadata("DataClassWithMutableField.java") public void testDataClassWithMutableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DataClassWithMutableField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DataClassWithMutableField.java"); } @TestMetadata("DifferentFieldName.java") public void testDifferentFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentFieldName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentFieldName.java"); } @TestMetadata("DifferentFieldNameAndDefaultParameterValue.java") public void testDifferentFieldNameAndDefaultParameterValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndDefaultParameterValue.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndDefaultParameterValue.java"); } @TestMetadata("DifferentFieldNameAndSuperClass.java") public void testDifferentFieldNameAndSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndSuperClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndSuperClass.java"); } @TestMetadata("DifferentProtectedFieldName.java") public void testDifferentProtectedFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentProtectedFieldName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentProtectedFieldName.java"); } @TestMetadata("DropGetter.java") public void testDropGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DropGetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DropGetter.java"); } @TestMetadata("DropGetterAndSetter.java") public void testDropGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DropGetterAndSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DropGetterAndSetter.java"); } @TestMetadata("DropGetterForMutable.java") public void testDropGetterForMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DropGetterForMutable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DropGetterForMutable.java"); } @TestMetadata("FalseGetter.java") public void testFalseGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/FalseGetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/FalseGetter.java"); } @TestMetadata("FalseSetter.java") public void testFalseSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/FalseSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/FalseSetter.java"); } @TestMetadata("FieldUsagesInFactoryMethods.java") public void testFieldUsagesInFactoryMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/FieldUsagesInFactoryMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/FieldUsagesInFactoryMethods.java"); } @TestMetadata("GetterAndSetterNamesDifferent.java") public void testGetterAndSetterNamesDifferent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterAndSetterNamesDifferent.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterAndSetterNamesDifferent.java"); } @TestMetadata("GetterSetterUsages.java") public void testGetterSetterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterSetterUsages.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterSetterUsages.java"); } @TestMetadata("GetterTypeNotMatch.java") public void testGetterTypeNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterTypeNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterTypeNotMatch.java"); } @TestMetadata("GetterWithSideEffect1.java") public void testGetterWithSideEffect1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect1.java"); } @TestMetadata("GetterWithSideEffect2.java") public void testGetterWithSideEffect2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect2.java"); } @TestMetadata("GetterWithSideEffect3.java") public void testGetterWithSideEffect3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect3.java"); } @TestMetadata("GetterWithSideEffect4.java") public void testGetterWithSideEffect4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect4.java"); } @TestMetadata("GetterWithSideEffect5.java") public void testGetterWithSideEffect5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect5.java"); } @TestMetadata("InCompanionObject.java") public void testInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/InCompanionObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/InCompanionObject.java"); } @TestMetadata("InInterface.java") public void testInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/InInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/InInterface.java"); } @TestMetadata("InObject.java") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/InObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/InObject.java"); } @TestMetadata("IsPrefix.java") public void testIsPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/IsPrefix.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/IsPrefix.java"); } @TestMetadata("JavaKeywordPropertyName.java") public void testJavaKeywordPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/JavaKeywordPropertyName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/JavaKeywordPropertyName.java"); } @TestMetadata("KeywordPropertyName.java") public void testKeywordPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/KeywordPropertyName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/KeywordPropertyName.java"); } @TestMetadata("Overrides.java") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/Overrides.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/Overrides.java"); } @TestMetadata("OverridesOfExternalCode.java") public void testOverridesOfExternalCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/OverridesOfExternalCode.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/OverridesOfExternalCode.java"); } @TestMetadata("PropertyAndFieldConflicts.java") public void testPropertyAndFieldConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/PropertyAndFieldConflicts.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/PropertyAndFieldConflicts.java"); } @TestMetadata("PropertyType.java") public void testPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/PropertyType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/PropertyType.java"); } @TestMetadata("SetterTypeNotMatch.java") public void testSetterTypeNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterTypeNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterTypeNotMatch.java"); } @TestMetadata("SetterWithSideEffect1.java") public void testSetterWithSideEffect1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect1.java"); } @TestMetadata("SetterWithSideEffect2.java") public void testSetterWithSideEffect2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect2.java"); } @TestMetadata("SetterWithSideEffect3.java") public void testSetterWithSideEffect3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect3.java"); } @TestMetadata("SetterWithSideEffect4.java") public void testSetterWithSideEffect4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect4.java"); } @TestMetadata("SetterWithSideEffect5.java") public void testSetterWithSideEffect5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect5.java"); } @TestMetadata("SetterWithSideEffect6.java") public void testSetterWithSideEffect6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect6.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect6.java"); } } @@ -1736,38 +1571,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DoWhileStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDoWhileStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/doWhileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("whileWithAssignmentAsExpression.java") public void testWhileWithAssignmentAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithAssignmentAsExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithAssignmentAsExpression.java"); } @TestMetadata("whileWithBlock.java") public void testWhileWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithBlock.java"); } @TestMetadata("whileWithEmptyBlock.java") public void testWhileWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithEmptyBlock.java"); } @TestMetadata("whileWithExpression.java") public void testWhileWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithExpression.java"); } @TestMetadata("whileWithReturn.java") public void testWhileWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithReturn.java"); } } @@ -1775,10 +1609,13 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DocComments extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("aWithoutHref.java") public void testAWithoutHref() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/aWithoutHref.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/aWithoutHref.java"); } public void testAllFilesPresentInDocComments() throws Exception { @@ -1787,86 +1624,72 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("deprecatedDocTag.java") public void testDeprecatedDocTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/deprecatedDocTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/deprecatedDocTag.java"); } @TestMetadata("deprecatedDocTagWithAnnotation.java") public void testDeprecatedDocTagWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithAnnotation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithAnnotation.java"); } @TestMetadata("deprecatedDocTagWithMultiLineMessage.java") public void testDeprecatedDocTagWithMultiLineMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.java"); } @TestMetadata("docCommentWithParamTag.java") public void testDocCommentWithParamTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/docCommentWithParamTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/docCommentWithParamTag.java"); } @TestMetadata("escapedCharactersInCodeQuote.java") public void testEscapedCharactersInCodeQuote() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/escapedCharactersInCodeQuote.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/escapedCharactersInCodeQuote.java"); } @TestMetadata("htmlInDocComment.java") public void testHtmlInDocComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/htmlInDocComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/htmlInDocComment.java"); } @TestMetadata("inlineTagsInDocComment.java") public void testInlineTagsInDocComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/inlineTagsInDocComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/inlineTagsInDocComment.java"); } @TestMetadata("linkTag.java") public void testLinkTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/linkTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/linkTag.java"); } @TestMetadata("linkTagWithLabel.java") public void testLinkTagWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/linkTagWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/linkTagWithLabel.java"); } @TestMetadata("onlyDeprecatedDocTag.java") public void testOnlyDeprecatedDocTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/onlyDeprecatedDocTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/onlyDeprecatedDocTag.java"); } @TestMetadata("preserveUnknownTags.java") public void testPreserveUnknownTags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/preserveUnknownTags.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/preserveUnknownTags.java"); } @TestMetadata("primaryConstructorDoc.java") public void testPrimaryConstructorDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/primaryConstructorDoc.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/primaryConstructorDoc.java"); } @TestMetadata("quoted.java") public void testQuoted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/quoted.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/quoted.java"); } @TestMetadata("seeTag.java") public void testSeeTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/seeTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/seeTag.java"); } } @@ -1874,116 +1697,102 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("colorEnum.java") public void testColorEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/colorEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/colorEnum.java"); } @TestMetadata("companionObject.java") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/companionObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/companionObject.java"); } @TestMetadata("constantsWithBody1.java") public void testConstantsWithBody1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/constantsWithBody1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/constantsWithBody1.java"); } @TestMetadata("constantsWithBody2.java") public void testConstantsWithBody2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/constantsWithBody2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/constantsWithBody2.java"); } @TestMetadata("emptyEnum.java") public void testEmptyEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/emptyEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/emptyEnum.java"); } @TestMetadata("enumConstantIsNotNull.java") public void testEnumConstantIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumConstantIsNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumConstantIsNotNull.java"); } @TestMetadata("enumImplementsOneInterface.java") public void testEnumImplementsOneInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumImplementsOneInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumImplementsOneInterface.java"); } @TestMetadata("enumImplementsSeveralInterfaces.java") public void testEnumImplementsSeveralInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumImplementsSeveralInterfaces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumImplementsSeveralInterfaces.java"); } @TestMetadata("enumWithNameField.java") public void testEnumWithNameField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumWithNameField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumWithNameField.java"); } @TestMetadata("fieldsWithPrimaryPrivateConstructor.java") public void testFieldsWithPrimaryPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/fieldsWithPrimaryPrivateConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/fieldsWithPrimaryPrivateConstructor.java"); } @TestMetadata("internalEnum.java") public void testInternalEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/internalEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/internalEnum.java"); } @TestMetadata("overrideToString.java") public void testOverrideToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/overrideToString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/overrideToString.java"); } @TestMetadata("primaryPrivateConstructor.java") public void testPrimaryPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/primaryPrivateConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/primaryPrivateConstructor.java"); } @TestMetadata("privateEnum.java") public void testPrivateEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/privateEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/privateEnum.java"); } @TestMetadata("protectedEnum.java") public void testProtectedEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/protectedEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/protectedEnum.java"); } @TestMetadata("publicEnum.java") public void testPublicEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/publicEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/publicEnum.java"); } @TestMetadata("runnableImplementation.java") public void testRunnableImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/runnableImplementation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/runnableImplementation.java"); } @TestMetadata("typeSafeEnum.java") public void testTypeSafeEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/typeSafeEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/typeSafeEnum.java"); } } @@ -1991,44 +1800,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/equals"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("EqOperator.java") public void testEqOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/EqOperator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/EqOperator.java"); } @TestMetadata("Equals1.java") public void testEquals1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals1.java"); } @TestMetadata("Equals2.java") public void testEquals2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals2.java"); } @TestMetadata("Equals3.java") public void testEquals3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals3.java"); } @TestMetadata("Equals4.java") public void testEquals4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals4.java"); } @TestMetadata("ObjectsEquals.java") public void testObjectsEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/ObjectsEquals.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/ObjectsEquals.java"); } } @@ -2036,86 +1843,77 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Field extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/field"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classChildExtendsBase.java") public void testClassChildExtendsBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/classChildExtendsBase.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/classChildExtendsBase.java"); } @TestMetadata("conversion.java") public void testConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/conversion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/conversion.java"); } @TestMetadata("internalField.java") public void testInternalField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/internalField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/internalField.java"); } @TestMetadata("needInitializer.java") public void testNeedInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/needInitializer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/needInitializer.java"); } @TestMetadata("privateField.java") public void testPrivateField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/privateField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/privateField.java"); } @TestMetadata("protectedField.java") public void testProtectedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/protectedField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/protectedField.java"); } @TestMetadata("publicField.java") public void testPublicField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/publicField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/publicField.java"); } @TestMetadata("specifyType.java") public void testSpecifyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/specifyType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/specifyType.java"); } @TestMetadata("valOrVar.java") public void testValOrVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/valOrVar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/valOrVar.java"); } @TestMetadata("valWithInit.java") public void testValWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/valWithInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/valWithInit.java"); } @TestMetadata("varWithInit.java") public void testVarWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/varWithInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/varWithInit.java"); } @TestMetadata("varWithoutInit.java") public void testVarWithoutInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/varWithoutInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/varWithoutInit.java"); } @TestMetadata("volatileTransientAndStrictFp.java") public void testVolatileTransientAndStrictFp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/volatileTransientAndStrictFp.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/volatileTransientAndStrictFp.java"); } } @@ -2123,272 +1921,232 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class For extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/for"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("arrayIndicesReversed.java") public void testArrayIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/arrayIndicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/arrayIndicesReversed.java"); } @TestMetadata("assignmentAsExpressionInBody.java") public void testAssignmentAsExpressionInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/assignmentAsExpressionInBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/assignmentAsExpressionInBody.java"); } @TestMetadata("commonCaseForTest.java") public void testCommonCaseForTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/commonCaseForTest.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/commonCaseForTest.java"); } @TestMetadata("downTo1.java") public void testDownTo1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo1.java"); } @TestMetadata("downTo2.java") public void testDownTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo2.java"); } @TestMetadata("downTo3.java") public void testDownTo3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo3.java"); } @TestMetadata("downTo4.java") public void testDownTo4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo4.java"); } @TestMetadata("falseArrayIndicesReversed.java") public void testFalseArrayIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseArrayIndicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseArrayIndicesReversed.java"); } @TestMetadata("falseArrayIndicesReversed2.java") public void testFalseArrayIndicesReversed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseArrayIndicesReversed2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseArrayIndicesReversed2.java"); } @TestMetadata("falseForRange.java") public void testFalseForRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseForRange.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseForRange.java"); } @TestMetadata("falseIndicesReversed.java") public void testFalseIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseIndicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseIndicesReversed.java"); } @TestMetadata("forRangeWithBlock.java") public void testForRangeWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithBlock.java"); } @TestMetadata("forRangeWithLE.java") public void testForRangeWithLE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithLE.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithLE.java"); } @TestMetadata("forRangeWithLT.java") public void testForRangeWithLT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithLT.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithLT.java"); } @TestMetadata("forRangeWithLT2.java") public void testForRangeWithLT2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithLT2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithLT2.java"); } @TestMetadata("forRangeWithNE.java") public void testForRangeWithNE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithNE.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithNE.java"); } @TestMetadata("forThroughArrayIndices.java") public void testForThroughArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughArrayIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughArrayIndices.java"); } @TestMetadata("forThroughCollectionIndices.java") public void testForThroughCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughCollectionIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughCollectionIndices.java"); } @TestMetadata("forThroughListIndices.java") public void testForThroughListIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughListIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughListIndices.java"); } @TestMetadata("forThroughListIndicesNE.java") public void testForThroughListIndicesNE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughListIndicesNE.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughListIndicesNE.java"); } @TestMetadata("forThroughNonArrayIndices.java") public void testForThroughNonArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughNonArrayIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughNonArrayIndices.java"); } @TestMetadata("forThroughNonCollectionIndices.java") public void testForThroughNonCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughNonCollectionIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughNonCollectionIndices.java"); } @TestMetadata("forWithBlock.java") public void testForWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithBlock.java"); } @TestMetadata("forWithBlockAndDoubleUpdate.java") public void testForWithBlockAndDoubleUpdate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithBlockAndDoubleUpdate.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithBlockAndDoubleUpdate.java"); } @TestMetadata("forWithEmptyBlock.java") public void testForWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithEmptyBlock.java"); } @TestMetadata("forWithExpression.java") public void testForWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithExpression.java"); } @TestMetadata("forWithNullCondition.java") public void testForWithNullCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithNullCondition.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithNullCondition.java"); } @TestMetadata("forWithNullInit.java") public void testForWithNullInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithNullInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithNullInit.java"); } @TestMetadata("forWithNullUpdate.java") public void testForWithNullUpdate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithNullUpdate.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithNullUpdate.java"); } @TestMetadata("forWithReturn.java") public void testForWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithReturn.java"); } @TestMetadata("forWithoutBody.java") public void testForWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithoutBody.java"); } @TestMetadata("indicesReversed.java") public void testIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/indicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/indicesReversed.java"); } @TestMetadata("infiniteFor.java") public void testInfiniteFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/infiniteFor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/infiniteFor.java"); } @TestMetadata("nameConflict1.java") public void testNameConflict1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict1.java"); } @TestMetadata("nameConflict2.java") public void testNameConflict2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict2.java"); } @TestMetadata("nameConflict3.java") public void testNameConflict3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict3.java"); } @TestMetadata("nameConflict4.java") public void testNameConflict4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict4.java"); } @TestMetadata("nameConflict5.java") public void testNameConflict5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict5.java"); } @TestMetadata("notInBlock.java") public void testNotInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/notInBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/notInBlock.java"); } @TestMetadata("overMapEntries.java") public void testOverMapEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/overMapEntries.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/overMapEntries.java"); } @TestMetadata("withContinue1.java") public void testWithContinue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinue1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinue1.java"); } @TestMetadata("withContinue2.java") public void testWithContinue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinue2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinue2.java"); } @TestMetadata("withContinue3.java") public void testWithContinue3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinue3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinue3.java"); } @TestMetadata("withContinueAndLabels.java") public void testWithContinueAndLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinueAndLabels.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinueAndLabels.java"); } } @@ -2396,44 +2154,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForeachStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForeachStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/foreachStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("enhancedForWithBlock.java") public void testEnhancedForWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithBlock.java"); } @TestMetadata("enhancedForWithEmptyBlock.java") public void testEnhancedForWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithEmptyBlock.java"); } @TestMetadata("enhancedForWithExpression.java") public void testEnhancedForWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithExpression.java"); } @TestMetadata("enhancedForWithReturn.java") public void testEnhancedForWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithReturn.java"); } @TestMetadata("foreachWithoutBody.java") public void testForeachWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/foreachWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/foreachWithoutBody.java"); } @TestMetadata("nullableIterable.java") public void testNullableIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/nullableIterable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/nullableIterable.java"); } } @@ -2441,50 +2197,47 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Formatting extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFormatting() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/formatting"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("chainedCall.java") public void testChainedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/chainedCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/chainedCall.java"); } @TestMetadata("lineBreaksBetweenArguments.java") public void testLineBreaksBetweenArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.java"); } @TestMetadata("nonStaticMembers.java") public void testNonStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/nonStaticMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/nonStaticMembers.java"); } @TestMetadata("nonStaticMembersWithComments.java") public void testNonStaticMembersWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/nonStaticMembersWithComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/nonStaticMembersWithComments.java"); } @TestMetadata("parameterList.java") public void testParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/parameterList.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/parameterList.java"); } @TestMetadata("staticAndNonStaticMembersWithComments.java") public void testStaticAndNonStaticMembersWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.java"); } @TestMetadata("staticMembersWithComments.java") public void testStaticMembersWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/staticMembersWithComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/staticMembersWithComments.java"); } } @@ -2492,10 +2245,13 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractMethod.java") public void testAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/abstractMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/abstractMethod.java"); } public void testAllFilesPresentInFunction() throws Exception { @@ -2504,206 +2260,172 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("classGenericParam.java") public void testClassGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/classGenericParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/classGenericParam.java"); } @TestMetadata("emptyVoidMethod.java") public void testEmptyVoidMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/emptyVoidMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/emptyVoidMethod.java"); } @TestMetadata("extendsBaseWhichExtendsObject.java") public void testExtendsBaseWhichExtendsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/extendsBaseWhichExtendsObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/extendsBaseWhichExtendsObject.java"); } @TestMetadata("final.java") public void testFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/final.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/final.java"); } @TestMetadata("functionInFinalClass.java") public void testFunctionInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/functionInFinalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/functionInFinalClass.java"); } @TestMetadata("internal.java") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/internal.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/internal.java"); } @TestMetadata("java8Lambdas.java") public void testJava8Lambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/java8Lambdas.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/java8Lambdas.java"); } @TestMetadata("java8MRKFunctionExpectedType.java") public void testJava8MRKFunctionExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/java8MRKFunctionExpectedType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/java8MRKFunctionExpectedType.java"); } @TestMetadata("java8MRSamConstructor.java") public void testJava8MRSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/java8MRSamConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/java8MRSamConstructor.java"); } @TestMetadata("lineBreaksBetweenParameters.java") public void testLineBreaksBetweenParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.java"); } @TestMetadata("main.java") public void testMain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/main.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/main.java"); } @TestMetadata("main2.java") public void testMain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/main2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/main2.java"); } @TestMetadata("mainAndNullabilitySetting.java") public void testMainAndNullabilitySetting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/mainAndNullabilitySetting.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/mainAndNullabilitySetting.java"); } @TestMetadata("methodClassType.java") public void testMethodClassType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodClassType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodClassType.java"); } @TestMetadata("methodPrimitiveType.java") public void testMethodPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodPrimitiveType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodPrimitiveType.java"); } @TestMetadata("methodPrimitiveType2.java") public void testMethodPrimitiveType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodPrimitiveType2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodPrimitiveType2.java"); } @TestMetadata("methodWithReturnStatement.java") public void testMethodWithReturnStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodWithReturnStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodWithReturnStatement.java"); } @TestMetadata("nativeMethods.java") public void testNativeMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/nativeMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/nativeMethods.java"); } @TestMetadata("open.java") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/open.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/open.java"); } @TestMetadata("override.java") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/override.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/override.java"); } @TestMetadata("overrideAndOpen.java") public void testOverrideAndOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideAndOpen.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideAndOpen.java"); } @TestMetadata("overrideObject.java") public void testOverrideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideObject.java"); } @TestMetadata("overrideObject2.java") public void testOverrideObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideObject2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideObject2.java"); } @TestMetadata("overrideObject3.java") public void testOverrideObject3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideObject3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideObject3.java"); } @TestMetadata("overrideWithHigherVisibility.java") public void testOverrideWithHigherVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideWithHigherVisibility.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideWithHigherVisibility.java"); } @TestMetadata("ownGenericParam.java") public void testOwnGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/ownGenericParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/ownGenericParam.java"); } @TestMetadata("ownSeveralGenericParams.java") public void testOwnSeveralGenericParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/ownSeveralGenericParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/ownSeveralGenericParams.java"); } @TestMetadata("parameterModification.java") public void testParameterModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/parameterModification.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/parameterModification.java"); } @TestMetadata("private.java") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/private.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/private.java"); } @TestMetadata("protected.java") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/protected.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/protected.java"); } @TestMetadata("public.java") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/public.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/public.java"); } @TestMetadata("synchronizedMethod.java") public void testSynchronizedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/synchronizedMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/synchronizedMethod.java"); } @TestMetadata("throws.java") public void testThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/throws.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/throws.java"); } @TestMetadata("varVararg.java") public void testVarVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/varVararg.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/varVararg.java"); } } @@ -2711,26 +2433,27 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Identifier extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIdentifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/identifier"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("finalFieldReference.java") public void testFinalFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/identifier/finalFieldReference.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/identifier/finalFieldReference.java"); } @TestMetadata("keywords.java") public void testKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/identifier/keywords.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/identifier/keywords.java"); } @TestMetadata("withDollar.java") public void testWithDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/identifier/withDollar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/identifier/withDollar.java"); } } @@ -2738,56 +2461,52 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/ifStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("assignmentAsExpressionInIf.java") public void testAssignmentAsExpressionInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/assignmentAsExpressionInIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/assignmentAsExpressionInIf.java"); } @TestMetadata("elseIf.java") public void testElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/elseIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/elseIf.java"); } @TestMetadata("ifWithoutThen.java") public void testIfWithoutThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/ifWithoutThen.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/ifWithoutThen.java"); } @TestMetadata("multiLine.java") public void testMultiLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/multiLine.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/multiLine.java"); } @TestMetadata("singleLine.java") public void testSingleLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/singleLine.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/singleLine.java"); } @TestMetadata("withBlocks.java") public void testWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/withBlocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/withBlocks.java"); } @TestMetadata("withEmptyBlocks.java") public void testWithEmptyBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/withEmptyBlocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/withEmptyBlocks.java"); } @TestMetadata("withoutElse.java") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/withoutElse.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/withoutElse.java"); } } @@ -2795,38 +2514,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/importStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("importWithKeywords.java") public void testImportWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/importWithKeywords.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/importWithKeywords.java"); } @TestMetadata("importWithStar.java") public void testImportWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/importWithStar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/importWithStar.java"); } @TestMetadata("oneImport.java") public void testOneImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/oneImport.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/oneImport.java"); } @TestMetadata("onlyImports.java") public void testOnlyImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/onlyImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/onlyImports.java"); } @TestMetadata("simpleImport.java") public void testSimpleImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/simpleImport.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/simpleImport.java"); } } @@ -2834,38 +2552,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/inheritance"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classOneExtendsBaseGeneric.java") public void testClassOneExtendsBaseGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseGeneric.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseGeneric.java"); } @TestMetadata("classOneExtendsBaseWithOneParam.java") public void testClassOneExtendsBaseWithOneParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithOneParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithOneParam.java"); } @TestMetadata("classOneExtendsBaseWithZeroParams.java") public void testClassOneExtendsBaseWithZeroParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParams.java"); } @TestMetadata("classOneExtendsBaseWithZeroParamsNonEmptyConstructor.java") public void testClassOneExtendsBaseWithZeroParamsNonEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParamsNonEmptyConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParamsNonEmptyConstructor.java"); } @TestMetadata("openModifier.java") public void testOpenModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/openModifier.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/openModifier.java"); } } @@ -2873,26 +2590,27 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsOperator extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/isOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("complicatedExpression.java") public void testComplicatedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/isOperator/complicatedExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/isOperator/complicatedExpression.java"); } @TestMetadata("rawType.java") public void testRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/isOperator/rawType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/isOperator/rawType.java"); } @TestMetadata("simpleReference.java") public void testSimpleReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/isOperator/simpleReference.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/isOperator/simpleReference.java"); } } @@ -2900,278 +2618,237 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Issues extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIssues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/issues"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("arrayLength.java") public void testArrayLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/arrayLength.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/arrayLength.java"); } @TestMetadata("comments.java") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/comments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/comments.java"); } @TestMetadata("doNotQualifyStatic.java") public void testDoNotQualifyStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/doNotQualifyStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/doNotQualifyStatic.java"); } @TestMetadata("kt-1016.java") public void testKt_1016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-1016.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-1016.java"); } @TestMetadata("kt-1048.java") public void testKt_1048() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-1048.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-1048.java"); } @TestMetadata("kt-1074.java") public void testKt_1074() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-1074.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-1074.java"); } @TestMetadata("kt-14248.java") public void testKt_14248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-14248.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-14248.java"); } @TestMetadata("kt-17379.java") public void testKt_17379() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-17379.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-17379.java"); } @TestMetadata("kt-19634.java") public void testKt_19634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-19634.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-19634.java"); } @TestMetadata("kt-19943.java") public void testKt_19943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-19943.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-19943.java"); } @TestMetadata("kt-5294.java") public void testKt_5294() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-5294.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-5294.java"); } @TestMetadata("kt-5400.java") public void testKt_5400() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-5400.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-5400.java"); } @TestMetadata("kt-543.java") public void testKt_543() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-543.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-543.java"); } @TestMetadata("kt-543-boxed.java") public void testKt_543_boxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-543-boxed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-543-boxed.java"); } @TestMetadata("kt-543-mixed.java") public void testKt_543_mixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-543-mixed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-543-mixed.java"); } @TestMetadata("kt-638.java") public void testKt_638() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-638.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-638.java"); } @TestMetadata("kt-6790.java") public void testKt_6790() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-6790.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-6790.java"); } @TestMetadata("kt-696.java") public void testKt_696() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-696.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-696.java"); } @TestMetadata("kt-792.java") public void testKt_792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-792.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-792.java"); } @TestMetadata("kt-792-mixed.java") public void testKt_792_mixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-792-mixed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-792-mixed.java"); } @TestMetadata("kt-794.java") public void testKt_794() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-794.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-794.java"); } @TestMetadata("kt-794-mixed.java") public void testKt_794_mixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-794-mixed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-794-mixed.java"); } @TestMetadata("kt-807.java") public void testKt_807() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-807.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-807.java"); } @TestMetadata("kt-809.java") public void testKt_809() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-809.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-809.java"); } @TestMetadata("kt-809-string.java") public void testKt_809_string() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-809-string.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-809-string.java"); } @TestMetadata("kt-820.java") public void testKt_820() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-820.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-820.java"); } @TestMetadata("kt-820-field.java") public void testKt_820_field() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-820-field.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-820-field.java"); } @TestMetadata("kt-820-string.java") public void testKt_820_string() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-820-string.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-820-string.java"); } @TestMetadata("kt-824.java") public void testKt_824() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-824.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-824.java"); } @TestMetadata("kt-824-isDir.java") public void testKt_824_isDir() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-824-isDir.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-824-isDir.java"); } @TestMetadata("kt-828.java") public void testKt_828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-828.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-828.java"); } @TestMetadata("kt-836.java") public void testKt_836() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-836.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-836.java"); } @TestMetadata("kt-837.java") public void testKt_837() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-837.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-837.java"); } @TestMetadata("kt-851.java") public void testKt_851() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-851.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-851.java"); } @TestMetadata("kt-852.java") public void testKt_852() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-852.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-852.java"); } @TestMetadata("kt-871.java") public void testKt_871() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-871.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-871.java"); } @TestMetadata("kt-879.java") public void testKt_879() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-879.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-879.java"); } @TestMetadata("kt-893.java") public void testKt_893() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-893.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-893.java"); } @TestMetadata("kt-899.java") public void testKt_899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-899.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-899.java"); } @TestMetadata("kt-963.java") public void testKt_963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-963.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-963.java"); } @TestMetadata("kt-9997.java") public void testKt_9997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-9997.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-9997.java"); } @TestMetadata("operationsWithChar.java") public void testOperationsWithChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/operationsWithChar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/operationsWithChar.java"); } @TestMetadata("qualifyStatic.java") public void testQualifyStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/qualifyStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/qualifyStatic.java"); } @TestMetadata("spaceBeforeAssignment.java") public void testSpaceBeforeAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/spaceBeforeAssignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/spaceBeforeAssignment.java"); } @TestMetadata("unfinishedReferenceExpression.java") public void testUnfinishedReferenceExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/unfinishedReferenceExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/unfinishedReferenceExpression.java"); } } @@ -3179,122 +2856,107 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinApiAccess extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinApiAccess() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/kotlinApiAccess"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectMembers.java") public void testClassObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ClassObjectMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ClassObjectMembers.java"); } @TestMetadata("CorrectFunNullabilityDetected.java") public void testCorrectFunNullabilityDetected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/CorrectFunNullabilityDetected.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/CorrectFunNullabilityDetected.java"); } @TestMetadata("CorrectNullabilityDetected.java") public void testCorrectNullabilityDetected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/CorrectNullabilityDetected.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/CorrectNullabilityDetected.java"); } @TestMetadata("ExtensionFunction.java") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionFunction.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionFunction.java"); } @TestMetadata("ExtensionProperty.java") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionProperty.java"); } @TestMetadata("GlobalFunction.java") public void testGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalFunction.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalFunction.java"); } @TestMetadata("GlobalGenericFunction.java") public void testGlobalGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalGenericFunction.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalGenericFunction.java"); } @TestMetadata("GlobalValue1.java") public void testGlobalValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue1.java"); } @TestMetadata("GlobalValue2.java") public void testGlobalValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue2.java"); } @TestMetadata("InheritedProperty.java") public void testInheritedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/InheritedProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/InheritedProperty.java"); } @TestMetadata("ObjectMembers.java") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ObjectMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ObjectMembers.java"); } @TestMetadata("Property.java") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/Property.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/Property.java"); } @TestMetadata("Property2.java") public void testProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/Property2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/Property2.java"); } @TestMetadata("StaticImportAllFromFileFacade.java") public void testStaticImportAllFromFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromFileFacade.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromFileFacade.java"); } @TestMetadata("StaticImportAllFromObject.java") public void testStaticImportAllFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromObject.java"); } @TestMetadata("StaticImportFromCompanionObject.java") public void testStaticImportFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject.java"); } @TestMetadata("StaticImportFromCompanionObject2.java") public void testStaticImportFromCompanionObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject2.java"); } @TestMetadata("StaticImportFromCompanionObject3.java") public void testStaticImportFromCompanionObject3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject3.java"); } @TestMetadata("StaticImportFromFileFacade.java") public void testStaticImportFromFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromFileFacade.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromFileFacade.java"); } } @@ -3302,14 +2964,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LabelStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLabelStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/labelStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("complicatedExampleFromJavaTutorial.java") public void testComplicatedExampleFromJavaTutorial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/labelStatement/complicatedExampleFromJavaTutorial.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/labelStatement/complicatedExampleFromJavaTutorial.java"); } } @@ -3317,20 +2982,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class List extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/list"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ForEach.java") public void testForEach() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/list/ForEach.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/list/ForEach.java"); } @TestMetadata("Lists.java") public void testLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/list/Lists.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/list/Lists.java"); } } @@ -3338,98 +3005,87 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiteralExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLiteralExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/literalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("char.java") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/char.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/char.java"); } @TestMetadata("charOctal.java") public void testCharOctal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/charOctal.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/charOctal.java"); } @TestMetadata("charToNumber.java") public void testCharToNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/charToNumber.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/charToNumber.java"); } @TestMetadata("charToString.java") public void testCharToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/charToString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/charToString.java"); } @TestMetadata("dollarInsideString.java") public void testDollarInsideString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/dollarInsideString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/dollarInsideString.java"); } @TestMetadata("double.java") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/double.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/double.java"); } @TestMetadata("endsWithDFL.java") public void testEndsWithDFL() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/endsWithDFL.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/endsWithDFL.java"); } @TestMetadata("exponentDouble.java") public void testExponentDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/exponentDouble.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/exponentDouble.java"); } @TestMetadata("exponentFloat.java") public void testExponentFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/exponentFloat.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/exponentFloat.java"); } @TestMetadata("float.java") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/float.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/float.java"); } @TestMetadata("hex.java") public void testHex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/hex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/hex.java"); } @TestMetadata("long.java") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/long.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/long.java"); } @TestMetadata("octal.java") public void testOctal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/octal.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/octal.java"); } @TestMetadata("stringOctalChars.java") public void testStringOctalChars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/stringOctalChars.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/stringOctalChars.java"); } @TestMetadata("trueOrFalse.java") public void testTrueOrFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/trueOrFalse.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/trueOrFalse.java"); } } @@ -3437,62 +3093,57 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalVariable extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/localVariable"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("autoBangBang.java") public void testAutoBangBang() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/autoBangBang.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/autoBangBang.java"); } @TestMetadata("conversion.java") public void testConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/conversion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/conversion.java"); } @TestMetadata("literalConversion.java") public void testLiteralConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/literalConversion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/literalConversion.java"); } @TestMetadata("nullIInitializer.java") public void testNullIInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/nullIInitializer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/nullIInitializer.java"); } @TestMetadata("object.java") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/object.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/object.java"); } @TestMetadata("unboxing.java") public void testUnboxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/unboxing.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/unboxing.java"); } @TestMetadata("valTypeDoNotMatch.java") public void testValTypeDoNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/valTypeDoNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/valTypeDoNotMatch.java"); } @TestMetadata("varTypeDoNotMatch.java") public void testVarTypeDoNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/varTypeDoNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/varTypeDoNotMatch.java"); } @TestMetadata("varWithNoInitializer.java") public void testVarWithNoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/varWithNoInitializer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/varWithNoInitializer.java"); } } @@ -3500,86 +3151,77 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodCallExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMethodCallExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/methodCallExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("callWithKeywords.java") public void testCallWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/callWithKeywords.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/callWithKeywords.java"); } @TestMetadata("collectionsMethods.java") public void testCollectionsMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods.java"); } @TestMetadata("collectionsMethods2.java") public void testCollectionsMethods2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods2.java"); } @TestMetadata("emptyCall.java") public void testEmptyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/emptyCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/emptyCall.java"); } @TestMetadata("genericMethod.java") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/genericMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/genericMethod.java"); } @TestMetadata("getClass.java") public void testGetClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/getClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/getClass.java"); } @TestMetadata("parameterToReceiver.java") public void testParameterToReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/parameterToReceiver.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/parameterToReceiver.java"); } @TestMetadata("simpleCall.java") public void testSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/simpleCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/simpleCall.java"); } @TestMetadata("specialBuiltinMembers.java") public void testSpecialBuiltinMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/specialBuiltinMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/specialBuiltinMembers.java"); } @TestMetadata("stringMethods.java") public void testStringMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/stringMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/stringMethods.java"); } @TestMetadata("systemOut.java") public void testSystemOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/systemOut.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/systemOut.java"); } @TestMetadata("vararg1.java") public void testVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/vararg1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/vararg1.java"); } @TestMetadata("vararg2.java") public void testVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/vararg2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/vararg2.java"); } } @@ -3587,44 +3229,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Misc extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMisc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/misc"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("packageWithClass.java") public void testPackageWithClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithClass.java"); } @TestMetadata("packageWithClasses.java") public void testPackageWithClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithClasses.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithClasses.java"); } @TestMetadata("packageWithImports.java") public void testPackageWithImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithImports.java"); } @TestMetadata("packageWithMixedImports.java") public void testPackageWithMixedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithMixedImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithMixedImports.java"); } @TestMetadata("packageWithOpenClass.java") public void testPackageWithOpenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithOpenClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithOpenClass.java"); } @TestMetadata("packageWithStaticImports.java") public void testPackageWithStaticImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithStaticImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithStaticImports.java"); } } @@ -3632,56 +3272,52 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MutableCollections extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutableCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/mutableCollections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("FunctionParameters.java") public void testFunctionParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionParameters.java"); } @TestMetadata("FunctionParameters2.java") public void testFunctionParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionParameters2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionParameters2.java"); } @TestMetadata("FunctionReturnValue.java") public void testFunctionReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue.java"); } @TestMetadata("FunctionReturnValue2.java") public void testFunctionReturnValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue2.java"); } @TestMetadata("Iterator.java") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Iterator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Iterator.java"); } @TestMetadata("Iterator2.java") public void testIterator2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Iterator2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Iterator2.java"); } @TestMetadata("Overrides.java") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Overrides.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Overrides.java"); } @TestMetadata("Recursion.java") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Recursion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Recursion.java"); } } @@ -3689,98 +3325,87 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NewClassExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewClassExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/newClassExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classWithParam.java") public void testClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/classWithParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/classWithParam.java"); } @TestMetadata("classWithParams.java") public void testClassWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/classWithParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/classWithParams.java"); } @TestMetadata("classWithoutBody.java") public void testClassWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/classWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/classWithoutBody.java"); } @TestMetadata("fullQualifiedName.java") public void testFullQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.java"); } @TestMetadata("fullQualifiedName2.java") public void testFullQualifiedName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.java"); } @TestMetadata("genericClassInvocation.java") public void testGenericClassInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/genericClassInvocation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/genericClassInvocation.java"); } @TestMetadata("javaLangObject.java") public void testJavaLangObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/javaLangObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/javaLangObject.java"); } @TestMetadata("lineBreaks.java") public void testLineBreaks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/lineBreaks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/lineBreaks.java"); } @TestMetadata("newAnonymousClass.java") public void testNewAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass.java"); } @TestMetadata("newAnonymousClass2.java") public void testNewAnonymousClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass2.java"); } @TestMetadata("newAnonymousClass3.java") public void testNewAnonymousClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass3.java"); } @TestMetadata("newClassByFullName.java") public void testNewClassByFullName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newClassByFullName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newClassByFullName.java"); } @TestMetadata("newInnerClass.java") public void testNewInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newInnerClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newInnerClass.java"); } @TestMetadata("newListAndNewMember.java") public void testNewListAndNewMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newListAndNewMember.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newListAndNewMember.java"); } @TestMetadata("newStaticInnerClass.java") public void testNewStaticInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newStaticInnerClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newStaticInnerClass.java"); } } @@ -3788,230 +3413,197 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullability extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/nullability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("autoNotNull.java") public void testAutoNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/autoNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/autoNotNull.java"); } @TestMetadata("FieldAssignedWithNull.java") public void testFieldAssignedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldAssignedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldAssignedWithNull.java"); } @TestMetadata("FieldComparedWithNull.java") public void testFieldComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull.java"); } @TestMetadata("FieldComparedWithNull2.java") public void testFieldComparedWithNull2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull2.java"); } @TestMetadata("FieldComparedWithNull3.java") public void testFieldComparedWithNull3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull3.java"); } @TestMetadata("FieldComparedWithNull4.java") public void testFieldComparedWithNull4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull4.java"); } @TestMetadata("FieldInitializedWithNull.java") public void testFieldInitializedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldInitializedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldInitializedWithNull.java"); } @TestMetadata("IndirectOverride.java") public void testIndirectOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/IndirectOverride.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/IndirectOverride.java"); } @TestMetadata("LocalValReassignment.java") public void testLocalValReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/LocalValReassignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/LocalValReassignment.java"); } @TestMetadata("MethodInvokedWithNullArg.java") public void testMethodInvokedWithNullArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg.java"); } @TestMetadata("MethodInvokedWithNullArg2.java") public void testMethodInvokedWithNullArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg2.java"); } @TestMetadata("MethodInvokedWithTernaryNullArg.java") public void testMethodInvokedWithTernaryNullArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodInvokedWithTernaryNullArg.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodInvokedWithTernaryNullArg.java"); } @TestMetadata("MethodResultComparedWithNull.java") public void testMethodResultComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull.java"); } @TestMetadata("MethodResultComparedWithNull2.java") public void testMethodResultComparedWithNull2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull2.java"); } @TestMetadata("MethodResultComparedWithNull3.java") public void testMethodResultComparedWithNull3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull3.java"); } @TestMetadata("MethodResultComparedWithNull4.java") public void testMethodResultComparedWithNull4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull4.java"); } @TestMetadata("MethodResultInitializesNullableField.java") public void testMethodResultInitializesNullableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.java"); } @TestMetadata("MethodReturnsNull.java") public void testMethodReturnsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsNull.java"); } @TestMetadata("MethodReturnsNullInAnonymousClass.java") public void testMethodReturnsNullInAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsNullInAnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsNullInAnonymousClass.java"); } @TestMetadata("MethodReturnsNullInLocalClass.java") public void testMethodReturnsNullInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsNullInLocalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsNullInLocalClass.java"); } @TestMetadata("MethodReturnsTernaryNull.java") public void testMethodReturnsTernaryNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsTernaryNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsTernaryNull.java"); } @TestMetadata("notNullCast.java") public void testNotNullCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/notNullCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/notNullCast.java"); } @TestMetadata("nullableField.java") public void testNullableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableField.java"); } @TestMetadata("nullableInitializer1.java") public void testNullableInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer1.java"); } @TestMetadata("nullableInitializer2.java") public void testNullableInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer2.java"); } @TestMetadata("nullableInitializer3.java") public void testNullableInitializer3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer3.java"); } @TestMetadata("nullableInitializer4.java") public void testNullableInitializer4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer4.java"); } @TestMetadata("NullableIntNoCrash.java") public void testNullableIntNoCrash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/NullableIntNoCrash.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/NullableIntNoCrash.java"); } @TestMetadata("NullableMethodDotAccess.java") public void testNullableMethodDotAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/NullableMethodDotAccess.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/NullableMethodDotAccess.java"); } @TestMetadata("NullableVariableDotAccess.java") public void testNullableVariableDotAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/NullableVariableDotAccess.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/NullableVariableDotAccess.java"); } @TestMetadata("OverrideWithInheritanceLoop.java") public void testOverrideWithInheritanceLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/OverrideWithInheritanceLoop.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/OverrideWithInheritanceLoop.java"); } @TestMetadata("Overrides.java") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/Overrides.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/Overrides.java"); } @TestMetadata("ParameterComparedWithNull.java") public void testParameterComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/ParameterComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/ParameterComparedWithNull.java"); } @TestMetadata("VariableAssignedWithNull.java") public void testVariableAssignedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableAssignedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableAssignedWithNull.java"); } @TestMetadata("VariableComparedWithNull.java") public void testVariableComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableComparedWithNull.java"); } @TestMetadata("VariableInitializedWithNull.java") public void testVariableInitializedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableInitializedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableInitializedWithNull.java"); } @TestMetadata("VariableInitializedWithTernaryNull.java") public void testVariableInitializedWithTernaryNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableInitializedWithTernaryNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableInitializedWithTernaryNull.java"); } } @@ -4019,14 +3611,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectLiteral extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjectLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/objectLiteral"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("MyFrame.java") public void testMyFrame() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/objectLiteral/MyFrame.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/objectLiteral/MyFrame.java"); } } @@ -4034,16 +3629,18 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Overloads extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.java") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Abstract.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Abstract.java"); } @TestMetadata("AccessorToDrop.java") public void testAccessorToDrop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/AccessorToDrop.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/AccessorToDrop.java"); } public void testAllFilesPresentInOverloads() throws Exception { @@ -4052,32 +3649,27 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("Annotations.java") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Annotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Annotations.java"); } @TestMetadata("Override.java") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Override.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Override.java"); } @TestMetadata("Private.java") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Private.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Private.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Simple.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Simple.java"); } @TestMetadata("Synchronized.java") public void testSynchronized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Synchronized.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Synchronized.java"); } } @@ -4085,14 +3677,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/packageStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("keywordInPackageName.java") public void testKeywordInPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/packageStatement/keywordInPackageName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/packageStatement/keywordInPackageName.java"); } } @@ -4100,20 +3695,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParenthesizedExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParenthesizedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/parenthesizedExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("parenthesized.java") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized.java"); } @TestMetadata("parenthesized2.java") public void testParenthesized2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized2.java"); } } @@ -4121,44 +3718,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PolyadicExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPolyadicExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/polyadicExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("divide.java") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/divide.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/divide.java"); } @TestMetadata("minus.java") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/minus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/minus.java"); } @TestMetadata("multiply.java") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/multiply.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/multiply.java"); } @TestMetadata("plus.java") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/plus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/plus.java"); } @TestMetadata("remainder.java") public void testRemainder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/remainder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/remainder.java"); } @TestMetadata("unassignedShiftRight.java") public void testUnassignedShiftRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/unassignedShiftRight.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/unassignedShiftRight.java"); } } @@ -4166,68 +3761,62 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PostProcessing extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPostProcessing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/postProcessing"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObject.java") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/AnonymousObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/AnonymousObject.java"); } @TestMetadata("GetOperator.java") public void testGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/GetOperator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/GetOperator.java"); } @TestMetadata("IfNullReturnToElvis.java") public void testIfNullReturnToElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/IfNullReturnToElvis.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/IfNullReturnToElvis.java"); } @TestMetadata("IfToElvis.java") public void testIfToElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/IfToElvis.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/IfToElvis.java"); } @TestMetadata("IfToSafeCall.java") public void testIfToSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/IfToSafeCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/IfToSafeCall.java"); } @TestMetadata("NotIs.java") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/NotIs.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/NotIs.java"); } @TestMetadata("RedundantTypeCast.java") public void testRedundantTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/RedundantTypeCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/RedundantTypeCast.java"); } @TestMetadata("RedundantTypeCastAndInline.java") public void testRedundantTypeCastAndInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/RedundantTypeCastAndInline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/RedundantTypeCastAndInline.java"); } @TestMetadata("RedunduntTypeCastAndProhibitedInline.java") public void testRedunduntTypeCastAndProhibitedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/RedunduntTypeCastAndProhibitedInline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/RedunduntTypeCastAndProhibitedInline.java"); } @TestMetadata("SyntheticExtensionPropertyAccess.java") public void testSyntheticExtensionPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/SyntheticExtensionPropertyAccess.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/SyntheticExtensionPropertyAccess.java"); } } @@ -4235,20 +3824,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PostfixOperator extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPostfixOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/postfixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("decrement.java") public void testDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postfixOperator/decrement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postfixOperator/decrement.java"); } @TestMetadata("increment.java") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postfixOperator/increment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postfixOperator/increment.java"); } } @@ -4256,44 +3847,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrefixOperator extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrefixOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/prefixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("decrement.java") public void testDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/decrement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/decrement.java"); } @TestMetadata("excl.java") public void testExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/excl.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/excl.java"); } @TestMetadata("increment.java") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/increment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/increment.java"); } @TestMetadata("kt-667.java") public void testKt_667() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/kt-667.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/kt-667.java"); } @TestMetadata("nullableIf.java") public void testNullableIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/nullableIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/nullableIf.java"); } @TestMetadata("tilde.java") public void testTilde() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/tilde.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/tilde.java"); } } @@ -4301,14 +3890,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Projections extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/projections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("projections.java") public void testProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/projections/projections.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/projections/projections.java"); } } @@ -4316,50 +3908,47 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Protected extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtected() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/protected"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("constructorProperty.java") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/constructorProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/constructorProperty.java"); } @TestMetadata("inheritorsSamePackage.java") public void testInheritorsSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/inheritorsSamePackage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/inheritorsSamePackage.java"); } @TestMetadata("onlyProtectedConstructor.java") public void testOnlyProtectedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/onlyProtectedConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/onlyProtectedConstructor.java"); } @TestMetadata("protectedInSamePackage.java") public void testProtectedInSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/protectedInSamePackage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/protectedInSamePackage.java"); } @TestMetadata("severalInheritors.java") public void testSeveralInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/severalInheritors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/severalInheritors.java"); } @TestMetadata("superInSamePackage.java") public void testSuperInSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/superInSamePackage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/superInSamePackage.java"); } @TestMetadata("usages.java") public void testUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/usages.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/usages.java"); } } @@ -4367,32 +3956,32 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RawGenerics extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRawGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/rawGenerics"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("kt-540.java") public void testKt_540() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/kt-540.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/kt-540.java"); } @TestMetadata("kt-540-map.java") public void testKt_540_map() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/kt-540-map.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/kt-540-map.java"); } @TestMetadata("kt-540-rawGenericClass.java") public void testKt_540_rawGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/kt-540-rawGenericClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/kt-540-rawGenericClass.java"); } @TestMetadata("rawGenericMethod.java") public void testRawGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/rawGenericMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/rawGenericMethod.java"); } } @@ -4400,38 +3989,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturnStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/returnStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("currentMethodBug.java") public void testCurrentMethodBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/currentMethodBug.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/currentMethodBug.java"); } @TestMetadata("returnChar.java") public void testReturnChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnChar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnChar.java"); } @TestMetadata("returnLiteral.java") public void testReturnLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnLiteral.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnLiteral.java"); } @TestMetadata("returnNumber.java") public void testReturnNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnNumber.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnNumber.java"); } @TestMetadata("returnString.java") public void testReturnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnString.java"); } } @@ -4439,32 +4027,32 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Settings extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSettings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/settings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("openByDefault.java") public void testOpenByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/openByDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/openByDefault.java"); } @TestMetadata("specifyFieldTypeByDefault.java") public void testSpecifyFieldTypeByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/specifyFieldTypeByDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/specifyFieldTypeByDefault.java"); } @TestMetadata("specifyLocalVariableTypeByDefault.java") public void testSpecifyLocalVariableTypeByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefault.java"); } @TestMetadata("specifyLocalVariableTypeByDefaultInFor.java") public void testSpecifyLocalVariableTypeByDefaultInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefaultInFor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefaultInFor.java"); } } @@ -4472,38 +4060,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticMembers extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/staticMembers"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("PrivateStaticMembers.java") public void testPrivateStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.java"); } @TestMetadata("PrivateStaticMethods1.java") public void testPrivateStaticMethods1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods1.java"); } @TestMetadata("PrivateStaticMethods2.java") public void testPrivateStaticMethods2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.java"); } @TestMetadata("PrivateStaticMethods3.java") public void testPrivateStaticMethods3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.java"); } @TestMetadata("PrivateStaticMethods4.java") public void testPrivateStaticMethods4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods4.java"); } } @@ -4511,26 +4098,27 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Strings extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStrings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/strings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("escapedBackslash.java") public void testEscapedBackslash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/strings/escapedBackslash.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/strings/escapedBackslash.java"); } @TestMetadata("escapedDollar.java") public void testEscapedDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/strings/escapedDollar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/strings/escapedDollar.java"); } @TestMetadata("formattedString.java") public void testFormattedString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/strings/formattedString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/strings/formattedString.java"); } } @@ -4538,26 +4126,27 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuperExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/superExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classAdotSuperFoo.java") public void testClassAdotSuperFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/superExpression/classAdotSuperFoo.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/superExpression/classAdotSuperFoo.java"); } @TestMetadata("classAextendsB.java") public void testClassAextendsB() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/superExpression/classAextendsB.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/superExpression/classAextendsB.java"); } @TestMetadata("superStatement.java") public void testSuperStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/superExpression/superStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/superExpression/superStatement.java"); } } @@ -4565,104 +4154,92 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Switch extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSwitch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/switch"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("caseWithBlock.java") public void testCaseWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/caseWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/caseWithBlock.java"); } @TestMetadata("comlicatedFallDown.java") public void testComlicatedFallDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/comlicatedFallDown.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/comlicatedFallDown.java"); } @TestMetadata("continueAndBreakWithLabel.java") public void testContinueAndBreakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/continueAndBreakWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/continueAndBreakWithLabel.java"); } @TestMetadata("emptySwitch.java") public void testEmptySwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/emptySwitch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/emptySwitch.java"); } @TestMetadata("enumConstants.java") public void testEnumConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/enumConstants.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/enumConstants.java"); } @TestMetadata("fallDown.java") public void testFallDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/fallDown.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/fallDown.java"); } @TestMetadata("fallDownWithBlocks.java") public void testFallDownWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/fallDownWithBlocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/fallDownWithBlocks.java"); } @TestMetadata("invalidSwitch.java") public void testInvalidSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/invalidSwitch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/invalidSwitch.java"); } @TestMetadata("KT-13552.java") public void testKT_13552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/KT-13552.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/KT-13552.java"); } @TestMetadata("kt-539.java") public void testKt_539() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/kt-539.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/kt-539.java"); } @TestMetadata("nestedIf.java") public void testNestedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedIf.java"); } @TestMetadata("nestedIfFallback.java") public void testNestedIfFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedIfFallback.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedIfFallback.java"); } @TestMetadata("nestedSwitch.java") public void testNestedSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedSwitch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedSwitch.java"); } @TestMetadata("nestedSwitchFallback.java") public void testNestedSwitchFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedSwitchFallback.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedSwitchFallback.java"); } @TestMetadata("nondefault.java") public void testNondefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nondefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nondefault.java"); } @TestMetadata("returnsAndThrows.java") public void testReturnsAndThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/returnsAndThrows.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/returnsAndThrows.java"); } } @@ -4670,14 +4247,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SynchronizedStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSynchronizedStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/synchronizedStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("singleLineExample.java") public void testSingleLineExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/synchronizedStatement/singleLineExample.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/synchronizedStatement/singleLineExample.java"); } } @@ -4685,20 +4265,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThisExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThisExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/thisExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classAdotThisFoo.java") public void testClassAdotThisFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/thisExpression/classAdotThisFoo.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/thisExpression/classAdotThisFoo.java"); } @TestMetadata("thisStatement.java") public void testThisStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/thisExpression/thisStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/thisExpression/thisStatement.java"); } } @@ -4706,14 +4288,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThrowStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThrowStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/throwStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("simpleThrowStatement.java") public void testSimpleThrowStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/throwStatement/simpleThrowStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/throwStatement/simpleThrowStatement.java"); } } @@ -4721,14 +4306,17 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToArray extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/toArray"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("toArray.java") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toArray/toArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toArray/toArray.java"); } } @@ -4736,38 +4324,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToKotlinClasses extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToKotlinClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/toKotlinClasses"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("iterableAndIterator.java") public void testIterableAndIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator.java"); } @TestMetadata("iterableAndIterator2.java") public void testIterableAndIterator2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator2.java"); } @TestMetadata("iterableAndIterator3.java") public void testIterableAndIterator3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator3.java"); } @TestMetadata("LibraryFunctions.java") public void testLibraryFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/LibraryFunctions.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/LibraryFunctions.java"); } @TestMetadata("TypeParameterBound.java") public void testTypeParameterBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/TypeParameterBound.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/TypeParameterBound.java"); } } @@ -4775,10 +4362,13 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstactInterface.java") public void testAbstactInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/abstactInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/abstactInterface.java"); } public void testAllFilesPresentInTrait() throws Exception { @@ -4787,62 +4377,52 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestMetadata("emptyInterface.java") public void testEmptyInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/emptyInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/emptyInterface.java"); } @TestMetadata("extendsOneClassAndImplementsSeveralInterfaces.java") public void testExtendsOneClassAndImplementsSeveralInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/extendsOneClassAndImplementsSeveralInterfaces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/extendsOneClassAndImplementsSeveralInterfaces.java"); } @TestMetadata("extendsOneInterface.java") public void testExtendsOneInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/extendsOneInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/extendsOneInterface.java"); } @TestMetadata("interfaceWithFields.java") public void testInterfaceWithFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/interfaceWithFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/interfaceWithFields.java"); } @TestMetadata("interfaceWithMethodDeclaration.java") public void testInterfaceWithMethodDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/interfaceWithMethodDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/interfaceWithMethodDeclaration.java"); } @TestMetadata("interfaceWithStaticFields.java") public void testInterfaceWithStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/interfaceWithStaticFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/interfaceWithStaticFields.java"); } @TestMetadata("internalInterface.java") public void testInternalInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/internalInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/internalInterface.java"); } @TestMetadata("privateInterface.java") public void testPrivateInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/privateInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/privateInterface.java"); } @TestMetadata("protectedInterface.java") public void testProtectedInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/protectedInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/protectedInterface.java"); } @TestMetadata("publicInterface.java") public void testPublicInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/publicInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/publicInterface.java"); } } @@ -4850,38 +4430,37 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/tryStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("commonCaseForTryStatement.java") public void testCommonCaseForTryStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/commonCaseForTryStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/commonCaseForTryStatement.java"); } @TestMetadata("disjunctionType.java") public void testDisjunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/disjunctionType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/disjunctionType.java"); } @TestMetadata("emptyTryWithTwoCatchesWithEmptyFinally.java") public void testEmptyTryWithTwoCatchesWithEmptyFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithEmptyFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithEmptyFinally.java"); } @TestMetadata("emptyTryWithTwoCatchesWithFinally.java") public void testEmptyTryWithTwoCatchesWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithFinally.java"); } @TestMetadata("emptyTryWithTwoCatchesWithoutFinally.java") public void testEmptyTryWithTwoCatchesWithoutFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithoutFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithoutFinally.java"); } } @@ -4889,68 +4468,62 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryWithResource extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryWithResource() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/tryWithResource"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Multiline.java") public void testMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/Multiline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/Multiline.java"); } @TestMetadata("MultipleResources.java") public void testMultipleResources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/MultipleResources.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/MultipleResources.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/Simple.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/Simple.java"); } @TestMetadata("WithCatch.java") public void testWithCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithCatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithCatch.java"); } @TestMetadata("WithCatchAndFinally.java") public void testWithCatchAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithCatchAndFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithCatchAndFinally.java"); } @TestMetadata("WithCatches.java") public void testWithCatches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithCatches.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithCatches.java"); } @TestMetadata("WithFinally.java") public void testWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithFinally.java"); } @TestMetadata("WithReturnAtEnd.java") public void testWithReturnAtEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithReturnAtEnd.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithReturnAtEnd.java"); } @TestMetadata("WithReturnInAnonymousClass.java") public void testWithReturnInAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.java"); } @TestMetadata("WithReturnInAnonymousClass2.java") public void testWithReturnInAnonymousClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.java"); } } @@ -4958,74 +4531,67 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeCastExpression extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeCastExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/typeCastExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("beforeDot.java") public void testBeforeDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/beforeDot.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/beforeDot.java"); } @TestMetadata("castNullObject.java") public void testCastNullObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/castNullObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/castNullObject.java"); } @TestMetadata("castNullable.java") public void testCastNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/castNullable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/castNullable.java"); } @TestMetadata("extendsWildcardCast.java") public void testExtendsWildcardCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/extendsWildcardCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/extendsWildcardCast.java"); } @TestMetadata("fooCast.java") public void testFooCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/fooCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/fooCast.java"); } @TestMetadata("intCast.java") public void testIntCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/intCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/intCast.java"); } @TestMetadata("primitiveType.java") public void testPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/primitiveType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/primitiveType.java"); } @TestMetadata("simpleGenericCast.java") public void testSimpleGenericCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/simpleGenericCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/simpleGenericCast.java"); } @TestMetadata("stringCast.java") public void testStringCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/stringCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/stringCast.java"); } @TestMetadata("superWildcardCast.java") public void testSuperWildcardCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/superWildcardCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/superWildcardCast.java"); } @TestMetadata("wildcardCast.java") public void testWildcardCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/wildcardCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/wildcardCast.java"); } } @@ -5033,98 +4599,87 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/typeParameters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classDoubleParametrizationWithTwoBoundsWithExtending.java") public void testClassDoubleParametrizationWithTwoBoundsWithExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/classDoubleParametrizationWithTwoBoundsWithExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/classDoubleParametrizationWithTwoBoundsWithExtending.java"); } @TestMetadata("classParametrizationWithTwoBounds.java") public void testClassParametrizationWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBounds.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBounds.java"); } @TestMetadata("classParametrizationWithTwoBoundsWithExtending.java") public void testClassParametrizationWithTwoBoundsWithExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBoundsWithExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBoundsWithExtending.java"); } @TestMetadata("complexExampleWithClassExtending.java") public void testComplexExampleWithClassExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassExtending.java"); } @TestMetadata("complexExampleWithClassMultiplyExtending.java") public void testComplexExampleWithClassMultiplyExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassMultiplyExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassMultiplyExtending.java"); } @TestMetadata("genericClass.java") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/genericClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/genericClass.java"); } @TestMetadata("genericParam.java") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/genericParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/genericParam.java"); } @TestMetadata("genericParam-settings.java") public void testGenericParam_settings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/genericParam-settings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/genericParam-settings.java"); } @TestMetadata("manyGenericParams.java") public void testManyGenericParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/manyGenericParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/manyGenericParams.java"); } @TestMetadata("methodDoubleParametrizationWithTwoBounds.java") public void testMethodDoubleParametrizationWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/methodDoubleParametrizationWithTwoBounds.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/methodDoubleParametrizationWithTwoBounds.java"); } @TestMetadata("needTypeArgs.java") public void testNeedTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/needTypeArgs.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/needTypeArgs.java"); } @TestMetadata("rawTypeCast.java") public void testRawTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/rawTypeCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/rawTypeCast.java"); } @TestMetadata("traitDoubleParametrizationWithTwoBoundsWithExtending.java") public void testTraitDoubleParametrizationWithTwoBoundsWithExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/traitDoubleParametrizationWithTwoBoundsWithExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/traitDoubleParametrizationWithTwoBoundsWithExtending.java"); } @TestMetadata("typeFromOtherFile.java") public void testTypeFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/typeFromOtherFile.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/typeFromOtherFile.java"); } @TestMetadata("where.java") public void testWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/where.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/where.java"); } } @@ -5132,20 +4687,22 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarArg extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarArg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/varArg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ellipsisTypeSeveralParams.java") public void testEllipsisTypeSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/varArg/ellipsisTypeSeveralParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/varArg/ellipsisTypeSeveralParams.java"); } @TestMetadata("ellipsisTypeSingleParams.java") public void testEllipsisTypeSingleParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/varArg/ellipsisTypeSingleParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/varArg/ellipsisTypeSingleParams.java"); } } @@ -5153,44 +4710,42 @@ public class JavaToKotlinConverterForWebDemoTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhileStatement extends AbstractJavaToKotlinConverterForWebDemoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhileStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/whileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("whileWithAssignmentAsExpression.java") public void testWhileWithAssignmentAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithAssignmentAsExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithAssignmentAsExpression.java"); } @TestMetadata("whileWithBlock.java") public void testWhileWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithBlock.java"); } @TestMetadata("whileWithEmptyBlock.java") public void testWhileWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithEmptyBlock.java"); } @TestMetadata("whileWithExpression.java") public void testWhileWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithExpression.java"); } @TestMetadata("whileWithReturn.java") public void testWhileWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithReturn.java"); } @TestMetadata("whileWithoutBody.java") public void testWhileWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithoutBody.java"); } } } diff --git a/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterMultiFileTestGenerated.java b/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterMultiFileTestGenerated.java index 4d704e2991c..abacb5f043c 100644 --- a/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterMultiFileTestGenerated.java +++ b/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterMultiFileTestGenerated.java @@ -21,61 +21,56 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavaToKotlinConverterMultiFileTestGenerated extends AbstractJavaToKotlinConverterMultiFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/multiFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("AnnotationWithArrayParameter") public void testAnnotationWithArrayParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/AnnotationWithArrayParameter/"); - doTest(fileName); + runTest("j2k/testData/multiFile/AnnotationWithArrayParameter/"); } @TestMetadata("FieldToProperty") public void testFieldToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/FieldToProperty/"); - doTest(fileName); + runTest("j2k/testData/multiFile/FieldToProperty/"); } @TestMetadata("FunctionalInterfaceAcceptor") public void testFunctionalInterfaceAcceptor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/FunctionalInterfaceAcceptor/"); - doTest(fileName); + runTest("j2k/testData/multiFile/FunctionalInterfaceAcceptor/"); } @TestMetadata("GetterAndSetterUsages") public void testGetterAndSetterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/GetterAndSetterUsages/"); - doTest(fileName); + runTest("j2k/testData/multiFile/GetterAndSetterUsages/"); } @TestMetadata("KT11952") public void testKT11952() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/KT11952/"); - doTest(fileName); + runTest("j2k/testData/multiFile/KT11952/"); } @TestMetadata("NullabilityByDFa") public void testNullabilityByDFa() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/NullabilityByDFa/"); - doTest(fileName); + runTest("j2k/testData/multiFile/NullabilityByDFa/"); } @TestMetadata("ProtectedVisibility") public void testProtectedVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/ProtectedVisibility/"); - doTest(fileName); + runTest("j2k/testData/multiFile/ProtectedVisibility/"); } @TestMetadata("ToCompanionObject") public void testToCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/ToCompanionObject/"); - doTest(fileName); + runTest("j2k/testData/multiFile/ToCompanionObject/"); } @TestMetadata("ToObject") public void testToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/multiFile/ToObject/"); - doTest(fileName); + runTest("j2k/testData/multiFile/ToObject/"); } } diff --git a/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterSingleFileTestGenerated.java b/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterSingleFileTestGenerated.java index 78d89801e5e..7f1c1179e2f 100644 --- a/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterSingleFileTestGenerated.java +++ b/j2k/tests/org/jetbrains/kotlin/j2k/JavaToKotlinConverterSingleFileTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFileOrElement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @@ -29,116 +33,102 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/annotations"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("annotationArrayArgument.java") public void testAnnotationArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationArrayArgument.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationArrayArgument.java"); } @TestMetadata("annotationDefault.java") public void testAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationDefault.java"); } @TestMetadata("annotationFromConstructorParamToProperty.java") public void testAnnotationFromConstructorParamToProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationFromConstructorParamToProperty.java"); } @TestMetadata("annotationInterface1.java") public void testAnnotationInterface1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface1.java"); } @TestMetadata("annotationInterface2.java") public void testAnnotationInterface2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface2.java"); } @TestMetadata("annotationInterface3.java") public void testAnnotationInterface3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface3.java"); } @TestMetadata("annotationInterface4.java") public void testAnnotationInterface4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationInterface4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationInterface4.java"); } @TestMetadata("annotationUsages.java") public void testAnnotationUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationUsages.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationUsages.java"); } @TestMetadata("annotationsFromPropertyAccessors.java") public void testAnnotationsFromPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/annotationsFromPropertyAccessors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/annotationsFromPropertyAccessors.java"); } @TestMetadata("javaClassArgument.java") public void testJavaClassArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/javaClassArgument.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/javaClassArgument.java"); } @TestMetadata("javaClassArrayArgument.java") public void testJavaClassArrayArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/javaClassArrayArgument.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/javaClassArrayArgument.java"); } @TestMetadata("jetbrainsNotNull.java") public void testJetbrainsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/jetbrainsNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/jetbrainsNotNull.java"); } @TestMetadata("jetbrainsNotNullChainExpr.java") public void testJetbrainsNotNullChainExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/jetbrainsNotNullChainExpr.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/jetbrainsNotNullChainExpr.java"); } @TestMetadata("jetbrainsNullable.java") public void testJetbrainsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/jetbrainsNullable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/jetbrainsNullable.java"); } @TestMetadata("modifiersToAnnotationsFromPropertyAccessors.java") public void testModifiersToAnnotationsFromPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/modifiersToAnnotationsFromPropertyAccessors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/modifiersToAnnotationsFromPropertyAccessors.java"); } @TestMetadata("primaryConstructorAnnotation.java") public void testPrimaryConstructorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/primaryConstructorAnnotation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/primaryConstructorAnnotation.java"); } @TestMetadata("serialVersionUID.java") public void testSerialVersionUID() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/serialVersionUID.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/serialVersionUID.java"); } @TestMetadata("suppressWarnings.java") public void testSuppressWarnings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/annotations/suppressWarnings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/annotations/suppressWarnings.java"); } } @@ -146,20 +136,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousBlock extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousBlock() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/anonymousBlock"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("oneAnonBlock.java") public void testOneAnonBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousBlock/oneAnonBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousBlock/oneAnonBlock.java"); } @TestMetadata("oneStaticAnonBlock.java") public void testOneStaticAnonBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousBlock/oneStaticAnonBlock.java"); } } @@ -167,20 +159,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnonymousClass extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAnonymousClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/anonymousClass"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("kt-13146.java") public void testKt_13146() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousClass/kt-13146.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousClass/kt-13146.java"); } @TestMetadata("localSelfReference.java") public void testLocalSelfReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/anonymousClass/localSelfReference.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/anonymousClass/localSelfReference.java"); } } @@ -188,26 +182,27 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayAccessExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayAccessExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/arrayAccessExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("expressionIndex.java") public void testExpressionIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayAccessExpression/expressionIndex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayAccessExpression/expressionIndex.java"); } @TestMetadata("intIndex.java") public void testIntIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayAccessExpression/intIndex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayAccessExpression/intIndex.java"); } @TestMetadata("variableIndex.java") public void testVariableIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayAccessExpression/variableIndex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayAccessExpression/variableIndex.java"); } } @@ -215,80 +210,72 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayInitializerExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayInitializerExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/arrayInitializerExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("doubleArray.java") public void testDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArray.java"); } @TestMetadata("doubleArrayWithVariables.java") public void testDoubleArrayWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArrayWithVariables.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/doubleArrayWithVariables.java"); } @TestMetadata("floatArray.java") public void testFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/floatArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/floatArray.java"); } @TestMetadata("intArrayWithLength.java") public void testIntArrayWithLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/intArrayWithLength.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/intArrayWithLength.java"); } @TestMetadata("javaLangDoubleArray.java") public void testJavaLangDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangDoubleArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangDoubleArray.java"); } @TestMetadata("javaLangFloatArray.java") public void testJavaLangFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangFloatArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/javaLangFloatArray.java"); } @TestMetadata("newByte.java") public void testNewByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/newByte.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/newByte.java"); } @TestMetadata("newInt.java") public void testNewInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/newInt.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/newInt.java"); } @TestMetadata("objectArrayWithLength.java") public void testObjectArrayWithLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/objectArrayWithLength.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/objectArrayWithLength.java"); } @TestMetadata("oneDim.java") public void testOneDim() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/oneDim.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/oneDim.java"); } @TestMetadata("oneDimWithVariables.java") public void testOneDimWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/oneDimWithVariables.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/oneDimWithVariables.java"); } @TestMetadata("twoDim.java") public void testTwoDim() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayInitializerExpression/twoDim.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayInitializerExpression/twoDim.java"); } } @@ -296,68 +283,62 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayType extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInArrayType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/arrayType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("arrayInitializationStatement.java") public void testArrayInitializationStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatement.java"); } @TestMetadata("arrayInitializationStatementWithDimension.java") public void testArrayInitializationStatementWithDimension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension.java"); } @TestMetadata("arrayInitializationStatementWithDimension3d.java") public void testArrayInitializationStatementWithDimension3d() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension3d.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimension3d.java"); } @TestMetadata("arrayInitializationStatementWithDimensionExplicit.java") public void testArrayInitializationStatementWithDimensionExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimensionExplicit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/arrayInitializationStatementWithDimensionExplicit.java"); } @TestMetadata("d2StringEmptyArray.java") public void testD2StringEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/d2StringEmptyArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/d2StringEmptyArray.java"); } @TestMetadata("d3StringEmptyArray.java") public void testD3StringEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/d3StringEmptyArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/d3StringEmptyArray.java"); } @TestMetadata("longArray.java") public void testLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/longArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/longArray.java"); } @TestMetadata("methodArrayArgs.java") public void testMethodArrayArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/methodArrayArgs.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/methodArrayArgs.java"); } @TestMetadata("newIntArray.java") public void testNewIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/newIntArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/newIntArray.java"); } @TestMetadata("newStringArray.java") public void testNewStringArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/arrayType/newStringArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/arrayType/newStringArray.java"); } } @@ -365,38 +346,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssertStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssertStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/assertStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("assertNotNull.java") public void testAssertNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/assertNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/assertNotNull.java"); } @TestMetadata("onlyCondition.java") public void testOnlyCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/onlyCondition.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/onlyCondition.java"); } @TestMetadata("onlyConditionWithBraces.java") public void testOnlyConditionWithBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/onlyConditionWithBraces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/onlyConditionWithBraces.java"); } @TestMetadata("withStringDetail.java") public void testWithStringDetail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/withStringDetail.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/withStringDetail.java"); } @TestMetadata("withStringDetail2.java") public void testWithStringDetail2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assertStatement/withStringDetail2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assertStatement/withStringDetail2.java"); } } @@ -404,116 +384,102 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AssignmentExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAssignmentExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/assignmentExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("and.java") public void testAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/and.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/and.java"); } @TestMetadata("assignment.java") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/assignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/assignment.java"); } @TestMetadata("assignmentAsExpression.java") public void testAssignmentAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/assignmentAsExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/assignmentAsExpression.java"); } @TestMetadata("bitOperationPriority.java") public void testBitOperationPriority() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriority.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriority.java"); } @TestMetadata("bitOperationPriorityComments.java") public void testBitOperationPriorityComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriorityComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/bitOperationPriorityComments.java"); } @TestMetadata("divideAssign.java") public void testDivideAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/divideAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/divideAssign.java"); } @TestMetadata("minusAssign.java") public void testMinusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/minusAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/minusAssign.java"); } @TestMetadata("multiplyAssign.java") public void testMultiplyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/multiplyAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/multiplyAssign.java"); } @TestMetadata("nullability.java") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/nullability.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/nullability.java"); } @TestMetadata("nullability-settings.java") public void testNullability_settings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/nullability-settings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/nullability-settings.java"); } @TestMetadata("or.java") public void testOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/or.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/or.java"); } @TestMetadata("plusAssign.java") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/plusAssign.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/plusAssign.java"); } @TestMetadata("reminder.java") public void testReminder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/reminder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/reminder.java"); } @TestMetadata("shiftLeft.java") public void testShiftLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/shiftLeft.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/shiftLeft.java"); } @TestMetadata("shiftRight.java") public void testShiftRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/shiftRight.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/shiftRight.java"); } @TestMetadata("simpleAssignment.java") public void testSimpleAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/simpleAssignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/simpleAssignment.java"); } @TestMetadata("unsignedRightShift.java") public void testUnsignedRightShift() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/unsignedRightShift.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/unsignedRightShift.java"); } @TestMetadata("xor.java") public void testXor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/assignmentExpression/xor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/assignmentExpression/xor.java"); } } @@ -521,128 +487,112 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBinaryExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/binaryExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("and.java") public void testAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/and.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/and.java"); } @TestMetadata("conditionalAnd.java") public void testConditionalAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/conditionalAnd.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/conditionalAnd.java"); } @TestMetadata("conditionalOr.java") public void testConditionalOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/conditionalOr.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/conditionalOr.java"); } @TestMetadata("divide.java") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/divide.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/divide.java"); } @TestMetadata("greaterThan.java") public void testGreaterThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/greaterThan.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/greaterThan.java"); } @TestMetadata("greaterThanEqual.java") public void testGreaterThanEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/greaterThanEqual.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/greaterThanEqual.java"); } @TestMetadata("lessThan.java") public void testLessThan() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/lessThan.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/lessThan.java"); } @TestMetadata("lessThanEqual.java") public void testLessThanEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/lessThanEqual.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/lessThanEqual.java"); } @TestMetadata("lhsObjectPlusString.java") public void testLhsObjectPlusString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/lhsObjectPlusString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/lhsObjectPlusString.java"); } @TestMetadata("minus.java") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/minus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/minus.java"); } @TestMetadata("multiplePlusMinus.java") public void testMultiplePlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/multiplePlusMinus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/multiplePlusMinus.java"); } @TestMetadata("multiply.java") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/multiply.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/multiply.java"); } @TestMetadata("or.java") public void testOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/or.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/or.java"); } @TestMetadata("orWithNewLine.java") public void testOrWithNewLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/orWithNewLine.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/orWithNewLine.java"); } @TestMetadata("plus.java") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/plus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/plus.java"); } @TestMetadata("remainder.java") public void testRemainder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/remainder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/remainder.java"); } @TestMetadata("shiftLeft.java") public void testShiftLeft() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/shiftLeft.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/shiftLeft.java"); } @TestMetadata("shiftRight.java") public void testShiftRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/shiftRight.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/shiftRight.java"); } @TestMetadata("unsignedRightShift.java") public void testUnsignedRightShift() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/unsignedRightShift.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/unsignedRightShift.java"); } @TestMetadata("xor.java") public void testXor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/binaryExpression/xor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/binaryExpression/xor.java"); } } @@ -650,14 +600,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Blocks extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBlocks() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/blocks"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Blocks.java") public void testBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/blocks/Blocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/blocks/Blocks.java"); } } @@ -665,74 +618,67 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxedType extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBoxedType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/boxedType"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("boolean.java") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/boolean.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/boolean.java"); } @TestMetadata("Boxing.java") public void testBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/Boxing.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/Boxing.java"); } @TestMetadata("byte.java") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/byte.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/byte.java"); } @TestMetadata("character.java") public void testCharacter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/character.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/character.java"); } @TestMetadata("double.java") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/double.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/double.java"); } @TestMetadata("float.java") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/float.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/float.java"); } @TestMetadata("integer.java") public void testInteger() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/integer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/integer.java"); } @TestMetadata("kt-671.java") public void testKt_671() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/kt-671.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/kt-671.java"); } @TestMetadata("long.java") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/long.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/long.java"); } @TestMetadata("object.java") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/object.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/object.java"); } @TestMetadata("short.java") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/boxedType/short.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/boxedType/short.java"); } } @@ -740,20 +686,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BreakStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBreakStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/breakStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("breakWithLabel.java") public void testBreakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/breakStatement/breakWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/breakStatement/breakWithLabel.java"); } @TestMetadata("breakWithoutLabel.java") public void testBreakWithoutLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/breakStatement/breakWithoutLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/breakStatement/breakWithoutLabel.java"); } } @@ -761,44 +709,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallChainExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCallChainExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/callChainExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("libraryFieldCall.java") public void testLibraryFieldCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryFieldCall.java"); } @TestMetadata("libraryMethodCall.java") public void testLibraryMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryMethodCall.java"); } @TestMetadata("libraryMethodCallFromInstance.java") public void testLibraryMethodCallFromInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance.java"); } @TestMetadata("libraryMethodCallFromInstance-settings.java") public void testLibraryMethodCallFromInstance_settings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance-settings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryMethodCallFromInstance-settings.java"); } @TestMetadata("libraryStringFieldCall.java") public void testLibraryStringFieldCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/libraryStringFieldCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/libraryStringFieldCall.java"); } @TestMetadata("sout.java") public void testSout() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/callChainExpression/sout.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/callChainExpression/sout.java"); } } @@ -806,16 +752,18 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Class extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractClass.java") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/abstractClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/abstractClass.java"); } @TestMetadata("abstractClassShape.java") public void testAbstractClassShape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/abstractClassShape.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/abstractClassShape.java"); } public void testAllFilesPresentInClass() throws Exception { @@ -824,200 +772,167 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("anonymousClass.java") public void testAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/anonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/anonymousClass.java"); } @TestMetadata("class.java") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/class.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/class.java"); } @TestMetadata("ClassShadowing.java") public void testClassShadowing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/ClassShadowing.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/ClassShadowing.java"); } @TestMetadata("classWithEmptyMethods.java") public void testClassWithEmptyMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/classWithEmptyMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/classWithEmptyMethods.java"); } @TestMetadata("classWithFields.java") public void testClassWithFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/classWithFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/classWithFields.java"); } @TestMetadata("classWithMultiplyFields.java") public void testClassWithMultiplyFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/classWithMultiplyFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/classWithMultiplyFields.java"); } @TestMetadata("emptyClass.java") public void testEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/emptyClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/emptyClass.java"); } @TestMetadata("extendsOneClassAndImplementsOneInterface.java") public void testExtendsOneClassAndImplementsOneInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsOneInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsOneInterface.java"); } @TestMetadata("extendsOneClassAndImplementsSeveralInterfaces.java") public void testExtendsOneClassAndImplementsSeveralInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsSeveralInterfaces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/extendsOneClassAndImplementsSeveralInterfaces.java"); } @TestMetadata("finalClass.java") public void testFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/finalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/finalClass.java"); } @TestMetadata("genericClass.java") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/genericClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/genericClass.java"); } @TestMetadata("innerClassInInterface.java") public void testInnerClassInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerClassInInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerClassInInterface.java"); } @TestMetadata("innerEmptyClass.java") public void testInnerEmptyClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerEmptyClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerEmptyClass.java"); } @TestMetadata("innerEnum.java") public void testInnerEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerEnum.java"); } @TestMetadata("innerInterface.java") public void testInnerInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerInterface.java"); } @TestMetadata("innerStaticClass.java") public void testInnerStaticClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/innerStaticClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/innerStaticClass.java"); } @TestMetadata("internalClass.java") public void testInternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/internalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/internalClass.java"); } @TestMetadata("kt-639.java") public void testKt_639() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/kt-639.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/kt-639.java"); } @TestMetadata("notUtilityClass.java") public void testNotUtilityClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/notUtilityClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/notUtilityClass.java"); } @TestMetadata("oneStaticFieldOneNonStatic.java") public void testOneStaticFieldOneNonStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/oneStaticFieldOneNonStatic.java"); } @TestMetadata("oneStaticMethod.java") public void testOneStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/oneStaticMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/oneStaticMethod.java"); } @TestMetadata("oneStaticMethodOneNonStatic.java") public void testOneStaticMethodOneNonStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/oneStaticMethodOneNonStatic.java"); } @TestMetadata("pivateClass.java") public void testPivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/pivateClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/pivateClass.java"); } @TestMetadata("privateInit.java") public void testPrivateInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/privateInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/privateInit.java"); } @TestMetadata("protectedClass.java") public void testProtectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/protectedClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/protectedClass.java"); } @TestMetadata("publicClass.java") public void testPublicClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/publicClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/publicClass.java"); } @TestMetadata("simpleInheritance.java") public void testSimpleInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/simpleInheritance.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/simpleInheritance.java"); } @TestMetadata("twoStaticMethod.java") public void testTwoStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/twoStaticMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/twoStaticMethod.java"); } @TestMetadata("utilityClass1.java") public void testUtilityClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass1.java"); } @TestMetadata("utilityClass2.java") public void testUtilityClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass2.java"); } @TestMetadata("utilityClass3.java") public void testUtilityClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass3.java"); } @TestMetadata("utilityClass4.java") public void testUtilityClass4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass4.java"); } @TestMetadata("utilityClass5.java") public void testUtilityClass5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/class/utilityClass5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/class/utilityClass5.java"); } } @@ -1025,32 +940,32 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/classExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("complexExample.java") public void testComplexExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/complexExample.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/complexExample.java"); } @TestMetadata("objectClass.java") public void testObjectClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/objectClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/objectClass.java"); } @TestMetadata("primitivesAndArrays.java") public void testPrimitivesAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/primitivesAndArrays.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/primitivesAndArrays.java"); } @TestMetadata("stringClass.java") public void testStringClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/classExpression/stringClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/classExpression/stringClass.java"); } } @@ -1058,50 +973,47 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Comments extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInComments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/comments"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("commentInsideCall.java") public void testCommentInsideCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/commentInsideCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/commentInsideCall.java"); } @TestMetadata("comments.java") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/comments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/comments.java"); } @TestMetadata("comments2.java") public void testComments2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/comments2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/comments2.java"); } @TestMetadata("commentsForConstructors.java") public void testCommentsForConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/commentsForConstructors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/commentsForConstructors.java"); } @TestMetadata("fieldWithEndOfLineComment.java") public void testFieldWithEndOfLineComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/fieldWithEndOfLineComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/fieldWithEndOfLineComment.java"); } @TestMetadata("fieldsInitializedFromParams.java") public void testFieldsInitializedFromParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/fieldsInitializedFromParams.java"); } @TestMetadata("removeNoInspectionComment.java") public void testRemoveNoInspectionComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/comments/removeNoInspectionComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/comments/removeNoInspectionComment.java"); } } @@ -1109,20 +1021,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConditionalExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConditionalExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/conditionalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("multiline.java") public void testMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/conditionalExpression/multiline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/conditionalExpression/multiline.java"); } @TestMetadata("simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/conditionalExpression/simple.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/conditionalExpression/simple.java"); } } @@ -1130,16 +1044,18 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("allCallsPrimary.java") public void testAllCallsPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/allCallsPrimary.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/allCallsPrimary.java"); } @TestMetadata("allCallsPrimary2.java") public void testAllCallsPrimary2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/allCallsPrimary2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/allCallsPrimary2.java"); } public void testAllFilesPresentInConstructors() throws Exception { @@ -1148,236 +1064,197 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("artificialPrimary.java") public void testArtificialPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/artificialPrimary.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/artificialPrimary.java"); } @TestMetadata("chain.java") public void testChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/chain.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/chain.java"); } @TestMetadata("constructorAnnotations.java") public void testConstructorAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/constructorAnnotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/constructorAnnotations.java"); } @TestMetadata("customerBuilder.java") public void testCustomerBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/customerBuilder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/customerBuilder.java"); } @TestMetadata("fieldsInitializedFromParams1.java") public void testFieldsInitializedFromParams1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams1.java"); } @TestMetadata("fieldsInitializedFromParams2.java") public void testFieldsInitializedFromParams2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams2.java"); } @TestMetadata("fieldsInitializedFromParams3.java") public void testFieldsInitializedFromParams3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams3.java"); } @TestMetadata("fieldsInitializedFromParams4.java") public void testFieldsInitializedFromParams4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams4.java"); } @TestMetadata("fieldsInitializedFromParams5.java") public void testFieldsInitializedFromParams5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams5.java"); } @TestMetadata("fieldsInitializedFromParams6.java") public void testFieldsInitializedFromParams6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams6.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams6.java"); } @TestMetadata("fieldsInitializedFromParams7.java") public void testFieldsInitializedFromParams7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams7.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams7.java"); } @TestMetadata("fieldsInitializedFromParams8.java") public void testFieldsInitializedFromParams8() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams8.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams8.java"); } @TestMetadata("fieldsInitializedFromParams9.java") public void testFieldsInitializedFromParams9() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams9.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParams9.java"); } @TestMetadata("fieldsInitializedFromParamsAnnotations.java") public void testFieldsInitializedFromParamsAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParamsAnnotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/fieldsInitializedFromParamsAnnotations.java"); } @TestMetadata("genericIdentifier.java") public void testGenericIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/genericIdentifier.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/genericIdentifier.java"); } @TestMetadata("identifier.java") public void testIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/identifier.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/identifier.java"); } @TestMetadata("lineBreaksBetweenParameters.java") public void testLineBreaksBetweenParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/lineBreaksBetweenParameters.java"); } @TestMetadata("methodCallInFactoryFun.java") public void testMethodCallInFactoryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/methodCallInFactoryFun.java"); } @TestMetadata("nestedClassNameInParameterDefaults.java") public void testNestedClassNameInParameterDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults.java"); } @TestMetadata("nestedClassNameInParameterDefaults2.java") public void testNestedClassNameInParameterDefaults2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults2.java"); } @TestMetadata("nestedClassNameInParameterDefaults3.java") public void testNestedClassNameInParameterDefaults3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults3.java"); } @TestMetadata("nestedClassNameInParameterDefaults4.java") public void testNestedClassNameInParameterDefaults4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInParameterDefaults4.java"); } @TestMetadata("nestedClassNameInSuperParameters.java") public void testNestedClassNameInSuperParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/nestedClassNameInSuperParameters.java"); } @TestMetadata("noPrimary.java") public void testNoPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/noPrimary.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/noPrimary.java"); } @TestMetadata("parameterDefaults1.java") public void testParameterDefaults1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults1.java"); } @TestMetadata("parameterDefaults2.java") public void testParameterDefaults2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults2.java"); } @TestMetadata("parameterDefaults3.java") public void testParameterDefaults3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults3.java"); } @TestMetadata("parameterDefaults4.java") public void testParameterDefaults4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults4.java"); } @TestMetadata("parameterDefaults5.java") public void testParameterDefaults5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterDefaults5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterDefaults5.java"); } @TestMetadata("parameterModification.java") public void testParameterModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/parameterModification.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/parameterModification.java"); } @TestMetadata("privateConstructors.java") public void testPrivateConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/privateConstructors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/privateConstructors.java"); } @TestMetadata("qualifiedRefInFactoryFun.java") public void testQualifiedRefInFactoryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/qualifiedRefInFactoryFun.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/qualifiedRefInFactoryFun.java"); } @TestMetadata("secondaryConstructorWithDefaultValues.java") public void testSecondaryConstructorWithDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues.java"); } @TestMetadata("secondaryConstructorWithDefaultValues2.java") public void testSecondaryConstructorWithDefaultValues2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorWithDefaultValues2.java"); } @TestMetadata("secondaryConstructorsInInnerClass.java") public void testSecondaryConstructorsInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorsInInnerClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorsInInnerClass.java"); } @TestMetadata("secondaryConstructorsInNestedClass.java") public void testSecondaryConstructorsInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorsInNestedClass.java"); } @TestMetadata("secondaryConstructorsVisibility.java") public void testSecondaryConstructorsVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/secondaryConstructorsVisibility.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/secondaryConstructorsVisibility.java"); } @TestMetadata("staticFieldRefInFactoryFun.java") public void testStaticFieldRefInFactoryFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/staticFieldRefInFactoryFun.java"); } @TestMetadata("withManyDefaultParams.java") public void testWithManyDefaultParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/constructors/withManyDefaultParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/constructors/withManyDefaultParams.java"); } } @@ -1385,20 +1262,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ContinueStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInContinueStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/continueStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("continueWithLabel.java") public void testContinueWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/continueStatement/continueWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/continueStatement/continueWithLabel.java"); } @TestMetadata("continueWithoutLabel.java") public void testContinueWithoutLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/continueStatement/continueWithoutLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/continueStatement/continueWithoutLabel.java"); } } @@ -1406,44 +1285,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclarationStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeclarationStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/declarationStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("multiplyFinalIntDeclaration.java") public void testMultiplyFinalIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/multiplyFinalIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/multiplyFinalIntDeclaration.java"); } @TestMetadata("multiplyIntDeclaration.java") public void testMultiplyIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/multiplyIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/multiplyIntDeclaration.java"); } @TestMetadata("singleFinalIntDeclaration.java") public void testSingleFinalIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleFinalIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleFinalIntDeclaration.java"); } @TestMetadata("singleFinalStringDeclaration.java") public void testSingleFinalStringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleFinalStringDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleFinalStringDeclaration.java"); } @TestMetadata("singleIntDeclaration.java") public void testSingleIntDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleIntDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleIntDeclaration.java"); } @TestMetadata("singleStringDeclaration.java") public void testSingleStringDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/declarationStatement/singleStringDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/declarationStatement/singleStringDeclaration.java"); } } @@ -1451,22 +1328,23 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DetectProperties extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("AbstractPropertyPrivateSetter.java") public void testAbstractPropertyPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AbstractPropertyPrivateSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AbstractPropertyPrivateSetter.java"); } @TestMetadata("AccessInGetterWithThis.java") public void testAccessInGetterWithThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AccessInGetterWithThis.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AccessInGetterWithThis.java"); } @TestMetadata("AccessorsImplementInterface.java") public void testAccessorsImplementInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AccessorsImplementInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AccessorsImplementInterface.java"); } public void testAllFilesPresentInDetectProperties() throws Exception { @@ -1475,260 +1353,217 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("AnonymousClass.java") public void testAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AnonymousClass.java"); } @TestMetadata("AssignFieldInsideSetter.java") public void testAssignFieldInsideSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter.java"); } @TestMetadata("AssignFieldInsideSetter2.java") public void testAssignFieldInsideSetter2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/AssignFieldInsideSetter2.java"); } @TestMetadata("CannotDropOnlySetter.java") public void testCannotDropOnlySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/CannotDropOnlySetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/CannotDropOnlySetter.java"); } @TestMetadata("Comments.java") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/Comments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/Comments.java"); } @TestMetadata("DataClass.java") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DataClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DataClass.java"); } @TestMetadata("DataClassWithAnnotations.java") public void testDataClassWithAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DataClassWithAnnotations.java"); } @TestMetadata("DataClassWithMutableField.java") public void testDataClassWithMutableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DataClassWithMutableField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DataClassWithMutableField.java"); } @TestMetadata("DifferentFieldName.java") public void testDifferentFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentFieldName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentFieldName.java"); } @TestMetadata("DifferentFieldNameAndDefaultParameterValue.java") public void testDifferentFieldNameAndDefaultParameterValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndDefaultParameterValue.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndDefaultParameterValue.java"); } @TestMetadata("DifferentFieldNameAndSuperClass.java") public void testDifferentFieldNameAndSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndSuperClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentFieldNameAndSuperClass.java"); } @TestMetadata("DifferentProtectedFieldName.java") public void testDifferentProtectedFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DifferentProtectedFieldName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DifferentProtectedFieldName.java"); } @TestMetadata("DropGetter.java") public void testDropGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DropGetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DropGetter.java"); } @TestMetadata("DropGetterAndSetter.java") public void testDropGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DropGetterAndSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DropGetterAndSetter.java"); } @TestMetadata("DropGetterForMutable.java") public void testDropGetterForMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/DropGetterForMutable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/DropGetterForMutable.java"); } @TestMetadata("FalseGetter.java") public void testFalseGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/FalseGetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/FalseGetter.java"); } @TestMetadata("FalseSetter.java") public void testFalseSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/FalseSetter.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/FalseSetter.java"); } @TestMetadata("FieldUsagesInFactoryMethods.java") public void testFieldUsagesInFactoryMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/FieldUsagesInFactoryMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/FieldUsagesInFactoryMethods.java"); } @TestMetadata("GetterAndSetterNamesDifferent.java") public void testGetterAndSetterNamesDifferent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterAndSetterNamesDifferent.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterAndSetterNamesDifferent.java"); } @TestMetadata("GetterSetterUsages.java") public void testGetterSetterUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterSetterUsages.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterSetterUsages.java"); } @TestMetadata("GetterTypeNotMatch.java") public void testGetterTypeNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterTypeNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterTypeNotMatch.java"); } @TestMetadata("GetterWithSideEffect1.java") public void testGetterWithSideEffect1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect1.java"); } @TestMetadata("GetterWithSideEffect2.java") public void testGetterWithSideEffect2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect2.java"); } @TestMetadata("GetterWithSideEffect3.java") public void testGetterWithSideEffect3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect3.java"); } @TestMetadata("GetterWithSideEffect4.java") public void testGetterWithSideEffect4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect4.java"); } @TestMetadata("GetterWithSideEffect5.java") public void testGetterWithSideEffect5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/GetterWithSideEffect5.java"); } @TestMetadata("InCompanionObject.java") public void testInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/InCompanionObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/InCompanionObject.java"); } @TestMetadata("InInterface.java") public void testInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/InInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/InInterface.java"); } @TestMetadata("InObject.java") public void testInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/InObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/InObject.java"); } @TestMetadata("IsPrefix.java") public void testIsPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/IsPrefix.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/IsPrefix.java"); } @TestMetadata("JavaKeywordPropertyName.java") public void testJavaKeywordPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/JavaKeywordPropertyName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/JavaKeywordPropertyName.java"); } @TestMetadata("KeywordPropertyName.java") public void testKeywordPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/KeywordPropertyName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/KeywordPropertyName.java"); } @TestMetadata("Overrides.java") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/Overrides.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/Overrides.java"); } @TestMetadata("OverridesOfExternalCode.java") public void testOverridesOfExternalCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/OverridesOfExternalCode.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/OverridesOfExternalCode.java"); } @TestMetadata("PropertyAndFieldConflicts.java") public void testPropertyAndFieldConflicts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/PropertyAndFieldConflicts.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/PropertyAndFieldConflicts.java"); } @TestMetadata("PropertyType.java") public void testPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/PropertyType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/PropertyType.java"); } @TestMetadata("SetterTypeNotMatch.java") public void testSetterTypeNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterTypeNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterTypeNotMatch.java"); } @TestMetadata("SetterWithSideEffect1.java") public void testSetterWithSideEffect1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect1.java"); } @TestMetadata("SetterWithSideEffect2.java") public void testSetterWithSideEffect2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect2.java"); } @TestMetadata("SetterWithSideEffect3.java") public void testSetterWithSideEffect3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect3.java"); } @TestMetadata("SetterWithSideEffect4.java") public void testSetterWithSideEffect4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect4.java"); } @TestMetadata("SetterWithSideEffect5.java") public void testSetterWithSideEffect5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect5.java"); } @TestMetadata("SetterWithSideEffect6.java") public void testSetterWithSideEffect6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect6.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/detectProperties/SetterWithSideEffect6.java"); } } @@ -1736,38 +1571,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DoWhileStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDoWhileStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/doWhileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("whileWithAssignmentAsExpression.java") public void testWhileWithAssignmentAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithAssignmentAsExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithAssignmentAsExpression.java"); } @TestMetadata("whileWithBlock.java") public void testWhileWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithBlock.java"); } @TestMetadata("whileWithEmptyBlock.java") public void testWhileWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithEmptyBlock.java"); } @TestMetadata("whileWithExpression.java") public void testWhileWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithExpression.java"); } @TestMetadata("whileWithReturn.java") public void testWhileWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/doWhileStatement/whileWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/doWhileStatement/whileWithReturn.java"); } } @@ -1775,10 +1609,13 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DocComments extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("aWithoutHref.java") public void testAWithoutHref() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/aWithoutHref.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/aWithoutHref.java"); } public void testAllFilesPresentInDocComments() throws Exception { @@ -1787,86 +1624,72 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("deprecatedDocTag.java") public void testDeprecatedDocTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/deprecatedDocTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/deprecatedDocTag.java"); } @TestMetadata("deprecatedDocTagWithAnnotation.java") public void testDeprecatedDocTagWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithAnnotation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithAnnotation.java"); } @TestMetadata("deprecatedDocTagWithMultiLineMessage.java") public void testDeprecatedDocTagWithMultiLineMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/deprecatedDocTagWithMultiLineMessage.java"); } @TestMetadata("docCommentWithParamTag.java") public void testDocCommentWithParamTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/docCommentWithParamTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/docCommentWithParamTag.java"); } @TestMetadata("escapedCharactersInCodeQuote.java") public void testEscapedCharactersInCodeQuote() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/escapedCharactersInCodeQuote.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/escapedCharactersInCodeQuote.java"); } @TestMetadata("htmlInDocComment.java") public void testHtmlInDocComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/htmlInDocComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/htmlInDocComment.java"); } @TestMetadata("inlineTagsInDocComment.java") public void testInlineTagsInDocComment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/inlineTagsInDocComment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/inlineTagsInDocComment.java"); } @TestMetadata("linkTag.java") public void testLinkTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/linkTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/linkTag.java"); } @TestMetadata("linkTagWithLabel.java") public void testLinkTagWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/linkTagWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/linkTagWithLabel.java"); } @TestMetadata("onlyDeprecatedDocTag.java") public void testOnlyDeprecatedDocTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/onlyDeprecatedDocTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/onlyDeprecatedDocTag.java"); } @TestMetadata("preserveUnknownTags.java") public void testPreserveUnknownTags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/preserveUnknownTags.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/preserveUnknownTags.java"); } @TestMetadata("primaryConstructorDoc.java") public void testPrimaryConstructorDoc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/primaryConstructorDoc.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/primaryConstructorDoc.java"); } @TestMetadata("quoted.java") public void testQuoted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/quoted.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/quoted.java"); } @TestMetadata("seeTag.java") public void testSeeTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/docComments/seeTag.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/docComments/seeTag.java"); } } @@ -1874,116 +1697,102 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/enum"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("colorEnum.java") public void testColorEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/colorEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/colorEnum.java"); } @TestMetadata("companionObject.java") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/companionObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/companionObject.java"); } @TestMetadata("constantsWithBody1.java") public void testConstantsWithBody1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/constantsWithBody1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/constantsWithBody1.java"); } @TestMetadata("constantsWithBody2.java") public void testConstantsWithBody2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/constantsWithBody2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/constantsWithBody2.java"); } @TestMetadata("emptyEnum.java") public void testEmptyEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/emptyEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/emptyEnum.java"); } @TestMetadata("enumConstantIsNotNull.java") public void testEnumConstantIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumConstantIsNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumConstantIsNotNull.java"); } @TestMetadata("enumImplementsOneInterface.java") public void testEnumImplementsOneInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumImplementsOneInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumImplementsOneInterface.java"); } @TestMetadata("enumImplementsSeveralInterfaces.java") public void testEnumImplementsSeveralInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumImplementsSeveralInterfaces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumImplementsSeveralInterfaces.java"); } @TestMetadata("enumWithNameField.java") public void testEnumWithNameField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/enumWithNameField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/enumWithNameField.java"); } @TestMetadata("fieldsWithPrimaryPrivateConstructor.java") public void testFieldsWithPrimaryPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/fieldsWithPrimaryPrivateConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/fieldsWithPrimaryPrivateConstructor.java"); } @TestMetadata("internalEnum.java") public void testInternalEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/internalEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/internalEnum.java"); } @TestMetadata("overrideToString.java") public void testOverrideToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/overrideToString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/overrideToString.java"); } @TestMetadata("primaryPrivateConstructor.java") public void testPrimaryPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/primaryPrivateConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/primaryPrivateConstructor.java"); } @TestMetadata("privateEnum.java") public void testPrivateEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/privateEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/privateEnum.java"); } @TestMetadata("protectedEnum.java") public void testProtectedEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/protectedEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/protectedEnum.java"); } @TestMetadata("publicEnum.java") public void testPublicEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/publicEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/publicEnum.java"); } @TestMetadata("runnableImplementation.java") public void testRunnableImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/runnableImplementation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/runnableImplementation.java"); } @TestMetadata("typeSafeEnum.java") public void testTypeSafeEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/enum/typeSafeEnum.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/enum/typeSafeEnum.java"); } } @@ -1991,44 +1800,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/equals"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("EqOperator.java") public void testEqOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/EqOperator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/EqOperator.java"); } @TestMetadata("Equals1.java") public void testEquals1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals1.java"); } @TestMetadata("Equals2.java") public void testEquals2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals2.java"); } @TestMetadata("Equals3.java") public void testEquals3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals3.java"); } @TestMetadata("Equals4.java") public void testEquals4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/Equals4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/Equals4.java"); } @TestMetadata("ObjectsEquals.java") public void testObjectsEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/equals/ObjectsEquals.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/equals/ObjectsEquals.java"); } } @@ -2036,86 +1843,77 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Field extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/field"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classChildExtendsBase.java") public void testClassChildExtendsBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/classChildExtendsBase.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/classChildExtendsBase.java"); } @TestMetadata("conversion.java") public void testConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/conversion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/conversion.java"); } @TestMetadata("internalField.java") public void testInternalField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/internalField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/internalField.java"); } @TestMetadata("needInitializer.java") public void testNeedInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/needInitializer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/needInitializer.java"); } @TestMetadata("privateField.java") public void testPrivateField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/privateField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/privateField.java"); } @TestMetadata("protectedField.java") public void testProtectedField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/protectedField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/protectedField.java"); } @TestMetadata("publicField.java") public void testPublicField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/publicField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/publicField.java"); } @TestMetadata("specifyType.java") public void testSpecifyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/specifyType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/specifyType.java"); } @TestMetadata("valOrVar.java") public void testValOrVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/valOrVar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/valOrVar.java"); } @TestMetadata("valWithInit.java") public void testValWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/valWithInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/valWithInit.java"); } @TestMetadata("varWithInit.java") public void testVarWithInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/varWithInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/varWithInit.java"); } @TestMetadata("varWithoutInit.java") public void testVarWithoutInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/varWithoutInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/varWithoutInit.java"); } @TestMetadata("volatileTransientAndStrictFp.java") public void testVolatileTransientAndStrictFp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/field/volatileTransientAndStrictFp.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/field/volatileTransientAndStrictFp.java"); } } @@ -2123,272 +1921,232 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class For extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/for"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("arrayIndicesReversed.java") public void testArrayIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/arrayIndicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/arrayIndicesReversed.java"); } @TestMetadata("assignmentAsExpressionInBody.java") public void testAssignmentAsExpressionInBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/assignmentAsExpressionInBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/assignmentAsExpressionInBody.java"); } @TestMetadata("commonCaseForTest.java") public void testCommonCaseForTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/commonCaseForTest.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/commonCaseForTest.java"); } @TestMetadata("downTo1.java") public void testDownTo1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo1.java"); } @TestMetadata("downTo2.java") public void testDownTo2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo2.java"); } @TestMetadata("downTo3.java") public void testDownTo3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo3.java"); } @TestMetadata("downTo4.java") public void testDownTo4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/downTo4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/downTo4.java"); } @TestMetadata("falseArrayIndicesReversed.java") public void testFalseArrayIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseArrayIndicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseArrayIndicesReversed.java"); } @TestMetadata("falseArrayIndicesReversed2.java") public void testFalseArrayIndicesReversed2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseArrayIndicesReversed2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseArrayIndicesReversed2.java"); } @TestMetadata("falseForRange.java") public void testFalseForRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseForRange.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseForRange.java"); } @TestMetadata("falseIndicesReversed.java") public void testFalseIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/falseIndicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/falseIndicesReversed.java"); } @TestMetadata("forRangeWithBlock.java") public void testForRangeWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithBlock.java"); } @TestMetadata("forRangeWithLE.java") public void testForRangeWithLE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithLE.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithLE.java"); } @TestMetadata("forRangeWithLT.java") public void testForRangeWithLT() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithLT.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithLT.java"); } @TestMetadata("forRangeWithLT2.java") public void testForRangeWithLT2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithLT2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithLT2.java"); } @TestMetadata("forRangeWithNE.java") public void testForRangeWithNE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forRangeWithNE.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forRangeWithNE.java"); } @TestMetadata("forThroughArrayIndices.java") public void testForThroughArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughArrayIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughArrayIndices.java"); } @TestMetadata("forThroughCollectionIndices.java") public void testForThroughCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughCollectionIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughCollectionIndices.java"); } @TestMetadata("forThroughListIndices.java") public void testForThroughListIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughListIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughListIndices.java"); } @TestMetadata("forThroughListIndicesNE.java") public void testForThroughListIndicesNE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughListIndicesNE.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughListIndicesNE.java"); } @TestMetadata("forThroughNonArrayIndices.java") public void testForThroughNonArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughNonArrayIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughNonArrayIndices.java"); } @TestMetadata("forThroughNonCollectionIndices.java") public void testForThroughNonCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forThroughNonCollectionIndices.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forThroughNonCollectionIndices.java"); } @TestMetadata("forWithBlock.java") public void testForWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithBlock.java"); } @TestMetadata("forWithBlockAndDoubleUpdate.java") public void testForWithBlockAndDoubleUpdate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithBlockAndDoubleUpdate.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithBlockAndDoubleUpdate.java"); } @TestMetadata("forWithEmptyBlock.java") public void testForWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithEmptyBlock.java"); } @TestMetadata("forWithExpression.java") public void testForWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithExpression.java"); } @TestMetadata("forWithNullCondition.java") public void testForWithNullCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithNullCondition.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithNullCondition.java"); } @TestMetadata("forWithNullInit.java") public void testForWithNullInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithNullInit.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithNullInit.java"); } @TestMetadata("forWithNullUpdate.java") public void testForWithNullUpdate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithNullUpdate.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithNullUpdate.java"); } @TestMetadata("forWithReturn.java") public void testForWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithReturn.java"); } @TestMetadata("forWithoutBody.java") public void testForWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/forWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/forWithoutBody.java"); } @TestMetadata("indicesReversed.java") public void testIndicesReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/indicesReversed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/indicesReversed.java"); } @TestMetadata("infiniteFor.java") public void testInfiniteFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/infiniteFor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/infiniteFor.java"); } @TestMetadata("nameConflict1.java") public void testNameConflict1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict1.java"); } @TestMetadata("nameConflict2.java") public void testNameConflict2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict2.java"); } @TestMetadata("nameConflict3.java") public void testNameConflict3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict3.java"); } @TestMetadata("nameConflict4.java") public void testNameConflict4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict4.java"); } @TestMetadata("nameConflict5.java") public void testNameConflict5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/nameConflict5.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/nameConflict5.java"); } @TestMetadata("notInBlock.java") public void testNotInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/notInBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/notInBlock.java"); } @TestMetadata("overMapEntries.java") public void testOverMapEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/overMapEntries.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/overMapEntries.java"); } @TestMetadata("withContinue1.java") public void testWithContinue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinue1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinue1.java"); } @TestMetadata("withContinue2.java") public void testWithContinue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinue2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinue2.java"); } @TestMetadata("withContinue3.java") public void testWithContinue3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinue3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinue3.java"); } @TestMetadata("withContinueAndLabels.java") public void testWithContinueAndLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/for/withContinueAndLabels.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/for/withContinueAndLabels.java"); } } @@ -2396,44 +2154,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForeachStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInForeachStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/foreachStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("enhancedForWithBlock.java") public void testEnhancedForWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithBlock.java"); } @TestMetadata("enhancedForWithEmptyBlock.java") public void testEnhancedForWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithEmptyBlock.java"); } @TestMetadata("enhancedForWithExpression.java") public void testEnhancedForWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithExpression.java"); } @TestMetadata("enhancedForWithReturn.java") public void testEnhancedForWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/enhancedForWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/enhancedForWithReturn.java"); } @TestMetadata("foreachWithoutBody.java") public void testForeachWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/foreachWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/foreachWithoutBody.java"); } @TestMetadata("nullableIterable.java") public void testNullableIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/foreachStatement/nullableIterable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/foreachStatement/nullableIterable.java"); } } @@ -2441,50 +2197,47 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Formatting extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFormatting() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/formatting"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("chainedCall.java") public void testChainedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/chainedCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/chainedCall.java"); } @TestMetadata("lineBreaksBetweenArguments.java") public void testLineBreaksBetweenArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/lineBreaksBetweenArguments.java"); } @TestMetadata("nonStaticMembers.java") public void testNonStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/nonStaticMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/nonStaticMembers.java"); } @TestMetadata("nonStaticMembersWithComments.java") public void testNonStaticMembersWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/nonStaticMembersWithComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/nonStaticMembersWithComments.java"); } @TestMetadata("parameterList.java") public void testParameterList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/parameterList.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/parameterList.java"); } @TestMetadata("staticAndNonStaticMembersWithComments.java") public void testStaticAndNonStaticMembersWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/staticAndNonStaticMembersWithComments.java"); } @TestMetadata("staticMembersWithComments.java") public void testStaticMembersWithComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/formatting/staticMembersWithComments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/formatting/staticMembersWithComments.java"); } } @@ -2492,10 +2245,13 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractMethod.java") public void testAbstractMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/abstractMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/abstractMethod.java"); } public void testAllFilesPresentInFunction() throws Exception { @@ -2504,206 +2260,172 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("classGenericParam.java") public void testClassGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/classGenericParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/classGenericParam.java"); } @TestMetadata("emptyVoidMethod.java") public void testEmptyVoidMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/emptyVoidMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/emptyVoidMethod.java"); } @TestMetadata("extendsBaseWhichExtendsObject.java") public void testExtendsBaseWhichExtendsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/extendsBaseWhichExtendsObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/extendsBaseWhichExtendsObject.java"); } @TestMetadata("final.java") public void testFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/final.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/final.java"); } @TestMetadata("functionInFinalClass.java") public void testFunctionInFinalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/functionInFinalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/functionInFinalClass.java"); } @TestMetadata("internal.java") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/internal.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/internal.java"); } @TestMetadata("java8Lambdas.java") public void testJava8Lambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/java8Lambdas.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/java8Lambdas.java"); } @TestMetadata("java8MRKFunctionExpectedType.java") public void testJava8MRKFunctionExpectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/java8MRKFunctionExpectedType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/java8MRKFunctionExpectedType.java"); } @TestMetadata("java8MRSamConstructor.java") public void testJava8MRSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/java8MRSamConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/java8MRSamConstructor.java"); } @TestMetadata("lineBreaksBetweenParameters.java") public void testLineBreaksBetweenParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/lineBreaksBetweenParameters.java"); } @TestMetadata("main.java") public void testMain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/main.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/main.java"); } @TestMetadata("main2.java") public void testMain2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/main2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/main2.java"); } @TestMetadata("mainAndNullabilitySetting.java") public void testMainAndNullabilitySetting() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/mainAndNullabilitySetting.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/mainAndNullabilitySetting.java"); } @TestMetadata("methodClassType.java") public void testMethodClassType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodClassType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodClassType.java"); } @TestMetadata("methodPrimitiveType.java") public void testMethodPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodPrimitiveType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodPrimitiveType.java"); } @TestMetadata("methodPrimitiveType2.java") public void testMethodPrimitiveType2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodPrimitiveType2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodPrimitiveType2.java"); } @TestMetadata("methodWithReturnStatement.java") public void testMethodWithReturnStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/methodWithReturnStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/methodWithReturnStatement.java"); } @TestMetadata("nativeMethods.java") public void testNativeMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/nativeMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/nativeMethods.java"); } @TestMetadata("open.java") public void testOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/open.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/open.java"); } @TestMetadata("override.java") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/override.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/override.java"); } @TestMetadata("overrideAndOpen.java") public void testOverrideAndOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideAndOpen.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideAndOpen.java"); } @TestMetadata("overrideObject.java") public void testOverrideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideObject.java"); } @TestMetadata("overrideObject2.java") public void testOverrideObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideObject2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideObject2.java"); } @TestMetadata("overrideObject3.java") public void testOverrideObject3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideObject3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideObject3.java"); } @TestMetadata("overrideWithHigherVisibility.java") public void testOverrideWithHigherVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/overrideWithHigherVisibility.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/overrideWithHigherVisibility.java"); } @TestMetadata("ownGenericParam.java") public void testOwnGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/ownGenericParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/ownGenericParam.java"); } @TestMetadata("ownSeveralGenericParams.java") public void testOwnSeveralGenericParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/ownSeveralGenericParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/ownSeveralGenericParams.java"); } @TestMetadata("parameterModification.java") public void testParameterModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/parameterModification.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/parameterModification.java"); } @TestMetadata("private.java") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/private.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/private.java"); } @TestMetadata("protected.java") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/protected.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/protected.java"); } @TestMetadata("public.java") public void testPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/public.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/public.java"); } @TestMetadata("synchronizedMethod.java") public void testSynchronizedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/synchronizedMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/synchronizedMethod.java"); } @TestMetadata("throws.java") public void testThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/throws.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/throws.java"); } @TestMetadata("varVararg.java") public void testVarVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/function/varVararg.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/function/varVararg.java"); } } @@ -2711,26 +2433,27 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Identifier extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIdentifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/identifier"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("finalFieldReference.java") public void testFinalFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/identifier/finalFieldReference.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/identifier/finalFieldReference.java"); } @TestMetadata("keywords.java") public void testKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/identifier/keywords.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/identifier/keywords.java"); } @TestMetadata("withDollar.java") public void testWithDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/identifier/withDollar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/identifier/withDollar.java"); } } @@ -2738,56 +2461,52 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IfStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIfStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/ifStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("assignmentAsExpressionInIf.java") public void testAssignmentAsExpressionInIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/assignmentAsExpressionInIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/assignmentAsExpressionInIf.java"); } @TestMetadata("elseIf.java") public void testElseIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/elseIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/elseIf.java"); } @TestMetadata("ifWithoutThen.java") public void testIfWithoutThen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/ifWithoutThen.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/ifWithoutThen.java"); } @TestMetadata("multiLine.java") public void testMultiLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/multiLine.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/multiLine.java"); } @TestMetadata("singleLine.java") public void testSingleLine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/singleLine.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/singleLine.java"); } @TestMetadata("withBlocks.java") public void testWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/withBlocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/withBlocks.java"); } @TestMetadata("withEmptyBlocks.java") public void testWithEmptyBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/withEmptyBlocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/withEmptyBlocks.java"); } @TestMetadata("withoutElse.java") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/ifStatement/withoutElse.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/ifStatement/withoutElse.java"); } } @@ -2795,38 +2514,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ImportStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInImportStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/importStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("importWithKeywords.java") public void testImportWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/importWithKeywords.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/importWithKeywords.java"); } @TestMetadata("importWithStar.java") public void testImportWithStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/importWithStar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/importWithStar.java"); } @TestMetadata("oneImport.java") public void testOneImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/oneImport.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/oneImport.java"); } @TestMetadata("onlyImports.java") public void testOnlyImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/onlyImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/onlyImports.java"); } @TestMetadata("simpleImport.java") public void testSimpleImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/importStatement/simpleImport.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/importStatement/simpleImport.java"); } } @@ -2834,38 +2552,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInheritance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/inheritance"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classOneExtendsBaseGeneric.java") public void testClassOneExtendsBaseGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseGeneric.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseGeneric.java"); } @TestMetadata("classOneExtendsBaseWithOneParam.java") public void testClassOneExtendsBaseWithOneParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithOneParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithOneParam.java"); } @TestMetadata("classOneExtendsBaseWithZeroParams.java") public void testClassOneExtendsBaseWithZeroParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParams.java"); } @TestMetadata("classOneExtendsBaseWithZeroParamsNonEmptyConstructor.java") public void testClassOneExtendsBaseWithZeroParamsNonEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParamsNonEmptyConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/classOneExtendsBaseWithZeroParamsNonEmptyConstructor.java"); } @TestMetadata("openModifier.java") public void testOpenModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/inheritance/openModifier.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/inheritance/openModifier.java"); } } @@ -2873,26 +2590,27 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsOperator extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIsOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/isOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("complicatedExpression.java") public void testComplicatedExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/isOperator/complicatedExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/isOperator/complicatedExpression.java"); } @TestMetadata("rawType.java") public void testRawType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/isOperator/rawType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/isOperator/rawType.java"); } @TestMetadata("simpleReference.java") public void testSimpleReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/isOperator/simpleReference.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/isOperator/simpleReference.java"); } } @@ -2900,278 +2618,237 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Issues extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInIssues() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/issues"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("arrayLength.java") public void testArrayLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/arrayLength.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/arrayLength.java"); } @TestMetadata("comments.java") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/comments.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/comments.java"); } @TestMetadata("doNotQualifyStatic.java") public void testDoNotQualifyStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/doNotQualifyStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/doNotQualifyStatic.java"); } @TestMetadata("kt-1016.java") public void testKt_1016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-1016.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-1016.java"); } @TestMetadata("kt-1048.java") public void testKt_1048() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-1048.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-1048.java"); } @TestMetadata("kt-1074.java") public void testKt_1074() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-1074.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-1074.java"); } @TestMetadata("kt-14248.java") public void testKt_14248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-14248.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-14248.java"); } @TestMetadata("kt-17379.java") public void testKt_17379() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-17379.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-17379.java"); } @TestMetadata("kt-19634.java") public void testKt_19634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-19634.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-19634.java"); } @TestMetadata("kt-19943.java") public void testKt_19943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-19943.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-19943.java"); } @TestMetadata("kt-5294.java") public void testKt_5294() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-5294.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-5294.java"); } @TestMetadata("kt-5400.java") public void testKt_5400() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-5400.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-5400.java"); } @TestMetadata("kt-543.java") public void testKt_543() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-543.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-543.java"); } @TestMetadata("kt-543-boxed.java") public void testKt_543_boxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-543-boxed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-543-boxed.java"); } @TestMetadata("kt-543-mixed.java") public void testKt_543_mixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-543-mixed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-543-mixed.java"); } @TestMetadata("kt-638.java") public void testKt_638() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-638.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-638.java"); } @TestMetadata("kt-6790.java") public void testKt_6790() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-6790.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-6790.java"); } @TestMetadata("kt-696.java") public void testKt_696() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-696.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-696.java"); } @TestMetadata("kt-792.java") public void testKt_792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-792.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-792.java"); } @TestMetadata("kt-792-mixed.java") public void testKt_792_mixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-792-mixed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-792-mixed.java"); } @TestMetadata("kt-794.java") public void testKt_794() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-794.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-794.java"); } @TestMetadata("kt-794-mixed.java") public void testKt_794_mixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-794-mixed.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-794-mixed.java"); } @TestMetadata("kt-807.java") public void testKt_807() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-807.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-807.java"); } @TestMetadata("kt-809.java") public void testKt_809() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-809.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-809.java"); } @TestMetadata("kt-809-string.java") public void testKt_809_string() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-809-string.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-809-string.java"); } @TestMetadata("kt-820.java") public void testKt_820() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-820.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-820.java"); } @TestMetadata("kt-820-field.java") public void testKt_820_field() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-820-field.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-820-field.java"); } @TestMetadata("kt-820-string.java") public void testKt_820_string() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-820-string.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-820-string.java"); } @TestMetadata("kt-824.java") public void testKt_824() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-824.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-824.java"); } @TestMetadata("kt-824-isDir.java") public void testKt_824_isDir() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-824-isDir.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-824-isDir.java"); } @TestMetadata("kt-828.java") public void testKt_828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-828.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-828.java"); } @TestMetadata("kt-836.java") public void testKt_836() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-836.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-836.java"); } @TestMetadata("kt-837.java") public void testKt_837() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-837.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-837.java"); } @TestMetadata("kt-851.java") public void testKt_851() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-851.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-851.java"); } @TestMetadata("kt-852.java") public void testKt_852() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-852.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-852.java"); } @TestMetadata("kt-871.java") public void testKt_871() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-871.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-871.java"); } @TestMetadata("kt-879.java") public void testKt_879() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-879.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-879.java"); } @TestMetadata("kt-893.java") public void testKt_893() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-893.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-893.java"); } @TestMetadata("kt-899.java") public void testKt_899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-899.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-899.java"); } @TestMetadata("kt-963.java") public void testKt_963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-963.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-963.java"); } @TestMetadata("kt-9997.java") public void testKt_9997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/kt-9997.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/kt-9997.java"); } @TestMetadata("operationsWithChar.java") public void testOperationsWithChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/operationsWithChar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/operationsWithChar.java"); } @TestMetadata("qualifyStatic.java") public void testQualifyStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/qualifyStatic.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/qualifyStatic.java"); } @TestMetadata("spaceBeforeAssignment.java") public void testSpaceBeforeAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/spaceBeforeAssignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/spaceBeforeAssignment.java"); } @TestMetadata("unfinishedReferenceExpression.java") public void testUnfinishedReferenceExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/issues/unfinishedReferenceExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/issues/unfinishedReferenceExpression.java"); } } @@ -3179,122 +2856,107 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinApiAccess extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinApiAccess() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/kotlinApiAccess"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ClassObjectMembers.java") public void testClassObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ClassObjectMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ClassObjectMembers.java"); } @TestMetadata("CorrectFunNullabilityDetected.java") public void testCorrectFunNullabilityDetected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/CorrectFunNullabilityDetected.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/CorrectFunNullabilityDetected.java"); } @TestMetadata("CorrectNullabilityDetected.java") public void testCorrectNullabilityDetected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/CorrectNullabilityDetected.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/CorrectNullabilityDetected.java"); } @TestMetadata("ExtensionFunction.java") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionFunction.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionFunction.java"); } @TestMetadata("ExtensionProperty.java") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ExtensionProperty.java"); } @TestMetadata("GlobalFunction.java") public void testGlobalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalFunction.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalFunction.java"); } @TestMetadata("GlobalGenericFunction.java") public void testGlobalGenericFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalGenericFunction.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalGenericFunction.java"); } @TestMetadata("GlobalValue1.java") public void testGlobalValue1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue1.java"); } @TestMetadata("GlobalValue2.java") public void testGlobalValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/GlobalValue2.java"); } @TestMetadata("InheritedProperty.java") public void testInheritedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/InheritedProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/InheritedProperty.java"); } @TestMetadata("ObjectMembers.java") public void testObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/ObjectMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/ObjectMembers.java"); } @TestMetadata("Property.java") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/Property.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/Property.java"); } @TestMetadata("Property2.java") public void testProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/Property2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/Property2.java"); } @TestMetadata("StaticImportAllFromFileFacade.java") public void testStaticImportAllFromFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromFileFacade.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromFileFacade.java"); } @TestMetadata("StaticImportAllFromObject.java") public void testStaticImportAllFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportAllFromObject.java"); } @TestMetadata("StaticImportFromCompanionObject.java") public void testStaticImportFromCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject.java"); } @TestMetadata("StaticImportFromCompanionObject2.java") public void testStaticImportFromCompanionObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject2.java"); } @TestMetadata("StaticImportFromCompanionObject3.java") public void testStaticImportFromCompanionObject3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromCompanionObject3.java"); } @TestMetadata("StaticImportFromFileFacade.java") public void testStaticImportFromFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromFileFacade.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/kotlinApiAccess/StaticImportFromFileFacade.java"); } } @@ -3302,14 +2964,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LabelStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLabelStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/labelStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("complicatedExampleFromJavaTutorial.java") public void testComplicatedExampleFromJavaTutorial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/labelStatement/complicatedExampleFromJavaTutorial.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/labelStatement/complicatedExampleFromJavaTutorial.java"); } } @@ -3317,20 +2982,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class List extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/list"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ForEach.java") public void testForEach() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/list/ForEach.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/list/ForEach.java"); } @TestMetadata("Lists.java") public void testLists() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/list/Lists.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/list/Lists.java"); } } @@ -3338,98 +3005,87 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiteralExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLiteralExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/literalExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("char.java") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/char.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/char.java"); } @TestMetadata("charOctal.java") public void testCharOctal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/charOctal.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/charOctal.java"); } @TestMetadata("charToNumber.java") public void testCharToNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/charToNumber.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/charToNumber.java"); } @TestMetadata("charToString.java") public void testCharToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/charToString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/charToString.java"); } @TestMetadata("dollarInsideString.java") public void testDollarInsideString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/dollarInsideString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/dollarInsideString.java"); } @TestMetadata("double.java") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/double.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/double.java"); } @TestMetadata("endsWithDFL.java") public void testEndsWithDFL() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/endsWithDFL.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/endsWithDFL.java"); } @TestMetadata("exponentDouble.java") public void testExponentDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/exponentDouble.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/exponentDouble.java"); } @TestMetadata("exponentFloat.java") public void testExponentFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/exponentFloat.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/exponentFloat.java"); } @TestMetadata("float.java") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/float.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/float.java"); } @TestMetadata("hex.java") public void testHex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/hex.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/hex.java"); } @TestMetadata("long.java") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/long.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/long.java"); } @TestMetadata("octal.java") public void testOctal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/octal.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/octal.java"); } @TestMetadata("stringOctalChars.java") public void testStringOctalChars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/stringOctalChars.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/stringOctalChars.java"); } @TestMetadata("trueOrFalse.java") public void testTrueOrFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/literalExpression/trueOrFalse.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/literalExpression/trueOrFalse.java"); } } @@ -3437,62 +3093,57 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalVariable extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLocalVariable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/localVariable"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("autoBangBang.java") public void testAutoBangBang() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/autoBangBang.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/autoBangBang.java"); } @TestMetadata("conversion.java") public void testConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/conversion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/conversion.java"); } @TestMetadata("literalConversion.java") public void testLiteralConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/literalConversion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/literalConversion.java"); } @TestMetadata("nullIInitializer.java") public void testNullIInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/nullIInitializer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/nullIInitializer.java"); } @TestMetadata("object.java") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/object.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/object.java"); } @TestMetadata("unboxing.java") public void testUnboxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/unboxing.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/unboxing.java"); } @TestMetadata("valTypeDoNotMatch.java") public void testValTypeDoNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/valTypeDoNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/valTypeDoNotMatch.java"); } @TestMetadata("varTypeDoNotMatch.java") public void testVarTypeDoNotMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/varTypeDoNotMatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/varTypeDoNotMatch.java"); } @TestMetadata("varWithNoInitializer.java") public void testVarWithNoInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/localVariable/varWithNoInitializer.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/localVariable/varWithNoInitializer.java"); } } @@ -3500,86 +3151,77 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodCallExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMethodCallExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/methodCallExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("callWithKeywords.java") public void testCallWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/callWithKeywords.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/callWithKeywords.java"); } @TestMetadata("collectionsMethods.java") public void testCollectionsMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods.java"); } @TestMetadata("collectionsMethods2.java") public void testCollectionsMethods2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/collectionsMethods2.java"); } @TestMetadata("emptyCall.java") public void testEmptyCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/emptyCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/emptyCall.java"); } @TestMetadata("genericMethod.java") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/genericMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/genericMethod.java"); } @TestMetadata("getClass.java") public void testGetClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/getClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/getClass.java"); } @TestMetadata("parameterToReceiver.java") public void testParameterToReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/parameterToReceiver.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/parameterToReceiver.java"); } @TestMetadata("simpleCall.java") public void testSimpleCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/simpleCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/simpleCall.java"); } @TestMetadata("specialBuiltinMembers.java") public void testSpecialBuiltinMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/specialBuiltinMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/specialBuiltinMembers.java"); } @TestMetadata("stringMethods.java") public void testStringMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/stringMethods.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/stringMethods.java"); } @TestMetadata("systemOut.java") public void testSystemOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/systemOut.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/systemOut.java"); } @TestMetadata("vararg1.java") public void testVararg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/vararg1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/vararg1.java"); } @TestMetadata("vararg2.java") public void testVararg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/methodCallExpression/vararg2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/methodCallExpression/vararg2.java"); } } @@ -3587,44 +3229,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Misc extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMisc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/misc"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("packageWithClass.java") public void testPackageWithClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithClass.java"); } @TestMetadata("packageWithClasses.java") public void testPackageWithClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithClasses.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithClasses.java"); } @TestMetadata("packageWithImports.java") public void testPackageWithImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithImports.java"); } @TestMetadata("packageWithMixedImports.java") public void testPackageWithMixedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithMixedImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithMixedImports.java"); } @TestMetadata("packageWithOpenClass.java") public void testPackageWithOpenClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithOpenClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithOpenClass.java"); } @TestMetadata("packageWithStaticImports.java") public void testPackageWithStaticImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/misc/packageWithStaticImports.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/misc/packageWithStaticImports.java"); } } @@ -3632,56 +3272,52 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MutableCollections extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMutableCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/mutableCollections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("FunctionParameters.java") public void testFunctionParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionParameters.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionParameters.java"); } @TestMetadata("FunctionParameters2.java") public void testFunctionParameters2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionParameters2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionParameters2.java"); } @TestMetadata("FunctionReturnValue.java") public void testFunctionReturnValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue.java"); } @TestMetadata("FunctionReturnValue2.java") public void testFunctionReturnValue2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/FunctionReturnValue2.java"); } @TestMetadata("Iterator.java") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Iterator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Iterator.java"); } @TestMetadata("Iterator2.java") public void testIterator2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Iterator2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Iterator2.java"); } @TestMetadata("Overrides.java") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Overrides.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Overrides.java"); } @TestMetadata("Recursion.java") public void testRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/mutableCollections/Recursion.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/mutableCollections/Recursion.java"); } } @@ -3689,98 +3325,87 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NewClassExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNewClassExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/newClassExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classWithParam.java") public void testClassWithParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/classWithParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/classWithParam.java"); } @TestMetadata("classWithParams.java") public void testClassWithParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/classWithParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/classWithParams.java"); } @TestMetadata("classWithoutBody.java") public void testClassWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/classWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/classWithoutBody.java"); } @TestMetadata("fullQualifiedName.java") public void testFullQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName.java"); } @TestMetadata("fullQualifiedName2.java") public void testFullQualifiedName2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/fullQualifiedName2.java"); } @TestMetadata("genericClassInvocation.java") public void testGenericClassInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/genericClassInvocation.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/genericClassInvocation.java"); } @TestMetadata("javaLangObject.java") public void testJavaLangObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/javaLangObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/javaLangObject.java"); } @TestMetadata("lineBreaks.java") public void testLineBreaks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/lineBreaks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/lineBreaks.java"); } @TestMetadata("newAnonymousClass.java") public void testNewAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass.java"); } @TestMetadata("newAnonymousClass2.java") public void testNewAnonymousClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass2.java"); } @TestMetadata("newAnonymousClass3.java") public void testNewAnonymousClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newAnonymousClass3.java"); } @TestMetadata("newClassByFullName.java") public void testNewClassByFullName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newClassByFullName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newClassByFullName.java"); } @TestMetadata("newInnerClass.java") public void testNewInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newInnerClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newInnerClass.java"); } @TestMetadata("newListAndNewMember.java") public void testNewListAndNewMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newListAndNewMember.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newListAndNewMember.java"); } @TestMetadata("newStaticInnerClass.java") public void testNewStaticInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/newClassExpression/newStaticInnerClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/newClassExpression/newStaticInnerClass.java"); } } @@ -3788,230 +3413,197 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Nullability extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/nullability"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("autoNotNull.java") public void testAutoNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/autoNotNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/autoNotNull.java"); } @TestMetadata("FieldAssignedWithNull.java") public void testFieldAssignedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldAssignedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldAssignedWithNull.java"); } @TestMetadata("FieldComparedWithNull.java") public void testFieldComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull.java"); } @TestMetadata("FieldComparedWithNull2.java") public void testFieldComparedWithNull2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull2.java"); } @TestMetadata("FieldComparedWithNull3.java") public void testFieldComparedWithNull3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull3.java"); } @TestMetadata("FieldComparedWithNull4.java") public void testFieldComparedWithNull4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldComparedWithNull4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldComparedWithNull4.java"); } @TestMetadata("FieldInitializedWithNull.java") public void testFieldInitializedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/FieldInitializedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/FieldInitializedWithNull.java"); } @TestMetadata("IndirectOverride.java") public void testIndirectOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/IndirectOverride.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/IndirectOverride.java"); } @TestMetadata("LocalValReassignment.java") public void testLocalValReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/LocalValReassignment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/LocalValReassignment.java"); } @TestMetadata("MethodInvokedWithNullArg.java") public void testMethodInvokedWithNullArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg.java"); } @TestMetadata("MethodInvokedWithNullArg2.java") public void testMethodInvokedWithNullArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodInvokedWithNullArg2.java"); } @TestMetadata("MethodInvokedWithTernaryNullArg.java") public void testMethodInvokedWithTernaryNullArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodInvokedWithTernaryNullArg.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodInvokedWithTernaryNullArg.java"); } @TestMetadata("MethodResultComparedWithNull.java") public void testMethodResultComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull.java"); } @TestMetadata("MethodResultComparedWithNull2.java") public void testMethodResultComparedWithNull2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull2.java"); } @TestMetadata("MethodResultComparedWithNull3.java") public void testMethodResultComparedWithNull3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull3.java"); } @TestMetadata("MethodResultComparedWithNull4.java") public void testMethodResultComparedWithNull4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultComparedWithNull4.java"); } @TestMetadata("MethodResultInitializesNullableField.java") public void testMethodResultInitializesNullableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodResultInitializesNullableField.java"); } @TestMetadata("MethodReturnsNull.java") public void testMethodReturnsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsNull.java"); } @TestMetadata("MethodReturnsNullInAnonymousClass.java") public void testMethodReturnsNullInAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsNullInAnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsNullInAnonymousClass.java"); } @TestMetadata("MethodReturnsNullInLocalClass.java") public void testMethodReturnsNullInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsNullInLocalClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsNullInLocalClass.java"); } @TestMetadata("MethodReturnsTernaryNull.java") public void testMethodReturnsTernaryNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/MethodReturnsTernaryNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/MethodReturnsTernaryNull.java"); } @TestMetadata("notNullCast.java") public void testNotNullCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/notNullCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/notNullCast.java"); } @TestMetadata("nullableField.java") public void testNullableField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableField.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableField.java"); } @TestMetadata("nullableInitializer1.java") public void testNullableInitializer1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer1.java"); } @TestMetadata("nullableInitializer2.java") public void testNullableInitializer2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer2.java"); } @TestMetadata("nullableInitializer3.java") public void testNullableInitializer3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer3.java"); } @TestMetadata("nullableInitializer4.java") public void testNullableInitializer4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/nullableInitializer4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/nullableInitializer4.java"); } @TestMetadata("NullableIntNoCrash.java") public void testNullableIntNoCrash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/NullableIntNoCrash.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/NullableIntNoCrash.java"); } @TestMetadata("NullableMethodDotAccess.java") public void testNullableMethodDotAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/NullableMethodDotAccess.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/NullableMethodDotAccess.java"); } @TestMetadata("NullableVariableDotAccess.java") public void testNullableVariableDotAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/NullableVariableDotAccess.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/NullableVariableDotAccess.java"); } @TestMetadata("OverrideWithInheritanceLoop.java") public void testOverrideWithInheritanceLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/OverrideWithInheritanceLoop.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/OverrideWithInheritanceLoop.java"); } @TestMetadata("Overrides.java") public void testOverrides() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/Overrides.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/Overrides.java"); } @TestMetadata("ParameterComparedWithNull.java") public void testParameterComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/ParameterComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/ParameterComparedWithNull.java"); } @TestMetadata("VariableAssignedWithNull.java") public void testVariableAssignedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableAssignedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableAssignedWithNull.java"); } @TestMetadata("VariableComparedWithNull.java") public void testVariableComparedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableComparedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableComparedWithNull.java"); } @TestMetadata("VariableInitializedWithNull.java") public void testVariableInitializedWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableInitializedWithNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableInitializedWithNull.java"); } @TestMetadata("VariableInitializedWithTernaryNull.java") public void testVariableInitializedWithTernaryNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/nullability/VariableInitializedWithTernaryNull.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/nullability/VariableInitializedWithTernaryNull.java"); } } @@ -4019,14 +3611,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectLiteral extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInObjectLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/objectLiteral"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("MyFrame.java") public void testMyFrame() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/objectLiteral/MyFrame.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/objectLiteral/MyFrame.java"); } } @@ -4034,16 +3629,18 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Overloads extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("Abstract.java") public void testAbstract() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Abstract.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Abstract.java"); } @TestMetadata("AccessorToDrop.java") public void testAccessorToDrop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/AccessorToDrop.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/AccessorToDrop.java"); } public void testAllFilesPresentInOverloads() throws Exception { @@ -4052,32 +3649,27 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("Annotations.java") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Annotations.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Annotations.java"); } @TestMetadata("Override.java") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Override.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Override.java"); } @TestMetadata("Private.java") public void testPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Private.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Private.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Simple.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Simple.java"); } @TestMetadata("Synchronized.java") public void testSynchronized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/overloads/Synchronized.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/overloads/Synchronized.java"); } } @@ -4085,14 +3677,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/packageStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("keywordInPackageName.java") public void testKeywordInPackageName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/packageStatement/keywordInPackageName.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/packageStatement/keywordInPackageName.java"); } } @@ -4100,20 +3695,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ParenthesizedExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInParenthesizedExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/parenthesizedExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("parenthesized.java") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized.java"); } @TestMetadata("parenthesized2.java") public void testParenthesized2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/parenthesizedExpression/parenthesized2.java"); } } @@ -4121,44 +3718,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PolyadicExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPolyadicExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/polyadicExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("divide.java") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/divide.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/divide.java"); } @TestMetadata("minus.java") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/minus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/minus.java"); } @TestMetadata("multiply.java") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/multiply.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/multiply.java"); } @TestMetadata("plus.java") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/plus.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/plus.java"); } @TestMetadata("remainder.java") public void testRemainder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/remainder.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/remainder.java"); } @TestMetadata("unassignedShiftRight.java") public void testUnassignedShiftRight() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/polyadicExpression/unassignedShiftRight.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/polyadicExpression/unassignedShiftRight.java"); } } @@ -4166,68 +3761,62 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PostProcessing extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPostProcessing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/postProcessing"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("AnonymousObject.java") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/AnonymousObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/AnonymousObject.java"); } @TestMetadata("GetOperator.java") public void testGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/GetOperator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/GetOperator.java"); } @TestMetadata("IfNullReturnToElvis.java") public void testIfNullReturnToElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/IfNullReturnToElvis.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/IfNullReturnToElvis.java"); } @TestMetadata("IfToElvis.java") public void testIfToElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/IfToElvis.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/IfToElvis.java"); } @TestMetadata("IfToSafeCall.java") public void testIfToSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/IfToSafeCall.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/IfToSafeCall.java"); } @TestMetadata("NotIs.java") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/NotIs.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/NotIs.java"); } @TestMetadata("RedundantTypeCast.java") public void testRedundantTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/RedundantTypeCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/RedundantTypeCast.java"); } @TestMetadata("RedundantTypeCastAndInline.java") public void testRedundantTypeCastAndInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/RedundantTypeCastAndInline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/RedundantTypeCastAndInline.java"); } @TestMetadata("RedunduntTypeCastAndProhibitedInline.java") public void testRedunduntTypeCastAndProhibitedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/RedunduntTypeCastAndProhibitedInline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/RedunduntTypeCastAndProhibitedInline.java"); } @TestMetadata("SyntheticExtensionPropertyAccess.java") public void testSyntheticExtensionPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postProcessing/SyntheticExtensionPropertyAccess.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postProcessing/SyntheticExtensionPropertyAccess.java"); } } @@ -4235,20 +3824,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PostfixOperator extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPostfixOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/postfixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("decrement.java") public void testDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postfixOperator/decrement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postfixOperator/decrement.java"); } @TestMetadata("increment.java") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/postfixOperator/increment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/postfixOperator/increment.java"); } } @@ -4256,44 +3847,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrefixOperator extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPrefixOperator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/prefixOperator"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("decrement.java") public void testDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/decrement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/decrement.java"); } @TestMetadata("excl.java") public void testExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/excl.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/excl.java"); } @TestMetadata("increment.java") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/increment.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/increment.java"); } @TestMetadata("kt-667.java") public void testKt_667() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/kt-667.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/kt-667.java"); } @TestMetadata("nullableIf.java") public void testNullableIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/nullableIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/nullableIf.java"); } @TestMetadata("tilde.java") public void testTilde() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/prefixOperator/tilde.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/prefixOperator/tilde.java"); } } @@ -4301,14 +3890,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Projections extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProjections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/projections"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("projections.java") public void testProjections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/projections/projections.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/projections/projections.java"); } } @@ -4316,50 +3908,47 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Protected extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInProtected() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/protected"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("constructorProperty.java") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/constructorProperty.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/constructorProperty.java"); } @TestMetadata("inheritorsSamePackage.java") public void testInheritorsSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/inheritorsSamePackage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/inheritorsSamePackage.java"); } @TestMetadata("onlyProtectedConstructor.java") public void testOnlyProtectedConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/onlyProtectedConstructor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/onlyProtectedConstructor.java"); } @TestMetadata("protectedInSamePackage.java") public void testProtectedInSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/protectedInSamePackage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/protectedInSamePackage.java"); } @TestMetadata("severalInheritors.java") public void testSeveralInheritors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/severalInheritors.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/severalInheritors.java"); } @TestMetadata("superInSamePackage.java") public void testSuperInSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/superInSamePackage.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/superInSamePackage.java"); } @TestMetadata("usages.java") public void testUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/protected/usages.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/protected/usages.java"); } } @@ -4367,32 +3956,32 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RawGenerics extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRawGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/rawGenerics"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("kt-540.java") public void testKt_540() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/kt-540.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/kt-540.java"); } @TestMetadata("kt-540-map.java") public void testKt_540_map() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/kt-540-map.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/kt-540-map.java"); } @TestMetadata("kt-540-rawGenericClass.java") public void testKt_540_rawGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/kt-540-rawGenericClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/kt-540-rawGenericClass.java"); } @TestMetadata("rawGenericMethod.java") public void testRawGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/rawGenerics/rawGenericMethod.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/rawGenerics/rawGenericMethod.java"); } } @@ -4400,38 +3989,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInReturnStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/returnStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("currentMethodBug.java") public void testCurrentMethodBug() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/currentMethodBug.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/currentMethodBug.java"); } @TestMetadata("returnChar.java") public void testReturnChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnChar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnChar.java"); } @TestMetadata("returnLiteral.java") public void testReturnLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnLiteral.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnLiteral.java"); } @TestMetadata("returnNumber.java") public void testReturnNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnNumber.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnNumber.java"); } @TestMetadata("returnString.java") public void testReturnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/returnStatement/returnString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/returnStatement/returnString.java"); } } @@ -4439,32 +4027,32 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Settings extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSettings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/settings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("openByDefault.java") public void testOpenByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/openByDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/openByDefault.java"); } @TestMetadata("specifyFieldTypeByDefault.java") public void testSpecifyFieldTypeByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/specifyFieldTypeByDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/specifyFieldTypeByDefault.java"); } @TestMetadata("specifyLocalVariableTypeByDefault.java") public void testSpecifyLocalVariableTypeByDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefault.java"); } @TestMetadata("specifyLocalVariableTypeByDefaultInFor.java") public void testSpecifyLocalVariableTypeByDefaultInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefaultInFor.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/settings/specifyLocalVariableTypeByDefaultInFor.java"); } } @@ -4472,38 +4060,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StaticMembers extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStaticMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/staticMembers"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("PrivateStaticMembers.java") public void testPrivateStaticMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMembers.java"); } @TestMetadata("PrivateStaticMethods1.java") public void testPrivateStaticMethods1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods1.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods1.java"); } @TestMetadata("PrivateStaticMethods2.java") public void testPrivateStaticMethods2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods2.java"); } @TestMetadata("PrivateStaticMethods3.java") public void testPrivateStaticMethods3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods3.java"); } @TestMetadata("PrivateStaticMethods4.java") public void testPrivateStaticMethods4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods4.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/staticMembers/PrivateStaticMethods4.java"); } } @@ -4511,26 +4098,27 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Strings extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInStrings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/strings"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("escapedBackslash.java") public void testEscapedBackslash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/strings/escapedBackslash.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/strings/escapedBackslash.java"); } @TestMetadata("escapedDollar.java") public void testEscapedDollar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/strings/escapedDollar.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/strings/escapedDollar.java"); } @TestMetadata("formattedString.java") public void testFormattedString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/strings/formattedString.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/strings/formattedString.java"); } } @@ -4538,26 +4126,27 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSuperExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/superExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classAdotSuperFoo.java") public void testClassAdotSuperFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/superExpression/classAdotSuperFoo.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/superExpression/classAdotSuperFoo.java"); } @TestMetadata("classAextendsB.java") public void testClassAextendsB() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/superExpression/classAextendsB.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/superExpression/classAextendsB.java"); } @TestMetadata("superStatement.java") public void testSuperStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/superExpression/superStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/superExpression/superStatement.java"); } } @@ -4565,104 +4154,92 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Switch extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSwitch() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/switch"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("caseWithBlock.java") public void testCaseWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/caseWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/caseWithBlock.java"); } @TestMetadata("comlicatedFallDown.java") public void testComlicatedFallDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/comlicatedFallDown.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/comlicatedFallDown.java"); } @TestMetadata("continueAndBreakWithLabel.java") public void testContinueAndBreakWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/continueAndBreakWithLabel.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/continueAndBreakWithLabel.java"); } @TestMetadata("emptySwitch.java") public void testEmptySwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/emptySwitch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/emptySwitch.java"); } @TestMetadata("enumConstants.java") public void testEnumConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/enumConstants.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/enumConstants.java"); } @TestMetadata("fallDown.java") public void testFallDown() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/fallDown.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/fallDown.java"); } @TestMetadata("fallDownWithBlocks.java") public void testFallDownWithBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/fallDownWithBlocks.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/fallDownWithBlocks.java"); } @TestMetadata("invalidSwitch.java") public void testInvalidSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/invalidSwitch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/invalidSwitch.java"); } @TestMetadata("KT-13552.java") public void testKT_13552() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/KT-13552.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/KT-13552.java"); } @TestMetadata("kt-539.java") public void testKt_539() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/kt-539.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/kt-539.java"); } @TestMetadata("nestedIf.java") public void testNestedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedIf.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedIf.java"); } @TestMetadata("nestedIfFallback.java") public void testNestedIfFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedIfFallback.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedIfFallback.java"); } @TestMetadata("nestedSwitch.java") public void testNestedSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedSwitch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedSwitch.java"); } @TestMetadata("nestedSwitchFallback.java") public void testNestedSwitchFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nestedSwitchFallback.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nestedSwitchFallback.java"); } @TestMetadata("nondefault.java") public void testNondefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/nondefault.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/nondefault.java"); } @TestMetadata("returnsAndThrows.java") public void testReturnsAndThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/switch/returnsAndThrows.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/switch/returnsAndThrows.java"); } } @@ -4670,14 +4247,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SynchronizedStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSynchronizedStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/synchronizedStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("singleLineExample.java") public void testSingleLineExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/synchronizedStatement/singleLineExample.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/synchronizedStatement/singleLineExample.java"); } } @@ -4685,20 +4265,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThisExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThisExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/thisExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classAdotThisFoo.java") public void testClassAdotThisFoo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/thisExpression/classAdotThisFoo.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/thisExpression/classAdotThisFoo.java"); } @TestMetadata("thisStatement.java") public void testThisStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/thisExpression/thisStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/thisExpression/thisStatement.java"); } } @@ -4706,14 +4288,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ThrowStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInThrowStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/throwStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("simpleThrowStatement.java") public void testSimpleThrowStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/throwStatement/simpleThrowStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/throwStatement/simpleThrowStatement.java"); } } @@ -4721,14 +4306,17 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToArray extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/toArray"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("toArray.java") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toArray/toArray.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toArray/toArray.java"); } } @@ -4736,38 +4324,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToKotlinClasses extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInToKotlinClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/toKotlinClasses"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("iterableAndIterator.java") public void testIterableAndIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator.java"); } @TestMetadata("iterableAndIterator2.java") public void testIterableAndIterator2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator2.java"); } @TestMetadata("iterableAndIterator3.java") public void testIterableAndIterator3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator3.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/iterableAndIterator3.java"); } @TestMetadata("LibraryFunctions.java") public void testLibraryFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/LibraryFunctions.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/LibraryFunctions.java"); } @TestMetadata("TypeParameterBound.java") public void testTypeParameterBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/toKotlinClasses/TypeParameterBound.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/toKotlinClasses/TypeParameterBound.java"); } } @@ -4775,10 +4362,13 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstactInterface.java") public void testAbstactInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/abstactInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/abstactInterface.java"); } public void testAllFilesPresentInTrait() throws Exception { @@ -4787,62 +4377,52 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestMetadata("emptyInterface.java") public void testEmptyInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/emptyInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/emptyInterface.java"); } @TestMetadata("extendsOneClassAndImplementsSeveralInterfaces.java") public void testExtendsOneClassAndImplementsSeveralInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/extendsOneClassAndImplementsSeveralInterfaces.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/extendsOneClassAndImplementsSeveralInterfaces.java"); } @TestMetadata("extendsOneInterface.java") public void testExtendsOneInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/extendsOneInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/extendsOneInterface.java"); } @TestMetadata("interfaceWithFields.java") public void testInterfaceWithFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/interfaceWithFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/interfaceWithFields.java"); } @TestMetadata("interfaceWithMethodDeclaration.java") public void testInterfaceWithMethodDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/interfaceWithMethodDeclaration.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/interfaceWithMethodDeclaration.java"); } @TestMetadata("interfaceWithStaticFields.java") public void testInterfaceWithStaticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/interfaceWithStaticFields.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/interfaceWithStaticFields.java"); } @TestMetadata("internalInterface.java") public void testInternalInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/internalInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/internalInterface.java"); } @TestMetadata("privateInterface.java") public void testPrivateInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/privateInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/privateInterface.java"); } @TestMetadata("protectedInterface.java") public void testProtectedInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/protectedInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/protectedInterface.java"); } @TestMetadata("publicInterface.java") public void testPublicInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/trait/publicInterface.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/trait/publicInterface.java"); } } @@ -4850,38 +4430,37 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/tryStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("commonCaseForTryStatement.java") public void testCommonCaseForTryStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/commonCaseForTryStatement.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/commonCaseForTryStatement.java"); } @TestMetadata("disjunctionType.java") public void testDisjunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/disjunctionType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/disjunctionType.java"); } @TestMetadata("emptyTryWithTwoCatchesWithEmptyFinally.java") public void testEmptyTryWithTwoCatchesWithEmptyFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithEmptyFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithEmptyFinally.java"); } @TestMetadata("emptyTryWithTwoCatchesWithFinally.java") public void testEmptyTryWithTwoCatchesWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithFinally.java"); } @TestMetadata("emptyTryWithTwoCatchesWithoutFinally.java") public void testEmptyTryWithTwoCatchesWithoutFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithoutFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryStatement/emptyTryWithTwoCatchesWithoutFinally.java"); } } @@ -4889,68 +4468,62 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryWithResource extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTryWithResource() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/tryWithResource"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("Multiline.java") public void testMultiline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/Multiline.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/Multiline.java"); } @TestMetadata("MultipleResources.java") public void testMultipleResources() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/MultipleResources.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/MultipleResources.java"); } @TestMetadata("Simple.java") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/Simple.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/Simple.java"); } @TestMetadata("WithCatch.java") public void testWithCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithCatch.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithCatch.java"); } @TestMetadata("WithCatchAndFinally.java") public void testWithCatchAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithCatchAndFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithCatchAndFinally.java"); } @TestMetadata("WithCatches.java") public void testWithCatches() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithCatches.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithCatches.java"); } @TestMetadata("WithFinally.java") public void testWithFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithFinally.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithFinally.java"); } @TestMetadata("WithReturnAtEnd.java") public void testWithReturnAtEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithReturnAtEnd.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithReturnAtEnd.java"); } @TestMetadata("WithReturnInAnonymousClass.java") public void testWithReturnInAnonymousClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass.java"); } @TestMetadata("WithReturnInAnonymousClass2.java") public void testWithReturnInAnonymousClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/tryWithResource/WithReturnInAnonymousClass2.java"); } } @@ -4958,74 +4531,67 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeCastExpression extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeCastExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/typeCastExpression"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("beforeDot.java") public void testBeforeDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/beforeDot.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/beforeDot.java"); } @TestMetadata("castNullObject.java") public void testCastNullObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/castNullObject.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/castNullObject.java"); } @TestMetadata("castNullable.java") public void testCastNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/castNullable.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/castNullable.java"); } @TestMetadata("extendsWildcardCast.java") public void testExtendsWildcardCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/extendsWildcardCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/extendsWildcardCast.java"); } @TestMetadata("fooCast.java") public void testFooCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/fooCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/fooCast.java"); } @TestMetadata("intCast.java") public void testIntCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/intCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/intCast.java"); } @TestMetadata("primitiveType.java") public void testPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/primitiveType.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/primitiveType.java"); } @TestMetadata("simpleGenericCast.java") public void testSimpleGenericCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/simpleGenericCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/simpleGenericCast.java"); } @TestMetadata("stringCast.java") public void testStringCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/stringCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/stringCast.java"); } @TestMetadata("superWildcardCast.java") public void testSuperWildcardCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/superWildcardCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/superWildcardCast.java"); } @TestMetadata("wildcardCast.java") public void testWildcardCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeCastExpression/wildcardCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeCastExpression/wildcardCast.java"); } } @@ -5033,98 +4599,87 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/typeParameters"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("classDoubleParametrizationWithTwoBoundsWithExtending.java") public void testClassDoubleParametrizationWithTwoBoundsWithExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/classDoubleParametrizationWithTwoBoundsWithExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/classDoubleParametrizationWithTwoBoundsWithExtending.java"); } @TestMetadata("classParametrizationWithTwoBounds.java") public void testClassParametrizationWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBounds.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBounds.java"); } @TestMetadata("classParametrizationWithTwoBoundsWithExtending.java") public void testClassParametrizationWithTwoBoundsWithExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBoundsWithExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/classParametrizationWithTwoBoundsWithExtending.java"); } @TestMetadata("complexExampleWithClassExtending.java") public void testComplexExampleWithClassExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassExtending.java"); } @TestMetadata("complexExampleWithClassMultiplyExtending.java") public void testComplexExampleWithClassMultiplyExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassMultiplyExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/complexExampleWithClassMultiplyExtending.java"); } @TestMetadata("genericClass.java") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/genericClass.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/genericClass.java"); } @TestMetadata("genericParam.java") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/genericParam.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/genericParam.java"); } @TestMetadata("genericParam-settings.java") public void testGenericParam_settings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/genericParam-settings.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/genericParam-settings.java"); } @TestMetadata("manyGenericParams.java") public void testManyGenericParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/manyGenericParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/manyGenericParams.java"); } @TestMetadata("methodDoubleParametrizationWithTwoBounds.java") public void testMethodDoubleParametrizationWithTwoBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/methodDoubleParametrizationWithTwoBounds.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/methodDoubleParametrizationWithTwoBounds.java"); } @TestMetadata("needTypeArgs.java") public void testNeedTypeArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/needTypeArgs.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/needTypeArgs.java"); } @TestMetadata("rawTypeCast.java") public void testRawTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/rawTypeCast.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/rawTypeCast.java"); } @TestMetadata("traitDoubleParametrizationWithTwoBoundsWithExtending.java") public void testTraitDoubleParametrizationWithTwoBoundsWithExtending() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/traitDoubleParametrizationWithTwoBoundsWithExtending.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/traitDoubleParametrizationWithTwoBoundsWithExtending.java"); } @TestMetadata("typeFromOtherFile.java") public void testTypeFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/typeFromOtherFile.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/typeFromOtherFile.java"); } @TestMetadata("where.java") public void testWhere() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/typeParameters/where.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/typeParameters/where.java"); } } @@ -5132,20 +4687,22 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarArg extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInVarArg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/varArg"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("ellipsisTypeSeveralParams.java") public void testEllipsisTypeSeveralParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/varArg/ellipsisTypeSeveralParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/varArg/ellipsisTypeSeveralParams.java"); } @TestMetadata("ellipsisTypeSingleParams.java") public void testEllipsisTypeSingleParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/varArg/ellipsisTypeSingleParams.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/varArg/ellipsisTypeSingleParams.java"); } } @@ -5153,44 +4710,42 @@ public class JavaToKotlinConverterSingleFileTestGenerated extends AbstractJavaTo @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WhileStatement extends AbstractJavaToKotlinConverterSingleFileTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWhileStatement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("j2k/testData/fileOrElement/whileStatement"), Pattern.compile("^(.+)\\.java$"), TargetBackend.ANY, true); } @TestMetadata("whileWithAssignmentAsExpression.java") public void testWhileWithAssignmentAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithAssignmentAsExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithAssignmentAsExpression.java"); } @TestMetadata("whileWithBlock.java") public void testWhileWithBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithBlock.java"); } @TestMetadata("whileWithEmptyBlock.java") public void testWhileWithEmptyBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithEmptyBlock.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithEmptyBlock.java"); } @TestMetadata("whileWithExpression.java") public void testWhileWithExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithExpression.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithExpression.java"); } @TestMetadata("whileWithReturn.java") public void testWhileWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithReturn.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithReturn.java"); } @TestMetadata("whileWithoutBody.java") public void testWhileWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("j2k/testData/fileOrElement/whileStatement/whileWithoutBody.java"); - doTest(fileName); + runTest("j2k/testData/fileOrElement/whileStatement/whileWithoutBody.java"); } } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/DataContainerVersionChangedTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/DataContainerVersionChangedTestGenerated.java index 39052c85f7f..70bf4ebd5e7 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/DataContainerVersionChangedTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/DataContainerVersionChangedTestGenerated.java @@ -21,73 +21,209 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DataContainerVersionChangedTestGenerated extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCacheVersionChanged() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("clearedHasKotlin") public void testClearedHasKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin/"); } @TestMetadata("exportedModule") public void testExportedModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule/"); } @TestMetadata("javaOnlyModulesAreNotAffected") public void testJavaOnlyModulesAreNotAffected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected/"); } @TestMetadata("module1Modified") public void testModule1Modified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified/"); } @TestMetadata("module2Modified") public void testModule2Modified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified/"); } @TestMetadata("moduleWithConstantModified") public void testModuleWithConstantModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified/"); } @TestMetadata("moduleWithInlineModified") public void testModuleWithInlineModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified/"); } @TestMetadata("touchedFile") public void testTouchedFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile/"); } @TestMetadata("touchedOnlyJavaFile") public void testTouchedOnlyJavaFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile/"); } @TestMetadata("untouchedFiles") public void testUntouchedFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles/"); } @TestMetadata("withError") public void testWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/withError/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/withError/"); + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClearedHasKotlin extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClearedHasKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExportedModule extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExportedModule() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaOnlyModulesAreNotAffected extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaOnlyModulesAreNotAffected() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Module1Modified extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModule1Modified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Module2Modified extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModule2Modified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ModuleWithConstantModified extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModuleWithConstantModified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ModuleWithInlineModified extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModuleWithInlineModified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchedFile extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchedFile() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchedOnlyJavaFile extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchedOnlyJavaFile() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UntouchedFiles extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUntouchedFiles() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/withError") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WithError extends AbstractDataContainerVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWithError() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/withError"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalCacheVersionChangedTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalCacheVersionChangedTestGenerated.java index b986275d6c0..6af2cc8ec58 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalCacheVersionChangedTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalCacheVersionChangedTestGenerated.java @@ -21,73 +21,209 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IncrementalCacheVersionChangedTestGenerated extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCacheVersionChanged() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("clearedHasKotlin") public void testClearedHasKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin/"); } @TestMetadata("exportedModule") public void testExportedModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule/"); } @TestMetadata("javaOnlyModulesAreNotAffected") public void testJavaOnlyModulesAreNotAffected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected/"); } @TestMetadata("module1Modified") public void testModule1Modified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified/"); } @TestMetadata("module2Modified") public void testModule2Modified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified/"); } @TestMetadata("moduleWithConstantModified") public void testModuleWithConstantModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified/"); } @TestMetadata("moduleWithInlineModified") public void testModuleWithInlineModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified/"); } @TestMetadata("touchedFile") public void testTouchedFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile/"); } @TestMetadata("touchedOnlyJavaFile") public void testTouchedOnlyJavaFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile/"); } @TestMetadata("untouchedFiles") public void testUntouchedFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles/"); } @TestMetadata("withError") public void testWithError() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/cacheVersionChanged/withError/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/cacheVersionChanged/withError/"); + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClearedHasKotlin extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClearedHasKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/clearedHasKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExportedModule extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExportedModule() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/exportedModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaOnlyModulesAreNotAffected extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaOnlyModulesAreNotAffected() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/javaOnlyModulesAreNotAffected"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Module1Modified extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModule1Modified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/module1Modified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Module2Modified extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModule2Modified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/module2Modified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ModuleWithConstantModified extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModuleWithConstantModified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithConstantModified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ModuleWithInlineModified extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInModuleWithInlineModified() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/moduleWithInlineModified"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchedFile extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchedFile() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/touchedFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TouchedOnlyJavaFile extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTouchedOnlyJavaFile() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/touchedOnlyJavaFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UntouchedFiles extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUntouchedFiles() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/untouchedFiles"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/cacheVersionChanged/withError") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class WithError extends AbstractIncrementalCacheVersionChangedTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInWithError() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/cacheVersionChanged/withError"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java index 68dae6531f2..00b853c77c4 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalJpsTestGenerated.java @@ -23,176 +23,516 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModule extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("circular") public void testCircular() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/circular/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/circular/"); } @TestMetadata("circularDependencyClasses") public void testCircularDependencyClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/circularDependencyClasses/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/circularDependencyClasses/"); } @TestMetadata("circularDependencySamePackageUnchanged") public void testCircularDependencySamePackageUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/circularDependencySamePackageUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/circularDependencySamePackageUnchanged/"); } @TestMetadata("circularDependencyTopLevelFunctions") public void testCircularDependencyTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/circularDependencyTopLevelFunctions/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/circularDependencyTopLevelFunctions/"); } @TestMetadata("circularDependencyWithAccessToInternal") public void testCircularDependencyWithAccessToInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/circularDependencyWithAccessToInternal/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/circularDependencyWithAccessToInternal/"); } @TestMetadata("classAdded") public void testClassAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/classAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/classAdded/"); } @TestMetadata("classRemoved") public void testClassRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/classRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/classRemoved/"); } @TestMetadata("constantValueChanged") public void testConstantValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/constantValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/constantValueChanged/"); } @TestMetadata("copyFileToAnotherModule") public void testCopyFileToAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/copyFileToAnotherModule/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/copyFileToAnotherModule/"); } @TestMetadata("defaultArgumentInConstructorRemoved") public void testDefaultArgumentInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultArgumentInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/defaultArgumentInConstructorRemoved/"); } @TestMetadata("defaultParameterAdded") public void testDefaultParameterAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/defaultParameterAdded/"); } @TestMetadata("defaultParameterAddedForTopLevelFun") public void testDefaultParameterAddedForTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterAddedForTopLevelFun/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/defaultParameterAddedForTopLevelFun/"); } @TestMetadata("defaultParameterRemoved") public void testDefaultParameterRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/defaultParameterRemoved/"); } @TestMetadata("defaultParameterRemovedForTopLevelFun") public void testDefaultParameterRemovedForTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterRemovedForTopLevelFun/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/defaultParameterRemovedForTopLevelFun/"); } @TestMetadata("defaultValueInConstructorRemoved") public void testDefaultValueInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/defaultValueInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/defaultValueInConstructorRemoved/"); } @TestMetadata("duplicatedClass") public void testDuplicatedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/duplicatedClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/duplicatedClass/"); } @TestMetadata("exportedDependency") public void testExportedDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/exportedDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/exportedDependency/"); } @TestMetadata("inlineFunctionInlined") public void testInlineFunctionInlined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/inlineFunctionInlined/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/inlineFunctionInlined/"); } @TestMetadata("inlineFunctionTwoPackageParts") public void testInlineFunctionTwoPackageParts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/inlineFunctionTwoPackageParts/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/inlineFunctionTwoPackageParts/"); } @TestMetadata("moveFileToAnotherModule") public void testMoveFileToAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/moveFileToAnotherModule/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/moveFileToAnotherModule/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/simple/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/simple/"); } @TestMetadata("simpleDependency") public void testSimpleDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/simpleDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/simpleDependency/"); } @TestMetadata("simpleDependencyErrorOnAccessToInternal1") public void testSimpleDependencyErrorOnAccessToInternal1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal1/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal1/"); } @TestMetadata("simpleDependencyErrorOnAccessToInternal2") public void testSimpleDependencyErrorOnAccessToInternal2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal2/"); } @TestMetadata("simpleDependencyUnchanged") public void testSimpleDependencyUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/simpleDependencyUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/simpleDependencyUnchanged/"); } @TestMetadata("transitiveDependency") public void testTransitiveDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/transitiveDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/transitiveDependency/"); } @TestMetadata("transitiveInlining") public void testTransitiveInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/transitiveInlining/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/transitiveInlining/"); } @TestMetadata("twoDependants") public void testTwoDependants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/multiModule/twoDependants/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/multiModule/twoDependants/"); + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/circular") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Circular extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCircular() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/circular"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/circularDependencyClasses") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CircularDependencyClasses extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCircularDependencyClasses() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/circularDependencyClasses"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/circularDependencySamePackageUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CircularDependencySamePackageUnchanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCircularDependencySamePackageUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/circularDependencySamePackageUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/circularDependencyTopLevelFunctions") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CircularDependencyTopLevelFunctions extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCircularDependencyTopLevelFunctions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/circularDependencyTopLevelFunctions"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/circularDependencyWithAccessToInternal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CircularDependencyWithAccessToInternal extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCircularDependencyWithAccessToInternal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/circularDependencyWithAccessToInternal"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/classAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/classAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/classRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/classRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/constantValueChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantValueChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantValueChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/constantValueChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/copyFileToAnotherModule") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CopyFileToAnotherModule extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCopyFileToAnotherModule() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/copyFileToAnotherModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/defaultArgumentInConstructorRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultArgumentInConstructorRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultArgumentInConstructorRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/defaultArgumentInConstructorRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultParameterAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultParameterAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/defaultParameterAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterAddedForTopLevelFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultParameterAddedForTopLevelFun extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultParameterAddedForTopLevelFun() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/defaultParameterAddedForTopLevelFun"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultParameterRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultParameterRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/defaultParameterRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/defaultParameterRemovedForTopLevelFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultParameterRemovedForTopLevelFun extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultParameterRemovedForTopLevelFun() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/defaultParameterRemovedForTopLevelFun"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/defaultValueInConstructorRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValueInConstructorRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValueInConstructorRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/defaultValueInConstructorRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/duplicatedClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DuplicatedClass extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDuplicatedClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/duplicatedClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/exportedDependency") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ExportedDependency extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExportedDependency() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/exportedDependency"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/inlineFunctionInlined") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineFunctionInlined extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineFunctionInlined() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/inlineFunctionInlined"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/inlineFunctionTwoPackageParts") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineFunctionTwoPackageParts extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineFunctionTwoPackageParts() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/inlineFunctionTwoPackageParts"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/moveFileToAnotherModule") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MoveFileToAnotherModule extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMoveFileToAnotherModule() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/moveFileToAnotherModule"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/simple") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Simple extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimple() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/simple"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/simpleDependency") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleDependency extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimpleDependency() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/simpleDependency"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleDependencyErrorOnAccessToInternal1 extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimpleDependencyErrorOnAccessToInternal1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal1"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleDependencyErrorOnAccessToInternal2 extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimpleDependencyErrorOnAccessToInternal2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/simpleDependencyErrorOnAccessToInternal2"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/simpleDependencyUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SimpleDependencyUnchanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSimpleDependencyUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/simpleDependencyUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/transitiveDependency") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TransitiveDependency extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTransitiveDependency() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/transitiveDependency"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/transitiveInlining") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TransitiveInlining extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTransitiveInlining() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/transitiveInlining"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/multiModule/twoDependants") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TwoDependants extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTwoDependants() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/multiModule/twoDependants"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -200,46 +540,43 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PureKotlin extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingFunctionsViaPackagePart") public void testAccessingFunctionsViaPackagePart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/accessingFunctionsViaPackagePart/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/accessingFunctionsViaPackagePart/"); } @TestMetadata("accessingPropertiesViaField") public void testAccessingPropertiesViaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/accessingPropertiesViaField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/accessingPropertiesViaField/"); } @TestMetadata("addClass") public void testAddClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addClass/"); } @TestMetadata("addFileWithFunctionOverload") public void testAddFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addFileWithFunctionOverload/"); } @TestMetadata("addMemberTypeAlias") public void testAddMemberTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addMemberTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addMemberTypeAlias/"); } @TestMetadata("addTopLevelTypeAlias") public void testAddTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/addTopLevelTypeAlias/"); } @TestMetadata("allConstants") public void testAllConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/allConstants/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/allConstants/"); } public void testAllFilesPresentInPureKotlin() throws Exception { @@ -248,644 +585,537 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestMetadata("annotations") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/annotations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/annotations/"); } @TestMetadata("anonymousObjectChanged") public void testAnonymousObjectChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/anonymousObjectChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/anonymousObjectChanged/"); } @TestMetadata("changeTypeImplicitlyWithCircularDependency") public void testChangeTypeImplicitlyWithCircularDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/changeTypeImplicitlyWithCircularDependency/"); } @TestMetadata("changeWithRemovingUsage") public void testChangeWithRemovingUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/changeWithRemovingUsage/"); } @TestMetadata("classInlineFunctionChanged") public void testClassInlineFunctionChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classInlineFunctionChanged/"); } @TestMetadata("classObjectConstantChanged") public void testClassObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classObjectConstantChanged/"); } @TestMetadata("classRecreated") public void testClassRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classRecreated/"); } @TestMetadata("classSignatureChanged") public void testClassSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classSignatureChanged/"); } @TestMetadata("classSignatureUnchanged") public void testClassSignatureUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/classSignatureUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/classSignatureUnchanged/"); } @TestMetadata("compilationErrorThenFixedOtherPackage") public void testCompilationErrorThenFixedOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedOtherPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedOtherPackage/"); } @TestMetadata("compilationErrorThenFixedSamePackage") public void testCompilationErrorThenFixedSamePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedSamePackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedSamePackage/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart") public void testCompilationErrorThenFixedWithPhantomPart() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart2") public void testCompilationErrorThenFixedWithPhantomPart2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart2/"); } @TestMetadata("compilationErrorThenFixedWithPhantomPart3") public void testCompilationErrorThenFixedWithPhantomPart3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart3/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/compilationErrorThenFixedWithPhantomPart3/"); } @TestMetadata("constantRemoved") public void testConstantRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantRemoved/"); } @TestMetadata("constantValueChanged") public void testConstantValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantValueChanged/"); } @TestMetadata("constantsUnchanged") public void testConstantsUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/constantsUnchanged/"); } @TestMetadata("defaultArgumentInConstructorAdded") public void testDefaultArgumentInConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorAdded/"); } @TestMetadata("defaultArgumentInConstructorRemoved") public void testDefaultArgumentInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultArgumentInConstructorRemoved/"); } @TestMetadata("defaultValueAdded") public void testDefaultValueAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueAdded/"); } @TestMetadata("defaultValueChanged") public void testDefaultValueChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueChanged/"); } @TestMetadata("defaultValueInConstructorChanged") public void testDefaultValueInConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorChanged/"); } @TestMetadata("defaultValueInConstructorRemoved") public void testDefaultValueInConstructorRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueInConstructorRemoved/"); } @TestMetadata("defaultValueRemoved1") public void testDefaultValueRemoved1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved1/"); } @TestMetadata("defaultValueRemoved2") public void testDefaultValueRemoved2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/defaultValueRemoved2/"); } @TestMetadata("delegatedPropertyInlineExtensionAccessor") public void testDelegatedPropertyInlineExtensionAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineExtensionAccessor/"); } @TestMetadata("delegatedPropertyInlineMethodAccessor") public void testDelegatedPropertyInlineMethodAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/delegatedPropertyInlineMethodAccessor/"); } @TestMetadata("dependencyClassReferenced") public void testDependencyClassReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/dependencyClassReferenced/"); } @TestMetadata("fileWithConstantRemoved") public void testFileWithConstantRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/fileWithConstantRemoved/"); } @TestMetadata("fileWithInlineFunctionRemoved") public void testFileWithInlineFunctionRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/fileWithInlineFunctionRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/fileWithInlineFunctionRemoved/"); } @TestMetadata("filesExchangePackages") public void testFilesExchangePackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/filesExchangePackages/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/filesExchangePackages/"); } @TestMetadata("funRedeclaration") public void testFunRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/funRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/funRedeclaration/"); } @TestMetadata("funVsConstructorOverloadConflict") public void testFunVsConstructorOverloadConflict() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/funVsConstructorOverloadConflict/"); } @TestMetadata("functionBecameInline") public void testFunctionBecameInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/functionBecameInline/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/functionBecameInline/"); } @TestMetadata("functionReferencingClass") public void testFunctionReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/functionReferencingClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/functionReferencingClass/"); } @TestMetadata("independentClasses") public void testIndependentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/independentClasses/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/independentClasses/"); } @TestMetadata("inlineFunctionBecomesNonInline") public void testInlineFunctionBecomesNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionBecomesNonInline/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionBecomesNonInline/"); } @TestMetadata("inlineFunctionUsageAdded") public void testInlineFunctionUsageAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionUsageAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionUsageAdded/"); } @TestMetadata("inlineFunctionsCircularDependency") public void testInlineFunctionsCircularDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsCircularDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsCircularDependency/"); } @TestMetadata("inlineFunctionsUnchanged") public void testInlineFunctionsUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineFunctionsUnchanged/"); } @TestMetadata("inlineLinesChanged") public void testInlineLinesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineLinesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineLinesChanged/"); } @TestMetadata("inlineModifiedWithUsage") public void testInlineModifiedWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineModifiedWithUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineModifiedWithUsage/"); } @TestMetadata("inlinePrivateFunctionAdded") public void testInlinePrivateFunctionAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePrivateFunctionAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePrivateFunctionAdded/"); } @TestMetadata("inlinePropertyInClass") public void testInlinePropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePropertyInClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePropertyInClass/"); } @TestMetadata("inlinePropertyOnTopLevel") public void testInlinePropertyOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlinePropertyOnTopLevel/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlinePropertyOnTopLevel/"); } @TestMetadata("inlineTwoFunctionsOneChanged") public void testInlineTwoFunctionsOneChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/"); } @TestMetadata("inlineUsedWhereDeclared") public void testInlineUsedWhereDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineUsedWhereDeclared/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/inlineUsedWhereDeclared/"); } @TestMetadata("internalClassChanged") public void testInternalClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalClassChanged/"); } @TestMetadata("internalMemberInClassChanged") public void testInternalMemberInClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalMemberInClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalMemberInClassChanged/"); } @TestMetadata("internalTypealias") public void testInternalTypealias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealias/"); } @TestMetadata("internalTypealiasConstructor") public void testInternalTypealiasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealiasConstructor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealiasConstructor/"); } @TestMetadata("internalTypealiasObject") public void testInternalTypealiasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/internalTypealiasObject/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/internalTypealiasObject/"); } @TestMetadata("localClassChanged") public void testLocalClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/localClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/localClassChanged/"); } @TestMetadata("moveClass") public void testMoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveClass/"); } @TestMetadata("moveFileWithChangingPackage") public void testMoveFileWithChangingPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveFileWithChangingPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveFileWithChangingPackage/"); } @TestMetadata("moveFileWithoutChangingPackage") public void testMoveFileWithoutChangingPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/moveFileWithoutChangingPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/moveFileWithoutChangingPackage/"); } @TestMetadata("multiplePackagesModified") public void testMultiplePackagesModified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/multiplePackagesModified/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/multiplePackagesModified/"); } @TestMetadata("objectConstantChanged") public void testObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/objectConstantChanged/"); } @TestMetadata("ourClassReferenced") public void testOurClassReferenced() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/ourClassReferenced/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/ourClassReferenced/"); } @TestMetadata("packageConstantChanged") public void testPackageConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageConstantChanged/"); } @TestMetadata("packageFileAdded") public void testPackageFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileAdded/"); } @TestMetadata("packageFileChangedPackage") public void testPackageFileChangedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileChangedPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileChangedPackage/"); } @TestMetadata("packageFileChangedThenOtherRemoved") public void testPackageFileChangedThenOtherRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileChangedThenOtherRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileChangedThenOtherRemoved/"); } @TestMetadata("packageFileRemoved") public void testPackageFileRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFileRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFileRemoved/"); } @TestMetadata("packageFilesChangedInTurn") public void testPackageFilesChangedInTurn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageFilesChangedInTurn/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageFilesChangedInTurn/"); } @TestMetadata("packageInlineFunctionAccessingField") public void testPackageInlineFunctionAccessingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionAccessingField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionAccessingField/"); } @TestMetadata("packageInlineFunctionFromOurPackage") public void testPackageInlineFunctionFromOurPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionFromOurPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageInlineFunctionFromOurPackage/"); } @TestMetadata("packagePrivateOnlyChanged") public void testPackagePrivateOnlyChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packagePrivateOnlyChanged/"); } @TestMetadata("packageRecreated") public void testPackageRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRecreated/"); } @TestMetadata("packageRecreatedAfterRenaming") public void testPackageRecreatedAfterRenaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRecreatedAfterRenaming/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRecreatedAfterRenaming/"); } @TestMetadata("packageRemoved") public void testPackageRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/packageRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/packageRemoved/"); } @TestMetadata("privateConstantsChanged") public void testPrivateConstantsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateConstantsChanged/"); } @TestMetadata("privateMethodAdded") public void testPrivateMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodAdded/"); } @TestMetadata("privateMethodDeleted") public void testPrivateMethodDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodDeleted/"); } @TestMetadata("privateMethodSignatureChanged") public void testPrivateMethodSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateMethodSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateMethodSignatureChanged/"); } @TestMetadata("privateSecondaryConstructorAdded") public void testPrivateSecondaryConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorAdded/"); } @TestMetadata("privateSecondaryConstructorDeleted") public void testPrivateSecondaryConstructorDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateSecondaryConstructorDeleted/"); } @TestMetadata("privateValAccessorChanged") public void testPrivateValAccessorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValAccessorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValAccessorChanged/"); } @TestMetadata("privateValAdded") public void testPrivateValAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValAdded/"); } @TestMetadata("privateValDeleted") public void testPrivateValDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValDeleted/"); } @TestMetadata("privateValSignatureChanged") public void testPrivateValSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateValSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateValSignatureChanged/"); } @TestMetadata("privateVarAdded") public void testPrivateVarAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarAdded/"); } @TestMetadata("privateVarDeleted") public void testPrivateVarDeleted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarDeleted/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarDeleted/"); } @TestMetadata("privateVarSignatureChanged") public void testPrivateVarSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/privateVarSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/privateVarSignatureChanged/"); } @TestMetadata("propertyRedeclaration") public void testPropertyRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/propertyRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/propertyRedeclaration/"); } @TestMetadata("publicPropertyWithPrivateSetter") public void testPublicPropertyWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/publicPropertyWithPrivateSetter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/publicPropertyWithPrivateSetter/"); } @TestMetadata("removeAndRestoreCompanion") public void testRemoveAndRestoreCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanion/"); } @TestMetadata("removeAndRestoreCompanionWithImplicitUsages") public void testRemoveAndRestoreCompanionWithImplicitUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/"); } @TestMetadata("removeClass") public void testRemoveClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeClass/"); } @TestMetadata("removeClassInDefaultPackage") public void testRemoveClassInDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeClassInDefaultPackage/"); } @TestMetadata("removeFileWithFunctionOverload") public void testRemoveFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeFileWithFunctionOverload/"); } @TestMetadata("removeMemberTypeAlias") public void testRemoveMemberTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeMemberTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeMemberTypeAlias/"); } @TestMetadata("removeTopLevelTypeAlias") public void testRemoveTopLevelTypeAlias() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeTopLevelTypeAlias/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeTopLevelTypeAlias/"); } @TestMetadata("removeUnusedFile") public void testRemoveUnusedFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/removeUnusedFile/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/removeUnusedFile/"); } @TestMetadata("renameClass") public void testRenameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/renameClass/"); } @TestMetadata("renameFileWithFunctionOverload") public void testRenameFileWithFunctionOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/renameFileWithFunctionOverload/"); } @TestMetadata("returnTypeChanged") public void testReturnTypeChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/returnTypeChanged/"); } @TestMetadata("simpleClassDependency") public void testSimpleClassDependency() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/simpleClassDependency/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/simpleClassDependency/"); } @TestMetadata("soleFileChangesPackage") public void testSoleFileChangesPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/soleFileChangesPackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/soleFileChangesPackage/"); } @TestMetadata("subpackage") public void testSubpackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/subpackage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/subpackage/"); } @TestMetadata("suspendWithStateMachine") public void testSuspendWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/suspendWithStateMachine/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/suspendWithStateMachine/"); } @TestMetadata("topLevelFunctionSameSignature") public void testTopLevelFunctionSameSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionSameSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionSameSignature/"); } @TestMetadata("topLevelMembersInTwoFiles") public void testTopLevelMembersInTwoFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/"); } @TestMetadata("topLevelPrivateValUsageAdded") public void testTopLevelPrivateValUsageAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelPrivateValUsageAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/topLevelPrivateValUsageAdded/"); } @TestMetadata("traitClassObjectConstantChanged") public void testTraitClassObjectConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/"); } @TestMetadata("valAddCustomAccessor") public void testValAddCustomAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/valAddCustomAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/valAddCustomAccessor/"); } @TestMetadata("valRemoveCustomAccessor") public void testValRemoveCustomAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/valRemoveCustomAccessor/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/pureKotlin/valRemoveCustomAccessor/"); } } @@ -893,6 +1123,10 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class WithJava extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInWithJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @@ -901,32 +1135,84 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConvertBetweenJavaAndKotlin extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInConvertBetweenJavaAndKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("javaToKotlin") public void testJavaToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin/"); } @TestMetadata("javaToKotlinAndBack") public void testJavaToKotlinAndBack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack/"); } @TestMetadata("javaToKotlinAndRemove") public void testJavaToKotlinAndRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove/"); } @TestMetadata("kotlinToJava") public void testKotlinToJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaToKotlin extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaToKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaToKotlinAndBack extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaToKotlinAndBack() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndBack"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaToKotlinAndRemove extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaToKotlinAndRemove() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/javaToKotlinAndRemove"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class KotlinToJava extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInKotlinToJava() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/convertBetweenJavaAndKotlin/kotlinToJava"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -934,154 +1220,438 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaUsedInKotlin extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJavaUsedInKotlin() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("changeFieldType") public void testChangeFieldType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType/"); } @TestMetadata("changeNotUsedSignature") public void testChangeNotUsedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature/"); } @TestMetadata("changePropertyOverrideType") public void testChangePropertyOverrideType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType/"); } @TestMetadata("changeSignature") public void testChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature/"); } @TestMetadata("changeSignaturePackagePrivate") public void testChangeSignaturePackagePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate/"); } @TestMetadata("changeSignaturePackagePrivateNonRoot") public void testChangeSignaturePackagePrivateNonRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot/"); } @TestMetadata("changeSignatureStatic") public void testChangeSignatureStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic/"); } @TestMetadata("constantChanged") public void testConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged/"); } @TestMetadata("constantUnchanged") public void testConstantUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged/"); } @TestMetadata("enumEntryAdded") public void testEnumEntryAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded/"); } @TestMetadata("enumEntryRemoved") public void testEnumEntryRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved/"); } @TestMetadata("javaAndKotlinChangedSimultaneously") public void testJavaAndKotlinChangedSimultaneously() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously/"); } @TestMetadata("javaFieldNullabilityChanged") public void testJavaFieldNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged/"); } @TestMetadata("javaMethodParamNullabilityChanged") public void testJavaMethodParamNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged/"); } @TestMetadata("javaMethodReturnTypeNullabilityChanged") public void testJavaMethodReturnTypeNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged/"); } @TestMetadata("methodAddedInSuper") public void testMethodAddedInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper/"); } @TestMetadata("methodRenamed") public void testMethodRenamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed/"); } @TestMetadata("mixedInheritance") public void testMixedInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance/"); } @TestMetadata("notChangeSignature") public void testNotChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeFieldType extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeFieldType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeFieldType"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeNotUsedSignature extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeNotUsedSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeNotUsedSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangePropertyOverrideType extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangePropertyOverrideType() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changePropertyOverrideType"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignature extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignaturePackagePrivate extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignaturePackagePrivate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivate"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignaturePackagePrivateNonRoot extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignaturePackagePrivateNonRoot() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignaturePackagePrivateNonRoot"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignatureStatic extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignatureStatic() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/changeSignatureStatic"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantUnchanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/constantUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumEntryAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumEntryAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumEntryRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumEntryRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/enumEntryRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaAndKotlinChangedSimultaneously extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaAndKotlinChangedSimultaneously() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaAndKotlinChangedSimultaneously"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaFieldNullabilityChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaFieldNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaFieldNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaMethodParamNullabilityChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaMethodParamNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodParamNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JavaMethodReturnTypeNullabilityChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJavaMethodReturnTypeNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/javaMethodReturnTypeNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAddedInSuper extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAddedInSuper() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodAddedInSuper"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodRenamed extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodRenamed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/methodRenamed"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MixedInheritance extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMixedInheritance() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/mixedInheritance"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotChangeSignature extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNotChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/notChangeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SamConversions extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInSamConversions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("methodAdded") public void testMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded/"); } @TestMetadata("methodAddedSamAdapter") public void testMethodAddedSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter/"); } @TestMetadata("methodSignatureChanged") public void testMethodSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged/"); } @TestMetadata("methodSignatureChangedSamAdapter") public void testMethodSignatureChangedSamAdapter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAddedSamAdapter extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAddedSamAdapter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodAddedSamAdapter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodSignatureChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodSignatureChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodSignatureChangedSamAdapter extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodSignatureChangedSamAdapter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/javaUsedInKotlin/samConversions/methodSignatureChangedSamAdapter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } @@ -1090,10 +1660,13 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KotlinUsedInJava extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("addOptionalParameter") public void testAddOptionalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter/"); } public void testAllFilesPresentInKotlinUsedInJava() throws Exception { @@ -1102,80 +1675,249 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestMetadata("changeNotUsedSignature") public void testChangeNotUsedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature/"); } @TestMetadata("changeSignature") public void testChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature/"); } @TestMetadata("constantChanged") public void testConstantChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged/"); } @TestMetadata("constantUnchanged") public void testConstantUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged/"); } @TestMetadata("funRenamed") public void testFunRenamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed/"); } @TestMetadata("jvmFieldChanged") public void testJvmFieldChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged/"); } @TestMetadata("jvmFieldUnchanged") public void testJvmFieldUnchanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged/"); } @TestMetadata("methodAddedInSuper") public void testMethodAddedInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper/"); } @TestMetadata("notChangeSignature") public void testNotChangeSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature/"); } @TestMetadata("onlyTopLevelFunctionInFileRemoved") public void testOnlyTopLevelFunctionInFileRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved/"); } @TestMetadata("packageFileAdded") public void testPackageFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded/"); } @TestMetadata("privateChanges") public void testPrivateChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges/"); } @TestMetadata("propertyRenamed") public void testPropertyRenamed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AddOptionalParameter extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAddOptionalParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/addOptionalParameter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeNotUsedSignature extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeNotUsedSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeNotUsedSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ChangeSignature extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/changeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstantUnchanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstantUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/constantUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FunRenamed extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunRenamed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/funRenamed"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmFieldChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmFieldChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmFieldUnchanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmFieldUnchanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/jvmFieldUnchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAddedInSuper extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAddedInSuper() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/methodAddedInSuper"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NotChangeSignature extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNotChangeSignature() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/notChangeSignature"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OnlyTopLevelFunctionInFileRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOnlyTopLevelFunctionInFileRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/onlyTopLevelFunctionInFileRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFileAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFileAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/packageFileAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrivateChanges extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPrivateChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/privateChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PropertyRenamed extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPropertyRenamed() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/kotlinUsedInJava/propertyRenamed"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -1183,10 +1925,13 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Other extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("accessingFunctionsViaRenamedFileClass") public void testAccessingFunctionsViaRenamedFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass/"); } public void testAllFilesPresentInOther() throws Exception { @@ -1195,164 +1940,501 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestMetadata("allKotlinFilesRemovedThenNewAdded") public void testAllKotlinFilesRemovedThenNewAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded/"); } @TestMetadata("classRedeclaration") public void testClassRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/classRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/classRedeclaration/"); } @TestMetadata("classToPackageFacade") public void testClassToPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/classToPackageFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/classToPackageFacade/"); } @TestMetadata("conflictingPlatformDeclarations") public void testConflictingPlatformDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations/"); } @TestMetadata("defaultValueInConstructorAdded") public void testDefaultValueInConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded/"); } @TestMetadata("inlineTopLevelFunctionWithJvmName") public void testInlineTopLevelFunctionWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName/"); } @TestMetadata("inlineTopLevelValPropertyWithJvmName") public void testInlineTopLevelValPropertyWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName/"); } @TestMetadata("innerClassNotGeneratedWhenRebuilding") public void testInnerClassNotGeneratedWhenRebuilding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding/"); } @TestMetadata("jvmNameChanged") public void testJvmNameChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/jvmNameChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/jvmNameChanged/"); } @TestMetadata("mainRedeclaration") public void testMainRedeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/mainRedeclaration/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/mainRedeclaration/"); } @TestMetadata("multifileClassAddTopLevelFunWithDefault") public void testMultifileClassAddTopLevelFunWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault/"); } @TestMetadata("multifileClassFileAdded") public void testMultifileClassFileAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded/"); } @TestMetadata("multifileClassFileChanged") public void testMultifileClassFileChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged/"); } @TestMetadata("multifileClassFileMovedToAnotherMultifileClass") public void testMultifileClassFileMovedToAnotherMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass/"); } @TestMetadata("multifileClassInlineFunction") public void testMultifileClassInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction/"); } @TestMetadata("multifileClassInlineFunctionAccessingField") public void testMultifileClassInlineFunctionAccessingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField/"); } @TestMetadata("multifileClassRecreated") public void testMultifileClassRecreated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated/"); } @TestMetadata("multifileClassRecreatedAfterRenaming") public void testMultifileClassRecreatedAfterRenaming() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming/"); } @TestMetadata("multifileClassRemoved") public void testMultifileClassRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved/"); } @TestMetadata("multifilePackagePartMethodAdded") public void testMultifilePackagePartMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded/"); } @TestMetadata("optionalParameter") public void testOptionalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/optionalParameter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/optionalParameter/"); } @TestMetadata("packageFacadeToClass") public void testPackageFacadeToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass/"); } @TestMetadata("packageMultifileClassOneFileWithPublicChanges") public void testPackageMultifileClassOneFileWithPublicChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges/"); } @TestMetadata("packageMultifileClassPrivateOnlyChanged") public void testPackageMultifileClassPrivateOnlyChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged/"); } @TestMetadata("publicPropertyWithPrivateSetterMultiFileFacade") public void testPublicPropertyWithPrivateSetterMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade/"); } @TestMetadata("topLevelFunctionWithJvmName") public void testTopLevelFunctionWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName/"); } @TestMetadata("topLevelPropertyWithJvmName") public void testTopLevelPropertyWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName/"); + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AccessingFunctionsViaRenamedFileClass extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAccessingFunctionsViaRenamedFileClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/accessingFunctionsViaRenamedFileClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AllKotlinFilesRemovedThenNewAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAllKotlinFilesRemovedThenNewAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/allKotlinFilesRemovedThenNewAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/classRedeclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassRedeclaration extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassRedeclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/classRedeclaration"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/classToPackageFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassToPackageFacade extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassToPackageFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/classToPackageFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConflictingPlatformDeclarations extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConflictingPlatformDeclarations() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/conflictingPlatformDeclarations"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValueInConstructorAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValueInConstructorAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/defaultValueInConstructorAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineTopLevelFunctionWithJvmName extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineTopLevelFunctionWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/inlineTopLevelFunctionWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineTopLevelValPropertyWithJvmName extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineTopLevelValPropertyWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/inlineTopLevelValPropertyWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InnerClassNotGeneratedWhenRebuilding extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInnerClassNotGeneratedWhenRebuilding() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/innerClassNotGeneratedWhenRebuilding"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/jvmNameChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class JvmNameChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInJvmNameChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/jvmNameChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/mainRedeclaration") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MainRedeclaration extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMainRedeclaration() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/mainRedeclaration"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassAddTopLevelFunWithDefault extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassAddTopLevelFunWithDefault() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassAddTopLevelFunWithDefault"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassFileAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassFileAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassFileAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassFileChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassFileChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassFileChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassFileMovedToAnotherMultifileClass extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassFileMovedToAnotherMultifileClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassFileMovedToAnotherMultifileClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassInlineFunction extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassInlineFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunction"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassInlineFunctionAccessingField extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassInlineFunctionAccessingField() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassInlineFunctionAccessingField"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassRecreated extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassRecreated() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassRecreated"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassRecreatedAfterRenaming extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassRecreatedAfterRenaming() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassRecreatedAfterRenaming"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifileClassRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifileClassRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifileClassRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MultifilePackagePartMethodAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMultifilePackagePartMethodAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/multifilePackagePartMethodAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/optionalParameter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OptionalParameter extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOptionalParameter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/optionalParameter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadeToClass extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadeToClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/packageFacadeToClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageMultifileClassOneFileWithPublicChanges extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageMultifileClassOneFileWithPublicChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/packageMultifileClassOneFileWithPublicChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageMultifileClassPrivateOnlyChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageMultifileClassPrivateOnlyChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/packageMultifileClassPrivateOnlyChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PublicPropertyWithPrivateSetterMultiFileFacade extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPublicPropertyWithPrivateSetterMultiFileFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/publicPropertyWithPrivateSetterMultiFileFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelFunctionWithJvmName extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelFunctionWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/topLevelFunctionWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelPropertyWithJvmName extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelPropertyWithJvmName() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/withJava/other/topLevelPropertyWithJvmName"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } @@ -1361,92 +2443,264 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineFunCallSite extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInlineFunCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classProperty") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/classProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/classProperty/"); } @TestMetadata("companionObjectProperty") public void testCompanionObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty/"); } @TestMetadata("coroutine") public void testCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/coroutine/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/coroutine/"); } @TestMetadata("function") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/function/"); } @TestMetadata("getter") public void testGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/getter/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/getter/"); } @TestMetadata("lambda") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/lambda/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/lambda/"); } @TestMetadata("localFun") public void testLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/localFun/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/localFun/"); } @TestMetadata("method") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/method/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/method/"); } @TestMetadata("parameterDefaultValue") public void testParameterDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue/"); } @TestMetadata("primaryConstructorParameterDefaultValue") public void testPrimaryConstructorParameterDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue/"); } @TestMetadata("superCall") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/superCall/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/superCall/"); } @TestMetadata("thisCall") public void testThisCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/thisCall/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/thisCall/"); } @TestMetadata("topLevelObjectProperty") public void testTopLevelObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty/"); } @TestMetadata("topLevelProperty") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty/"); + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/classProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassProperty extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/classProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObjectProperty extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObjectProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/companionObjectProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/coroutine") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Coroutine extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCoroutine() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/coroutine"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/function") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Function extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/function"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/getter") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Getter extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInGetter() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/getter"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/lambda") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Lambda extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLambda() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/lambda"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/localFun") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LocalFun extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLocalFun() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/localFun"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/method") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Method extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethod() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/method"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ParameterDefaultValue extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInParameterDefaultValue() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/parameterDefaultValue"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PrimaryConstructorParameterDefaultValue extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPrimaryConstructorParameterDefaultValue() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/primaryConstructorParameterDefaultValue"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/superCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SuperCall extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSuperCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/superCall"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/thisCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ThisCall extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInThisCall() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/thisCall"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelObjectProperty extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelObjectProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/topLevelObjectProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelProperty extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelProperty() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/inlineFunCallSite/topLevelProperty"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -1454,242 +2708,714 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassHierarchyAffected extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassHierarchyAffected() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("annotationFlagRemoved") public void testAnnotationFlagRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved/"); } @TestMetadata("annotationListChanged") public void testAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged/"); } @TestMetadata("bridgeGenerated") public void testBridgeGenerated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated/"); } @TestMetadata("classBecameFinal") public void testClassBecameFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal/"); } @TestMetadata("classBecameInterface") public void testClassBecameInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface/"); } @TestMetadata("classBecamePrivate") public void testClassBecamePrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate/"); } @TestMetadata("classMovedIntoOtherClass") public void testClassMovedIntoOtherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass/"); } @TestMetadata("classRemoved") public void testClassRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved/"); } @TestMetadata("classRemovedAndRestored") public void testClassRemovedAndRestored() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored/"); } @TestMetadata("companionObjectInheritedMemberChanged") public void testCompanionObjectInheritedMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged/"); } @TestMetadata("companionObjectMemberChanged") public void testCompanionObjectMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged/"); } @TestMetadata("companionObjectNameChanged") public void testCompanionObjectNameChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged/"); } @TestMetadata("companionObjectToSimpleObject") public void testCompanionObjectToSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject/"); } @TestMetadata("constructorVisibilityChanged") public void testConstructorVisibilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged/"); } @TestMetadata("enumEntryAdded") public void testEnumEntryAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded/"); } @TestMetadata("enumEntryRemoved") public void testEnumEntryRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved/"); } @TestMetadata("enumMemberChanged") public void testEnumMemberChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged/"); } @TestMetadata("flagsAndMemberInDifferentClassesChanged") public void testFlagsAndMemberInDifferentClassesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged/"); } @TestMetadata("flagsAndMemberInSameClassChanged") public void testFlagsAndMemberInSameClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged/"); } @TestMetadata("implcitUpcast") public void testImplcitUpcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast/"); } @TestMetadata("inferredTypeArgumentChanged") public void testInferredTypeArgumentChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged/"); } @TestMetadata("inferredTypeChanged") public void testInferredTypeChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged/"); } @TestMetadata("lambdaParameterAffected") public void testLambdaParameterAffected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected/"); } @TestMetadata("methodAdded") public void testMethodAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded/"); } @TestMetadata("methodAnnotationAdded") public void testMethodAnnotationAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded/"); } @TestMetadata("methodNullabilityChanged") public void testMethodNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged/"); } @TestMetadata("methodParameterWithDefaultValueAdded") public void testMethodParameterWithDefaultValueAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded/"); } @TestMetadata("methodRemoved") public void testMethodRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved/"); } @TestMetadata("overrideExplicit") public void testOverrideExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit/"); } @TestMetadata("overrideImplicit") public void testOverrideImplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit/"); } @TestMetadata("propertyNullabilityChanged") public void testPropertyNullabilityChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded/"); } @TestMetadata("sealedClassIndirectImplAdded") public void testSealedClassIndirectImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded/"); } @TestMetadata("sealedClassNestedImplAdded") public void testSealedClassNestedImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded/"); } @TestMetadata("secondaryConstructorAdded") public void testSecondaryConstructorAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded/"); } @TestMetadata("starProjectionUpperBoundChanged") public void testStarProjectionUpperBoundChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged/"); } @TestMetadata("supertypesListChanged") public void testSupertypesListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged/"); } @TestMetadata("typeParameterListChanged") public void testTypeParameterListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged/"); } @TestMetadata("varianceChanged") public void testVarianceChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged/"); + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotationFlagRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAnnotationFlagRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/annotationFlagRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class AnnotationListChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/annotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class BridgeGenerated extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInBridgeGenerated() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/bridgeGenerated"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassBecameFinal extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassBecameFinal() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/classBecameFinal"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassBecameInterface extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassBecameInterface() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/classBecameInterface"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassBecamePrivate extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassBecamePrivate() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/classBecamePrivate"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassMovedIntoOtherClass extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassMovedIntoOtherClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/classMovedIntoOtherClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/classRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassRemovedAndRestored extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassRemovedAndRestored() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/classRemovedAndRestored"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObjectInheritedMemberChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObjectInheritedMemberChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectInheritedMemberChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObjectMemberChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObjectMemberChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectMemberChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObjectNameChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObjectNameChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectNameChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CompanionObjectToSimpleObject extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInCompanionObjectToSimpleObject() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/companionObjectToSimpleObject"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ConstructorVisibilityChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstructorVisibilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/constructorVisibilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumEntryAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumEntryAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumEntryRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumEntryRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/enumEntryRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class EnumMemberChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInEnumMemberChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/enumMemberChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FlagsAndMemberInDifferentClassesChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFlagsAndMemberInDifferentClassesChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInDifferentClassesChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class FlagsAndMemberInSameClassChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFlagsAndMemberInSameClassChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/flagsAndMemberInSameClassChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ImplcitUpcast extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInImplcitUpcast() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/implcitUpcast"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InferredTypeArgumentChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInferredTypeArgumentChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeArgumentChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InferredTypeChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInferredTypeChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/inferredTypeChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class LambdaParameterAffected extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLambdaParameterAffected() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/lambdaParameterAffected"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/methodAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodAnnotationAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodAnnotationAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/methodAnnotationAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodNullabilityChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/methodNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodParameterWithDefaultValueAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodParameterWithDefaultValueAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/methodParameterWithDefaultValueAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MethodRemoved extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMethodRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/methodRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OverrideExplicit extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOverrideExplicit() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/overrideExplicit"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OverrideImplicit extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInOverrideImplicit() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/overrideImplicit"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PropertyNullabilityChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPropertyNullabilityChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/propertyNullabilityChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassIndirectImplAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassIndirectImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassIndirectImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/sealedClassNestedImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SecondaryConstructorAdded extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSecondaryConstructorAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/secondaryConstructorAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class StarProjectionUpperBoundChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInStarProjectionUpperBoundChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/starProjectionUpperBoundChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SupertypesListChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSupertypesListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/supertypesListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TypeParameterListChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTypeParameterListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/typeParameterListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class VarianceChanged extends AbstractIncrementalJpsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInVarianceChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/classHierarchyAffected/varianceChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalLazyCachesTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalLazyCachesTestGenerated.java index 43876df428b..2fe51499bc5 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalLazyCachesTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/IncrementalLazyCachesTestGenerated.java @@ -23,56 +23,156 @@ public class IncrementalLazyCachesTestGenerated extends AbstractIncrementalLazyC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LazyKotlinCaches extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInLazyKotlinCaches() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("class") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/class/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/class/"); } @TestMetadata("classInheritance") public void testClassInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/classInheritance/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/classInheritance/"); } @TestMetadata("constant") public void testConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/constant/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/constant/"); } @TestMetadata("function") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/function/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/function/"); } @TestMetadata("inlineFunctionWithUsage") public void testInlineFunctionWithUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithUsage/"); } @TestMetadata("inlineFunctionWithoutUsage") public void testInlineFunctionWithoutUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithoutUsage/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithoutUsage/"); } @TestMetadata("noKotlin") public void testNoKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/noKotlin/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/noKotlin/"); } @TestMetadata("topLevelPropertyAccess") public void testTopLevelPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/topLevelPropertyAccess/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lazyKotlinCaches/topLevelPropertyAccess/"); + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/class") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Class extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/class"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/classInheritance") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassInheritance extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassInheritance() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/classInheritance"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/constant") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Constant extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInConstant() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/constant"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/function") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Function extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInFunction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/function"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithUsage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineFunctionWithUsage extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineFunctionWithUsage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithUsage"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithoutUsage") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class InlineFunctionWithoutUsage extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInlineFunctionWithoutUsage() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/inlineFunctionWithoutUsage"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/noKotlin") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NoKotlin extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNoKotlin() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/noKotlin"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/lazyKotlinCaches/topLevelPropertyAccess") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class TopLevelPropertyAccess extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInTopLevelPropertyAccess() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lazyKotlinCaches/topLevelPropertyAccess"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -80,32 +180,84 @@ public class IncrementalLazyCachesTestGenerated extends AbstractIncrementalLazyC @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ChangeIncrementalOption extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChangeIncrementalOption() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/changeIncrementalOption"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("incrementalOff") public void testIncrementalOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOff/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOff/"); } @TestMetadata("incrementalOffOn") public void testIncrementalOffOn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOn/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOn/"); } @TestMetadata("incrementalOffOnJavaChanged") public void testIncrementalOffOnJavaChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaChanged/"); } @TestMetadata("incrementalOffOnJavaOnly") public void testIncrementalOffOnJavaOnly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaOnly/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaOnly/"); + } + + @TestMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOff") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncrementalOff extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncrementalOff() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOff"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOn") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncrementalOffOn extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncrementalOffOn() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOn"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncrementalOffOnJavaChanged extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncrementalOffOnJavaChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaOnly") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class IncrementalOffOnJavaOnly extends AbstractIncrementalLazyCachesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIncrementalOffOnJavaOnly() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/changeIncrementalOption/incrementalOffOnJavaOnly"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JsLookupTrackerTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JsLookupTrackerTestGenerated.java index 7935f339faf..0ceada373e4 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JsLookupTrackerTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JsLookupTrackerTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JsLookupTrackerTestGenerated extends AbstractJsLookupTrackerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJs() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lookupTracker/js"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("classifierMembers") public void testClassifierMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/js/classifierMembers/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/js/classifierMembers/"); } @TestMetadata("conventions") public void testConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/js/conventions/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/js/conventions/"); } @TestMetadata("expressionType") public void testExpressionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/js/expressionType/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/js/expressionType/"); } @TestMetadata("localDeclarations") public void testLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/js/localDeclarations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/js/localDeclarations/"); } @TestMetadata("packageDeclarations") public void testPackageDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/js/packageDeclarations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/js/packageDeclarations/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/js/simple/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/js/simple/"); } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JvmLookupTrackerTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JvmLookupTrackerTestGenerated.java index 420a830d987..7e436607bec 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JvmLookupTrackerTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/JvmLookupTrackerTestGenerated.java @@ -21,61 +21,56 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JvmLookupTrackerTestGenerated extends AbstractJvmLookupTrackerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvm() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/incremental/lookupTracker/jvm"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("classifierMembers") public void testClassifierMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/classifierMembers/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/classifierMembers/"); } @TestMetadata("conventions") public void testConventions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/conventions/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/conventions/"); } @TestMetadata("expressionType") public void testExpressionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/expressionType/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/expressionType/"); } @TestMetadata("java") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/java/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/java/"); } @TestMetadata("localDeclarations") public void testLocalDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/localDeclarations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/localDeclarations/"); } @TestMetadata("packageDeclarations") public void testPackageDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/packageDeclarations/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/packageDeclarations/"); } @TestMetadata("SAM") public void testSAM() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/SAM/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/SAM/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/simple/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/simple/"); } @TestMetadata("syntheticProperties") public void testSyntheticProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/lookupTracker/jvm/syntheticProperties/"); - doTest(fileName); + runTest("jps-plugin/testData/incremental/lookupTracker/jvm/syntheticProperties/"); } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JsProtoComparisonTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JsProtoComparisonTestGenerated.java index d897cfc6da6..d81cf80c1a3 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JsProtoComparisonTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JsProtoComparisonTestGenerated.java @@ -23,74 +23,210 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassSignatureChange extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassSignatureChange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classAnnotationListChanged") public void testClassAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/"); } @TestMetadata("classFlagsAndMembersChanged") public void testClassFlagsAndMembersChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged/"); } @TestMetadata("classFlagsChanged") public void testClassFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/"); } @TestMetadata("classTypeParameterListChanged") public void testClassTypeParameterListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged/"); } @TestMetadata("classWithSuperTypeListChanged") public void testClassWithSuperTypeListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/"); } @TestMetadata("nestedClassSignatureChanged") public void testNestedClassSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded/"); } @TestMetadata("sealedClassImplRemoved") public void testSealedClassImplRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved/"); } @TestMetadata("sealedClassNestedImplAdded") public void testSealedClassNestedImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded/"); } @TestMetadata("sealedClassNestedImplAddedDeep") public void testSealedClassNestedImplAddedDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep/"); } @TestMetadata("sealedClassNestedImplRemoved") public void testSealedClassNestedImplRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved/"); + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassAnnotationListChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassFlagsAndMembersChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassFlagsAndMembersChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassFlagsChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassTypeParameterListChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassTypeParameterListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithSuperTypeListChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithSuperTypeListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClassSignatureChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNestedClassSignatureChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplAdded extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplRemoved extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplAdded extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplAddedDeep extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplAddedDeep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplRemoved extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -98,38 +234,102 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassPrivateOnlyChange extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassPrivateOnlyChange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classWithPrivateFunChanged") public void testClassWithPrivateFunChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged/"); } @TestMetadata("classWithPrivatePrimaryConstructorChanged") public void testClassWithPrivatePrimaryConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged/"); } @TestMetadata("classWithPrivateSecondaryConstructorChanged") public void testClassWithPrivateSecondaryConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged/"); } @TestMetadata("classWithPrivateValChanged") public void testClassWithPrivateValChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged/"); } @TestMetadata("classWithPrivateVarChanged") public void testClassWithPrivateVarChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged/"); + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateFunChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateFunChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivatePrimaryConstructorChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivatePrimaryConstructorChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateSecondaryConstructorChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateSecondaryConstructorChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateValChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateValChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateVarChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateVarChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -137,68 +337,192 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembersOnlyChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembersOnlyChanged() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classWithCompanionObjectChanged") public void testClassWithCompanionObjectChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged/"); } @TestMetadata("classWithConstructorChanged") public void testClassWithConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged/"); } @TestMetadata("classWithFunAndValChanged") public void testClassWithFunAndValChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged/"); } @TestMetadata("classWithNestedClassesChanged") public void testClassWithNestedClassesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged/"); } @TestMetadata("classWitnEnumChanged") public void testClassWitnEnumChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged/"); } @TestMetadata("defaultValues") public void testDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues/"); } @TestMetadata("membersAnnotationListChanged") public void testMembersAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged/"); } @TestMetadata("membersFlagsChanged") public void testMembersFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged/"); } @TestMetadata("nestedClassMembersChanged") public void testNestedClassMembersChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded/"); + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithCompanionObjectChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithCompanionObjectChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithConstructorChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithConstructorChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithFunAndValChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithFunAndValChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithNestedClassesChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithNestedClassesChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWitnEnumChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWitnEnumChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValues extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValues() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersAnnotationListChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersFlagsChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClassMembersChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNestedClassMembersChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplAdded extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -206,38 +530,102 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("defaultValues") public void testDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/defaultValues/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/defaultValues/"); } @TestMetadata("membersAnnotationListChanged") public void testMembersAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged/"); } @TestMetadata("membersFlagsChanged") public void testMembersFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged/"); } @TestMetadata("packageFacadePrivateOnlyChanges") public void testPackageFacadePrivateOnlyChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges/"); } @TestMetadata("packageFacadePublicChanges") public void testPackageFacadePublicChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges/"); + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/defaultValues") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValues extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValues() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/defaultValues"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersAnnotationListChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersFlagsChanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadePrivateOnlyChanges extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadePrivateOnlyChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadePublicChanges extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadePublicChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -245,20 +633,48 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unchanged extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnchanged() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("unchangedClass") public void testUnchangedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedClass/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/unchanged/unchangedClass/"); } @TestMetadata("unchangedPackageFacade") public void testUnchangedPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade/"); + } + + @TestMetadata("jps-plugin/testData/comparison/unchanged/unchangedClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnchangedClass extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnchangedClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged/unchangedClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnchangedPackageFacade extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnchangedPackageFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -266,14 +682,30 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsOnly extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJsOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jsOnly"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("externals") public void testExternals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/jsOnly/externals/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/jsOnly/externals/"); + } + + @TestMetadata("jps-plugin/testData/comparison/jsOnly/externals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Externals extends AbstractJsProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInExternals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jsOnly/externals"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JvmProtoComparisonTestGenerated.java b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JvmProtoComparisonTestGenerated.java index d535cb6d3c1..de8efa4c9f3 100644 --- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JvmProtoComparisonTestGenerated.java +++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/incremental/JvmProtoComparisonTestGenerated.java @@ -23,74 +23,210 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassSignatureChange extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassSignatureChange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classAnnotationListChanged") public void testClassAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/"); } @TestMetadata("classFlagsAndMembersChanged") public void testClassFlagsAndMembersChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged/"); } @TestMetadata("classFlagsChanged") public void testClassFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged/"); } @TestMetadata("classTypeParameterListChanged") public void testClassTypeParameterListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged/"); } @TestMetadata("classWithSuperTypeListChanged") public void testClassWithSuperTypeListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/"); } @TestMetadata("nestedClassSignatureChanged") public void testNestedClassSignatureChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded/"); } @TestMetadata("sealedClassImplRemoved") public void testSealedClassImplRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved/"); } @TestMetadata("sealedClassNestedImplAdded") public void testSealedClassNestedImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded/"); } @TestMetadata("sealedClassNestedImplAddedDeep") public void testSealedClassNestedImplAddedDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep/"); } @TestMetadata("sealedClassNestedImplRemoved") public void testSealedClassNestedImplRemoved() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved/"); + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassAnnotationListChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassFlagsAndMembersChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassFlagsAndMembersChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassFlagsChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassTypeParameterListChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassTypeParameterListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classTypeParameterListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithSuperTypeListChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithSuperTypeListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClassSignatureChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNestedClassSignatureChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/nestedClassSignatureChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplAdded extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplRemoved extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassImplRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplAdded extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplAddedDeep extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplAddedDeep() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplAddedDeep"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassNestedImplRemoved extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassNestedImplRemoved() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange/sealedClassNestedImplRemoved"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -98,38 +234,102 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassPrivateOnlyChange extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassPrivateOnlyChange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classWithPrivateFunChanged") public void testClassWithPrivateFunChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged/"); } @TestMetadata("classWithPrivatePrimaryConstructorChanged") public void testClassWithPrivatePrimaryConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged/"); } @TestMetadata("classWithPrivateSecondaryConstructorChanged") public void testClassWithPrivateSecondaryConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged/"); } @TestMetadata("classWithPrivateValChanged") public void testClassWithPrivateValChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged/"); } @TestMetadata("classWithPrivateVarChanged") public void testClassWithPrivateVarChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged/"); + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateFunChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateFunChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateFunChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivatePrimaryConstructorChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivatePrimaryConstructorChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivatePrimaryConstructorChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateSecondaryConstructorChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateSecondaryConstructorChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateSecondaryConstructorChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateValChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateValChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateValChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithPrivateVarChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithPrivateVarChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classPrivateOnlyChange/classWithPrivateVarChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -137,68 +337,192 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassMembersOnlyChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassMembersOnlyChanged() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classWithCompanionObjectChanged") public void testClassWithCompanionObjectChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged/"); } @TestMetadata("classWithConstructorChanged") public void testClassWithConstructorChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged/"); } @TestMetadata("classWithFunAndValChanged") public void testClassWithFunAndValChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged/"); } @TestMetadata("classWithNestedClassesChanged") public void testClassWithNestedClassesChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged/"); } @TestMetadata("classWitnEnumChanged") public void testClassWitnEnumChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged/"); } @TestMetadata("defaultValues") public void testDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues/"); } @TestMetadata("membersAnnotationListChanged") public void testMembersAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged/"); } @TestMetadata("membersFlagsChanged") public void testMembersFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged/"); } @TestMetadata("nestedClassMembersChanged") public void testNestedClassMembersChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged/"); } @TestMetadata("sealedClassImplAdded") public void testSealedClassImplAdded() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded/"); + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithCompanionObjectChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithCompanionObjectChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithCompanionObjectChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithConstructorChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithConstructorChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithConstructorChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithFunAndValChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithFunAndValChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithFunAndValChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWithNestedClassesChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWithNestedClassesChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWithNestedClassesChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassWitnEnumChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassWitnEnumChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/classWitnEnumChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValues extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValues() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/defaultValues"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersAnnotationListChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersFlagsChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class NestedClassMembersChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInNestedClassMembersChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/nestedClassMembersChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SealedClassImplAdded extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInSealedClassImplAdded() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classMembersOnlyChanged/sealedClassImplAdded"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -206,38 +530,102 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PackageMembers extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPackageMembers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("defaultValues") public void testDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/defaultValues/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/defaultValues/"); } @TestMetadata("membersAnnotationListChanged") public void testMembersAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged/"); } @TestMetadata("membersFlagsChanged") public void testMembersFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged/"); } @TestMetadata("packageFacadePrivateOnlyChanges") public void testPackageFacadePrivateOnlyChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges/"); } @TestMetadata("packageFacadePublicChanges") public void testPackageFacadePublicChanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges/"); + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/defaultValues") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class DefaultValues extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDefaultValues() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/defaultValues"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersAnnotationListChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersAnnotationListChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersFlagsChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadePrivateOnlyChanges extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadePrivateOnlyChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/packageFacadePrivateOnlyChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadePublicChanges extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadePublicChanges() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/packageMembers/packageFacadePublicChanges"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -245,20 +633,48 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unchanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUnchanged() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("unchangedClass") public void testUnchangedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedClass/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/unchanged/unchangedClass/"); } @TestMetadata("unchangedPackageFacade") public void testUnchangedPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade/"); + } + + @TestMetadata("jps-plugin/testData/comparison/unchanged/unchangedClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnchangedClass extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnchangedClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged/unchangedClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class UnchangedPackageFacade extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInUnchangedPackageFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/unchanged/unchangedPackageFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } @@ -266,32 +682,84 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOnly extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInJvmOnly() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jvmOnly"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); } @TestMetadata("classToFileFacade") public void testClassToFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/jvmOnly/classToFileFacade/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/jvmOnly/classToFileFacade/"); } @TestMetadata("membersFlagsChanged") public void testMembersFlagsChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/jvmOnly/membersFlagsChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/jvmOnly/membersFlagsChanged/"); } @TestMetadata("packageFacadeMultifileClassChanged") public void testPackageFacadeMultifileClassChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/jvmOnly/packageFacadeMultifileClassChanged/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/jvmOnly/packageFacadeMultifileClassChanged/"); } @TestMetadata("packageFacadeToClass") public void testPackageFacadeToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/jvmOnly/packageFacadeToClass/"); - doTest(fileName); + runTest("jps-plugin/testData/comparison/jvmOnly/packageFacadeToClass/"); + } + + @TestMetadata("jps-plugin/testData/comparison/jvmOnly/classToFileFacade") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ClassToFileFacade extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInClassToFileFacade() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jvmOnly/classToFileFacade"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/jvmOnly/membersFlagsChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class MembersFlagsChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInMembersFlagsChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jvmOnly/membersFlagsChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/jvmOnly/packageFacadeMultifileClassChanged") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadeMultifileClassChanged extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadeMultifileClassChanged() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jvmOnly/packageFacadeMultifileClassChanged"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("jps-plugin/testData/comparison/jvmOnly/packageFacadeToClass") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class PackageFacadeToClass extends AbstractJvmProtoComparisonTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInPackageFacadeToClass() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jvmOnly/packageFacadeToClass"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true); + } } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/DceTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/DceTestGenerated.java index bdd58d5af71..b1aa05b7e22 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/DceTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/DceTestGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class DceTestGenerated extends AbstractDceTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDce() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/dce"), Pattern.compile("(.+)\\.js"), TargetBackend.JS, true); } @TestMetadata("amd.js") public void testAmd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/dce/amd.js"); - doTest(fileName); + runTest("js/js.translator/testData/dce/amd.js"); } @TestMetadata("arrayAccess.js") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/dce/arrayAccess.js"); - doTest(fileName); + runTest("js/js.translator/testData/dce/arrayAccess.js"); } @TestMetadata("commonjs.js") public void testCommonjs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/dce/commonjs.js"); - doTest(fileName); + runTest("js/js.translator/testData/dce/commonjs.js"); } @TestMetadata("cycle.js") public void testCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/dce/cycle.js"); - doTest(fileName); + runTest("js/js.translator/testData/dce/cycle.js"); } @TestMetadata("localVarAndFunction.js") public void testLocalVarAndFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/dce/localVarAndFunction.js"); - doTest(fileName); + runTest("js/js.translator/testData/dce/localVarAndFunction.js"); } @TestMetadata("typeOf.js") public void testTypeOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/dce/typeOf.js"); - doTest(fileName); + runTest("js/js.translator/testData/dce/typeOf.js"); } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/JsLineNumberTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/JsLineNumberTestGenerated.java index f96a2a30449..e044bd392f6 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/JsLineNumberTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/JsLineNumberTestGenerated.java @@ -21,322 +21,279 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JsLineNumberTestGenerated extends AbstractJsLineNumberTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLineNumbers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/lineNumbers"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("andAndWithSideEffect.kt") public void testAndAndWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/andAndWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/andAndWithSideEffect.kt"); } @TestMetadata("backingField.kt") public void testBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/backingField.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/backingField.kt"); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/catch.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/catch.kt"); } @TestMetadata("chainedCall.kt") public void testChainedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/chainedCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/chainedCall.kt"); } @TestMetadata("classCapturingLocals.kt") public void testClassCapturingLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/classCapturingLocals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/classCapturingLocals.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/closure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/closure.kt"); } @TestMetadata("complexExpressionAsDefaultArgument.kt") public void testComplexExpressionAsDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/complexExpressionAsDefaultArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/complexExpressionAsDefaultArgument.kt"); } @TestMetadata("conditionalDecomposed.kt") public void testConditionalDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/conditionalDecomposed.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/conditionalDecomposed.kt"); } @TestMetadata("coroutine.kt") public void testCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/coroutine.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/coroutine.kt"); } @TestMetadata("coroutineNullAssertion.kt") public void testCoroutineNullAssertion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/coroutineNullAssertion.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/coroutineNullAssertion.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/dataClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/dataClass.kt"); } @TestMetadata("delegateMemberVal.kt") public void testDelegateMemberVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/delegateMemberVal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/delegateMemberVal.kt"); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/delegatedProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/delegatedProperty.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/delegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/delegation.kt"); } @TestMetadata("destructuring.kt") public void testDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/destructuring.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/destructuring.kt"); } @TestMetadata("destructuringInline.kt") public void testDestructuringInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/destructuringInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/destructuringInline.kt"); } @TestMetadata("doWhileWithComplexCondition.kt") public void testDoWhileWithComplexCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/doWhileWithComplexCondition.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/doWhileWithComplexCondition.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/elvis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/elvis.kt"); } @TestMetadata("enumCompanionObject.kt") public void testEnumCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/enumCompanionObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/enumCompanionObject.kt"); } @TestMetadata("enumObject.kt") public void testEnumObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/enumObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/enumObject.kt"); } @TestMetadata("expressionAsFunctionBody.kt") public void testExpressionAsFunctionBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/expressionAsFunctionBody.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/expressionAsFunctionBody.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/for.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/for.kt"); } @TestMetadata("increment.kt") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/increment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/increment.kt"); } @TestMetadata("inlineArguments.kt") public void testInlineArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/inlineArguments.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/inlineArguments.kt"); } @TestMetadata("inlineLocalVarsRef.kt") public void testInlineLocalVarsRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/inlineLocalVarsRef.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/inlineLocalVarsRef.kt"); } @TestMetadata("inlineReturn.kt") public void testInlineReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/inlineReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/inlineReturn.kt"); } @TestMetadata("inlining.kt") public void testInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/inlining.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/inlining.kt"); } @TestMetadata("inliningWithLambda.kt") public void testInliningWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/inliningWithLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/inliningWithLambda.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/innerClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/innerClass.kt"); } @TestMetadata("isOperator.kt") public void testIsOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/isOperator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/isOperator.kt"); } @TestMetadata("jsCode.kt") public void testJsCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/jsCode.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/jsCode.kt"); } @TestMetadata("lambdaWithClosure.kt") public void testLambdaWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/lambdaWithClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/lambdaWithClosure.kt"); } @TestMetadata("lastExpressionInInlineLambda.kt") public void testLastExpressionInInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/lastExpressionInInlineLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/lastExpressionInInlineLambda.kt"); } @TestMetadata("literals.kt") public void testLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/literals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/literals.kt"); } @TestMetadata("longLiteral.kt") public void testLongLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/longLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/longLiteral.kt"); } @TestMetadata("memberFunWithDefaultParam.kt") public void testMemberFunWithDefaultParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/memberFunWithDefaultParam.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/memberFunWithDefaultParam.kt"); } @TestMetadata("multipleReferences.kt") public void testMultipleReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/multipleReferences.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/multipleReferences.kt"); } @TestMetadata("objectInstanceFunction.kt") public void testObjectInstanceFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/objectInstanceFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/objectInstanceFunction.kt"); } @TestMetadata("optionalArgs.kt") public void testOptionalArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/optionalArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/optionalArgs.kt"); } @TestMetadata("propertyWithoutInitializer.kt") public void testPropertyWithoutInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/propertyWithoutInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/propertyWithoutInitializer.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/simple.kt"); } @TestMetadata("stringLiteral.kt") public void testStringLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/stringLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/stringLiteral.kt"); } @TestMetadata("syntheticCodeInConstructors.kt") public void testSyntheticCodeInConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/syntheticCodeInConstructors.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/syntheticCodeInConstructors.kt"); } @TestMetadata("syntheticCodeInEnums.kt") public void testSyntheticCodeInEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/syntheticCodeInEnums.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/syntheticCodeInEnums.kt"); } @TestMetadata("valParameter.kt") public void testValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/valParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/valParameter.kt"); } @TestMetadata("whenEntryWithMultipleConditions.kt") public void testWhenEntryWithMultipleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/whenEntryWithMultipleConditions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/whenEntryWithMultipleConditions.kt"); } @TestMetadata("whenEntryWithMultipleConditionsNonOptimized.kt") public void testWhenEntryWithMultipleConditionsNonOptimized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/whenEntryWithMultipleConditionsNonOptimized.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/whenEntryWithMultipleConditionsNonOptimized.kt"); } @TestMetadata("whenIn.kt") public void testWhenIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/whenIn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/whenIn.kt"); } @TestMetadata("whenIs.kt") public void testWhenIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/whenIs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/whenIs.kt"); } @TestMetadata("whileWithComplexCondition.kt") public void testWhileWithComplexCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/whileWithComplexCondition.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/whileWithComplexCondition.kt"); } @TestMetadata("js/js.translator/testData/lineNumbers/inlineMultiModule") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineMultiModule extends AbstractJsLineNumberTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/lineNumbers/inlineMultiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/lineNumbers/inlineMultiModule/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/lineNumbers/inlineMultiModule/simple.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java index 7db19aee4cc..de60aea2ef2 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/BoxJsTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BoxJsTestGenerated extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @@ -29,14 +33,17 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotation extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/annotation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/annotation/annotationClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/annotation/annotationClass.kt"); } } @@ -44,6 +51,10 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @@ -52,10 +63,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/abstractClassMember.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/abstractClassMember.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -64,212 +78,177 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("classMemberAndExtension.kt") public void testClassMemberAndExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt"); } @TestMetadata("classMemberAndNonExtensionCompatibility.kt") public void testClassMemberAndNonExtensionCompatibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt"); } @TestMetadata("classMemberFromClass.kt") public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt"); } @TestMetadata("classMemberFromExtension.kt") public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt"); } @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); } @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("classMemberOverridden.kt") public void testClassMemberOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt"); } @TestMetadata("closureWithSideEffect.kt") public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt"); } @TestMetadata("constructorFromTopLevelNoArgs.kt") public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); } @TestMetadata("constructorFromTopLevelOneStringArg.kt") public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); } @TestMetadata("constructorsWithArgs.kt") public void testConstructorsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extension.kt"); } @TestMetadata("extensionFromClass.kt") public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromClass.kt"); } @TestMetadata("extensionFromExtension.kt") public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt"); } @TestMetadata("extensionFromTopLevel.kt") public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt"); } @TestMetadata("extensionFromTopLevelStringNoArgs.kt") public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); } @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); } @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); } @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("extensionToPrimitive.kt") public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt"); } @TestMetadata("extensionWithClosure.kt") public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt"); } @TestMetadata("localAndTopLevelExtensions.kt") public void testLocalAndTopLevelExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt"); } @TestMetadata("localLocal.kt") public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/localLocal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/localLocal.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/recursiveClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/recursiveClosure.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/simple.kt"); } @TestMetadata("simpleClosure.kt") public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simpleClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/simpleClosure.kt"); } @TestMetadata("simpleWithArg.kt") public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simpleWithArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/simpleWithArg.kt"); } @TestMetadata("stringNativeExtension.kt") public void testStringNativeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelWithArg.kt") public void testTopLevelFromTopLevelWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt"); } @TestMetadata("unitWithSideEffect.kt") public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt"); } } @@ -277,10 +256,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -289,80 +271,67 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/delegated.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/delegated.kt"); } @TestMetadata("delegatedMutable.kt") public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/delegatedMutable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/delegatedMutable.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/extensionProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/extensionProperty.kt"); } @TestMetadata("kClassInstanceIsInitializedFirst.kt") public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/memberProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/memberProperty.kt"); } @TestMetadata("overriddenInSubclass.kt") public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/simpleExtension.kt"); } @TestMetadata("simpleMember.kt") public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMember.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/simpleMember.kt"); } @TestMetadata("simpleMutableExtension.kt") public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt"); } @TestMetadata("simpleMutableMember.kt") public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt"); } @TestMetadata("simpleMutableTopLevel.kt") public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt"); } @TestMetadata("simpleTopLevel.kt") public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/topLevelVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/callableReference/property/topLevelVar.kt"); } } } @@ -371,80 +340,72 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Char extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInChar() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/char"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("charBinaryOperations.kt") public void testCharBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charBinaryOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charBinaryOperations.kt"); } @TestMetadata("charCompareToIntrinsic.kt") public void testCharCompareToIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charCompareToIntrinsic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charCompareToIntrinsic.kt"); } @TestMetadata("charConstantByUnicodeId.kt") public void testCharConstantByUnicodeId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charConstantByUnicodeId.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charConstantByUnicodeId.kt"); } @TestMetadata("charConversions.kt") public void testCharConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charConversions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charConversions.kt"); } @TestMetadata("charElvis.kt") public void testCharElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charElvis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charElvis.kt"); } @TestMetadata("charEquals.kt") public void testCharEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charEquals.kt"); } @TestMetadata("charInStringTemplate.kt") public void testCharInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charInStringTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charInStringTemplate.kt"); } @TestMetadata("charIsCheck.kt") public void testCharIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charIsCheck.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charIsCheck.kt"); } @TestMetadata("charRanges.kt") public void testCharRanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charRanges.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charRanges.kt"); } @TestMetadata("charUnaryOperations.kt") public void testCharUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charUnaryOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/charUnaryOperations.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/topLevelCallables.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/topLevelCallables.kt"); } @TestMetadata("unboxedCharSpecials.kt") public void testUnboxedCharSpecials() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/unboxedCharSpecials.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/char/unboxedCharSpecials.kt"); } } @@ -452,10 +413,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessing.kt") public void testAccessing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/accessing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/accessing.kt"); } public void testAllFilesPresentInClassObject() throws Exception { @@ -464,56 +428,47 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("defaultObjectSameNamesAsInOuter.kt") public void testDefaultObjectSameNamesAsInOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt"); } @TestMetadata("enumCompanionObject.kt") public void testEnumCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/enumCompanionObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/enumCompanionObject.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/inTrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/inTrait.kt"); } @TestMetadata("invokeOperatorInCompanionObject.kt") public void testInvokeOperatorInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt"); } @TestMetadata("namedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/namedClassObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/namedClassObject.kt"); } @TestMetadata("objectInCompanionObject.kt") public void testObjectInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/objectInCompanionObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/objectInCompanionObject.kt"); } @TestMetadata("setVar.kt") public void testSetVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/setVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/setVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/simple.kt"); } @TestMetadata("withInheritance.kt") public void testWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/withInheritance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/classObject/withInheritance.kt"); } } @@ -521,278 +476,237 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closure extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClosure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("closureArrayListInstance.kt") public void testClosureArrayListInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureArrayListInstance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureArrayListInstance.kt"); } @TestMetadata("closureFunctionAsArgument.kt") public void testClosureFunctionAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureFunctionAsArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureFunctionAsArgument.kt"); } @TestMetadata("closureFunctionByInnerFunction.kt") public void testClosureFunctionByInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt"); } @TestMetadata("closureGenericTypeValue.kt") public void testClosureGenericTypeValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureGenericTypeValue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureGenericTypeValue.kt"); } @TestMetadata("closureInFewFunctionWithDifferentName.kt") public void testClosureInFewFunctionWithDifferentName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt"); } @TestMetadata("closureInNestedFunctions.kt") public void testClosureInNestedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInNestedFunctions.kt"); } @TestMetadata("closureInNestedFunctionsInMethod.kt") public void testClosureInNestedFunctionsInMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt"); } @TestMetadata("closureInNestedFunctionsWhichMixedWithObject.kt") public void testClosureInNestedFunctionsWhichMixedWithObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt"); } @TestMetadata("closureInNestedLambdasInObject.kt") public void testClosureInNestedLambdasInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt"); } @TestMetadata("closureInObject.kt") public void testClosureInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInObject.kt"); } @TestMetadata("closureInWithInsideWith.kt") public void testClosureInWithInsideWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInWithInsideWith.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureInWithInsideWith.kt"); } @TestMetadata("closureLambdaVarInLambda.kt") public void testClosureLambdaVarInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt"); } @TestMetadata("closureLocalFunction.kt") public void testClosureLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureLocalFunction.kt"); } @TestMetadata("closureLocalFunctionByInnerFunction.kt") public void testClosureLocalFunctionByInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt"); } @TestMetadata("closureLocalFunctionByInnerFunctionInConstructor.kt") public void testClosureLocalFunctionByInnerFunctionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt"); } @TestMetadata("closureLocalInNestedObject.kt") public void testClosureLocalInNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalInNestedObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureLocalInNestedObject.kt"); } @TestMetadata("closureLocalLiteralFunction.kt") public void testClosureLocalLiteralFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt"); } @TestMetadata("closureReceiverInLocalExtFunByLocalExtFun.kt") public void testClosureReceiverInLocalExtFunByLocalExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt"); } @TestMetadata("closureReferencingMember.kt") public void testClosureReferencingMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureReferencingMember.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureReferencingMember.kt"); } @TestMetadata("closureThisAndClassObject.kt") public void testClosureThisAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisAndClassObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisAndClassObject.kt"); } @TestMetadata("closureThisAndReceiver.kt") public void testClosureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisAndReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisAndReceiver.kt"); } @TestMetadata("closureThisByUsingMethodFromParentClass.kt") public void testClosureThisByUsingMethodFromParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt"); } @TestMetadata("closureThisInConstructor.kt") public void testClosureThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisInConstructor.kt"); } @TestMetadata("closureThisInExtLambdaInsideMethod.kt") public void testClosureThisInExtLambdaInsideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt"); } @TestMetadata("closureThisInFunctionWhichNamedSameAsParentClass.kt") public void testClosureThisInFunctionWhichNamedSameAsParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt"); } @TestMetadata("closureThisInLambdaInsideMethod.kt") public void testClosureThisInLambdaInsideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt"); } @TestMetadata("closureThisInLambdaInsideObject.kt") public void testClosureThisInLambdaInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt"); } @TestMetadata("closureThisInLocalFunction.kt") public void testClosureThisInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLocalFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureThisInLocalFunction.kt"); } @TestMetadata("closureValToScopeWithSameNameDeclaration.kt") public void testClosureValToScopeWithSameNameDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt"); } @TestMetadata("closureVarToScopeWithSameNameDeclaration.kt") public void testClosureVarToScopeWithSameNameDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt"); } @TestMetadata("deepInnerClassInLocalClass.kt") public void testDeepInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt"); } @TestMetadata("deepInnerClassInLocalClassFromExtension.kt") public void testDeepInnerClassInLocalClassFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt"); } @TestMetadata("enclosingClassFromInnerLocalClass.kt") public void testEnclosingClassFromInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/enclosingClassFromInnerLocalClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/enclosingClassFromInnerLocalClass.kt"); } @TestMetadata("enclosingClassFromLocalClass.kt") public void testEnclosingClassFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt"); } @TestMetadata("implicitGenericReceiverInExtensionInLocalClass.kt") public void testImplicitGenericReceiverInExtensionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt"); } @TestMetadata("iteratingCallbacks.kt") public void testIteratingCallbacks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/iteratingCallbacks.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/iteratingCallbacks.kt"); } @TestMetadata("lambdaInLocalFun.kt") public void testLambdaInLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/lambdaInLocalFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/lambdaInLocalFun.kt"); } @TestMetadata("localConstructorAndMethod.kt") public void testLocalConstructorAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/localConstructorAndMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/localConstructorAndMethod.kt"); } @TestMetadata("localParameterInCallback.kt") public void testLocalParameterInCallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/localParameterInCallback.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/localParameterInCallback.kt"); } @TestMetadata("objectWithInvokeOperator.kt") public void testObjectWithInvokeOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/objectWithInvokeOperator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/objectWithInvokeOperator.kt"); } @TestMetadata("recursiveExtFunction.kt") public void testRecursiveExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveExtFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/recursiveExtFunction.kt"); } @TestMetadata("recursiveFunction.kt") public void testRecursiveFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/recursiveFunction.kt"); } @TestMetadata("recursiveFunctionWithSameNameDeclaration.kt") public void testRecursiveFunctionWithSameNameDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt"); } @TestMetadata("withManyClosuresInNestedFunctionsAndObjects.kt") public void testWithManyClosuresInNestedFunctionsAndObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt"); } @TestMetadata("wrappedVariableInExtensionFun.kt") public void testWrappedVariableInExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt"); } } @@ -800,140 +714,122 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coercion extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCoercion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/coercion"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("bridgeChar.kt") public void testBridgeChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/bridgeChar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/bridgeChar.kt"); } @TestMetadata("charValParameter.kt") public void testCharValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/charValParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/charValParameter.kt"); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/classProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/classProperty.kt"); } @TestMetadata("defaultAccessors.kt") public void testDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/defaultAccessors.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/defaultAccessors.kt"); } @TestMetadata("derivedFunctionReturningChar.kt") public void testDerivedFunctionReturningChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/derivedFunctionReturningChar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/derivedFunctionReturningChar.kt"); } @TestMetadata("derivedFunctionReturningUnit.kt") public void testDerivedFunctionReturningUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/derivedFunctionReturningUnit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/derivedFunctionReturningUnit.kt"); } @TestMetadata("destructuringToUnit.kt") public void testDestructuringToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/destructuringToUnit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/destructuringToUnit.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/extensionReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/extensionReceiver.kt"); } @TestMetadata("ifWithUnit.kt") public void testIfWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/ifWithUnit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/ifWithUnit.kt"); } @TestMetadata("inlineFunReturningUnit.kt") public void testInlineFunReturningUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/inlineFunReturningUnit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/inlineFunReturningUnit.kt"); } @TestMetadata("lambdaParameters.kt") public void testLambdaParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/lambdaParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/lambdaParameters.kt"); } @TestMetadata("loopOverUnits.kt") public void testLoopOverUnits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/loopOverUnits.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/loopOverUnits.kt"); } @TestMetadata("propertyBridgeChar.kt") public void testPropertyBridgeChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/propertyBridgeChar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/propertyBridgeChar.kt"); } @TestMetadata("receiverSmartCast.kt") public void testReceiverSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/receiverSmartCast.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/receiverSmartCast.kt"); } @TestMetadata("safeCallLetReturningUnit.kt") public void testSafeCallLetReturningUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/safeCallLetReturningUnit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/safeCallLetReturningUnit.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/topLevelProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/topLevelProperty.kt"); } @TestMetadata("tryWithEmptyCatch.kt") public void testTryWithEmptyCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/tryWithEmptyCatch.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/tryWithEmptyCatch.kt"); } @TestMetadata("unitAsExtensionReceiver.kt") public void testUnitAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitAsExtensionReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/unitAsExtensionReceiver.kt"); } @TestMetadata("unitIsAs.kt") public void testUnitIsAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitIsAs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/unitIsAs.kt"); } @TestMetadata("unitNullCheck.kt") public void testUnitNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitNullCheck.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/unitNullCheck.kt"); } @TestMetadata("unitSafeCall.kt") public void testUnitSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitSafeCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/unitSafeCall.kt"); } @TestMetadata("whenWithUnit.kt") public void testWhenWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/whenWithUnit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coercion/whenWithUnit.kt"); } } @@ -941,26 +837,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/coroutines"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("debugStatement.kt") public void testDebugStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coroutines/debugStatement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coroutines/debugStatement.kt"); } @TestMetadata("localVarOptimization.kt") public void testLocalVarOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coroutines/localVarOptimization.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coroutines/localVarOptimization.kt"); } @TestMetadata("nativeExceptions.kt") public void testNativeExceptions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coroutines/nativeExceptions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/coroutines/nativeExceptions.kt"); } } @@ -968,104 +865,92 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CrossModuleRef extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCrossModuleRef() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/crossModuleRef"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callableObjectRef.kt") public void testCallableObjectRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/callableObjectRef.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/callableObjectRef.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/constructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/constructor.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inheritance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/inheritance.kt"); } @TestMetadata("inlineJsModule.kt") public void testInlineJsModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/inlineJsModule.kt"); } @TestMetadata("inlineJsModuleNonIdentifier.kt") public void testInlineJsModuleNonIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModuleNonIdentifier.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/inlineJsModuleNonIdentifier.kt"); } @TestMetadata("inlineJsModulePackage.kt") public void testInlineJsModulePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModulePackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/inlineJsModulePackage.kt"); } @TestMetadata("inlineModule.kt") public void testInlineModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/inlineModule.kt"); } @TestMetadata("inlineModuleNonIndentifier.kt") public void testInlineModuleNonIndentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineModuleNonIndentifier.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/inlineModuleNonIndentifier.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/lambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/lambda.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/object.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/object.kt"); } @TestMetadata("objectInInlineClosure.kt") public void testObjectInInlineClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/objectInInlineClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/objectInInlineClosure.kt"); } @TestMetadata("objectIsObject.kt") public void testObjectIsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/objectIsObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/objectIsObject.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelExtension.kt"); } @TestMetadata("topLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelFunction.kt"); } @TestMetadata("topLevelMutableProperty.kt") public void testTopLevelMutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelMutableProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelMutableProperty.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelProperty.kt"); } } @@ -1073,56 +958,52 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dataClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("components.kt") public void testComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/components.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/components.kt"); } @TestMetadata("copy.kt") public void testCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/copy.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/copy.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/equals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/equals.kt"); } @TestMetadata("hashcode.kt") public void testHashcode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/hashcode.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/hashcode.kt"); } @TestMetadata("keyrole.kt") public void testKeyrole() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/keyrole.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/keyrole.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/override.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/override.kt"); } @TestMetadata("privateFields.kt") public void testPrivateFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/privateFields.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/privateFields.kt"); } @TestMetadata("tostring.kt") public void testTostring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/tostring.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dataClass/tostring.kt"); } } @@ -1130,128 +1011,112 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/defaultArguments"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("complexExpressionAsConstructorDefaultArgument.kt") public void testComplexExpressionAsConstructorDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsConstructorDefaultArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/complexExpressionAsConstructorDefaultArgument.kt"); } @TestMetadata("complexExpressionAsDefaultArgument.kt") public void testComplexExpressionAsDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt"); } @TestMetadata("complexExpressionAsOverriddenDefaultArgument.kt") public void testComplexExpressionAsOverriddenDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsOverriddenDefaultArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/complexExpressionAsOverriddenDefaultArgument.kt"); } @TestMetadata("constructorCallWithDefArg1.kt") public void testConstructorCallWithDefArg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt"); } @TestMetadata("constructorCallWithDefArg2.kt") public void testConstructorCallWithDefArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt"); } @TestMetadata("defArgsWithSuperCall.kt") public void testDefArgsWithSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt"); } @TestMetadata("defaultArgumentsInFunctionWithExpressionAsBody.kt") public void testDefaultArgumentsInFunctionWithExpressionAsBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt"); } @TestMetadata("enumSuperConstructor.kt") public void testEnumSuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt"); } @TestMetadata("enumWithDefArg.kt") public void testEnumWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt"); } @TestMetadata("enumWithOneDefArg.kt") public void testEnumWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt"); } @TestMetadata("enumWithTwoDefArgs.kt") public void testEnumWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt"); } @TestMetadata("extensionFunWithDefArgs.kt") public void testExtensionFunWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt"); } @TestMetadata("funInAbstractClassWithDefArg.kt") public void testFunInAbstractClassWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt"); } @TestMetadata("inheritViaAnotherInterface.kt") public void testInheritViaAnotherInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterface.kt"); } @TestMetadata("inheritViaAnotherInterfaceIndirectly.kt") public void testInheritViaAnotherInterfaceIndirectly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterfaceIndirectly.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterfaceIndirectly.kt"); } @TestMetadata("overloadFunWithDefArg.kt") public void testOverloadFunWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt"); } @TestMetadata("primarySuperConstructor.kt") public void testPrimarySuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt"); } @TestMetadata("secondarySuperConstructor.kt") public void testSecondarySuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/superCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/superCall.kt"); } @TestMetadata("virtualCallWithDefArg.kt") public void testVirtualCallWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt"); } } @@ -1259,146 +1124,127 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegateProperty extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDelegateProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegateProperty"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("capturedLocalVal.kt") public void testCapturedLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt"); } @TestMetadata("capturedLocalValNoInline.kt") public void testCapturedLocalValNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt"); } @TestMetadata("capturedLocalVar.kt") public void testCapturedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt"); } @TestMetadata("capturedLocalVarNoInline.kt") public void testCapturedLocalVarNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt"); } @TestMetadata("clashingNameInSubclass.kt") public void testClashingNameInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/clashingNameInSubclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/clashingNameInSubclass.kt"); } @TestMetadata("delegateByExtensionProperty.kt") public void testDelegateByExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt"); } @TestMetadata("delegateByTopLevelFun.kt") public void testDelegateByTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt"); } @TestMetadata("delegateByTopLevelProperty.kt") public void testDelegateByTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt"); } @TestMetadata("delegateWithPropertyAccess.kt") public void testDelegateWithPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt"); } @TestMetadata("getAsExtensionFun.kt") public void testGetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/localVar.kt"); } @TestMetadata("localVarInc.kt") public void testLocalVarInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVarInc.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/localVarInc.kt"); } @TestMetadata("localVarPlusAssign.kt") public void testLocalVarPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt"); } @TestMetadata("metadataReferentialEquality.kt") public void testMetadataReferentialEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/metadataReferentialEquality.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/metadataReferentialEquality.kt"); } @TestMetadata("peculiarName.kt") public void testPeculiarName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/peculiarName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/peculiarName.kt"); } @TestMetadata("propertyMetadata.kt") public void testPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/propertyMetadata.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/propertyMetadata.kt"); } @TestMetadata("setAsExtensionFun.kt") public void testSetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/simple.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/topLevelVal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/topLevelVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/topLevelVar.kt"); } @TestMetadata("unusedPropertyMetadata.kt") public void testUnusedPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt"); } @TestMetadata("withGenerics.kt") public void testWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/withGenerics.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegateProperty/withGenerics.kt"); } } @@ -1406,134 +1252,117 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("complexDelegation.kt") public void testComplexDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/complexDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/complexDelegation.kt"); } @TestMetadata("delegation2.kt") public void testDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegation2.kt"); } @TestMetadata("delegation3.kt") public void testDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation3.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegation3.kt"); } @TestMetadata("delegation4.kt") public void testDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation4.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegation4.kt"); } @TestMetadata("delegationByArg.kt") public void testDelegationByArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationByArg.kt"); } @TestMetadata("delegationByExprWithArgs.kt") public void testDelegationByExprWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt"); } @TestMetadata("delegationByFunExpr.kt") public void testDelegationByFunExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByFunExpr.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationByFunExpr.kt"); } @TestMetadata("delegationByIfExpr.kt") public void testDelegationByIfExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByIfExpr.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationByIfExpr.kt"); } @TestMetadata("delegationByInh.kt") public void testDelegationByInh() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByInh.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationByInh.kt"); } @TestMetadata("delegationByNewInstance.kt") public void testDelegationByNewInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByNewInstance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationByNewInstance.kt"); } @TestMetadata("delegationChain.kt") public void testDelegationChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationChain.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationChain.kt"); } @TestMetadata("delegationEvaluationOrder1.kt") public void testDelegationEvaluationOrder1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt"); } @TestMetadata("delegationEvaluationOrder2.kt") public void testDelegationEvaluationOrder2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt"); } @TestMetadata("delegationExtFun1.kt") public void testDelegationExtFun1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtFun1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationExtFun1.kt"); } @TestMetadata("delegationExtFun2.kt") public void testDelegationExtFun2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtFun2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationExtFun2.kt"); } @TestMetadata("delegationExtProp.kt") public void testDelegationExtProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtProp.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationExtProp.kt"); } @TestMetadata("delegationExtensionPropertyDelegated.kt") public void testDelegationExtensionPropertyDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt"); } @TestMetadata("delegationGenericArg.kt") public void testDelegationGenericArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationGenericArg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationGenericArg.kt"); } @TestMetadata("delegationMethodsWithArgs.kt") public void testDelegationMethodsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt"); } @TestMetadata("jsNamePropertyDelegation.kt") public void testJsNamePropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/jsNamePropertyDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/jsNamePropertyDelegation.kt"); } @TestMetadata("onObject.kt") public void testOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/onObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/delegation/onObject.kt"); } } @@ -1541,128 +1370,112 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Dynamic extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDynamic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dynamic"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("binaryOperations.kt") public void testBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/binaryOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/binaryOperations.kt"); } @TestMetadata("callGetMethod.kt") public void testCallGetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/callGetMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/callGetMethod.kt"); } @TestMetadata("callMethods.kt") public void testCallMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/callMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/callMethods.kt"); } @TestMetadata("callSetMethod.kt") public void testCallSetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/callSetMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/callSetMethod.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/compareTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/compareTo.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/equals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/equals.kt"); } @TestMetadata("getByBrackets.kt") public void testGetByBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/getByBrackets.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/getByBrackets.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/identityEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/identityEquals.kt"); } @TestMetadata("incrementAndDecrement.kt") public void testIncrementAndDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/incrementAndDecrement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/incrementAndDecrement.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/infixCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/infixCall.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/invoke.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/invoke.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/is.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/is.kt"); } @TestMetadata("isJsPrimitiveType.kt") public void testIsJsPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/isJsPrimitiveType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/isJsPrimitiveType.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/iterator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/iterator.kt"); } @TestMetadata("nameClashing.kt") public void testNameClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/nameClashing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/nameClashing.kt"); } @TestMetadata("operationsWithAssignment.kt") public void testOperationsWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/operationsWithAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/operationsWithAssignment.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/propertyAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/propertyAccess.kt"); } @TestMetadata("propertySideEffect.kt") public void testPropertySideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/propertySideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/propertySideEffect.kt"); } @TestMetadata("setByBrackets.kt") public void testSetByBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/setByBrackets.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/setByBrackets.kt"); } @TestMetadata("unaryOperations.kt") public void testUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/unaryOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/dynamic/unaryOperations.kt"); } } @@ -1670,10 +1483,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessing.kt") public void testAccessing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/accessing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/accessing.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -1682,68 +1498,57 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("enumInheritedFromTrait.kt") public void testEnumInheritedFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumInheritedFromTrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/enumInheritedFromTrait.kt"); } @TestMetadata("enumIsComparable.kt") public void testEnumIsComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumIsComparable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/enumIsComparable.kt"); } @TestMetadata("enumWithInheritance.kt") public void testEnumWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumWithInheritance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/enumWithInheritance.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/equals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/equals.kt"); } @TestMetadata("equalsNullUndefined.kt") public void testEqualsNullUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/equalsNullUndefined.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/equalsNullUndefined.kt"); } @TestMetadata("implementsComparable.kt") public void testImplementsComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/implementsComparable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/implementsComparable.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/initializationOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/initializationOrder.kt"); } @TestMetadata("nativeEnum.kt") public void testNativeEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/nativeEnum.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/nativeEnum.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/simpleEnum.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/simpleEnum.kt"); } @TestMetadata("standardMethods.kt") public void testStandardMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/standardMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/standardMethods.kt"); } @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/superCallInEnumLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/enum/superCallInEnumLiteral.kt"); } } @@ -1751,182 +1556,157 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Examples extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExamples() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/examples"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("basicmethod.kt") public void testBasicmethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/basicmethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/basicmethod.kt"); } @TestMetadata("basicproperty.kt") public void testBasicproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/basicproperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/basicproperty.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/classObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/classObject.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/closureWithParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/closureWithParameterAndBoxing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/closureWithParameterAndBoxing.kt"); } @TestMetadata("doubleEnclosedLocalVariable.kt") public void testDoubleEnclosedLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/doubleEnclosedLocalVariable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/doubleEnclosedLocalVariable.kt"); } @TestMetadata("enclosed.kt") public void testEnclosed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/enclosed.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/enclosed.kt"); } @TestMetadata("enclosingLocalVariable.kt") public void testEnclosingLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/enclosingLocalVariable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/enclosingLocalVariable.kt"); } @TestMetadata("extensionClosure.kt") public void testExtensionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/extensionClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/extensionClosure.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/funDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/funDelegation.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/incrementProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/incrementProperty.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/inheritance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/inheritance.kt"); } @TestMetadata("inheritedInnerClass.kt") public void testInheritedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/inheritedInnerClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/inheritedInnerClass.kt"); } @TestMetadata("inheritedMethod.kt") public void testInheritedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/inheritedMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/inheritedMethod.kt"); } @TestMetadata("initializerBlock.kt") public void testInitializerBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/initializerBlock.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/initializerBlock.kt"); } @TestMetadata("initializerBlockDImpl.kt") public void testInitializerBlockDImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/initializerBlockDImpl.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/initializerBlockDImpl.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/innerClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/innerClass.kt"); } @TestMetadata("kt242.kt") public void testKt242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/kt242.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/kt242.kt"); } @TestMetadata("newInstanceDefaultConstructor.kt") public void testNewInstanceDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/newInstanceDefaultConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/newInstanceDefaultConstructor.kt"); } @TestMetadata("overloadBinaryOperator.kt") public void testOverloadBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadBinaryOperator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/overloadBinaryOperator.kt"); } @TestMetadata("overloadPlusAssignReturn.kt") public void testOverloadPlusAssignReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt"); } @TestMetadata("overloadPlusToPlusAssign.kt") public void testOverloadPlusToPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt"); } @TestMetadata("overloadUnaryOperator.kt") public void testOverloadUnaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadUnaryOperator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/overloadUnaryOperator.kt"); } @TestMetadata("propertyDelegation.kt") public void testPropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/propertyDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/propertyDelegation.kt"); } @TestMetadata("propertyInInitializer.kt") public void testPropertyInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/propertyInInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/propertyInInitializer.kt"); } @TestMetadata("rightHandOverride.kt") public void testRightHandOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/rightHandOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/rightHandOverride.kt"); } @TestMetadata("simplestClosure.kt") public void testSimplestClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/simplestClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/simplestClosure.kt"); } @TestMetadata("simplestClosureAndBoxing.kt") public void testSimplestClosureAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/simplestClosureAndBoxing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/simplestClosureAndBoxing.kt"); } @TestMetadata("traitproperty.kt") public void testTraitproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/traitproperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/traitproperty.kt"); } } @@ -1934,6 +1714,10 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @@ -1942,170 +1726,147 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/cast"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("castExtensionToKMutableProperty.kt") public void testCastExtensionToKMutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castExtensionToKMutableProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castExtensionToKMutableProperty.kt"); } @TestMetadata("castExtensionToKProperty1.kt") public void testCastExtensionToKProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castExtensionToKProperty1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castExtensionToKProperty1.kt"); } @TestMetadata("castToAny.kt") public void testCastToAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToAny.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToAny.kt"); } @TestMetadata("castToArray.kt") public void testCastToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToArray.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToArray.kt"); } @TestMetadata("castToFunction.kt") public void testCastToFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToFunction.kt"); } @TestMetadata("castToGenericType.kt") public void testCastToGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToGenericType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToGenericType.kt"); } @TestMetadata("castToGenericTypeWithMultipleUpperBounds.kt") public void testCastToGenericTypeWithMultipleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToGenericTypeWithMultipleUpperBounds.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToGenericTypeWithMultipleUpperBounds.kt"); } @TestMetadata("castToGenericTypeWithUpperBound.kt") public void testCastToGenericTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToGenericTypeWithUpperBound.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToGenericTypeWithUpperBound.kt"); } @TestMetadata("castToKMutableProperty0.kt") public void testCastToKMutableProperty0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKMutableProperty0.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToKMutableProperty0.kt"); } @TestMetadata("castToKMutableProperty1.kt") public void testCastToKMutableProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKMutableProperty1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToKMutableProperty1.kt"); } @TestMetadata("castToKProperty0.kt") public void testCastToKProperty0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKProperty0.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToKProperty0.kt"); } @TestMetadata("castToKProperty1.kt") public void testCastToKProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKProperty1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToKProperty1.kt"); } @TestMetadata("castToNotNull.kt") public void testCastToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToNotNull.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToNotNull.kt"); } @TestMetadata("castToNullable.kt") public void testCastToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToNullable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/castToNullable.kt"); } @TestMetadata("explicitUpcast.kt") public void testExplicitUpcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/explicitUpcast.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/explicitUpcast.kt"); } @TestMetadata("implicitCastToLong.kt") public void testImplicitCastToLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/implicitCastToLong.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/implicitCastToLong.kt"); } @TestMetadata("primitiveToClass.kt") public void testPrimitiveToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/primitiveToClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/primitiveToClass.kt"); } @TestMetadata("reifiedToNotNull.kt") public void testReifiedToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/reifiedToNotNull.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/reifiedToNotNull.kt"); } @TestMetadata("reifiedToNullable1.kt") public void testReifiedToNullable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/reifiedToNullable1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/reifiedToNullable1.kt"); } @TestMetadata("reifiedToNullable2.kt") public void testReifiedToNullable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/reifiedToNullable2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/reifiedToNullable2.kt"); } @TestMetadata("safeCastToGenericTypeWithUpperBound.kt") public void testSafeCastToGenericTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToGenericTypeWithUpperBound.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/safeCastToGenericTypeWithUpperBound.kt"); } @TestMetadata("safeCastToNotNull.kt") public void testSafeCastToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToNotNull.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/safeCastToNotNull.kt"); } @TestMetadata("safeCastToNullable.kt") public void testSafeCastToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToNullable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/safeCastToNullable.kt"); } @TestMetadata("safeCastToReifiedNotNull.kt") public void testSafeCastToReifiedNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToReifiedNotNull.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/safeCastToReifiedNotNull.kt"); } @TestMetadata("safeCastToReifiedNullable.kt") public void testSafeCastToReifiedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToReifiedNullable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/safeCastToReifiedNullable.kt"); } @TestMetadata("smartCastInExtensionFunction.kt") public void testSmartCastInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/smartCastInExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/smartCastInExtensionFunction.kt"); } @TestMetadata("smartCastInFunction.kt") public void testSmartCastInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/smartCastInFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/cast/smartCastInFunction.kt"); } } @@ -2113,20 +1874,22 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompareTo extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCompareTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/compareTo"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("booleanCompareTo.kt") public void testBooleanCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/compareTo/booleanCompareTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/compareTo/booleanCompareTo.kt"); } @TestMetadata("customCompareToMethod.kt") public void testCustomCompareToMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/compareTo/customCompareToMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/compareTo/customCompareToMethod.kt"); } } @@ -2134,14 +1897,17 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DollarParameter extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDollarParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/dollarParameter"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("dollarParameter.kt") public void testDollarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/dollarParameter/dollarParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/dollarParameter/dollarParameter.kt"); } } @@ -2149,86 +1915,77 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/equals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/arrays.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/arrays.kt"); } @TestMetadata("compareNullableListWithNull.kt") public void testCompareNullableListWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt"); } @TestMetadata("compareNullablesWithCustomEquals.kt") public void testCompareNullablesWithCustomEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/compareNullablesWithCustomEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/compareNullablesWithCustomEquals.kt"); } @TestMetadata("compareToNullWithCustomEquals.kt") public void testCompareToNullWithCustomEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/compareToNullWithCustomEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/compareToNullWithCustomEquals.kt"); } @TestMetadata("customEqualsMethod.kt") public void testCustomEqualsMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/customEqualsMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/customEqualsMethod.kt"); } @TestMetadata("customEqualsMethodOnAny.kt") public void testCustomEqualsMethodOnAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/customEqualsMethodOnAny.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/customEqualsMethodOnAny.kt"); } @TestMetadata("equalsBehaviorOnNull.kt") public void testEqualsBehaviorOnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/equalsBehaviorOnNull.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/equalsBehaviorOnNull.kt"); } @TestMetadata("equalsNullOrUndefined.kt") public void testEqualsNullOrUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/equalsNullOrUndefined.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/equalsNullOrUndefined.kt"); } @TestMetadata("explicitEqualsMethod.kt") public void testExplicitEqualsMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/explicitEqualsMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/explicitEqualsMethod.kt"); } @TestMetadata("explicitEqualsMethodForPrimitives.kt") public void testExplicitEqualsMethodForPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/explicitEqualsMethodForPrimitives.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/explicitEqualsMethodForPrimitives.kt"); } @TestMetadata("kt2370.kt") public void testKt2370() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/kt2370.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/kt2370.kt"); } @TestMetadata("stringsEqual.kt") public void testStringsEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/stringsEqual.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/stringsEqual.kt"); } @TestMetadata("superEquals.kt") public void testSuperEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/superEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/superEquals.kt"); } } @@ -2236,10 +1993,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluationOrder extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("2dangerousInExpression.kt") public void test2dangerousInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/2dangerousInExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/2dangerousInExpression.kt"); } public void testAllFilesPresentInEvaluationOrder() throws Exception { @@ -2248,200 +2008,167 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("andAndWithBreakContinueReturn.kt") public void testAndAndWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/andAndWithBreakContinueReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/andAndWithBreakContinueReturn.kt"); } @TestMetadata("andAndWithSideEffect.kt") public void testAndAndWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/andAndWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/andAndWithSideEffect.kt"); } @TestMetadata("andAndWithTmpVarRhs.kt") public void testAndAndWithTmpVarRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt"); } @TestMetadata("assignToArrayElementWithSideEffect.kt") public void testAssignToArrayElementWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); } @TestMetadata("assignToDotQualifiedWithSideEffect.kt") public void testAssignToDotQualifiedWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); } @TestMetadata("booleanAndOr.kt") public void testBooleanAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/booleanAndOr.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/booleanAndOr.kt"); } @TestMetadata("callArgs.kt") public void testCallArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/callArgs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/callArgs.kt"); } @TestMetadata("callVarargs.kt") public void testCallVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt"); } @TestMetadata("callWithBreakContinueReturn.kt") public void testCallWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/callWithBreakContinueReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/callWithBreakContinueReturn.kt"); } @TestMetadata("castWithBreakContinueReturn.kt") public void testCastWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/castWithBreakContinueReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/castWithBreakContinueReturn.kt"); } @TestMetadata("compareToIntrinsicWithSideEffect.kt") public void testCompareToIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/compareToIntrinsicWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/compareToIntrinsicWithSideEffect.kt"); } @TestMetadata("dangerousInline.kt") public void testDangerousInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/dangerousInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/dangerousInline.kt"); } @TestMetadata("dangerousInsideDangerous.kt") public void testDangerousInsideDangerous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/dangerousInsideDangerous.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/dangerousInsideDangerous.kt"); } @TestMetadata("elvisComplex.kt") public void testElvisComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/elvisComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/elvisComplex.kt"); } @TestMetadata("elvisWithBreakContinueReturn.kt") public void testElvisWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/elvisWithBreakContinueReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/elvisWithBreakContinueReturn.kt"); } @TestMetadata("equalsIntrinsicWithSideEffect.kt") public void testEqualsIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/equalsIntrinsicWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/equalsIntrinsicWithSideEffect.kt"); } @TestMetadata("evaluationOrder1.kt") public void testEvaluationOrder1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder1.kt"); } @TestMetadata("evaluationOrder2.kt") public void testEvaluationOrder2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder2.kt"); } @TestMetadata("ifAsFunArgument.kt") public void testIfAsFunArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/ifAsFunArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/ifAsFunArgument.kt"); } @TestMetadata("ifAsPlusArgument.kt") public void testIfAsPlusArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/ifAsPlusArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/ifAsPlusArgument.kt"); } @TestMetadata("ifWithComplex.kt") public void testIfWithComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/ifWithComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/ifWithComplex.kt"); } @TestMetadata("intrinsicComplex.kt") public void testIntrinsicComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/intrinsicComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/intrinsicComplex.kt"); } @TestMetadata("intrinsicWithBreakContinueReturn.kt") public void testIntrinsicWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt"); } @TestMetadata("literalFunctionAsArgumentWithSideEffect.kt") public void testLiteralFunctionAsArgumentWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/literalFunctionAsArgumentWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/literalFunctionAsArgumentWithSideEffect.kt"); } @TestMetadata("loopWithBreakContinueReturnInCondition.kt") public void testLoopWithBreakContinueReturnInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/loopWithBreakContinueReturnInCondition.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/loopWithBreakContinueReturnInCondition.kt"); } @TestMetadata("orOrWithBreakContinueReturn.kt") public void testOrOrWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/orOrWithBreakContinueReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithBreakContinueReturn.kt"); } @TestMetadata("orOrWithSideEffect.kt") public void testOrOrWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); } @TestMetadata("reassignmentLhsCaching.kt") public void testReassignmentLhsCaching() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); } @TestMetadata("secondaryConstructorTemporaryVars.kt") public void testSecondaryConstructorTemporaryVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/secondaryConstructorTemporaryVars.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/secondaryConstructorTemporaryVars.kt"); } @TestMetadata("singleComponentDestructuring.kt") public void testSingleComponentDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/singleComponentDestructuring.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/singleComponentDestructuring.kt"); } @TestMetadata("whenAsMinusArgument.kt") public void testWhenAsMinusArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/whenAsMinusArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/whenAsMinusArgument.kt"); } @TestMetadata("whenJsLiteralWithSideEffect.kt") public void testWhenJsLiteralWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/whenJsLiteralWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/whenJsLiteralWithSideEffect.kt"); } @TestMetadata("whenWithComplexConditions.kt") public void testWhenWithComplexConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/whenWithComplexConditions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/whenWithComplexConditions.kt"); } } @@ -2449,98 +2176,87 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class For extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/for"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forIteratesOverArray.kt") public void testForIteratesOverArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverArray.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverArray.kt"); } @TestMetadata("forIteratesOverLiteralRange.kt") public void testForIteratesOverLiteralRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverLiteralRange.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverLiteralRange.kt"); } @TestMetadata("forIteratesOverNonLiteralRange.kt") public void testForIteratesOverNonLiteralRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverNonLiteralRange.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverNonLiteralRange.kt"); } @TestMetadata("forIteratesOverSomethingWithIterator.kt") public void testForIteratesOverSomethingWithIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverSomethingWithIterator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverSomethingWithIterator.kt"); } @TestMetadata("forIteratesOverTypeParameter.kt") public void testForIteratesOverTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt"); } @TestMetadata("forOnEmptyArray.kt") public void testForOnEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forOnEmptyArray.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forOnEmptyArray.kt"); } @TestMetadata("forWithComplexOneStatement.kt") public void testForWithComplexOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forWithComplexOneStatement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forWithComplexOneStatement.kt"); } @TestMetadata("forWithEmptyBody.kt") public void testForWithEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forWithEmptyBody.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forWithEmptyBody.kt"); } @TestMetadata("forWithSideEffectImElementAccessAndWithEmptyBody.kt") public void testForWithSideEffectImElementAccessAndWithEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt"); } @TestMetadata("labeledFor.kt") public void testLabeledFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/labeledFor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/labeledFor.kt"); } @TestMetadata("labeledForWithContinue.kt") public void testLabeledForWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/labeledForWithContinue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/labeledForWithContinue.kt"); } @TestMetadata("labeledForWithWhile.kt") public void testLabeledForWithWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/labeledForWithWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/labeledForWithWhile.kt"); } @TestMetadata("overArrayWithIndex.kt") public void testOverArrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/overArrayWithIndex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/overArrayWithIndex.kt"); } @TestMetadata("overCollectionWithIndex.kt") public void testOverCollectionWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/overCollectionWithIndex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/overCollectionWithIndex.kt"); } @TestMetadata("rangeOptimization.kt") public void testRangeOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/rangeOptimization.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/for/rangeOptimization.kt"); } } @@ -2548,10 +2264,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("adderClosure.kt") public void testAdderClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/adderClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/adderClosure.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -2560,194 +2279,162 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("anonymousWithLambda.kt") public void testAnonymousWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/anonymousWithLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/anonymousWithLambda.kt"); } @TestMetadata("callFunInInit.kt") public void testCallFunInInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/callFunInInit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/callFunInInit.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/closureWithParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/closureWithParameterAndBoxing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/closureWithParameterAndBoxing.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/defaultParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/defaultParameters.kt"); } @TestMetadata("enclosingThis.kt") public void testEnclosingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/enclosingThis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/enclosingThis.kt"); } @TestMetadata("expressionAsExtFunction.kt") public void testExpressionAsExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/expressionAsExtFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/expressionAsExtFunction.kt"); } @TestMetadata("expressionAsFunction.kt") public void testExpressionAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/expressionAsFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/expressionAsFunction.kt"); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionExpression.kt"); } @TestMetadata("functionInsideFunction.kt") public void testFunctionInsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionInsideFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionInsideFunction.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionLiteral.kt"); } @TestMetadata("functionLiteralAsLastParameter.kt") public void testFunctionLiteralAsLastParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionLiteralAsLastParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionLiteralAsLastParameter.kt"); } @TestMetadata("functionLiteralAsParameter.kt") public void testFunctionLiteralAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionLiteralAsParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionLiteralAsParameter.kt"); } @TestMetadata("functionUsedBeforeDeclaration.kt") public void testFunctionUsedBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionUsedBeforeDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionUsedBeforeDeclaration.kt"); } @TestMetadata("functionWithTwoParametersCall.kt") public void testFunctionWithTwoParametersCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionWithTwoParametersCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/functionWithTwoParametersCall.kt"); } @TestMetadata("implicitItParameter.kt") public void testImplicitItParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/implicitItParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/implicitItParameter.kt"); } @TestMetadata("KT-921.kt") public void testKT_921() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/KT-921.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/KT-921.kt"); } @TestMetadata("lambdaOrLocalFunInsideEnumMethod.kt") public void testLambdaOrLocalFunInsideEnumMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/lambdaOrLocalFunInsideEnumMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/lambdaOrLocalFunInsideEnumMethod.kt"); } @TestMetadata("localExtFunction.kt") public void testLocalExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/localExtFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/localExtFunction.kt"); } @TestMetadata("localInInitBlock.kt") public void testLocalInInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/localInInitBlock.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/localInInitBlock.kt"); } @TestMetadata("loopClosure.kt") public void testLoopClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/loopClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/loopClosure.kt"); } @TestMetadata("mangling.kt") public void testMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/mangling.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/mangling.kt"); } @TestMetadata("manglingAnyMethods.kt") public void testManglingAnyMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingAnyMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/manglingAnyMethods.kt"); } @TestMetadata("manglingClashFunctionsAndClasses.kt") public void testManglingClashFunctionsAndClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingClashFunctionsAndClasses.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/manglingClashFunctionsAndClasses.kt"); } @TestMetadata("manglingClashWithFunctionsWithoutParameters.kt") public void testManglingClashWithFunctionsWithoutParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingClashWithFunctionsWithoutParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/manglingClashWithFunctionsWithoutParameters.kt"); } @TestMetadata("manglingStability.kt") public void testManglingStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingStability.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/manglingStability.kt"); } @TestMetadata("namedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/namedArguments.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/namedArguments.kt"); } @TestMetadata("overloadClassConstructorByFactoryMethod.kt") public void testOverloadClassConstructorByFactoryMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/overloadClassConstructorByFactoryMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/overloadClassConstructorByFactoryMethod.kt"); } @TestMetadata("overloadOverridenFun.kt") public void testOverloadOverridenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/overloadOverridenFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/overloadOverridenFun.kt"); } @TestMetadata("overloadingWithInheritance.kt") public void testOverloadingWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/overloadingWithInheritance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/overloadingWithInheritance.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/vararg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/vararg.kt"); } @TestMetadata("whenFunction.kt") public void testWhenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/whenFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/function/whenFunction.kt"); } } @@ -2755,26 +2442,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IdentifierClash extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIdentifierClash() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identifierClash"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("overloadedFun.kt") public void testOverloadedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identifierClash/overloadedFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identifierClash/overloadedFun.kt"); } @TestMetadata("privateDeclarations.kt") public void testPrivateDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identifierClash/privateDeclarations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identifierClash/privateDeclarations.kt"); } @TestMetadata("useVariableOfNameOfFunction.kt") public void testUseVariableOfNameOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identifierClash/useVariableOfNameOfFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identifierClash/useVariableOfNameOfFunction.kt"); } } @@ -2782,20 +2470,22 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IdentityEquals extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIdentityEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identityEquals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("identityEqualsMethod.kt") public void testIdentityEqualsMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethod.kt"); } @TestMetadata("identityEqualsMethodForPrimitives.kt") public void testIdentityEqualsMethodForPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethodForPrimitives.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethodForPrimitives.kt"); } } @@ -2803,38 +2493,37 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class If extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/if"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("ifElseAsExpressionWithThrow.kt") public void testIfElseAsExpressionWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/ifElseAsExpressionWithThrow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/if/ifElseAsExpressionWithThrow.kt"); } @TestMetadata("ifElseCurlyBraces.kt") public void testIfElseCurlyBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/ifElseCurlyBraces.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/if/ifElseCurlyBraces.kt"); } @TestMetadata("ifInsideLambda.kt") public void testIfInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/ifInsideLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/if/ifInsideLambda.kt"); } @TestMetadata("nestedIf.kt") public void testNestedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/nestedIf.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/if/nestedIf.kt"); } @TestMetadata("withEmptyBlocks.kt") public void testWithEmptyBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/withEmptyBlocks.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/if/withEmptyBlocks.kt"); } } @@ -2842,80 +2531,72 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/invoke"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("explicitInvokeLambda.kt") public void testExplicitInvokeLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/explicitInvokeLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/explicitInvokeLambda.kt"); } @TestMetadata("extensionInvoke.kt") public void testExtensionInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/extensionInvoke.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/extensionInvoke.kt"); } @TestMetadata("inheritFromFunctionTraits.kt") public void testInheritFromFunctionTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/inheritFromFunctionTraits.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/inheritFromFunctionTraits.kt"); } @TestMetadata("internalFunctionFromSuperclass.kt") public void testInternalFunctionFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt"); } @TestMetadata("invokeInExtensionFunctionLiteral.kt") public void testInvokeInExtensionFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeInExtensionFunctionLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeInExtensionFunctionLiteral.kt"); } @TestMetadata("invokeInFunctionLiteral.kt") public void testInvokeInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeInFunctionLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeInFunctionLiteral.kt"); } @TestMetadata("invokeMethod.kt") public void testInvokeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeMethod.kt"); } @TestMetadata("invokeOnExprByConvention.kt") public void testInvokeOnExprByConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeOnExprByConvention.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeOnExprByConvention.kt"); } @TestMetadata("invokeWithDispatchAndExtensionReceivers.kt") public void testInvokeWithDispatchAndExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithDispatchAndExtensionReceivers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithDispatchAndExtensionReceivers.kt"); } @TestMetadata("invokeWithDispatchReceiver.kt") public void testInvokeWithDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithDispatchReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithDispatchReceiver.kt"); } @TestMetadata("invokeWithExtensionReceiver.kt") public void testInvokeWithExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithExtensionReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithExtensionReceiver.kt"); } @TestMetadata("invokeWithImplicitDispatchReceiverAndExtensionReceiver.kt") public void testInvokeWithImplicitDispatchReceiverAndExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithImplicitDispatchReceiverAndExtensionReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithImplicitDispatchReceiverAndExtensionReceiver.kt"); } } @@ -2923,254 +2604,217 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Misc extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMisc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/misc"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classWithoutPackage.kt") public void testClassWithoutPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/classWithoutPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/classWithoutPackage.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/elvis.kt"); } @TestMetadata("elvisReturnNested.kt") public void testElvisReturnNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvisReturnNested.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/elvisReturnNested.kt"); } @TestMetadata("elvisReturnSimple.kt") public void testElvisReturnSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt"); } @TestMetadata("elvisWithThrow.kt") public void testElvisWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvisWithThrow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/elvisWithThrow.kt"); } @TestMetadata("exclExcl.kt") public void testExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/exclExcl.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/exclExcl.kt"); } @TestMetadata("exclExclResultIsComputedOnce.kt") public void testExclExclResultIsComputedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/exclExclResultIsComputedOnce.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/exclExclResultIsComputedOnce.kt"); } @TestMetadata("exclExclThrows.kt") public void testExclExclThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/exclExclThrows.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/exclExclThrows.kt"); } @TestMetadata("extensionLiteralCalledInsideExtensionFunction.kt") public void testExtensionLiteralCalledInsideExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/extensionLiteralCalledInsideExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/extensionLiteralCalledInsideExtensionFunction.kt"); } @TestMetadata("extensionLiteralCreatedAtPackageLevel.kt") public void testExtensionLiteralCreatedAtPackageLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/extensionLiteralCreatedAtPackageLevel.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/extensionLiteralCreatedAtPackageLevel.kt"); } @TestMetadata("funInConstructor.kt") public void testFunInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/funInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/funInConstructor.kt"); } @TestMetadata("funInConstructorBlock.kt") public void testFunInConstructorBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/funInConstructorBlock.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/funInConstructorBlock.kt"); } @TestMetadata("inheritFromJetIterator.kt") public void testInheritFromJetIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/inheritFromJetIterator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/inheritFromJetIterator.kt"); } @TestMetadata("intRange.kt") public void testIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/intRange.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/intRange.kt"); } @TestMetadata("KT-1052.kt") public void testKT_1052() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1052.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-1052.kt"); } @TestMetadata("KT-1052-2.kt") public void testKT_1052_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1052-2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-1052-2.kt"); } @TestMetadata("KT-1361-1.kt") public void testKT_1361_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1361-1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-1361-1.kt"); } @TestMetadata("KT-1361-2.kt") public void testKT_1361_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1361-2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-1361-2.kt"); } @TestMetadata("KT-1865.kt") public void testKT_1865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1865.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-1865.kt"); } @TestMetadata("KT-2314.kt") public void testKT_2314() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-2314.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-2314.kt"); } @TestMetadata("KT-5058.kt") public void testKT_5058() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-5058.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-5058.kt"); } @TestMetadata("KT-740.kt") public void testKT_740() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-740.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-740.kt"); } @TestMetadata("KT-740-2.kt") public void testKT_740_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-740-2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-740-2.kt"); } @TestMetadata("KT-740-3.kt") public void testKT_740_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-740-3.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-740-3.kt"); } @TestMetadata("KT-817.kt") public void testKT_817() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-817.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-817.kt"); } @TestMetadata("kt9443.kt") public void testKt9443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/kt9443.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/kt9443.kt"); } @TestMetadata("lazyProperty.kt") public void testLazyProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/lazyProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/lazyProperty.kt"); } @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/localProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/localProperty.kt"); } @TestMetadata("localVarAsFunction.kt") public void testLocalVarAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/localVarAsFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/localVarAsFunction.kt"); } @TestMetadata("packageLevelVarInPackage.kt") public void testPackageLevelVarInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/packageLevelVarInPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/packageLevelVarInPackage.kt"); } @TestMetadata("packageLevelVarInRoot.kt") public void testPackageLevelVarInRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/packageLevelVarInRoot.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/packageLevelVarInRoot.kt"); } @TestMetadata("packagePropertyCalledAsFun.kt") public void testPackagePropertyCalledAsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/packagePropertyCalledAsFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/packagePropertyCalledAsFun.kt"); } @TestMetadata("propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt") public void testPropertiesWithExplicitlyDefinedAccessorsWithoutBodies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt"); } @TestMetadata("propertyAsFunCalledOnConstructor.kt") public void testPropertyAsFunCalledOnConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/propertyAsFunCalledOnConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/propertyAsFunCalledOnConstructor.kt"); } @TestMetadata("rightAssocForGeneratedConditionalOperator.kt") public void testRightAssocForGeneratedConditionalOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/rightAssocForGeneratedConditionalOperator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/rightAssocForGeneratedConditionalOperator.kt"); } @TestMetadata("safeCallComputesExpressionOnlyOnce.kt") public void testSafeCallComputesExpressionOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/safeCallComputesExpressionOnlyOnce.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/safeCallComputesExpressionOnlyOnce.kt"); } @TestMetadata("stringInterpolationEvaluationOrder.kt") public void testStringInterpolationEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/stringInterpolationEvaluationOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/stringInterpolationEvaluationOrder.kt"); } @TestMetadata("temporaryVariableCreatedInPackageInitializer.kt") public void testTemporaryVariableCreatedInPackageInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/temporaryVariableCreatedInPackageInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/temporaryVariableCreatedInPackageInitializer.kt"); } @TestMetadata("throwThrow.kt") public void testThrowThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/throwThrow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/throwThrow.kt"); } @TestMetadata("toGeneratorInStdlib.kt") public void testToGeneratorInStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt"); } @TestMetadata("whenReturnedWithoutBlock.kt") public void testWhenReturnedWithoutBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/whenReturnedWithoutBlock.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/whenReturnedWithoutBlock.kt"); } } @@ -3178,86 +2822,77 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringClass extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStringClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("extensionMethods.kt") public void testExtensionMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/extensionMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/extensionMethods.kt"); } @TestMetadata("intInTemplate.kt") public void testIntInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/intInTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/intInTemplate.kt"); } @TestMetadata("kt2227.kt") public void testKt2227() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/kt2227.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/kt2227.kt"); } @TestMetadata("kt2227_2.kt") public void testKt2227_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/kt2227_2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/kt2227_2.kt"); } @TestMetadata("multipleExpressionsInTemplate.kt") public void testMultipleExpressionsInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/multipleExpressionsInTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/multipleExpressionsInTemplate.kt"); } @TestMetadata("nullableTypeInStringTemplate.kt") public void testNullableTypeInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/nullableTypeInStringTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/nullableTypeInStringTemplate.kt"); } @TestMetadata("numbersInTemplate.kt") public void testNumbersInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/numbersInTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/numbersInTemplate.kt"); } @TestMetadata("objectToStringCallInTemplate.kt") public void testObjectToStringCallInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/objectToStringCallInTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/objectToStringCallInTemplate.kt"); } @TestMetadata("stringAssignment.kt") public void testStringAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/stringAssignment.kt"); } @TestMetadata("stringConstant.kt") public void testStringConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringConstant.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/stringConstant.kt"); } @TestMetadata("stringInTemplate.kt") public void testStringInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringInTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/stringInTemplate.kt"); } @TestMetadata("stringNotEqualToNumber.kt") public void testStringNotEqualToNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringNotEqualToNumber.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/stringNotEqualToNumber.kt"); } @TestMetadata("subSequence.kt") public void testSubSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/subSequence.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/subSequence.kt"); } } @@ -3265,26 +2900,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringTemplates"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("nonStrings.kt") public void testNonStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringTemplates/nonStrings.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringTemplates/nonStrings.kt"); } @TestMetadata("objectWithToString.kt") public void testObjectWithToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringTemplates/objectWithToString.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringTemplates/objectWithToString.kt"); } @TestMetadata("stringValues.kt") public void testStringValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringTemplates/stringValues.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringTemplates/stringValues.kt"); } } @@ -3292,62 +2928,57 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Try extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTry() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/try"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("exceptionToString.kt") public void testExceptionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/exceptionToString.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/exceptionToString.kt"); } @TestMetadata("multipleCatchBlocks.kt") public void testMultipleCatchBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/multipleCatchBlocks.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/multipleCatchBlocks.kt"); } @TestMetadata("rethrowExceptionIfNotCaught.kt") public void testRethrowExceptionIfNotCaught() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/rethrowExceptionIfNotCaught.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/rethrowExceptionIfNotCaught.kt"); } @TestMetadata("tryCatchCorrectForSubclasses.kt") public void testTryCatchCorrectForSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchCorrectForSubclasses.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/tryCatchCorrectForSubclasses.kt"); } @TestMetadata("tryCatchDynamic.kt") public void testTryCatchDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchDynamic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/tryCatchDynamic.kt"); } @TestMetadata("tryCatchExpr.kt") public void testTryCatchExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchExpr.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/tryCatchExpr.kt"); } @TestMetadata("tryCatchExpressionWithMessage.kt") public void testTryCatchExpressionWithMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchExpressionWithMessage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/tryCatchExpressionWithMessage.kt"); } @TestMetadata("tryCatchThrowable.kt") public void testTryCatchThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchThrowable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/tryCatchThrowable.kt"); } @TestMetadata("tryCatchWithDifferentParameterNames.kt") public void testTryCatchWithDifferentParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchWithDifferentParameterNames.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/try/tryCatchWithDifferentParameterNames.kt"); } } @@ -3355,200 +2986,172 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/when"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("doWhileWithOneStmWhen.kt") public void testDoWhileWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/doWhileWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/doWhileWithOneStmWhen.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/empty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/empty.kt"); } @TestMetadata("exhaustiveCheckException.kt") public void testExhaustiveCheckException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/exhaustiveCheckException.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/exhaustiveCheckException.kt"); } @TestMetadata("externalEnumSubject.kt") public void testExternalEnumSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/externalEnumSubject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/externalEnumSubject.kt"); } @TestMetadata("forWithOneStmWhen.kt") public void testForWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt"); } @TestMetadata("ifInWhen.kt") public void testIfInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/ifInWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/ifInWhen.kt"); } @TestMetadata("ifInWhenDanglingElseIssue.kt") public void testIfInWhenDanglingElseIssue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/ifInWhenDanglingElseIssue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/ifInWhenDanglingElseIssue.kt"); } @TestMetadata("ifWithOneStmWhen.kt") public void testIfWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/ifWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/ifWithOneStmWhen.kt"); } @TestMetadata("kt1665.kt") public void testKt1665() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/kt1665.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/kt1665.kt"); } @TestMetadata("matchNullableType.kt") public void testMatchNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/matchNullableType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/matchNullableType.kt"); } @TestMetadata("multipleCases.kt") public void testMultipleCases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/multipleCases.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/multipleCases.kt"); } @TestMetadata("whenAsExpression.kt") public void testWhenAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenAsExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenAsExpression.kt"); } @TestMetadata("whenAsExpressionWithThrow.kt") public void testWhenAsExpressionWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenAsExpressionWithThrow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenAsExpressionWithThrow.kt"); } @TestMetadata("whenConditionWithReturn.kt") public void testWhenConditionWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenConditionWithReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenConditionWithReturn.kt"); } @TestMetadata("whenEqualsPattern.kt") public void testWhenEqualsPattern() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenEqualsPattern.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenEqualsPattern.kt"); } @TestMetadata("whenEvaluatesArgumentOnlyOnce.kt") public void testWhenEvaluatesArgumentOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenEvaluatesArgumentOnlyOnce.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenEvaluatesArgumentOnlyOnce.kt"); } @TestMetadata("whenExecutesOnlyOnce.kt") public void testWhenExecutesOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenExecutesOnlyOnce.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenExecutesOnlyOnce.kt"); } @TestMetadata("whenNotType.kt") public void testWhenNotType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenNotType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenNotType.kt"); } @TestMetadata("whenStatementWithRangeClause.kt") public void testWhenStatementWithRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenStatementWithRangeClause.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenStatementWithRangeClause.kt"); } @TestMetadata("whenType.kt") public void testWhenType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenType.kt"); } @TestMetadata("whenValue.kt") public void testWhenValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenValue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenValue.kt"); } @TestMetadata("whenValueOrType.kt") public void testWhenValueOrType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenValueOrType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenValueOrType.kt"); } @TestMetadata("whenWithCharRangeClause.kt") public void testWhenWithCharRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithCharRangeClause.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithCharRangeClause.kt"); } @TestMetadata("whenWithCustomRangeClause.kt") public void testWhenWithCustomRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithCustomRangeClause.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithCustomRangeClause.kt"); } @TestMetadata("whenWithIf.kt") public void testWhenWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithIf.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithIf.kt"); } @TestMetadata("whenWithIfConditionAndOnlyElse.kt") public void testWhenWithIfConditionAndOnlyElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithIfConditionAndOnlyElse.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithIfConditionAndOnlyElse.kt"); } @TestMetadata("whenWithLongRangeClause.kt") public void testWhenWithLongRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithLongRangeClause.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithLongRangeClause.kt"); } @TestMetadata("whenWithOneStmWhen.kt") public void testWhenWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithOneStmWhen.kt"); } @TestMetadata("whenWithOnlyElse.kt") public void testWhenWithOnlyElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithOnlyElse.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithOnlyElse.kt"); } @TestMetadata("whenWithRangeClause.kt") public void testWhenWithRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithRangeClause.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithRangeClause.kt"); } @TestMetadata("whenWithoutExpression.kt") public void testWhenWithoutExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithoutExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithoutExpression.kt"); } @TestMetadata("whileWithOneStmWhen.kt") public void testWhileWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whileWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whileWithOneStmWhen.kt"); } } @@ -3556,38 +3159,37 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class While extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInWhile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/while"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("doWhileWithComplexCondition.kt") public void testDoWhileWithComplexCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/doWhileWithComplexCondition.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/while/doWhileWithComplexCondition.kt"); } @TestMetadata("doWhileWithComplexConditionAndContinue.kt") public void testDoWhileWithComplexConditionAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/doWhileWithComplexConditionAndContinue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/while/doWhileWithComplexConditionAndContinue.kt"); } @TestMetadata("whileWithComplexCondition.kt") public void testWhileWithComplexCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/whileWithComplexCondition.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/while/whileWithComplexCondition.kt"); } @TestMetadata("whileWithComplexConditionAndContinue.kt") public void testWhileWithComplexConditionAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/whileWithComplexConditionAndContinue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/while/whileWithComplexConditionAndContinue.kt"); } @TestMetadata("whileWithComplexOneStatement.kt") public void testWhileWithComplexOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/whileWithComplexOneStatement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/while/whileWithComplexOneStatement.kt"); } } } @@ -3596,104 +3198,92 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunction extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionFunction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("extensionForSuperclass.kt") public void testExtensionForSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt"); } @TestMetadata("extensionFunctionCalledFromExtensionFunction.kt") public void testExtensionFunctionCalledFromExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt"); } @TestMetadata("extensionFunctionCalledFromFor.kt") public void testExtensionFunctionCalledFromFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt"); } @TestMetadata("extensionFunctionOnExpression.kt") public void testExtensionFunctionOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt"); } @TestMetadata("extensionInsideFunctionLiteral.kt") public void testExtensionInsideFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt"); } @TestMetadata("extensionLiteralPassedToFunction.kt") public void testExtensionLiteralPassedToFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt"); } @TestMetadata("extensionOnClassWithExplicitAndImplicitReceiver.kt") public void testExtensionOnClassWithExplicitAndImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt"); } @TestMetadata("extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt") public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt"); } @TestMetadata("extensionUsedInsideClass.kt") public void testExtensionUsedInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt"); } @TestMetadata("extensionWithImplicitReceiver.kt") public void testExtensionWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/generic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/generic.kt"); } @TestMetadata("implicitReceiverInExtension.kt") public void testImplicitReceiverInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt"); } @TestMetadata("intExtension.kt") public void testIntExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/intExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/intExtension.kt"); } @TestMetadata("superClassMemberInExtension.kt") public void testSuperClassMemberInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt"); } @TestMetadata("virtualExtension.kt") public void testVirtualExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/virtualExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/virtualExtension.kt"); } @TestMetadata("virtualExtensionOverride.kt") public void testVirtualExtensionOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt"); } } @@ -3701,10 +3291,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionProperty extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("absExtension.kt") public void testAbsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/absExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/absExtension.kt"); } public void testAllFilesPresentInExtensionProperty() throws Exception { @@ -3713,32 +3306,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("externalExtensionProperty.kt") public void testExternalExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/externalExtensionProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/externalExtensionProperty.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/inClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/inClass.kt"); } @TestMetadata("privateExtensionProperty.kt") public void testPrivateExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/privateExtensionProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/privateExtensionProperty.kt"); } @TestMetadata("propertyWithGetterAndSetter.kt") public void testPropertyWithGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt"); } @TestMetadata("simplePropertyWithGetter.kt") public void testSimplePropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt"); } } @@ -3746,104 +3334,92 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Incremental extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIncremental() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/incremental"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("catchScope.kt") public void testCatchScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/catchScope.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/catchScope.kt"); } @TestMetadata("classReferencingClass.kt") public void testClassReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/classReferencingClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/classReferencingClass.kt"); } @TestMetadata("coroutines.kt") public void testCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/coroutines.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/coroutines.kt"); } @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/defaultArguments.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/defaultArguments.kt"); } @TestMetadata("enumUsage.kt") public void testEnumUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/enumUsage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/enumUsage.kt"); } @TestMetadata("exportedPackage.kt") public void testExportedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/exportedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/exportedPackage.kt"); } @TestMetadata("functionReferencingClass.kt") public void testFunctionReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/functionReferencingClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/functionReferencingClass.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/inline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/inline.kt"); } @TestMetadata("inlineLambda.kt") public void testInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/inlineLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/inlineLambda.kt"); } @TestMetadata("jsModule.kt") public void testJsModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/jsModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/jsModule.kt"); } @TestMetadata("multipleExport.kt") public void testMultipleExport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/multipleExport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/multipleExport.kt"); } @TestMetadata("multipleReimport.kt") public void testMultipleReimport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/multipleReimport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/multipleReimport.kt"); } @TestMetadata("packagesWithSameName.kt") public void testPackagesWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/packagesWithSameName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/packagesWithSameName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/simple.kt"); } @TestMetadata("sourceMapSourceEmbedding.kt") public void testSourceMapSourceEmbedding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/sourceMapSourceEmbedding.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/sourceMapSourceEmbedding.kt"); } @TestMetadata("syntheticStatement.kt") public void testSyntheticStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/syntheticStatement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/incremental/syntheticStatement.kt"); } } @@ -3851,10 +3427,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractVarOverride.kt") public void testAbstractVarOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/abstractVarOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/abstractVarOverride.kt"); } public void testAllFilesPresentInInheritance() throws Exception { @@ -3863,120 +3442,105 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("baseCall.kt") public void testBaseCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/baseCall.kt"); } @TestMetadata("baseCallOrder.kt") public void testBaseCallOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseCallOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/baseCallOrder.kt"); } @TestMetadata("baseClassDefinedAfterDerived.kt") public void testBaseClassDefinedAfterDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt"); } @TestMetadata("complexInitializationOrder.kt") public void testComplexInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/complexInitializationOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/complexInitializationOrder.kt"); } @TestMetadata("definitionOrder.kt") public void testDefinitionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/definitionOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/definitionOrder.kt"); } @TestMetadata("fromFakeClasses.kt") public void testFromFakeClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromFakeClasses.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/fromFakeClasses.kt"); } @TestMetadata("fromNativeInterface.kt") public void testFromNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromNativeInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/fromNativeInterface.kt"); } @TestMetadata("fromNestedNativeClass.kt") public void testFromNestedNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromNestedNativeClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/fromNestedNativeClass.kt"); } @TestMetadata("inheritFromCharIterator.kt") public void testInheritFromCharIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/initializationOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/initializationOrder.kt"); } @TestMetadata("initializersOfBasicClassExecute.kt") public void testInitializersOfBasicClassExecute() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt"); } @TestMetadata("kt3499.kt") public void testKt3499() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/kt3499.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/kt3499.kt"); } @TestMetadata("methodOverride.kt") public void testMethodOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/methodOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/methodOverride.kt"); } @TestMetadata("nativeNativeKotlin.kt") public void testNativeNativeKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/nativeNativeKotlin.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/nativeNativeKotlin.kt"); } @TestMetadata("overrideAnyMethods.kt") public void testOverrideAnyMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/overrideAnyMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/overrideAnyMethods.kt"); } @TestMetadata("valOverride.kt") public void testValOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/valOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/valOverride.kt"); } @TestMetadata("valuePassedToAncestorConstructor.kt") public void testValuePassedToAncestorConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt"); } @TestMetadata("withInitializeMethod.kt") public void testWithInitializeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/withInitializeMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/withInitializeMethod.kt"); } @TestMetadata("js/js.translator/testData/box/inheritance/interfaces") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Interfaces extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractClassInheritingDefaultMethod.kt") public void testAbstractClassInheritingDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/abstractClassInheritingDefaultMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/interfaces/abstractClassInheritingDefaultMethod.kt"); } public void testAllFilesPresentInInterfaces() throws Exception { @@ -3985,20 +3549,17 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("withDefaultMethod.kt") public void testWithDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethod.kt"); } @TestMetadata("withDefaultMethodFromSuperInterface.kt") public void testWithDefaultMethodFromSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethodFromSuperInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethodFromSuperInterface.kt"); } @TestMetadata("withDefaultProperty.kt") public void testWithDefaultProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/withDefaultProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/interfaces/withDefaultProperty.kt"); } } } @@ -4007,62 +3568,57 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Initialize extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInitialize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/initialize"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classInitializer.kt") public void testClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/classInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/classInitializer.kt"); } @TestMetadata("complexPropertyInitializer.kt") public void testComplexPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/complexPropertyInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/complexPropertyInitializer.kt"); } @TestMetadata("complexTopLevelPropertyInitializer.kt") public void testComplexTopLevelPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt"); } @TestMetadata("declarationInitializedWithThrow.kt") public void testDeclarationInitializedWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt"); } @TestMetadata("lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/lateinit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/lateinit.kt"); } @TestMetadata("propertyInitializationOrder.kt") public void testPropertyInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/propertyInitializationOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/propertyInitializationOrder.kt"); } @TestMetadata("rootPackageValInit.kt") public void testRootPackageValInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/rootPackageValInit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/rootPackageValInit.kt"); } @TestMetadata("rootValInit.kt") public void testRootValInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/rootValInit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/rootValInit.kt"); } @TestMetadata("uninitializedLateinit.kt") public void testUninitializedLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/uninitializedLateinit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/uninitializedLateinit.kt"); } } @@ -4070,422 +3626,357 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inline"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousFunction.kt") public void testAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/anonymousFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/anonymousFunction.kt"); } @TestMetadata("anonymousObjectInlineMethod.kt") public void testAnonymousObjectInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt"); } @TestMetadata("arrayLiteralAliasing.kt") public void testArrayLiteralAliasing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/arrayLiteralAliasing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/arrayLiteralAliasing.kt"); } @TestMetadata("astCopy.kt") public void testAstCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/astCopy.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/astCopy.kt"); } @TestMetadata("callFunction.kt") public void testCallFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/callFunction.kt"); } @TestMetadata("callInlineFunctionOnTopLevel.kt") public void testCallInlineFunctionOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt"); } @TestMetadata("callInlineFunctionOnTopLevelSimple.kt") public void testCallInlineFunctionOnTopLevelSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt"); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callableReference.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/callableReference.kt"); } @TestMetadata("callableReferenceOfLocalInline.kt") public void testCallableReferenceOfLocalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/classObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/classObject.kt"); } @TestMetadata("dontInlineFunctionCall.kt") public void testDontInlineFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/dontInlineFunctionCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/dontInlineFunctionCall.kt"); } @TestMetadata("expressionBodyWithLambdaCall.kt") public void testExpressionBodyWithLambdaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/extension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/extension.kt"); } @TestMetadata("extensionWithManyArguments.kt") public void testExtensionWithManyArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/extensionWithManyArguments.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/extensionWithManyArguments.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/identityEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/identityEquals.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/incrementProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/incrementProperty.kt"); } @TestMetadata("inlineCallInsideStringTemplate.kt") public void testInlineCallInsideStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCallInsideStringTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineCallInsideStringTemplate.kt"); } @TestMetadata("inlineCallNoInline.kt") public void testInlineCallNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCallNoInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineCallNoInline.kt"); } @TestMetadata("inlineCapturingThis.kt") public void testInlineCapturingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCapturingThis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineCapturingThis.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineChain.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineChain.kt"); } @TestMetadata("inlineChainWithFewStatements.kt") public void testInlineChainWithFewStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt"); } @TestMetadata("inlineDefaultArgument.kt") public void testInlineDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineDefaultArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineDefaultArgument.kt"); } @TestMetadata("inlineFunctionInLambda.kt") public void testInlineFunctionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineFunctionInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineFunctionInLambda.kt"); } @TestMetadata("inlineGenericSimple.kt") public void testInlineGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineGenericSimple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineGenericSimple.kt"); } @TestMetadata("inlineIf.kt") public void testInlineIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineIf.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineIf.kt"); } @TestMetadata("inlineImportNameClash.kt") public void testInlineImportNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineImportNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineImportNameClash.kt"); } @TestMetadata("inlineInInlineWithLambda.kt") public void testInlineInInlineWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInInlineWithLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineInInlineWithLambda.kt"); } @TestMetadata("inlineInInlineWithLambdaPrivate.kt") public void testInlineInInlineWithLambdaPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInInlineWithLambdaPrivate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineInInlineWithLambdaPrivate.kt"); } @TestMetadata("inlineInc.kt") public void testInlineInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInc.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineInc.kt"); } @TestMetadata("inlineIntSimple.kt") public void testInlineIntSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineIntSimple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineIntSimple.kt"); } @TestMetadata("inlineLambdaNoCapture.kt") public void testInlineLambdaNoCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt"); } @TestMetadata("inlineLambdaWithCapture.kt") public void testInlineLambdaWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt"); } @TestMetadata("inlineMethod.kt") public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineMethod.kt"); } @TestMetadata("inlineNoReturn.kt") public void testInlineNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineNoReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineNoReturn.kt"); } @TestMetadata("inlineOrder.kt") public void testInlineOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineOrder.kt"); } @TestMetadata("inlineSimpleAssignment.kt") public void testInlineSimpleAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineSimpleAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/inlineSimpleAssignment.kt"); } @TestMetadata("innerOuterThis.kt") public void testInnerOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/innerOuterThis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/innerOuterThis.kt"); } @TestMetadata("iteratorOnInlineFunctionResult.kt") public void testIteratorOnInlineFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt"); } @TestMetadata("jsCode.kt") public void testJsCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/jsCode.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/jsCode.kt"); } @TestMetadata("jsCodeVarDeclared.kt") public void testJsCodeVarDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/jsCodeVarDeclared.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/jsCodeVarDeclared.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/lambdaInLambda.kt"); } @TestMetadata("lambdaReassignment.kt") public void testLambdaReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaReassignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/lambdaReassignment.kt"); } @TestMetadata("lambdaReassignmentWithCapture.kt") public void testLambdaReassignmentWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt"); } @TestMetadata("localInlineExtensionFunction.kt") public void testLocalInlineExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/localInlineExtensionFunction.kt"); } @TestMetadata("localInlineFunction.kt") public void testLocalInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/localInlineFunction.kt"); } @TestMetadata("localInlineFunctionComplex.kt") public void testLocalInlineFunctionComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/localInlineFunctionComplex.kt"); } @TestMetadata("localInlineFunctionDeclaredInLambda.kt") public void testLocalInlineFunctionDeclaredInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt"); } @TestMetadata("localInlineFunctionNameClash.kt") public void testLocalInlineFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt"); } @TestMetadata("localInlineFunctionReference.kt") public void testLocalInlineFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionReference.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/localInlineFunctionReference.kt"); } @TestMetadata("metadataForPublicFunction.kt") public void testMetadataForPublicFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/metadataForPublicFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/metadataForPublicFunction.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/multiDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/multiDeclaration.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/noInlineLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/noInlineLambda.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/operators.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/operators.kt"); } @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/params.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/params.kt"); } @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/rootConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/rootConstructor.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/safeCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/safeCall.kt"); } @TestMetadata("sameNameOfDeclarationsInSameModule.kt") public void testSameNameOfDeclarationsInSameModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/sameNameOfDeclarationsInSameModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/sameNameOfDeclarationsInSameModule.kt"); } @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/severalClosures.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/severalClosures.kt"); } @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/severalUsage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/severalUsage.kt"); } @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleDouble.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/simpleDouble.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleEnum.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/simpleEnum.kt"); } @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleInt.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/simpleInt.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/simpleLambda.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/simpleObject.kt"); } @TestMetadata("simpleReturnFunctionWithResultUnused.kt") public void testSimpleReturnFunctionWithResultUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt"); } @TestMetadata("statementsAfterReturn.kt") public void testStatementsAfterReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/statementsAfterReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/statementsAfterReturn.kt"); } @TestMetadata("thisImplicitlyCaptured.kt") public void testThisImplicitlyCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt"); } @TestMetadata("thisLiteralAliasing.kt") public void testThisLiteralAliasing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/thisLiteralAliasing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/thisLiteralAliasing.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/vararg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/vararg.kt"); } } @@ -4493,326 +3984,277 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineEvaluationOrder extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineEvaluationOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineEvaluationOrder"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("alsoWithReassingment.kt") public void testAlsoWithReassingment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/alsoWithReassingment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/alsoWithReassingment.kt"); } @TestMetadata("argumentOfCall.kt") public void testArgumentOfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCall.kt"); } @TestMetadata("argumentOfCallMultipleInlineCalls.kt") public void testArgumentOfCallMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCallMultipleInlineCalls.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCallMultipleInlineCalls.kt"); } @TestMetadata("argumentOfInlineCall.kt") public void testArgumentOfInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfInlineCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfInlineCall.kt"); } @TestMetadata("argumentOfNew.kt") public void testArgumentOfNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfNew.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfNew.kt"); } @TestMetadata("arrayAccess1.kt") public void testArrayAccess1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt"); } @TestMetadata("arrayAccess2.kt") public void testArrayAccess2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt"); } @TestMetadata("arrayAccess3.kt") public void testArrayAccess3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt"); } @TestMetadata("arrayAccessLhsDecomposed.kt") public void testArrayAccessLhsDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt"); } @TestMetadata("arrayLiteral.kt") public void testArrayLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt"); } @TestMetadata("arrayLiteralMultipleInlineCalls.kt") public void testArrayLiteralMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt"); } @TestMetadata("arrayLiteralNested.kt") public void testArrayLiteralNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/assignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/assignment.kt"); } @TestMetadata("binaryOperator.kt") public void testBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperator.kt"); } @TestMetadata("binaryOperatorMultipleInlineCalls.kt") public void testBinaryOperatorMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperatorMultipleInlineCalls.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperatorMultipleInlineCalls.kt"); } @TestMetadata("callQualifier.kt") public void testCallQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/callQualifier.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/callQualifier.kt"); } @TestMetadata("callQualifierComplex.kt") public void testCallQualifierComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt"); } @TestMetadata("capturedVarAsArgument.kt") public void testCapturedVarAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/capturedVarAsArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/capturedVarAsArgument.kt"); } @TestMetadata("conditional.kt") public void testConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditional.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditional.kt"); } @TestMetadata("conditionalElvis.kt") public void testConditionalElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalElvis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalElvis.kt"); } @TestMetadata("conditionalNested.kt") public void testConditionalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalNested.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalNested.kt"); } @TestMetadata("conditionalTestExpression.kt") public void testConditionalTestExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpression.kt"); } @TestMetadata("conditionalTestExpressionElvis.kt") public void testConditionalTestExpressionElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpressionElvis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpressionElvis.kt"); } @TestMetadata("continueInExtractedDoWhile.kt") public void testContinueInExtractedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/continueInExtractedDoWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/continueInExtractedDoWhile.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/doWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/doWhile.kt"); } @TestMetadata("doWhileComplex.kt") public void testDoWhileComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/doWhileComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/doWhileComplex.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/for.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/for.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/if.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/if.kt"); } @TestMetadata("inlineFunctionAsParameterOfQualifiedCall.kt") public void testInlineFunctionAsParameterOfQualifiedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/inlineFunctionAsParameterOfQualifiedCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/inlineFunctionAsParameterOfQualifiedCall.kt"); } @TestMetadata("lambdaPropertyExtracted.kt") public void testLambdaPropertyExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/lambdaPropertyExtracted.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/lambdaPropertyExtracted.kt"); } @TestMetadata("lambdaWithClosure.kt") public void testLambdaWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/lambdaWithClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/lambdaWithClosure.kt"); } @TestMetadata("logicalAnd.kt") public void testLogicalAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/logicalAnd.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/logicalAnd.kt"); } @TestMetadata("logicalAndOrMultipleInlineCalls.kt") public void testLogicalAndOrMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/logicalAndOrMultipleInlineCalls.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/logicalAndOrMultipleInlineCalls.kt"); } @TestMetadata("logicalOr.kt") public void testLogicalOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/logicalOr.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/logicalOr.kt"); } @TestMetadata("methodCallQualifierWithSideEffect.kt") public void testMethodCallQualifierWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/methodCallQualifierWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/methodCallQualifierWithSideEffect.kt"); } @TestMetadata("methodDecomposedWithBind.kt") public void testMethodDecomposedWithBind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/methodDecomposedWithBind.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/methodDecomposedWithBind.kt"); } @TestMetadata("methodInlineCallQualifierWithSideEffect.kt") public void testMethodInlineCallQualifierWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/methodInlineCallQualifierWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/methodInlineCallQualifierWithSideEffect.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclaration.kt"); } @TestMetadata("multiDeclarationComplex.kt") public void testMultiDeclarationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclarationComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclarationComplex.kt"); } @TestMetadata("nestedContinueInExtractedDoWhile.kt") public void testNestedContinueInExtractedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/nestedContinueInExtractedDoWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/nestedContinueInExtractedDoWhile.kt"); } @TestMetadata("nestedInlineCall.kt") public void testNestedInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/nestedInlineCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/nestedInlineCall.kt"); } @TestMetadata("propertiesInitializationOrder.kt") public void testPropertiesInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrder.kt"); } @TestMetadata("propertiesInitializationOrderSimple.kt") public void testPropertiesInitializationOrderSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrderSimple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrderSimple.kt"); } @TestMetadata("propertyAccessAfterModification.kt") public void testPropertyAccessAfterModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAfterModification.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAfterModification.kt"); } @TestMetadata("propertyAccessAndInitializer.kt") public void testPropertyAccessAndInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAndInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAndInitializer.kt"); } @TestMetadata("propertyAccessWithSideEffect.kt") public void testPropertyAccessWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt"); } @TestMetadata("propertyWithSideEffectExtracted.kt") public void testPropertyWithSideEffectExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectExtracted.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectExtracted.kt"); } @TestMetadata("propertyWithSideEffectPassedToInlineFunction.kt") public void testPropertyWithSideEffectPassedToInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt"); } @TestMetadata("temporaryVarNonTrivial.kt") public void testTemporaryVarNonTrivial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/temporaryVarNonTrivial.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/temporaryVarNonTrivial.kt"); } @TestMetadata("ternaryConditional.kt") public void testTernaryConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/ternaryConditional.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/ternaryConditional.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/while.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/while.kt"); } @TestMetadata("whileComplex.kt") public void testWhileComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/whileComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/whileComplex.kt"); } @TestMetadata("whileConditionExtracted.kt") public void testWhileConditionExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/whileConditionExtracted.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/whileConditionExtracted.kt"); } } @@ -4820,182 +4262,157 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineMultiFile extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousObjectInSimilarFunctions.kt") public void testAnonymousObjectInSimilarFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectInSimilarFunctions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectInSimilarFunctions.kt"); } @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSite.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSite.kt"); } @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSiteSuperParams.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSiteSuperParams.kt"); } @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSite.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSite.kt"); } @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSiteSuperParams.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSiteSuperParams.kt"); } @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/builders.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/builders.kt"); } @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/buildersAndLambdaCapturing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/buildersAndLambdaCapturing.kt"); } @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/captureInlinable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/captureInlinable.kt"); } @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/captureInlinableAndOther.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/captureInlinableAndOther.kt"); } @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/captureThisAndReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/captureThisAndReceiver.kt"); } @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/closureChain.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/closureChain.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/defaultMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/defaultMethod.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/generics.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/generics.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/inlineInDefaultParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/inlineInDefaultParameter.kt"); } @TestMetadata("inlineMultiFileSimple.kt") public void testInlineMultiFileSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/inlineMultiFileSimple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/inlineMultiFileSimple.kt"); } @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/lambdaCloning.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/lambdaCloning.kt"); } @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/lambdaInLambda2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/lambdaInLambda2.kt"); } @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/lambdaInLambdaNoInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/lambdaInLambdaNoInline.kt"); } @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/regeneratedLambdaName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/regeneratedLambdaName.kt"); } @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/sameCaptured.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/sameCaptured.kt"); } @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInClass.kt"); } @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInPackage.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/simpleDefaultMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/simpleDefaultMethod.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/trait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/trait.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/tryCatch.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/tryCatch.kt"); } @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/tryCatch2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/tryCatch2.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/tryCatchFinally.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/tryCatchFinally.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/use.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/use.kt"); } @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/with.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiFile/with.kt"); } } @@ -5003,194 +4420,167 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineMultiModule extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anotherModuleValInClosure.kt") public void testAnotherModuleValInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/anotherModuleValInClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/anotherModuleValInClosure.kt"); } @TestMetadata("callFunction.kt") public void testCallFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/callFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/callFunction.kt"); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/callableReference.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/callableReference.kt"); } @TestMetadata("calledByFqName.kt") public void testCalledByFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/calledByFqName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/calledByFqName.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/extensionLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/extensionLambda.kt"); } @TestMetadata("externalInlineCallDecomposed.kt") public void testExternalInlineCallDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/externalInlineCallDecomposed.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/externalInlineCallDecomposed.kt"); } @TestMetadata("externalInlineNewDecomposed.kt") public void testExternalInlineNewDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/externalInlineNewDecomposed.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/externalInlineNewDecomposed.kt"); } @TestMetadata("fakeFunctionInAnotherModule.kt") public void testFakeFunctionInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/fakeFunctionInAnotherModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/fakeFunctionInAnotherModule.kt"); } @TestMetadata("importObjectInstance.kt") public void testImportObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/importObjectInstance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/importObjectInstance.kt"); } @TestMetadata("inlineInInlineWithLambdaMultiModule.kt") public void testInlineInInlineWithLambdaMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/inlineInInlineWithLambdaMultiModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/inlineInInlineWithLambdaMultiModule.kt"); } @TestMetadata("inlineMemberFunWithLambda.kt") public void testInlineMemberFunWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/inlineMemberFunWithLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/inlineMemberFunWithLambda.kt"); } @TestMetadata("inlineableAliasForExternalDeclaration.kt") public void testInlineableAliasForExternalDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/inlineableAliasForExternalDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/inlineableAliasForExternalDeclaration.kt"); } @TestMetadata("internalFriend.kt") public void testInternalFriend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/internalFriend.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/internalFriend.kt"); } @TestMetadata("internalNameClash.kt") public void testInternalNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/internalNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/internalNameClash.kt"); } @TestMetadata("keywordAsMemberName.kt") public void testKeywordAsMemberName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/keywordAsMemberName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/keywordAsMemberName.kt"); } @TestMetadata("kt16144.kt") public void testKt16144() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/kt16144.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/kt16144.kt"); } @TestMetadata("kt16160.kt") public void testKt16160() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/kt16160.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/kt16160.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/lambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/lambda.kt"); } @TestMetadata("lambdaCalledInObjectLiteral.kt") public void testLambdaCalledInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/lambdaCalledInObjectLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/lambdaCalledInObjectLiteral.kt"); } @TestMetadata("lambdaWithClosure.kt") public void testLambdaWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/lambdaWithClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/lambdaWithClosure.kt"); } @TestMetadata("localNameClash.kt") public void testLocalNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/localNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/localNameClash.kt"); } @TestMetadata("localObjectLiteralWithInheritance.kt") public void testLocalObjectLiteralWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/localObjectLiteralWithInheritance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/localObjectLiteralWithInheritance.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/method.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/method.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/operators.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/operators.kt"); } @TestMetadata("parameterWithDefaultValue.kt") public void testParameterWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/parameterWithDefaultValue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/parameterWithDefaultValue.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/property.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/property.kt"); } @TestMetadata("reexportDuringInline.kt") public void testReexportDuringInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/reexportDuringInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/reexportDuringInline.kt"); } @TestMetadata("repeatedImport.kt") public void testRepeatedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/repeatedImport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/repeatedImport.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/simple.kt"); } @TestMetadata("topLevelNestedInline.kt") public void testTopLevelNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/topLevelNestedInline.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/topLevelNestedInline.kt"); } @TestMetadata("typealiases.kt") public void testTypealiases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/typealiases.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineMultiModule/typealiases.kt"); } } @@ -5198,110 +4588,97 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineSizeReduction extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineSizeReduction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineSizeReduction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("inlineImportCleanup.kt") public void testInlineImportCleanup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/inlineImportCleanup.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/inlineImportCleanup.kt"); } @TestMetadata("inlineLambdaCleanup.kt") public void testInlineLambdaCleanup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/inlineLambdaCleanup.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/inlineLambdaCleanup.kt"); } @TestMetadata("inlineOrder.kt") public void testInlineOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/inlineOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/inlineOrder.kt"); } @TestMetadata("lastBreak.kt") public void testLastBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt"); } @TestMetadata("multiModuleDefaultArgsCleanup.kt") public void testMultiModuleDefaultArgsCleanup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/multiModuleDefaultArgsCleanup.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/multiModuleDefaultArgsCleanup.kt"); } @TestMetadata("noDuplicateVariableDeclaration.kt") public void testNoDuplicateVariableDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/noDuplicateVariableDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/noDuplicateVariableDeclaration.kt"); } @TestMetadata("oneTopLevelReturn.kt") public void testOneTopLevelReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/oneTopLevelReturn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/oneTopLevelReturn.kt"); } @TestMetadata("propertyAssignment.kt") public void testPropertyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/propertyAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/propertyAssignment.kt"); } @TestMetadata("propertyReassignment.kt") public void testPropertyReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/propertyReassignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/propertyReassignment.kt"); } @TestMetadata("propertyReferenceDoesNotProduceSideEffect.kt") public void testPropertyReferenceDoesNotProduceSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/propertyReferenceDoesNotProduceSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/propertyReferenceDoesNotProduceSideEffect.kt"); } @TestMetadata("returnInlineCall.kt") public void testReturnInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/returnInlineCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/returnInlineCall.kt"); } @TestMetadata("simpleReturnFunction.kt") public void testSimpleReturnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/simpleReturnFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/simpleReturnFunction.kt"); } @TestMetadata("ternaryConditional.kt") public void testTernaryConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/ternaryConditional.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/ternaryConditional.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/this.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/this.kt"); } @TestMetadata("valAssignment.kt") public void testValAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/valAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/valAssignment.kt"); } @TestMetadata("valDeclaration.kt") public void testValDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/valDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/valDeclaration.kt"); } @TestMetadata("varargTemporaryVar.kt") public void testVarargTemporaryVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt"); } } @@ -5309,62 +4686,57 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineStdlib extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineStdlib"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callNameClash.kt") public void testCallNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/callNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/callNameClash.kt"); } @TestMetadata("callableRefToFunInCurrentModule.kt") public void testCallableRefToFunInCurrentModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/closure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/closure.kt"); } @TestMetadata("closureInObjectLiteral.kt") public void testClosureInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/closureInObjectLiteral.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/closureInObjectLiteral.kt"); } @TestMetadata("closureNested.kt") public void testClosureNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/closureNested.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/closureNested.kt"); } @TestMetadata("localNamesClash.kt") public void testLocalNamesClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/localNamesClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/localNamesClash.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/simple.kt"); } @TestMetadata("thisInExtension.kt") public void testThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/thisInExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/thisInExtension.kt"); } @TestMetadata("unsafeCast.kt") public void testUnsafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/unsafeCast.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inlineStdlib/unsafeCast.kt"); } } @@ -5372,6 +4744,10 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @@ -5380,14 +4756,17 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AbstractList extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInAbstractList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java/abstractList"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/abstractList/iterator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/abstractList/iterator.kt"); } } @@ -5395,10 +4774,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayList extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("access.kt") public void testAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/access.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/access.kt"); } public void testAllFilesPresentInArrayList() throws Exception { @@ -5407,92 +4789,77 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/arrayAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/arrayAccess.kt"); } @TestMetadata("constructWithCapacity.kt") public void testConstructWithCapacity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt"); } @TestMetadata("constructWithSideEffectParam.kt") public void testConstructWithSideEffectParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt"); } @TestMetadata("containsAll.kt") public void testContainsAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/containsAll.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/containsAll.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/emptyList.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/emptyList.kt"); } @TestMetadata("indexOOB.kt") public void testIndexOOB() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/indexOOB.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/indexOOB.kt"); } @TestMetadata("indexOf.kt") public void testIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/indexOf.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/indexOf.kt"); } @TestMetadata("isEmpty.kt") public void testIsEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/isEmpty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/isEmpty.kt"); } @TestMetadata("iterate.kt") public void testIterate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/iterate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/iterate.kt"); } @TestMetadata("misc.kt") public void testMisc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/misc.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/misc.kt"); } @TestMetadata("remove.kt") public void testRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/remove.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/remove.kt"); } @TestMetadata("removeAll.kt") public void testRemoveAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/removeAll.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/removeAll.kt"); } @TestMetadata("removeWithIndexOutOfBounds.kt") public void testRemoveWithIndexOutOfBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt"); } @TestMetadata("retainAll.kt") public void testRetainAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/retainAll.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/retainAll.kt"); } @TestMetadata("toArray.kt") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/toArray.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/java/arrayList/toArray.kt"); } } } @@ -5501,170 +4868,147 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsCode extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJsCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/break.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/break.kt"); } @TestMetadata("catchScope.kt") public void testCatchScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/catchScope.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/catchScope.kt"); } @TestMetadata("codeFromVariable.kt") public void testCodeFromVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/codeFromVariable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/codeFromVariable.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/continue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/continue.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/doWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/doWhile.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/for.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/for.kt"); } @TestMetadata("forIn.kt") public void testForIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/forIn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/forIn.kt"); } @TestMetadata("forWithoutInit.kt") public void testForWithoutInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/forWithoutInit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/forWithoutInit.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/function.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/function.kt"); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/functionName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/functionName.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/if.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/if.kt"); } @TestMetadata("invocation.kt") public void testInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/invocation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/invocation.kt"); } @TestMetadata("label.kt") public void testLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/label.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/label.kt"); } @TestMetadata("labelNestedClash.kt") public void testLabelNestedClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/labelNestedClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/labelNestedClash.kt"); } @TestMetadata("labelNestedClashWithKotlin.kt") public void testLabelNestedClashWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/labelNestedClashWithKotlin.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/labelNestedClashWithKotlin.kt"); } @TestMetadata("labelSiblingClash.kt") public void testLabelSiblingClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/labelSiblingClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/labelSiblingClash.kt"); } @TestMetadata("literal.kt") public void testLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/literal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/literal.kt"); } @TestMetadata("numberLiteralOverflow.kt") public void testNumberLiteralOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/object.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/object.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/objectExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/objectExpression.kt"); } @TestMetadata("objectScopes.kt") public void testObjectScopes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/objectScopes.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/objectScopes.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/operators.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/operators.kt"); } @TestMetadata("quotes.kt") public void testQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/quotes.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/quotes.kt"); } @TestMetadata("referenceToKotlin.kt") public void testReferenceToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/referenceToKotlin.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/referenceToKotlin.kt"); } @TestMetadata("switch.kt") public void testSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/switch.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/switch.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/tryCatchFinally.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/tryCatchFinally.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/while.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsCode/while.kt"); } } @@ -5672,92 +5016,82 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsModule extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJsModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("externalClass.kt") public void testExternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalClass.kt"); } @TestMetadata("externalFunction.kt") public void testExternalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalFunction.kt"); } @TestMetadata("externalFunctionPlain.kt") public void testExternalFunctionPlain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunctionPlain.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalFunctionPlain.kt"); } @TestMetadata("externalFunctionUmd.kt") public void testExternalFunctionUmd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunctionUmd.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalFunctionUmd.kt"); } @TestMetadata("externalFunctionUmdFallback.kt") public void testExternalFunctionUmdFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunctionUmdFallback.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalFunctionUmdFallback.kt"); } @TestMetadata("externalObject.kt") public void testExternalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalObject.kt"); } @TestMetadata("externalPackage.kt") public void testExternalPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalPackage.kt"); } @TestMetadata("externalPackageInDifferentFile.kt") public void testExternalPackageInDifferentFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackageInDifferentFile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalPackageInDifferentFile.kt"); } @TestMetadata("externalPackagePlain.kt") public void testExternalPackagePlain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackagePlain.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalPackagePlain.kt"); } @TestMetadata("externalPackageUmdFallback.kt") public void testExternalPackageUmdFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackageUmdFallback.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalPackageUmdFallback.kt"); } @TestMetadata("externalProperty.kt") public void testExternalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/externalProperty.kt"); } @TestMetadata("importCountCommonJS.kt") public void testImportCountCommonJS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/importCountCommonJS.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/importCountCommonJS.kt"); } @TestMetadata("importCountUmd.kt") public void testImportCountUmd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/importCountUmd.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/importCountUmd.kt"); } @TestMetadata("topLevelVarargFun.kt") public void testTopLevelVarargFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt"); } } @@ -5765,80 +5099,72 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsName extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJsName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsName"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("avoidNameClash.kt") public void testAvoidNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/avoidNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/avoidNameClash.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/classes.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/classes.kt"); } @TestMetadata("inheritFromRenamedNativeClass.kt") public void testInheritFromRenamedNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClass.kt"); } @TestMetadata("inheritFromRenamedNativeClassMultimodule.kt") public void testInheritFromRenamedNativeClassMultimodule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClassMultimodule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClassMultimodule.kt"); } @TestMetadata("jsName.kt") public void testJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/jsName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/jsName.kt"); } @TestMetadata("jsNamePropertyAccessors.kt") public void testJsNamePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/jsNamePropertyAccessors.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/jsNamePropertyAccessors.kt"); } @TestMetadata("overriddenMethod.kt") public void testOverriddenMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/overriddenMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/overriddenMethod.kt"); } @TestMetadata("overridenFromInterface.kt") public void testOverridenFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/overridenFromInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/overridenFromInterface.kt"); } @TestMetadata("peculiarIdentifiers.kt") public void testPeculiarIdentifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/peculiarIdentifiers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/peculiarIdentifiers.kt"); } @TestMetadata("privateMethod.kt") public void testPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/privateMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/privateMethod.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/secondaryConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/secondaryConstructor.kt"); } @TestMetadata("simpleJsName.kt") public void testSimpleJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/simpleJsName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsName/simpleJsName.kt"); } } @@ -5846,32 +5172,32 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsQualifier extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJsQualifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsQualifier"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/classes.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsQualifier/classes.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsQualifier/simple.kt"); } @TestMetadata("umdFallback.kt") public void testUmdFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/umdFallback.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsQualifier/umdFallback.kt"); } @TestMetadata("withModule.kt") public void testWithModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/withModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/jsQualifier/withModule.kt"); } } @@ -5879,50 +5205,47 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kotlin_test extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInKotlin_test() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/kotlin.test"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("beforeAfter.kt") public void testBeforeAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/beforeAfter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/beforeAfter.kt"); } @TestMetadata("ignore.kt") public void testIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/ignore.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/ignore.kt"); } @TestMetadata("inherited.kt") public void testInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/inherited.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/inherited.kt"); } @TestMetadata("mpp.kt") public void testMpp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/mpp.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/mpp.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/nested.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/nested.kt"); } @TestMetadata("returnTestResult.kt") public void testReturnTestResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/returnTestResult.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/returnTestResult.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/kotlin.test/simple.kt"); } } @@ -5930,80 +5253,72 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/labels"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("labelOnExpression.kt") public void testLabelOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/labelOnExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/labelOnExpression.kt"); } @TestMetadata("labelWithVariableClashing.kt") public void testLabelWithVariableClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/labelWithVariableClashing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/labelWithVariableClashing.kt"); } @TestMetadata("nestedInlineLabels.kt") public void testNestedInlineLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedInlineLabels.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/nestedInlineLabels.kt"); } @TestMetadata("nestedLabels.kt") public void testNestedLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedLabels.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/nestedLabels.kt"); } @TestMetadata("nestedLabelsInlinedClashing.kt") public void testNestedLabelsInlinedClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedLabelsInlinedClashing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/nestedLabelsInlinedClashing.kt"); } @TestMetadata("nestedLabelsInlinedClashingAtFunctionsWithClosure.kt") public void testNestedLabelsInlinedClashingAtFunctionsWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt"); } @TestMetadata("peculiarNames.kt") public void testPeculiarNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/peculiarNames.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/peculiarNames.kt"); } @TestMetadata("siblingLabels.kt") public void testSiblingLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/siblingLabels.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/siblingLabels.kt"); } @TestMetadata("siblingLabelsInlined.kt") public void testSiblingLabelsInlined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/siblingLabelsInlined.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/siblingLabelsInlined.kt"); } @TestMetadata("siblingLabelsInlinedClashing.kt") public void testSiblingLabelsInlinedClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/siblingLabelsInlinedClashing.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/siblingLabelsInlinedClashing.kt"); } @TestMetadata("simpleLabel.kt") public void testSimpleLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/simpleLabel.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/simpleLabel.kt"); } @TestMetadata("simpleLabelInlined.kt") public void testSimpleLabelInlined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/simpleLabelInlined.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/labels/simpleLabelInlined.kt"); } } @@ -6011,44 +5326,42 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiFile extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classOfTheSameNameInAnotherPackage.kt") public void testClassOfTheSameNameInAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt"); } @TestMetadata("classesInheritedFromOtherFile.kt") public void testClassesInheritedFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt"); } @TestMetadata("functionsVisibleFromOtherFile.kt") public void testFunctionsVisibleFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt"); } @TestMetadata("importedDeclarationMangling.kt") public void testImportedDeclarationMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/importedDeclarationMangling.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/importedDeclarationMangling.kt"); } @TestMetadata("packageAndMangledMethodDoNotClash.kt") public void testPackageAndMangledMethodDoNotClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/packageAndMangledMethodDoNotClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/packageAndMangledMethodDoNotClash.kt"); } @TestMetadata("packageAndPrivateDeclarationDoNotClash.kt") public void testPackageAndPrivateDeclarationDoNotClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/packageAndPrivateDeclarationDoNotClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/packageAndPrivateDeclarationDoNotClash.kt"); } } @@ -6056,56 +5369,52 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModule extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("interfaceMethodWithDefaultParameter.kt") public void testInterfaceMethodWithDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/interfaceMethodWithDefaultParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/interfaceMethodWithDefaultParameter.kt"); } @TestMetadata("localClassMetadata.kt") public void testLocalClassMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/localClassMetadata.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/localClassMetadata.kt"); } @TestMetadata("moduleAndVariableNameClash.kt") public void testModuleAndVariableNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt"); } @TestMetadata("privateInterfaceNameClash.kt") public void testPrivateInterfaceNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/privateInterfaceNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/privateInterfaceNameClash.kt"); } @TestMetadata("privateNameClash.kt") public void testPrivateNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/privateNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/privateNameClash.kt"); } @TestMetadata("publishedApiMangling.kt") public void testPublishedApiMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/publishedApiMangling.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/publishedApiMangling.kt"); } @TestMetadata("samePackageNames.kt") public void testSamePackageNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/samePackageNames.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/samePackageNames.kt"); } @TestMetadata("useElementsFromDefaultPackageInAnotherModule.kt") public void testUseElementsFromDefaultPackageInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt"); } } @@ -6113,6 +5422,10 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModuleWrappers extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiModuleWrappers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @@ -6121,26 +5434,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Amd extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInAmd() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/amd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("jsModuleOnPackage.kt") public void testJsModuleOnPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/jsModuleOnPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/amd/jsModuleOnPackage.kt"); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt"); } } @@ -6148,26 +5462,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common_js extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCommon_js() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/common_js"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("inlineFromModuleWithNonIdentifierName.kt") public void testInlineFromModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/inlineFromModuleWithNonIdentifierName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/common_js/inlineFromModuleWithNonIdentifierName.kt"); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt"); } } @@ -6175,26 +5490,27 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Plain extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPlain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/plain"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("inlineFromModuleWithNonIdentifierName.kt") public void testInlineFromModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/inlineFromModuleWithNonIdentifierName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/plain/inlineFromModuleWithNonIdentifierName.kt"); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt"); } } @@ -6202,20 +5518,22 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Umd extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInUmd() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/umd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt"); } } } @@ -6224,62 +5542,57 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiPackage extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiPackage"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classesInheritedFromOtherPackage.kt") public void testClassesInheritedFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/classesInheritedFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/classesInheritedFromOtherPackage.kt"); } @TestMetadata("createClassFromOtherPackage.kt") public void testCreateClassFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt"); } @TestMetadata("createClassFromOtherPackageUsingImport.kt") public void testCreateClassFromOtherPackageUsingImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt"); } @TestMetadata("functionsVisibleFromOtherPackage.kt") public void testFunctionsVisibleFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/functionsVisibleFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/functionsVisibleFromOtherPackage.kt"); } @TestMetadata("nestedPackageFunctionCalledFromOtherPackage.kt") public void testNestedPackageFunctionCalledFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/nestedPackageFunctionCalledFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/nestedPackageFunctionCalledFromOtherPackage.kt"); } @TestMetadata("packageVariableVisibleFromOtherPackage.kt") public void testPackageVariableVisibleFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/packageVariableVisibleFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/packageVariableVisibleFromOtherPackage.kt"); } @TestMetadata("reflectionFromOtherPackage.kt") public void testReflectionFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/reflectionFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/reflectionFromOtherPackage.kt"); } @TestMetadata("subpackagesWithClashingNames.kt") public void testSubpackagesWithClashingNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNames.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNames.kt"); } @TestMetadata("subpackagesWithClashingNamesUsingImport.kt") public void testSubpackagesWithClashingNamesUsingImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNamesUsingImport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNamesUsingImport.kt"); } } @@ -6287,50 +5600,47 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multideclaration extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultideclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multideclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("multiValForArray.kt") public void testMultiValForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForArray.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValForArray.kt"); } @TestMetadata("multiValForMap.kt") public void testMultiValForMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForMap.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValForMap.kt"); } @TestMetadata("multiValForRange.kt") public void testMultiValForRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForRange.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValForRange.kt"); } @TestMetadata("multiValInFor.kt") public void testMultiValInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInFor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValInFor.kt"); } @TestMetadata("multiValInIntFor.kt") public void testMultiValInIntFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInIntFor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValInIntFor.kt"); } @TestMetadata("multiValInIntRangeFor.kt") public void testMultiValInIntRangeFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt"); } @TestMetadata("multiValOrVar.kt") public void testMultiValOrVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValOrVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValOrVar.kt"); } } @@ -6338,116 +5648,102 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NameClashes extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNameClashes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nameClashes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classAndCompanionObjectMembers.kt") public void testClassAndCompanionObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/classAndCompanionObjectMembers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/classAndCompanionObjectMembers.kt"); } @TestMetadata("constructorLocalVar.kt") public void testConstructorLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/constructorLocalVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/constructorLocalVar.kt"); } @TestMetadata("differenceInCapitalization.kt") public void testDifferenceInCapitalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/differenceInCapitalization.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/differenceInCapitalization.kt"); } @TestMetadata("extensionFunctionAndProperty.kt") public void testExtensionFunctionAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/extensionFunctionAndProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/extensionFunctionAndProperty.kt"); } @TestMetadata("extensionPropertiesWithDifferentReceivers.kt") public void testExtensionPropertiesWithDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/extensionPropertiesWithDifferentReceivers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/extensionPropertiesWithDifferentReceivers.kt"); } @TestMetadata("extensionPropertyAndMethod.kt") public void testExtensionPropertyAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/extensionPropertyAndMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/extensionPropertyAndMethod.kt"); } @TestMetadata("jsNameAndPrivate.kt") public void testJsNameAndPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/jsNameAndPrivate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/jsNameAndPrivate.kt"); } @TestMetadata("localFunctionInLambda.kt") public void testLocalFunctionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/localFunctionInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/localFunctionInLambda.kt"); } @TestMetadata("localFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/localFunctions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/localFunctions.kt"); } @TestMetadata("methodAndPrivateProperty.kt") public void testMethodAndPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodAndPrivateProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/methodAndPrivateProperty.kt"); } @TestMetadata("methodOverload.kt") public void testMethodOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/methodOverload.kt"); } @TestMetadata("methodOverloadInClassWithTwoUpperBounds.kt") public void testMethodOverloadInClassWithTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodOverloadInClassWithTwoUpperBounds.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/methodOverloadInClassWithTwoUpperBounds.kt"); } @TestMetadata("nativeAndTopLevelFunction.kt") public void testNativeAndTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/nativeAndTopLevelFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/nativeAndTopLevelFunction.kt"); } @TestMetadata("nativeDeclarationAndLocalVar.kt") public void testNativeDeclarationAndLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/nativeDeclarationAndLocalVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/nativeDeclarationAndLocalVar.kt"); } @TestMetadata("overloadExtension.kt") public void testOverloadExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/overloadExtension.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/overloadExtension.kt"); } @TestMetadata("propertyAndNativeMethod.kt") public void testPropertyAndNativeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/propertyAndNativeMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/propertyAndNativeMethod.kt"); } @TestMetadata("topLevelFunctionAndParameter.kt") public void testTopLevelFunctionAndParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/topLevelFunctionAndParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/topLevelFunctionAndParameter.kt"); } @TestMetadata("withBuiltin.kt") public void testWithBuiltin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/withBuiltin.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/withBuiltin.kt"); } } @@ -6455,10 +5751,13 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessToCompanionObjectFromInlineFun.kt") public void testAccessToCompanionObjectFromInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/accessToCompanionObjectFromInlineFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/accessToCompanionObjectFromInlineFun.kt"); } public void testAllFilesPresentInNative() throws Exception { @@ -6467,252 +5766,192 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("callbackOptionalParameter.kt") public void testCallbackOptionalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/callbackOptionalParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/callbackOptionalParameter.kt"); } @TestMetadata("castToNativeClassChecked.kt") public void testCastToNativeClassChecked() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNativeClassChecked.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/castToNativeClassChecked.kt"); } @TestMetadata("castToNativeInterface.kt") public void testCastToNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNativeInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/castToNativeInterface.kt"); } @TestMetadata("castToNativeInterfaceChecked.kt") public void testCastToNativeInterfaceChecked() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNativeInterfaceChecked.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/castToNativeInterfaceChecked.kt"); } @TestMetadata("castToNullableNativeInterface.kt") public void testCastToNullableNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNullableNativeInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/castToNullableNativeInterface.kt"); } @TestMetadata("castToTypeParamBoundedByNativeInterface.kt") public void testCastToTypeParamBoundedByNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToTypeParamBoundedByNativeInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/castToTypeParamBoundedByNativeInterface.kt"); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/class.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/classObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/classObject.kt"); } @TestMetadata("equalsMangling.kt") public void testEqualsMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/equalsMangling.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/equalsMangling.kt"); } @TestMetadata("eval.kt") public void testEval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/eval.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/eval.kt"); } @TestMetadata("exception.kt") public void testException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/exception.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/exception.kt"); } @TestMetadata("inheritanceFromNativeClass.kt") public void testInheritanceFromNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/inheritanceFromNativeClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/inheritanceFromNativeClass.kt"); } @TestMetadata("inheritanceFromNativeTrait.kt") public void testInheritanceFromNativeTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/inheritanceFromNativeTrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/inheritanceFromNativeTrait.kt"); } @TestMetadata("inheritanceInNativeClass.kt") public void testInheritanceInNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/inheritanceInNativeClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/inheritanceInNativeClass.kt"); } @TestMetadata("kt2209.kt") public void testKt2209() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/kt2209.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/kt2209.kt"); } @TestMetadata("library.kt") public void testLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/library.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/library.kt"); } @TestMetadata("nativeClassAsReifiedTypeArgument.kt") public void testNativeClassAsReifiedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt"); } @TestMetadata("nativeGetterAndNativeSetter.kt") public void testNativeGetterAndNativeSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nativeGetterAndNativeSetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/nativeGetterAndNativeSetter.kt"); } @TestMetadata("nativeInvoke.kt") public void testNativeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nativeInvoke.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/nativeInvoke.kt"); } @TestMetadata("nestedElements.kt") public void testNestedElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nestedElements.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/nestedElements.kt"); } @TestMetadata("objectFunWithVararg.kt") public void testObjectFunWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/objectFunWithVararg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/objectFunWithVararg.kt"); } @TestMetadata("overrideNativeOverloadedFunction.kt") public void testOverrideNativeOverloadedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/overrideNativeOverloadedFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/overrideNativeOverloadedFunction.kt"); } @TestMetadata("passExtLambdaFromNative.kt") public void testPassExtLambdaFromNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passExtLambdaFromNative.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/passExtLambdaFromNative.kt"); } @TestMetadata("passExtLambdaToNative.kt") public void testPassExtLambdaToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passExtLambdaToNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passExtLambdaToNative.kt"); } @TestMetadata("passMemberOrExtFromNative.kt") public void testPassMemberOrExtFromNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passMemberOrExtFromNative.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/passMemberOrExtFromNative.kt"); } @TestMetadata("passMemberOrExtToNative.kt") public void testPassMemberOrExtToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passMemberOrExtToNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passMemberOrExtToNative.kt"); } @TestMetadata("passTopLevelFunctionFromNative.kt") public void testPassTopLevelFunctionFromNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passTopLevelFunctionFromNative.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/passTopLevelFunctionFromNative.kt"); } @TestMetadata("passTopLevelOrLocalFunctionToNative.kt") public void testPassTopLevelOrLocalFunctionToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passTopLevelOrLocalFunctionToNative.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/passTopLevelOrLocalFunctionToNative.kt"); } @TestMetadata("print.kt") public void testPrint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/print.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/print.kt"); } @TestMetadata("privateExternal.kt") public void testPrivateExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/privateExternal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/privateExternal.kt"); } @TestMetadata("safeCastToNativeInterface.kt") public void testSafeCastToNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/safeCastToNativeInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/safeCastToNativeInterface.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/secondaryConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/simple.kt"); } @TestMetadata("simpleUndefined.kt") public void testSimpleUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/simpleUndefined.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/simpleUndefined.kt"); } @TestMetadata("typeof.kt") public void testTypeof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/typeof.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/typeof.kt"); } @TestMetadata("undefined.kt") public void testUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/undefined.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/undefined.kt"); } @TestMetadata("useClassFromInlineFun.kt") public void testUseClassFromInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/useClassFromInlineFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/useClassFromInlineFun.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/vararg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/native/vararg.kt"); } } @@ -6720,104 +5959,92 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedTypes extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNestedTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nestedTypes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("implicitOuterThisFromLambda.kt") public void testImplicitOuterThisFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLambda.kt"); } @TestMetadata("implicitOuterThisFromLocalClass.kt") public void testImplicitOuterThisFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLocalClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLocalClass.kt"); } @TestMetadata("inheritanceFromNestedBuiltIn.kt") public void testInheritanceFromNestedBuiltIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/inheritanceFromNestedBuiltIn.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/inheritanceFromNestedBuiltIn.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/inner.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/inner.kt"); } @TestMetadata("innerObjectRefFromConstructor.kt") public void testInnerObjectRefFromConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/innerObjectRefFromConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/innerObjectRefFromConstructor.kt"); } @TestMetadata("innerReferenceFromChild.kt") public void testInnerReferenceFromChild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/innerReferenceFromChild.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/innerReferenceFromChild.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/nested.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/nested.kt"); } @TestMetadata("nestedInInterface.kt") public void testNestedInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/nestedInInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/nestedInInterface.kt"); } @TestMetadata("nestedObjectLazyInitialized.kt") public void testNestedObjectLazyInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/nestedObjectLazyInitialized.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/nestedObjectLazyInitialized.kt"); } @TestMetadata("outerClassReferenceFromSecondaryConstructor.kt") public void testOuterClassReferenceFromSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerClassReferenceFromSecondaryConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/outerClassReferenceFromSecondaryConstructor.kt"); } @TestMetadata("outerCompanion.kt") public void testOuterCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerCompanion.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/outerCompanion.kt"); } @TestMetadata("outerNative.kt") public void testOuterNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerNative.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/outerNative.kt"); } @TestMetadata("outerObject.kt") public void testOuterObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/outerObject.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerThis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/outerThis.kt"); } @TestMetadata("privateFieldNotOverridenInNestedSubclass.kt") public void testPrivateFieldNotOverridenInNestedSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/privateFieldNotOverridenInNestedSubclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/privateFieldNotOverridenInNestedSubclass.kt"); } @TestMetadata("receivers.kt") public void testReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/receivers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nestedTypes/receivers.kt"); } } @@ -6825,170 +6052,147 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Number extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNumber() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/number"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("assignmentIntOverflow.kt") public void testAssignmentIntOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/assignmentIntOverflow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/assignmentIntOverflow.kt"); } @TestMetadata("byteAndShortConversions.kt") public void testByteAndShortConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/byteAndShortConversions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/byteAndShortConversions.kt"); } @TestMetadata("constantPropagation.kt") public void testConstantPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/constantPropagation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/constantPropagation.kt"); } @TestMetadata("conversionsWithTruncation.kt") public void testConversionsWithTruncation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/conversionsWithTruncation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/conversionsWithTruncation.kt"); } @TestMetadata("conversionsWithoutTruncation.kt") public void testConversionsWithoutTruncation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/conversionsWithoutTruncation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/conversionsWithoutTruncation.kt"); } @TestMetadata("division.kt") public void testDivision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/division.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/division.kt"); } @TestMetadata("doubleConversions.kt") public void testDoubleConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/doubleConversions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/doubleConversions.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/hashCode.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/hashCode.kt"); } @TestMetadata("hexadecimalConstant.kt") public void testHexadecimalConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/hexadecimalConstant.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/hexadecimalConstant.kt"); } @TestMetadata("incDecOptimization.kt") public void testIncDecOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/incDecOptimization.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/incDecOptimization.kt"); } @TestMetadata("intConversions.kt") public void testIntConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intConversions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/intConversions.kt"); } @TestMetadata("intDivFloat.kt") public void testIntDivFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intDivFloat.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/intDivFloat.kt"); } @TestMetadata("intIncDecOverflow.kt") public void testIntIncDecOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intIncDecOverflow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/intIncDecOverflow.kt"); } @TestMetadata("intOverflow.kt") public void testIntOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intOverflow.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/intOverflow.kt"); } @TestMetadata("kt2342.kt") public void testKt2342() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/kt2342.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/kt2342.kt"); } @TestMetadata("longArray.kt") public void testLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longArray.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longArray.kt"); } @TestMetadata("longBinaryOperations.kt") public void testLongBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longBinaryOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longBinaryOperations.kt"); } @TestMetadata("longBitOperations.kt") public void testLongBitOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longBitOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longBitOperations.kt"); } @TestMetadata("longCompareToIntrinsic.kt") public void testLongCompareToIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longCompareToIntrinsic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longCompareToIntrinsic.kt"); } @TestMetadata("longEqualsIntrinsic.kt") public void testLongEqualsIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longEqualsIntrinsic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longEqualsIntrinsic.kt"); } @TestMetadata("longHashCode.kt") public void testLongHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longHashCode.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longHashCode.kt"); } @TestMetadata("longUnaryOperations.kt") public void testLongUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longUnaryOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/longUnaryOperations.kt"); } @TestMetadata("mulInt32.kt") public void testMulInt32() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/mulInt32.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/mulInt32.kt"); } @TestMetadata("numberCompareTo.kt") public void testNumberCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberCompareTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/numberCompareTo.kt"); } @TestMetadata("numberConversions.kt") public void testNumberConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberConversions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/numberConversions.kt"); } @TestMetadata("numberIncDec.kt") public void testNumberIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberIncDec.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/numberIncDec.kt"); } @TestMetadata("numberIsCheck.kt") public void testNumberIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberIsCheck.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/number/numberIsCheck.kt"); } } @@ -6996,74 +6200,67 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectDeclaration extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInObjectDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/objectDeclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("dontPolluteObject.kt") public void testDontPolluteObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/dontPolluteObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/dontPolluteObject.kt"); } @TestMetadata("kt3684.kt") public void testKt3684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/kt3684.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/kt3684.kt"); } @TestMetadata("lambdaInObjectInsideObject.kt") public void testLambdaInObjectInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/lambdaInObjectInsideObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/lambdaInObjectInsideObject.kt"); } @TestMetadata("objectDeclaration.kt") public void testObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectDeclaration.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectDeclaration.kt"); } @TestMetadata("objectDeclarationWithVars.kt") public void testObjectDeclarationWithVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectDeclarationWithVars.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectDeclarationWithVars.kt"); } @TestMetadata("objectInMethod.kt") public void testObjectInMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectInMethod.kt"); } @TestMetadata("objectInObject.kt") public void testObjectInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectInObject.kt"); } @TestMetadata("objectInObjectWithClosure.kt") public void testObjectInObjectWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInObjectWithClosure.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectInObjectWithClosure.kt"); } @TestMetadata("objectInheritingFromATrait.kt") public void testObjectInheritingFromATrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInheritingFromATrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectInheritingFromATrait.kt"); } @TestMetadata("objectInheritingFromClass.kt") public void testObjectInheritingFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInheritingFromClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectInheritingFromClass.kt"); } @TestMetadata("objectWithMethods.kt") public void testObjectWithMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectWithMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/objectDeclaration/objectWithMethods.kt"); } } @@ -7071,146 +6268,127 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorOverloading extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOperatorOverloading() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/operatorOverloading"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("augmentedAssignmentLhs.kt") public void testAugmentedAssignmentLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/augmentedAssignmentLhs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/augmentedAssignmentLhs.kt"); } @TestMetadata("binaryDivOverload.kt") public void testBinaryDivOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/compareTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/compareTo.kt"); } @TestMetadata("compareToByName.kt") public void testCompareToByName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/compareToByName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/compareToByName.kt"); } @TestMetadata("lambdaRhs.kt") public void testLambdaRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt"); } @TestMetadata("notOverload.kt") public void testNotOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/notOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/notOverload.kt"); } @TestMetadata("operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt") public void testOperatorOverloadOnPropertyCallGetterAndSetterOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt"); } @TestMetadata("overloadPlusAssignArrayList.kt") public void testOverloadPlusAssignArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt"); } @TestMetadata("overloadPlusAssignViaExtensionFunction.kt") public void testOverloadPlusAssignViaExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt"); } @TestMetadata("overloadPlusAssignViaPlusExtensionFunction.kt") public void testOverloadPlusAssignViaPlusExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaPlusExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaPlusExtensionFunction.kt"); } @TestMetadata("overloadPlusViaExtensionFunction.kt") public void testOverloadPlusViaExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt"); } @TestMetadata("overloadUnaryOperationsViaExtensionFunctions.kt") public void testOverloadUnaryOperationsViaExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadUnaryOperationsViaExtensionFunctions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/overloadUnaryOperationsViaExtensionFunctions.kt"); } @TestMetadata("overloadedCallOnProperty.kt") public void testOverloadedCallOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadedCallOnProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/overloadedCallOnProperty.kt"); } @TestMetadata("plusAndMinusAsAnExpression.kt") public void testPlusAndMinusAsAnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/plusAndMinusAsAnExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/plusAndMinusAsAnExpression.kt"); } @TestMetadata("plusAssignNoReassign.kt") public void testPlusAssignNoReassign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/plusAssignNoReassign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/plusAssignNoReassign.kt"); } @TestMetadata("plusOverload.kt") public void testPlusOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/plusOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/plusOverload.kt"); } @TestMetadata("postfixInc.kt") public void testPostfixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/postfixInc.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/postfixInc.kt"); } @TestMetadata("postfixOnProperty.kt") public void testPostfixOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/postfixOnProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/postfixOnProperty.kt"); } @TestMetadata("prefixDecOverload.kt") public void testPrefixDecOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/prefixDecOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/prefixDecOverload.kt"); } @TestMetadata("prefixIncReturnsCorrectValue.kt") public void testPrefixIncReturnsCorrectValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/prefixIncReturnsCorrectValue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/prefixIncReturnsCorrectValue.kt"); } @TestMetadata("unaryOnIntProperty.kt") public void testUnaryOnIntProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/unaryOnIntProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/unaryOnIntProperty.kt"); } @TestMetadata("unaryOnIntPropertyAsStatement.kt") public void testUnaryOnIntPropertyAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/unaryOnIntPropertyAsStatement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/unaryOnIntPropertyAsStatement.kt"); } @TestMetadata("usingModInCaseModAssignNotAvailable.kt") public void testUsingModInCaseModAssignNotAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt"); } } @@ -7218,38 +6396,37 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/package"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classCreatedInDeeplyNestedPackage.kt") public void testClassCreatedInDeeplyNestedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt"); } @TestMetadata("deeplyNestedPackage.kt") public void testDeeplyNestedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/deeplyNestedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/deeplyNestedPackage.kt"); } @TestMetadata("deeplyNestedPackageFunctionCalled.kt") public void testDeeplyNestedPackageFunctionCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/deeplyNestedPackageFunctionCalled.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/deeplyNestedPackageFunctionCalled.kt"); } @TestMetadata("initializersOfNestedPackagesExecute.kt") public void testInitializersOfNestedPackagesExecute() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt"); } @TestMetadata("nestedPackage.kt") public void testNestedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/nestedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/nestedPackage.kt"); } } @@ -7257,16 +6434,18 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyAccess extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessToInstanceProperty.kt") public void testAccessToInstanceProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/accessToInstanceProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/accessToInstanceProperty.kt"); } @TestMetadata("accessorsWithJsName.kt") public void testAccessorsWithJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/accessorsWithJsName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/accessorsWithJsName.kt"); } public void testAllFilesPresentInPropertyAccess() throws Exception { @@ -7275,122 +6454,102 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestMetadata("classUsesPackageProperties.kt") public void testClassUsesPackageProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/classUsesPackageProperties.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/classUsesPackageProperties.kt"); } @TestMetadata("customGetter.kt") public void testCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/customGetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/customGetter.kt"); } @TestMetadata("customSetter.kt") public void testCustomSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/customSetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/customSetter.kt"); } @TestMetadata("defaultAccessorsWithJsName.kt") public void testDefaultAccessorsWithJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/defaultAccessorsWithJsName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/defaultAccessorsWithJsName.kt"); } @TestMetadata("enumerable.kt") public void testEnumerable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/enumerable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/enumerable.kt"); } @TestMetadata("extensionLiteralSafeCall.kt") public void testExtensionLiteralSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/extensionLiteralSafeCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/extensionLiteralSafeCall.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/field.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/field.kt"); } @TestMetadata("initInstanceProperties.kt") public void testInitInstanceProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/initInstanceProperties.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/initInstanceProperties.kt"); } @TestMetadata("initValInConstructor.kt") public void testInitValInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/initValInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/initValInConstructor.kt"); } @TestMetadata("overloadedOverriddenFunctionPropertyName.kt") public void testOverloadedOverriddenFunctionPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/overloadedOverriddenFunctionPropertyName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/overloadedOverriddenFunctionPropertyName.kt"); } @TestMetadata("packageCustomAccessors.kt") public void testPackageCustomAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packageCustomAccessors.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/packageCustomAccessors.kt"); } @TestMetadata("packagePropertyInitializer.kt") public void testPackagePropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packagePropertyInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/packagePropertyInitializer.kt"); } @TestMetadata("packagePropertySet.kt") public void testPackagePropertySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packagePropertySet.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/packagePropertySet.kt"); } @TestMetadata("privatePropertyAccessFromMethod.kt") public void testPrivatePropertyAccessFromMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/privatePropertyAccessFromMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/privatePropertyAccessFromMethod.kt"); } @TestMetadata("propertyAssignment.kt") public void testPropertyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/propertyAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/propertyAssignment.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/setter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/setter.kt"); } @TestMetadata("simpleLateInitIsInitialized.kt") public void testSimpleLateInitIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/simpleLateInitIsInitialized.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/simpleLateInitIsInitialized.kt"); } @TestMetadata("staticAccessorsWithJsName.kt") public void testStaticAccessorsWithJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/staticAccessorsWithJsName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/staticAccessorsWithJsName.kt"); } @TestMetadata("subclassAccessorsWithJsNameInSuper.kt") public void testSubclassAccessorsWithJsNameInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/subclassAccessorsWithJsNameInSuper.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/subclassAccessorsWithJsNameInSuper.kt"); } @TestMetadata("twoClassesWithProperties.kt") public void testTwoClassesWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/twoClassesWithProperties.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/twoClassesWithProperties.kt"); } } @@ -7398,74 +6557,67 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyOverride extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPropertyOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyOverride"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("checkSupertypeOrder.kt") public void testCheckSupertypeOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/checkSupertypeOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/checkSupertypeOrder.kt"); } @TestMetadata("initOverrideInConstructor.kt") public void testInitOverrideInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideInConstructor.kt"); } @TestMetadata("initOverrideInConstructorComplex.kt") public void testInitOverrideInConstructorComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorComplex.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorComplex.kt"); } @TestMetadata("initOverrideInConstructorExplicitThis.kt") public void testInitOverrideInConstructorExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorExplicitThis.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorExplicitThis.kt"); } @TestMetadata("initOverrideVarInConstructor.kt") public void testInitOverrideVarInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideVarInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideVarInConstructor.kt"); } @TestMetadata("overloadPrivateVal.kt") public void testOverloadPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overloadPrivateVal.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/overloadPrivateVal.kt"); } @TestMetadata("overrideExtensionProperty.kt") public void testOverrideExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideExtensionProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/overrideExtensionProperty.kt"); } @TestMetadata("overrideNotDirectlySuper.kt") public void testOverrideNotDirectlySuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideNotDirectlySuper.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/overrideNotDirectlySuper.kt"); } @TestMetadata("overrideValFromTraits.kt") public void testOverrideValFromTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideValFromTraits.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/overrideValFromTraits.kt"); } @TestMetadata("overrideValWithBackendFiled.kt") public void testOverrideValWithBackendFiled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideValWithBackendFiled.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/overrideValWithBackendFiled.kt"); } @TestMetadata("simpleOverride.kt") public void testSimpleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/simpleOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/simpleOverride.kt"); } } @@ -7473,74 +6625,67 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Range extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/range"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("creatingProgressions.kt") public void testCreatingProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/creatingProgressions.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/creatingProgressions.kt"); } @TestMetadata("explicitRange.kt") public void testExplicitRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/explicitRange.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/explicitRange.kt"); } @TestMetadata("intDownTo.kt") public void testIntDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intDownTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/intDownTo.kt"); } @TestMetadata("intInRange.kt") public void testIntInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intInRange.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/intInRange.kt"); } @TestMetadata("intUpTo.kt") public void testIntUpTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intUpTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/intUpTo.kt"); } @TestMetadata("iteratingOverRanges.kt") public void testIteratingOverRanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/iteratingOverRanges.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/iteratingOverRanges.kt"); } @TestMetadata("numberRangesOptimized.kt") public void testNumberRangesOptimized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/numberRangesOptimized.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/numberRangesOptimized.kt"); } @TestMetadata("rangeEquals.kt") public void testRangeEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeEquals.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/rangeEquals.kt"); } @TestMetadata("rangeSugarSyntax.kt") public void testRangeSugarSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeSugarSyntax.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/rangeSugarSyntax.kt"); } @TestMetadata("rangeToDoesNotIterate.kt") public void testRangeToDoesNotIterate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeToDoesNotIterate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/rangeToDoesNotIterate.kt"); } @TestMetadata("reverse.kt") public void testReverse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/reverse.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/range/reverse.kt"); } } @@ -7548,92 +6693,82 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("external.kt") public void testExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/external.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/external.kt"); } @TestMetadata("jsClass.kt") public void testJsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/jsClass.kt"); } @TestMetadata("jsClassName.kt") public void testJsClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/jsClassName.kt"); } @TestMetadata("jsClassOnReifiedType.kt") public void testJsClassOnReifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassOnReifiedType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/jsClassOnReifiedType.kt"); } @TestMetadata("jsClassOnReifiedTypeInLambda.kt") public void testJsClassOnReifiedTypeInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassOnReifiedTypeInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/jsClassOnReifiedTypeInLambda.kt"); } @TestMetadata("jsClassSimpleName.kt") public void testJsClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassSimpleName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/jsClassSimpleName.kt"); } @TestMetadata("kClass.kt") public void testKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/kClass.kt"); } @TestMetadata("kClassIsInstance.kt") public void testKClassIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassIsInstance.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/kClassIsInstance.kt"); } @TestMetadata("kClassOnReifiedType.kt") public void testKClassOnReifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassOnReifiedType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/kClassOnReifiedType.kt"); } @TestMetadata("kClassOnReifiedTypeInLambda.kt") public void testKClassOnReifiedTypeInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassOnReifiedTypeInLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/kClassOnReifiedTypeInLambda.kt"); } @TestMetadata("kClassSimpleName.kt") public void testKClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassSimpleName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/kClassSimpleName.kt"); } @TestMetadata("kClassToAndFromJsClass.kt") public void testKClassToAndFromJsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassToAndFromJsClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/kClassToAndFromJsClass.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/primitives.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/primitives.kt"); } @TestMetadata("primitives-12.kt") public void testPrimitives_12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/primitives-12.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reflection/primitives-12.kt"); } } @@ -7641,20 +6776,22 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regression extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRegression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/regression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt2470.kt") public void testKt2470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/regression/kt2470.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/regression/kt2470.kt"); } @TestMetadata("tmpInsidePrimaryConstructor.kt") public void testTmpInsidePrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/regression/tmpInsidePrimaryConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/regression/tmpInsidePrimaryConstructor.kt"); } } @@ -7662,128 +6799,112 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reified"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callChain.kt") public void testCallChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/callChain.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/callChain.kt"); } @TestMetadata("capture.kt") public void testCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/capture.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/capture.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/extensionFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/extensionFun.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/extensionLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/extensionLambda.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/extensionMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/extensionMethod.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/innerObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/innerObject.kt"); } @TestMetadata("isBool.kt") public void testIsBool() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isBool.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/isBool.kt"); } @TestMetadata("isChar.kt") public void testIsChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isChar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/isChar.kt"); } @TestMetadata("isClass.kt") public void testIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/isClass.kt"); } @TestMetadata("isNumber.kt") public void testIsNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isNumber.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/isNumber.kt"); } @TestMetadata("isString.kt") public void testIsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isString.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/isString.kt"); } @TestMetadata("isTNullable.kt") public void testIsTNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isTNullable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/isTNullable.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/lambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/lambda.kt"); } @TestMetadata("lambdaNameClash.kt") public void testLambdaNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/lambdaNameClash.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/lambdaNameClash.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/method.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/method.kt"); } @TestMetadata("multipleTypeParameters.kt") public void testMultipleTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/multipleTypeParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/multipleTypeParameters.kt"); } @TestMetadata("noValueParameters.kt") public void testNoValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/noValueParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/noValueParameters.kt"); } @TestMetadata("parameterSwap.kt") public void testParameterSwap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/parameterSwap.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/parameterSwap.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/vararg.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/vararg.kt"); } @TestMetadata("withInlineTurnedOff.kt") public void testWithInlineTurnedOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/withInlineTurnedOff.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/reified/withInlineTurnedOff.kt"); } } @@ -7791,116 +6912,102 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rtti extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRtti() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/rtti"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("collectionClassesIsCheck.kt") public void testCollectionClassesIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/collectionClassesIsCheck.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/collectionClassesIsCheck.kt"); } @TestMetadata("exceptionIsInterface.kt") public void testExceptionIsInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/exceptionIsInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/exceptionIsInterface.kt"); } @TestMetadata("isComparable.kt") public void testIsComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isComparable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/isComparable.kt"); } @TestMetadata("isJsPrimitiveType.kt") public void testIsJsPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isJsPrimitiveType.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/isJsPrimitiveType.kt"); } @TestMetadata("isObject.kt") public void testIsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/isObject.kt"); } @TestMetadata("isReifiedObject.kt") public void testIsReifiedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isReifiedObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/isReifiedObject.kt"); } @TestMetadata("isSameClass.kt") public void testIsSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isSameClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/isSameClass.kt"); } @TestMetadata("notIsOtherClass.kt") public void testNotIsOtherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/notIsOtherClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/notIsOtherClass.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/objectExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/objectExpression.kt"); } @TestMetadata("onNativeObject.kt") public void testOnNativeObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/onNativeObject.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/onNativeObject.kt"); } @TestMetadata("prototypeUsedToFindInterface.kt") public void testPrototypeUsedToFindInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/prototypeUsedToFindInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/prototypeUsedToFindInterface.kt"); } @TestMetadata("rttiForClass.kt") public void testRttiForClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/rttiForClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/rttiForClass.kt"); } @TestMetadata("rttiForTrait.kt") public void testRttiForTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/rttiForTrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/rttiForTrait.kt"); } @TestMetadata("rttiForTrait2.kt") public void testRttiForTrait2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/rttiForTrait2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/rttiForTrait2.kt"); } @TestMetadata("sideEffectMethod.kt") public void testSideEffectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/sideEffectMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/sideEffectMethod.kt"); } @TestMetadata("sideEffectProperty.kt") public void testSideEffectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/sideEffectProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/sideEffectProperty.kt"); } @TestMetadata("stdlibEmptyListClass.kt") public void testStdlibEmptyListClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt"); } @TestMetadata("subclassOfNativeIsInterface.kt") public void testSubclassOfNativeIsInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/subclassOfNativeIsInterface.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/rtti/subclassOfNativeIsInterface.kt"); } } @@ -7908,50 +7015,47 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/safeCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("redundantSafeAccess.kt") public void testRedundantSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/redundantSafeAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/redundantSafeAccess.kt"); } @TestMetadata("safeAccess.kt") public void testSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeAccess.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeCall.kt"); } @TestMetadata("safeCallAndIntrinsic.kt") public void testSafeCallAndIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCallAndIntrinsic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeCallAndIntrinsic.kt"); } @TestMetadata("safeCallAndSideEffect.kt") public void testSafeCallAndSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCallAndSideEffect.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeCallAndSideEffect.kt"); } @TestMetadata("safeCallReturnsNullIfFails.kt") public void testSafeCallReturnsNullIfFails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCallReturnsNullIfFails.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeCallReturnsNullIfFails.kt"); } @TestMetadata("safeExtensionFunctionCall.kt") public void testSafeExtensionFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeExtensionFunctionCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeExtensionFunctionCall.kt"); } } @@ -7959,200 +7063,172 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSimple() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/simple"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/assign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/assign.kt"); } @TestMetadata("breakDoWhile.kt") public void testBreakDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/breakDoWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/breakDoWhile.kt"); } @TestMetadata("breakWhile.kt") public void testBreakWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/breakWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/breakWhile.kt"); } @TestMetadata("classInstantiation.kt") public void testClassInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/classInstantiation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/classInstantiation.kt"); } @TestMetadata("comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/comparison.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/comparison.kt"); } @TestMetadata("complexExpressionAsConstructorParameter.kt") public void testComplexExpressionAsConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/complexExpressionAsConstructorParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/complexExpressionAsConstructorParameter.kt"); } @TestMetadata("constructorWithParameter.kt") public void testConstructorWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/constructorWithParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/constructorWithParameter.kt"); } @TestMetadata("constructorWithPropertiesAsParameters.kt") public void testConstructorWithPropertiesAsParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/constructorWithPropertiesAsParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/constructorWithPropertiesAsParameters.kt"); } @TestMetadata("continueDoWhile.kt") public void testContinueDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/continueDoWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/continueDoWhile.kt"); } @TestMetadata("continueWhile.kt") public void testContinueWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/continueWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/continueWhile.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/doWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/doWhile.kt"); } @TestMetadata("doWhile2.kt") public void testDoWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/doWhile2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/doWhile2.kt"); } @TestMetadata("elseif.kt") public void testElseif() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/elseif.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/elseif.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/if.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/if.kt"); } @TestMetadata("ifElseAsExpression.kt") public void testIfElseAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/ifElseAsExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/ifElseAsExpression.kt"); } @TestMetadata("methodDeclarationAndCall.kt") public void testMethodDeclarationAndCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/methodDeclarationAndCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/methodDeclarationAndCall.kt"); } @TestMetadata("minusAssignOnProperty.kt") public void testMinusAssignOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/minusAssignOnProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/minusAssignOnProperty.kt"); } @TestMetadata("notBoolean.kt") public void testNotBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/notBoolean.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/notBoolean.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/plusAssign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/plusAssign.kt"); } @TestMetadata("positiveAndNegativeNumbers.kt") public void testPositiveAndNegativeNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/positiveAndNegativeNumbers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/positiveAndNegativeNumbers.kt"); } @TestMetadata("postfixIntOperations.kt") public void testPostfixIntOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/postfixIntOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/postfixIntOperations.kt"); } @TestMetadata("prefixIntOperations.kt") public void testPrefixIntOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/prefixIntOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/prefixIntOperations.kt"); } @TestMetadata("primCtorDelegation1.kt") public void testPrimCtorDelegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/primCtorDelegation1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/primCtorDelegation1.kt"); } @TestMetadata("propertiesAsParametersInitialized.kt") public void testPropertiesAsParametersInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertyAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/propertyAccess.kt"); } @TestMetadata("secCtorDelegation1.kt") public void testSecCtorDelegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation1.kt"); } @TestMetadata("secCtorDelegation2.kt") public void testSecCtorDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation2.kt"); } @TestMetadata("secCtorDelegation3.kt") public void testSecCtorDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation3.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation3.kt"); } @TestMetadata("secCtorDelegation4.kt") public void testSecCtorDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation4.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation4.kt"); } @TestMetadata("simpleInitializer.kt") public void testSimpleInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/simpleInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/simpleInitializer.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/while.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/while.kt"); } @TestMetadata("while2.kt") public void testWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/while2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/while2.kt"); } } @@ -8160,98 +7236,87 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StandardClasses extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStandardClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/standardClasses"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/any.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/any.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/array.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/array.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arrayAccess.kt"); } @TestMetadata("arrayConstructorsWithLambda.kt") public void testArrayConstructorsWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt"); } @TestMetadata("arrayFactoryMethods.kt") public void testArrayFactoryMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayFactoryMethods.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arrayFactoryMethods.kt"); } @TestMetadata("arrayFunctionConstructor.kt") public void testArrayFunctionConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt"); } @TestMetadata("arrayIsFilledWithNulls.kt") public void testArrayIsFilledWithNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt"); } @TestMetadata("arraySize.kt") public void testArraySize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arraySize.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arraySize.kt"); } @TestMetadata("arraysIterator.kt") public void testArraysIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arraysIterator.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/arraysIterator.kt"); } @TestMetadata("charArrayGetSet.kt") public void testCharArrayGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/charArrayGetSet.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/charArrayGetSet.kt"); } @TestMetadata("hashMapTypeOfElement.kt") public void testHashMapTypeOfElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/hashMapTypeOfElement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/hashMapTypeOfElement.kt"); } @TestMetadata("hashSetTypeOfElement.kt") public void testHashSetTypeOfElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/hashSetTypeOfElement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/hashSetTypeOfElement.kt"); } @TestMetadata("mutableMapRemoveWithCollision.kt") public void testMutableMapRemoveWithCollision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/mutableMapRemoveWithCollision.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/mutableMapRemoveWithCollision.kt"); } @TestMetadata("stringBuilder.kt") public void testStringBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/stringBuilder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/stringBuilder.kt"); } @TestMetadata("stringPlus.kt") public void testStringPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/stringPlus.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/standardClasses/stringPlus.kt"); } } @@ -8259,38 +7324,37 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperCall extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSuperCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/superCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classSuperCall.kt") public void testClassSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/classSuperCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/superCall/classSuperCall.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/intrinsic.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/superCall/intrinsic.kt"); } @TestMetadata("nativeSuperClass.kt") public void testNativeSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/nativeSuperClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/superCall/nativeSuperClass.kt"); } @TestMetadata("propertySuperAccess.kt") public void testPropertySuperAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/propertySuperAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/superCall/propertySuperAccess.kt"); } @TestMetadata("traitSuperCall.kt") public void testTraitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/traitSuperCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/superCall/traitSuperCall.kt"); } } @@ -8298,62 +7362,57 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/trait"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("checkImplementationCharacteristics.kt") public void testCheckImplementationCharacteristics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/checkImplementationCharacteristics.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/checkImplementationCharacteristics.kt"); } @TestMetadata("classDerivesFromClassAndTrait.kt") public void testClassDerivesFromClassAndTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/classDerivesFromClassAndTrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/classDerivesFromClassAndTrait.kt"); } @TestMetadata("classDerivesFromTraitAndClass.kt") public void testClassDerivesFromTraitAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/classDerivesFromTraitAndClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/classDerivesFromTraitAndClass.kt"); } @TestMetadata("definitionOrder.kt") public void testDefinitionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/definitionOrder.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/definitionOrder.kt"); } @TestMetadata("example.kt") public void testExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/example.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/example.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/funDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/funDelegation.kt"); } @TestMetadata("traitAddsFunctionsToClass.kt") public void testTraitAddsFunctionsToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/traitAddsFunctionsToClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/traitAddsFunctionsToClass.kt"); } @TestMetadata("traitExtendsTrait.kt") public void testTraitExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/traitExtendsTrait.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/traitExtendsTrait.kt"); } @TestMetadata("traitExtendsTwoTraits.kt") public void testTraitExtendsTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/traitExtendsTwoTraits.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/traitExtendsTwoTraits.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java index d0e92f95038..13cd393c914 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/CallableReferenceInlineTestsGenerated.java @@ -21,178 +21,159 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class CallableReferenceInlineTestsGenerated extends AbstractCallableReferenceInlineTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classLevel.kt") public void testClassLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel.kt"); } @TestMetadata("classLevel2.kt") public void testClassLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/classLevel2.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/constructor.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/intrinsic.kt"); } @TestMetadata("kt15449.kt") public void testKt15449() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt15449.kt"); } @TestMetadata("kt16411.kt") public void testKt16411() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/kt16411.kt"); } @TestMetadata("propertyIntrinsic.kt") public void testPropertyIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyIntrinsic.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/propertyReference.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevel.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelExtension.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/callableReference/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractCallableReferenceInlineTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/classProperty.kt"); } @TestMetadata("emptyLhsFunction.kt") public void testEmptyLhsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/emptyLhsFunction.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/expression.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/extensionReceiver.kt"); } @TestMetadata("filter.kt") public void testFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/filter.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/intrinsic.kt"); } @TestMetadata("kt18728.kt") public void testKt18728() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728.kt"); } @TestMetadata("kt18728_2.kt") public void testKt18728_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_2.kt"); } @TestMetadata("kt18728_3.kt") public void testKt18728_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_3.kt"); } @TestMetadata("kt18728_4.kt") public void testKt18728_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/kt18728_4.kt"); } @TestMetadata("map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/map.kt"); } @TestMetadata("mixed.kt") public void testMixed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/mixed.kt"); } @TestMetadata("objectProperty.kt") public void testObjectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/objectProperty.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/propertyImportedFromObject.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/simple.kt"); } @TestMetadata("topLevelExtensionProperty.kt") public void testTopLevelExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/callableReference/bound/topLevelExtensionProperty.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumValuesInlineTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumValuesInlineTestsGenerated.java index 2d59414ec3a..ea0c99c23e4 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumValuesInlineTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/EnumValuesInlineTestsGenerated.java @@ -21,85 +21,76 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class EnumValuesInlineTestsGenerated extends AbstractEnumValuesInlineTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEnum() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/enum"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt10569.kt") public void testKt10569() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt10569.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt10569.kt"); } @TestMetadata("kt18254.kt") public void testKt18254() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/kt18254.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/kt18254.kt"); } @TestMetadata("valueOf.kt") public void testValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOf.kt"); } @TestMetadata("valueOfCapturedType.kt") public void testValueOfCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfCapturedType.kt"); } @TestMetadata("valueOfChain.kt") public void testValueOfChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChain.kt"); } @TestMetadata("valueOfChainCapturedType.kt") public void testValueOfChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfChainCapturedType.kt"); } @TestMetadata("valueOfNonReified.kt") public void testValueOfNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valueOfNonReified.kt"); } @TestMetadata("values.kt") public void testValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/values.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/values.kt"); } @TestMetadata("valuesAsArray.kt") public void testValuesAsArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesAsArray.kt"); } @TestMetadata("valuesCapturedType.kt") public void testValuesCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesCapturedType.kt"); } @TestMetadata("valuesChain.kt") public void testValuesChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChain.kt"); } @TestMetadata("valuesChainCapturedType.kt") public void testValuesChainCapturedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesChainCapturedType.kt"); } @TestMetadata("valuesNonReified.kt") public void testValuesNonReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/enum/valuesNonReified.kt"); } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java index 9585c357667..9b2d2035f50 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/InlineDefaultValuesTestsGenerated.java @@ -21,16 +21,18 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValuesTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33Parameters.kt"); } @TestMetadata("33ParametersInConstructor.kt") public void test33ParametersInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/33ParametersInConstructor.kt"); } public void testAllFilesPresentInDefaultValues() throws Exception { @@ -39,401 +41,336 @@ public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValu @TestMetadata("defaultInExtension.kt") public void testDefaultInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultInExtension.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethod.kt"); } @TestMetadata("defaultMethodInClass.kt") public void testDefaultMethodInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultMethodInClass.kt"); } @TestMetadata("defaultParamRemapping.kt") public void testDefaultParamRemapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/defaultParamRemapping.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineInDefaultParameter.kt"); } @TestMetadata("inlineLambdaInNoInlineDefault.kt") public void testInlineLambdaInNoInlineDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/inlineLambdaInNoInlineDefault.kt"); } @TestMetadata("kt11479.kt") public void testKt11479() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479.kt"); } @TestMetadata("kt11479InlinedDefaultParameter.kt") public void testKt11479InlinedDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt11479InlinedDefaultParameter.kt"); } @TestMetadata("kt14564.kt") public void testKt14564() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564.kt"); } @TestMetadata("kt14564_2.kt") public void testKt14564_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt14564_2.kt"); } @TestMetadata("kt18689.kt") public void testKt18689() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689.kt"); } @TestMetadata("kt18689_2.kt") public void testKt18689_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_2.kt"); } @TestMetadata("kt18689_3.kt") public void testKt18689_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_3.kt"); } @TestMetadata("kt18689_4.kt") public void testKt18689_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt18689_4.kt"); } @TestMetadata("kt5685.kt") public void testKt5685() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/kt5685.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/simpleDefaultMethod.kt"); } @TestMetadata("varArgNoInline.kt") public void testVarArgNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/varArgNoInline.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaInlining extends AbstractInlineDefaultValuesTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLambdaInlining() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("checkLambdaClassIsPresent.kt") public void testCheckLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassIsPresent.kt"); } @TestMetadata("checkLambdaClassesArePresent.kt") public void testCheckLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkLambdaClassesArePresent.kt"); } @TestMetadata("checkObjectClassIsPresent.kt") public void testCheckObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkObjectClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassIsPresent.kt") public void testCheckStaticLambdaClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassIsPresent.kt"); } @TestMetadata("checkStaticLambdaClassesArePresent.kt") public void testCheckStaticLambdaClassesArePresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticLambdaClassesArePresent.kt"); } @TestMetadata("checkStaticObjectClassIsPresent.kt") public void testCheckStaticObjectClassIsPresent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/checkStaticObjectClassIsPresent.kt"); } @TestMetadata("defaultCallInDefaultLambda.kt") public void testDefaultCallInDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultCallInDefaultLambda.kt"); } @TestMetadata("defaultLambdaInNoInline.kt") public void testDefaultLambdaInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/defaultLambdaInNoInline.kt"); } @TestMetadata("genericLambda.kt") public void testGenericLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/genericLambda.kt"); } @TestMetadata("instanceCapuredInClass.kt") public void testInstanceCapuredInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInClass.kt"); } @TestMetadata("instanceCapuredInInterface.kt") public void testInstanceCapuredInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/instanceCapuredInInterface.kt"); } @TestMetadata("jvmStaticDefault.kt") public void testJvmStaticDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/jvmStaticDefault.kt"); } @TestMetadata("kt21827.kt") public void testKt21827() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/kt21827.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/noInline.kt"); } @TestMetadata("nonDefaultInlineInNoInline.kt") public void testNonDefaultInlineInNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/nonDefaultInlineInNoInline.kt"); } @TestMetadata("receiverClash.kt") public void testReceiverClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash.kt"); } @TestMetadata("receiverClash2.kt") public void testReceiverClash2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClash2.kt"); } @TestMetadata("receiverClashInClass.kt") public void testReceiverClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass.kt"); } @TestMetadata("receiverClashInClass2.kt") public void testReceiverClashInClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/receiverClashInClass2.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simple.kt"); } @TestMetadata("simpleErased.kt") public void testSimpleErased() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErased.kt"); } @TestMetadata("simpleErasedStaticInstance.kt") public void testSimpleErasedStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleErasedStaticInstance.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleExtension.kt"); } @TestMetadata("simpleGeneric.kt") public void testSimpleGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleGeneric.kt"); } @TestMetadata("simpleStaticInstance.kt") public void testSimpleStaticInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/simpleStaticInstance.kt"); } @TestMetadata("thisClash.kt") public void testThisClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClash.kt"); } @TestMetadata("thisClashInClass.kt") public void testThisClashInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/thisClashInClass.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReferences extends AbstractInlineDefaultValuesTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCallableReferences() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boundFunctionReference.kt") public void testBoundFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReference.kt"); } @TestMetadata("boundFunctionReferenceOnInt.kt") public void testBoundFunctionReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnInt.kt"); } @TestMetadata("boundFunctionReferenceOnLong.kt") public void testBoundFunctionReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt"); } @TestMetadata("boundPropertyReference.kt") public void testBoundPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt"); } @TestMetadata("boundPropertyReferenceOnInt.kt") public void testBoundPropertyReferenceOnInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnInt.kt"); } @TestMetadata("boundPropertyReferenceOnLong.kt") public void testBoundPropertyReferenceOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReferenceOnLong.kt"); } @TestMetadata("constuctorReference.kt") public void testConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/constuctorReference.kt"); } @TestMetadata("functionImportedFromObject.kt") public void testFunctionImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionImportedFromObject.kt"); } @TestMetadata("functionReference.kt") public void testFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReference.kt"); } @TestMetadata("functionReferenceFromClass.kt") public void testFunctionReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromClass.kt"); } @TestMetadata("functionReferenceFromObject.kt") public void testFunctionReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/functionReferenceFromObject.kt"); } @TestMetadata("innerClassConstuctorReference.kt") public void testInnerClassConstuctorReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/innerClassConstuctorReference.kt"); } @TestMetadata("privateFunctionReference.kt") public void testPrivateFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privateFunctionReference.kt"); } @TestMetadata("privatePropertyReference.kt") public void testPrivatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/privatePropertyReference.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyImportedFromObject.kt"); } @TestMetadata("propertyReference.kt") public void testPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReference.kt"); } @TestMetadata("propertyReferenceFromClass.kt") public void testPropertyReferenceFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromClass.kt"); } @TestMetadata("propertyReferenceFromObject.kt") public void testPropertyReferenceFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/propertyReferenceFromObject.kt"); } } } @@ -442,16 +379,18 @@ public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValu @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MaskElimination extends AbstractInlineDefaultValuesTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("32Parameters.kt") public void test32Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/32Parameters.kt"); } @TestMetadata("33Parameters.kt") public void test33Parameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/33Parameters.kt"); } public void testAllFilesPresentInMaskElimination() throws Exception { @@ -460,32 +399,27 @@ public class InlineDefaultValuesTestsGenerated extends AbstractInlineDefaultValu @TestMetadata("kt18792.kt") public void testKt18792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt18792.kt"); } @TestMetadata("kt19679.kt") public void testKt19679() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679.kt"); } @TestMetadata("kt19679_2.kt") public void testKt19679_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_2.kt"); } @TestMetadata("kt19679_3.kt") public void testKt19679_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/kt19679_3.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/defaultValues/maskElimination/simple.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrBoxJsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrBoxJsTestGenerated.java index 7e284ae3dc2..01d78c498a6 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrBoxJsTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/IrBoxJsTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @@ -29,25 +33,17 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotation extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/annotation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/annotation/annotationClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/annotation/annotationClass.kt"); } } @@ -55,6 +51,10 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @@ -63,21 +63,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/abstractClassMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/abstractClassMember.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -86,597 +78,177 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("classMemberAndExtension.kt") public void testClassMemberAndExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberAndExtension.kt"); } @TestMetadata("classMemberAndNonExtensionCompatibility.kt") public void testClassMemberAndNonExtensionCompatibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberAndNonExtensionCompatibility.kt"); } @TestMetadata("classMemberFromClass.kt") public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromClass.kt"); } @TestMetadata("classMemberFromExtension.kt") public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromExtension.kt"); } @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); } @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("classMemberOverridden.kt") public void testClassMemberOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/classMemberOverridden.kt"); } @TestMetadata("closureWithSideEffect.kt") public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/closureWithSideEffect.kt"); } @TestMetadata("constructorFromTopLevelNoArgs.kt") public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); } @TestMetadata("constructorFromTopLevelOneStringArg.kt") public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); } @TestMetadata("constructorsWithArgs.kt") public void testConstructorsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/constructorsWithArgs.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extension.kt"); } @TestMetadata("extensionFromClass.kt") public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromClass.kt"); } @TestMetadata("extensionFromExtension.kt") public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromExtension.kt"); } @TestMetadata("extensionFromTopLevel.kt") public void testExtensionFromTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevel.kt"); } @TestMetadata("extensionFromTopLevelStringNoArgs.kt") public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); } @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); } @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); } @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("extensionToPrimitive.kt") public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionToPrimitive.kt"); } @TestMetadata("extensionWithClosure.kt") public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/extensionWithClosure.kt"); } @TestMetadata("localAndTopLevelExtensions.kt") public void testLocalAndTopLevelExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/localAndTopLevelExtensions.kt"); } @TestMetadata("localLocal.kt") public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/localLocal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/localLocal.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/recursiveClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/recursiveClosure.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/simple.kt"); } @TestMetadata("simpleClosure.kt") public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simpleClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/simpleClosure.kt"); } @TestMetadata("simpleWithArg.kt") public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/simpleWithArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/simpleWithArg.kt"); } @TestMetadata("stringNativeExtension.kt") public void testStringNativeExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/stringNativeExtension.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelWithArg.kt") public void testTopLevelFromTopLevelWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/topLevelFromTopLevelWithArg.kt"); } @TestMetadata("unitWithSideEffect.kt") public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/function/unitWithSideEffect.kt"); } } @@ -684,21 +256,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -707,223 +271,67 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/delegated.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/delegated.kt"); } @TestMetadata("delegatedMutable.kt") public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/delegatedMutable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/delegatedMutable.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/extensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/extensionProperty.kt"); } @TestMetadata("kClassInstanceIsInitializedFirst.kt") public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/memberProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/memberProperty.kt"); } @TestMetadata("overriddenInSubclass.kt") public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/overriddenInSubclass.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/simpleExtension.kt"); } @TestMetadata("simpleMember.kt") public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/simpleMember.kt"); } @TestMetadata("simpleMutableExtension.kt") public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/simpleMutableExtension.kt"); } @TestMetadata("simpleMutableMember.kt") public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/simpleMutableMember.kt"); } @TestMetadata("simpleMutableTopLevel.kt") public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/simpleMutableTopLevel.kt"); } @TestMetadata("simpleTopLevel.kt") public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/callableReference/property/topLevelVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/callableReference/property/topLevelVar.kt"); } } } @@ -932,212 +340,72 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Char extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInChar() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/char"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("charBinaryOperations.kt") public void testCharBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charBinaryOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charBinaryOperations.kt"); } @TestMetadata("charCompareToIntrinsic.kt") public void testCharCompareToIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charCompareToIntrinsic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charCompareToIntrinsic.kt"); } @TestMetadata("charConstantByUnicodeId.kt") public void testCharConstantByUnicodeId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charConstantByUnicodeId.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charConstantByUnicodeId.kt"); } @TestMetadata("charConversions.kt") public void testCharConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charConversions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charConversions.kt"); } @TestMetadata("charElvis.kt") public void testCharElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charElvis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charElvis.kt"); } @TestMetadata("charEquals.kt") public void testCharEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charEquals.kt"); } @TestMetadata("charInStringTemplate.kt") public void testCharInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charInStringTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charInStringTemplate.kt"); } @TestMetadata("charIsCheck.kt") public void testCharIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charIsCheck.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charIsCheck.kt"); } @TestMetadata("charRanges.kt") public void testCharRanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charRanges.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charRanges.kt"); } @TestMetadata("charUnaryOperations.kt") public void testCharUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/charUnaryOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/charUnaryOperations.kt"); } @TestMetadata("topLevelCallables.kt") public void testTopLevelCallables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/topLevelCallables.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/topLevelCallables.kt"); } @TestMetadata("unboxedCharSpecials.kt") public void testUnboxedCharSpecials() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/char/unboxedCharSpecials.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/char/unboxedCharSpecials.kt"); } } @@ -1145,21 +413,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassObject extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("accessing.kt") public void testAccessing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/accessing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/accessing.kt"); } public void testAllFilesPresentInClassObject() throws Exception { @@ -1168,155 +428,47 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("defaultObjectSameNamesAsInOuter.kt") public void testDefaultObjectSameNamesAsInOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/defaultObjectSameNamesAsInOuter.kt"); } @TestMetadata("enumCompanionObject.kt") public void testEnumCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/enumCompanionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/enumCompanionObject.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/inTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/inTrait.kt"); } @TestMetadata("invokeOperatorInCompanionObject.kt") public void testInvokeOperatorInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/invokeOperatorInCompanionObject.kt"); } @TestMetadata("namedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/namedClassObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/namedClassObject.kt"); } @TestMetadata("objectInCompanionObject.kt") public void testObjectInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/objectInCompanionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/objectInCompanionObject.kt"); } @TestMetadata("setVar.kt") public void testSetVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/setVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/setVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/simple.kt"); } @TestMetadata("withInheritance.kt") public void testWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/classObject/withInheritance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/classObject/withInheritance.kt"); } } @@ -1324,773 +476,237 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closure extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInClosure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("closureArrayListInstance.kt") public void testClosureArrayListInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureArrayListInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureArrayListInstance.kt"); } @TestMetadata("closureFunctionAsArgument.kt") public void testClosureFunctionAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureFunctionAsArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureFunctionAsArgument.kt"); } @TestMetadata("closureFunctionByInnerFunction.kt") public void testClosureFunctionByInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureFunctionByInnerFunction.kt"); } @TestMetadata("closureGenericTypeValue.kt") public void testClosureGenericTypeValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureGenericTypeValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureGenericTypeValue.kt"); } @TestMetadata("closureInFewFunctionWithDifferentName.kt") public void testClosureInFewFunctionWithDifferentName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInFewFunctionWithDifferentName.kt"); } @TestMetadata("closureInNestedFunctions.kt") public void testClosureInNestedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInNestedFunctions.kt"); } @TestMetadata("closureInNestedFunctionsInMethod.kt") public void testClosureInNestedFunctionsInMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInNestedFunctionsInMethod.kt"); } @TestMetadata("closureInNestedFunctionsWhichMixedWithObject.kt") public void testClosureInNestedFunctionsWhichMixedWithObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInNestedFunctionsWhichMixedWithObject.kt"); } @TestMetadata("closureInNestedLambdasInObject.kt") public void testClosureInNestedLambdasInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInNestedLambdasInObject.kt"); } @TestMetadata("closureInObject.kt") public void testClosureInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInObject.kt"); } @TestMetadata("closureInWithInsideWith.kt") public void testClosureInWithInsideWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureInWithInsideWith.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureInWithInsideWith.kt"); } @TestMetadata("closureLambdaVarInLambda.kt") public void testClosureLambdaVarInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureLambdaVarInLambda.kt"); } @TestMetadata("closureLocalFunction.kt") public void testClosureLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureLocalFunction.kt"); } @TestMetadata("closureLocalFunctionByInnerFunction.kt") public void testClosureLocalFunctionByInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunction.kt"); } @TestMetadata("closureLocalFunctionByInnerFunctionInConstructor.kt") public void testClosureLocalFunctionByInnerFunctionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureLocalFunctionByInnerFunctionInConstructor.kt"); } @TestMetadata("closureLocalInNestedObject.kt") public void testClosureLocalInNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalInNestedObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureLocalInNestedObject.kt"); } @TestMetadata("closureLocalLiteralFunction.kt") public void testClosureLocalLiteralFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureLocalLiteralFunction.kt"); } @TestMetadata("closureReceiverInLocalExtFunByLocalExtFun.kt") public void testClosureReceiverInLocalExtFunByLocalExtFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureReceiverInLocalExtFunByLocalExtFun.kt"); } @TestMetadata("closureReferencingMember.kt") public void testClosureReferencingMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureReferencingMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureReferencingMember.kt"); } @TestMetadata("closureThisAndClassObject.kt") public void testClosureThisAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisAndClassObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisAndClassObject.kt"); } @TestMetadata("closureThisAndReceiver.kt") public void testClosureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisAndReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisAndReceiver.kt"); } @TestMetadata("closureThisByUsingMethodFromParentClass.kt") public void testClosureThisByUsingMethodFromParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisByUsingMethodFromParentClass.kt"); } @TestMetadata("closureThisInConstructor.kt") public void testClosureThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisInConstructor.kt"); } @TestMetadata("closureThisInExtLambdaInsideMethod.kt") public void testClosureThisInExtLambdaInsideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisInExtLambdaInsideMethod.kt"); } @TestMetadata("closureThisInFunctionWhichNamedSameAsParentClass.kt") public void testClosureThisInFunctionWhichNamedSameAsParentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisInFunctionWhichNamedSameAsParentClass.kt"); } @TestMetadata("closureThisInLambdaInsideMethod.kt") public void testClosureThisInLambdaInsideMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisInLambdaInsideMethod.kt"); } @TestMetadata("closureThisInLambdaInsideObject.kt") public void testClosureThisInLambdaInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisInLambdaInsideObject.kt"); } @TestMetadata("closureThisInLocalFunction.kt") public void testClosureThisInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureThisInLocalFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureThisInLocalFunction.kt"); } @TestMetadata("closureValToScopeWithSameNameDeclaration.kt") public void testClosureValToScopeWithSameNameDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureValToScopeWithSameNameDeclaration.kt"); } @TestMetadata("closureVarToScopeWithSameNameDeclaration.kt") public void testClosureVarToScopeWithSameNameDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/closureVarToScopeWithSameNameDeclaration.kt"); } @TestMetadata("deepInnerClassInLocalClass.kt") public void testDeepInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/deepInnerClassInLocalClass.kt"); } @TestMetadata("deepInnerClassInLocalClassFromExtension.kt") public void testDeepInnerClassInLocalClassFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/deepInnerClassInLocalClassFromExtension.kt"); } @TestMetadata("enclosingClassFromInnerLocalClass.kt") public void testEnclosingClassFromInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/enclosingClassFromInnerLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/enclosingClassFromInnerLocalClass.kt"); } @TestMetadata("enclosingClassFromLocalClass.kt") public void testEnclosingClassFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/enclosingClassFromLocalClass.kt"); } @TestMetadata("implicitGenericReceiverInExtensionInLocalClass.kt") public void testImplicitGenericReceiverInExtensionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/implicitGenericReceiverInExtensionInLocalClass.kt"); } @TestMetadata("iteratingCallbacks.kt") public void testIteratingCallbacks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/iteratingCallbacks.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/iteratingCallbacks.kt"); } @TestMetadata("lambdaInLocalFun.kt") public void testLambdaInLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/lambdaInLocalFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/lambdaInLocalFun.kt"); } @TestMetadata("localConstructorAndMethod.kt") public void testLocalConstructorAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/localConstructorAndMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/localConstructorAndMethod.kt"); } @TestMetadata("localParameterInCallback.kt") public void testLocalParameterInCallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/localParameterInCallback.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/localParameterInCallback.kt"); } @TestMetadata("objectWithInvokeOperator.kt") public void testObjectWithInvokeOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/objectWithInvokeOperator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/objectWithInvokeOperator.kt"); } @TestMetadata("recursiveExtFunction.kt") public void testRecursiveExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveExtFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/recursiveExtFunction.kt"); } @TestMetadata("recursiveFunction.kt") public void testRecursiveFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/recursiveFunction.kt"); } @TestMetadata("recursiveFunctionWithSameNameDeclaration.kt") public void testRecursiveFunctionWithSameNameDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/recursiveFunctionWithSameNameDeclaration.kt"); } @TestMetadata("withManyClosuresInNestedFunctionsAndObjects.kt") public void testWithManyClosuresInNestedFunctionsAndObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/withManyClosuresInNestedFunctionsAndObjects.kt"); } @TestMetadata("wrappedVariableInExtensionFun.kt") public void testWrappedVariableInExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/closure/wrappedVariableInExtensionFun.kt"); } } @@ -2098,382 +714,122 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coercion extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCoercion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/coercion"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("bridgeChar.kt") public void testBridgeChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/bridgeChar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/bridgeChar.kt"); } @TestMetadata("charValParameter.kt") public void testCharValParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/charValParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/charValParameter.kt"); } @TestMetadata("classProperty.kt") public void testClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/classProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/classProperty.kt"); } @TestMetadata("defaultAccessors.kt") public void testDefaultAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/defaultAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/defaultAccessors.kt"); } @TestMetadata("derivedFunctionReturningChar.kt") public void testDerivedFunctionReturningChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/derivedFunctionReturningChar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/derivedFunctionReturningChar.kt"); } @TestMetadata("derivedFunctionReturningUnit.kt") public void testDerivedFunctionReturningUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/derivedFunctionReturningUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/derivedFunctionReturningUnit.kt"); } @TestMetadata("destructuringToUnit.kt") public void testDestructuringToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/destructuringToUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/destructuringToUnit.kt"); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/extensionReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/extensionReceiver.kt"); } @TestMetadata("ifWithUnit.kt") public void testIfWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/ifWithUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/ifWithUnit.kt"); } @TestMetadata("inlineFunReturningUnit.kt") public void testInlineFunReturningUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/inlineFunReturningUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/inlineFunReturningUnit.kt"); } @TestMetadata("lambdaParameters.kt") public void testLambdaParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/lambdaParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/lambdaParameters.kt"); } @TestMetadata("loopOverUnits.kt") public void testLoopOverUnits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/loopOverUnits.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/loopOverUnits.kt"); } @TestMetadata("propertyBridgeChar.kt") public void testPropertyBridgeChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/propertyBridgeChar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/propertyBridgeChar.kt"); } @TestMetadata("receiverSmartCast.kt") public void testReceiverSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/receiverSmartCast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/receiverSmartCast.kt"); } @TestMetadata("safeCallLetReturningUnit.kt") public void testSafeCallLetReturningUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/safeCallLetReturningUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/safeCallLetReturningUnit.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/topLevelProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/topLevelProperty.kt"); } @TestMetadata("tryWithEmptyCatch.kt") public void testTryWithEmptyCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/tryWithEmptyCatch.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/tryWithEmptyCatch.kt"); } @TestMetadata("unitAsExtensionReceiver.kt") public void testUnitAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitAsExtensionReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/unitAsExtensionReceiver.kt"); } @TestMetadata("unitIsAs.kt") public void testUnitIsAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitIsAs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/unitIsAs.kt"); } @TestMetadata("unitNullCheck.kt") public void testUnitNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitNullCheck.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/unitNullCheck.kt"); } @TestMetadata("unitSafeCall.kt") public void testUnitSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/unitSafeCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/unitSafeCall.kt"); } @TestMetadata("whenWithUnit.kt") public void testWhenWithUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coercion/whenWithUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coercion/whenWithUnit.kt"); } } @@ -2481,59 +837,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCoroutines() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/coroutines"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("debugStatement.kt") public void testDebugStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coroutines/debugStatement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coroutines/debugStatement.kt"); } @TestMetadata("localVarOptimization.kt") public void testLocalVarOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coroutines/localVarOptimization.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coroutines/localVarOptimization.kt"); } @TestMetadata("nativeExceptions.kt") public void testNativeExceptions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/coroutines/nativeExceptions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/coroutines/nativeExceptions.kt"); } } @@ -2541,280 +865,92 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CrossModuleRef extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCrossModuleRef() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/crossModuleRef"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("callableObjectRef.kt") public void testCallableObjectRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/callableObjectRef.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/callableObjectRef.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/constructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/constructor.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inheritance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/inheritance.kt"); } @TestMetadata("inlineJsModule.kt") public void testInlineJsModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/inlineJsModule.kt"); } @TestMetadata("inlineJsModuleNonIdentifier.kt") public void testInlineJsModuleNonIdentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModuleNonIdentifier.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/inlineJsModuleNonIdentifier.kt"); } @TestMetadata("inlineJsModulePackage.kt") public void testInlineJsModulePackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModulePackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/inlineJsModulePackage.kt"); } @TestMetadata("inlineModule.kt") public void testInlineModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/inlineModule.kt"); } @TestMetadata("inlineModuleNonIndentifier.kt") public void testInlineModuleNonIndentifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineModuleNonIndentifier.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/inlineModuleNonIndentifier.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/lambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/lambda.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/object.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/object.kt"); } @TestMetadata("objectInInlineClosure.kt") public void testObjectInInlineClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/objectInInlineClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/objectInInlineClosure.kt"); } @TestMetadata("objectIsObject.kt") public void testObjectIsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/objectIsObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/objectIsObject.kt"); } @TestMetadata("topLevelExtension.kt") public void testTopLevelExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelExtension.kt"); } @TestMetadata("topLevelFunction.kt") public void testTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelFunction.kt"); } @TestMetadata("topLevelMutableProperty.kt") public void testTopLevelMutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelMutableProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelMutableProperty.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/topLevelProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/crossModuleRef/topLevelProperty.kt"); } } @@ -2822,144 +958,52 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClass extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInDataClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dataClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("components.kt") public void testComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/components.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/components.kt"); } @TestMetadata("copy.kt") public void testCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/copy.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/copy.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/equals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/equals.kt"); } @TestMetadata("hashcode.kt") public void testHashcode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/hashcode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/hashcode.kt"); } @TestMetadata("keyrole.kt") public void testKeyrole() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/keyrole.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/keyrole.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/override.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/override.kt"); } @TestMetadata("privateFields.kt") public void testPrivateFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/privateFields.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/privateFields.kt"); } @TestMetadata("tostring.kt") public void testTostring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dataClass/tostring.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dataClass/tostring.kt"); } } @@ -2967,348 +1011,112 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/defaultArguments"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("complexExpressionAsConstructorDefaultArgument.kt") public void testComplexExpressionAsConstructorDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsConstructorDefaultArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/complexExpressionAsConstructorDefaultArgument.kt"); } @TestMetadata("complexExpressionAsDefaultArgument.kt") public void testComplexExpressionAsDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/complexExpressionAsDefaultArgument.kt"); } @TestMetadata("complexExpressionAsOverriddenDefaultArgument.kt") public void testComplexExpressionAsOverriddenDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/complexExpressionAsOverriddenDefaultArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/complexExpressionAsOverriddenDefaultArgument.kt"); } @TestMetadata("constructorCallWithDefArg1.kt") public void testConstructorCallWithDefArg1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg1.kt"); } @TestMetadata("constructorCallWithDefArg2.kt") public void testConstructorCallWithDefArg2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/constructorCallWithDefArg2.kt"); } @TestMetadata("defArgsWithSuperCall.kt") public void testDefArgsWithSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/defArgsWithSuperCall.kt"); } @TestMetadata("defaultArgumentsInFunctionWithExpressionAsBody.kt") public void testDefaultArgumentsInFunctionWithExpressionAsBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/defaultArgumentsInFunctionWithExpressionAsBody.kt"); } @TestMetadata("enumSuperConstructor.kt") public void testEnumSuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/enumSuperConstructor.kt"); } @TestMetadata("enumWithDefArg.kt") public void testEnumWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/enumWithDefArg.kt"); } @TestMetadata("enumWithOneDefArg.kt") public void testEnumWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/enumWithOneDefArg.kt"); } @TestMetadata("enumWithTwoDefArgs.kt") public void testEnumWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/enumWithTwoDefArgs.kt"); } @TestMetadata("extensionFunWithDefArgs.kt") public void testExtensionFunWithDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/extensionFunWithDefArgs.kt"); } @TestMetadata("funInAbstractClassWithDefArg.kt") public void testFunInAbstractClassWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/funInAbstractClassWithDefArg.kt"); } @TestMetadata("inheritViaAnotherInterface.kt") public void testInheritViaAnotherInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterface.kt"); } @TestMetadata("inheritViaAnotherInterfaceIndirectly.kt") public void testInheritViaAnotherInterfaceIndirectly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterfaceIndirectly.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/inheritViaAnotherInterfaceIndirectly.kt"); } @TestMetadata("overloadFunWithDefArg.kt") public void testOverloadFunWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/overloadFunWithDefArg.kt"); } @TestMetadata("primarySuperConstructor.kt") public void testPrimarySuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/primarySuperConstructor.kt"); } @TestMetadata("secondarySuperConstructor.kt") public void testSecondarySuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/secondarySuperConstructor.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/superCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/superCall.kt"); } @TestMetadata("virtualCallWithDefArg.kt") public void testVirtualCallWithDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/defaultArguments/virtualCallWithDefArg.kt"); } } @@ -3316,399 +1124,127 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegateProperty extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInDelegateProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegateProperty"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("capturedLocalVal.kt") public void testCapturedLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalVal.kt"); } @TestMetadata("capturedLocalValNoInline.kt") public void testCapturedLocalValNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalValNoInline.kt"); } @TestMetadata("capturedLocalVar.kt") public void testCapturedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalVar.kt"); } @TestMetadata("capturedLocalVarNoInline.kt") public void testCapturedLocalVarNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/capturedLocalVarNoInline.kt"); } @TestMetadata("clashingNameInSubclass.kt") public void testClashingNameInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/clashingNameInSubclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/clashingNameInSubclass.kt"); } @TestMetadata("delegateByExtensionProperty.kt") public void testDelegateByExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/delegateByExtensionProperty.kt"); } @TestMetadata("delegateByTopLevelFun.kt") public void testDelegateByTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/delegateByTopLevelFun.kt"); } @TestMetadata("delegateByTopLevelProperty.kt") public void testDelegateByTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/delegateByTopLevelProperty.kt"); } @TestMetadata("delegateWithPropertyAccess.kt") public void testDelegateWithPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/delegateWithPropertyAccess.kt"); } @TestMetadata("getAsExtensionFun.kt") public void testGetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/getAsExtensionFun.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/localVal.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/localVar.kt"); } @TestMetadata("localVarInc.kt") public void testLocalVarInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVarInc.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/localVarInc.kt"); } @TestMetadata("localVarPlusAssign.kt") public void testLocalVarPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/localVarPlusAssign.kt"); } @TestMetadata("metadataReferentialEquality.kt") public void testMetadataReferentialEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/metadataReferentialEquality.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/metadataReferentialEquality.kt"); } @TestMetadata("peculiarName.kt") public void testPeculiarName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/peculiarName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/peculiarName.kt"); } @TestMetadata("propertyMetadata.kt") public void testPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/propertyMetadata.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/propertyMetadata.kt"); } @TestMetadata("setAsExtensionFun.kt") public void testSetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/setAsExtensionFun.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/simple.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/topLevelVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/topLevelVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/topLevelVar.kt"); } @TestMetadata("unusedPropertyMetadata.kt") public void testUnusedPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/unusedPropertyMetadata.kt"); } @TestMetadata("withGenerics.kt") public void testWithGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegateProperty/withGenerics.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegateProperty/withGenerics.kt"); } } @@ -3716,365 +1252,117 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("complexDelegation.kt") public void testComplexDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/complexDelegation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/complexDelegation.kt"); } @TestMetadata("delegation2.kt") public void testDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegation2.kt"); } @TestMetadata("delegation3.kt") public void testDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation3.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegation3.kt"); } @TestMetadata("delegation4.kt") public void testDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegation4.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegation4.kt"); } @TestMetadata("delegationByArg.kt") public void testDelegationByArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationByArg.kt"); } @TestMetadata("delegationByExprWithArgs.kt") public void testDelegationByExprWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationByExprWithArgs.kt"); } @TestMetadata("delegationByFunExpr.kt") public void testDelegationByFunExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByFunExpr.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationByFunExpr.kt"); } @TestMetadata("delegationByIfExpr.kt") public void testDelegationByIfExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByIfExpr.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationByIfExpr.kt"); } @TestMetadata("delegationByInh.kt") public void testDelegationByInh() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByInh.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationByInh.kt"); } @TestMetadata("delegationByNewInstance.kt") public void testDelegationByNewInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationByNewInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationByNewInstance.kt"); } @TestMetadata("delegationChain.kt") public void testDelegationChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationChain.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationChain.kt"); } @TestMetadata("delegationEvaluationOrder1.kt") public void testDelegationEvaluationOrder1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationEvaluationOrder1.kt"); } @TestMetadata("delegationEvaluationOrder2.kt") public void testDelegationEvaluationOrder2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationEvaluationOrder2.kt"); } @TestMetadata("delegationExtFun1.kt") public void testDelegationExtFun1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtFun1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationExtFun1.kt"); } @TestMetadata("delegationExtFun2.kt") public void testDelegationExtFun2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtFun2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationExtFun2.kt"); } @TestMetadata("delegationExtProp.kt") public void testDelegationExtProp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtProp.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationExtProp.kt"); } @TestMetadata("delegationExtensionPropertyDelegated.kt") public void testDelegationExtensionPropertyDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationExtensionPropertyDelegated.kt"); } @TestMetadata("delegationGenericArg.kt") public void testDelegationGenericArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationGenericArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationGenericArg.kt"); } @TestMetadata("delegationMethodsWithArgs.kt") public void testDelegationMethodsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/delegationMethodsWithArgs.kt"); } @TestMetadata("jsNamePropertyDelegation.kt") public void testJsNamePropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/jsNamePropertyDelegation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/jsNamePropertyDelegation.kt"); } @TestMetadata("onObject.kt") public void testOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/delegation/onObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/delegation/onObject.kt"); } } @@ -4082,348 +1370,112 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Dynamic extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInDynamic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dynamic"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("binaryOperations.kt") public void testBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/binaryOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/binaryOperations.kt"); } @TestMetadata("callGetMethod.kt") public void testCallGetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/callGetMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/callGetMethod.kt"); } @TestMetadata("callMethods.kt") public void testCallMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/callMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/callMethods.kt"); } @TestMetadata("callSetMethod.kt") public void testCallSetMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/callSetMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/callSetMethod.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/compareTo.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/compareTo.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/equals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/equals.kt"); } @TestMetadata("getByBrackets.kt") public void testGetByBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/getByBrackets.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/getByBrackets.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/identityEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/identityEquals.kt"); } @TestMetadata("incrementAndDecrement.kt") public void testIncrementAndDecrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/incrementAndDecrement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/incrementAndDecrement.kt"); } @TestMetadata("infixCall.kt") public void testInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/infixCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/infixCall.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/invoke.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/invoke.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/is.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/is.kt"); } @TestMetadata("isJsPrimitiveType.kt") public void testIsJsPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/isJsPrimitiveType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/isJsPrimitiveType.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/iterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/iterator.kt"); } @TestMetadata("nameClashing.kt") public void testNameClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/nameClashing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/nameClashing.kt"); } @TestMetadata("operationsWithAssignment.kt") public void testOperationsWithAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/operationsWithAssignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/operationsWithAssignment.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/propertyAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/propertyAccess.kt"); } @TestMetadata("propertySideEffect.kt") public void testPropertySideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/propertySideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/propertySideEffect.kt"); } @TestMetadata("setByBrackets.kt") public void testSetByBrackets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/setByBrackets.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/setByBrackets.kt"); } @TestMetadata("unaryOperations.kt") public void testUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/dynamic/unaryOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/dynamic/unaryOperations.kt"); } } @@ -4431,21 +1483,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("accessing.kt") public void testAccessing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/accessing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/accessing.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -4454,189 +1498,57 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("enumInheritedFromTrait.kt") public void testEnumInheritedFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumInheritedFromTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/enumInheritedFromTrait.kt"); } @TestMetadata("enumIsComparable.kt") public void testEnumIsComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumIsComparable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/enumIsComparable.kt"); } @TestMetadata("enumWithInheritance.kt") public void testEnumWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/enumWithInheritance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/enumWithInheritance.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/equals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/equals.kt"); } @TestMetadata("equalsNullUndefined.kt") public void testEqualsNullUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/equalsNullUndefined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/equalsNullUndefined.kt"); } @TestMetadata("implementsComparable.kt") public void testImplementsComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/implementsComparable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/implementsComparable.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/initializationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/initializationOrder.kt"); } @TestMetadata("nativeEnum.kt") public void testNativeEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/nativeEnum.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/nativeEnum.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/simpleEnum.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/simpleEnum.kt"); } @TestMetadata("standardMethods.kt") public void testStandardMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/standardMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/standardMethods.kt"); } @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/enum/superCallInEnumLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/enum/superCallInEnumLiteral.kt"); } } @@ -4644,413 +1556,157 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Examples extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInExamples() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/examples"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("basicmethod.kt") public void testBasicmethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/basicmethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/basicmethod.kt"); } @TestMetadata("basicproperty.kt") public void testBasicproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/basicproperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/basicproperty.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/classObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/classObject.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/closureWithParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/closureWithParameterAndBoxing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/closureWithParameterAndBoxing.kt"); } @TestMetadata("doubleEnclosedLocalVariable.kt") public void testDoubleEnclosedLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/doubleEnclosedLocalVariable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/doubleEnclosedLocalVariable.kt"); } @TestMetadata("enclosed.kt") public void testEnclosed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/enclosed.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/enclosed.kt"); } @TestMetadata("enclosingLocalVariable.kt") public void testEnclosingLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/enclosingLocalVariable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/enclosingLocalVariable.kt"); } @TestMetadata("extensionClosure.kt") public void testExtensionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/extensionClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/extensionClosure.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/funDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/funDelegation.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/incrementProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/incrementProperty.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/inheritance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/inheritance.kt"); } @TestMetadata("inheritedInnerClass.kt") public void testInheritedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/inheritedInnerClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/inheritedInnerClass.kt"); } @TestMetadata("inheritedMethod.kt") public void testInheritedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/inheritedMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/inheritedMethod.kt"); } @TestMetadata("initializerBlock.kt") public void testInitializerBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/initializerBlock.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/initializerBlock.kt"); } @TestMetadata("initializerBlockDImpl.kt") public void testInitializerBlockDImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/initializerBlockDImpl.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/initializerBlockDImpl.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/innerClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/innerClass.kt"); } @TestMetadata("kt242.kt") public void testKt242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/kt242.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/kt242.kt"); } @TestMetadata("newInstanceDefaultConstructor.kt") public void testNewInstanceDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/newInstanceDefaultConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/newInstanceDefaultConstructor.kt"); } @TestMetadata("overloadBinaryOperator.kt") public void testOverloadBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadBinaryOperator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/overloadBinaryOperator.kt"); } @TestMetadata("overloadPlusAssignReturn.kt") public void testOverloadPlusAssignReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/overloadPlusAssignReturn.kt"); } @TestMetadata("overloadPlusToPlusAssign.kt") public void testOverloadPlusToPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/overloadPlusToPlusAssign.kt"); } @TestMetadata("overloadUnaryOperator.kt") public void testOverloadUnaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/overloadUnaryOperator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/overloadUnaryOperator.kt"); } @TestMetadata("propertyDelegation.kt") public void testPropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/propertyDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/propertyDelegation.kt"); } @TestMetadata("propertyInInitializer.kt") public void testPropertyInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/propertyInInitializer.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/propertyInInitializer.kt"); } @TestMetadata("rightHandOverride.kt") public void testRightHandOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/rightHandOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/examples/rightHandOverride.kt"); } @TestMetadata("simplestClosure.kt") public void testSimplestClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/simplestClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/simplestClosure.kt"); } @TestMetadata("simplestClosureAndBoxing.kt") public void testSimplestClosureAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/simplestClosureAndBoxing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/simplestClosureAndBoxing.kt"); } @TestMetadata("traitproperty.kt") public void testTraitproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/examples/traitproperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/examples/traitproperty.kt"); } } @@ -5058,6 +1714,10 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @@ -5066,467 +1726,147 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Cast extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCast() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/cast"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("castExtensionToKMutableProperty.kt") public void testCastExtensionToKMutableProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castExtensionToKMutableProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castExtensionToKMutableProperty.kt"); } @TestMetadata("castExtensionToKProperty1.kt") public void testCastExtensionToKProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castExtensionToKProperty1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castExtensionToKProperty1.kt"); } @TestMetadata("castToAny.kt") public void testCastToAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToAny.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToAny.kt"); } @TestMetadata("castToArray.kt") public void testCastToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToArray.kt"); } @TestMetadata("castToFunction.kt") public void testCastToFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToFunction.kt"); } @TestMetadata("castToGenericType.kt") public void testCastToGenericType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToGenericType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToGenericType.kt"); } @TestMetadata("castToGenericTypeWithMultipleUpperBounds.kt") public void testCastToGenericTypeWithMultipleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToGenericTypeWithMultipleUpperBounds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToGenericTypeWithMultipleUpperBounds.kt"); } @TestMetadata("castToGenericTypeWithUpperBound.kt") public void testCastToGenericTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToGenericTypeWithUpperBound.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToGenericTypeWithUpperBound.kt"); } @TestMetadata("castToKMutableProperty0.kt") public void testCastToKMutableProperty0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKMutableProperty0.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToKMutableProperty0.kt"); } @TestMetadata("castToKMutableProperty1.kt") public void testCastToKMutableProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKMutableProperty1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToKMutableProperty1.kt"); } @TestMetadata("castToKProperty0.kt") public void testCastToKProperty0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKProperty0.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToKProperty0.kt"); } @TestMetadata("castToKProperty1.kt") public void testCastToKProperty1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToKProperty1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToKProperty1.kt"); } @TestMetadata("castToNotNull.kt") public void testCastToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToNotNull.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToNotNull.kt"); } @TestMetadata("castToNullable.kt") public void testCastToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/castToNullable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/castToNullable.kt"); } @TestMetadata("explicitUpcast.kt") public void testExplicitUpcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/explicitUpcast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/explicitUpcast.kt"); } @TestMetadata("implicitCastToLong.kt") public void testImplicitCastToLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/implicitCastToLong.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/implicitCastToLong.kt"); } @TestMetadata("primitiveToClass.kt") public void testPrimitiveToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/primitiveToClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/primitiveToClass.kt"); } @TestMetadata("reifiedToNotNull.kt") public void testReifiedToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/reifiedToNotNull.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/reifiedToNotNull.kt"); } @TestMetadata("reifiedToNullable1.kt") public void testReifiedToNullable1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/reifiedToNullable1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/reifiedToNullable1.kt"); } @TestMetadata("reifiedToNullable2.kt") public void testReifiedToNullable2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/reifiedToNullable2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/reifiedToNullable2.kt"); } @TestMetadata("safeCastToGenericTypeWithUpperBound.kt") public void testSafeCastToGenericTypeWithUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToGenericTypeWithUpperBound.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/safeCastToGenericTypeWithUpperBound.kt"); } @TestMetadata("safeCastToNotNull.kt") public void testSafeCastToNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToNotNull.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/safeCastToNotNull.kt"); } @TestMetadata("safeCastToNullable.kt") public void testSafeCastToNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToNullable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/safeCastToNullable.kt"); } @TestMetadata("safeCastToReifiedNotNull.kt") public void testSafeCastToReifiedNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToReifiedNotNull.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/safeCastToReifiedNotNull.kt"); } @TestMetadata("safeCastToReifiedNullable.kt") public void testSafeCastToReifiedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/safeCastToReifiedNullable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/safeCastToReifiedNullable.kt"); } @TestMetadata("smartCastInExtensionFunction.kt") public void testSmartCastInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/smartCastInExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/smartCastInExtensionFunction.kt"); } @TestMetadata("smartCastInFunction.kt") public void testSmartCastInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/cast/smartCastInFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/cast/smartCastInFunction.kt"); } } @@ -5534,42 +1874,22 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompareTo extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCompareTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/compareTo"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("booleanCompareTo.kt") public void testBooleanCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/compareTo/booleanCompareTo.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/compareTo/booleanCompareTo.kt"); } @TestMetadata("customCompareToMethod.kt") public void testCustomCompareToMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/compareTo/customCompareToMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/compareTo/customCompareToMethod.kt"); } } @@ -5577,25 +1897,17 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DollarParameter extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInDollarParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/dollarParameter"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("dollarParameter.kt") public void testDollarParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/dollarParameter/dollarParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/dollarParameter/dollarParameter.kt"); } } @@ -5603,218 +1915,77 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/equals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/arrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/arrays.kt"); } @TestMetadata("compareNullableListWithNull.kt") public void testCompareNullableListWithNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/compareNullableListWithNull.kt"); } @TestMetadata("compareNullablesWithCustomEquals.kt") public void testCompareNullablesWithCustomEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/compareNullablesWithCustomEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/compareNullablesWithCustomEquals.kt"); } @TestMetadata("compareToNullWithCustomEquals.kt") public void testCompareToNullWithCustomEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/compareToNullWithCustomEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/compareToNullWithCustomEquals.kt"); } @TestMetadata("customEqualsMethod.kt") public void testCustomEqualsMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/customEqualsMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/customEqualsMethod.kt"); } @TestMetadata("customEqualsMethodOnAny.kt") public void testCustomEqualsMethodOnAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/customEqualsMethodOnAny.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/customEqualsMethodOnAny.kt"); } @TestMetadata("equalsBehaviorOnNull.kt") public void testEqualsBehaviorOnNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/equalsBehaviorOnNull.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/equalsBehaviorOnNull.kt"); } @TestMetadata("equalsNullOrUndefined.kt") public void testEqualsNullOrUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/equalsNullOrUndefined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/equalsNullOrUndefined.kt"); } @TestMetadata("explicitEqualsMethod.kt") public void testExplicitEqualsMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/explicitEqualsMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/explicitEqualsMethod.kt"); } @TestMetadata("explicitEqualsMethodForPrimitives.kt") public void testExplicitEqualsMethodForPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/explicitEqualsMethodForPrimitives.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/explicitEqualsMethodForPrimitives.kt"); } @TestMetadata("kt2370.kt") public void testKt2370() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/kt2370.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/kt2370.kt"); } @TestMetadata("stringsEqual.kt") public void testStringsEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/stringsEqual.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/equals/stringsEqual.kt"); } @TestMetadata("superEquals.kt") public void testSuperEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/equals/superEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/equals/superEquals.kt"); } } @@ -5822,21 +1993,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluationOrder extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("2dangerousInExpression.kt") public void test2dangerousInExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/2dangerousInExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/2dangerousInExpression.kt"); } public void testAllFilesPresentInEvaluationOrder() throws Exception { @@ -5845,541 +2008,167 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("andAndWithBreakContinueReturn.kt") public void testAndAndWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/andAndWithBreakContinueReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/andAndWithBreakContinueReturn.kt"); } @TestMetadata("andAndWithSideEffect.kt") public void testAndAndWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/andAndWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/andAndWithSideEffect.kt"); } @TestMetadata("andAndWithTmpVarRhs.kt") public void testAndAndWithTmpVarRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/andAndWithTmpVarRhs.kt"); } @TestMetadata("assignToArrayElementWithSideEffect.kt") public void testAssignToArrayElementWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToArrayElementWithSideEffect.kt"); } @TestMetadata("assignToDotQualifiedWithSideEffect.kt") public void testAssignToDotQualifiedWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/assignToDotQualifiedWithSideEffect.kt"); } @TestMetadata("booleanAndOr.kt") public void testBooleanAndOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/booleanAndOr.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/booleanAndOr.kt"); } @TestMetadata("callArgs.kt") public void testCallArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/callArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/callArgs.kt"); } @TestMetadata("callVarargs.kt") public void testCallVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/callVarargs.kt"); } @TestMetadata("callWithBreakContinueReturn.kt") public void testCallWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/callWithBreakContinueReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/callWithBreakContinueReturn.kt"); } @TestMetadata("castWithBreakContinueReturn.kt") public void testCastWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/castWithBreakContinueReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/castWithBreakContinueReturn.kt"); } @TestMetadata("compareToIntrinsicWithSideEffect.kt") public void testCompareToIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/compareToIntrinsicWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/compareToIntrinsicWithSideEffect.kt"); } @TestMetadata("dangerousInline.kt") public void testDangerousInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/dangerousInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/dangerousInline.kt"); } @TestMetadata("dangerousInsideDangerous.kt") public void testDangerousInsideDangerous() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/dangerousInsideDangerous.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/dangerousInsideDangerous.kt"); } @TestMetadata("elvisComplex.kt") public void testElvisComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/elvisComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/elvisComplex.kt"); } @TestMetadata("elvisWithBreakContinueReturn.kt") public void testElvisWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/elvisWithBreakContinueReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/elvisWithBreakContinueReturn.kt"); } @TestMetadata("equalsIntrinsicWithSideEffect.kt") public void testEqualsIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/equalsIntrinsicWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/equalsIntrinsicWithSideEffect.kt"); } @TestMetadata("evaluationOrder1.kt") public void testEvaluationOrder1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder1.kt"); } @TestMetadata("evaluationOrder2.kt") public void testEvaluationOrder2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/evaluationOrder2.kt"); } @TestMetadata("ifAsFunArgument.kt") public void testIfAsFunArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/ifAsFunArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/ifAsFunArgument.kt"); } @TestMetadata("ifAsPlusArgument.kt") public void testIfAsPlusArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/ifAsPlusArgument.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/ifAsPlusArgument.kt"); } @TestMetadata("ifWithComplex.kt") public void testIfWithComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/ifWithComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/ifWithComplex.kt"); } @TestMetadata("intrinsicComplex.kt") public void testIntrinsicComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/intrinsicComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/intrinsicComplex.kt"); } @TestMetadata("intrinsicWithBreakContinueReturn.kt") public void testIntrinsicWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/intrinsicWithBreakContinueReturn.kt"); } @TestMetadata("literalFunctionAsArgumentWithSideEffect.kt") public void testLiteralFunctionAsArgumentWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/literalFunctionAsArgumentWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/literalFunctionAsArgumentWithSideEffect.kt"); } @TestMetadata("loopWithBreakContinueReturnInCondition.kt") public void testLoopWithBreakContinueReturnInCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/loopWithBreakContinueReturnInCondition.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/loopWithBreakContinueReturnInCondition.kt"); } @TestMetadata("orOrWithBreakContinueReturn.kt") public void testOrOrWithBreakContinueReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/orOrWithBreakContinueReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithBreakContinueReturn.kt"); } @TestMetadata("orOrWithSideEffect.kt") public void testOrOrWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/orOrWithSideEffect.kt"); } @TestMetadata("reassignmentLhsCaching.kt") public void testReassignmentLhsCaching() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/reassignmentLhsCaching.kt"); } @TestMetadata("secondaryConstructorTemporaryVars.kt") public void testSecondaryConstructorTemporaryVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/secondaryConstructorTemporaryVars.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/evaluationOrder/secondaryConstructorTemporaryVars.kt"); } @TestMetadata("singleComponentDestructuring.kt") public void testSingleComponentDestructuring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/singleComponentDestructuring.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/singleComponentDestructuring.kt"); } @TestMetadata("whenAsMinusArgument.kt") public void testWhenAsMinusArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/whenAsMinusArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/whenAsMinusArgument.kt"); } @TestMetadata("whenJsLiteralWithSideEffect.kt") public void testWhenJsLiteralWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/whenJsLiteralWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/whenJsLiteralWithSideEffect.kt"); } @TestMetadata("whenWithComplexConditions.kt") public void testWhenWithComplexConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/evaluationOrder/whenWithComplexConditions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/evaluationOrder/whenWithComplexConditions.kt"); } } @@ -6387,263 +2176,87 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class For extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInFor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/for"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("forIteratesOverArray.kt") public void testForIteratesOverArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverArray.kt"); } @TestMetadata("forIteratesOverLiteralRange.kt") public void testForIteratesOverLiteralRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverLiteralRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverLiteralRange.kt"); } @TestMetadata("forIteratesOverNonLiteralRange.kt") public void testForIteratesOverNonLiteralRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverNonLiteralRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverNonLiteralRange.kt"); } @TestMetadata("forIteratesOverSomethingWithIterator.kt") public void testForIteratesOverSomethingWithIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverSomethingWithIterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverSomethingWithIterator.kt"); } @TestMetadata("forIteratesOverTypeParameter.kt") public void testForIteratesOverTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forIteratesOverTypeParameter.kt"); } @TestMetadata("forOnEmptyArray.kt") public void testForOnEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forOnEmptyArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forOnEmptyArray.kt"); } @TestMetadata("forWithComplexOneStatement.kt") public void testForWithComplexOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forWithComplexOneStatement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forWithComplexOneStatement.kt"); } @TestMetadata("forWithEmptyBody.kt") public void testForWithEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forWithEmptyBody.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forWithEmptyBody.kt"); } @TestMetadata("forWithSideEffectImElementAccessAndWithEmptyBody.kt") public void testForWithSideEffectImElementAccessAndWithEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/forWithSideEffectImElementAccessAndWithEmptyBody.kt"); } @TestMetadata("labeledFor.kt") public void testLabeledFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/labeledFor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/labeledFor.kt"); } @TestMetadata("labeledForWithContinue.kt") public void testLabeledForWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/labeledForWithContinue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/labeledForWithContinue.kt"); } @TestMetadata("labeledForWithWhile.kt") public void testLabeledForWithWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/labeledForWithWhile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/labeledForWithWhile.kt"); } @TestMetadata("overArrayWithIndex.kt") public void testOverArrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/overArrayWithIndex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/overArrayWithIndex.kt"); } @TestMetadata("overCollectionWithIndex.kt") public void testOverCollectionWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/overCollectionWithIndex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/overCollectionWithIndex.kt"); } @TestMetadata("rangeOptimization.kt") public void testRangeOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/for/rangeOptimization.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/for/rangeOptimization.kt"); } } @@ -6651,21 +2264,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("adderClosure.kt") public void testAdderClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/adderClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/adderClosure.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -6674,546 +2279,162 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("anonymousWithLambda.kt") public void testAnonymousWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/anonymousWithLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/anonymousWithLambda.kt"); } @TestMetadata("callFunInInit.kt") public void testCallFunInInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/callFunInInit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/callFunInInit.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/closureWithParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/closureWithParameterAndBoxing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/closureWithParameterAndBoxing.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/defaultParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/defaultParameters.kt"); } @TestMetadata("enclosingThis.kt") public void testEnclosingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/enclosingThis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/enclosingThis.kt"); } @TestMetadata("expressionAsExtFunction.kt") public void testExpressionAsExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/expressionAsExtFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/expressionAsExtFunction.kt"); } @TestMetadata("expressionAsFunction.kt") public void testExpressionAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/expressionAsFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/expressionAsFunction.kt"); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionExpression.kt"); } @TestMetadata("functionInsideFunction.kt") public void testFunctionInsideFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionInsideFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionInsideFunction.kt"); } @TestMetadata("functionLiteral.kt") public void testFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionLiteral.kt"); } @TestMetadata("functionLiteralAsLastParameter.kt") public void testFunctionLiteralAsLastParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionLiteralAsLastParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionLiteralAsLastParameter.kt"); } @TestMetadata("functionLiteralAsParameter.kt") public void testFunctionLiteralAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionLiteralAsParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionLiteralAsParameter.kt"); } @TestMetadata("functionUsedBeforeDeclaration.kt") public void testFunctionUsedBeforeDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionUsedBeforeDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionUsedBeforeDeclaration.kt"); } @TestMetadata("functionWithTwoParametersCall.kt") public void testFunctionWithTwoParametersCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/functionWithTwoParametersCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/functionWithTwoParametersCall.kt"); } @TestMetadata("implicitItParameter.kt") public void testImplicitItParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/implicitItParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/implicitItParameter.kt"); } @TestMetadata("KT-921.kt") public void testKT_921() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/KT-921.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/KT-921.kt"); } @TestMetadata("lambdaOrLocalFunInsideEnumMethod.kt") public void testLambdaOrLocalFunInsideEnumMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/lambdaOrLocalFunInsideEnumMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/lambdaOrLocalFunInsideEnumMethod.kt"); } @TestMetadata("localExtFunction.kt") public void testLocalExtFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/localExtFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/localExtFunction.kt"); } @TestMetadata("localInInitBlock.kt") public void testLocalInInitBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/localInInitBlock.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/localInInitBlock.kt"); } @TestMetadata("loopClosure.kt") public void testLoopClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/loopClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/loopClosure.kt"); } @TestMetadata("mangling.kt") public void testMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/mangling.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/mangling.kt"); } @TestMetadata("manglingAnyMethods.kt") public void testManglingAnyMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingAnyMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/manglingAnyMethods.kt"); } @TestMetadata("manglingClashFunctionsAndClasses.kt") public void testManglingClashFunctionsAndClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingClashFunctionsAndClasses.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/manglingClashFunctionsAndClasses.kt"); } @TestMetadata("manglingClashWithFunctionsWithoutParameters.kt") public void testManglingClashWithFunctionsWithoutParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingClashWithFunctionsWithoutParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/manglingClashWithFunctionsWithoutParameters.kt"); } @TestMetadata("manglingStability.kt") public void testManglingStability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/manglingStability.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/manglingStability.kt"); } @TestMetadata("namedArguments.kt") public void testNamedArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/namedArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/namedArguments.kt"); } @TestMetadata("overloadClassConstructorByFactoryMethod.kt") public void testOverloadClassConstructorByFactoryMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/overloadClassConstructorByFactoryMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/overloadClassConstructorByFactoryMethod.kt"); } @TestMetadata("overloadOverridenFun.kt") public void testOverloadOverridenFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/overloadOverridenFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/overloadOverridenFun.kt"); } @TestMetadata("overloadingWithInheritance.kt") public void testOverloadingWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/overloadingWithInheritance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/overloadingWithInheritance.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/vararg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/vararg.kt"); } @TestMetadata("whenFunction.kt") public void testWhenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/function/whenFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/function/whenFunction.kt"); } } @@ -7221,37 +2442,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IdentifierClash extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInIdentifierClash() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identifierClash"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("overloadedFun.kt") public void testOverloadedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identifierClash/overloadedFun.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identifierClash/overloadedFun.kt"); } @TestMetadata("privateDeclarations.kt") public void testPrivateDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identifierClash/privateDeclarations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/identifierClash/privateDeclarations.kt"); } @TestMetadata("useVariableOfNameOfFunction.kt") public void testUseVariableOfNameOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identifierClash/useVariableOfNameOfFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identifierClash/useVariableOfNameOfFunction.kt"); } } @@ -7259,31 +2470,22 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IdentityEquals extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInIdentityEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identityEquals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("identityEqualsMethod.kt") public void testIdentityEqualsMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethod.kt"); } @TestMetadata("identityEqualsMethodForPrimitives.kt") public void testIdentityEqualsMethodForPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethodForPrimitives.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/identityEquals/identityEqualsMethodForPrimitives.kt"); } } @@ -7291,93 +2493,37 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class If extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInIf() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/if"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("ifElseAsExpressionWithThrow.kt") public void testIfElseAsExpressionWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/ifElseAsExpressionWithThrow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/if/ifElseAsExpressionWithThrow.kt"); } @TestMetadata("ifElseCurlyBraces.kt") public void testIfElseCurlyBraces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/ifElseCurlyBraces.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/if/ifElseCurlyBraces.kt"); } @TestMetadata("ifInsideLambda.kt") public void testIfInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/ifInsideLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/if/ifInsideLambda.kt"); } @TestMetadata("nestedIf.kt") public void testNestedIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/nestedIf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/if/nestedIf.kt"); } @TestMetadata("withEmptyBlocks.kt") public void testWithEmptyBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/if/withEmptyBlocks.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/if/withEmptyBlocks.kt"); } } @@ -7385,190 +2531,72 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/invoke"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("explicitInvokeLambda.kt") public void testExplicitInvokeLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/explicitInvokeLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/explicitInvokeLambda.kt"); } @TestMetadata("extensionInvoke.kt") public void testExtensionInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/extensionInvoke.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/extensionInvoke.kt"); } @TestMetadata("inheritFromFunctionTraits.kt") public void testInheritFromFunctionTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/inheritFromFunctionTraits.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/inheritFromFunctionTraits.kt"); } @TestMetadata("internalFunctionFromSuperclass.kt") public void testInternalFunctionFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt"); } @TestMetadata("invokeInExtensionFunctionLiteral.kt") public void testInvokeInExtensionFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeInExtensionFunctionLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeInExtensionFunctionLiteral.kt"); } @TestMetadata("invokeInFunctionLiteral.kt") public void testInvokeInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeInFunctionLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeInFunctionLiteral.kt"); } @TestMetadata("invokeMethod.kt") public void testInvokeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeMethod.kt"); } @TestMetadata("invokeOnExprByConvention.kt") public void testInvokeOnExprByConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeOnExprByConvention.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeOnExprByConvention.kt"); } @TestMetadata("invokeWithDispatchAndExtensionReceivers.kt") public void testInvokeWithDispatchAndExtensionReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithDispatchAndExtensionReceivers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithDispatchAndExtensionReceivers.kt"); } @TestMetadata("invokeWithDispatchReceiver.kt") public void testInvokeWithDispatchReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithDispatchReceiver.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithDispatchReceiver.kt"); } @TestMetadata("invokeWithExtensionReceiver.kt") public void testInvokeWithExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithExtensionReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithExtensionReceiver.kt"); } @TestMetadata("invokeWithImplicitDispatchReceiverAndExtensionReceiver.kt") public void testInvokeWithImplicitDispatchReceiverAndExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/invokeWithImplicitDispatchReceiverAndExtensionReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/invoke/invokeWithImplicitDispatchReceiverAndExtensionReceiver.kt"); } } @@ -7576,661 +2604,217 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Misc extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInMisc() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/misc"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classWithoutPackage.kt") public void testClassWithoutPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/classWithoutPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/classWithoutPackage.kt"); } @TestMetadata("elvis.kt") public void testElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/elvis.kt"); } @TestMetadata("elvisReturnNested.kt") public void testElvisReturnNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvisReturnNested.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/elvisReturnNested.kt"); } @TestMetadata("elvisReturnSimple.kt") public void testElvisReturnSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/elvisReturnSimple.kt"); } @TestMetadata("elvisWithThrow.kt") public void testElvisWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/elvisWithThrow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/elvisWithThrow.kt"); } @TestMetadata("exclExcl.kt") public void testExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/exclExcl.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/exclExcl.kt"); } @TestMetadata("exclExclResultIsComputedOnce.kt") public void testExclExclResultIsComputedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/exclExclResultIsComputedOnce.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/exclExclResultIsComputedOnce.kt"); } @TestMetadata("exclExclThrows.kt") public void testExclExclThrows() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/exclExclThrows.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/exclExclThrows.kt"); } @TestMetadata("extensionLiteralCalledInsideExtensionFunction.kt") public void testExtensionLiteralCalledInsideExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/extensionLiteralCalledInsideExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/extensionLiteralCalledInsideExtensionFunction.kt"); } @TestMetadata("extensionLiteralCreatedAtPackageLevel.kt") public void testExtensionLiteralCreatedAtPackageLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/extensionLiteralCreatedAtPackageLevel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/extensionLiteralCreatedAtPackageLevel.kt"); } @TestMetadata("funInConstructor.kt") public void testFunInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/funInConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/funInConstructor.kt"); } @TestMetadata("funInConstructorBlock.kt") public void testFunInConstructorBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/funInConstructorBlock.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/funInConstructorBlock.kt"); } @TestMetadata("inheritFromJetIterator.kt") public void testInheritFromJetIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/inheritFromJetIterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/inheritFromJetIterator.kt"); } @TestMetadata("intRange.kt") public void testIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/intRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/intRange.kt"); } @TestMetadata("KT-1052.kt") public void testKT_1052() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1052.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-1052.kt"); } @TestMetadata("KT-1052-2.kt") public void testKT_1052_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1052-2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-1052-2.kt"); } @TestMetadata("KT-1361-1.kt") public void testKT_1361_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1361-1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-1361-1.kt"); } @TestMetadata("KT-1361-2.kt") public void testKT_1361_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1361-2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-1361-2.kt"); } @TestMetadata("KT-1865.kt") public void testKT_1865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-1865.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-1865.kt"); } @TestMetadata("KT-2314.kt") public void testKT_2314() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-2314.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-2314.kt"); } @TestMetadata("KT-5058.kt") public void testKT_5058() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-5058.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-5058.kt"); } @TestMetadata("KT-740.kt") public void testKT_740() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-740.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-740.kt"); } @TestMetadata("KT-740-2.kt") public void testKT_740_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-740-2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-740-2.kt"); } @TestMetadata("KT-740-3.kt") public void testKT_740_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-740-3.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/KT-740-3.kt"); } @TestMetadata("KT-817.kt") public void testKT_817() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/KT-817.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/KT-817.kt"); } @TestMetadata("kt9443.kt") public void testKt9443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/kt9443.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/kt9443.kt"); } @TestMetadata("lazyProperty.kt") public void testLazyProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/lazyProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/lazyProperty.kt"); } @TestMetadata("localProperty.kt") public void testLocalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/localProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/localProperty.kt"); } @TestMetadata("localVarAsFunction.kt") public void testLocalVarAsFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/localVarAsFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/localVarAsFunction.kt"); } @TestMetadata("packageLevelVarInPackage.kt") public void testPackageLevelVarInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/packageLevelVarInPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/packageLevelVarInPackage.kt"); } @TestMetadata("packageLevelVarInRoot.kt") public void testPackageLevelVarInRoot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/packageLevelVarInRoot.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/packageLevelVarInRoot.kt"); } @TestMetadata("packagePropertyCalledAsFun.kt") public void testPackagePropertyCalledAsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/packagePropertyCalledAsFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/packagePropertyCalledAsFun.kt"); } @TestMetadata("propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt") public void testPropertiesWithExplicitlyDefinedAccessorsWithoutBodies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/misc/propertiesWithExplicitlyDefinedAccessorsWithoutBodies.kt"); } @TestMetadata("propertyAsFunCalledOnConstructor.kt") public void testPropertyAsFunCalledOnConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/propertyAsFunCalledOnConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/propertyAsFunCalledOnConstructor.kt"); } @TestMetadata("rightAssocForGeneratedConditionalOperator.kt") public void testRightAssocForGeneratedConditionalOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/rightAssocForGeneratedConditionalOperator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/rightAssocForGeneratedConditionalOperator.kt"); } @TestMetadata("safeCallComputesExpressionOnlyOnce.kt") public void testSafeCallComputesExpressionOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/safeCallComputesExpressionOnlyOnce.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/safeCallComputesExpressionOnlyOnce.kt"); } @TestMetadata("stringInterpolationEvaluationOrder.kt") public void testStringInterpolationEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/stringInterpolationEvaluationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/stringInterpolationEvaluationOrder.kt"); } @TestMetadata("temporaryVariableCreatedInPackageInitializer.kt") public void testTemporaryVariableCreatedInPackageInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/temporaryVariableCreatedInPackageInitializer.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/temporaryVariableCreatedInPackageInitializer.kt"); } @TestMetadata("throwThrow.kt") public void testThrowThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/throwThrow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/throwThrow.kt"); } @TestMetadata("toGeneratorInStdlib.kt") public void testToGeneratorInStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/toGeneratorInStdlib.kt"); } @TestMetadata("whenReturnedWithoutBlock.kt") public void testWhenReturnedWithoutBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/misc/whenReturnedWithoutBlock.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/misc/whenReturnedWithoutBlock.kt"); } } @@ -8238,174 +2822,77 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringClass extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInStringClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("extensionMethods.kt") public void testExtensionMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/extensionMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/extensionMethods.kt"); } @TestMetadata("intInTemplate.kt") public void testIntInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/intInTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/intInTemplate.kt"); } @TestMetadata("kt2227.kt") public void testKt2227() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/kt2227.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/kt2227.kt"); } @TestMetadata("kt2227_2.kt") public void testKt2227_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/kt2227_2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/kt2227_2.kt"); } @TestMetadata("multipleExpressionsInTemplate.kt") public void testMultipleExpressionsInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/multipleExpressionsInTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/multipleExpressionsInTemplate.kt"); } @TestMetadata("nullableTypeInStringTemplate.kt") public void testNullableTypeInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/nullableTypeInStringTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/nullableTypeInStringTemplate.kt"); } @TestMetadata("numbersInTemplate.kt") public void testNumbersInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/numbersInTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/numbersInTemplate.kt"); } @TestMetadata("objectToStringCallInTemplate.kt") public void testObjectToStringCallInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/objectToStringCallInTemplate.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/objectToStringCallInTemplate.kt"); } @TestMetadata("stringAssignment.kt") public void testStringAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringAssignment.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/stringAssignment.kt"); } @TestMetadata("stringConstant.kt") public void testStringConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringConstant.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringClass/stringConstant.kt"); } @TestMetadata("stringInTemplate.kt") public void testStringInTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringInTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/stringInTemplate.kt"); } @TestMetadata("stringNotEqualToNumber.kt") public void testStringNotEqualToNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/stringNotEqualToNumber.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/stringNotEqualToNumber.kt"); } @TestMetadata("subSequence.kt") public void testSubSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringClass/subSequence.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringClass/subSequence.kt"); } } @@ -8413,48 +2900,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringTemplates extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInStringTemplates() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringTemplates"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("nonStrings.kt") public void testNonStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringTemplates/nonStrings.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/stringTemplates/nonStrings.kt"); } @TestMetadata("objectWithToString.kt") public void testObjectWithToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringTemplates/objectWithToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringTemplates/objectWithToString.kt"); } @TestMetadata("stringValues.kt") public void testStringValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/stringTemplates/stringValues.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/stringTemplates/stringValues.kt"); } } @@ -8462,161 +2928,57 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Try extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInTry() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/try"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("exceptionToString.kt") public void testExceptionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/exceptionToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/exceptionToString.kt"); } @TestMetadata("multipleCatchBlocks.kt") public void testMultipleCatchBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/multipleCatchBlocks.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/multipleCatchBlocks.kt"); } @TestMetadata("rethrowExceptionIfNotCaught.kt") public void testRethrowExceptionIfNotCaught() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/rethrowExceptionIfNotCaught.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/rethrowExceptionIfNotCaught.kt"); } @TestMetadata("tryCatchCorrectForSubclasses.kt") public void testTryCatchCorrectForSubclasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchCorrectForSubclasses.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/tryCatchCorrectForSubclasses.kt"); } @TestMetadata("tryCatchDynamic.kt") public void testTryCatchDynamic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchDynamic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/tryCatchDynamic.kt"); } @TestMetadata("tryCatchExpr.kt") public void testTryCatchExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchExpr.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/tryCatchExpr.kt"); } @TestMetadata("tryCatchExpressionWithMessage.kt") public void testTryCatchExpressionWithMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchExpressionWithMessage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/tryCatchExpressionWithMessage.kt"); } @TestMetadata("tryCatchThrowable.kt") public void testTryCatchThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchThrowable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/tryCatchThrowable.kt"); } @TestMetadata("tryCatchWithDifferentParameterNames.kt") public void testTryCatchWithDifferentParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/try/tryCatchWithDifferentParameterNames.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/try/tryCatchWithDifferentParameterNames.kt"); } } @@ -8624,464 +2986,172 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/when"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("doWhileWithOneStmWhen.kt") public void testDoWhileWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/doWhileWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/doWhileWithOneStmWhen.kt"); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/empty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/empty.kt"); } @TestMetadata("exhaustiveCheckException.kt") public void testExhaustiveCheckException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/exhaustiveCheckException.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/exhaustiveCheckException.kt"); } @TestMetadata("externalEnumSubject.kt") public void testExternalEnumSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/externalEnumSubject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/externalEnumSubject.kt"); } @TestMetadata("forWithOneStmWhen.kt") public void testForWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/forWithOneStmWhen.kt"); } @TestMetadata("ifInWhen.kt") public void testIfInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/ifInWhen.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/ifInWhen.kt"); } @TestMetadata("ifInWhenDanglingElseIssue.kt") public void testIfInWhenDanglingElseIssue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/ifInWhenDanglingElseIssue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/ifInWhenDanglingElseIssue.kt"); } @TestMetadata("ifWithOneStmWhen.kt") public void testIfWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/ifWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/ifWithOneStmWhen.kt"); } @TestMetadata("kt1665.kt") public void testKt1665() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/kt1665.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/kt1665.kt"); } @TestMetadata("matchNullableType.kt") public void testMatchNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/matchNullableType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/matchNullableType.kt"); } @TestMetadata("multipleCases.kt") public void testMultipleCases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/multipleCases.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/multipleCases.kt"); } @TestMetadata("whenAsExpression.kt") public void testWhenAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenAsExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenAsExpression.kt"); } @TestMetadata("whenAsExpressionWithThrow.kt") public void testWhenAsExpressionWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenAsExpressionWithThrow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenAsExpressionWithThrow.kt"); } @TestMetadata("whenConditionWithReturn.kt") public void testWhenConditionWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenConditionWithReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenConditionWithReturn.kt"); } @TestMetadata("whenEqualsPattern.kt") public void testWhenEqualsPattern() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenEqualsPattern.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenEqualsPattern.kt"); } @TestMetadata("whenEvaluatesArgumentOnlyOnce.kt") public void testWhenEvaluatesArgumentOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenEvaluatesArgumentOnlyOnce.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenEvaluatesArgumentOnlyOnce.kt"); } @TestMetadata("whenExecutesOnlyOnce.kt") public void testWhenExecutesOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenExecutesOnlyOnce.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenExecutesOnlyOnce.kt"); } @TestMetadata("whenNotType.kt") public void testWhenNotType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenNotType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenNotType.kt"); } @TestMetadata("whenStatementWithRangeClause.kt") public void testWhenStatementWithRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenStatementWithRangeClause.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenStatementWithRangeClause.kt"); } @TestMetadata("whenType.kt") public void testWhenType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenType.kt"); } @TestMetadata("whenValue.kt") public void testWhenValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenValue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenValue.kt"); } @TestMetadata("whenValueOrType.kt") public void testWhenValueOrType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenValueOrType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenValueOrType.kt"); } @TestMetadata("whenWithCharRangeClause.kt") public void testWhenWithCharRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithCharRangeClause.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenWithCharRangeClause.kt"); } @TestMetadata("whenWithCustomRangeClause.kt") public void testWhenWithCustomRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithCustomRangeClause.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenWithCustomRangeClause.kt"); } @TestMetadata("whenWithIf.kt") public void testWhenWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithIf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenWithIf.kt"); } @TestMetadata("whenWithIfConditionAndOnlyElse.kt") public void testWhenWithIfConditionAndOnlyElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithIfConditionAndOnlyElse.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenWithIfConditionAndOnlyElse.kt"); } @TestMetadata("whenWithLongRangeClause.kt") public void testWhenWithLongRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithLongRangeClause.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenWithLongRangeClause.kt"); } @TestMetadata("whenWithOneStmWhen.kt") public void testWhenWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithOneStmWhen.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithOneStmWhen.kt"); } @TestMetadata("whenWithOnlyElse.kt") public void testWhenWithOnlyElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithOnlyElse.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithOnlyElse.kt"); } @TestMetadata("whenWithRangeClause.kt") public void testWhenWithRangeClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithRangeClause.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whenWithRangeClause.kt"); } @TestMetadata("whenWithoutExpression.kt") public void testWhenWithoutExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whenWithoutExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/expression/when/whenWithoutExpression.kt"); } @TestMetadata("whileWithOneStmWhen.kt") public void testWhileWithOneStmWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/when/whileWithOneStmWhen.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/when/whileWithOneStmWhen.kt"); } } @@ -9089,93 +3159,37 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class While extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInWhile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/while"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("doWhileWithComplexCondition.kt") public void testDoWhileWithComplexCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/doWhileWithComplexCondition.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/while/doWhileWithComplexCondition.kt"); } @TestMetadata("doWhileWithComplexConditionAndContinue.kt") public void testDoWhileWithComplexConditionAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/doWhileWithComplexConditionAndContinue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/while/doWhileWithComplexConditionAndContinue.kt"); } @TestMetadata("whileWithComplexCondition.kt") public void testWhileWithComplexCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/whileWithComplexCondition.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/while/whileWithComplexCondition.kt"); } @TestMetadata("whileWithComplexConditionAndContinue.kt") public void testWhileWithComplexConditionAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/whileWithComplexConditionAndContinue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/while/whileWithComplexConditionAndContinue.kt"); } @TestMetadata("whileWithComplexOneStatement.kt") public void testWhileWithComplexOneStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/while/whileWithComplexOneStatement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/expression/while/whileWithComplexOneStatement.kt"); } } } @@ -9184,269 +3198,92 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunction extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionFunction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("extensionForSuperclass.kt") public void testExtensionForSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionForSuperclass.kt"); } @TestMetadata("extensionFunctionCalledFromExtensionFunction.kt") public void testExtensionFunctionCalledFromExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromExtensionFunction.kt"); } @TestMetadata("extensionFunctionCalledFromFor.kt") public void testExtensionFunctionCalledFromFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionFunctionCalledFromFor.kt"); } @TestMetadata("extensionFunctionOnExpression.kt") public void testExtensionFunctionOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionFunctionOnExpression.kt"); } @TestMetadata("extensionInsideFunctionLiteral.kt") public void testExtensionInsideFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionInsideFunctionLiteral.kt"); } @TestMetadata("extensionLiteralPassedToFunction.kt") public void testExtensionLiteralPassedToFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionLiteralPassedToFunction.kt"); } @TestMetadata("extensionOnClassWithExplicitAndImplicitReceiver.kt") public void testExtensionOnClassWithExplicitAndImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionOnClassWithExplicitAndImplicitReceiver.kt"); } @TestMetadata("extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt") public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt"); } @TestMetadata("extensionUsedInsideClass.kt") public void testExtensionUsedInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionUsedInsideClass.kt"); } @TestMetadata("extensionWithImplicitReceiver.kt") public void testExtensionWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/extensionWithImplicitReceiver.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/generic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/generic.kt"); } @TestMetadata("implicitReceiverInExtension.kt") public void testImplicitReceiverInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/implicitReceiverInExtension.kt"); } @TestMetadata("intExtension.kt") public void testIntExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/intExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/intExtension.kt"); } @TestMetadata("superClassMemberInExtension.kt") public void testSuperClassMemberInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/superClassMemberInExtension.kt"); } @TestMetadata("virtualExtension.kt") public void testVirtualExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/virtualExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/virtualExtension.kt"); } @TestMetadata("virtualExtensionOverride.kt") public void testVirtualExtensionOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionFunction/virtualExtensionOverride.kt"); } } @@ -9454,21 +3291,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionProperty extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("absExtension.kt") public void testAbsExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/absExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionProperty/absExtension.kt"); } public void testAllFilesPresentInExtensionProperty() throws Exception { @@ -9477,76 +3306,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("externalExtensionProperty.kt") public void testExternalExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/externalExtensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionProperty/externalExtensionProperty.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/inClass.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/extensionProperty/inClass.kt"); } @TestMetadata("privateExtensionProperty.kt") public void testPrivateExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/privateExtensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionProperty/privateExtensionProperty.kt"); } @TestMetadata("propertyWithGetterAndSetter.kt") public void testPropertyWithGetterAndSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionProperty/propertyWithGetterAndSetter.kt"); } @TestMetadata("simplePropertyWithGetter.kt") public void testSimplePropertyWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/extensionProperty/simplePropertyWithGetter.kt"); } } @@ -9554,280 +3334,92 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Incremental extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInIncremental() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/incremental"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("catchScope.kt") public void testCatchScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/catchScope.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/catchScope.kt"); } @TestMetadata("classReferencingClass.kt") public void testClassReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/classReferencingClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/classReferencingClass.kt"); } @TestMetadata("coroutines.kt") public void testCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/coroutines.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/coroutines.kt"); } @TestMetadata("defaultArguments.kt") public void testDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/defaultArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/defaultArguments.kt"); } @TestMetadata("enumUsage.kt") public void testEnumUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/enumUsage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/enumUsage.kt"); } @TestMetadata("exportedPackage.kt") public void testExportedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/exportedPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/exportedPackage.kt"); } @TestMetadata("functionReferencingClass.kt") public void testFunctionReferencingClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/functionReferencingClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/functionReferencingClass.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/inline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/inline.kt"); } @TestMetadata("inlineLambda.kt") public void testInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/inlineLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/inlineLambda.kt"); } @TestMetadata("jsModule.kt") public void testJsModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/jsModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/jsModule.kt"); } @TestMetadata("multipleExport.kt") public void testMultipleExport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/multipleExport.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/multipleExport.kt"); } @TestMetadata("multipleReimport.kt") public void testMultipleReimport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/multipleReimport.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/multipleReimport.kt"); } @TestMetadata("packagesWithSameName.kt") public void testPackagesWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/packagesWithSameName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/packagesWithSameName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/simple.kt"); } @TestMetadata("sourceMapSourceEmbedding.kt") public void testSourceMapSourceEmbedding() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/sourceMapSourceEmbedding.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/sourceMapSourceEmbedding.kt"); } @TestMetadata("syntheticStatement.kt") public void testSyntheticStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/syntheticStatement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/incremental/syntheticStatement.kt"); } } @@ -9835,10 +3427,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inheritance extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("abstractVarOverride.kt") public void testAbstractVarOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/abstractVarOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/abstractVarOverride.kt"); } public void testAllFilesPresentInInheritance() throws Exception { @@ -9847,263 +3442,105 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("baseCall.kt") public void testBaseCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/baseCall.kt"); } @TestMetadata("baseCallOrder.kt") public void testBaseCallOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseCallOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/baseCallOrder.kt"); } @TestMetadata("baseClassDefinedAfterDerived.kt") public void testBaseClassDefinedAfterDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/baseClassDefinedAfterDerived.kt"); } @TestMetadata("complexInitializationOrder.kt") public void testComplexInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/complexInitializationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/complexInitializationOrder.kt"); } @TestMetadata("definitionOrder.kt") public void testDefinitionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/definitionOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/definitionOrder.kt"); } @TestMetadata("fromFakeClasses.kt") public void testFromFakeClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromFakeClasses.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/fromFakeClasses.kt"); } @TestMetadata("fromNativeInterface.kt") public void testFromNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromNativeInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/fromNativeInterface.kt"); } @TestMetadata("fromNestedNativeClass.kt") public void testFromNestedNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/fromNestedNativeClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/fromNestedNativeClass.kt"); } @TestMetadata("inheritFromCharIterator.kt") public void testInheritFromCharIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/inheritFromCharIterator.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/initializationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/initializationOrder.kt"); } @TestMetadata("initializersOfBasicClassExecute.kt") public void testInitializersOfBasicClassExecute() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/initializersOfBasicClassExecute.kt"); } @TestMetadata("kt3499.kt") public void testKt3499() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/kt3499.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/kt3499.kt"); } @TestMetadata("methodOverride.kt") public void testMethodOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/methodOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/methodOverride.kt"); } @TestMetadata("nativeNativeKotlin.kt") public void testNativeNativeKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/nativeNativeKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/nativeNativeKotlin.kt"); } @TestMetadata("overrideAnyMethods.kt") public void testOverrideAnyMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/overrideAnyMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/overrideAnyMethods.kt"); } @TestMetadata("valOverride.kt") public void testValOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/valOverride.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/valOverride.kt"); } @TestMetadata("valuePassedToAncestorConstructor.kt") public void testValuePassedToAncestorConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/valuePassedToAncestorConstructor.kt"); } @TestMetadata("withInitializeMethod.kt") public void testWithInitializeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/withInitializeMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inheritance/withInitializeMethod.kt"); } @TestMetadata("js/js.translator/testData/box/inheritance/interfaces") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Interfaces extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("abstractClassInheritingDefaultMethod.kt") public void testAbstractClassInheritingDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/abstractClassInheritingDefaultMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/interfaces/abstractClassInheritingDefaultMethod.kt"); } public void testAllFilesPresentInInterfaces() throws Exception { @@ -10112,53 +3549,17 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("withDefaultMethod.kt") public void testWithDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethod.kt"); } @TestMetadata("withDefaultMethodFromSuperInterface.kt") public void testWithDefaultMethodFromSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethodFromSuperInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/interfaces/withDefaultMethodFromSuperInterface.kt"); } @TestMetadata("withDefaultProperty.kt") public void testWithDefaultProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/interfaces/withDefaultProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inheritance/interfaces/withDefaultProperty.kt"); } } } @@ -10167,139 +3568,57 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Initialize extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInitialize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/initialize"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classInitializer.kt") public void testClassInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/classInitializer.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/classInitializer.kt"); } @TestMetadata("complexPropertyInitializer.kt") public void testComplexPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/complexPropertyInitializer.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/complexPropertyInitializer.kt"); } @TestMetadata("complexTopLevelPropertyInitializer.kt") public void testComplexTopLevelPropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/complexTopLevelPropertyInitializer.kt"); } @TestMetadata("declarationInitializedWithThrow.kt") public void testDeclarationInitializedWithThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/declarationInitializedWithThrow.kt"); } @TestMetadata("lateinit.kt") public void testLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/lateinit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/lateinit.kt"); } @TestMetadata("propertyInitializationOrder.kt") public void testPropertyInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/propertyInitializationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/propertyInitializationOrder.kt"); } @TestMetadata("rootPackageValInit.kt") public void testRootPackageValInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/rootPackageValInit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/rootPackageValInit.kt"); } @TestMetadata("rootValInit.kt") public void testRootValInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/rootValInit.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/initialize/rootValInit.kt"); } @TestMetadata("uninitializedLateinit.kt") public void testUninitializedLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/initialize/uninitializedLateinit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/initialize/uninitializedLateinit.kt"); } } @@ -10307,1170 +3626,357 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inline"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("anonymousFunction.kt") public void testAnonymousFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/anonymousFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/anonymousFunction.kt"); } @TestMetadata("anonymousObjectInlineMethod.kt") public void testAnonymousObjectInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/anonymousObjectInlineMethod.kt"); } @TestMetadata("arrayLiteralAliasing.kt") public void testArrayLiteralAliasing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/arrayLiteralAliasing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/arrayLiteralAliasing.kt"); } @TestMetadata("astCopy.kt") public void testAstCopy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/astCopy.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/astCopy.kt"); } @TestMetadata("callFunction.kt") public void testCallFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/callFunction.kt"); } @TestMetadata("callInlineFunctionOnTopLevel.kt") public void testCallInlineFunctionOnTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevel.kt"); } @TestMetadata("callInlineFunctionOnTopLevelSimple.kt") public void testCallInlineFunctionOnTopLevelSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/callInlineFunctionOnTopLevelSimple.kt"); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callableReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/callableReference.kt"); } @TestMetadata("callableReferenceOfLocalInline.kt") public void testCallableReferenceOfLocalInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/callableReferenceOfLocalInline.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/classObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/classObject.kt"); } @TestMetadata("dontInlineFunctionCall.kt") public void testDontInlineFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/dontInlineFunctionCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/dontInlineFunctionCall.kt"); } @TestMetadata("expressionBodyWithLambdaCall.kt") public void testExpressionBodyWithLambdaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/expressionBodyWithLambdaCall.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/extension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/extension.kt"); } @TestMetadata("extensionWithManyArguments.kt") public void testExtensionWithManyArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/extensionWithManyArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/extensionWithManyArguments.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/identityEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/identityEquals.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/incrementProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/incrementProperty.kt"); } @TestMetadata("inlineCallInsideStringTemplate.kt") public void testInlineCallInsideStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCallInsideStringTemplate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineCallInsideStringTemplate.kt"); } @TestMetadata("inlineCallNoInline.kt") public void testInlineCallNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCallNoInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineCallNoInline.kt"); } @TestMetadata("inlineCapturingThis.kt") public void testInlineCapturingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineCapturingThis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineCapturingThis.kt"); } @TestMetadata("inlineChain.kt") public void testInlineChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineChain.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineChain.kt"); } @TestMetadata("inlineChainWithFewStatements.kt") public void testInlineChainWithFewStatements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineChainWithFewStatements.kt"); } @TestMetadata("inlineDefaultArgument.kt") public void testInlineDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineDefaultArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineDefaultArgument.kt"); } @TestMetadata("inlineFunctionInLambda.kt") public void testInlineFunctionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineFunctionInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineFunctionInLambda.kt"); } @TestMetadata("inlineGenericSimple.kt") public void testInlineGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineGenericSimple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineGenericSimple.kt"); } @TestMetadata("inlineIf.kt") public void testInlineIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineIf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineIf.kt"); } @TestMetadata("inlineImportNameClash.kt") public void testInlineImportNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineImportNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineImportNameClash.kt"); } @TestMetadata("inlineInInlineWithLambda.kt") public void testInlineInInlineWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInInlineWithLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineInInlineWithLambda.kt"); } @TestMetadata("inlineInInlineWithLambdaPrivate.kt") public void testInlineInInlineWithLambdaPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInInlineWithLambdaPrivate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineInInlineWithLambdaPrivate.kt"); } @TestMetadata("inlineInc.kt") public void testInlineInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInc.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineInc.kt"); } @TestMetadata("inlineIntSimple.kt") public void testInlineIntSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineIntSimple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineIntSimple.kt"); } @TestMetadata("inlineLambdaNoCapture.kt") public void testInlineLambdaNoCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineLambdaNoCapture.kt"); } @TestMetadata("inlineLambdaWithCapture.kt") public void testInlineLambdaWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineLambdaWithCapture.kt"); } @TestMetadata("inlineMethod.kt") public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineMethod.kt"); } @TestMetadata("inlineNoReturn.kt") public void testInlineNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineNoReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineNoReturn.kt"); } @TestMetadata("inlineOrder.kt") public void testInlineOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineOrder.kt"); } @TestMetadata("inlineSimpleAssignment.kt") public void testInlineSimpleAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineSimpleAssignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/inlineSimpleAssignment.kt"); } @TestMetadata("innerOuterThis.kt") public void testInnerOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/innerOuterThis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/innerOuterThis.kt"); } @TestMetadata("iteratorOnInlineFunctionResult.kt") public void testIteratorOnInlineFunctionResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/iteratorOnInlineFunctionResult.kt"); } @TestMetadata("jsCode.kt") public void testJsCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/jsCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/jsCode.kt"); } @TestMetadata("jsCodeVarDeclared.kt") public void testJsCodeVarDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/jsCodeVarDeclared.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/jsCodeVarDeclared.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/lambdaInLambda.kt"); } @TestMetadata("lambdaReassignment.kt") public void testLambdaReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaReassignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/lambdaReassignment.kt"); } @TestMetadata("lambdaReassignmentWithCapture.kt") public void testLambdaReassignmentWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/lambdaReassignmentWithCapture.kt"); } @TestMetadata("localInlineExtensionFunction.kt") public void testLocalInlineExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/localInlineExtensionFunction.kt"); } @TestMetadata("localInlineFunction.kt") public void testLocalInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/localInlineFunction.kt"); } @TestMetadata("localInlineFunctionComplex.kt") public void testLocalInlineFunctionComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/localInlineFunctionComplex.kt"); } @TestMetadata("localInlineFunctionDeclaredInLambda.kt") public void testLocalInlineFunctionDeclaredInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/localInlineFunctionDeclaredInLambda.kt"); } @TestMetadata("localInlineFunctionNameClash.kt") public void testLocalInlineFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/localInlineFunctionNameClash.kt"); } @TestMetadata("localInlineFunctionReference.kt") public void testLocalInlineFunctionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/localInlineFunctionReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/localInlineFunctionReference.kt"); } @TestMetadata("metadataForPublicFunction.kt") public void testMetadataForPublicFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/metadataForPublicFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/metadataForPublicFunction.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/multiDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/multiDeclaration.kt"); } @TestMetadata("noInlineLambda.kt") public void testNoInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/noInlineLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/noInlineLambda.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/operators.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/operators.kt"); } @TestMetadata("params.kt") public void testParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/params.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/params.kt"); } @TestMetadata("rootConstructor.kt") public void testRootConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/rootConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/rootConstructor.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/safeCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/safeCall.kt"); } @TestMetadata("sameNameOfDeclarationsInSameModule.kt") public void testSameNameOfDeclarationsInSameModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/sameNameOfDeclarationsInSameModule.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/inline/sameNameOfDeclarationsInSameModule.kt"); } @TestMetadata("severalClosures.kt") public void testSeveralClosures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/severalClosures.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/severalClosures.kt"); } @TestMetadata("severalUsage.kt") public void testSeveralUsage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/severalUsage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/severalUsage.kt"); } @TestMetadata("simpleDouble.kt") public void testSimpleDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleDouble.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/simpleDouble.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleEnum.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/simpleEnum.kt"); } @TestMetadata("simpleInt.kt") public void testSimpleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleInt.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/simpleInt.kt"); } @TestMetadata("simpleLambda.kt") public void testSimpleLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/simpleLambda.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/simpleObject.kt"); } @TestMetadata("simpleReturnFunctionWithResultUnused.kt") public void testSimpleReturnFunctionWithResultUnused() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/simpleReturnFunctionWithResultUnused.kt"); } @TestMetadata("statementsAfterReturn.kt") public void testStatementsAfterReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/statementsAfterReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/statementsAfterReturn.kt"); } @TestMetadata("thisImplicitlyCaptured.kt") public void testThisImplicitlyCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/thisImplicitlyCaptured.kt"); } @TestMetadata("thisLiteralAliasing.kt") public void testThisLiteralAliasing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/thisLiteralAliasing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/thisLiteralAliasing.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/vararg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inline/vararg.kt"); } } @@ -11478,909 +3984,277 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineEvaluationOrder extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInlineEvaluationOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineEvaluationOrder"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("alsoWithReassingment.kt") public void testAlsoWithReassingment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/alsoWithReassingment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/alsoWithReassingment.kt"); } @TestMetadata("argumentOfCall.kt") public void testArgumentOfCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCall.kt"); } @TestMetadata("argumentOfCallMultipleInlineCalls.kt") public void testArgumentOfCallMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCallMultipleInlineCalls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfCallMultipleInlineCalls.kt"); } @TestMetadata("argumentOfInlineCall.kt") public void testArgumentOfInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfInlineCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfInlineCall.kt"); } @TestMetadata("argumentOfNew.kt") public void testArgumentOfNew() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfNew.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/argumentOfNew.kt"); } @TestMetadata("arrayAccess1.kt") public void testArrayAccess1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess1.kt"); } @TestMetadata("arrayAccess2.kt") public void testArrayAccess2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess2.kt"); } @TestMetadata("arrayAccess3.kt") public void testArrayAccess3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccess3.kt"); } @TestMetadata("arrayAccessLhsDecomposed.kt") public void testArrayAccessLhsDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayAccessLhsDecomposed.kt"); } @TestMetadata("arrayLiteral.kt") public void testArrayLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteral.kt"); } @TestMetadata("arrayLiteralMultipleInlineCalls.kt") public void testArrayLiteralMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralMultipleInlineCalls.kt"); } @TestMetadata("arrayLiteralNested.kt") public void testArrayLiteralNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/arrayLiteralNested.kt"); } @TestMetadata("assignment.kt") public void testAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/assignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/assignment.kt"); } @TestMetadata("binaryOperator.kt") public void testBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperator.kt"); } @TestMetadata("binaryOperatorMultipleInlineCalls.kt") public void testBinaryOperatorMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperatorMultipleInlineCalls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/binaryOperatorMultipleInlineCalls.kt"); } @TestMetadata("callQualifier.kt") public void testCallQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/callQualifier.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/callQualifier.kt"); } @TestMetadata("callQualifierComplex.kt") public void testCallQualifierComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/callQualifierComplex.kt"); } @TestMetadata("capturedVarAsArgument.kt") public void testCapturedVarAsArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/capturedVarAsArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/capturedVarAsArgument.kt"); } @TestMetadata("conditional.kt") public void testConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditional.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditional.kt"); } @TestMetadata("conditionalElvis.kt") public void testConditionalElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalElvis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalElvis.kt"); } @TestMetadata("conditionalNested.kt") public void testConditionalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalNested.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalNested.kt"); } @TestMetadata("conditionalTestExpression.kt") public void testConditionalTestExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpression.kt"); } @TestMetadata("conditionalTestExpressionElvis.kt") public void testConditionalTestExpressionElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpressionElvis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/conditionalTestExpressionElvis.kt"); } @TestMetadata("continueInExtractedDoWhile.kt") public void testContinueInExtractedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/continueInExtractedDoWhile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/continueInExtractedDoWhile.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/doWhile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/doWhile.kt"); } @TestMetadata("doWhileComplex.kt") public void testDoWhileComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/doWhileComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/doWhileComplex.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/for.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/for.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/if.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/if.kt"); } @TestMetadata("inlineFunctionAsParameterOfQualifiedCall.kt") public void testInlineFunctionAsParameterOfQualifiedCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/inlineFunctionAsParameterOfQualifiedCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/inlineFunctionAsParameterOfQualifiedCall.kt"); } @TestMetadata("lambdaPropertyExtracted.kt") public void testLambdaPropertyExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/lambdaPropertyExtracted.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/lambdaPropertyExtracted.kt"); } @TestMetadata("lambdaWithClosure.kt") public void testLambdaWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/lambdaWithClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/lambdaWithClosure.kt"); } @TestMetadata("logicalAnd.kt") public void testLogicalAnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/logicalAnd.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/logicalAnd.kt"); } @TestMetadata("logicalAndOrMultipleInlineCalls.kt") public void testLogicalAndOrMultipleInlineCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/logicalAndOrMultipleInlineCalls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/logicalAndOrMultipleInlineCalls.kt"); } @TestMetadata("logicalOr.kt") public void testLogicalOr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/logicalOr.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/logicalOr.kt"); } @TestMetadata("methodCallQualifierWithSideEffect.kt") public void testMethodCallQualifierWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/methodCallQualifierWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/methodCallQualifierWithSideEffect.kt"); } @TestMetadata("methodDecomposedWithBind.kt") public void testMethodDecomposedWithBind() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/methodDecomposedWithBind.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/methodDecomposedWithBind.kt"); } @TestMetadata("methodInlineCallQualifierWithSideEffect.kt") public void testMethodInlineCallQualifierWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/methodInlineCallQualifierWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/methodInlineCallQualifierWithSideEffect.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclaration.kt"); } @TestMetadata("multiDeclarationComplex.kt") public void testMultiDeclarationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclarationComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/multiDeclarationComplex.kt"); } @TestMetadata("nestedContinueInExtractedDoWhile.kt") public void testNestedContinueInExtractedDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/nestedContinueInExtractedDoWhile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/nestedContinueInExtractedDoWhile.kt"); } @TestMetadata("nestedInlineCall.kt") public void testNestedInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/nestedInlineCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/nestedInlineCall.kt"); } @TestMetadata("propertiesInitializationOrder.kt") public void testPropertiesInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrder.kt"); } @TestMetadata("propertiesInitializationOrderSimple.kt") public void testPropertiesInitializationOrderSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrderSimple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertiesInitializationOrderSimple.kt"); } @TestMetadata("propertyAccessAfterModification.kt") public void testPropertyAccessAfterModification() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAfterModification.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAfterModification.kt"); } @TestMetadata("propertyAccessAndInitializer.kt") public void testPropertyAccessAndInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAndInitializer.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessAndInitializer.kt"); } @TestMetadata("propertyAccessWithSideEffect.kt") public void testPropertyAccessWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyAccessWithSideEffect.kt"); } @TestMetadata("propertyWithSideEffectExtracted.kt") public void testPropertyWithSideEffectExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectExtracted.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectExtracted.kt"); } @TestMetadata("propertyWithSideEffectPassedToInlineFunction.kt") public void testPropertyWithSideEffectPassedToInlineFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/propertyWithSideEffectPassedToInlineFunction.kt"); } @TestMetadata("temporaryVarNonTrivial.kt") public void testTemporaryVarNonTrivial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/temporaryVarNonTrivial.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/temporaryVarNonTrivial.kt"); } @TestMetadata("ternaryConditional.kt") public void testTernaryConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/ternaryConditional.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/ternaryConditional.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/while.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/while.kt"); } @TestMetadata("whileComplex.kt") public void testWhileComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/whileComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/whileComplex.kt"); } @TestMetadata("whileConditionExtracted.kt") public void testWhileConditionExtracted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineEvaluationOrder/whileConditionExtracted.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineEvaluationOrder/whileConditionExtracted.kt"); } } @@ -12388,501 +4262,157 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineMultiFile extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInlineMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("anonymousObjectInSimilarFunctions.kt") public void testAnonymousObjectInSimilarFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectInSimilarFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectInSimilarFunctions.kt"); } @TestMetadata("anonymousObjectOnCallSite.kt") public void testAnonymousObjectOnCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSite.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSite.kt"); } @TestMetadata("anonymousObjectOnCallSiteSuperParams.kt") public void testAnonymousObjectOnCallSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSiteSuperParams.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnCallSiteSuperParams.kt"); } @TestMetadata("anonymousObjectOnDeclarationSite.kt") public void testAnonymousObjectOnDeclarationSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSite.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSite.kt"); } @TestMetadata("anonymousObjectOnDeclarationSiteSuperParams.kt") public void testAnonymousObjectOnDeclarationSiteSuperParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSiteSuperParams.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/anonymousObjectOnDeclarationSiteSuperParams.kt"); } @TestMetadata("builders.kt") public void testBuilders() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/builders.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/builders.kt"); } @TestMetadata("buildersAndLambdaCapturing.kt") public void testBuildersAndLambdaCapturing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/buildersAndLambdaCapturing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/buildersAndLambdaCapturing.kt"); } @TestMetadata("captureInlinable.kt") public void testCaptureInlinable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/captureInlinable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/captureInlinable.kt"); } @TestMetadata("captureInlinableAndOther.kt") public void testCaptureInlinableAndOther() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/captureInlinableAndOther.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/captureInlinableAndOther.kt"); } @TestMetadata("captureThisAndReceiver.kt") public void testCaptureThisAndReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/captureThisAndReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/captureThisAndReceiver.kt"); } @TestMetadata("closureChain.kt") public void testClosureChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/closureChain.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/closureChain.kt"); } @TestMetadata("defaultMethod.kt") public void testDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/defaultMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/defaultMethod.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/generics.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/generics.kt"); } @TestMetadata("inlineInDefaultParameter.kt") public void testInlineInDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/inlineInDefaultParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/inlineInDefaultParameter.kt"); } @TestMetadata("inlineMultiFileSimple.kt") public void testInlineMultiFileSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/inlineMultiFileSimple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/inlineMultiFileSimple.kt"); } @TestMetadata("lambdaCloning.kt") public void testLambdaCloning() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/lambdaCloning.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/lambdaCloning.kt"); } @TestMetadata("lambdaInLambda2.kt") public void testLambdaInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/lambdaInLambda2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/lambdaInLambda2.kt"); } @TestMetadata("lambdaInLambdaNoInline.kt") public void testLambdaInLambdaNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/lambdaInLambdaNoInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/lambdaInLambdaNoInline.kt"); } @TestMetadata("regeneratedLambdaName.kt") public void testRegeneratedLambdaName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/regeneratedLambdaName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/regeneratedLambdaName.kt"); } @TestMetadata("sameCaptured.kt") public void testSameCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/sameCaptured.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/sameCaptured.kt"); } @TestMetadata("simpleCapturingInClass.kt") public void testSimpleCapturingInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInClass.kt"); } @TestMetadata("simpleCapturingInPackage.kt") public void testSimpleCapturingInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/simpleCapturingInPackage.kt"); } @TestMetadata("simpleDefaultMethod.kt") public void testSimpleDefaultMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/simpleDefaultMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/simpleDefaultMethod.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/trait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/trait.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/tryCatch.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/tryCatch.kt"); } @TestMetadata("tryCatch2.kt") public void testTryCatch2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/tryCatch2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/tryCatch2.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/tryCatchFinally.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/tryCatchFinally.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/use.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/use.kt"); } @TestMetadata("with.kt") public void testWith() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiFile/with.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiFile/with.kt"); } } @@ -12890,535 +4420,167 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineMultiModule extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInlineMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("anotherModuleValInClosure.kt") public void testAnotherModuleValInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/anotherModuleValInClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/anotherModuleValInClosure.kt"); } @TestMetadata("callFunction.kt") public void testCallFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/callFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/callFunction.kt"); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/callableReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/callableReference.kt"); } @TestMetadata("calledByFqName.kt") public void testCalledByFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/calledByFqName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/calledByFqName.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/extensionLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/extensionLambda.kt"); } @TestMetadata("externalInlineCallDecomposed.kt") public void testExternalInlineCallDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/externalInlineCallDecomposed.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/externalInlineCallDecomposed.kt"); } @TestMetadata("externalInlineNewDecomposed.kt") public void testExternalInlineNewDecomposed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/externalInlineNewDecomposed.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/externalInlineNewDecomposed.kt"); } @TestMetadata("fakeFunctionInAnotherModule.kt") public void testFakeFunctionInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/fakeFunctionInAnotherModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/fakeFunctionInAnotherModule.kt"); } @TestMetadata("importObjectInstance.kt") public void testImportObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/importObjectInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/importObjectInstance.kt"); } @TestMetadata("inlineInInlineWithLambdaMultiModule.kt") public void testInlineInInlineWithLambdaMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/inlineInInlineWithLambdaMultiModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/inlineInInlineWithLambdaMultiModule.kt"); } @TestMetadata("inlineMemberFunWithLambda.kt") public void testInlineMemberFunWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/inlineMemberFunWithLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/inlineMemberFunWithLambda.kt"); } @TestMetadata("inlineableAliasForExternalDeclaration.kt") public void testInlineableAliasForExternalDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/inlineableAliasForExternalDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/inlineableAliasForExternalDeclaration.kt"); } @TestMetadata("internalFriend.kt") public void testInternalFriend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/internalFriend.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/internalFriend.kt"); } @TestMetadata("internalNameClash.kt") public void testInternalNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/internalNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/internalNameClash.kt"); } @TestMetadata("keywordAsMemberName.kt") public void testKeywordAsMemberName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/keywordAsMemberName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/keywordAsMemberName.kt"); } @TestMetadata("kt16144.kt") public void testKt16144() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/kt16144.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/kt16144.kt"); } @TestMetadata("kt16160.kt") public void testKt16160() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/kt16160.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/kt16160.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/lambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/lambda.kt"); } @TestMetadata("lambdaCalledInObjectLiteral.kt") public void testLambdaCalledInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/lambdaCalledInObjectLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/lambdaCalledInObjectLiteral.kt"); } @TestMetadata("lambdaWithClosure.kt") public void testLambdaWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/lambdaWithClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/lambdaWithClosure.kt"); } @TestMetadata("localNameClash.kt") public void testLocalNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/localNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/localNameClash.kt"); } @TestMetadata("localObjectLiteralWithInheritance.kt") public void testLocalObjectLiteralWithInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/localObjectLiteralWithInheritance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/localObjectLiteralWithInheritance.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/method.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/method.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/operators.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/operators.kt"); } @TestMetadata("parameterWithDefaultValue.kt") public void testParameterWithDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/parameterWithDefaultValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/parameterWithDefaultValue.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/property.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/property.kt"); } @TestMetadata("reexportDuringInline.kt") public void testReexportDuringInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/reexportDuringInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/reexportDuringInline.kt"); } @TestMetadata("repeatedImport.kt") public void testRepeatedImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/repeatedImport.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/repeatedImport.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/simple.kt"); } @TestMetadata("topLevelNestedInline.kt") public void testTopLevelNestedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/topLevelNestedInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/topLevelNestedInline.kt"); } @TestMetadata("typealiases.kt") public void testTypealiases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineMultiModule/typealiases.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineMultiModule/typealiases.kt"); } } @@ -13426,297 +4588,97 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineSizeReduction extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInlineSizeReduction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineSizeReduction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("inlineImportCleanup.kt") public void testInlineImportCleanup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/inlineImportCleanup.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/inlineImportCleanup.kt"); } @TestMetadata("inlineLambdaCleanup.kt") public void testInlineLambdaCleanup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/inlineLambdaCleanup.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/inlineLambdaCleanup.kt"); } @TestMetadata("inlineOrder.kt") public void testInlineOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/inlineOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/inlineOrder.kt"); } @TestMetadata("lastBreak.kt") public void testLastBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/lastBreak.kt"); } @TestMetadata("multiModuleDefaultArgsCleanup.kt") public void testMultiModuleDefaultArgsCleanup() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/multiModuleDefaultArgsCleanup.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/multiModuleDefaultArgsCleanup.kt"); } @TestMetadata("noDuplicateVariableDeclaration.kt") public void testNoDuplicateVariableDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/noDuplicateVariableDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/noDuplicateVariableDeclaration.kt"); } @TestMetadata("oneTopLevelReturn.kt") public void testOneTopLevelReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/oneTopLevelReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/oneTopLevelReturn.kt"); } @TestMetadata("propertyAssignment.kt") public void testPropertyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/propertyAssignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/propertyAssignment.kt"); } @TestMetadata("propertyReassignment.kt") public void testPropertyReassignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/propertyReassignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/propertyReassignment.kt"); } @TestMetadata("propertyReferenceDoesNotProduceSideEffect.kt") public void testPropertyReferenceDoesNotProduceSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/propertyReferenceDoesNotProduceSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/propertyReferenceDoesNotProduceSideEffect.kt"); } @TestMetadata("returnInlineCall.kt") public void testReturnInlineCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/returnInlineCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/returnInlineCall.kt"); } @TestMetadata("simpleReturnFunction.kt") public void testSimpleReturnFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/simpleReturnFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/simpleReturnFunction.kt"); } @TestMetadata("ternaryConditional.kt") public void testTernaryConditional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/ternaryConditional.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/ternaryConditional.kt"); } @TestMetadata("this.kt") public void testThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/this.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/this.kt"); } @TestMetadata("valAssignment.kt") public void testValAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/valAssignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/valAssignment.kt"); } @TestMetadata("valDeclaration.kt") public void testValDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/valDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/valDeclaration.kt"); } @TestMetadata("varargTemporaryVar.kt") public void testVarargTemporaryVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt"); } } @@ -13724,161 +4686,57 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineStdlib extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInInlineStdlib() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineStdlib"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("callNameClash.kt") public void testCallNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/callNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/callNameClash.kt"); } @TestMetadata("callableRefToFunInCurrentModule.kt") public void testCallableRefToFunInCurrentModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/callableRefToFunInCurrentModule.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/closure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/closure.kt"); } @TestMetadata("closureInObjectLiteral.kt") public void testClosureInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/closureInObjectLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/closureInObjectLiteral.kt"); } @TestMetadata("closureNested.kt") public void testClosureNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/closureNested.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/closureNested.kt"); } @TestMetadata("localNamesClash.kt") public void testLocalNamesClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/localNamesClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/localNamesClash.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/simple.kt"); } @TestMetadata("thisInExtension.kt") public void testThisInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/thisInExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/thisInExtension.kt"); } @TestMetadata("unsafeCast.kt") public void testUnsafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineStdlib/unsafeCast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/inlineStdlib/unsafeCast.kt"); } } @@ -13886,6 +4744,10 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @@ -13894,25 +4756,17 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AbstractList extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInAbstractList() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java/abstractList"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/abstractList/iterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/abstractList/iterator.kt"); } } @@ -13920,21 +4774,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArrayList extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("access.kt") public void testAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/access.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/access.kt"); } public void testAllFilesPresentInArrayList() throws Exception { @@ -13943,257 +4789,77 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/arrayAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/arrayAccess.kt"); } @TestMetadata("constructWithCapacity.kt") public void testConstructWithCapacity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/constructWithCapacity.kt"); } @TestMetadata("constructWithSideEffectParam.kt") public void testConstructWithSideEffectParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/constructWithSideEffectParam.kt"); } @TestMetadata("containsAll.kt") public void testContainsAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/containsAll.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/containsAll.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/emptyList.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/emptyList.kt"); } @TestMetadata("indexOOB.kt") public void testIndexOOB() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/indexOOB.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/indexOOB.kt"); } @TestMetadata("indexOf.kt") public void testIndexOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/indexOf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/indexOf.kt"); } @TestMetadata("isEmpty.kt") public void testIsEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/isEmpty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/isEmpty.kt"); } @TestMetadata("iterate.kt") public void testIterate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/iterate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/iterate.kt"); } @TestMetadata("misc.kt") public void testMisc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/misc.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/misc.kt"); } @TestMetadata("remove.kt") public void testRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/remove.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/remove.kt"); } @TestMetadata("removeAll.kt") public void testRemoveAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/removeAll.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/removeAll.kt"); } @TestMetadata("removeWithIndexOutOfBounds.kt") public void testRemoveWithIndexOutOfBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/removeWithIndexOutOfBounds.kt"); } @TestMetadata("retainAll.kt") public void testRetainAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/retainAll.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/retainAll.kt"); } @TestMetadata("toArray.kt") public void testToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/java/arrayList/toArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/java/arrayList/toArray.kt"); } } } @@ -14202,467 +4868,147 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsCode extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInJsCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/break.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/break.kt"); } @TestMetadata("catchScope.kt") public void testCatchScope() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/catchScope.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/catchScope.kt"); } @TestMetadata("codeFromVariable.kt") public void testCodeFromVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/codeFromVariable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/codeFromVariable.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/continue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/continue.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/doWhile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/doWhile.kt"); } @TestMetadata("for.kt") public void testFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/for.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/for.kt"); } @TestMetadata("forIn.kt") public void testForIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/forIn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/forIn.kt"); } @TestMetadata("forWithoutInit.kt") public void testForWithoutInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/forWithoutInit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/forWithoutInit.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/function.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/function.kt"); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/functionName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/functionName.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/if.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/if.kt"); } @TestMetadata("invocation.kt") public void testInvocation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/invocation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/invocation.kt"); } @TestMetadata("label.kt") public void testLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/label.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/label.kt"); } @TestMetadata("labelNestedClash.kt") public void testLabelNestedClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/labelNestedClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/labelNestedClash.kt"); } @TestMetadata("labelNestedClashWithKotlin.kt") public void testLabelNestedClashWithKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/labelNestedClashWithKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/labelNestedClashWithKotlin.kt"); } @TestMetadata("labelSiblingClash.kt") public void testLabelSiblingClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/labelSiblingClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/labelSiblingClash.kt"); } @TestMetadata("literal.kt") public void testLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/literal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/literal.kt"); } @TestMetadata("numberLiteralOverflow.kt") public void testNumberLiteralOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/numberLiteralOverflow.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/object.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/object.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/objectExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/objectExpression.kt"); } @TestMetadata("objectScopes.kt") public void testObjectScopes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/objectScopes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/objectScopes.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/operators.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/operators.kt"); } @TestMetadata("quotes.kt") public void testQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/quotes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/quotes.kt"); } @TestMetadata("referenceToKotlin.kt") public void testReferenceToKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/referenceToKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/referenceToKotlin.kt"); } @TestMetadata("switch.kt") public void testSwitch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/switch.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/switch.kt"); } @TestMetadata("tryCatchFinally.kt") public void testTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/tryCatchFinally.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/tryCatchFinally.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsCode/while.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsCode/while.kt"); } } @@ -14670,246 +5016,82 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsModule extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInJsModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("externalClass.kt") public void testExternalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalClass.kt"); } @TestMetadata("externalFunction.kt") public void testExternalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalFunction.kt"); } @TestMetadata("externalFunctionPlain.kt") public void testExternalFunctionPlain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunctionPlain.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalFunctionPlain.kt"); } @TestMetadata("externalFunctionUmd.kt") public void testExternalFunctionUmd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunctionUmd.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalFunctionUmd.kt"); } @TestMetadata("externalFunctionUmdFallback.kt") public void testExternalFunctionUmdFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalFunctionUmdFallback.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalFunctionUmdFallback.kt"); } @TestMetadata("externalObject.kt") public void testExternalObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalObject.kt"); } @TestMetadata("externalPackage.kt") public void testExternalPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalPackage.kt"); } @TestMetadata("externalPackageInDifferentFile.kt") public void testExternalPackageInDifferentFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackageInDifferentFile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalPackageInDifferentFile.kt"); } @TestMetadata("externalPackagePlain.kt") public void testExternalPackagePlain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackagePlain.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalPackagePlain.kt"); } @TestMetadata("externalPackageUmdFallback.kt") public void testExternalPackageUmdFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalPackageUmdFallback.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalPackageUmdFallback.kt"); } @TestMetadata("externalProperty.kt") public void testExternalProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/externalProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/externalProperty.kt"); } @TestMetadata("importCountCommonJS.kt") public void testImportCountCommonJS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/importCountCommonJS.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/importCountCommonJS.kt"); } @TestMetadata("importCountUmd.kt") public void testImportCountUmd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/importCountUmd.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/importCountUmd.kt"); } @TestMetadata("topLevelVarargFun.kt") public void testTopLevelVarargFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt"); } } @@ -14917,212 +5099,72 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsName extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInJsName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsName"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("avoidNameClash.kt") public void testAvoidNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/avoidNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/avoidNameClash.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/classes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/classes.kt"); } @TestMetadata("inheritFromRenamedNativeClass.kt") public void testInheritFromRenamedNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClass.kt"); } @TestMetadata("inheritFromRenamedNativeClassMultimodule.kt") public void testInheritFromRenamedNativeClassMultimodule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClassMultimodule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/inheritFromRenamedNativeClassMultimodule.kt"); } @TestMetadata("jsName.kt") public void testJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/jsName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/jsName.kt"); } @TestMetadata("jsNamePropertyAccessors.kt") public void testJsNamePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/jsNamePropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/jsNamePropertyAccessors.kt"); } @TestMetadata("overriddenMethod.kt") public void testOverriddenMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/overriddenMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/overriddenMethod.kt"); } @TestMetadata("overridenFromInterface.kt") public void testOverridenFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/overridenFromInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/overridenFromInterface.kt"); } @TestMetadata("peculiarIdentifiers.kt") public void testPeculiarIdentifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/peculiarIdentifiers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/peculiarIdentifiers.kt"); } @TestMetadata("privateMethod.kt") public void testPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/privateMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/privateMethod.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/secondaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/secondaryConstructor.kt"); } @TestMetadata("simpleJsName.kt") public void testSimpleJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsName/simpleJsName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsName/simpleJsName.kt"); } } @@ -15130,76 +5172,32 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JsQualifier extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInJsQualifier() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsQualifier"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/classes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsQualifier/classes.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsQualifier/simple.kt"); } @TestMetadata("umdFallback.kt") public void testUmdFallback() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/umdFallback.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsQualifier/umdFallback.kt"); } @TestMetadata("withModule.kt") public void testWithModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/jsQualifier/withModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/jsQualifier/withModule.kt"); } } @@ -15207,127 +5205,47 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Kotlin_test extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInKotlin_test() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/kotlin.test"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("beforeAfter.kt") public void testBeforeAfter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/beforeAfter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/beforeAfter.kt"); } @TestMetadata("ignore.kt") public void testIgnore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/ignore.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/ignore.kt"); } @TestMetadata("inherited.kt") public void testInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/inherited.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/inherited.kt"); } @TestMetadata("mpp.kt") public void testMpp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/mpp.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/mpp.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/nested.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/nested.kt"); } @TestMetadata("returnTestResult.kt") public void testReturnTestResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/returnTestResult.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/returnTestResult.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/kotlin.test/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/kotlin.test/simple.kt"); } } @@ -15335,212 +5253,72 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/labels"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("labelOnExpression.kt") public void testLabelOnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/labelOnExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/labelOnExpression.kt"); } @TestMetadata("labelWithVariableClashing.kt") public void testLabelWithVariableClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/labelWithVariableClashing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/labelWithVariableClashing.kt"); } @TestMetadata("nestedInlineLabels.kt") public void testNestedInlineLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedInlineLabels.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/nestedInlineLabels.kt"); } @TestMetadata("nestedLabels.kt") public void testNestedLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedLabels.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/nestedLabels.kt"); } @TestMetadata("nestedLabelsInlinedClashing.kt") public void testNestedLabelsInlinedClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedLabelsInlinedClashing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/nestedLabelsInlinedClashing.kt"); } @TestMetadata("nestedLabelsInlinedClashingAtFunctionsWithClosure.kt") public void testNestedLabelsInlinedClashingAtFunctionsWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/nestedLabelsInlinedClashingAtFunctionsWithClosure.kt"); } @TestMetadata("peculiarNames.kt") public void testPeculiarNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/peculiarNames.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/peculiarNames.kt"); } @TestMetadata("siblingLabels.kt") public void testSiblingLabels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/siblingLabels.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/siblingLabels.kt"); } @TestMetadata("siblingLabelsInlined.kt") public void testSiblingLabelsInlined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/siblingLabelsInlined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/siblingLabelsInlined.kt"); } @TestMetadata("siblingLabelsInlinedClashing.kt") public void testSiblingLabelsInlinedClashing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/siblingLabelsInlinedClashing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/siblingLabelsInlinedClashing.kt"); } @TestMetadata("simpleLabel.kt") public void testSimpleLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/simpleLabel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/simpleLabel.kt"); } @TestMetadata("simpleLabelInlined.kt") public void testSimpleLabelInlined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/labels/simpleLabelInlined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/labels/simpleLabelInlined.kt"); } } @@ -15548,99 +5326,42 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiFile extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInMultiFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classOfTheSameNameInAnotherPackage.kt") public void testClassOfTheSameNameInAnotherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiFile/classOfTheSameNameInAnotherPackage.kt"); } @TestMetadata("classesInheritedFromOtherFile.kt") public void testClassesInheritedFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiFile/classesInheritedFromOtherFile.kt"); } @TestMetadata("functionsVisibleFromOtherFile.kt") public void testFunctionsVisibleFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiFile/functionsVisibleFromOtherFile.kt"); } @TestMetadata("importedDeclarationMangling.kt") public void testImportedDeclarationMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/importedDeclarationMangling.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiFile/importedDeclarationMangling.kt"); } @TestMetadata("packageAndMangledMethodDoNotClash.kt") public void testPackageAndMangledMethodDoNotClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/packageAndMangledMethodDoNotClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiFile/packageAndMangledMethodDoNotClash.kt"); } @TestMetadata("packageAndPrivateDeclarationDoNotClash.kt") public void testPackageAndPrivateDeclarationDoNotClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiFile/packageAndPrivateDeclarationDoNotClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiFile/packageAndPrivateDeclarationDoNotClash.kt"); } } @@ -15648,144 +5369,52 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModule extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("interfaceMethodWithDefaultParameter.kt") public void testInterfaceMethodWithDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/interfaceMethodWithDefaultParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/interfaceMethodWithDefaultParameter.kt"); } @TestMetadata("localClassMetadata.kt") public void testLocalClassMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/localClassMetadata.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/localClassMetadata.kt"); } @TestMetadata("moduleAndVariableNameClash.kt") public void testModuleAndVariableNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/moduleAndVariableNameClash.kt"); } @TestMetadata("privateInterfaceNameClash.kt") public void testPrivateInterfaceNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/privateInterfaceNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/privateInterfaceNameClash.kt"); } @TestMetadata("privateNameClash.kt") public void testPrivateNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/privateNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/privateNameClash.kt"); } @TestMetadata("publishedApiMangling.kt") public void testPublishedApiMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/publishedApiMangling.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/publishedApiMangling.kt"); } @TestMetadata("samePackageNames.kt") public void testSamePackageNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/samePackageNames.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/samePackageNames.kt"); } @TestMetadata("useElementsFromDefaultPackageInAnotherModule.kt") public void testUseElementsFromDefaultPackageInAnotherModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModule/useElementsFromDefaultPackageInAnotherModule.kt"); } } @@ -15793,6 +5422,10 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModuleWrappers extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInMultiModuleWrappers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @@ -15801,59 +5434,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Amd extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInAmd() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/amd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("jsModuleOnPackage.kt") public void testJsModuleOnPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/jsModuleOnPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/amd/jsModuleOnPackage.kt"); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/amd/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/amd/simple.kt"); } } @@ -15861,59 +5462,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Common_js extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInCommon_js() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/common_js"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("inlineFromModuleWithNonIdentifierName.kt") public void testInlineFromModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/inlineFromModuleWithNonIdentifierName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/common_js/inlineFromModuleWithNonIdentifierName.kt"); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/common_js/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/common_js/simple.kt"); } } @@ -15921,59 +5490,27 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Plain extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInPlain() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/plain"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("inlineFromModuleWithNonIdentifierName.kt") public void testInlineFromModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/inlineFromModuleWithNonIdentifierName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/plain/inlineFromModuleWithNonIdentifierName.kt"); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/plain/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/plain/simple.kt"); } } @@ -15981,42 +5518,22 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Umd extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInUmd() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/umd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("moduleWithNonIdentifierName.kt") public void testModuleWithNonIdentifierName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/umd/moduleWithNonIdentifierName.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiModuleWrappers/umd/simple.kt"); } } } @@ -16025,95 +5542,57 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiPackage extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInMultiPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiPackage"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classesInheritedFromOtherPackage.kt") public void testClassesInheritedFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/classesInheritedFromOtherPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiPackage/classesInheritedFromOtherPackage.kt"); } @TestMetadata("createClassFromOtherPackage.kt") public void testCreateClassFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt"); } @TestMetadata("createClassFromOtherPackageUsingImport.kt") public void testCreateClassFromOtherPackageUsingImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt"); } @TestMetadata("functionsVisibleFromOtherPackage.kt") public void testFunctionsVisibleFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/functionsVisibleFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/functionsVisibleFromOtherPackage.kt"); } @TestMetadata("nestedPackageFunctionCalledFromOtherPackage.kt") public void testNestedPackageFunctionCalledFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/nestedPackageFunctionCalledFromOtherPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/nestedPackageFunctionCalledFromOtherPackage.kt"); } @TestMetadata("packageVariableVisibleFromOtherPackage.kt") public void testPackageVariableVisibleFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/packageVariableVisibleFromOtherPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiPackage/packageVariableVisibleFromOtherPackage.kt"); } @TestMetadata("reflectionFromOtherPackage.kt") public void testReflectionFromOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/reflectionFromOtherPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multiPackage/reflectionFromOtherPackage.kt"); } @TestMetadata("subpackagesWithClashingNames.kt") public void testSubpackagesWithClashingNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNames.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNames.kt"); } @TestMetadata("subpackagesWithClashingNamesUsingImport.kt") public void testSubpackagesWithClashingNamesUsingImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNamesUsingImport.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multiPackage/subpackagesWithClashingNamesUsingImport.kt"); } } @@ -16121,116 +5600,47 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multideclaration extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInMultideclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multideclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("multiValForArray.kt") public void testMultiValForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multideclaration/multiValForArray.kt"); } @TestMetadata("multiValForMap.kt") public void testMultiValForMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForMap.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multideclaration/multiValForMap.kt"); } @TestMetadata("multiValForRange.kt") public void testMultiValForRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValForRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multideclaration/multiValForRange.kt"); } @TestMetadata("multiValInFor.kt") public void testMultiValInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInFor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multideclaration/multiValInFor.kt"); } @TestMetadata("multiValInIntFor.kt") public void testMultiValInIntFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInIntFor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multideclaration/multiValInIntFor.kt"); } @TestMetadata("multiValInIntRangeFor.kt") public void testMultiValInIntRangeFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/multideclaration/multiValInIntRangeFor.kt"); } @TestMetadata("multiValOrVar.kt") public void testMultiValOrVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multideclaration/multiValOrVar.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/multideclaration/multiValOrVar.kt"); } } @@ -16238,292 +5648,102 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NameClashes extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInNameClashes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nameClashes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classAndCompanionObjectMembers.kt") public void testClassAndCompanionObjectMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/classAndCompanionObjectMembers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/classAndCompanionObjectMembers.kt"); } @TestMetadata("constructorLocalVar.kt") public void testConstructorLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/constructorLocalVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/constructorLocalVar.kt"); } @TestMetadata("differenceInCapitalization.kt") public void testDifferenceInCapitalization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/differenceInCapitalization.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/differenceInCapitalization.kt"); } @TestMetadata("extensionFunctionAndProperty.kt") public void testExtensionFunctionAndProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/extensionFunctionAndProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/extensionFunctionAndProperty.kt"); } @TestMetadata("extensionPropertiesWithDifferentReceivers.kt") public void testExtensionPropertiesWithDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/extensionPropertiesWithDifferentReceivers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/extensionPropertiesWithDifferentReceivers.kt"); } @TestMetadata("extensionPropertyAndMethod.kt") public void testExtensionPropertyAndMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/extensionPropertyAndMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/extensionPropertyAndMethod.kt"); } @TestMetadata("jsNameAndPrivate.kt") public void testJsNameAndPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/jsNameAndPrivate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/jsNameAndPrivate.kt"); } @TestMetadata("localFunctionInLambda.kt") public void testLocalFunctionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/localFunctionInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/localFunctionInLambda.kt"); } @TestMetadata("localFunctions.kt") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/localFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/localFunctions.kt"); } @TestMetadata("methodAndPrivateProperty.kt") public void testMethodAndPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodAndPrivateProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/methodAndPrivateProperty.kt"); } @TestMetadata("methodOverload.kt") public void testMethodOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/nameClashes/methodOverload.kt"); } @TestMetadata("methodOverloadInClassWithTwoUpperBounds.kt") public void testMethodOverloadInClassWithTwoUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodOverloadInClassWithTwoUpperBounds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/methodOverloadInClassWithTwoUpperBounds.kt"); } @TestMetadata("nativeAndTopLevelFunction.kt") public void testNativeAndTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/nativeAndTopLevelFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/nativeAndTopLevelFunction.kt"); } @TestMetadata("nativeDeclarationAndLocalVar.kt") public void testNativeDeclarationAndLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/nativeDeclarationAndLocalVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/nativeDeclarationAndLocalVar.kt"); } @TestMetadata("overloadExtension.kt") public void testOverloadExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/overloadExtension.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/overloadExtension.kt"); } @TestMetadata("propertyAndNativeMethod.kt") public void testPropertyAndNativeMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/propertyAndNativeMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/propertyAndNativeMethod.kt"); } @TestMetadata("topLevelFunctionAndParameter.kt") public void testTopLevelFunctionAndParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/topLevelFunctionAndParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/topLevelFunctionAndParameter.kt"); } @TestMetadata("withBuiltin.kt") public void testWithBuiltin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/withBuiltin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nameClashes/withBuiltin.kt"); } } @@ -16531,21 +5751,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("accessToCompanionObjectFromInlineFun.kt") public void testAccessToCompanionObjectFromInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/accessToCompanionObjectFromInlineFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/accessToCompanionObjectFromInlineFun.kt"); } public void testAllFilesPresentInNative() throws Exception { @@ -16554,648 +5766,192 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("callbackOptionalParameter.kt") public void testCallbackOptionalParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/callbackOptionalParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/callbackOptionalParameter.kt"); } @TestMetadata("castToNativeClassChecked.kt") public void testCastToNativeClassChecked() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNativeClassChecked.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/castToNativeClassChecked.kt"); } @TestMetadata("castToNativeInterface.kt") public void testCastToNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNativeInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/castToNativeInterface.kt"); } @TestMetadata("castToNativeInterfaceChecked.kt") public void testCastToNativeInterfaceChecked() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNativeInterfaceChecked.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/castToNativeInterfaceChecked.kt"); } @TestMetadata("castToNullableNativeInterface.kt") public void testCastToNullableNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToNullableNativeInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/castToNullableNativeInterface.kt"); } @TestMetadata("castToTypeParamBoundedByNativeInterface.kt") public void testCastToTypeParamBoundedByNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/castToTypeParamBoundedByNativeInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/castToTypeParamBoundedByNativeInterface.kt"); } @TestMetadata("class.kt") public void testClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/class.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/class.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/classObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/classObject.kt"); } @TestMetadata("equalsMangling.kt") public void testEqualsMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/equalsMangling.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/equalsMangling.kt"); } @TestMetadata("eval.kt") public void testEval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/eval.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/eval.kt"); } @TestMetadata("exception.kt") public void testException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/exception.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/exception.kt"); } @TestMetadata("inheritanceFromNativeClass.kt") public void testInheritanceFromNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/inheritanceFromNativeClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/inheritanceFromNativeClass.kt"); } @TestMetadata("inheritanceFromNativeTrait.kt") public void testInheritanceFromNativeTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/inheritanceFromNativeTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/inheritanceFromNativeTrait.kt"); } @TestMetadata("inheritanceInNativeClass.kt") public void testInheritanceInNativeClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/inheritanceInNativeClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/inheritanceInNativeClass.kt"); } @TestMetadata("kt2209.kt") public void testKt2209() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/kt2209.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/kt2209.kt"); } @TestMetadata("library.kt") public void testLibrary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/library.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/library.kt"); } @TestMetadata("nativeClassAsReifiedTypeArgument.kt") public void testNativeClassAsReifiedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/nativeClassAsReifiedTypeArgument.kt"); } @TestMetadata("nativeGetterAndNativeSetter.kt") public void testNativeGetterAndNativeSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nativeGetterAndNativeSetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/nativeGetterAndNativeSetter.kt"); } @TestMetadata("nativeInvoke.kt") public void testNativeInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nativeInvoke.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/nativeInvoke.kt"); } @TestMetadata("nestedElements.kt") public void testNestedElements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/nestedElements.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/nestedElements.kt"); } @TestMetadata("objectFunWithVararg.kt") public void testObjectFunWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/objectFunWithVararg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/objectFunWithVararg.kt"); } @TestMetadata("overrideNativeOverloadedFunction.kt") public void testOverrideNativeOverloadedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/overrideNativeOverloadedFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/overrideNativeOverloadedFunction.kt"); } @TestMetadata("passExtLambdaFromNative.kt") public void testPassExtLambdaFromNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passExtLambdaFromNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passExtLambdaFromNative.kt"); } @TestMetadata("passExtLambdaToNative.kt") public void testPassExtLambdaToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passExtLambdaToNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passExtLambdaToNative.kt"); } @TestMetadata("passMemberOrExtFromNative.kt") public void testPassMemberOrExtFromNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passMemberOrExtFromNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passMemberOrExtFromNative.kt"); } @TestMetadata("passMemberOrExtToNative.kt") public void testPassMemberOrExtToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passMemberOrExtToNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passMemberOrExtToNative.kt"); } @TestMetadata("passTopLevelFunctionFromNative.kt") public void testPassTopLevelFunctionFromNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passTopLevelFunctionFromNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passTopLevelFunctionFromNative.kt"); } @TestMetadata("passTopLevelOrLocalFunctionToNative.kt") public void testPassTopLevelOrLocalFunctionToNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/passTopLevelOrLocalFunctionToNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/passTopLevelOrLocalFunctionToNative.kt"); } @TestMetadata("print.kt") public void testPrint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/print.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/print.kt"); } @TestMetadata("privateExternal.kt") public void testPrivateExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/privateExternal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/privateExternal.kt"); } @TestMetadata("safeCastToNativeInterface.kt") public void testSafeCastToNativeInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/safeCastToNativeInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/safeCastToNativeInterface.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/secondaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/simple.kt"); } @TestMetadata("simpleUndefined.kt") public void testSimpleUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/simpleUndefined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/simpleUndefined.kt"); } @TestMetadata("typeof.kt") public void testTypeof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/typeof.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/typeof.kt"); } @TestMetadata("undefined.kt") public void testUndefined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/undefined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/undefined.kt"); } @TestMetadata("useClassFromInlineFun.kt") public void testUseClassFromInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/useClassFromInlineFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/useClassFromInlineFun.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/native/vararg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/native/vararg.kt"); } } @@ -17203,280 +5959,92 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NestedTypes extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInNestedTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nestedTypes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("implicitOuterThisFromLambda.kt") public void testImplicitOuterThisFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLambda.kt"); } @TestMetadata("implicitOuterThisFromLocalClass.kt") public void testImplicitOuterThisFromLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/implicitOuterThisFromLocalClass.kt"); } @TestMetadata("inheritanceFromNestedBuiltIn.kt") public void testInheritanceFromNestedBuiltIn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/inheritanceFromNestedBuiltIn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/inheritanceFromNestedBuiltIn.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/inner.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/inner.kt"); } @TestMetadata("innerObjectRefFromConstructor.kt") public void testInnerObjectRefFromConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/innerObjectRefFromConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/innerObjectRefFromConstructor.kt"); } @TestMetadata("innerReferenceFromChild.kt") public void testInnerReferenceFromChild() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/innerReferenceFromChild.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/innerReferenceFromChild.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/nested.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/nested.kt"); } @TestMetadata("nestedInInterface.kt") public void testNestedInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/nestedInInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/nestedInInterface.kt"); } @TestMetadata("nestedObjectLazyInitialized.kt") public void testNestedObjectLazyInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/nestedObjectLazyInitialized.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/nestedObjectLazyInitialized.kt"); } @TestMetadata("outerClassReferenceFromSecondaryConstructor.kt") public void testOuterClassReferenceFromSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerClassReferenceFromSecondaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/outerClassReferenceFromSecondaryConstructor.kt"); } @TestMetadata("outerCompanion.kt") public void testOuterCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/outerCompanion.kt"); } @TestMetadata("outerNative.kt") public void testOuterNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/outerNative.kt"); } @TestMetadata("outerObject.kt") public void testOuterObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/outerObject.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/outerThis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/outerThis.kt"); } @TestMetadata("privateFieldNotOverridenInNestedSubclass.kt") public void testPrivateFieldNotOverridenInNestedSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/privateFieldNotOverridenInNestedSubclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/privateFieldNotOverridenInNestedSubclass.kt"); } @TestMetadata("receivers.kt") public void testReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nestedTypes/receivers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/nestedTypes/receivers.kt"); } } @@ -17484,467 +6052,147 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Number extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInNumber() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/number"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("assignmentIntOverflow.kt") public void testAssignmentIntOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/assignmentIntOverflow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/assignmentIntOverflow.kt"); } @TestMetadata("byteAndShortConversions.kt") public void testByteAndShortConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/byteAndShortConversions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/byteAndShortConversions.kt"); } @TestMetadata("constantPropagation.kt") public void testConstantPropagation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/constantPropagation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/constantPropagation.kt"); } @TestMetadata("conversionsWithTruncation.kt") public void testConversionsWithTruncation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/conversionsWithTruncation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/conversionsWithTruncation.kt"); } @TestMetadata("conversionsWithoutTruncation.kt") public void testConversionsWithoutTruncation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/conversionsWithoutTruncation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/conversionsWithoutTruncation.kt"); } @TestMetadata("division.kt") public void testDivision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/division.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/division.kt"); } @TestMetadata("doubleConversions.kt") public void testDoubleConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/doubleConversions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/doubleConversions.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/hashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/hashCode.kt"); } @TestMetadata("hexadecimalConstant.kt") public void testHexadecimalConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/hexadecimalConstant.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/hexadecimalConstant.kt"); } @TestMetadata("incDecOptimization.kt") public void testIncDecOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/incDecOptimization.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/incDecOptimization.kt"); } @TestMetadata("intConversions.kt") public void testIntConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intConversions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/intConversions.kt"); } @TestMetadata("intDivFloat.kt") public void testIntDivFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intDivFloat.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/intDivFloat.kt"); } @TestMetadata("intIncDecOverflow.kt") public void testIntIncDecOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intIncDecOverflow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/intIncDecOverflow.kt"); } @TestMetadata("intOverflow.kt") public void testIntOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/intOverflow.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/intOverflow.kt"); } @TestMetadata("kt2342.kt") public void testKt2342() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/kt2342.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/kt2342.kt"); } @TestMetadata("longArray.kt") public void testLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longArray.kt"); } @TestMetadata("longBinaryOperations.kt") public void testLongBinaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longBinaryOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longBinaryOperations.kt"); } @TestMetadata("longBitOperations.kt") public void testLongBitOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longBitOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longBitOperations.kt"); } @TestMetadata("longCompareToIntrinsic.kt") public void testLongCompareToIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longCompareToIntrinsic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longCompareToIntrinsic.kt"); } @TestMetadata("longEqualsIntrinsic.kt") public void testLongEqualsIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longEqualsIntrinsic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longEqualsIntrinsic.kt"); } @TestMetadata("longHashCode.kt") public void testLongHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longHashCode.kt"); } @TestMetadata("longUnaryOperations.kt") public void testLongUnaryOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/longUnaryOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/longUnaryOperations.kt"); } @TestMetadata("mulInt32.kt") public void testMulInt32() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/mulInt32.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/mulInt32.kt"); } @TestMetadata("numberCompareTo.kt") public void testNumberCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberCompareTo.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/numberCompareTo.kt"); } @TestMetadata("numberConversions.kt") public void testNumberConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberConversions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/numberConversions.kt"); } @TestMetadata("numberIncDec.kt") public void testNumberIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberIncDec.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/numberIncDec.kt"); } @TestMetadata("numberIsCheck.kt") public void testNumberIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/number/numberIsCheck.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/number/numberIsCheck.kt"); } } @@ -17952,195 +6200,67 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectDeclaration extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInObjectDeclaration() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/objectDeclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("dontPolluteObject.kt") public void testDontPolluteObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/dontPolluteObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/dontPolluteObject.kt"); } @TestMetadata("kt3684.kt") public void testKt3684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/kt3684.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/kt3684.kt"); } @TestMetadata("lambdaInObjectInsideObject.kt") public void testLambdaInObjectInsideObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/lambdaInObjectInsideObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/lambdaInObjectInsideObject.kt"); } @TestMetadata("objectDeclaration.kt") public void testObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectDeclaration.kt"); } @TestMetadata("objectDeclarationWithVars.kt") public void testObjectDeclarationWithVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectDeclarationWithVars.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectDeclarationWithVars.kt"); } @TestMetadata("objectInMethod.kt") public void testObjectInMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectInMethod.kt"); } @TestMetadata("objectInObject.kt") public void testObjectInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectInObject.kt"); } @TestMetadata("objectInObjectWithClosure.kt") public void testObjectInObjectWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInObjectWithClosure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectInObjectWithClosure.kt"); } @TestMetadata("objectInheritingFromATrait.kt") public void testObjectInheritingFromATrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInheritingFromATrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectInheritingFromATrait.kt"); } @TestMetadata("objectInheritingFromClass.kt") public void testObjectInheritingFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectInheritingFromClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectInheritingFromClass.kt"); } @TestMetadata("objectWithMethods.kt") public void testObjectWithMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/objectDeclaration/objectWithMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/objectDeclaration/objectWithMethods.kt"); } } @@ -18148,289 +6268,127 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorOverloading extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInOperatorOverloading() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/operatorOverloading"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("augmentedAssignmentLhs.kt") public void testAugmentedAssignmentLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/augmentedAssignmentLhs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/augmentedAssignmentLhs.kt"); } @TestMetadata("binaryDivOverload.kt") public void testBinaryDivOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/compareTo.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/compareTo.kt"); } @TestMetadata("compareToByName.kt") public void testCompareToByName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/compareToByName.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/compareToByName.kt"); } @TestMetadata("lambdaRhs.kt") public void testLambdaRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/lambdaRhs.kt"); } @TestMetadata("notOverload.kt") public void testNotOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/notOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/notOverload.kt"); } @TestMetadata("operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt") public void testOperatorOverloadOnPropertyCallGetterAndSetterOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt"); } @TestMetadata("overloadPlusAssignArrayList.kt") public void testOverloadPlusAssignArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignArrayList.kt"); } @TestMetadata("overloadPlusAssignViaExtensionFunction.kt") public void testOverloadPlusAssignViaExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaExtensionFunction.kt"); } @TestMetadata("overloadPlusAssignViaPlusExtensionFunction.kt") public void testOverloadPlusAssignViaPlusExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaPlusExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusAssignViaPlusExtensionFunction.kt"); } @TestMetadata("overloadPlusViaExtensionFunction.kt") public void testOverloadPlusViaExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/overloadPlusViaExtensionFunction.kt"); } @TestMetadata("overloadUnaryOperationsViaExtensionFunctions.kt") public void testOverloadUnaryOperationsViaExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadUnaryOperationsViaExtensionFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/overloadUnaryOperationsViaExtensionFunctions.kt"); } @TestMetadata("overloadedCallOnProperty.kt") public void testOverloadedCallOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/overloadedCallOnProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/overloadedCallOnProperty.kt"); } @TestMetadata("plusAndMinusAsAnExpression.kt") public void testPlusAndMinusAsAnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/plusAndMinusAsAnExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/plusAndMinusAsAnExpression.kt"); } @TestMetadata("plusAssignNoReassign.kt") public void testPlusAssignNoReassign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/plusAssignNoReassign.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/plusAssignNoReassign.kt"); } @TestMetadata("plusOverload.kt") public void testPlusOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/plusOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/plusOverload.kt"); } @TestMetadata("postfixInc.kt") public void testPostfixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/postfixInc.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/postfixInc.kt"); } @TestMetadata("postfixOnProperty.kt") public void testPostfixOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/postfixOnProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/postfixOnProperty.kt"); } @TestMetadata("prefixDecOverload.kt") public void testPrefixDecOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/prefixDecOverload.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/prefixDecOverload.kt"); } @TestMetadata("prefixIncReturnsCorrectValue.kt") public void testPrefixIncReturnsCorrectValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/prefixIncReturnsCorrectValue.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/prefixIncReturnsCorrectValue.kt"); } @TestMetadata("unaryOnIntProperty.kt") public void testUnaryOnIntProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/unaryOnIntProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/operatorOverloading/unaryOnIntProperty.kt"); } @TestMetadata("unaryOnIntPropertyAsStatement.kt") public void testUnaryOnIntPropertyAsStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/unaryOnIntPropertyAsStatement.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/unaryOnIntPropertyAsStatement.kt"); } @TestMetadata("usingModInCaseModAssignNotAvailable.kt") public void testUsingModInCaseModAssignNotAvailable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt"); } } @@ -18438,38 +6396,37 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/package"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classCreatedInDeeplyNestedPackage.kt") public void testClassCreatedInDeeplyNestedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt"); } @TestMetadata("deeplyNestedPackage.kt") public void testDeeplyNestedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/deeplyNestedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/deeplyNestedPackage.kt"); } @TestMetadata("deeplyNestedPackageFunctionCalled.kt") public void testDeeplyNestedPackageFunctionCalled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/deeplyNestedPackageFunctionCalled.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/deeplyNestedPackageFunctionCalled.kt"); } @TestMetadata("initializersOfNestedPackagesExecute.kt") public void testInitializersOfNestedPackagesExecute() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt"); } @TestMetadata("nestedPackage.kt") public void testNestedPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/nestedPackage.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/package/nestedPackage.kt"); } } @@ -18477,27 +6434,18 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyAccess extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + @TestMetadata("accessToInstanceProperty.kt") public void testAccessToInstanceProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/accessToInstanceProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/accessToInstanceProperty.kt"); } @TestMetadata("accessorsWithJsName.kt") public void testAccessorsWithJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/accessorsWithJsName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/accessorsWithJsName.kt"); } public void testAllFilesPresentInPropertyAccess() throws Exception { @@ -18506,243 +6454,102 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestMetadata("classUsesPackageProperties.kt") public void testClassUsesPackageProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/classUsesPackageProperties.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/classUsesPackageProperties.kt"); } @TestMetadata("customGetter.kt") public void testCustomGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/customGetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/customGetter.kt"); } @TestMetadata("customSetter.kt") public void testCustomSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/customSetter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/customSetter.kt"); } @TestMetadata("defaultAccessorsWithJsName.kt") public void testDefaultAccessorsWithJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/defaultAccessorsWithJsName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/defaultAccessorsWithJsName.kt"); } @TestMetadata("enumerable.kt") public void testEnumerable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/enumerable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/enumerable.kt"); } @TestMetadata("extensionLiteralSafeCall.kt") public void testExtensionLiteralSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/extensionLiteralSafeCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/extensionLiteralSafeCall.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/field.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/field.kt"); } @TestMetadata("initInstanceProperties.kt") public void testInitInstanceProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/initInstanceProperties.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/initInstanceProperties.kt"); } @TestMetadata("initValInConstructor.kt") public void testInitValInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/initValInConstructor.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/initValInConstructor.kt"); } @TestMetadata("overloadedOverriddenFunctionPropertyName.kt") public void testOverloadedOverriddenFunctionPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/overloadedOverriddenFunctionPropertyName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/overloadedOverriddenFunctionPropertyName.kt"); } @TestMetadata("packageCustomAccessors.kt") public void testPackageCustomAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packageCustomAccessors.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/packageCustomAccessors.kt"); } @TestMetadata("packagePropertyInitializer.kt") public void testPackagePropertyInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packagePropertyInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/packagePropertyInitializer.kt"); } @TestMetadata("packagePropertySet.kt") public void testPackagePropertySet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/packagePropertySet.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/packagePropertySet.kt"); } @TestMetadata("privatePropertyAccessFromMethod.kt") public void testPrivatePropertyAccessFromMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/privatePropertyAccessFromMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/privatePropertyAccessFromMethod.kt"); } @TestMetadata("propertyAssignment.kt") public void testPropertyAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/propertyAssignment.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/propertyAssignment.kt"); } @TestMetadata("setter.kt") public void testSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/setter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/setter.kt"); } @TestMetadata("simpleLateInitIsInitialized.kt") public void testSimpleLateInitIsInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/simpleLateInitIsInitialized.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/simpleLateInitIsInitialized.kt"); } @TestMetadata("staticAccessorsWithJsName.kt") public void testStaticAccessorsWithJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/staticAccessorsWithJsName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/staticAccessorsWithJsName.kt"); } @TestMetadata("subclassAccessorsWithJsNameInSuper.kt") public void testSubclassAccessorsWithJsNameInSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/subclassAccessorsWithJsNameInSuper.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyAccess/subclassAccessorsWithJsNameInSuper.kt"); } @TestMetadata("twoClassesWithProperties.kt") public void testTwoClassesWithProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyAccess/twoClassesWithProperties.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyAccess/twoClassesWithProperties.kt"); } } @@ -18750,184 +6557,67 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyOverride extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInPropertyOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyOverride"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("checkSupertypeOrder.kt") public void testCheckSupertypeOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/checkSupertypeOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/checkSupertypeOrder.kt"); } @TestMetadata("initOverrideInConstructor.kt") public void testInitOverrideInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideInConstructor.kt"); } @TestMetadata("initOverrideInConstructorComplex.kt") public void testInitOverrideInConstructorComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorComplex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorComplex.kt"); } @TestMetadata("initOverrideInConstructorExplicitThis.kt") public void testInitOverrideInConstructorExplicitThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorExplicitThis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideInConstructorExplicitThis.kt"); } @TestMetadata("initOverrideVarInConstructor.kt") public void testInitOverrideVarInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/initOverrideVarInConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/initOverrideVarInConstructor.kt"); } @TestMetadata("overloadPrivateVal.kt") public void testOverloadPrivateVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overloadPrivateVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/overloadPrivateVal.kt"); } @TestMetadata("overrideExtensionProperty.kt") public void testOverrideExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideExtensionProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/propertyOverride/overrideExtensionProperty.kt"); } @TestMetadata("overrideNotDirectlySuper.kt") public void testOverrideNotDirectlySuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideNotDirectlySuper.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/overrideNotDirectlySuper.kt"); } @TestMetadata("overrideValFromTraits.kt") public void testOverrideValFromTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideValFromTraits.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/overrideValFromTraits.kt"); } @TestMetadata("overrideValWithBackendFiled.kt") public void testOverrideValWithBackendFiled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/overrideValWithBackendFiled.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/overrideValWithBackendFiled.kt"); } @TestMetadata("simpleOverride.kt") public void testSimpleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/propertyOverride/simpleOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/propertyOverride/simpleOverride.kt"); } } @@ -18935,195 +6625,67 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Range extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/range"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("creatingProgressions.kt") public void testCreatingProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/creatingProgressions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/creatingProgressions.kt"); } @TestMetadata("explicitRange.kt") public void testExplicitRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/explicitRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/explicitRange.kt"); } @TestMetadata("intDownTo.kt") public void testIntDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intDownTo.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/intDownTo.kt"); } @TestMetadata("intInRange.kt") public void testIntInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intInRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/intInRange.kt"); } @TestMetadata("intUpTo.kt") public void testIntUpTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/intUpTo.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/intUpTo.kt"); } @TestMetadata("iteratingOverRanges.kt") public void testIteratingOverRanges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/iteratingOverRanges.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/iteratingOverRanges.kt"); } @TestMetadata("numberRangesOptimized.kt") public void testNumberRangesOptimized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/numberRangesOptimized.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/numberRangesOptimized.kt"); } @TestMetadata("rangeEquals.kt") public void testRangeEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/rangeEquals.kt"); } @TestMetadata("rangeSugarSyntax.kt") public void testRangeSugarSyntax() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeSugarSyntax.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/rangeSugarSyntax.kt"); } @TestMetadata("rangeToDoesNotIterate.kt") public void testRangeToDoesNotIterate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/rangeToDoesNotIterate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/rangeToDoesNotIterate.kt"); } @TestMetadata("reverse.kt") public void testReverse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/range/reverse.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/range/reverse.kt"); } } @@ -19131,246 +6693,82 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("external.kt") public void testExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/external.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/external.kt"); } @TestMetadata("jsClass.kt") public void testJsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/jsClass.kt"); } @TestMetadata("jsClassName.kt") public void testJsClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/jsClassName.kt"); } @TestMetadata("jsClassOnReifiedType.kt") public void testJsClassOnReifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassOnReifiedType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/jsClassOnReifiedType.kt"); } @TestMetadata("jsClassOnReifiedTypeInLambda.kt") public void testJsClassOnReifiedTypeInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassOnReifiedTypeInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/jsClassOnReifiedTypeInLambda.kt"); } @TestMetadata("jsClassSimpleName.kt") public void testJsClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/jsClassSimpleName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/jsClassSimpleName.kt"); } @TestMetadata("kClass.kt") public void testKClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/kClass.kt"); } @TestMetadata("kClassIsInstance.kt") public void testKClassIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassIsInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/kClassIsInstance.kt"); } @TestMetadata("kClassOnReifiedType.kt") public void testKClassOnReifiedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassOnReifiedType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/kClassOnReifiedType.kt"); } @TestMetadata("kClassOnReifiedTypeInLambda.kt") public void testKClassOnReifiedTypeInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassOnReifiedTypeInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/kClassOnReifiedTypeInLambda.kt"); } @TestMetadata("kClassSimpleName.kt") public void testKClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassSimpleName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/kClassSimpleName.kt"); } @TestMetadata("kClassToAndFromJsClass.kt") public void testKClassToAndFromJsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/kClassToAndFromJsClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/kClassToAndFromJsClass.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/primitives.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/primitives.kt"); } @TestMetadata("primitives-12.kt") public void testPrimitives_12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reflection/primitives-12.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reflection/primitives-12.kt"); } } @@ -19378,42 +6776,22 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regression extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInRegression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/regression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("kt2470.kt") public void testKt2470() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/regression/kt2470.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/regression/kt2470.kt"); } @TestMetadata("tmpInsidePrimaryConstructor.kt") public void testTmpInsidePrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/regression/tmpInsidePrimaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/regression/tmpInsidePrimaryConstructor.kt"); } } @@ -19421,348 +6799,112 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reified"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("callChain.kt") public void testCallChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/callChain.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/callChain.kt"); } @TestMetadata("capture.kt") public void testCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/capture.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/capture.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/extensionFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/extensionFun.kt"); } @TestMetadata("extensionLambda.kt") public void testExtensionLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/extensionLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/extensionLambda.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/extensionMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/extensionMethod.kt"); } @TestMetadata("innerObject.kt") public void testInnerObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/innerObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/innerObject.kt"); } @TestMetadata("isBool.kt") public void testIsBool() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isBool.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/isBool.kt"); } @TestMetadata("isChar.kt") public void testIsChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isChar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/isChar.kt"); } @TestMetadata("isClass.kt") public void testIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/isClass.kt"); } @TestMetadata("isNumber.kt") public void testIsNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isNumber.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/isNumber.kt"); } @TestMetadata("isString.kt") public void testIsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/isString.kt"); } @TestMetadata("isTNullable.kt") public void testIsTNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/isTNullable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/isTNullable.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/lambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/lambda.kt"); } @TestMetadata("lambdaNameClash.kt") public void testLambdaNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/lambdaNameClash.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/lambdaNameClash.kt"); } @TestMetadata("method.kt") public void testMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/method.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/method.kt"); } @TestMetadata("multipleTypeParameters.kt") public void testMultipleTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/multipleTypeParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/multipleTypeParameters.kt"); } @TestMetadata("noValueParameters.kt") public void testNoValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/noValueParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/noValueParameters.kt"); } @TestMetadata("parameterSwap.kt") public void testParameterSwap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/parameterSwap.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/parameterSwap.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/vararg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/vararg.kt"); } @TestMetadata("withInlineTurnedOff.kt") public void testWithInlineTurnedOff() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/reified/withInlineTurnedOff.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/reified/withInlineTurnedOff.kt"); } } @@ -19770,314 +6912,102 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Rtti extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInRtti() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/rtti"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("collectionClassesIsCheck.kt") public void testCollectionClassesIsCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/collectionClassesIsCheck.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/collectionClassesIsCheck.kt"); } @TestMetadata("exceptionIsInterface.kt") public void testExceptionIsInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/exceptionIsInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/exceptionIsInterface.kt"); } @TestMetadata("isComparable.kt") public void testIsComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isComparable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/isComparable.kt"); } @TestMetadata("isJsPrimitiveType.kt") public void testIsJsPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isJsPrimitiveType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/isJsPrimitiveType.kt"); } @TestMetadata("isObject.kt") public void testIsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/isObject.kt"); } @TestMetadata("isReifiedObject.kt") public void testIsReifiedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isReifiedObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/isReifiedObject.kt"); } @TestMetadata("isSameClass.kt") public void testIsSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/isSameClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/isSameClass.kt"); } @TestMetadata("notIsOtherClass.kt") public void testNotIsOtherClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/notIsOtherClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/notIsOtherClass.kt"); } @TestMetadata("objectExpression.kt") public void testObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/objectExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/objectExpression.kt"); } @TestMetadata("onNativeObject.kt") public void testOnNativeObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/onNativeObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/onNativeObject.kt"); } @TestMetadata("prototypeUsedToFindInterface.kt") public void testPrototypeUsedToFindInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/prototypeUsedToFindInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/prototypeUsedToFindInterface.kt"); } @TestMetadata("rttiForClass.kt") public void testRttiForClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/rttiForClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/rttiForClass.kt"); } @TestMetadata("rttiForTrait.kt") public void testRttiForTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/rttiForTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/rttiForTrait.kt"); } @TestMetadata("rttiForTrait2.kt") public void testRttiForTrait2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/rttiForTrait2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/rttiForTrait2.kt"); } @TestMetadata("sideEffectMethod.kt") public void testSideEffectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/sideEffectMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/sideEffectMethod.kt"); } @TestMetadata("sideEffectProperty.kt") public void testSideEffectProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/sideEffectProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/sideEffectProperty.kt"); } @TestMetadata("stdlibEmptyListClass.kt") public void testStdlibEmptyListClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/stdlibEmptyListClass.kt"); } @TestMetadata("subclassOfNativeIsInterface.kt") public void testSubclassOfNativeIsInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/rtti/subclassOfNativeIsInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/rtti/subclassOfNativeIsInterface.kt"); } } @@ -20085,116 +7015,47 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/safeCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("redundantSafeAccess.kt") public void testRedundantSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/redundantSafeAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/safeCall/redundantSafeAccess.kt"); } @TestMetadata("safeAccess.kt") public void testSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/safeCall/safeAccess.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/safeCall/safeCall.kt"); } @TestMetadata("safeCallAndIntrinsic.kt") public void testSafeCallAndIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCallAndIntrinsic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/safeCall/safeCallAndIntrinsic.kt"); } @TestMetadata("safeCallAndSideEffect.kt") public void testSafeCallAndSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCallAndSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/safeCall/safeCallAndSideEffect.kt"); } @TestMetadata("safeCallReturnsNullIfFails.kt") public void testSafeCallReturnsNullIfFails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeCallReturnsNullIfFails.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/safeCall/safeCallReturnsNullIfFails.kt"); } @TestMetadata("safeExtensionFunctionCall.kt") public void testSafeExtensionFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/safeCall/safeExtensionFunctionCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/safeCall/safeExtensionFunctionCall.kt"); } } @@ -20202,211 +7063,172 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Simple extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInSimple() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/simple"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/assign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/assign.kt"); } @TestMetadata("breakDoWhile.kt") public void testBreakDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/breakDoWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/breakDoWhile.kt"); } @TestMetadata("breakWhile.kt") public void testBreakWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/breakWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/breakWhile.kt"); } @TestMetadata("classInstantiation.kt") public void testClassInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/classInstantiation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/classInstantiation.kt"); } @TestMetadata("comparison.kt") public void testComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/comparison.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/comparison.kt"); } @TestMetadata("complexExpressionAsConstructorParameter.kt") public void testComplexExpressionAsConstructorParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/complexExpressionAsConstructorParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/complexExpressionAsConstructorParameter.kt"); } @TestMetadata("constructorWithParameter.kt") public void testConstructorWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/constructorWithParameter.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/constructorWithParameter.kt"); } @TestMetadata("constructorWithPropertiesAsParameters.kt") public void testConstructorWithPropertiesAsParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/constructorWithPropertiesAsParameters.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/constructorWithPropertiesAsParameters.kt"); } @TestMetadata("continueDoWhile.kt") public void testContinueDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/continueDoWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/continueDoWhile.kt"); } @TestMetadata("continueWhile.kt") public void testContinueWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/continueWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/continueWhile.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/doWhile.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/doWhile.kt"); } @TestMetadata("doWhile2.kt") public void testDoWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/doWhile2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/doWhile2.kt"); } @TestMetadata("elseif.kt") public void testElseif() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/elseif.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/elseif.kt"); } @TestMetadata("if.kt") public void testIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/if.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/if.kt"); } @TestMetadata("ifElseAsExpression.kt") public void testIfElseAsExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/ifElseAsExpression.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/ifElseAsExpression.kt"); } @TestMetadata("methodDeclarationAndCall.kt") public void testMethodDeclarationAndCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/methodDeclarationAndCall.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/methodDeclarationAndCall.kt"); } @TestMetadata("minusAssignOnProperty.kt") public void testMinusAssignOnProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/minusAssignOnProperty.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/minusAssignOnProperty.kt"); } @TestMetadata("notBoolean.kt") public void testNotBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/notBoolean.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/notBoolean.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/plusAssign.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/plusAssign.kt"); } @TestMetadata("positiveAndNegativeNumbers.kt") public void testPositiveAndNegativeNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/positiveAndNegativeNumbers.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/positiveAndNegativeNumbers.kt"); } @TestMetadata("postfixIntOperations.kt") public void testPostfixIntOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/postfixIntOperations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/simple/postfixIntOperations.kt"); } @TestMetadata("prefixIntOperations.kt") public void testPrefixIntOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/prefixIntOperations.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/prefixIntOperations.kt"); } @TestMetadata("primCtorDelegation1.kt") public void testPrimCtorDelegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/primCtorDelegation1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/primCtorDelegation1.kt"); } @TestMetadata("propertiesAsParametersInitialized.kt") public void testPropertiesAsParametersInitialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertyAccess.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/propertyAccess.kt"); } @TestMetadata("secCtorDelegation1.kt") public void testSecCtorDelegation1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation1.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation1.kt"); } @TestMetadata("secCtorDelegation2.kt") public void testSecCtorDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation2.kt"); } @TestMetadata("secCtorDelegation3.kt") public void testSecCtorDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation3.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation3.kt"); } @TestMetadata("secCtorDelegation4.kt") public void testSecCtorDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation4.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/secCtorDelegation4.kt"); } @TestMetadata("simpleInitializer.kt") public void testSimpleInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/simpleInitializer.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/simpleInitializer.kt"); } @TestMetadata("while.kt") public void testWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/while.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/while.kt"); } @TestMetadata("while2.kt") public void testWhile2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/while2.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/simple/while2.kt"); } } @@ -20414,263 +7236,87 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StandardClasses extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInStandardClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/standardClasses"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("any.kt") public void testAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/any.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/any.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/array.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/array.kt"); } @TestMetadata("arrayAccess.kt") public void testArrayAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arrayAccess.kt"); } @TestMetadata("arrayConstructorsWithLambda.kt") public void testArrayConstructorsWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arrayConstructorsWithLambda.kt"); } @TestMetadata("arrayFactoryMethods.kt") public void testArrayFactoryMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayFactoryMethods.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arrayFactoryMethods.kt"); } @TestMetadata("arrayFunctionConstructor.kt") public void testArrayFunctionConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arrayFunctionConstructor.kt"); } @TestMetadata("arrayIsFilledWithNulls.kt") public void testArrayIsFilledWithNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arrayIsFilledWithNulls.kt"); } @TestMetadata("arraySize.kt") public void testArraySize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arraySize.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arraySize.kt"); } @TestMetadata("arraysIterator.kt") public void testArraysIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/arraysIterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/arraysIterator.kt"); } @TestMetadata("charArrayGetSet.kt") public void testCharArrayGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/charArrayGetSet.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/charArrayGetSet.kt"); } @TestMetadata("hashMapTypeOfElement.kt") public void testHashMapTypeOfElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/hashMapTypeOfElement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/hashMapTypeOfElement.kt"); } @TestMetadata("hashSetTypeOfElement.kt") public void testHashSetTypeOfElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/hashSetTypeOfElement.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/hashSetTypeOfElement.kt"); } @TestMetadata("mutableMapRemoveWithCollision.kt") public void testMutableMapRemoveWithCollision() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/mutableMapRemoveWithCollision.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/mutableMapRemoveWithCollision.kt"); } @TestMetadata("stringBuilder.kt") public void testStringBuilder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/stringBuilder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/stringBuilder.kt"); } @TestMetadata("stringPlus.kt") public void testStringPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/standardClasses/stringPlus.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/standardClasses/stringPlus.kt"); } } @@ -20678,93 +7324,37 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperCall extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInSuperCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/superCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("classSuperCall.kt") public void testClassSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/classSuperCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/superCall/classSuperCall.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/intrinsic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/superCall/intrinsic.kt"); } @TestMetadata("nativeSuperClass.kt") public void testNativeSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/nativeSuperClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/superCall/nativeSuperClass.kt"); } @TestMetadata("propertySuperAccess.kt") public void testPropertySuperAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/propertySuperAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/superCall/propertySuperAccess.kt"); } @TestMetadata("traitSuperCall.kt") public void testTraitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/superCall/traitSuperCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/superCall/traitSuperCall.kt"); } } @@ -20772,150 +7362,57 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Trait extends AbstractIrBoxJsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS_IR, testDataFilePath); + } + public void testAllFilesPresentInTrait() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/trait"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS_IR, true); } @TestMetadata("checkImplementationCharacteristics.kt") public void testCheckImplementationCharacteristics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/checkImplementationCharacteristics.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/checkImplementationCharacteristics.kt"); } @TestMetadata("classDerivesFromClassAndTrait.kt") public void testClassDerivesFromClassAndTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/classDerivesFromClassAndTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/classDerivesFromClassAndTrait.kt"); } @TestMetadata("classDerivesFromTraitAndClass.kt") public void testClassDerivesFromTraitAndClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/classDerivesFromTraitAndClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/classDerivesFromTraitAndClass.kt"); } @TestMetadata("definitionOrder.kt") public void testDefinitionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/definitionOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/definitionOrder.kt"); } @TestMetadata("example.kt") public void testExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/example.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/example.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/funDelegation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/box/trait/funDelegation.kt"); } @TestMetadata("traitAddsFunctionsToClass.kt") public void testTraitAddsFunctionsToClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/traitAddsFunctionsToClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/traitAddsFunctionsToClass.kt"); } @TestMetadata("traitExtendsTrait.kt") public void testTraitExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/traitExtendsTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/traitExtendsTrait.kt"); } @TestMetadata("traitExtendsTwoTraits.kt") public void testTraitExtendsTwoTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/trait/traitExtendsTwoTraits.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("js/js.translator/testData/box/trait/traitExtendsTwoTraits.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index e96fee8042b..c736c218c67 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -29,419 +33,149 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotatedEnumEntry.kt") public void testAnnotatedEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotatedEnumEntry.kt"); } @TestMetadata("annotatedObjectLiteral.kt") public void testAnnotatedObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotatedObjectLiteral.kt"); } @TestMetadata("annotationWithKotlinProperty.kt") public void testAnnotationWithKotlinProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinProperty.kt"); } @TestMetadata("annotationWithKotlinPropertyFromInterfaceCompanion.kt") public void testAnnotationWithKotlinPropertyFromInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotationWithKotlinPropertyFromInterfaceCompanion.kt"); } @TestMetadata("annotationsOnDefault.kt") public void testAnnotationsOnDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotationsOnDefault.kt"); } @TestMetadata("annotationsOnTypeAliases.kt") public void testAnnotationsOnTypeAliases() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotationsOnTypeAliases.kt"); } @TestMetadata("defaultParameterValues.kt") public void testDefaultParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/defaultParameterValues.kt"); } @TestMetadata("delegatedPropertySetter.kt") public void testDelegatedPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/delegatedPropertySetter.kt"); } @TestMetadata("fileClassWithFileAnnotation.kt") public void testFileClassWithFileAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/fileClassWithFileAnnotation.kt"); } @TestMetadata("jvmAnnotationFlags.kt") public void testJvmAnnotationFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/jvmAnnotationFlags.kt"); } @TestMetadata("kotlinPropertyFromClassObjectAsParameter.kt") public void testKotlinPropertyFromClassObjectAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/kotlinPropertyFromClassObjectAsParameter.kt"); } @TestMetadata("kotlinTopLevelPropertyAsParameter.kt") public void testKotlinTopLevelPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/kotlinTopLevelPropertyAsParameter.kt"); } @TestMetadata("kt10136.kt") public void testKt10136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/kt10136.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/kt10136.kt"); } @TestMetadata("nestedClassPropertyAsParameter.kt") public void testNestedClassPropertyAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/nestedClassPropertyAsParameter.kt"); } @TestMetadata("nestedClassesInAnnotations.kt") public void testNestedClassesInAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/nestedClassesInAnnotations.kt"); } @TestMetadata("parameterAnnotationInDefaultImpls.kt") public void testParameterAnnotationInDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/parameterAnnotationInDefaultImpls.kt"); } @TestMetadata("parameterWithPrimitiveType.kt") public void testParameterWithPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/parameterWithPrimitiveType.kt"); } @TestMetadata("propertyWithPropertyInInitializerAsParameter.kt") public void testPropertyWithPropertyInInitializerAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/propertyWithPropertyInInitializerAsParameter.kt"); } @TestMetadata("resolveWithLowPriorityAnnotation.kt") public void testResolveWithLowPriorityAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/annotations/resolveWithLowPriorityAnnotation.kt"); } @TestMetadata("varargInAnnotationParameter.kt") public void testVarargInAnnotationParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/varargInAnnotationParameter.kt"); } @TestMetadata("wrongAnnotationArgumentInCtor.kt") public void testWrongAnnotationArgumentInCtor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/wrongAnnotationArgumentInCtor.kt"); } @TestMetadata("compiler/testData/codegen/box/annotations/annotatedLambda") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AnnotatedLambda extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInAnnotatedLambda() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/annotations/annotatedLambda"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("funExpression.kt") public void testFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/funExpression.kt"); } @TestMetadata("lambda.kt") public void testLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/lambda.kt"); } @TestMetadata("samFunExpression.kt") public void testSamFunExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samFunExpression.kt"); } @TestMetadata("samLambda.kt") public void testSamLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/annotations/annotatedLambda/samLambda.kt"); } } } @@ -450,86 +184,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArgumentOrder extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInArgumentOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/argumentOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("argumentOrderInObjectSuperCall.kt") public void testArgumentOrderInObjectSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInObjectSuperCall.kt"); } @TestMetadata("argumentOrderInSuperCall.kt") public void testArgumentOrderInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/argumentOrderInSuperCall.kt"); } @TestMetadata("arguments.kt") public void testArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/arguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/arguments.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/captured.kt"); } @TestMetadata("capturedInExtension.kt") public void testCapturedInExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/capturedInExtension.kt"); } @TestMetadata("defaults.kt") public void testDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/defaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/defaults.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extension.kt"); } @TestMetadata("extensionInClass.kt") public void testExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/extensionInClass.kt"); } @TestMetadata("kt9277.kt") public void testKt9277() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/kt9277.kt"); } @TestMetadata("lambdaMigration.kt") public void testLambdaMigration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigration.kt"); } @TestMetadata("lambdaMigrationInClass.kt") public void testLambdaMigrationInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/lambdaMigrationInClass.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simple.kt"); } @TestMetadata("simpleInClass.kt") public void testSimpleInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/argumentOrder/simpleInClass.kt"); } } @@ -537,533 +262,396 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Arrays extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayConstructorsSimple.kt") public void testArrayConstructorsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); } @TestMetadata("arrayGetAssignMultiIndex.kt") public void testArrayGetAssignMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); } @TestMetadata("arrayGetMultiIndex.kt") public void testArrayGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); } @TestMetadata("arrayInstanceOf.kt") public void testArrayInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); } @TestMetadata("arrayPlusAssign.kt") public void testArrayPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); } @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/cloneArray.kt"); } @TestMetadata("clonePrimitiveArrays.kt") public void testClonePrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); } @TestMetadata("collectionAssignGetMultiIndex.kt") public void testCollectionAssignGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); } @TestMetadata("collectionGetMultiIndex.kt") public void testCollectionGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); } @TestMetadata("forEachBooleanArray.kt") public void testForEachBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); } @TestMetadata("forEachByteArray.kt") public void testForEachByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); } @TestMetadata("forEachCharArray.kt") public void testForEachCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); } @TestMetadata("forEachDoubleArray.kt") public void testForEachDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); } @TestMetadata("forEachFloatArray.kt") public void testForEachFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); } @TestMetadata("forEachIntArray.kt") public void testForEachIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); } @TestMetadata("forEachLongArray.kt") public void testForEachLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); } @TestMetadata("forEachShortArray.kt") public void testForEachShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); } @TestMetadata("genericArrayInObjectLiteralConstructor.kt") public void testGenericArrayInObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/hashMap.kt"); } @TestMetadata("inProjectionAsParameter.kt") public void testInProjectionAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); } @TestMetadata("inProjectionOfArray.kt") public void testInProjectionOfArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); } @TestMetadata("inProjectionOfList.kt") public void testInProjectionOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); } @TestMetadata("indices.kt") public void testIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indices.kt"); } @TestMetadata("indicesChar.kt") public void testIndicesChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indicesChar.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iterator.kt"); } @TestMetadata("iteratorBooleanArray.kt") public void testIteratorBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); } @TestMetadata("iteratorByteArray.kt") public void testIteratorByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); } @TestMetadata("iteratorByteArrayNextByte.kt") public void testIteratorByteArrayNextByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); } @TestMetadata("iteratorCharArray.kt") public void testIteratorCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); } @TestMetadata("iteratorDoubleArray.kt") public void testIteratorDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); } @TestMetadata("iteratorFloatArray.kt") public void testIteratorFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); } @TestMetadata("iteratorIntArray.kt") public void testIteratorIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); } @TestMetadata("iteratorLongArray.kt") public void testIteratorLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); } @TestMetadata("iteratorLongArrayNextLong.kt") public void testIteratorLongArrayNextLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); } @TestMetadata("iteratorShortArray.kt") public void testIteratorShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); } @TestMetadata("kt1291.kt") public void testKt1291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt1291.kt"); } @TestMetadata("kt17134.kt") public void testKt17134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt17134.kt"); } @TestMetadata("kt238.kt") public void testKt238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt238.kt"); } @TestMetadata("kt2997.kt") public void testKt2997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt2997.kt"); } @TestMetadata("kt33.kt") public void testKt33() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt33.kt"); } @TestMetadata("kt3771.kt") public void testKt3771() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt3771.kt"); } @TestMetadata("kt4118.kt") public void testKt4118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4118.kt"); } @TestMetadata("kt4348.kt") public void testKt4348() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4348.kt"); } @TestMetadata("kt4357.kt") public void testKt4357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4357.kt"); } @TestMetadata("kt503.kt") public void testKt503() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt503.kt"); } @TestMetadata("kt594.kt") public void testKt594() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt594.kt"); } @TestMetadata("kt602.kt") public void testKt602() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt602.kt"); } @TestMetadata("kt7009.kt") public void testKt7009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7009.kt"); } @TestMetadata("kt7288.kt") public void testKt7288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7288.kt"); } @TestMetadata("kt7338.kt") public void testKt7338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt7338.kt"); } @TestMetadata("kt779.kt") public void testKt779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt779.kt"); } @TestMetadata("kt945.kt") public void testKt945() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt945.kt"); } @TestMetadata("kt950.kt") public void testKt950() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt950.kt"); } @TestMetadata("longAsIndex.kt") public void testLongAsIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/longAsIndex.kt"); } @TestMetadata("multiArrayConstructors.kt") public void testMultiArrayConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); } @TestMetadata("nonLocalReturnArrayConstructor.kt") public void testNonLocalReturnArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); } @TestMetadata("nonNullArray.kt") public void testNonNullArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonNullArray.kt"); } @TestMetadata("primitiveArrays.kt") public void testPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/stdlib.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt15560.kt") public void testKt15560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); } @TestMetadata("kt15568.kt") public void testKt15568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); } @TestMetadata("kt15575.kt") public void testKt15575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -1071,32 +659,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -1106,161 +694,112 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BinaryOp extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBinaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/binaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("bitwiseOp.kt") public void testBitwiseOp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOp.kt"); } @TestMetadata("bitwiseOpAny.kt") public void testBitwiseOpAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpAny.kt"); } @TestMetadata("bitwiseOpNullable.kt") public void testBitwiseOpNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/bitwiseOpNullable.kt"); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/call.kt"); } @TestMetadata("callAny.kt") public void testCallAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callAny.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/callNullable.kt"); } @TestMetadata("compareBoxedChars.kt") public void testCompareBoxedChars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/compareBoxedChars.kt"); } @TestMetadata("compareWithBoxedDouble.kt") public void testCompareWithBoxedDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedDouble.kt"); } @TestMetadata("compareWithBoxedLong.kt") public void testCompareWithBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/binaryOp/compareWithBoxedLong.kt"); } @TestMetadata("divisionByZero.kt") public void testDivisionByZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/binaryOp/divisionByZero.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsic.kt"); } @TestMetadata("intrinsicAny.kt") public void testIntrinsicAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicAny.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/intrinsicNullable.kt"); } @TestMetadata("kt11163.kt") public void testKt11163() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163.kt"); } @TestMetadata("kt11163_properIeee754comparisons.kt") public void testKt11163_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt11163_properIeee754comparisons.kt"); } @TestMetadata("kt23030_properIeee754comparisons.kt") public void testKt23030_properIeee754comparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt23030_properIeee754comparisons.kt"); } @TestMetadata("kt6747_identityEquals.kt") public void testKt6747_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/kt6747_identityEquals.kt"); } @TestMetadata("overflowChar.kt") public void testOverflowChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowChar.kt"); } @TestMetadata("overflowInt.kt") public void testOverflowInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowInt.kt"); } @TestMetadata("overflowLong.kt") public void testOverflowLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/binaryOp/overflowLong.kt"); } } @@ -1268,198 +807,152 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BoxingOptimization extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBoxingOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/boxingOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boxedIntegersCmp.kt") public void testBoxedIntegersCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedIntegersCmp.kt"); } @TestMetadata("boxedPrimitivesAreEqual.kt") public void testBoxedPrimitivesAreEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedPrimitivesAreEqual.kt"); } @TestMetadata("boxedRealsCmp.kt") public void testBoxedRealsCmp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/boxedRealsCmp.kt"); } @TestMetadata("casts.kt") public void testCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/casts.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/casts.kt"); } @TestMetadata("checkcastAndInstanceOf.kt") public void testCheckcastAndInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/boxingOptimization/checkcastAndInstanceOf.kt"); } @TestMetadata("explicitEqualsOnDouble.kt") public void testExplicitEqualsOnDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/explicitEqualsOnDouble.kt"); } @TestMetadata("fold.kt") public void testFold() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/fold.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/fold.kt"); } @TestMetadata("foldRange.kt") public void testFoldRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/foldRange.kt"); } @TestMetadata("intCompareTo.kt") public void testIntCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/intCompareTo.kt"); } @TestMetadata("kt15871.kt") public void testKt15871() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt15871.kt"); } @TestMetadata("kt19767.kt") public void testKt19767() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767.kt"); } @TestMetadata("kt19767_2.kt") public void testKt19767_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_2.kt"); } @TestMetadata("kt19767_chain.kt") public void testKt19767_chain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt19767_chain.kt"); } @TestMetadata("kt5493.kt") public void testKt5493() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5493.kt"); } @TestMetadata("kt5588.kt") public void testKt5588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5588.kt"); } @TestMetadata("kt5844.kt") public void testKt5844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt5844.kt"); } @TestMetadata("kt6047.kt") public void testKt6047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6047.kt"); } @TestMetadata("kt6842.kt") public void testKt6842() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/kt6842.kt"); } @TestMetadata("maxMinBy.kt") public void testMaxMinBy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/maxMinBy.kt"); } @TestMetadata("nullCheck.kt") public void testNullCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/nullCheck.kt"); } @TestMetadata("progressions.kt") public void testProgressions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/progressions.kt"); } @TestMetadata("safeCallWithElvis.kt") public void testSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/safeCallWithElvis.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simple.kt"); } @TestMetadata("simpleUninitializedMerge.kt") public void testSimpleUninitializedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/simpleUninitializedMerge.kt"); } @TestMetadata("taintedValues.kt") public void testTaintedValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValues.kt"); } @TestMetadata("taintedValuesBox.kt") public void testTaintedValuesBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/taintedValuesBox.kt"); } @TestMetadata("unsafeRemoving.kt") public void testUnsafeRemoving() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/unsafeRemoving.kt"); } @TestMetadata("variables.kt") public void testVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/boxingOptimization/variables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/boxingOptimization/variables.kt"); } } @@ -1467,294 +960,255 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bridges extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBridges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/bridges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("complexMultiInheritance.kt") public void testComplexMultiInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexMultiInheritance.kt"); } @TestMetadata("complexTraitImpl.kt") public void testComplexTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/complexTraitImpl.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegation.kt"); } @TestMetadata("delegationComplex.kt") public void testDelegationComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplex.kt"); } @TestMetadata("delegationComplexWithList.kt") public void testDelegationComplexWithList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationComplexWithList.kt"); } @TestMetadata("delegationProperty.kt") public void testDelegationProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/delegationProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/delegationProperty.kt"); } @TestMetadata("diamond.kt") public void testDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/diamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/diamond.kt"); } @TestMetadata("fakeCovariantOverride.kt") public void testFakeCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverride.kt") public void testFakeGenericCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverride.kt"); } @TestMetadata("fakeGenericCovariantOverrideWithDelegation.kt") public void testFakeGenericCovariantOverrideWithDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeGenericCovariantOverrideWithDelegation.kt"); } @TestMetadata("fakeOverrideOfTraitImpl.kt") public void testFakeOverrideOfTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideOfTraitImpl.kt"); } @TestMetadata("fakeOverrideWithSeveralSuperDeclarations.kt") public void testFakeOverrideWithSeveralSuperDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSeveralSuperDeclarations.kt"); } @TestMetadata("fakeOverrideWithSynthesizedImplementation.kt") public void testFakeOverrideWithSynthesizedImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/fakeOverrideWithSynthesizedImplementation.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/genericProperty.kt"); } @TestMetadata("jsName.kt") public void testJsName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/jsName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/jsName.kt"); } @TestMetadata("jsNative.kt") public void testJsNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/jsNative.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/jsNative.kt"); } @TestMetadata("kt12416.kt") public void testKt12416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt12416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt12416.kt"); } @TestMetadata("kt1939.kt") public void testKt1939() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1939.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1939.kt"); } @TestMetadata("kt1959.kt") public void testKt1959() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt1959.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt1959.kt"); } @TestMetadata("kt2498.kt") public void testKt2498() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2498.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2498.kt"); } @TestMetadata("kt2702.kt") public void testKt2702() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2702.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2702.kt"); } @TestMetadata("kt2833.kt") public void testKt2833() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2833.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2833.kt"); } @TestMetadata("kt2920.kt") public void testKt2920() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt2920.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt2920.kt"); } @TestMetadata("kt318.kt") public void testKt318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/kt318.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/kt318.kt"); } @TestMetadata("longChainOneBridge.kt") public void testLongChainOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/longChainOneBridge.kt"); } @TestMetadata("manyTypeArgumentsSubstitutedSuccessively.kt") public void testManyTypeArgumentsSubstitutedSuccessively() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/manyTypeArgumentsSubstitutedSuccessively.kt"); } @TestMetadata("methodFromTrait.kt") public void testMethodFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/methodFromTrait.kt"); } @TestMetadata("noBridgeOnMutableCollectionInheritance.kt") public void testNoBridgeOnMutableCollectionInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/noBridgeOnMutableCollectionInheritance.kt"); } @TestMetadata("overrideAbstractProperty.kt") public void testOverrideAbstractProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideAbstractProperty.kt"); } @TestMetadata("overrideReturnType.kt") public void testOverrideReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/overrideReturnType.kt"); } @TestMetadata("propertyAccessorsWithoutBody.kt") public void testPropertyAccessorsWithoutBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyAccessorsWithoutBody.kt"); } @TestMetadata("propertyDiamond.kt") public void testPropertyDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyDiamond.kt"); } @TestMetadata("propertyInConstructor.kt") public void testPropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertyInConstructor.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/propertySetter.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simple.kt"); } @TestMetadata("simpleEnum.kt") public void testSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleEnum.kt"); } @TestMetadata("simpleGenericMethod.kt") public void testSimpleGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleGenericMethod.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleObject.kt"); } @TestMetadata("simpleReturnType.kt") public void testSimpleReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleReturnType.kt"); } @TestMetadata("simpleTraitImpl.kt") public void testSimpleTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleTraitImpl.kt"); } @TestMetadata("simpleUpperBound.kt") public void testSimpleUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/simpleUpperBound.kt"); } @TestMetadata("strListContains.kt") public void testStrListContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/strListContains.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/strListContains.kt"); } @TestMetadata("traitImplInheritsTraitImpl.kt") public void testTraitImplInheritsTraitImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/traitImplInheritsTraitImpl.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges.kt") public void testTwoParentsWithDifferentMethodsTwoBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges.kt"); } @TestMetadata("twoParentsWithDifferentMethodsTwoBridges2.kt") public void testTwoParentsWithDifferentMethodsTwoBridges2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithDifferentMethodsTwoBridges2.kt"); } @TestMetadata("twoParentsWithTheSameMethodOneBridge.kt") public void testTwoParentsWithTheSameMethodOneBridge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/twoParentsWithTheSameMethodOneBridge.kt"); } @TestMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SubstitutionInSuperClass extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractFun.kt") public void testAbstractFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/abstractFun.kt"); } public void testAllFilesPresentInSubstitutionInSuperClass() throws Exception { @@ -1763,62 +1217,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("boundedTypeArguments.kt") public void testBoundedTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/boundedTypeArguments.kt"); } @TestMetadata("delegation.kt") public void testDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/delegation.kt"); } @TestMetadata("differentErasureInSuperClass.kt") public void testDifferentErasureInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClass.kt"); } @TestMetadata("differentErasureInSuperClassComplex.kt") public void testDifferentErasureInSuperClassComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/differentErasureInSuperClassComplex.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/enum.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/genericMethod.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/object.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/property.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/simple.kt"); } @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/bridges/substitutionInSuperClass/upperBound.kt"); } } } @@ -1827,21 +1271,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuiltinStubMethods extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractMember.kt") public void testAbstractMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/abstractMember.kt"); } public void testAllFilesPresentInBuiltinStubMethods() throws Exception { @@ -1850,324 +1286,110 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("Collection.kt") public void testCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/Collection.kt"); } @TestMetadata("customReadOnlyIterator.kt") public void testCustomReadOnlyIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/customReadOnlyIterator.kt"); } @TestMetadata("implementationInTrait.kt") public void testImplementationInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt"); } @TestMetadata("inheritedImplementations.kt") public void testInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt"); } @TestMetadata("Iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt"); } @TestMetadata("IteratorWithRemove.kt") public void testIteratorWithRemove() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt"); } @TestMetadata("List.kt") public void testList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/List.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/List.kt"); } @TestMetadata("ListIterator.kt") public void testListIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListIterator.kt"); } @TestMetadata("ListWithAllImplementations.kt") public void testListWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt"); } @TestMetadata("ListWithAllInheritedImplementations.kt") public void testListWithAllInheritedImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt"); } @TestMetadata("Map.kt") public void testMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/Map.kt"); } @TestMetadata("MapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntry.kt"); } @TestMetadata("MapEntryWithSetValue.kt") public void testMapEntryWithSetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapEntryWithSetValue.kt"); } @TestMetadata("MapWithAllImplementations.kt") public void testMapWithAllImplementations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt"); } @TestMetadata("nonTrivialSubstitution.kt") public void testNonTrivialSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt"); } @TestMetadata("nonTrivialUpperBound.kt") public void testNonTrivialUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/nonTrivialUpperBound.kt"); } @TestMetadata("substitutedIterable.kt") public void testSubstitutedIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedIterable.kt"); } @TestMetadata("SubstitutedList.kt") public void testSubstitutedList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt"); } @TestMetadata("substitutedListWithExtraSuperInterface.kt") public void testSubstitutedListWithExtraSuperInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/builtinStubMethods/substitutedListWithExtraSuperInterface.kt"); } @TestMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtendJavaCollections extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractSet.kt") public void testAbstractSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractSet.kt"); } public void testAllFilesPresentInExtendJavaCollections() throws Exception { @@ -2176,20 +1398,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashMap.kt"); } @TestMetadata("hashSet.kt") public void testHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/hashSet.kt"); } } } @@ -2198,6 +1417,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallableReference extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCallableReference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -2206,185 +1429,119 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/array.kt"); } @TestMetadata("companionObjectReceiver.kt") public void testCompanionObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/companionObjectReceiver.kt"); } @TestMetadata("emptyLHS.kt") public void testEmptyLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/emptyLHS.kt"); } @TestMetadata("enumEntryMember.kt") public void testEnumEntryMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/bound/enumEntryMember.kt"); } @TestMetadata("genericValOnLHS.kt") public void testGenericValOnLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/genericValOnLHS.kt"); } @TestMetadata("kCallableNameIntrinsic.kt") public void testKCallableNameIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kCallableNameIntrinsic.kt"); } @TestMetadata("kt12738.kt") public void testKt12738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt12738.kt"); } @TestMetadata("kt15446.kt") public void testKt15446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/kt15446.kt"); } @TestMetadata("multiCase.kt") public void testMultiCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/multiCase.kt"); } @TestMetadata("nullReceiver.kt") public void testNullReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/nullReceiver.kt"); } @TestMetadata("objectReceiver.kt") public void testObjectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/objectReceiver.kt"); } @TestMetadata("primitiveReceiver.kt") public void testPrimitiveReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/primitiveReceiver.kt"); } @TestMetadata("simpleFunction.kt") public void testSimpleFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleFunction.kt"); } @TestMetadata("simpleProperty.kt") public void testSimpleProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/simpleProperty.kt"); } @TestMetadata("smartCastForExtensionReceiver.kt") public void testSmartCastForExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/smartCastForExtensionReceiver.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/bound/equals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("nullableReceiverInEquals.kt") public void testNullableReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/nullableReceiverInEquals.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/propertyAccessors.kt"); } @TestMetadata("receiverInEquals.kt") public void testReceiverInEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/receiverInEquals.kt"); } @TestMetadata("reflectionReference.kt") public void testReflectionReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/bound/equals/reflectionReference.kt"); } } @@ -2392,26 +1549,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inline extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/bound/inline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("emptyLhsProperty.kt") public void testEmptyLhsProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/emptyLhsProperty.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simple.kt"); } @TestMetadata("simpleVal.kt") public void testSimpleVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/bound/inline/simpleVal.kt"); } } } @@ -2420,10 +1578,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractClassMember.kt") public void testAbstractClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/abstractClassMember.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -2432,483 +1593,344 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("booleanNotIntrinsic.kt") public void testBooleanNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/booleanNotIntrinsic.kt"); } @TestMetadata("classMemberFromClass.kt") public void testClassMemberFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromClass.kt"); } @TestMetadata("classMemberFromExtension.kt") public void testClassMemberFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromExtension.kt"); } @TestMetadata("classMemberFromTopLevelStringNoArgs.kt") public void testClassMemberFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelStringOneStringArg.kt") public void testClassMemberFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelStringOneStringArg.kt"); } @TestMetadata("classMemberFromTopLevelUnitNoArgs.kt") public void testClassMemberFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitNoArgs.kt"); } @TestMetadata("classMemberFromTopLevelUnitOneStringArg.kt") public void testClassMemberFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/classMemberFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("constructorFromTopLevelNoArgs.kt") public void testConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelNoArgs.kt"); } @TestMetadata("constructorFromTopLevelOneStringArg.kt") public void testConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/constructorFromTopLevelOneStringArg.kt"); } @TestMetadata("enumValueOfMethod.kt") public void testEnumValueOfMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/enumValueOfMethod.kt"); } @TestMetadata("equalsIntrinsic.kt") public void testEqualsIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/equalsIntrinsic.kt"); } @TestMetadata("extensionFromClass.kt") public void testExtensionFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromClass.kt"); } @TestMetadata("extensionFromExtension.kt") public void testExtensionFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromExtension.kt"); } @TestMetadata("extensionFromTopLevelStringNoArgs.kt") public void testExtensionFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringNoArgs.kt"); } @TestMetadata("extensionFromTopLevelStringOneStringArg.kt") public void testExtensionFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelStringOneStringArg.kt"); } @TestMetadata("extensionFromTopLevelUnitNoArgs.kt") public void testExtensionFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitNoArgs.kt"); } @TestMetadata("extensionFromTopLevelUnitOneStringArg.kt") public void testExtensionFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/extensionFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("genericCallableReferenceArguments.kt") public void testGenericCallableReferenceArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferenceArguments.kt"); } @TestMetadata("genericCallableReferencesWithNullableTypes.kt") public void testGenericCallableReferencesWithNullableTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithNullableTypes.kt"); } @TestMetadata("genericCallableReferencesWithOverload.kt") public void testGenericCallableReferencesWithOverload() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/genericCallableReferencesWithOverload.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericMember.kt"); } @TestMetadata("genericWithDependentType.kt") public void testGenericWithDependentType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/genericWithDependentType.kt"); } @TestMetadata("getArityViaFunctionImpl.kt") public void testGetArityViaFunctionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/getArityViaFunctionImpl.kt"); } @TestMetadata("innerClassConstructorWithTwoReceivers.kt") public void testInnerClassConstructorWithTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerClassConstructorWithTwoReceivers.kt"); } @TestMetadata("innerConstructorFromClass.kt") public void testInnerConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromClass.kt"); } @TestMetadata("innerConstructorFromExtension.kt") public void testInnerConstructorFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromExtension.kt"); } @TestMetadata("innerConstructorFromTopLevelNoArgs.kt") public void testInnerConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("innerConstructorFromTopLevelOneStringArg.kt") public void testInnerConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/innerConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("javaCollectionsStaticMethod.kt") public void testJavaCollectionsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/javaCollectionsStaticMethod.kt"); } @TestMetadata("nestedConstructorFromClass.kt") public void testNestedConstructorFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromClass.kt"); } @TestMetadata("nestedConstructorFromTopLevelNoArgs.kt") public void testNestedConstructorFromTopLevelNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelNoArgs.kt"); } @TestMetadata("nestedConstructorFromTopLevelOneStringArg.kt") public void testNestedConstructorFromTopLevelOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/nestedConstructorFromTopLevelOneStringArg.kt"); } @TestMetadata("newArray.kt") public void testNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/newArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/newArray.kt"); } @TestMetadata("overloadedFun.kt") public void testOverloadedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFun.kt"); } @TestMetadata("overloadedFunVsVal.kt") public void testOverloadedFunVsVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt"); } @TestMetadata("privateClassMember.kt") public void testPrivateClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/privateClassMember.kt"); } @TestMetadata("sortListOfStrings.kt") public void testSortListOfStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/sortListOfStrings.kt"); } @TestMetadata("specialCalls.kt") public void testSpecialCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/specialCalls.kt"); } @TestMetadata("topLevelFromClass.kt") public void testTopLevelFromClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromClass.kt"); } @TestMetadata("topLevelFromExtension.kt") public void testTopLevelFromExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromExtension.kt"); } @TestMetadata("topLevelFromTopLevelStringNoArgs.kt") public void testTopLevelFromTopLevelStringNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelStringOneStringArg.kt") public void testTopLevelFromTopLevelStringOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelStringOneStringArg.kt"); } @TestMetadata("topLevelFromTopLevelUnitNoArgs.kt") public void testTopLevelFromTopLevelUnitNoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitNoArgs.kt"); } @TestMetadata("topLevelFromTopLevelUnitOneStringArg.kt") public void testTopLevelFromTopLevelUnitOneStringArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/topLevelFromTopLevelUnitOneStringArg.kt"); } @TestMetadata("traitImplMethodWithClassReceiver.kt") public void testTraitImplMethodWithClassReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitImplMethodWithClassReceiver.kt"); } @TestMetadata("traitMember.kt") public void testTraitMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/traitMember.kt"); } @TestMetadata("compiler/testData/codegen/box/callableReference/function/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/function/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("captureOuter.kt") public void testCaptureOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/captureOuter.kt"); } @TestMetadata("classMember.kt") public void testClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/classMember.kt"); } @TestMetadata("closureWithSideEffect.kt") public void testClosureWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/closureWithSideEffect.kt"); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructor.kt"); } @TestMetadata("constructorWithInitializer.kt") public void testConstructorWithInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/constructorWithInitializer.kt"); } @TestMetadata("enumExtendsTrait.kt") public void testEnumExtendsTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/enumExtendsTrait.kt"); } @TestMetadata("equalsHashCode.kt") public void testEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/function/local/equalsHashCode.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extension.kt"); } @TestMetadata("extensionToLocalClass.kt") public void testExtensionToLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToLocalClass.kt"); } @TestMetadata("extensionToPrimitive.kt") public void testExtensionToPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionToPrimitive.kt"); } @TestMetadata("extensionWithClosure.kt") public void testExtensionWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/extensionWithClosure.kt"); } @TestMetadata("genericMember.kt") public void testGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/genericMember.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localClassMember.kt"); } @TestMetadata("localFunctionName.kt") public void testLocalFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localFunctionName.kt"); } @TestMetadata("localLocal.kt") public void testLocalLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/localLocal.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/recursiveClosure.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simple.kt"); } @TestMetadata("simpleClosure.kt") public void testSimpleClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleClosure.kt"); } @TestMetadata("simpleWithArg.kt") public void testSimpleWithArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/simpleWithArg.kt"); } @TestMetadata("unitWithSideEffect.kt") public void testUnitWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/function/local/unitWithSideEffect.kt"); } } } @@ -2917,10 +1939,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Property extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessViaSubclass.kt") public void testAccessViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/accessViaSubclass.kt"); } public void testAllFilesPresentInProperty() throws Exception { @@ -2929,169 +1954,132 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("delegated.kt") public void testDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegated.kt"); } @TestMetadata("delegatedMutable.kt") public void testDelegatedMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/delegatedMutable.kt"); } @TestMetadata("enumNameOrdinal.kt") public void testEnumNameOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/enumNameOrdinal.kt"); } @TestMetadata("extensionToArray.kt") public void testExtensionToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/extensionToArray.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/genericProperty.kt"); } @TestMetadata("invokePropertyReference.kt") public void testInvokePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/invokePropertyReference.kt"); } @TestMetadata("javaBeanConvention.kt") public void testJavaBeanConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/javaBeanConvention.kt"); } @TestMetadata("kClassInstanceIsInitializedFirst.kt") public void testKClassInstanceIsInitializedFirst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kClassInstanceIsInitializedFirst.kt"); } @TestMetadata("kt12044.kt") public void testKt12044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12044.kt"); } @TestMetadata("kt12982_protectedPropertyReference.kt") public void testKt12982_protectedPropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt12982_protectedPropertyReference.kt"); } @TestMetadata("kt14330.kt") public void testKt14330() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330.kt"); } @TestMetadata("kt14330_2.kt") public void testKt14330_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt14330_2.kt"); } @TestMetadata("kt15447.kt") public void testKt15447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/kt15447.kt"); } @TestMetadata("kt6870_privatePropertyReference.kt") public void testKt6870_privatePropertyReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/property/kt6870_privatePropertyReference.kt"); } @TestMetadata("listOfStringsMapLength.kt") public void testListOfStringsMapLength() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/listOfStringsMapLength.kt"); } @TestMetadata("localClassVar.kt") public void testLocalClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/localClassVar.kt"); } @TestMetadata("overriddenInSubclass.kt") public void testOverriddenInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/overriddenInSubclass.kt"); } @TestMetadata("privateSetOuterClass.kt") public void testPrivateSetOuterClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetOuterClass.kt"); } @TestMetadata("privateSetterInsideClass.kt") public void testPrivateSetterInsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterInsideClass.kt"); } @TestMetadata("privateSetterOutsideClass.kt") public void testPrivateSetterOutsideClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/privateSetterOutsideClass.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleExtension.kt"); } @TestMetadata("simpleMember.kt") public void testSimpleMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMember.kt"); } @TestMetadata("simpleMutableExtension.kt") public void testSimpleMutableExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableExtension.kt"); } @TestMetadata("simpleMutableMember.kt") public void testSimpleMutableMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableMember.kt"); } @TestMetadata("simpleMutableTopLevel.kt") public void testSimpleMutableTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleMutableTopLevel.kt"); } @TestMetadata("simpleTopLevel.kt") public void testSimpleTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt"); } } @@ -3099,93 +2087,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Serializability extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSerializability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/callableReference/serializability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boundWithNotSerializableReceiver.kt") public void testBoundWithNotSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithNotSerializableReceiver.kt"); } @TestMetadata("boundWithSerializableReceiver.kt") public void testBoundWithSerializableReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/serializability/boundWithSerializableReceiver.kt"); } @TestMetadata("noReflect.kt") public void testNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/serializability/noReflect.kt"); } @TestMetadata("reflectedIsNotSerialized.kt") public void testReflectedIsNotSerialized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/serializability/reflectedIsNotSerialized.kt"); } @TestMetadata("withReflect.kt") public void testWithReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/callableReference/serializability/withReflect.kt"); } } } @@ -3194,457 +2126,199 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Casts extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("as.kt") public void testAs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/as.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/as.kt"); } @TestMetadata("asForConstants.kt") public void testAsForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asForConstants.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/asForConstants.kt"); } @TestMetadata("asSafe.kt") public void testAsSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafe.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/asSafe.kt"); } @TestMetadata("asSafeFail.kt") public void testAsSafeFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeFail.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asSafeFail.kt"); } @TestMetadata("asSafeForConstants.kt") public void testAsSafeForConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/asSafeForConstants.kt"); } @TestMetadata("asUnit.kt") public void testAsUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/asUnit.kt"); } @TestMetadata("asWithGeneric.kt") public void testAsWithGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/asWithGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/asWithGeneric.kt"); } @TestMetadata("castGenericNull.kt") public void testCastGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/castGenericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/castGenericNull.kt"); } @TestMetadata("intersectionTypeMultipleBounds.kt") public void testIntersectionTypeMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBounds.kt"); } @TestMetadata("intersectionTypeMultipleBoundsImplicitReceiver.kt") public void testIntersectionTypeMultipleBoundsImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeMultipleBoundsImplicitReceiver.kt"); } @TestMetadata("intersectionTypeSmartcast.kt") public void testIntersectionTypeSmartcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeSmartcast.kt"); } @TestMetadata("intersectionTypeWithMultipleBoundsAsReceiver.kt") public void testIntersectionTypeWithMultipleBoundsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithMultipleBoundsAsReceiver.kt"); } @TestMetadata("intersectionTypeWithoutGenericsAsReceiver.kt") public void testIntersectionTypeWithoutGenericsAsReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/intersectionTypeWithoutGenericsAsReceiver.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/is.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/is.kt"); } @TestMetadata("isNullablePrimitive.kt") public void testIsNullablePrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/isNullablePrimitive.kt"); } @TestMetadata("kt22714.kt") public void testKt22714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/kt22714.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/kt22714.kt"); } @TestMetadata("lambdaToUnitCast.kt") public void testLambdaToUnitCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/lambdaToUnitCast.kt"); } @TestMetadata("notIs.kt") public void testNotIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/notIs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/notIs.kt"); } @TestMetadata("unitAsAny.kt") public void testUnitAsAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsAny.kt"); } @TestMetadata("unitAsInt.kt") public void testUnitAsInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsInt.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/unitAsInt.kt"); } @TestMetadata("unitAsSafeAny.kt") public void testUnitAsSafeAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitAsSafeAny.kt"); } @TestMetadata("unitNullableCast.kt") public void testUnitNullableCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/unitNullableCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/unitNullableCast.kt"); } @TestMetadata("compiler/testData/codegen/box/casts/functions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("asFunKBig.kt") public void testAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/asFunKBig.kt"); } @TestMetadata("asFunKSmall.kt") public void testAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/asFunKSmall.kt"); } @TestMetadata("isFunKBig.kt") public void testIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/isFunKBig.kt"); } @TestMetadata("isFunKSmall.kt") public void testIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/isFunKSmall.kt"); } @TestMetadata("javaTypeIsFunK.kt") public void testJavaTypeIsFunK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/javaTypeIsFunK.kt"); } @TestMetadata("reifiedAsFunKBig.kt") public void testReifiedAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKBig.kt"); } @TestMetadata("reifiedAsFunKSmall.kt") public void testReifiedAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/reifiedAsFunKSmall.kt"); } @TestMetadata("reifiedIsFunKBig.kt") public void testReifiedIsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKBig.kt"); } @TestMetadata("reifiedIsFunKSmall.kt") public void testReifiedIsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/reifiedIsFunKSmall.kt"); } @TestMetadata("reifiedSafeAsFunKBig.kt") public void testReifiedSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKBig.kt"); } @TestMetadata("reifiedSafeAsFunKSmall.kt") public void testReifiedSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/reifiedSafeAsFunKSmall.kt"); } @TestMetadata("safeAsFunKBig.kt") public void testSafeAsFunKBig() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKBig.kt"); } @TestMetadata("safeAsFunKSmall.kt") public void testSafeAsFunKSmall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/functions/safeAsFunKSmall.kt"); } } @@ -3652,61 +2326,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LiteralExpressionAsGenericArgument extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLiteralExpressionAsGenericArgument() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("binaryExpressionCast.kt") public void testBinaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/binaryExpressionCast.kt"); } @TestMetadata("javaBox.kt") public void testJavaBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/javaBox.kt"); } @TestMetadata("labeledExpressionCast.kt") public void testLabeledExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/labeledExpressionCast.kt"); } @TestMetadata("parenthesizedExpressionCast.kt") public void testParenthesizedExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/parenthesizedExpressionCast.kt"); } @TestMetadata("superConstructor.kt") public void testSuperConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/superConstructor.kt"); } @TestMetadata("unaryExpressionCast.kt") public void testUnaryExpressionCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/unaryExpressionCast.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/literalExpressionAsGenericArgument/vararg.kt"); } } @@ -3714,78 +2374,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MutableCollections extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMutableCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/casts/mutableCollections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("asWithMutable.kt") public void testAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/asWithMutable.kt"); } @TestMetadata("isWithMutable.kt") public void testIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/isWithMutable.kt"); } @TestMetadata("mutabilityMarkerInterfaces.kt") public void testMutabilityMarkerInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/mutableCollections/mutabilityMarkerInterfaces.kt"); } @TestMetadata("reifiedAsWithMutable.kt") public void testReifiedAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedAsWithMutable.kt"); } @TestMetadata("reifiedIsWithMutable.kt") public void testReifiedIsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedIsWithMutable.kt"); } @TestMetadata("reifiedSafeAsWithMutable.kt") public void testReifiedSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/reifiedSafeAsWithMutable.kt"); } @TestMetadata("safeAsWithMutable.kt") public void testSafeAsWithMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/casts/mutableCollections/safeAsWithMutable.kt"); } @TestMetadata("weirdMutableCasts.kt") public void testWeirdMutableCasts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/casts/mutableCollections/weirdMutableCasts.kt"); } } } @@ -3794,20 +2428,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CheckcastOptimization extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCheckcastOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/checkcastOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt19128.kt") public void testKt19128() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19128.kt"); } @TestMetadata("kt19246.kt") public void testKt19246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/checkcastOptimization/kt19246.kt"); } } @@ -3815,85 +2451,54 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiteral extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClassLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/primitiveKClassEquality.kt"); } @TestMetadata("compiler/testData/codegen/box/classLiteral/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("javaIntrinsicWithSideEffect.kt") public void testJavaIntrinsicWithSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/primitives.kt"); } @TestMetadata("sideEffect.kt") public void testSideEffect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/bound/sideEffect.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/simple.kt"); } @TestMetadata("smartCast.kt") public void testSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classLiteral/bound/smartCast.kt"); } } @@ -3901,144 +2506,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Java extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJava() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classLiteral/java"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("java.kt") public void testJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/java.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/java.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectType.kt"); } @TestMetadata("javaObjectTypeReified.kt") public void testJavaObjectTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/javaObjectTypeReified.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveType.kt"); } @TestMetadata("javaPrimitiveTypeReified.kt") public void testJavaPrimitiveTypeReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/javaPrimitiveTypeReified.kt"); } @TestMetadata("javaReified.kt") public void testJavaReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/javaReified.kt"); } @TestMetadata("kt11943.kt") public void testKt11943() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/kt11943.kt"); } @TestMetadata("objectSuperConstructorCall.kt") public void testObjectSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classLiteral/java/objectSuperConstructorCall.kt"); } } } @@ -4047,818 +2560,619 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boxPrimitiveTypeInClinitOfClassObject.kt") public void testBoxPrimitiveTypeInClinitOfClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/boxPrimitiveTypeInClinitOfClassObject.kt"); } @TestMetadata("classNamedAsOldPackageFacade.kt") public void testClassNamedAsOldPackageFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classNamedAsOldPackageFacade.kt"); } @TestMetadata("classObject.kt") public void testClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObject.kt"); } @TestMetadata("classObjectAsExtensionReceiver.kt") public void testClassObjectAsExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsExtensionReceiver.kt"); } @TestMetadata("classObjectAsStaticInitializer.kt") public void testClassObjectAsStaticInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectAsStaticInitializer.kt"); } @TestMetadata("classObjectField.kt") public void testClassObjectField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectField.kt"); } @TestMetadata("classObjectInTrait.kt") public void testClassObjectInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectInTrait.kt"); } @TestMetadata("classObjectNotOfEnum.kt") public void testClassObjectNotOfEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectNotOfEnum.kt"); } @TestMetadata("classObjectToString.kt") public void testClassObjectToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/classObjectToString.kt"); } @TestMetadata("classObjectWithPrivateGenericMember.kt") public void testClassObjectWithPrivateGenericMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectWithPrivateGenericMember.kt"); } @TestMetadata("classObjectsWithParentClasses.kt") public void testClassObjectsWithParentClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/classObjectsWithParentClasses.kt"); } @TestMetadata("comanionObjectFieldVsClassField.kt") public void testComanionObjectFieldVsClassField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/comanionObjectFieldVsClassField.kt"); } @TestMetadata("defaultObjectSameNamesAsInOuter.kt") public void testDefaultObjectSameNamesAsInOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/defaultObjectSameNamesAsInOuter.kt"); } @TestMetadata("delegateConstructorCallWithKeywords.kt") public void testDelegateConstructorCallWithKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegateConstructorCallWithKeywords.kt"); } @TestMetadata("delegation2.kt") public void testDelegation2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation2.kt"); } @TestMetadata("delegation3.kt") public void testDelegation3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation3.kt"); } @TestMetadata("delegation4.kt") public void testDelegation4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegation4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegation4.kt"); } @TestMetadata("delegationGenericArg.kt") public void testDelegationGenericArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArg.kt"); } @TestMetadata("delegationGenericArgUpperBound.kt") public void testDelegationGenericArgUpperBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericArgUpperBound.kt"); } @TestMetadata("delegationGenericLongArg.kt") public void testDelegationGenericLongArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationGenericLongArg.kt"); } @TestMetadata("delegationJava.kt") public void testDelegationJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/delegationJava.kt"); } @TestMetadata("delegationMethodsWithArgs.kt") public void testDelegationMethodsWithArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/delegationMethodsWithArgs.kt"); } @TestMetadata("exceptionConstructor.kt") public void testExceptionConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/exceptionConstructor.kt"); } @TestMetadata("extensionOnNamedClassObject.kt") public void testExtensionOnNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt"); } @TestMetadata("funDelegation.kt") public void testFunDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/funDelegation.kt"); } @TestMetadata("implementComparableInSubclass.kt") public void testImplementComparableInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/implementComparableInSubclass.kt"); } @TestMetadata("inheritSetAndHashSet.kt") public void testInheritSetAndHashSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritSetAndHashSet.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritance.kt"); } @TestMetadata("inheritedInnerClass.kt") public void testInheritedInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedInnerClass.kt"); } @TestMetadata("inheritedMethod.kt") public void testInheritedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inheritedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inheritedMethod.kt"); } @TestMetadata("initializerBlock.kt") public void testInitializerBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlock.kt"); } @TestMetadata("initializerBlockDImpl.kt") public void testInitializerBlockDImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/initializerBlockDImpl.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/innerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/innerClass.kt"); } @TestMetadata("kt1018.kt") public void testKt1018() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1018.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1018.kt"); } @TestMetadata("kt1120.kt") public void testKt1120() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1120.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/kt1120.kt"); } @TestMetadata("kt1134.kt") public void testKt1134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1134.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/kt1134.kt"); } @TestMetadata("kt1157.kt") public void testKt1157() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1157.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1157.kt"); } @TestMetadata("kt1247.kt") public void testKt1247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1247.kt"); } @TestMetadata("kt1345.kt") public void testKt1345() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1345.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1345.kt"); } @TestMetadata("kt1439.kt") public void testKt1439() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1439.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1439.kt"); } @TestMetadata("kt1535.kt") public void testKt1535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1535.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/kt1535.kt"); } @TestMetadata("kt1538.kt") public void testKt1538() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1538.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1538.kt"); } @TestMetadata("kt1578.kt") public void testKt1578() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1578.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1578.kt"); } @TestMetadata("kt1611.kt") public void testKt1611() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1611.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1611.kt"); } @TestMetadata("kt1721.kt") public void testKt1721() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1721.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1721.kt"); } @TestMetadata("kt1726.kt") public void testKt1726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1726.kt"); } @TestMetadata("kt1759.kt") public void testKt1759() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1759.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1759.kt"); } @TestMetadata("kt1891.kt") public void testKt1891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1891.kt"); } @TestMetadata("kt1918.kt") public void testKt1918() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1918.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1918.kt"); } @TestMetadata("kt1976.kt") public void testKt1976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1976.kt"); } @TestMetadata("kt1980.kt") public void testKt1980() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt1980.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt1980.kt"); } @TestMetadata("kt2224.kt") public void testKt2224() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2224.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2224.kt"); } @TestMetadata("kt2288.kt") public void testKt2288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2288.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/kt2288.kt"); } @TestMetadata("kt2384.kt") public void testKt2384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2384.kt"); } @TestMetadata("kt2390.kt") public void testKt2390() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2390.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2390.kt"); } @TestMetadata("kt2391.kt") public void testKt2391() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2391.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2391.kt"); } @TestMetadata("kt2417.kt") public void testKt2417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2417.kt"); } @TestMetadata("kt2477.kt") public void testKt2477() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2477.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2477.kt"); } @TestMetadata("kt2480.kt") public void testKt2480() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2480.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2480.kt"); } @TestMetadata("kt2482.kt") public void testKt2482() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2482.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2482.kt"); } @TestMetadata("kt2485.kt") public void testKt2485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2485.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2485.kt"); } @TestMetadata("kt249.kt") public void testKt249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt249.kt"); } @TestMetadata("kt2532.kt") public void testKt2532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2532.kt"); } @TestMetadata("kt2566.kt") public void testKt2566() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566.kt"); } @TestMetadata("kt2566_2.kt") public void testKt2566_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2566_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2566_2.kt"); } @TestMetadata("kt2607.kt") public void testKt2607() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2607.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2607.kt"); } @TestMetadata("kt2626.kt") public void testKt2626() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2626.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2626.kt"); } @TestMetadata("kt2711.kt") public void testKt2711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2711.kt"); } @TestMetadata("kt2784.kt") public void testKt2784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt2784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt2784.kt"); } @TestMetadata("kt285.kt") public void testKt285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt285.kt"); } @TestMetadata("kt3001.kt") public void testKt3001() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3001.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3001.kt"); } @TestMetadata("kt3114.kt") public void testKt3114() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3114.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3114.kt"); } @TestMetadata("kt3414.kt") public void testKt3414() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3414.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3414.kt"); } @TestMetadata("kt343.kt") public void testKt343() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt343.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt343.kt"); } @TestMetadata("kt3546.kt") public void testKt3546() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt3546.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt3546.kt"); } @TestMetadata("kt454.kt") public void testKt454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt454.kt"); } @TestMetadata("kt471.kt") public void testKt471() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt471.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt471.kt"); } @TestMetadata("kt48.kt") public void testKt48() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt48.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt48.kt"); } @TestMetadata("kt496.kt") public void testKt496() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt496.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt496.kt"); } @TestMetadata("kt500.kt") public void testKt500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt500.kt"); } @TestMetadata("kt501.kt") public void testKt501() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt501.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt501.kt"); } @TestMetadata("kt504.kt") public void testKt504() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt504.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt504.kt"); } @TestMetadata("kt508.kt") public void testKt508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt508.kt"); } @TestMetadata("kt5347.kt") public void testKt5347() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt5347.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt5347.kt"); } @TestMetadata("kt6136.kt") public void testKt6136() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6136.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6136.kt"); } @TestMetadata("kt633.kt") public void testKt633() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt633.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt633.kt"); } @TestMetadata("kt6816.kt") public void testKt6816() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt6816.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt6816.kt"); } @TestMetadata("kt707.kt") public void testKt707() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt707.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/kt707.kt"); } @TestMetadata("kt723.kt") public void testKt723() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt723.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt723.kt"); } @TestMetadata("kt725.kt") public void testKt725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt725.kt"); } @TestMetadata("kt8011.kt") public void testKt8011() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011.kt"); } @TestMetadata("kt8011a.kt") public void testKt8011a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt8011a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt8011a.kt"); } @TestMetadata("kt940.kt") public void testKt940() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt940.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt940.kt"); } @TestMetadata("kt9642.kt") public void testKt9642() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/kt9642.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/kt9642.kt"); } @TestMetadata("namedClassObject.kt") public void testNamedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/namedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/namedClassObject.kt"); } @TestMetadata("outerThis.kt") public void testOuterThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/outerThis.kt"); } @TestMetadata("overloadBinaryOperator.kt") public void testOverloadBinaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadBinaryOperator.kt"); } @TestMetadata("overloadPlusAssign.kt") public void testOverloadPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssign.kt"); } @TestMetadata("overloadPlusAssignReturn.kt") public void testOverloadPlusAssignReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusAssignReturn.kt"); } @TestMetadata("overloadPlusToPlusAssign.kt") public void testOverloadPlusToPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadPlusToPlusAssign.kt"); } @TestMetadata("overloadUnaryOperator.kt") public void testOverloadUnaryOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/overloadUnaryOperator.kt"); } @TestMetadata("privateOuterFunctions.kt") public void testPrivateOuterFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterFunctions.kt"); } @TestMetadata("privateOuterProperty.kt") public void testPrivateOuterProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateOuterProperty.kt"); } @TestMetadata("privateToThis.kt") public void testPrivateToThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/privateToThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/privateToThis.kt"); } @TestMetadata("propertyDelegation.kt") public void testPropertyDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyDelegation.kt"); } @TestMetadata("propertyInInitializer.kt") public void testPropertyInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/propertyInInitializer.kt"); } @TestMetadata("quotedClassName.kt") public void testQuotedClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/quotedClassName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/classes/quotedClassName.kt"); } @TestMetadata("rightHandOverride.kt") public void testRightHandOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/rightHandOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/rightHandOverride.kt"); } @TestMetadata("sealedInSameFile.kt") public void testSealedInSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/sealedInSameFile.kt"); } @TestMetadata("selfcreate.kt") public void testSelfcreate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/selfcreate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/selfcreate.kt"); } @TestMetadata("simpleBox.kt") public void testSimpleBox() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/simpleBox.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/simpleBox.kt"); } @TestMetadata("superConstructorCallWithComplexArg.kt") public void testSuperConstructorCallWithComplexArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/superConstructorCallWithComplexArg.kt"); } @TestMetadata("typedDelegation.kt") public void testTypedDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/typedDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/typedDelegation.kt"); } @TestMetadata("compiler/testData/codegen/box/classes/inner") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inner extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/classes/inner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("instantiateInDerived.kt") public void testInstantiateInDerived() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerived.kt"); } @TestMetadata("instantiateInDerivedLabeled.kt") public void testInstantiateInDerivedLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInDerivedLabeled.kt"); } @TestMetadata("instantiateInSameClass.kt") public void testInstantiateInSameClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/instantiateInSameClass.kt"); } @TestMetadata("kt6708.kt") public void testKt6708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/kt6708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/kt6708.kt"); } @TestMetadata("properOuter.kt") public void testProperOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properOuter.kt"); } @TestMetadata("properSuperLinking.kt") public void testProperSuperLinking() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/classes/inner/properSuperLinking.kt"); } } } @@ -4867,468 +3181,364 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Closures extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClosures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("captureExtensionReceiver.kt") public void testCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureExtensionReceiver.kt"); } @TestMetadata("capturedLocalGenericFun.kt") public void testCapturedLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedLocalGenericFun.kt"); } @TestMetadata("closureInsideConstrucor.kt") public void testClosureInsideConstrucor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideConstrucor.kt"); } @TestMetadata("closureOnTopLevel1.kt") public void testClosureOnTopLevel1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel1.kt"); } @TestMetadata("closureOnTopLevel2.kt") public void testClosureOnTopLevel2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/closures/closureOnTopLevel2.kt"); } @TestMetadata("closureWithParameter.kt") public void testClosureWithParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameter.kt"); } @TestMetadata("closureWithParameterAndBoxing.kt") public void testClosureWithParameterAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureWithParameterAndBoxing.kt"); } @TestMetadata("doubleEnclosedLocalVariable.kt") public void testDoubleEnclosedLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/doubleEnclosedLocalVariable.kt"); } @TestMetadata("enclosingLocalVariable.kt") public void testEnclosingLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingLocalVariable.kt"); } @TestMetadata("enclosingThis.kt") public void testEnclosingThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/enclosingThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/enclosingThis.kt"); } @TestMetadata("extensionClosure.kt") public void testExtensionClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/extensionClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/extensionClosure.kt"); } @TestMetadata("kt10044.kt") public void testKt10044() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt10044.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt10044.kt"); } @TestMetadata("kt11634.kt") public void testKt11634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634.kt"); } @TestMetadata("kt11634_2.kt") public void testKt11634_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_2.kt"); } @TestMetadata("kt11634_3.kt") public void testKt11634_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_3.kt"); } @TestMetadata("kt11634_4.kt") public void testKt11634_4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt11634_4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt11634_4.kt"); } @TestMetadata("kt2151.kt") public void testKt2151() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt2151.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt2151.kt"); } @TestMetadata("kt3152.kt") public void testKt3152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3152.kt"); } @TestMetadata("kt3523.kt") public void testKt3523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3523.kt"); } @TestMetadata("kt3738.kt") public void testKt3738() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3738.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3738.kt"); } @TestMetadata("kt3905.kt") public void testKt3905() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt3905.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt3905.kt"); } @TestMetadata("kt4106.kt") public void testKt4106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4106.kt"); } @TestMetadata("kt4137.kt") public void testKt4137() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt4137.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt4137.kt"); } @TestMetadata("kt5589.kt") public void testKt5589() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/kt5589.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/kt5589.kt"); } @TestMetadata("localClassFunClosure.kt") public void testLocalClassFunClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassFunClosure.kt"); } @TestMetadata("localClassLambdaClosure.kt") public void testLocalClassLambdaClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localClassLambdaClosure.kt"); } @TestMetadata("localFunctionInFunction.kt") public void testLocalFunctionInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInFunction.kt"); } @TestMetadata("localFunctionInInitializer.kt") public void testLocalFunctionInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localFunctionInInitializer.kt"); } @TestMetadata("localGenericFun.kt") public void testLocalGenericFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localGenericFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localGenericFun.kt"); } @TestMetadata("localReturn.kt") public void testLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturn.kt"); } @TestMetadata("localReturnWithAutolabel.kt") public void testLocalReturnWithAutolabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/localReturnWithAutolabel.kt"); } @TestMetadata("noRefToOuter.kt") public void testNoRefToOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/noRefToOuter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/closures/noRefToOuter.kt"); } @TestMetadata("recursiveClosure.kt") public void testRecursiveClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/recursiveClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/recursiveClosure.kt"); } @TestMetadata("refsAreSerializable.kt") public void testRefsAreSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/closures/refsAreSerializable.kt"); } @TestMetadata("simplestClosure.kt") public void testSimplestClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosure.kt"); } @TestMetadata("simplestClosureAndBoxing.kt") public void testSimplestClosureAndBoxing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/simplestClosureAndBoxing.kt"); } @TestMetadata("subclosuresWithinInitializers.kt") public void testSubclosuresWithinInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/subclosuresWithinInitializers.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/underscoreParameters.kt"); } @TestMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureInSuperConstructorCall extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCaptureInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureInSuperConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constructorParameterAndLocalCapturedInLambdaInLocalClass.kt") public void testConstructorParameterAndLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterAndLocalCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass.kt") public void testConstructorParameterCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass.kt"); } @TestMetadata("constructorParameterCapturedInLambdaInLocalClass2.kt") public void testConstructorParameterCapturedInLambdaInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/constructorParameterCapturedInLambdaInLocalClass2.kt"); } @TestMetadata("kt13454.kt") public void testKt13454() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt13454.kt"); } @TestMetadata("kt14148.kt") public void testKt14148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt14148.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174.kt"); } @TestMetadata("kt4174a.kt") public void testKt4174a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/kt4174a.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass.kt") public void testLocalCapturedInAnonymousObjectInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass.kt"); } @TestMetadata("localCapturedInAnonymousObjectInLocalClass2.kt") public void testLocalCapturedInAnonymousObjectInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInAnonymousObjectInLocalClass2.kt"); } @TestMetadata("localCapturedInLambdaInInnerClassInLocalClass.kt") public void testLocalCapturedInLambdaInInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInInnerClassInLocalClass.kt"); } @TestMetadata("localCapturedInLambdaInLocalClass.kt") public void testLocalCapturedInLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localCapturedInLambdaInLocalClass.kt"); } @TestMetadata("localFunctionCapturedInLambda.kt") public void testLocalFunctionCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/localFunctionCapturedInLambda.kt"); } @TestMetadata("outerAndLocalCapturedInLocalClass.kt") public void testOuterAndLocalCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerAndLocalCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedAsImplicitThisInBoundReference.kt") public void testOuterCapturedAsImplicitThisInBoundReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedAsImplicitThisInBoundReference.kt"); } @TestMetadata("outerCapturedInFunctionLiteral.kt") public void testOuterCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInFunctionLiteral.kt"); } @TestMetadata("outerCapturedInInlineLambda.kt") public void testOuterCapturedInInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda.kt"); } @TestMetadata("outerCapturedInInlineLambda2.kt") public void testOuterCapturedInInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInInlineLambda2.kt"); } @TestMetadata("outerCapturedInLambda.kt") public void testOuterCapturedInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda.kt"); } @TestMetadata("outerCapturedInLambda2.kt") public void testOuterCapturedInLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambda2.kt"); } @TestMetadata("outerCapturedInLambdaInSecondaryConstructor.kt") public void testOuterCapturedInLambdaInSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSecondaryConstructor.kt"); } @TestMetadata("outerCapturedInLambdaInSubExpression.kt") public void testOuterCapturedInLambdaInSubExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLambdaInSubExpression.kt"); } @TestMetadata("outerCapturedInLocalClass.kt") public void testOuterCapturedInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInLocalClass.kt"); } @TestMetadata("outerCapturedInNestedLambda.kt") public void testOuterCapturedInNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedLambda.kt"); } @TestMetadata("outerCapturedInNestedObject.kt") public void testOuterCapturedInNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInNestedObject.kt"); } @TestMetadata("outerCapturedInObject.kt") public void testOuterCapturedInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject.kt"); } @TestMetadata("outerCapturedInObject2.kt") public void testOuterCapturedInObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerCapturedInObject2.kt"); } @TestMetadata("outerEnumEntryCapturedInLambdaInInnerClass.kt") public void testOuterEnumEntryCapturedInLambdaInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/outerEnumEntryCapturedInLambdaInInnerClass.kt"); } @TestMetadata("properValueCapturedByClosure1.kt") public void testProperValueCapturedByClosure1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure1.kt"); } @TestMetadata("properValueCapturedByClosure2.kt") public void testProperValueCapturedByClosure2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/properValueCapturedByClosure2.kt"); } @TestMetadata("referenceToCapturedVariablesInMultipleLambdas.kt") public void testReferenceToCapturedVariablesInMultipleLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureInSuperConstructorCall/referenceToCapturedVariablesInMultipleLambdas.kt"); } } @@ -5336,56 +3546,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CaptureOuterProperty extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCaptureOuterProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/captureOuterProperty"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("captureFunctionInProperty.kt") public void testCaptureFunctionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/captureFunctionInProperty.kt"); } @TestMetadata("inFunction.kt") public void testInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inFunction.kt"); } @TestMetadata("inProperty.kt") public void testInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inProperty.kt"); } @TestMetadata("inPropertyDeepObjectChain.kt") public void testInPropertyDeepObjectChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyDeepObjectChain.kt"); } @TestMetadata("inPropertyFromSuperClass.kt") public void testInPropertyFromSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperClass.kt"); } @TestMetadata("inPropertyFromSuperSuperClass.kt") public void testInPropertyFromSuperSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/inPropertyFromSuperSuperClass.kt"); } @TestMetadata("kt4176.kt") public void testKt4176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4176.kt"); } @TestMetadata("kt4656.kt") public void testKt4656() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/captureOuterProperty/kt4656.kt"); } } @@ -5393,68 +3599,62 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CapturedVarsOptimization extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCapturedVarsOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/capturedVarsOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("capturedInCrossinline.kt") public void testCapturedInCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInCrossinline.kt"); } @TestMetadata("capturedInInlineOnlyAssign.kt") public void testCapturedInInlineOnlyAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyAssign.kt"); } @TestMetadata("capturedInInlineOnlyCAO.kt") public void testCapturedInInlineOnlyCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyCAO.kt"); } @TestMetadata("capturedInInlineOnlyIncrDecr.kt") public void testCapturedInInlineOnlyIncrDecr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIncrDecr.kt"); } @TestMetadata("capturedInInlineOnlyIndexedCAO.kt") public void testCapturedInInlineOnlyIndexedCAO() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedInInlineOnlyIndexedCAO.kt"); } @TestMetadata("capturedVarsOfSize2.kt") public void testCapturedVarsOfSize2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/capturedVarsOfSize2.kt"); } @TestMetadata("kt17200.kt") public void testKt17200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17200.kt"); } @TestMetadata("kt17588.kt") public void testKt17588() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/kt17588.kt"); } @TestMetadata("sharedSlotsWithCapturedVars.kt") public void testSharedSlotsWithCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/sharedSlotsWithCapturedVars.kt"); } @TestMetadata("withCoroutines.kt") public void testWithCoroutines() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/capturedVarsOptimization/withCoroutines.kt"); } } @@ -5462,44 +3662,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClosureInsideClosure extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClosureInsideClosure() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/closures/closureInsideClosure"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("localFunInsideLocalFun.kt") public void testLocalFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFun.kt"); } @TestMetadata("localFunInsideLocalFunDifferentSignatures.kt") public void testLocalFunInsideLocalFunDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/localFunInsideLocalFunDifferentSignatures.kt"); } @TestMetadata("propertyAndFunctionNameClash.kt") public void testPropertyAndFunctionNameClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/propertyAndFunctionNameClash.kt"); } @TestMetadata("threeLevels.kt") public void testThreeLevels() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevels.kt"); } @TestMetadata("threeLevelsDifferentSignatures.kt") public void testThreeLevelsDifferentSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/threeLevelsDifferentSignatures.kt"); } @TestMetadata("varAsFunInsideLocalFun.kt") public void testVarAsFunInsideLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/closures/closureInsideClosure/varAsFunInsideLocalFun.kt"); } } } @@ -5508,76 +3706,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CollectionLiterals extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCollectionLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collectionLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("collectionLiteralsInArgumentPosition.kt") public void testCollectionLiteralsInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsInArgumentPosition.kt"); } @TestMetadata("collectionLiteralsWithConstants.kt") public void testCollectionLiteralsWithConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithConstants.kt"); } @TestMetadata("collectionLiteralsWithVarargs.kt") public void testCollectionLiteralsWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collectionLiterals/collectionLiteralsWithVarargs.kt"); } @TestMetadata("defaultAnnotationParameterValues.kt") public void testDefaultAnnotationParameterValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collectionLiterals/defaultAnnotationParameterValues.kt"); } } @@ -5585,99 +3739,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Collections extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCollections() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/collections"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("inSetWithSmartCast.kt") public void testInSetWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/collections/inSetWithSmartCast.kt"); } @TestMetadata("irrelevantImplCharSequence.kt") public void testIrrelevantImplCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequence.kt"); } @TestMetadata("irrelevantImplCharSequenceKotlin.kt") public void testIrrelevantImplCharSequenceKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collections/irrelevantImplCharSequenceKotlin.kt"); } @TestMetadata("irrelevantImplMutableListKotlin.kt") public void testIrrelevantImplMutableListKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collections/irrelevantImplMutableListKotlin.kt"); } @TestMetadata("noStubsInJavaSuperClass.kt") public void testNoStubsInJavaSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collections/noStubsInJavaSuperClass.kt"); } @TestMetadata("toArrayInJavaClass.kt") public void testToArrayInJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/collections/toArrayInJavaClass.kt"); } } @@ -5685,20 +3782,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Compatibility extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCompatibility() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/compatibility"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("dataClassEqualsHashCodeToString.kt") public void testDataClassEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/dataClassEqualsHashCodeToString.kt"); } @TestMetadata("privateCompanionObject.kt") public void testPrivateCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/compatibility/privateCompanionObject.kt"); } } @@ -5706,55 +3805,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constants extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConstants() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constants"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constantsInWhen.kt") public void testConstantsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/constantsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/constantsInWhen.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/float.kt"); } @TestMetadata("kt9532.kt") public void testKt9532() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/kt9532.kt"); } @TestMetadata("kt9532_lv10.kt") public void testKt9532_lv10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/constants/kt9532_lv10.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/long.kt"); } @TestMetadata("privateConst.kt") public void testPrivateConst() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/constants/privateConst.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/constants/privateConst.kt"); } } @@ -5762,6 +3848,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ConstructorCall extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/constructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -5771,643 +3861,464 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlStructures extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInControlStructures() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("bottles.kt") public void testBottles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/bottles.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/bottles.kt"); } @TestMetadata("breakInFinally.kt") public void testBreakInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakInFinally.kt"); } @TestMetadata("compareBoxedIntegerToZero.kt") public void testCompareBoxedIntegerToZero() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/compareBoxedIntegerToZero.kt"); } @TestMetadata("conditionOfEmptyIf.kt") public void testConditionOfEmptyIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/conditionOfEmptyIf.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInExpr.kt"); } @TestMetadata("continueInFor.kt") public void testContinueInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInFor.kt"); } @TestMetadata("continueInForCondition.kt") public void testContinueInForCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInForCondition.kt"); } @TestMetadata("continueInWhile.kt") public void testContinueInWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueInWhile.kt"); } @TestMetadata("continueToLabelInFor.kt") public void testContinueToLabelInFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/continueToLabelInFor.kt"); } @TestMetadata("doWhile.kt") public void testDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhile.kt"); } @TestMetadata("doWhileFib.kt") public void testDoWhileFib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileFib.kt"); } @TestMetadata("doWhileWithContinue.kt") public void testDoWhileWithContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/doWhileWithContinue.kt"); } @TestMetadata("emptyDoWhile.kt") public void testEmptyDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyDoWhile.kt"); } @TestMetadata("emptyFor.kt") public void testEmptyFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyFor.kt"); } @TestMetadata("emptyWhile.kt") public void testEmptyWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/emptyWhile.kt"); } @TestMetadata("factorialTest.kt") public void testFactorialTest() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/factorialTest.kt"); } @TestMetadata("finallyOnEmptyReturn.kt") public void testFinallyOnEmptyReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/finallyOnEmptyReturn.kt"); } @TestMetadata("forArrayList.kt") public void testForArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayList.kt"); } @TestMetadata("forArrayListMultiDecl.kt") public void testForArrayListMultiDecl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forArrayListMultiDecl.kt"); } @TestMetadata("forInCharSequence.kt") public void testForInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequence.kt"); } @TestMetadata("forInCharSequenceMut.kt") public void testForInCharSequenceMut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceMut.kt"); } @TestMetadata("forInSmartCastToArray.kt") public void testForInSmartCastToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSmartCastToArray.kt"); } @TestMetadata("forLoopMemberExtensionAll.kt") public void testForLoopMemberExtensionAll() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionAll.kt"); } @TestMetadata("forLoopMemberExtensionHasNext.kt") public void testForLoopMemberExtensionHasNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionHasNext.kt"); } @TestMetadata("forLoopMemberExtensionNext.kt") public void testForLoopMemberExtensionNext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forLoopMemberExtensionNext.kt"); } @TestMetadata("forUserType.kt") public void testForUserType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forUserType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forUserType.kt"); } @TestMetadata("inRangeConditionsInWhen.kt") public void testInRangeConditionsInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/inRangeConditionsInWhen.kt"); } @TestMetadata("kt12908.kt") public void testKt12908() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908.kt"); } @TestMetadata("kt12908_2.kt") public void testKt12908_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt12908_2.kt"); } @TestMetadata("kt1441.kt") public void testKt1441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1441.kt"); } @TestMetadata("kt14839.kt") public void testKt14839() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt14839.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt14839.kt"); } @TestMetadata("kt15726.kt") public void testKt15726() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt15726.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt15726.kt"); } @TestMetadata("kt1688.kt") public void testKt1688() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1688.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1688.kt"); } @TestMetadata("kt17110.kt") public void testKt17110() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17110.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17110.kt"); } @TestMetadata("kt1742.kt") public void testKt1742() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1742.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1742.kt"); } @TestMetadata("kt17590.kt") public void testKt17590() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590.kt"); } @TestMetadata("kt17590_long.kt") public void testKt17590_long() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt17590_long.kt"); } @TestMetadata("kt1899.kt") public void testKt1899() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt1899.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt1899.kt"); } @TestMetadata("kt2147.kt") public void testKt2147() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2147.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2147.kt"); } @TestMetadata("kt2259.kt") public void testKt2259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2259.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2259.kt"); } @TestMetadata("kt2291.kt") public void testKt2291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2291.kt"); } @TestMetadata("kt237.kt") public void testKt237() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt237.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt237.kt"); } @TestMetadata("kt2416.kt") public void testKt2416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2416.kt"); } @TestMetadata("kt2577.kt") public void testKt2577() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2577.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2577.kt"); } @TestMetadata("kt2597.kt") public void testKt2597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt2597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt2597.kt"); } @TestMetadata("kt299.kt") public void testKt299() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt299.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt299.kt"); } @TestMetadata("kt3087.kt") public void testKt3087() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3087.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3087.kt"); } @TestMetadata("kt3203_1.kt") public void testKt3203_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_1.kt"); } @TestMetadata("kt3203_2.kt") public void testKt3203_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3203_2.kt"); } @TestMetadata("kt3273.kt") public void testKt3273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3273.kt"); } @TestMetadata("kt3280.kt") public void testKt3280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt3280.kt"); } @TestMetadata("kt3574.kt") public void testKt3574() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt3574.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt3574.kt"); } @TestMetadata("kt416.kt") public void testKt416() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt416.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt416.kt"); } @TestMetadata("kt513.kt") public void testKt513() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt513.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt513.kt"); } @TestMetadata("kt628.kt") public void testKt628() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt628.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt628.kt"); } @TestMetadata("kt769.kt") public void testKt769() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt769.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt769.kt"); } @TestMetadata("kt772.kt") public void testKt772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt772.kt"); } @TestMetadata("kt773.kt") public void testKt773() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt773.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt773.kt"); } @TestMetadata("kt8148.kt") public void testKt8148() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt8148.kt"); } @TestMetadata("kt8148_break.kt") public void testKt8148_break() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_break.kt"); } @TestMetadata("kt8148_continue.kt") public void testKt8148_continue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt8148_continue.kt"); } @TestMetadata("kt870.kt") public void testKt870() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt870.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt870.kt"); } @TestMetadata("kt9022Return.kt") public void testKt9022Return() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Return.kt"); } @TestMetadata("kt9022Throw.kt") public void testKt9022Throw() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/kt9022Throw.kt"); } @TestMetadata("kt910.kt") public void testKt910() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt910.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt910.kt"); } @TestMetadata("kt958.kt") public void testKt958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/kt958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/kt958.kt"); } @TestMetadata("longRange.kt") public void testLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/longRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/longRange.kt"); } @TestMetadata("parameterWithNameForFunctionType.kt") public void testParameterWithNameForFunctionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/parameterWithNameForFunctionType.kt"); } @TestMetadata("quicksort.kt") public void testQuicksort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/quicksort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/quicksort.kt"); } @TestMetadata("tryCatchFinallyChain.kt") public void testTryCatchFinallyChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchFinallyChain.kt"); } @TestMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BreakContinueInExpressions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBreakContinueInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("breakFromOuter.kt") public void testBreakFromOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakFromOuter.kt"); } @TestMetadata("breakInDoWhile.kt") public void testBreakInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInDoWhile.kt"); } @TestMetadata("breakInExpr.kt") public void testBreakInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/breakInExpr.kt"); } @TestMetadata("continueInDoWhile.kt") public void testContinueInDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInDoWhile.kt"); } @TestMetadata("continueInExpr.kt") public void testContinueInExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/continueInExpr.kt"); } @TestMetadata("inlineWithStack.kt") public void testInlineWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/inlineWithStack.kt"); } @TestMetadata("innerLoopWithStack.kt") public void testInnerLoopWithStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/innerLoopWithStack.kt"); } @TestMetadata("kt14581.kt") public void testKt14581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt14581.kt"); } @TestMetadata("kt16713.kt") public void testKt16713() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713.kt"); } @TestMetadata("kt16713_2.kt") public void testKt16713_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt16713_2.kt"); } @TestMetadata("kt17384.kt") public void testKt17384() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt17384.kt"); } @TestMetadata("kt9022And.kt") public void testKt9022And() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022And.kt"); } @TestMetadata("kt9022Or.kt") public void testKt9022Or() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/kt9022Or.kt"); } @TestMetadata("pathologicalDoWhile.kt") public void testPathologicalDoWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/pathologicalDoWhile.kt"); } @TestMetadata("popSizes.kt") public void testPopSizes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/popSizes.kt"); } @TestMetadata("tryFinally1.kt") public void testTryFinally1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally1.kt"); } @TestMetadata("tryFinally2.kt") public void testTryFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/tryFinally2.kt"); } @TestMetadata("whileTrueBreak.kt") public void testWhileTrueBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/breakContinueInExpressions/whileTrueBreak.kt"); } } @@ -6415,84 +4326,57 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArray extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInArraySpecializedToUntil.kt") public void testForInArraySpecializedToUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArraySpecializedToUntil.kt"); } @TestMetadata("forInArrayWithArrayPropertyUpdatedInLoopBody.kt") public void testForInArrayWithArrayPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody12.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody12() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody12.kt"); } @TestMetadata("forInArrayWithArrayVarUpdatedInLoopBody13.kt") public void testForInArrayWithArrayVarUpdatedInLoopBody13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInArrayWithArrayVarUpdatedInLoopBody13.kt"); } @TestMetadata("forInDelegatedPropertyUpdatedInLoopBody.kt") public void testForInDelegatedPropertyUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInDelegatedPropertyUpdatedInLoopBody.kt"); } @TestMetadata("forInFieldUpdatedInLoopBody.kt") public void testForInFieldUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forInFieldUpdatedInLoopBody.kt"); } @TestMetadata("forIntArray.kt") public void testForIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forIntArray.kt"); } @TestMetadata("forNullableIntArray.kt") public void testForNullableIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forNullableIntArray.kt"); } @TestMetadata("forPrimitiveIntArray.kt") public void testForPrimitiveIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArray/forPrimitiveIntArray.kt"); } } @@ -6500,109 +4384,87 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInArrayWithIndex extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInArrayWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInArrayWithIndexContinuesAsUnmodified.kt") public void testForInArrayWithIndexContinuesAsUnmodified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrayWithIndexContinuesAsUnmodified.kt"); } @TestMetadata("forInArrrayWithIndexNoElementVar.kt") public void testForInArrrayWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoElementVar.kt"); } @TestMetadata("forInArrrayWithIndexNoIndexVar.kt") public void testForInArrrayWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexNoIndexVar.kt"); } @TestMetadata("forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInArrrayWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInArrrayWithIndexWithExplicitlyTypedIndexVariable.kt"); } @TestMetadata("forInByteArrayWithIndexWithSmartCast.kt") public void testForInByteArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInByteArrrayWithIndex.kt") public void testForInByteArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInByteArrrayWithIndex.kt"); } @TestMetadata("forInEmptyArrrayWithIndex.kt") public void testForInEmptyArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInEmptyArrrayWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndex.kt") public void testForInGenericArrayOfIntsWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndex.kt"); } @TestMetadata("forInGenericArrayOfIntsWithIndexWithSmartCast.kt") public void testForInGenericArrayOfIntsWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayOfIntsWithIndexWithSmartCast.kt"); } @TestMetadata("forInGenericArrayWithIndex.kt") public void testForInGenericArrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInGenericArrayWithIndex.kt"); } @TestMetadata("forInIntArrayWithIndexWithSmartCast.kt") public void testForInIntArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInIntArrrayWithIndex.kt") public void testForInIntArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInIntArrrayWithIndex.kt"); } @TestMetadata("forInObjectArrrayWithIndex.kt") public void testForInObjectArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInObjectArrrayWithIndex.kt"); } @TestMetadata("forInShortArrayWithIndexWithSmartCast.kt") public void testForInShortArrayWithIndexWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrayWithIndexWithSmartCast.kt"); } @TestMetadata("forInShortArrrayWithIndex.kt") public void testForInShortArrrayWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInArrayWithIndex/forInShortArrrayWithIndex.kt"); } } @@ -6610,61 +4472,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInCharSequenceWithIndex extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInCharSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInCharSeqWithIndexStops.kt") public void testForInCharSeqWithIndexStops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSeqWithIndexStops.kt"); } @TestMetadata("forInCharSequenceWithIndex.kt") public void testForInCharSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInCharSequenceWithIndex.kt"); } @TestMetadata("forInEmptyStringWithIndex.kt") public void testForInEmptyStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInEmptyStringWithIndex.kt"); } @TestMetadata("forInStringWithIndex.kt") public void testForInStringWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndex.kt"); } @TestMetadata("forInStringWithIndexNoElementVar.kt") public void testForInStringWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoElementVar.kt"); } @TestMetadata("forInStringWithIndexNoIndexVar.kt") public void testForInStringWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexNoIndexVar.kt"); } @TestMetadata("forInStringWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInStringWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInCharSequenceWithIndex/forInStringWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -6672,55 +4520,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIterableWithIndex extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInIterableWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInEmptyListWithIndex.kt") public void testForInEmptyListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInEmptyListWithIndex.kt"); } @TestMetadata("forInListWithIndex.kt") public void testForInListWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndex.kt"); } @TestMetadata("forInListWithIndexNoElementVar.kt") public void testForInListWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoElementVar.kt"); } @TestMetadata("forInListWithIndexNoIndexVar.kt") public void testForInListWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexNoIndexVar.kt"); } @TestMetadata("forInListWithIndexThrowsCME.kt") public void testForInListWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexThrowsCME.kt"); } @TestMetadata("forInListWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInListWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInIterableWithIndex/forInListWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -6728,55 +4563,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInSequenceWithIndex extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInSequenceWithIndex() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInEmptySequenceWithIndex.kt") public void testForInEmptySequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInEmptySequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndex.kt") public void testForInSequenceWithIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndex.kt"); } @TestMetadata("forInSequenceWithIndexNoElementVar.kt") public void testForInSequenceWithIndexNoElementVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoElementVar.kt"); } @TestMetadata("forInSequenceWithIndexNoIndexVar.kt") public void testForInSequenceWithIndexNoIndexVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexNoIndexVar.kt"); } @TestMetadata("forInSequenceWithIndexThrowsCME.kt") public void testForInSequenceWithIndexThrowsCME() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexThrowsCME.kt"); } @TestMetadata("forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt") public void testForInSequenceWithIndexWithExplicitlyTypedIndexVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/forInSequenceWithIndex/forInSequenceWithIndexWithExplicitlyTypedIndexVariable.kt"); } } @@ -6784,38 +4606,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ReturnsNothing extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInReturnsNothing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/returnsNothing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/ifElse.kt"); } @TestMetadata("inlineMethod.kt") public void testInlineMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/inlineMethod.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/propertyGetter.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/tryCatch.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/returnsNothing/when.kt"); } } @@ -6823,199 +4644,162 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryCatchInExpressions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTryCatchInExpressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("catch.kt") public void testCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/catch.kt"); } @TestMetadata("complexChain.kt") public void testComplexChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/complexChain.kt"); } @TestMetadata("deadTryCatch.kt") public void testDeadTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/deadTryCatch.kt"); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/differentTypes.kt"); } @TestMetadata("expectException.kt") public void testExpectException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/expectException.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/finally.kt"); } @TestMetadata("inlineTryCatch.kt") public void testInlineTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryCatch.kt"); } @TestMetadata("inlineTryExpr.kt") public void testInlineTryExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryExpr.kt"); } @TestMetadata("inlineTryFinally.kt") public void testInlineTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/inlineTryFinally.kt"); } @TestMetadata("kt17572.kt") public void testKt17572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572.kt"); } @TestMetadata("kt17572_2.kt") public void testKt17572_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2.kt"); } @TestMetadata("kt17572_2_ext.kt") public void testKt17572_2_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_2_ext.kt"); } @TestMetadata("kt17572_ext.kt") public void testKt17572_ext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_ext.kt"); } @TestMetadata("kt17572_nested.kt") public void testKt17572_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17572_nested.kt"); } @TestMetadata("kt17573.kt") public void testKt17573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573.kt"); } @TestMetadata("kt17573_nested.kt") public void testKt17573_nested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt17573_nested.kt"); } @TestMetadata("kt8608.kt") public void testKt8608() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt8608.kt"); } @TestMetadata("kt9644try.kt") public void testKt9644try() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/kt9644try.kt"); } @TestMetadata("multipleCatchBlocks.kt") public void testMultipleCatchBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/multipleCatchBlocks.kt"); } @TestMetadata("splitTry.kt") public void testSplitTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTry.kt"); } @TestMetadata("splitTryCorner1.kt") public void testSplitTryCorner1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner1.kt"); } @TestMetadata("splitTryCorner2.kt") public void testSplitTryCorner2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/splitTryCorner2.kt"); } @TestMetadata("try.kt") public void testTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/try.kt"); } @TestMetadata("tryAfterTry.kt") public void testTryAfterTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAfterTry.kt"); } @TestMetadata("tryAndBreak.kt") public void testTryAndBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndBreak.kt"); } @TestMetadata("tryAndContinue.kt") public void testTryAndContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryAndContinue.kt"); } @TestMetadata("tryCatchAfterWhileTrue.kt") public void testTryCatchAfterWhileTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryCatchAfterWhileTrue.kt"); } @TestMetadata("tryInsideCatch.kt") public void testTryInsideCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideCatch.kt"); } @TestMetadata("tryInsideTry.kt") public void testTryInsideTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/tryInsideTry.kt"); } @TestMetadata("unmatchedInlineMarkers.kt") public void testUnmatchedInlineMarkers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/controlStructures/tryCatchInExpressions/unmatchedInlineMarkers.kt"); } } } @@ -7024,16 +4808,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Coroutines extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("32defaultParametersInSuspend.kt") public void test32defaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/32defaultParametersInSuspend.kt"); } @TestMetadata("accessorForSuspend.kt") public void testAccessorForSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/accessorForSuspend.kt"); } public void testAllFilesPresentInCoroutines() throws Exception { @@ -7042,549 +4828,454 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("asyncIterator.kt") public void testAsyncIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIterator.kt"); } @TestMetadata("asyncIteratorNullMerge.kt") public void testAsyncIteratorNullMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorNullMerge.kt"); } @TestMetadata("asyncIteratorToList.kt") public void testAsyncIteratorToList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt"); } @TestMetadata("await.kt") public void testAwait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/await.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/await.kt"); } @TestMetadata("beginWithException.kt") public void testBeginWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithException.kt"); } @TestMetadata("beginWithExceptionNoHandleException.kt") public void testBeginWithExceptionNoHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/beginWithExceptionNoHandleException.kt"); } @TestMetadata("coercionToUnit.kt") public void testCoercionToUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coercionToUnit.kt"); } @TestMetadata("controllerAccessFromInnerLambda.kt") public void testControllerAccessFromInnerLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt"); } @TestMetadata("coroutineContextInInlinedLambda.kt") public void testCoroutineContextInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/coroutineContextInInlinedLambda.kt"); } @TestMetadata("createCoroutineSafe.kt") public void testCreateCoroutineSafe() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/createCoroutineSafe.kt"); } @TestMetadata("createCoroutinesOnManualInstances.kt") public void testCreateCoroutinesOnManualInstances() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt"); } @TestMetadata("crossInlineWithCapturedOuterReceiver.kt") public void testCrossInlineWithCapturedOuterReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/crossInlineWithCapturedOuterReceiver.kt"); } @TestMetadata("defaultParametersInSuspend.kt") public void testDefaultParametersInSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt"); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/dispatchResume.kt"); } @TestMetadata("emptyClosure.kt") public void testEmptyClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/emptyClosure.kt"); } @TestMetadata("falseUnitCoercion.kt") public void testFalseUnitCoercion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt"); } @TestMetadata("generate.kt") public void testGenerate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/generate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/generate.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleException.kt"); } @TestMetadata("handleResultCallEmptyBody.kt") public void testHandleResultCallEmptyBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultCallEmptyBody.kt"); } @TestMetadata("handleResultNonUnitExpression.kt") public void testHandleResultNonUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt"); } @TestMetadata("handleResultSuspended.kt") public void testHandleResultSuspended() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/handleResultSuspended.kt"); } @TestMetadata("indirectInlineUsedAsNonInline.kt") public void testIndirectInlineUsedAsNonInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt"); } @TestMetadata("inlineFunInGenericClass.kt") public void testInlineFunInGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt"); } @TestMetadata("inlineGenericFunCalledFromSubclass.kt") public void testInlineGenericFunCalledFromSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineGenericFunCalledFromSubclass.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt"); } @TestMetadata("inlinedTryCatchFinally.kt") public void testInlinedTryCatchFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt"); } @TestMetadata("innerSuspensionCalls.kt") public void testInnerSuspensionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt"); } @TestMetadata("instanceOfContinuation.kt") public void testInstanceOfContinuation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt"); } @TestMetadata("iterateOverArray.kt") public void testIterateOverArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/iterateOverArray.kt"); } @TestMetadata("kt12958.kt") public void testKt12958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt12958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt12958.kt"); } @TestMetadata("kt15016.kt") public void testKt15016() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15016.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15016.kt"); } @TestMetadata("kt15017.kt") public void testKt15017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15017.kt"); } @TestMetadata("kt15930.kt") public void testKt15930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt15930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt15930.kt"); } @TestMetadata("kt21605.kt") public void testKt21605() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/kt21605.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/kt21605.kt"); } @TestMetadata("lastExpressionIsLoop.kt") public void testLastExpressionIsLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt"); } @TestMetadata("lastStatementInc.kt") public void testLastStatementInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStatementInc.kt"); } @TestMetadata("lastStementAssignment.kt") public void testLastStementAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastStementAssignment.kt"); } @TestMetadata("lastUnitExpression.kt") public void testLastUnitExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/lastUnitExpression.kt"); } @TestMetadata("localCallableRef.kt") public void testLocalCallableRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localCallableRef.kt"); } @TestMetadata("localDelegate.kt") public void testLocalDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localDelegate.kt"); } @TestMetadata("longRangeInSuspendCall.kt") public void testLongRangeInSuspendCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendCall.kt"); } @TestMetadata("longRangeInSuspendFun.kt") public void testLongRangeInSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/longRangeInSuspendFun.kt"); } @TestMetadata("mergeNullAndString.kt") public void testMergeNullAndString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/mergeNullAndString.kt"); } @TestMetadata("multipleInvokeCalls.kt") public void testMultipleInvokeCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda1.kt") public void testMultipleInvokeCallsInsideInlineLambda1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda2.kt") public void testMultipleInvokeCallsInsideInlineLambda2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt"); } @TestMetadata("multipleInvokeCallsInsideInlineLambda3.kt") public void testMultipleInvokeCallsInsideInlineLambda3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt"); } @TestMetadata("nestedTryCatch.kt") public void testNestedTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nestedTryCatch.kt"); } @TestMetadata("noSuspensionPoints.kt") public void testNoSuspensionPoints() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/noSuspensionPoints.kt"); } @TestMetadata("nonLocalReturnFromInlineLambda.kt") public void testNonLocalReturnFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt"); } @TestMetadata("nonLocalReturnFromInlineLambdaDeep.kt") public void testNonLocalReturnFromInlineLambdaDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt"); } @TestMetadata("overrideDefaultArgument.kt") public void testOverrideDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/overrideDefaultArgument.kt"); } @TestMetadata("recursiveSuspend.kt") public void testRecursiveSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/recursiveSuspend.kt"); } @TestMetadata("returnByLabel.kt") public void testReturnByLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/returnByLabel.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simple.kt"); } @TestMetadata("simpleException.kt") public void testSimpleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleException.kt"); } @TestMetadata("simpleWithHandleResult.kt") public void testSimpleWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt"); } @TestMetadata("statementLikeLastExpression.kt") public void testStatementLikeLastExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt"); } @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt"); } @TestMetadata("suspendDefaultImpl.kt") public void testSuspendDefaultImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt"); } @TestMetadata("suspendDelegation.kt") public void testSuspendDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendDelegation.kt"); } @TestMetadata("suspendFromInlineLambda.kt") public void testSuspendFromInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt"); } @TestMetadata("suspendFunImportedFromObject.kt") public void testSuspendFunImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInCycle.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstruction.kt") public void testSuspendInTheMiddleOfObjectConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt") public void testSuspendInTheMiddleOfObjectConstructionEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionEvaluationOrder.kt"); } @TestMetadata("suspendInTheMiddleOfObjectConstructionWithJumpOut.kt") public void testSuspendInTheMiddleOfObjectConstructionWithJumpOut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstructionWithJumpOut.kt"); } @TestMetadata("suspensionInsideSafeCall.kt") public void testSuspensionInsideSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt"); } @TestMetadata("suspensionInsideSafeCallWithElvis.kt") public void testSuspensionInsideSafeCallWithElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt"); } @TestMetadata("tryCatchFinallyWithHandleResult.kt") public void testTryCatchFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt"); } @TestMetadata("tryCatchWithHandleResult.kt") public void testTryCatchWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt"); } @TestMetadata("tryFinallyInsideInlineLambda.kt") public void testTryFinallyInsideInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt"); } @TestMetadata("tryFinallyWithHandleResult.kt") public void testTryFinallyWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt"); } @TestMetadata("varValueConflictsWithTable.kt") public void testVarValueConflictsWithTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt"); } @TestMetadata("varValueConflictsWithTableSameSort.kt") public void testVarValueConflictsWithTableSameSort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/controlFlow") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ControlFlow extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInControlFlow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/controlFlow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("breakFinally.kt") public void testBreakFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt"); } @TestMetadata("breakStatement.kt") public void testBreakStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt"); } @TestMetadata("doWhileStatement.kt") public void testDoWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt"); } @TestMetadata("forContinue.kt") public void testForContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt"); } @TestMetadata("forStatement.kt") public void testForStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt"); } @TestMetadata("forWithStep.kt") public void testForWithStep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/forWithStep.kt"); } @TestMetadata("ifStatement.kt") public void testIfStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt"); } @TestMetadata("labeledWhile.kt") public void testLabeledWhile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/labeledWhile.kt"); } @TestMetadata("returnFromFinally.kt") public void testReturnFromFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt"); } @TestMetadata("switchLikeWhen.kt") public void testSwitchLikeWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt"); } @TestMetadata("throwFromCatch.kt") public void testThrowFromCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt"); } @TestMetadata("throwInTryWithHandleResult.kt") public void testThrowInTryWithHandleResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt"); } @TestMetadata("whileStatement.kt") public void testWhileStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt"); } } @@ -7592,62 +5283,57 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FeatureIntersection extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFeatureIntersection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/featureIntersection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("breakWithNonEmptyStack.kt") public void testBreakWithNonEmptyStack() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/breakWithNonEmptyStack.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/delegate.kt"); } @TestMetadata("destructuringInLambdas.kt") public void testDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/destructuringInLambdas.kt"); } @TestMetadata("safeCallOnTwoReceivers.kt") public void testSafeCallOnTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceivers.kt"); } @TestMetadata("safeCallOnTwoReceiversLong.kt") public void testSafeCallOnTwoReceiversLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/safeCallOnTwoReceiversLong.kt"); } @TestMetadata("suspendDestructuringInLambdas.kt") public void testSuspendDestructuringInLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendDestructuringInLambdas.kt"); } @TestMetadata("suspendOperatorPlus.kt") public void testSuspendOperatorPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlus.kt"); } @TestMetadata("suspendOperatorPlusAssign.kt") public void testSuspendOperatorPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusAssign.kt"); } @TestMetadata("suspendOperatorPlusCallFromLambda.kt") public void testSuspendOperatorPlusCallFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/suspendOperatorPlusCallFromLambda.kt"); } @TestMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec") @@ -7656,56 +5342,51 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { public static class Tailrec extends AbstractJsCodegenBoxTest { @TestMetadata("infixCall.kt") public void ignoreInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void ignoreInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/infixRecursiveCall.kt"); } @TestMetadata("realIteratorFoldl.kt") public void ignoreRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realIteratorFoldl.kt"); } @TestMetadata("realStringRepeat.kt") public void ignoreRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringRepeat.kt"); } @TestMetadata("returnInParentheses.kt") public void ignoreReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/returnInParentheses.kt"); } @TestMetadata("sum.kt") public void ignoreSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void ignoreTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void ignoreTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/tailCallInParentheses.kt"); } @TestMetadata("whenWithIs.kt") public void ignoreWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/whenWithIs.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); } public void testAllFilesPresentInTailrec() throws Exception { @@ -7714,26 +5395,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("controlFlowIf.kt") public void testControlFlowIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowIf.kt"); } @TestMetadata("controlFlowWhen.kt") public void testControlFlowWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/controlFlowWhen.kt"); } @TestMetadata("extention.kt") public void testExtention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/extention.kt"); } @TestMetadata("realStringEscape.kt") public void testRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/featureIntersection/tailrec/realStringEscape.kt"); } } } @@ -7742,56 +5419,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntLikeVarSpilling extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIntLikeVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intLikeVarSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("complicatedMerge.kt") public void testComplicatedMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt"); } @TestMetadata("i2bResult.kt") public void testI2bResult() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt"); } @TestMetadata("loadFromBooleanArray.kt") public void testLoadFromBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt"); } @TestMetadata("loadFromByteArray.kt") public void testLoadFromByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt"); } @TestMetadata("noVariableInTable.kt") public void testNoVariableInTable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt"); } @TestMetadata("sameIconst1ManyVars.kt") public void testSameIconst1ManyVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt"); } @TestMetadata("usedInMethodCall.kt") public void testUsedInMethodCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt"); } @TestMetadata("usedInVarStore.kt") public void testUsedInVarStore() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt"); } } @@ -7799,56 +5472,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IntrinsicSemantics extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIntrinsicSemantics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/intrinsicSemantics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("coroutineContext.kt") public void testCoroutineContext() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContext.kt"); } @TestMetadata("coroutineContextReceiver.kt") public void testCoroutineContextReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiver.kt"); } @TestMetadata("coroutineContextReceiverNotIntrinsic.kt") public void testCoroutineContextReceiverNotIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/coroutineContextReceiverNotIntrinsic.kt"); } @TestMetadata("intercepted.kt") public void testIntercepted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/intercepted.kt"); } @TestMetadata("startCoroutine.kt") public void testStartCoroutine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutine.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturn.kt") public void testStartCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturn.kt"); } @TestMetadata("startCoroutineUninterceptedOrReturnInterception.kt") public void testStartCoroutineUninterceptedOrReturnInterception() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/startCoroutineUninterceptedOrReturnInterception.kt"); } @TestMetadata("suspendCoroutineUninterceptedOrReturn.kt") public void testSuspendCoroutineUninterceptedOrReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/intrinsicSemantics/suspendCoroutineUninterceptedOrReturn.kt"); } } @@ -7856,6 +5525,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -7866,8 +5539,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { public static class Anonymous extends AbstractJsCodegenBoxTest { @TestMetadata("simple.kt") public void ignoreSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/anonymous/simple.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); } public void testAllFilesPresentInAnonymous() throws Exception { @@ -7879,68 +5555,62 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Named extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNamed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/localFunctions/named"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("capturedParameters.kt") public void testCapturedParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedParameters.kt"); } @TestMetadata("capturedVariables.kt") public void testCapturedVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/capturedVariables.kt"); } @TestMetadata("extension.kt") public void testExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/extension.kt"); } @TestMetadata("infix.kt") public void testInfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/infix.kt"); } @TestMetadata("insideLambda.kt") public void testInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/insideLambda.kt"); } @TestMetadata("nestedLocals.kt") public void testNestedLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/nestedLocals.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simple.kt"); } @TestMetadata("simpleSuspensionPoint.kt") public void testSimpleSuspensionPoint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/simpleSuspensionPoint.kt"); } @TestMetadata("stateMachine.kt") public void testStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/stateMachine.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/localFunctions/named/withArguments.kt"); } } } @@ -7949,50 +5619,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiModule extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiModule() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/multiModule"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("inlineFunctionWithOptionalParam.kt") public void testInlineFunctionWithOptionalParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineFunctionWithOptionalParam.kt"); } @TestMetadata("inlineMultiModule.kt") public void testInlineMultiModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModule.kt"); } @TestMetadata("inlineMultiModuleOverride.kt") public void testInlineMultiModuleOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleOverride.kt"); } @TestMetadata("inlineMultiModuleWithController.kt") public void testInlineMultiModuleWithController() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithController.kt"); } @TestMetadata("inlineMultiModuleWithInnerInlining.kt") public void testInlineMultiModuleWithInnerInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineMultiModuleWithInnerInlining.kt"); } @TestMetadata("inlineTailCall.kt") public void testInlineTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/inlineTailCall.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/multiModule/simple.kt"); } } @@ -8000,14 +5667,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RedundantLocalsElimination extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRedundantLocalsElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/redundantLocalsElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("ktor_receivedMessage.kt") public void testKtor_receivedMessage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/redundantLocalsElimination/ktor_receivedMessage.kt"); } } @@ -8015,32 +5685,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StackUnwinding extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStackUnwinding() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/stackUnwinding"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("exception.kt") public void testException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/exception.kt"); } @TestMetadata("inlineSuspendFunction.kt") public void testInlineSuspendFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/inlineSuspendFunction.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/simple.kt"); } @TestMetadata("suspendInCycle.kt") public void testSuspendInCycle() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/stackUnwinding/suspendInCycle.kt"); } } @@ -8048,98 +5718,87 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionAsCoroutine extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionAsCoroutine() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("dispatchResume.kt") public void testDispatchResume() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt"); } @TestMetadata("handleException.kt") public void testHandleException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt"); } @TestMetadata("inlineTwoReceivers.kt") public void testInlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt"); } @TestMetadata("member.kt") public void testMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt"); } @TestMetadata("noinlineTwoReceivers.kt") public void testNoinlineTwoReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt"); } @TestMetadata("operators.kt") public void testOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt"); } @TestMetadata("privateFunctions.kt") public void testPrivateFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt"); } @TestMetadata("privateInFile.kt") public void testPrivateInFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt"); } @TestMetadata("returnNoSuspend.kt") public void testReturnNoSuspend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCall.kt"); } @TestMetadata("superCallAbstractClass.kt") public void testSuperCallAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallAbstractClass.kt"); } @TestMetadata("superCallInterface.kt") public void testSuperCallInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/superCallInterface.kt"); } @TestMetadata("withVariables.kt") public void testWithVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt"); } } @@ -8147,32 +5806,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuspendFunctionTypeCall extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSuspendFunctionTypeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt"); } @TestMetadata("manyParameters.kt") public void testManyParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt"); } @TestMetadata("suspendModifier.kt") public void testSuspendModifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/suspendModifier.kt"); } } @@ -8180,61 +5839,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailCallOptimizations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTailCallOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailCallOptimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("crossinline.kt") public void testCrossinline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/crossinline.kt"); } @TestMetadata("inlineWithStateMachine.kt") public void testInlineWithStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithStateMachine.kt"); } @TestMetadata("inlineWithoutStateMachine.kt") public void testInlineWithoutStateMachine() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/inlineWithoutStateMachine.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/simple.kt"); } @TestMetadata("tryCatch.kt") public void testTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/tryCatch.kt"); } @TestMetadata("unreachable.kt") public void testUnreachable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/unreachable.kt"); } @TestMetadata("whenUnit.kt") public void testWhenUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailCallOptimizations/whenUnit.kt"); } } @@ -8242,32 +5887,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TailOperations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTailOperations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/tailOperations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("suspendWithIf.kt") public void testSuspendWithIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt"); } @TestMetadata("suspendWithTryCatch.kt") public void testSuspendWithTryCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt"); } @TestMetadata("suspendWithWhen.kt") public void testSuspendWithWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt"); } @TestMetadata("tailInlining.kt") public void testTailInlining() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/tailOperations/tailInlining.kt"); } } @@ -8275,38 +5920,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnitTypeReturn extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInUnitTypeReturn() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/unitTypeReturn"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("coroutineNonLocalReturn.kt") public void testCoroutineNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt"); } @TestMetadata("coroutineReturn.kt") public void testCoroutineReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt"); } @TestMetadata("suspendNonLocalReturn.kt") public void testSuspendNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt"); } @TestMetadata("suspendReturn.kt") public void testSuspendReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt"); } @TestMetadata("unitSafeCall.kt") public void testUnitSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/unitTypeReturn/unitSafeCall.kt"); } } @@ -8314,20 +5958,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class VarSpilling extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInVarSpilling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/coroutines/varSpilling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt19475.kt") public void testKt19475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt19475.kt"); } @TestMetadata("nullSpilling.kt") public void testNullSpilling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/coroutines/varSpilling/nullSpilling.kt"); } } } @@ -8336,187 +5982,139 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DataClasses extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDataClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/changingVarParam.kt"); } @TestMetadata("doubleParam.kt") public void testDoubleParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/doubleParam.kt"); } @TestMetadata("floatParam.kt") public void testFloatParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/floatParam.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/floatParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/genericParam.kt"); } @TestMetadata("kt5002.kt") public void testKt5002() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/kt5002.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/kt5002.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/mixedParams.kt"); } @TestMetadata("multiDeclaration.kt") public void testMultiDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclaration.kt"); } @TestMetadata("multiDeclarationFor.kt") public void testMultiDeclarationFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/multiDeclarationFor.kt"); } @TestMetadata("nonTrivialFinalMemberInSuperClass.kt") public void testNonTrivialFinalMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialFinalMemberInSuperClass.kt"); } @TestMetadata("nonTrivialMemberInSuperClass.kt") public void testNonTrivialMemberInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/nonTrivialMemberInSuperClass.kt"); } @TestMetadata("privateValParams.kt") public void testPrivateValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/privateValParams.kt"); } @TestMetadata("twoValParams.kt") public void testTwoValParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoValParams.kt"); } @TestMetadata("twoVarParams.kt") public void testTwoVarParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/twoVarParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/unitComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/dataClasses/copy") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Copy extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCopy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/copy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constructorWithDefaultParam.kt") public void testConstructorWithDefaultParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/constructorWithDefaultParam.kt"); } @TestMetadata("copyInObjectNestedDataClass.kt") public void testCopyInObjectNestedDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/copyInObjectNestedDataClass.kt"); } @TestMetadata("kt12708.kt") public void testKt12708() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt12708.kt"); } @TestMetadata("kt3033.kt") public void testKt3033() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/kt3033.kt"); } @TestMetadata("valInConstructorParams.kt") public void testValInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/valInConstructorParams.kt"); } @TestMetadata("varInConstructorParams.kt") public void testVarInConstructorParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/varInConstructorParams.kt"); } @TestMetadata("withGenericParameter.kt") public void testWithGenericParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withGenericParameter.kt"); } @TestMetadata("withSecondaryConstructor.kt") public void testWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/copy/withSecondaryConstructor.kt"); } } @@ -8524,61 +6122,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Equals extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEquals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/equals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/equals/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("genericarray.kt") public void testGenericarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/genericarray.kt"); } @TestMetadata("intarray.kt") public void testIntarray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/intarray.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/null.kt"); } @TestMetadata("nullother.kt") public void testNullother() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/nullother.kt"); } @TestMetadata("sameinstance.kt") public void testSameinstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/equals/sameinstance.kt"); } } @@ -8586,108 +6170,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashCode extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInHashCode() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/hashCode"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/array.kt"); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/boolean.kt"); } @TestMetadata("byte.kt") public void testByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/byte.kt"); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/char.kt"); } @TestMetadata("double.kt") public void testDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/double.kt"); } @TestMetadata("float.kt") public void testFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/float.kt"); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/genericNull.kt"); } @TestMetadata("int.kt") public void testInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/int.kt"); } @TestMetadata("long.kt") public void testLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/long.kt"); } @TestMetadata("null.kt") public void testNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/null.kt"); } @TestMetadata("short.kt") public void testShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/hashCode/short.kt"); } } @@ -8695,72 +6248,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToString extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInToString() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/dataClasses/toString"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("alreadyDeclared.kt") public void testAlreadyDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclared.kt"); } @TestMetadata("alreadyDeclaredWrongSignature.kt") public void testAlreadyDeclaredWrongSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/toString/alreadyDeclaredWrongSignature.kt"); } @TestMetadata("arrayParams.kt") public void testArrayParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt"); } @TestMetadata("changingVarParam.kt") public void testChangingVarParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/changingVarParam.kt"); } @TestMetadata("genericParam.kt") public void testGenericParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/genericParam.kt"); } @TestMetadata("mixedParams.kt") public void testMixedParams() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/mixedParams.kt"); } @TestMetadata("unitComponent.kt") public void testUnitComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/dataClasses/toString/unitComponent.kt"); } } } @@ -8769,32 +6297,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeadCodeElimination extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDeadCodeElimination() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/deadCodeElimination"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("emptyVariableRange.kt") public void testEmptyVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/emptyVariableRange.kt"); } @TestMetadata("intersectingVariableRange.kt") public void testIntersectingVariableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRange.kt"); } @TestMetadata("intersectingVariableRangeInFinally.kt") public void testIntersectingVariableRangeInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/intersectingVariableRangeInFinally.kt"); } @TestMetadata("kt14357.kt") public void testKt14357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/deadCodeElimination/kt14357.kt"); } } @@ -8802,203 +6330,134 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("implementedByFake.kt") public void testImplementedByFake() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake.kt"); } @TestMetadata("implementedByFake2.kt") public void testImplementedByFake2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake2.kt"); } @TestMetadata("implementedByFake3.kt") public void testImplementedByFake3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/implementedByFake3.kt"); } @TestMetadata("inheritedFromInterfaceViaAbstractSuperclass.kt") public void testInheritedFromInterfaceViaAbstractSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/inheritedFromInterfaceViaAbstractSuperclass.kt"); } @TestMetadata("kt6382.kt") public void testKt6382() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/kt6382.kt"); } @TestMetadata("protected.kt") public void testProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/protected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/protected.kt"); } @TestMetadata("simpleFromOtherFile.kt") public void testSimpleFromOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/simpleFromOtherFile.kt"); } @TestMetadata("superCallCheck.kt") public void testSuperCallCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/superCallCheck.kt"); } @TestMetadata("compiler/testData/codegen/box/defaultArguments/constructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructor extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/constructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotation.kt") public void testAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotation.kt"); } @TestMetadata("annotationWithEmptyArray.kt") public void testAnnotationWithEmptyArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/annotationWithEmptyArray.kt"); } @TestMetadata("checkIfConstructorIsSynthetic.kt") public void testCheckIfConstructorIsSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/checkIfConstructorIsSynthetic.kt"); } @TestMetadata("defArgs1.kt") public void testDefArgs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1.kt"); } @TestMetadata("defArgs1InnerClass.kt") public void testDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs1InnerClass.kt"); } @TestMetadata("defArgs2.kt") public void testDefArgs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/defArgs2.kt"); } @TestMetadata("doubleDefArgs1InnerClass.kt") public void testDoubleDefArgs1InnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/doubleDefArgs1InnerClass.kt"); } @TestMetadata("enum.kt") public void testEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enum.kt"); } @TestMetadata("enumWithOneDefArg.kt") public void testEnumWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithOneDefArg.kt"); } @TestMetadata("enumWithTwoDefArgs.kt") public void testEnumWithTwoDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDefArgs.kt"); } @TestMetadata("enumWithTwoDoubleDefArgs.kt") public void testEnumWithTwoDoubleDefArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/enumWithTwoDoubleDefArgs.kt"); } @TestMetadata("kt2852.kt") public void testKt2852() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt2852.kt"); } @TestMetadata("kt3060.kt") public void testKt3060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/kt3060.kt"); } @TestMetadata("manyArgs.kt") public void testManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/defaultArguments/constructor/manyArgs.kt"); } } @@ -9006,26 +6465,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Convention extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConvention() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/convention"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("incWithDefaultInGetter.kt") public void testIncWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/incWithDefaultInGetter.kt"); } @TestMetadata("kt9140.kt") public void testKt9140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/kt9140.kt"); } @TestMetadata("plusAssignWithDefaultInGetter.kt") public void testPlusAssignWithDefaultInGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/convention/plusAssignWithDefaultInGetter.kt"); } } @@ -9033,10 +6493,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Function extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractClass.kt") public void testAbstractClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/abstractClass.kt"); } public void testAllFilesPresentInFunction() throws Exception { @@ -9045,116 +6508,97 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverride.kt"); } @TestMetadata("covariantOverrideGeneric.kt") public void testCovariantOverrideGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/covariantOverrideGeneric.kt"); } @TestMetadata("extensionFunctionManyArgs.kt") public void testExtensionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extensionFunctionManyArgs.kt"); } @TestMetadata("extentionFunction.kt") public void testExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunction.kt"); } @TestMetadata("extentionFunctionDouble.kt") public void testExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDouble.kt"); } @TestMetadata("extentionFunctionDoubleTwoArgs.kt") public void testExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("extentionFunctionInClassObject.kt") public void testExtentionFunctionInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInClassObject.kt"); } @TestMetadata("extentionFunctionInObject.kt") public void testExtentionFunctionInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionInObject.kt"); } @TestMetadata("extentionFunctionWithOneDefArg.kt") public void testExtentionFunctionWithOneDefArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/extentionFunctionWithOneDefArg.kt"); } @TestMetadata("funInTrait.kt") public void testFunInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/funInTrait.kt"); } @TestMetadata("innerExtentionFunction.kt") public void testInnerExtentionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunction.kt"); } @TestMetadata("innerExtentionFunctionDouble.kt") public void testInnerExtentionFunctionDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDouble.kt"); } @TestMetadata("innerExtentionFunctionDoubleTwoArgs.kt") public void testInnerExtentionFunctionDoubleTwoArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionDoubleTwoArgs.kt"); } @TestMetadata("innerExtentionFunctionManyArgs.kt") public void testInnerExtentionFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/innerExtentionFunctionManyArgs.kt"); } @TestMetadata("kt5232.kt") public void testKt5232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/kt5232.kt"); } @TestMetadata("memberFunctionManyArgs.kt") public void testMemberFunctionManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/memberFunctionManyArgs.kt"); } @TestMetadata("mixingNamedAndPositioned.kt") public void testMixingNamedAndPositioned() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/mixingNamedAndPositioned.kt"); } @TestMetadata("topLevelManyArgs.kt") public void testTopLevelManyArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/topLevelManyArgs.kt"); } @TestMetadata("trait.kt") public void testTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/function/trait.kt"); } } @@ -9162,32 +6606,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("memberExtensionFunction.kt") public void testMemberExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberExtensionFunction.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/memberFunction.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/primaryConstructor.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/private/secondaryConstructor.kt"); } } @@ -9195,26 +6639,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Signature extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/defaultArguments/signature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt2789.kt") public void testKt2789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt2789.kt"); } @TestMetadata("kt9428.kt") public void testKt9428() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9428.kt"); } @TestMetadata("kt9924.kt") public void testKt9924() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/defaultArguments/signature/kt9924.kt"); } } } @@ -9223,10 +6668,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DelegatedProperty extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessTopLevelDelegatedPropertyInClinit.kt") public void testAccessTopLevelDelegatedPropertyInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/accessTopLevelDelegatedPropertyInClinit.kt"); } public void testAllFilesPresentInDelegatedProperty() throws Exception { @@ -9235,411 +6683,284 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("capturePropertyInClosure.kt") public void testCapturePropertyInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/capturePropertyInClosure.kt"); } @TestMetadata("castGetReturnType.kt") public void testCastGetReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castGetReturnType.kt"); } @TestMetadata("castSetParameter.kt") public void testCastSetParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/castSetParameter.kt"); } @TestMetadata("delegateAsInnerClass.kt") public void testDelegateAsInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateAsInnerClass.kt"); } @TestMetadata("delegateByOtherProperty.kt") public void testDelegateByOtherProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByOtherProperty.kt"); } @TestMetadata("delegateByTopLevelFun.kt") public void testDelegateByTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelFun.kt"); } @TestMetadata("delegateByTopLevelProperty.kt") public void testDelegateByTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateByTopLevelProperty.kt"); } @TestMetadata("delegateForExtProperty.kt") public void testDelegateForExtProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtProperty.kt"); } @TestMetadata("delegateForExtPropertyInClass.kt") public void testDelegateForExtPropertyInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateForExtPropertyInClass.kt"); } @TestMetadata("delegateWithPrivateSet.kt") public void testDelegateWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt"); } @TestMetadata("extensionDelegatesWithSameNames.kt") public void testExtensionDelegatesWithSameNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionDelegatesWithSameNames.kt"); } @TestMetadata("extensionPropertyAndExtensionGetValue.kt") public void testExtensionPropertyAndExtensionGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/extensionPropertyAndExtensionGetValue.kt"); } @TestMetadata("genericDelegate.kt") public void testGenericDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegate.kt"); } @TestMetadata("genericDelegateUncheckedCast1.kt") public void testGenericDelegateUncheckedCast1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast1.kt"); } @TestMetadata("genericDelegateUncheckedCast2.kt") public void testGenericDelegateUncheckedCast2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/genericDelegateUncheckedCast2.kt"); } @TestMetadata("genericSetValueViaSyntheticAccessor.kt") public void testGenericSetValueViaSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/genericSetValueViaSyntheticAccessor.kt"); } @TestMetadata("getAsExtensionFun.kt") public void testGetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFun.kt"); } @TestMetadata("getAsExtensionFunInClass.kt") public void testGetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/getAsExtensionFunInClass.kt"); } @TestMetadata("getDelegateWithoutReflection.kt") public void testGetDelegateWithoutReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/getDelegateWithoutReflection.kt"); } @TestMetadata("inClassVal.kt") public void testInClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVal.kt"); } @TestMetadata("inClassVar.kt") public void testInClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inClassVar.kt"); } @TestMetadata("inTrait.kt") public void testInTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inTrait.kt"); } @TestMetadata("inferredPropertyType.kt") public void testInferredPropertyType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/inferredPropertyType.kt"); } @TestMetadata("kt4138.kt") public void testKt4138() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt4138.kt"); } @TestMetadata("kt6722.kt") public void testKt6722() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt6722.kt"); } @TestMetadata("kt9712.kt") public void testKt9712() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/kt9712.kt"); } @TestMetadata("privateSetterKPropertyIsNotMutable.kt") public void testPrivateSetterKPropertyIsNotMutable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/privateSetterKPropertyIsNotMutable.kt"); } @TestMetadata("privateVar.kt") public void testPrivateVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/privateVar.kt"); } @TestMetadata("propertyMetadataShouldBeCached.kt") public void testPropertyMetadataShouldBeCached() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/propertyMetadataShouldBeCached.kt"); } @TestMetadata("protectedVarWithPrivateSet.kt") public void testProtectedVarWithPrivateSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/protectedVarWithPrivateSet.kt"); } @TestMetadata("setAsExtensionFun.kt") public void testSetAsExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFun.kt"); } @TestMetadata("setAsExtensionFunInClass.kt") public void testSetAsExtensionFunInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/setAsExtensionFunInClass.kt"); } @TestMetadata("stackOverflowOnCallFromGetValue.kt") public void testStackOverflowOnCallFromGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/stackOverflowOnCallFromGetValue.kt"); } @TestMetadata("topLevelVal.kt") public void testTopLevelVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVal.kt"); } @TestMetadata("topLevelVar.kt") public void testTopLevelVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/topLevelVar.kt"); } @TestMetadata("twoPropByOneDelegete.kt") public void testTwoPropByOneDelegete() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/twoPropByOneDelegete.kt"); } @TestMetadata("useKPropertyLater.kt") public void testUseKPropertyLater() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/useKPropertyLater.kt"); } @TestMetadata("useReflectionOnKProperty.kt") public void testUseReflectionOnKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/useReflectionOnKProperty.kt"); } @TestMetadata("valInInnerClass.kt") public void testValInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/valInInnerClass.kt"); } @TestMetadata("varInInnerClass.kt") public void testVarInInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/varInInnerClass.kt"); } @TestMetadata("compiler/testData/codegen/box/delegatedProperty/local") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("capturedLocalVal.kt") public void testCapturedLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVal.kt"); } @TestMetadata("capturedLocalValNoInline.kt") public void testCapturedLocalValNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalValNoInline.kt"); } @TestMetadata("capturedLocalVar.kt") public void testCapturedLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVar.kt"); } @TestMetadata("capturedLocalVarNoInline.kt") public void testCapturedLocalVarNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/capturedLocalVarNoInline.kt"); } @TestMetadata("inlineGetValue.kt") public void testInlineGetValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineGetValue.kt"); } @TestMetadata("inlineOperators.kt") public void testInlineOperators() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/inlineOperators.kt"); } @TestMetadata("kt12891.kt") public void testKt12891() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt12891.kt"); } @TestMetadata("kt13557.kt") public void testKt13557() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt13557.kt"); } @TestMetadata("kt16864.kt") public void testKt16864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt16864.kt"); } @TestMetadata("kt19690.kt") public void testKt19690() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/kt19690.kt"); } @TestMetadata("localVal.kt") public void testLocalVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVal.kt"); } @TestMetadata("localValNoExplicitType.kt") public void testLocalValNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localValNoExplicitType.kt"); } @TestMetadata("localVar.kt") public void testLocalVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVar.kt"); } @TestMetadata("localVarNoExplicitType.kt") public void testLocalVarNoExplicitType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/local/localVarNoExplicitType.kt"); } } @@ -9647,121 +6968,97 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ProvideDelegate extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInProvideDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegatedProperty/provideDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("differentReceivers.kt") public void testDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/differentReceivers.kt"); } @TestMetadata("evaluationOrder.kt") public void testEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrder.kt"); } @TestMetadata("evaluationOrderVar.kt") public void testEvaluationOrderVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/evaluationOrderVar.kt"); } @TestMetadata("extensionDelegated.kt") public void testExtensionDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/extensionDelegated.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/generic.kt"); } @TestMetadata("hostCheck.kt") public void testHostCheck() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inClass.kt"); } @TestMetadata("inlineProvideDelegate.kt") public void testInlineProvideDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/inlineProvideDelegate.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/jvmStaticInObject.kt"); } @TestMetadata("kt15437.kt") public void testKt15437() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt15437.kt"); } @TestMetadata("kt16441.kt") public void testKt16441() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt16441.kt"); } @TestMetadata("kt18902.kt") public void testKt18902() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/kt18902.kt"); } @TestMetadata("local.kt") public void testLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/local.kt"); } @TestMetadata("localCaptured.kt") public void testLocalCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localCaptured.kt"); } @TestMetadata("localDifferentReceivers.kt") public void testLocalDifferentReceivers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/localDifferentReceivers.kt"); } @TestMetadata("memberExtension.kt") public void testMemberExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/memberExtension.kt"); } @TestMetadata("propertyMetadata.kt") public void testPropertyMetadata() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/propertyMetadata.kt"); } } } @@ -9770,49 +7067,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Delegation extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDelegation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/delegation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("delegationToVal.kt") public void testDelegationToVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationToVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/delegation/delegationToVal.kt"); } @TestMetadata("delegationWithPrivateConstructor.kt") public void testDelegationWithPrivateConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/delegationWithPrivateConstructor.kt"); } @TestMetadata("hiddenSuperOverrideIn1.0.kt") public void testHiddenSuperOverrideIn1_0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/hiddenSuperOverrideIn1.0.kt"); } @TestMetadata("kt8154.kt") public void testKt8154() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/kt8154.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/kt8154.kt"); } @TestMetadata("withDefaultParameters.kt") public void testWithDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/delegation/withDefaultParameters.kt"); } } @@ -9820,56 +7105,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DestructuringDeclInLambdaParam extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDestructuringDeclInLambdaParam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/destructuringDeclInLambdaParam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("extensionComponents.kt") public void testExtensionComponents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/extensionComponents.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/generic.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/inline.kt"); } @TestMetadata("otherParameters.kt") public void testOtherParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/otherParameters.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/simple.kt"); } @TestMetadata("stdlibUsages.kt") public void testStdlibUsages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/stdlibUsages.kt"); } @TestMetadata("underscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/underscoreNames.kt"); } @TestMetadata("withIndexed.kt") public void testWithIndexed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/destructuringDeclInLambdaParam/withIndexed.kt"); } } @@ -9877,6 +7158,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Diagnostics extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -9885,6 +7170,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -9893,14 +7182,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Inference extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInference() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt6176.kt") public void testKt6176() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/inference/kt6176.kt"); } } @@ -9908,6 +7200,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -9916,68 +7212,62 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OnObjects extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOnObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("invokeOnClassObject1.kt") public void testInvokeOnClassObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject1.kt"); } @TestMetadata("invokeOnClassObject2.kt") public void testInvokeOnClassObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObject2.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass1.kt") public void testInvokeOnClassObjectOfNestedClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass1.kt"); } @TestMetadata("invokeOnClassObjectOfNestedClass2.kt") public void testInvokeOnClassObjectOfNestedClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnClassObjectOfNestedClass2.kt"); } @TestMetadata("invokeOnEnum1.kt") public void testInvokeOnEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum1.kt"); } @TestMetadata("invokeOnEnum2.kt") public void testInvokeOnEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnEnum2.kt"); } @TestMetadata("invokeOnImportedEnum1.kt") public void testInvokeOnImportedEnum1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum1.kt"); } @TestMetadata("invokeOnImportedEnum2.kt") public void testInvokeOnImportedEnum2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnImportedEnum2.kt"); } @TestMetadata("invokeOnObject1.kt") public void testInvokeOnObject1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject1.kt"); } @TestMetadata("invokeOnObject2.kt") public void testInvokeOnObject2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/invoke/onObjects/invokeOnObject2.kt"); } } } @@ -9988,224 +7278,191 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { public static class TailRecursion extends AbstractJsCodegenBoxTest { @TestMetadata("defaultArgs.kt") public void ignoreDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgs.kt"); } @TestMetadata("defaultArgsOverridden.kt") public void ignoreDefaultArgsOverridden() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/defaultArgsOverridden.kt"); } @TestMetadata("extensionTailCall.kt") public void ignoreExtensionTailCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/extensionTailCall.kt"); } @TestMetadata("functionWithNoTails.kt") public void ignoreFunctionWithNoTails() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNoTails.kt"); } @TestMetadata("functionWithNonTailRecursions.kt") public void ignoreFunctionWithNonTailRecursions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithNonTailRecursions.kt"); } @TestMetadata("functionWithoutAnnotation.kt") public void ignoreFunctionWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/functionWithoutAnnotation.kt"); } @TestMetadata("infixCall.kt") public void ignoreInfixCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixCall.kt"); } @TestMetadata("infixRecursiveCall.kt") public void ignoreInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/infixRecursiveCall.kt"); } @TestMetadata("insideElvis.kt") public void ignoreInsideElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/insideElvis.kt"); } @TestMetadata("labeledThisReferences.kt") public void ignoreLabeledThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/labeledThisReferences.kt"); } @TestMetadata("loops.kt") public void ignoreLoops() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/loops.kt"); } @TestMetadata("multilevelBlocks.kt") public void ignoreMultilevelBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/multilevelBlocks.kt"); } @TestMetadata("realIteratorFoldl.kt") public void ignoreRealIteratorFoldl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realIteratorFoldl.kt"); } @TestMetadata("realStringEscape.kt") public void ignoreRealStringEscape() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringEscape.kt"); } @TestMetadata("realStringRepeat.kt") public void ignoreRealStringRepeat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/realStringRepeat.kt"); } @TestMetadata("recursiveCallInLambda.kt") public void ignoreRecursiveCallInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLambda.kt"); } @TestMetadata("recursiveCallInLocalFunction.kt") public void ignoreRecursiveCallInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveCallInLocalFunction.kt"); } @TestMetadata("recursiveInnerFunction.kt") public void ignoreRecursiveInnerFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/recursiveInnerFunction.kt"); } @TestMetadata("returnIf.kt") public void ignoreReturnIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnIf.kt"); } @TestMetadata("returnInCatch.kt") public void ignoreReturnInCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInCatch.kt"); } @TestMetadata("returnInFinally.kt") public void ignoreReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInFinally.kt"); } @TestMetadata("returnInIfInFinally.kt") public void ignoreReturnInIfInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInIfInFinally.kt"); } @TestMetadata("returnInParentheses.kt") public void ignoreReturnInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInParentheses.kt"); } @TestMetadata("returnInTry.kt") public void ignoreReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/returnInTry.kt"); } @TestMetadata("simpleBlock.kt") public void ignoreSimpleBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleBlock.kt"); } @TestMetadata("simpleReturn.kt") public void ignoreSimpleReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturn.kt"); } @TestMetadata("simpleReturnWithElse.kt") public void ignoreSimpleReturnWithElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/simpleReturnWithElse.kt"); } @TestMetadata("sum.kt") public void ignoreSum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/sum.kt"); } @TestMetadata("tailCallInBlockInParentheses.kt") public void ignoreTailCallInBlockInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInBlockInParentheses.kt"); } @TestMetadata("tailCallInParentheses.kt") public void ignoreTailCallInParentheses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailCallInParentheses.kt"); } @TestMetadata("tailRecursionInFinally.kt") public void ignoreTailRecursionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/tailRecursionInFinally.kt"); } @TestMetadata("thisReferences.kt") public void ignoreThisReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/thisReferences.kt"); } @TestMetadata("unitBlocks.kt") public void ignoreUnitBlocks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/unitBlocks.kt"); } @TestMetadata("whenWithCondition.kt") public void ignoreWhenWithCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithCondition.kt"); } @TestMetadata("whenWithInRange.kt") public void ignoreWhenWithInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithInRange.kt"); } @TestMetadata("whenWithIs.kt") public void ignoreWhenWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithIs.kt"); } @TestMetadata("whenWithoutCondition.kt") public void ignoreWhenWithoutCondition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/functions/tailRecursion/whenWithoutCondition.kt"); + } + + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); } public void testAllFilesPresentInTailRecursion() throws Exception { @@ -10218,14 +7475,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/diagnostics/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt4172.kt") public void testKt4172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/diagnostics/vararg/kt4172.kt"); } } } @@ -10234,32 +7494,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Elvis extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInElvis() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/elvis"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/genericNull.kt"); } @TestMetadata("kt6694ExactAnnotationForElvis.kt") public void testKt6694ExactAnnotationForElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/kt6694ExactAnnotationForElvis.kt"); } @TestMetadata("nullNullOk.kt") public void testNullNullOk() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/nullNullOk.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/nullNullOk.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/elvis/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/elvis/primitive.kt"); } } @@ -10267,16 +7527,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enum extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractMethodInEnum.kt") public void testAbstractMethodInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractMethodInEnum.kt"); } @TestMetadata("abstractNestedClass.kt") public void testAbstractNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/abstractNestedClass.kt"); } public void testAllFilesPresentInEnum() throws Exception { @@ -10285,401 +7547,294 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("asReturnExpression.kt") public void testAsReturnExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/asReturnExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/asReturnExpression.kt"); } @TestMetadata("classForEnumEntry.kt") public void testClassForEnumEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/enum/classForEnumEntry.kt"); } @TestMetadata("companionObjectInEnum.kt") public void testCompanionObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/companionObjectInEnum.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass.kt") public void testDeepInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass.kt"); } @TestMetadata("deepInnerClassInEnumEntryClass2.kt") public void testDeepInnerClassInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/deepInnerClassInEnumEntryClass2.kt"); } @TestMetadata("emptyConstructor.kt") public void testEmptyConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyConstructor.kt"); } @TestMetadata("emptyEnumValuesValueOf.kt") public void testEmptyEnumValuesValueOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/emptyEnumValuesValueOf.kt"); } @TestMetadata("enumCompanionInit.kt") public void testEnumCompanionInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumCompanionInit.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor1.kt") public void testEnumEntryReferenceFromInnerClassConstructor1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor1.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor2.kt") public void testEnumEntryReferenceFromInnerClassConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor2.kt"); } @TestMetadata("enumEntryReferenceFromInnerClassConstructor3.kt") public void testEnumEntryReferenceFromInnerClassConstructor3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumEntryReferenceFromInnerClassConstructor3.kt"); } @TestMetadata("enumInheritedFromTrait.kt") public void testEnumInheritedFromTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumInheritedFromTrait.kt"); } @TestMetadata("enumShort.kt") public void testEnumShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumShort.kt"); } @TestMetadata("enumWithLambdaParameter.kt") public void testEnumWithLambdaParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/enumWithLambdaParameter.kt"); } @TestMetadata("inPackage.kt") public void testInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inPackage.kt"); } @TestMetadata("inclassobj.kt") public void testInclassobj() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inclassobj.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inclassobj.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/inner.kt"); } @TestMetadata("innerClassInEnumEntryClass.kt") public void testInnerClassInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass.kt") public void testInnerClassMethodInEnumEntryClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass.kt"); } @TestMetadata("innerClassMethodInEnumEntryClass2.kt") public void testInnerClassMethodInEnumEntryClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerClassMethodInEnumEntryClass2.kt"); } @TestMetadata("innerWithExistingClassObject.kt") public void testInnerWithExistingClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt"); } @TestMetadata("kt1119.kt") public void testKt1119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt1119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt1119.kt"); } @TestMetadata("kt18731.kt") public void testKt18731() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt18731.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt18731.kt"); } @TestMetadata("kt20651.kt") public void testKt20651() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651.kt"); } @TestMetadata("kt20651_inlineLambda.kt") public void testKt20651_inlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651_inlineLambda.kt"); } @TestMetadata("kt20651a.kt") public void testKt20651a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651a.kt"); } @TestMetadata("kt20651b.kt") public void testKt20651b() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt20651b.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt20651b.kt"); } @TestMetadata("kt2350.kt") public void testKt2350() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt2350.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt2350.kt"); } @TestMetadata("kt7257.kt") public void testKt7257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257.kt"); } @TestMetadata("kt7257_anonObjectInit.kt") public void testKt7257_anonObjectInit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectInit.kt"); } @TestMetadata("kt7257_anonObjectMethod.kt") public void testKt7257_anonObjectMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_anonObjectMethod.kt"); } @TestMetadata("kt7257_boundReference1.kt") public void testKt7257_boundReference1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference1.kt"); } @TestMetadata("kt7257_boundReference2.kt") public void testKt7257_boundReference2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReference2.kt"); } @TestMetadata("kt7257_boundReferenceWithImplicitReceiver.kt") public void testKt7257_boundReferenceWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_boundReferenceWithImplicitReceiver.kt"); } @TestMetadata("kt7257_explicitReceiver.kt") public void testKt7257_explicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_explicitReceiver.kt"); } @TestMetadata("kt7257_fullyQualifiedReceiver.kt") public void testKt7257_fullyQualifiedReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_fullyQualifiedReceiver.kt"); } @TestMetadata("kt7257_namedLocalFun.kt") public void testKt7257_namedLocalFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_namedLocalFun.kt"); } @TestMetadata("kt7257_notInline.kt") public void testKt7257_notInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt7257_notInline.kt"); } @TestMetadata("kt9711.kt") public void testKt9711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/kt9711.kt"); } @TestMetadata("kt9711_2.kt") public void testKt9711_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/kt9711_2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/enum/kt9711_2.kt"); } @TestMetadata("manyDefaultParameters.kt") public void testManyDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/manyDefaultParameters.kt"); } @TestMetadata("modifierFlags.kt") public void testModifierFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/modifierFlags.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/enum/modifierFlags.kt"); } @TestMetadata("noClassForSimpleEnum.kt") public void testNoClassForSimpleEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/enum/noClassForSimpleEnum.kt"); } @TestMetadata("objectInEnum.kt") public void testObjectInEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/objectInEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/objectInEnum.kt"); } @TestMetadata("ordinal.kt") public void testOrdinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/ordinal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/ordinal.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/simple.kt"); } @TestMetadata("sortEnumEntries.kt") public void testSortEnumEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/sortEnumEntries.kt"); } @TestMetadata("superCallInEnumLiteral.kt") public void testSuperCallInEnumLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/superCallInEnumLiteral.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/toString.kt"); } @TestMetadata("valueof.kt") public void testValueof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/valueof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/valueof.kt"); } @TestMetadata("compiler/testData/codegen/box/enum/defaultCtor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultCtor extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDefaultCtor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/enum/defaultCtor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constructorWithDefaultArguments.kt") public void testConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithDefaultArguments.kt"); } @TestMetadata("constructorWithVararg.kt") public void testConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/constructorWithVararg.kt"); } @TestMetadata("entryClassConstructorWithDefaultArguments.kt") public void testEntryClassConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithDefaultArguments.kt"); } @TestMetadata("entryClassConstructorWithVarargs.kt") public void testEntryClassConstructorWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/enum/defaultCtor/entryClassConstructorWithVarargs.kt"); } @TestMetadata("secondaryConstructorWithDefaultArguments.kt") public void testSecondaryConstructorWithDefaultArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithDefaultArguments.kt"); } @TestMetadata("secondaryConstructorWithVararg.kt") public void testSecondaryConstructorWithVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/enum/defaultCtor/secondaryConstructorWithVararg.kt"); } } } @@ -10688,252 +7843,87 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Evaluate extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEvaluate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/evaluate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("char.kt") public void testChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/char.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/char.kt"); } @TestMetadata("divide.kt") public void testDivide() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/divide.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/divide.kt"); } @TestMetadata("intrinsics.kt") public void testIntrinsics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/intrinsics.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/intrinsics.kt"); } @TestMetadata("kt9443.kt") public void testKt9443() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/kt9443.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/evaluate/kt9443.kt"); } @TestMetadata("maxValue.kt") public void testMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/maxValue.kt"); } @TestMetadata("maxValueByte.kt") public void testMaxValueByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/maxValueByte.kt"); } @TestMetadata("maxValueInt.kt") public void testMaxValueInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/maxValueInt.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/minus.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/mod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/mod.kt"); } @TestMetadata("multiply.kt") public void testMultiply() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/multiply.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/multiply.kt"); } @TestMetadata("parenthesized.kt") public void testParenthesized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/parenthesized.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/parenthesized.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/plus.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/plus.kt"); } @TestMetadata("simpleCallBinary.kt") public void testSimpleCallBinary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/simpleCallBinary.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/evaluate/unaryPlus.kt"); } } @@ -10941,20 +7931,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExclExcl extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExclExcl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/exclExcl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/genericNull.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/exclExcl/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/exclExcl/primitive.kt"); } } @@ -10962,168 +7954,127 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionFunctions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExtensionFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/extensionFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("executionOrder.kt") public void testExecutionOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/executionOrder.kt"); } @TestMetadata("kt1061.kt") public void testKt1061() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1061.kt"); } @TestMetadata("kt1249.kt") public void testKt1249() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1249.kt"); } @TestMetadata("kt1290.kt") public void testKt1290() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1290.kt"); } @TestMetadata("kt13312.kt") public void testKt13312() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt13312.kt"); } @TestMetadata("kt1776.kt") public void testKt1776() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1776.kt"); } @TestMetadata("kt1953.kt") public void testKt1953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953.kt"); } @TestMetadata("kt1953_class.kt") public void testKt1953_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt1953_class.kt"); } @TestMetadata("kt3285.kt") public void testKt3285() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3285.kt"); } @TestMetadata("kt3298.kt") public void testKt3298() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3298.kt"); } @TestMetadata("kt3646.kt") public void testKt3646() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3646.kt"); } @TestMetadata("kt3969.kt") public void testKt3969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt3969.kt"); } @TestMetadata("kt4228.kt") public void testKt4228() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt4228.kt"); } @TestMetadata("kt475.kt") public void testKt475() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt475.kt"); } @TestMetadata("kt5467.kt") public void testKt5467() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt5467.kt"); } @TestMetadata("kt606.kt") public void testKt606() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/extensionFunctions/kt606.kt"); } @TestMetadata("kt865.kt") public void testKt865() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt"); } @TestMetadata("nested2.kt") public void testNested2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt"); } @TestMetadata("shared.kt") public void testShared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/shared.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/shared.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/simple.kt"); } @TestMetadata("thisMethodInObjectLiteral.kt") public void testThisMethodInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/thisMethodInObjectLiteral.kt"); } @TestMetadata("virtual.kt") public void testVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionFunctions/virtual.kt"); } @TestMetadata("whenFail.kt") public void testWhenFail() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/extensionFunctions/whenFail.kt"); } } @@ -11131,10 +8082,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExtensionProperties extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessorForPrivateSetter.kt") public void testAccessorForPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt"); } public void testAllFilesPresentInExtensionProperties() throws Exception { @@ -11143,97 +8097,72 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("genericValForPrimitiveType.kt") public void testGenericValForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericValForPrimitiveType.kt"); } @TestMetadata("genericValMultipleUpperBounds.kt") public void testGenericValMultipleUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/extensionProperties/genericValMultipleUpperBounds.kt"); } @TestMetadata("genericVarForPrimitiveType.kt") public void testGenericVarForPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/genericVarForPrimitiveType.kt"); } @TestMetadata("inClass.kt") public void testInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClass.kt"); } @TestMetadata("inClassLongTypeInReceiver.kt") public void testInClassLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassLongTypeInReceiver.kt"); } @TestMetadata("inClassWithGetter.kt") public void testInClassWithGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithGetter.kt"); } @TestMetadata("inClassWithPrivateGetter.kt") public void testInClassWithPrivateGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateGetter.kt"); } @TestMetadata("inClassWithPrivateSetter.kt") public void testInClassWithPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt"); } @TestMetadata("inClassWithSetter.kt") public void testInClassWithSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt"); } @TestMetadata("kt9897.kt") public void testKt9897() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897.kt"); } @TestMetadata("kt9897_topLevel.kt") public void testKt9897_topLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/kt9897_topLevel.kt"); } @TestMetadata("nonAbstractInInterface.kt") public void testNonAbstractInInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/nonAbstractInInterface.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevel.kt"); } @TestMetadata("topLevelLongTypeInReceiver.kt") public void testTopLevelLongTypeInReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/extensionProperties/topLevelLongTypeInReceiver.kt"); } } @@ -11241,59 +8170,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class External extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExternal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/external"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("jvmStaticExternal.kt") public void testJvmStaticExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/external/jvmStaticExternal.kt"); } @TestMetadata("jvmStaticExternalPrivate.kt") public void testJvmStaticExternalPrivate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt"); } @TestMetadata("withDefaultArg.kt") public void testWithDefaultArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/external/withDefaultArg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/external/withDefaultArg.kt"); } } @@ -11301,32 +8198,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverride extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFakeOverride() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fakeOverride"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("diamondFunction.kt") public void testDiamondFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/diamondFunction.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/function.kt"); } @TestMetadata("propertyGetter.kt") public void testPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertyGetter.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fakeOverride/propertySetter.kt"); } } @@ -11334,26 +8231,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FieldRename extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFieldRename() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fieldRename"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constructorAndClassObject.kt") public void testConstructorAndClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/constructorAndClassObject.kt"); } @TestMetadata("delegates.kt") public void testDelegates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/delegates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/delegates.kt"); } @TestMetadata("genericPropertyWithItself.kt") public void testGenericPropertyWithItself() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/fieldRename/genericPropertyWithItself.kt"); } } @@ -11361,74 +8259,67 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Finally extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/finally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("finallyAndFinally.kt") public void testFinallyAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/finallyAndFinally.kt"); } @TestMetadata("kt3549.kt") public void testKt3549() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3549.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3549.kt"); } @TestMetadata("kt3706.kt") public void testKt3706() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3706.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3706.kt"); } @TestMetadata("kt3867.kt") public void testKt3867() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3867.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3867.kt"); } @TestMetadata("kt3874.kt") public void testKt3874() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3874.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3874.kt"); } @TestMetadata("kt3894.kt") public void testKt3894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt3894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt3894.kt"); } @TestMetadata("kt4134.kt") public void testKt4134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/kt4134.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/kt4134.kt"); } @TestMetadata("loopAndFinally.kt") public void testLoopAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/loopAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/loopAndFinally.kt"); } @TestMetadata("notChainCatch.kt") public void testNotChainCatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/notChainCatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/notChainCatch.kt"); } @TestMetadata("tryFinally.kt") public void testTryFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryFinally.kt"); } @TestMetadata("tryLoopTry.kt") public void testTryLoopTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/finally/tryLoopTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/finally/tryLoopTry.kt"); } } @@ -11436,6 +8327,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FullJdk extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFullJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -11444,59 +8339,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Native extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNative() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/native"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("nativePropertyAccessors.kt") public void testNativePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/fullJdk/native/nativePropertyAccessors.kt"); } @TestMetadata("simpleNative.kt") public void testSimpleNative() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/fullJdk/native/simpleNative.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/fullJdk/native/topLevel.kt"); } } @@ -11504,42 +8367,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/fullJdk/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt15112.kt") public void testKt15112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt15112.kt"); } @TestMetadata("kt1770.kt") public void testKt1770() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/fullJdk/regressions/kt1770.kt"); } } } @@ -11548,364 +8391,259 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("coerceVoidToArray.kt") public void testCoerceVoidToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToArray.kt"); } @TestMetadata("coerceVoidToObject.kt") public void testCoerceVoidToObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/coerceVoidToObject.kt"); } @TestMetadata("dataLocalVariable.kt") public void testDataLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/dataLocalVariable.kt"); } @TestMetadata("defaultargs.kt") public void testDefaultargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs.kt"); } @TestMetadata("defaultargs1.kt") public void testDefaultargs1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs1.kt"); } @TestMetadata("defaultargs2.kt") public void testDefaultargs2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs2.kt"); } @TestMetadata("defaultargs3.kt") public void testDefaultargs3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs3.kt"); } @TestMetadata("defaultargs4.kt") public void testDefaultargs4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs4.kt"); } @TestMetadata("defaultargs5.kt") public void testDefaultargs5() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs5.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs5.kt"); } @TestMetadata("defaultargs6.kt") public void testDefaultargs6() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs6.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs6.kt"); } @TestMetadata("defaultargs7.kt") public void testDefaultargs7() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/defaultargs7.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/defaultargs7.kt"); } @TestMetadata("ea33909.kt") public void testEa33909() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/ea33909.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/ea33909.kt"); } @TestMetadata("fakeDescriptorWithSeveralOverridenOne.kt") public void testFakeDescriptorWithSeveralOverridenOne() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/fakeDescriptorWithSeveralOverridenOne.kt"); } @TestMetadata("functionNtoString.kt") public void testFunctionNtoString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/functionNtoString.kt"); } @TestMetadata("functionNtoStringGeneric.kt") public void testFunctionNtoStringGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/functionNtoStringGeneric.kt"); } @TestMetadata("functionNtoStringNoReflect.kt") public void testFunctionNtoStringNoReflect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/functionNtoStringNoReflect.kt"); } @TestMetadata("infixRecursiveCall.kt") public void testInfixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/infixRecursiveCall.kt"); } @TestMetadata("kt1038.kt") public void testKt1038() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1038.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1038.kt"); } @TestMetadata("kt1199.kt") public void testKt1199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1199.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/kt1199.kt"); } @TestMetadata("kt1413.kt") public void testKt1413() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1413.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1413.kt"); } @TestMetadata("kt1649_1.kt") public void testKt1649_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_1.kt"); } @TestMetadata("kt1649_2.kt") public void testKt1649_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1649_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt1649_2.kt"); } @TestMetadata("kt1739.kt") public void testKt1739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt1739.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/kt1739.kt"); } @TestMetadata("kt2270.kt") public void testKt2270() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2270.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2270.kt"); } @TestMetadata("kt2271.kt") public void testKt2271() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2271.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2271.kt"); } @TestMetadata("kt2280.kt") public void testKt2280() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2280.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2280.kt"); } @TestMetadata("kt2481.kt") public void testKt2481() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2481.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2481.kt"); } @TestMetadata("kt2716.kt") public void testKt2716() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2716.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2716.kt"); } @TestMetadata("kt2739.kt") public void testKt2739() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2739.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2739.kt"); } @TestMetadata("kt2929.kt") public void testKt2929() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt2929.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt2929.kt"); } @TestMetadata("kt3214.kt") public void testKt3214() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3214.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3214.kt"); } @TestMetadata("kt3313.kt") public void testKt3313() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3313.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3313.kt"); } @TestMetadata("kt3573.kt") public void testKt3573() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3573.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3573.kt"); } @TestMetadata("kt3724.kt") public void testKt3724() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt3724.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt3724.kt"); } @TestMetadata("kt395.kt") public void testKt395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt395.kt"); } @TestMetadata("kt785.kt") public void testKt785() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt785.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt785.kt"); } @TestMetadata("kt873.kt") public void testKt873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/kt873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/kt873.kt"); } @TestMetadata("localFunction.kt") public void testLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunction.kt"); } @TestMetadata("localReturnInsideFunctionExpression.kt") public void testLocalReturnInsideFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localReturnInsideFunctionExpression.kt"); } @TestMetadata("nothisnoclosure.kt") public void testNothisnoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/nothisnoclosure.kt"); } @TestMetadata("prefixRecursiveCall.kt") public void testPrefixRecursiveCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/prefixRecursiveCall.kt"); } @TestMetadata("recursiveCompareTo.kt") public void testRecursiveCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveCompareTo.kt"); } @TestMetadata("recursiveIncrementCall.kt") public void testRecursiveIncrementCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/recursiveIncrementCall.kt"); } @TestMetadata("compiler/testData/codegen/box/functions/functionExpression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FunctionExpression extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFunctionExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/functionExpression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("functionExpression.kt") public void testFunctionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpression.kt"); } @TestMetadata("functionExpressionWithThisReference.kt") public void testFunctionExpressionWithThisReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionExpressionWithThisReference.kt"); } @TestMetadata("functionLiteralExpression.kt") public void testFunctionLiteralExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/functionLiteralExpression.kt"); } @TestMetadata("underscoreParameters.kt") public void testUnderscoreParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/functionExpression/underscoreParameters.kt"); } } @@ -11913,131 +8651,87 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/invoke"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("castFunctionToExtension.kt") public void testCastFunctionToExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/castFunctionToExtension.kt"); } @TestMetadata("extensionInvokeOnExpr.kt") public void testExtensionInvokeOnExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/extensionInvokeOnExpr.kt"); } @TestMetadata("implicitInvokeInCompanionObjectWithFunctionalArgument.kt") public void testImplicitInvokeInCompanionObjectWithFunctionalArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeInCompanionObjectWithFunctionalArgument.kt"); } @TestMetadata("implicitInvokeWithFunctionLiteralArgument.kt") public void testImplicitInvokeWithFunctionLiteralArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/implicitInvokeWithFunctionLiteralArgument.kt"); } @TestMetadata("invoke.kt") public void testInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invoke.kt"); } @TestMetadata("invokeOnExprByConvention.kt") public void testInvokeOnExprByConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnExprByConvention.kt"); } @TestMetadata("invokeOnSyntheticProperty.kt") public void testInvokeOnSyntheticProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/invoke/invokeOnSyntheticProperty.kt"); } @TestMetadata("kt3189.kt") public void testKt3189() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3189.kt"); } @TestMetadata("kt3190.kt") public void testKt3190() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/invoke/kt3190.kt"); } @TestMetadata("kt3297.kt") public void testKt3297() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3297.kt"); } @TestMetadata("kt3450getAndInvoke.kt") public void testKt3450getAndInvoke() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3450getAndInvoke.kt"); } @TestMetadata("kt3631invokeOnString.kt") public void testKt3631invokeOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3631invokeOnString.kt"); } @TestMetadata("kt3772.kt") public void testKt3772() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3772.kt"); } @TestMetadata("kt3821invokeOnThis.kt") public void testKt3821invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/invoke/kt3821invokeOnThis.kt"); } @TestMetadata("kt3822invokeOnThis.kt") public void testKt3822invokeOnThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/invoke/kt3822invokeOnThis.kt"); } } @@ -12045,157 +8739,127 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalFunctions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocalFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/functions/localFunctions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callInlineLocalInLambda.kt") public void testCallInlineLocalInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/callInlineLocalInLambda.kt"); } @TestMetadata("definedWithinLambda.kt") public void testDefinedWithinLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambda.kt"); } @TestMetadata("definedWithinLambdaInnerUsage1.kt") public void testDefinedWithinLambdaInnerUsage1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage1.kt"); } @TestMetadata("definedWithinLambdaInnerUsage2.kt") public void testDefinedWithinLambdaInnerUsage2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/definedWithinLambdaInnerUsage2.kt"); } @TestMetadata("kt2895.kt") public void testKt2895() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt2895.kt"); } @TestMetadata("kt3308.kt") public void testKt3308() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3308.kt"); } @TestMetadata("kt3978.kt") public void testKt3978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt3978.kt"); } @TestMetadata("kt4119.kt") public void testKt4119() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119.kt"); } @TestMetadata("kt4119_2.kt") public void testKt4119_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4119_2.kt"); } @TestMetadata("kt4514.kt") public void testKt4514() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4514.kt"); } @TestMetadata("kt4777.kt") public void testKt4777() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4777.kt"); } @TestMetadata("kt4783.kt") public void testKt4783() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4783.kt"); } @TestMetadata("kt4784.kt") public void testKt4784() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4784.kt"); } @TestMetadata("kt4989.kt") public void testKt4989() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/kt4989.kt"); } @TestMetadata("localExtensionOnNullableParameter.kt") public void testLocalExtensionOnNullableParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localExtensionOnNullableParameter.kt"); } @TestMetadata("localFunctionInConstructor.kt") public void testLocalFunctionInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionInConstructor.kt"); } @TestMetadata("localFunctionVsLocalVariable.kt") public void testLocalFunctionVsLocalVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/localFunctionVsLocalVariable.kt"); } @TestMetadata("overloadedLocalFunWithoutClosure.kt") public void testOverloadedLocalFunWithoutClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunWithoutClosure.kt"); } @TestMetadata("overloadedLocalFunction.kt") public void testOverloadedLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction.kt"); } @TestMetadata("overloadedLocalFunction1.kt") public void testOverloadedLocalFunction1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction1.kt"); } @TestMetadata("overloadedLocalFunction2.kt") public void testOverloadedLocalFunction2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction2.kt"); } @TestMetadata("overloadedLocalFunction3.kt") public void testOverloadedLocalFunction3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/overloadedLocalFunction3.kt"); } @TestMetadata("parameterAsDefaultValue.kt") public void testParameterAsDefaultValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/functions/localFunctions/parameterAsDefaultValue.kt"); } } } @@ -12204,110 +8868,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class HashPMap extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInHashPMap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/hashPMap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("empty.kt") public void testEmpty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/empty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/hashPMap/empty.kt"); } @TestMetadata("manyNumbers.kt") public void testManyNumbers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/hashPMap/manyNumbers.kt"); } @TestMetadata("rewriteWithDifferent.kt") public void testRewriteWithDifferent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithDifferent.kt"); } @TestMetadata("rewriteWithEqual.kt") public void testRewriteWithEqual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/hashPMap/rewriteWithEqual.kt"); } @TestMetadata("simplePlusGet.kt") public void testSimplePlusGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusGet.kt"); } @TestMetadata("simplePlusMinus.kt") public void testSimplePlusMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/hashPMap/simplePlusMinus.kt"); } } @@ -12315,338 +8911,287 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ieee754 extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIeee754() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ieee754"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anyToReal.kt") public void testAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/anyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/anyToReal.kt"); } @TestMetadata("asComparableToDouble.kt") public void testAsComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble.kt"); } @TestMetadata("asComparableToDouble_properIeeeComparisons.kt") public void testAsComparableToDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/asComparableToDouble_properIeeeComparisons.kt"); } @TestMetadata("comparableToTWithT_properIeeeComparisons.kt") public void testComparableToTWithT_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableToTWithT_properIeeeComparisons.kt"); } @TestMetadata("comparableTypeCast.kt") public void testComparableTypeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/comparableTypeCast.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/dataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/dataClass.kt"); } @TestMetadata("differentTypesComparison.kt") public void testDifferentTypesComparison() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/differentTypesComparison.kt"); } @TestMetadata("equalsDouble.kt") public void testEqualsDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble.kt"); } @TestMetadata("equalsDouble_properIeeeComparisons.kt") public void testEqualsDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsFloat.kt") public void testEqualsFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat.kt"); } @TestMetadata("equalsFloat_properIeeeComparisons.kt") public void testEqualsFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsFloat_properIeeeComparisons.kt"); } @TestMetadata("equalsNaN.kt") public void testEqualsNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN.kt"); } @TestMetadata("equalsNaN_properIeeeComparisons.kt") public void testEqualsNaN_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNaN_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableDouble.kt") public void testEqualsNullableDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble.kt"); } @TestMetadata("equalsNullableDouble_properIeeeComparisons.kt") public void testEqualsNullableDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableDouble_properIeeeComparisons.kt"); } @TestMetadata("equalsNullableFloat.kt") public void testEqualsNullableFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat.kt"); } @TestMetadata("equalsNullableFloat_properIeeeComparisons.kt") public void testEqualsNullableFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/equalsNullableFloat_properIeeeComparisons.kt"); } @TestMetadata("explicitCompareCall.kt") public void testExplicitCompareCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitCompareCall.kt"); } @TestMetadata("explicitEqualsCall.kt") public void testExplicitEqualsCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/explicitEqualsCall.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/generic.kt"); } @TestMetadata("greaterDouble.kt") public void testGreaterDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble.kt"); } @TestMetadata("greaterDouble_properIeeeComparisons.kt") public void testGreaterDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterDouble_properIeeeComparisons.kt"); } @TestMetadata("greaterFloat.kt") public void testGreaterFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat.kt"); } @TestMetadata("greaterFloat_properIeeeComparisons.kt") public void testGreaterFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/greaterFloat_properIeeeComparisons.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/inline.kt"); } @TestMetadata("lessDouble.kt") public void testLessDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt"); } @TestMetadata("lessDouble_properIeeeComparisons.kt") public void testLessDouble_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt"); } @TestMetadata("lessFloat.kt") public void testLessFloat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat.kt"); } @TestMetadata("lessFloat_properIeeeComparisons.kt") public void testLessFloat_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/lessFloat_properIeeeComparisons.kt"); } @TestMetadata("nullableAnyToReal.kt") public void testNullableAnyToReal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableAnyToReal.kt"); } @TestMetadata("nullableDoubleEquals.kt") public void testNullableDoubleEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals.kt"); } @TestMetadata("nullableDoubleEquals10.kt") public void testNullableDoubleEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEquals10.kt"); } @TestMetadata("nullableDoubleEqualsLV13.kt") public void testNullableDoubleEqualsLV13() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleEqualsLV13.kt"); } @TestMetadata("nullableDoubleNotEquals.kt") public void testNullableDoubleNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals.kt"); } @TestMetadata("nullableDoubleNotEquals10.kt") public void testNullableDoubleNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableDoubleNotEquals10.kt"); } @TestMetadata("nullableFloatEquals.kt") public void testNullableFloatEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals.kt"); } @TestMetadata("nullableFloatEquals10.kt") public void testNullableFloatEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatEquals10.kt"); } @TestMetadata("nullableFloatNotEquals.kt") public void testNullableFloatNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals.kt"); } @TestMetadata("nullableFloatNotEquals10.kt") public void testNullableFloatNotEquals10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableFloatNotEquals10.kt"); } @TestMetadata("nullableIntEquals.kt") public void testNullableIntEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/nullableIntEquals.kt"); } @TestMetadata("safeCall.kt") public void testSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/safeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/safeCall.kt"); } @TestMetadata("smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt") public void testSmartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastOnWhenSubjectAfterCheckInBranch_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes.kt") public void testSmartCastToDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion.kt") public void testSmartCastToDifferentTypesWithNumericPromotion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion.kt"); } @TestMetadata("smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt") public void testSmartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypesWithNumericPromotion_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDifferentTypes_properIeeeComparisons.kt") public void testSmartCastToDifferentTypes_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDifferentTypes_properIeeeComparisons.kt"); } @TestMetadata("smartCastToDoubleAndComparableToDouble.kt") public void testSmartCastToDoubleAndComparableToDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/smartCastToDoubleAndComparableToDouble.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when.kt"); } @TestMetadata("when10.kt") public void testWhen10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10.kt"); } @TestMetadata("when10_properIeeeComparisons.kt") public void testWhen10_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when10_properIeeeComparisons.kt"); } @TestMetadata("whenNoSubject.kt") public void testWhenNoSubject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject.kt"); } @TestMetadata("whenNoSubject_properIeeeComparisons.kt") public void testWhenNoSubject_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNoSubject_properIeeeComparisons.kt"); } @TestMetadata("whenNullableSmartCast.kt") public void testWhenNullableSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast.kt"); } @TestMetadata("whenNullableSmartCast10.kt") public void testWhenNullableSmartCast10() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/whenNullableSmartCast10.kt"); } @TestMetadata("when_properIeeeComparisons.kt") public void testWhen_properIeeeComparisons() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ieee754/when_properIeeeComparisons.kt"); } } @@ -12654,140 +9199,122 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Increment extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIncrement() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/increment"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayElement.kt") public void testArrayElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/arrayElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/arrayElement.kt"); } @TestMetadata("assignPlusOnSmartCast.kt") public void testAssignPlusOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/assignPlusOnSmartCast.kt"); } @TestMetadata("augmentedAssignmentWithComplexRhs.kt") public void testAugmentedAssignmentWithComplexRhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/augmentedAssignmentWithComplexRhs.kt"); } @TestMetadata("classNaryGetSet.kt") public void testClassNaryGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classNaryGetSet.kt"); } @TestMetadata("classWithGetSet.kt") public void testClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/classWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/classWithGetSet.kt"); } @TestMetadata("extOnLong.kt") public void testExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/extOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/extOnLong.kt"); } @TestMetadata("genericClassWithGetSet.kt") public void testGenericClassWithGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/genericClassWithGetSet.kt"); } @TestMetadata("memberExtOnLong.kt") public void testMemberExtOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/memberExtOnLong.kt"); } @TestMetadata("mutableListElement.kt") public void testMutableListElement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/mutableListElement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/mutableListElement.kt"); } @TestMetadata("nullable.kt") public void testNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/nullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/nullable.kt"); } @TestMetadata("postfixIncrementDoubleSmartCast.kt") public void testPostfixIncrementDoubleSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementDoubleSmartCast.kt"); } @TestMetadata("postfixIncrementOnClass.kt") public void testPostfixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClass.kt"); } @TestMetadata("postfixIncrementOnClassSmartCast.kt") public void testPostfixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnClassSmartCast.kt"); } @TestMetadata("postfixIncrementOnShortSmartCast.kt") public void testPostfixIncrementOnShortSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt"); } @TestMetadata("postfixIncrementOnSmartCast.kt") public void testPostfixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixIncrementOnSmartCast.kt"); } @TestMetadata("postfixNullableClassIncrement.kt") public void testPostfixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableClassIncrement.kt"); } @TestMetadata("postfixNullableIncrement.kt") public void testPostfixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/postfixNullableIncrement.kt"); } @TestMetadata("prefixIncrementOnClass.kt") public void testPrefixIncrementOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClass.kt"); } @TestMetadata("prefixIncrementOnClassSmartCast.kt") public void testPrefixIncrementOnClassSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnClassSmartCast.kt"); } @TestMetadata("prefixIncrementOnSmartCast.kt") public void testPrefixIncrementOnSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt"); } @TestMetadata("prefixNullableClassIncrement.kt") public void testPrefixNullableClassIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableClassIncrement.kt"); } @TestMetadata("prefixNullableIncrement.kt") public void testPrefixNullableIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/increment/prefixNullableIncrement.kt"); } } @@ -12795,176 +9322,152 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InlineClasses extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInlineClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt"); } @TestMetadata("boxUnboxOfInlineClassForCapturedVars.kt") public void testBoxUnboxOfInlineClassForCapturedVars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt"); } @TestMetadata("callComputablePropertyInsideInlineClass.kt") public void testCallComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt"); } @TestMetadata("checkBoxUnboxOfArgumentsOnInlinedFunctions.kt") public void testCheckBoxUnboxOfArgumentsOnInlinedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxUnboxOfArgumentsOnInlinedFunctions.kt"); } @TestMetadata("checkBoxingAfterAssertionOperator.kt") public void testCheckBoxingAfterAssertionOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperator.kt"); } @TestMetadata("checkBoxingForNonLocalAndLabeledReturns.kt") public void testCheckBoxingForNonLocalAndLabeledReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingForNonLocalAndLabeledReturns.kt"); } @TestMetadata("checkBoxingFromReturnTypeForInlineClasses.kt") public void testCheckBoxingFromReturnTypeForInlineClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingFromReturnTypeForInlineClasses.kt"); } @TestMetadata("checkBoxingOnFunctionCalls.kt") public void testCheckBoxingOnFunctionCalls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnFunctionCalls.kt"); } @TestMetadata("checkBoxingOnLocalVariableAssignments.kt") public void testCheckBoxingOnLocalVariableAssignments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignments.kt"); } @TestMetadata("checkCallingMembersInsideInlineClass.kt") public void testCheckCallingMembersInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCallingMembersInsideInlineClass.kt"); } @TestMetadata("checkCastToInlineClass.kt") public void testCheckCastToInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkCastToInlineClass.kt"); } @TestMetadata("checkForInstanceOfInlineClass.kt") public void testCheckForInstanceOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkForInstanceOfInlineClass.kt"); } @TestMetadata("checkLambdaWithInlineClassesInFunctionalType.kt") public void testCheckLambdaWithInlineClassesInFunctionalType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalType.kt"); } @TestMetadata("checkUnboxingResultFromTypeVariable.kt") public void testCheckUnboxingResultFromTypeVariable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt"); } @TestMetadata("computablePropertyInsideInlineClass.kt") public void testComputablePropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt"); } @TestMetadata("createInlineClassInArgumentPosition.kt") public void testCreateInlineClassInArgumentPosition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPosition.kt"); } @TestMetadata("emptyConstructorForInlineClass.kt") public void testEmptyConstructorForInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/emptyConstructorForInlineClass.kt"); } @TestMetadata("inlineClassAsLastExpressionInInLambda.kt") public void testInlineClassAsLastExpressionInInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/inlineClassAsLastExpressionInInLambda.kt"); } @TestMetadata("noAssertionsOnInlineClassBasedOnNullableType.kt") public void testNoAssertionsOnInlineClassBasedOnNullableType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/noAssertionsOnInlineClassBasedOnNullableType.kt"); } @TestMetadata("passInlineClassAsVararg.kt") public void testPassInlineClassAsVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt"); } @TestMetadata("passInlineClassWithSpreadOperatorToVarargs.kt") public void testPassInlineClassWithSpreadOperatorToVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/passInlineClassWithSpreadOperatorToVarargs.kt"); } @TestMetadata("referToPropertyInCompanionObjectOfInlineClass.kt") public void testReferToPropertyInCompanionObjectOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToPropertyInCompanionObjectOfInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyInsideInlineClass.kt") public void testReferToUnderlyingPropertyInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyInsideInlineClass.kt"); } @TestMetadata("referToUnderlyingPropertyOfInlineClass.kt") public void testReferToUnderlyingPropertyOfInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt"); } @TestMetadata("UIntArraySortExample.kt") public void testUIntArraySortExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/UIntArraySortExample.kt"); } @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt"); } @TestMetadata("useInlineFunctionInsideInlineClass.kt") public void testUseInlineFunctionInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt"); } @TestMetadata("useThisInsideInlineClass.kt") public void testUseThisInsideInlineClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/inlineClasses/useThisInsideInlineClass.kt"); } } @@ -12972,256 +9475,224 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class InnerNested extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInnerNested() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("createNestedClass.kt") public void testCreateNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createNestedClass.kt"); } @TestMetadata("createdNestedInOuterMember.kt") public void testCreatedNestedInOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/createdNestedInOuterMember.kt"); } @TestMetadata("extensionFun.kt") public void testExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionFun.kt"); } @TestMetadata("extensionToNested.kt") public void testExtensionToNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/extensionToNested.kt"); } @TestMetadata("importNestedClass.kt") public void testImportNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/importNestedClass.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerGeneric.kt"); } @TestMetadata("innerLabeledThis.kt") public void testInnerLabeledThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerLabeledThis.kt"); } @TestMetadata("innerSimple.kt") public void testInnerSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/innerSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/innerSimple.kt"); } @TestMetadata("kt3132.kt") public void testKt3132() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3132.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3132.kt"); } @TestMetadata("kt3927.kt") public void testKt3927() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt3927.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt3927.kt"); } @TestMetadata("kt5363.kt") public void testKt5363() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt5363.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt5363.kt"); } @TestMetadata("kt6804.kt") public void testKt6804() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/kt6804.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/kt6804.kt"); } @TestMetadata("nestedClassInObject.kt") public void testNestedClassInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassInObject.kt"); } @TestMetadata("nestedClassObject.kt") public void testNestedClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedClassObject.kt"); } @TestMetadata("nestedEnumConstant.kt") public void testNestedEnumConstant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedEnumConstant.kt"); } @TestMetadata("nestedGeneric.kt") public void testNestedGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedGeneric.kt"); } @TestMetadata("nestedInPackage.kt") public void testNestedInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedInPackage.kt"); } @TestMetadata("nestedObjects.kt") public void testNestedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedObjects.kt"); } @TestMetadata("nestedSimple.kt") public void testNestedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/nestedSimple.kt"); } @TestMetadata("passingOuterRef.kt") public void testPassingOuterRef() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/passingOuterRef.kt"); } @TestMetadata("protectedNestedClass.kt") public void testProtectedNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/protectedNestedClass.kt"); } @TestMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructorCall extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructorCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/innerNested/superConstructorCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("deepInnerHierarchy.kt") public void testDeepInnerHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepInnerHierarchy.kt"); } @TestMetadata("deepLocalHierarchy.kt") public void testDeepLocalHierarchy() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/deepLocalHierarchy.kt"); } @TestMetadata("innerExtendsInnerViaSecondaryConstuctor.kt") public void testInnerExtendsInnerViaSecondaryConstuctor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerViaSecondaryConstuctor.kt"); } @TestMetadata("innerExtendsInnerWithProperOuterCapture.kt") public void testInnerExtendsInnerWithProperOuterCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/innerExtendsInnerWithProperOuterCapture.kt"); } @TestMetadata("kt11833_1.kt") public void testKt11833_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_1.kt"); } @TestMetadata("kt11833_2.kt") public void testKt11833_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/kt11833_2.kt"); } @TestMetadata("localClassOuterDiffersFromInnerOuter.kt") public void testLocalClassOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localClassOuterDiffersFromInnerOuter.kt"); } @TestMetadata("localExtendsInner.kt") public void testLocalExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsInner.kt"); } @TestMetadata("localExtendsLocalWithClosure.kt") public void testLocalExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localExtendsLocalWithClosure.kt"); } @TestMetadata("localWithClosureExtendsLocalWithClosure.kt") public void testLocalWithClosureExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/localWithClosureExtendsLocalWithClosure.kt"); } @TestMetadata("objectExtendsClassDefaultArgument.kt") public void testObjectExtendsClassDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassDefaultArgument.kt"); } @TestMetadata("objectExtendsClassVararg.kt") public void testObjectExtendsClassVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsClassVararg.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInner.kt"); } @TestMetadata("objectExtendsInnerDefaultArgument.kt") public void testObjectExtendsInnerDefaultArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerDefaultArgument.kt"); } @TestMetadata("objectExtendsInnerOfLocalVarargAndDefault.kt") public void testObjectExtendsInnerOfLocalVarargAndDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalVarargAndDefault.kt"); } @TestMetadata("objectExtendsInnerOfLocalWithCapture.kt") public void testObjectExtendsInnerOfLocalWithCapture() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsInnerOfLocalWithCapture.kt"); } @TestMetadata("objectExtendsLocalCaptureInSuperCall.kt") public void testObjectExtendsLocalCaptureInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalCaptureInSuperCall.kt"); } @TestMetadata("objectExtendsLocalWithClosure.kt") public void testObjectExtendsLocalWithClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectExtendsLocalWithClosure.kt"); } @TestMetadata("objectOuterDiffersFromInnerOuter.kt") public void testObjectOuterDiffersFromInnerOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/innerNested/superConstructorCall/objectOuterDiffersFromInnerOuter.kt"); } } } @@ -13230,6 +9701,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Instructions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInstructions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -13238,20 +9713,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Swap extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSwap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/instructions/swap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("swapRefToSharedVarInt.kt") public void testSwapRefToSharedVarInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarInt.kt"); } @TestMetadata("swapRefToSharedVarLong.kt") public void testSwapRefToSharedVarLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/instructions/swap/swapRefToSharedVarLong.kt"); } } } @@ -13260,217 +9737,122 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Intrinsics extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/intrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("charToInt.kt") public void testCharToInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/charToInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/charToInt.kt"); } @TestMetadata("defaultObjectMapping.kt") public void testDefaultObjectMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/defaultObjectMapping.kt"); } @TestMetadata("ea35953.kt") public void testEa35953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/ea35953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/ea35953.kt"); } @TestMetadata("incWithLabel.kt") public void testIncWithLabel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/incWithLabel.kt"); } @TestMetadata("javaObjectType.kt") public void testJavaObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/javaObjectType.kt"); } @TestMetadata("javaPrimitiveType.kt") public void testJavaPrimitiveType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/javaPrimitiveType.kt"); } @TestMetadata("kt10131.kt") public void testKt10131() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131.kt"); } @TestMetadata("kt10131a.kt") public void testKt10131a() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt10131a.kt"); } @TestMetadata("kt12125.kt") public void testKt12125() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125.kt"); } @TestMetadata("kt12125_2.kt") public void testKt12125_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_2.kt"); } @TestMetadata("kt12125_inc.kt") public void testKt12125_inc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc.kt"); } @TestMetadata("kt12125_inc_2.kt") public void testKt12125_inc_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt12125_inc_2.kt"); } @TestMetadata("kt5937.kt") public void testKt5937() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt5937.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/kt5937.kt"); } @TestMetadata("kt8666.kt") public void testKt8666() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/kt8666.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/kt8666.kt"); } @TestMetadata("longRangeWithExplicitDot.kt") public void testLongRangeWithExplicitDot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/longRangeWithExplicitDot.kt"); } @TestMetadata("prefixIncDec.kt") public void testPrefixIncDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/prefixIncDec.kt"); } @TestMetadata("rangeFromCollection.kt") public void testRangeFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/rangeFromCollection.kt"); } @TestMetadata("stringFromCollection.kt") public void testStringFromCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/stringFromCollection.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/throwable.kt"); } @TestMetadata("throwableCallableReference.kt") public void testThrowableCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/throwableCallableReference.kt"); } @TestMetadata("throwableParamOrder.kt") public void testThrowableParamOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt"); } @TestMetadata("tostring.kt") public void testTostring() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/intrinsics/tostring.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/intrinsics/tostring.kt"); } } @@ -13478,84 +9860,44 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JavaInterop extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJavaInterop() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("lambdaInstanceOf.kt") public void testLambdaInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/lambdaInstanceOf.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/generics") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generics extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInGenerics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/generics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("allWildcardsOnClass.kt") public void testAllWildcardsOnClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/generics/allWildcardsOnClass.kt"); } @TestMetadata("covariantOverrideWithDeclarationSiteProjection.kt") public void testCovariantOverrideWithDeclarationSiteProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/generics/covariantOverrideWithDeclarationSiteProjection.kt"); } @TestMetadata("invariantArgumentsNoWildcard.kt") public void testInvariantArgumentsNoWildcard() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/generics/invariantArgumentsNoWildcard.kt"); } } @@ -13563,37 +9905,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NotNullAssertions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNotNullAssertions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("extensionReceiverParameter.kt") public void testExtensionReceiverParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/extensionReceiverParameter.kt"); } @TestMetadata("mapPut.kt") public void testMapPut() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/mapPut.kt"); } @TestMetadata("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnhancedNullability extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEnhancedNullability() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/enhancedNullability"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -13604,76 +9941,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectMethods extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInObjectMethods() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/objectMethods"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("cloneCallsConstructor.kt") public void testCloneCallsConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsConstructor.kt"); } @TestMetadata("cloneCallsSuper.kt") public void testCloneCallsSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuper.kt"); } @TestMetadata("cloneCallsSuperAndModifies.kt") public void testCloneCallsSuperAndModifies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneCallsSuperAndModifies.kt"); } @TestMetadata("cloneableClassWithoutClone.kt") public void testCloneableClassWithoutClone() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/javaInterop/objectMethods/cloneableClassWithoutClone.kt"); } } } @@ -13682,32 +9975,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Jdk extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJdk() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jdk"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayList.kt") public void testArrayList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/arrayList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/arrayList.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/hashMap.kt"); } @TestMetadata("iteratingOverHashMap.kt") public void testIteratingOverHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/iteratingOverHashMap.kt"); } @TestMetadata("kt1397.kt") public void testKt1397() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jdk/kt1397.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/jdk/kt1397.kt"); } } @@ -13715,246 +10008,82 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmField extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJvmField() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmField"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("captureClassFields.kt") public void testCaptureClassFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/captureClassFields.kt"); } @TestMetadata("capturePackageFields.kt") public void testCapturePackageFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/capturePackageFields.kt"); } @TestMetadata("checkNoAccessors.kt") public void testCheckNoAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/checkNoAccessors.kt"); } @TestMetadata("classFieldReference.kt") public void testClassFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/classFieldReference.kt"); } @TestMetadata("classFieldReflection.kt") public void testClassFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/classFieldReflection.kt"); } @TestMetadata("constructorProperty.kt") public void testConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/constructorProperty.kt"); } @TestMetadata("publicField.kt") public void testPublicField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/publicField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/publicField.kt"); } @TestMetadata("simpleMemberProperty.kt") public void testSimpleMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/simpleMemberProperty.kt"); } @TestMetadata("superCall.kt") public void testSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/superCall.kt"); } @TestMetadata("superCall2.kt") public void testSuperCall2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/superCall2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/superCall2.kt"); } @TestMetadata("topLevelFieldReference.kt") public void testTopLevelFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReference.kt"); } @TestMetadata("topLevelFieldReflection.kt") public void testTopLevelFieldReflection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/topLevelFieldReflection.kt"); } @TestMetadata("visibility.kt") public void testVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/visibility.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/visibility.kt"); } @TestMetadata("writeFieldReference.kt") public void testWriteFieldReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmField/writeFieldReference.kt"); } } @@ -13962,254 +10091,94 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmName extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJvmName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callableReference.kt") public void testCallableReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/callableReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/callableReference.kt"); } @TestMetadata("clashingErasure.kt") public void testClashingErasure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/clashingErasure.kt"); } @TestMetadata("classMembers.kt") public void testClassMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/classMembers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/classMembers.kt"); } @TestMetadata("fakeJvmNameInJava.kt") public void testFakeJvmNameInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/fakeJvmNameInJava.kt"); } @TestMetadata("functionName.kt") public void testFunctionName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/functionName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/functionName.kt"); } @TestMetadata("multifileClass.kt") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/multifileClass.kt"); } @TestMetadata("multifileClassWithLocalClass.kt") public void testMultifileClassWithLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalClass.kt"); } @TestMetadata("multifileClassWithLocalGeneric.kt") public void testMultifileClassWithLocalGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/multifileClassWithLocalGeneric.kt"); } @TestMetadata("propertyAccessorsUseSite.kt") public void testPropertyAccessorsUseSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/propertyAccessorsUseSite.kt"); } @TestMetadata("propertyName.kt") public void testPropertyName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/propertyName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/propertyName.kt"); } @TestMetadata("renamedFileClass.kt") public void testRenamedFileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/renamedFileClass.kt"); } @TestMetadata("compiler/testData/codegen/box/jvmName/fileFacades") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FileFacades extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFileFacades() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmName/fileFacades"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("differentFiles.kt") public void testDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/differentFiles.kt"); } @TestMetadata("javaAnnotationOnFileFacade.kt") public void testJavaAnnotationOnFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/javaAnnotationOnFileFacade.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmName/fileFacades/simple.kt"); } } } @@ -14218,246 +10187,82 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmOverloads extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJvmOverloads() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmOverloads"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/companionObject.kt"); } @TestMetadata("defaultsNotAtEnd.kt") public void testDefaultsNotAtEnd() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/defaultsNotAtEnd.kt"); } @TestMetadata("doubleParameters.kt") public void testDoubleParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/doubleParameters.kt"); } @TestMetadata("extensionMethod.kt") public void testExtensionMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/extensionMethod.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/generics.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/generics.kt"); } @TestMetadata("innerClass.kt") public void testInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/innerClass.kt"); } @TestMetadata("multipleDefaultParameters.kt") public void testMultipleDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/multipleDefaultParameters.kt"); } @TestMetadata("nonDefaultParameter.kt") public void testNonDefaultParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/nonDefaultParameter.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/primaryConstructor.kt"); } @TestMetadata("privateClass.kt") public void testPrivateClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/privateClass.kt"); } @TestMetadata("secondaryConstructor.kt") public void testSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/secondaryConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/simple.kt"); } @TestMetadata("simpleJavaCall.kt") public void testSimpleJavaCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/simpleJavaCall.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmOverloads/varargs.kt"); } } @@ -14465,6 +10270,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmPackageName extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJvmPackageName() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmPackageName"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -14474,399 +10283,127 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/annotations.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/annotations.kt"); } @TestMetadata("closure.kt") public void testClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/closure.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/closure.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/companionObject.kt"); } @TestMetadata("convention.kt") public void testConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/convention.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/convention.kt"); } @TestMetadata("default.kt") public void testDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/default.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/default.kt"); } @TestMetadata("enumCompanion.kt") public void testEnumCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/enumCompanion.kt"); } @TestMetadata("explicitObject.kt") public void testExplicitObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/explicitObject.kt"); } @TestMetadata("funAccess.kt") public void testFunAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/funAccess.kt"); } @TestMetadata("importStaticMemberFromObject.kt") public void testImportStaticMemberFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/inline.kt"); } @TestMetadata("inlinePropertyAccessors.kt") public void testInlinePropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/inlinePropertyAccessors.kt"); } @TestMetadata("kt9897_static.kt") public void testKt9897_static() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/kt9897_static.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/object.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/object.kt"); } @TestMetadata("postfixInc.kt") public void testPostfixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/postfixInc.kt"); } @TestMetadata("prefixInc.kt") public void testPrefixInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/prefixInc.kt"); } @TestMetadata("privateMethod.kt") public void testPrivateMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/privateMethod.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/privateSetter.kt"); } @TestMetadata("propertyAccess.kt") public void testPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccess.kt"); } @TestMetadata("propertyAccessorsCompanion.kt") public void testPropertyAccessorsCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsCompanion.kt"); } @TestMetadata("propertyAccessorsObject.kt") public void testPropertyAccessorsObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAccessorsObject.kt"); } @TestMetadata("propertyAsDefault.kt") public void testPropertyAsDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/propertyAsDefault.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/simple.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/simple.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/jvmStatic/syntheticAccessor.kt"); } } @@ -14874,56 +10411,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Labels extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLabels() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("controlLabelClashesWithFuncitonName.kt") public void testControlLabelClashesWithFuncitonName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt"); } @TestMetadata("infixCallLabelling.kt") public void testInfixCallLabelling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/infixCallLabelling.kt"); } @TestMetadata("labeledDeclarations.kt") public void testLabeledDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/labeledDeclarations.kt"); } @TestMetadata("propertyAccessor.kt") public void testPropertyAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessor.kt"); } @TestMetadata("propertyAccessorFunctionLiteral.kt") public void testPropertyAccessorFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorFunctionLiteral.kt"); } @TestMetadata("propertyAccessorInnerExtensionFun.kt") public void testPropertyAccessorInnerExtensionFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorInnerExtensionFun.kt"); } @TestMetadata("propertyAccessorObject.kt") public void testPropertyAccessorObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyAccessorObject.kt"); } @TestMetadata("propertyInClassAccessor.kt") public void testPropertyInClassAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/labels/propertyInClassAccessor.kt"); } } @@ -14931,124 +10464,114 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LazyCodegen extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLazyCodegen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("exceptionInFieldInitializer.kt") public void testExceptionInFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/exceptionInFieldInitializer.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/ifElse.kt"); } @TestMetadata("increment.kt") public void testIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/increment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/increment.kt"); } @TestMetadata("safeAssign.kt") public void testSafeAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssign.kt"); } @TestMetadata("safeAssignComplex.kt") public void testSafeAssignComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeAssignComplex.kt"); } @TestMetadata("safeCallAndArray.kt") public void testSafeCallAndArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/safeCallAndArray.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/toString.kt"); } @TestMetadata("tryCatchExpression.kt") public void testTryCatchExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/tryCatchExpression.kt"); } @TestMetadata("when.kt") public void testWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/when.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/when.kt"); } @TestMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/lazyCodegen/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("negateConstantCompare.kt") public void testNegateConstantCompare() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateConstantCompare.kt"); } @TestMetadata("negateFalse.kt") public void testNegateFalse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalse.kt"); } @TestMetadata("negateFalseVar.kt") public void testNegateFalseVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVar.kt"); } @TestMetadata("negateFalseVarChain.kt") public void testNegateFalseVarChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateFalseVarChain.kt"); } @TestMetadata("negateObjectComp.kt") public void testNegateObjectComp() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp.kt"); } @TestMetadata("negateObjectComp2.kt") public void testNegateObjectComp2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateObjectComp2.kt"); } @TestMetadata("negateTrue.kt") public void testNegateTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrue.kt"); } @TestMetadata("negateTrueVar.kt") public void testNegateTrueVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/negateTrueVar.kt"); } @TestMetadata("noOptimization.kt") public void testNoOptimization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/lazyCodegen/optimizations/noOptimization.kt"); } } } @@ -15057,211 +10580,172 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalClasses extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocalClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/localClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousObjectInInitializer.kt") public void testAnonymousObjectInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInInitializer.kt"); } @TestMetadata("anonymousObjectInParameterInitializer.kt") public void testAnonymousObjectInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/anonymousObjectInParameterInitializer.kt"); } @TestMetadata("closureOfInnerLocalClass.kt") public void testClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/closureOfInnerLocalClass.kt"); } @TestMetadata("closureOfLambdaInLocalClass.kt") public void testClosureOfLambdaInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/closureOfLambdaInLocalClass.kt"); } @TestMetadata("closureWithSelfInstantiation.kt") public void testClosureWithSelfInstantiation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/closureWithSelfInstantiation.kt"); } @TestMetadata("inExtensionFunction.kt") public void testInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionFunction.kt"); } @TestMetadata("inExtensionProperty.kt") public void testInExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inExtensionProperty.kt"); } @TestMetadata("inLocalExtensionFunction.kt") public void testInLocalExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionFunction.kt"); } @TestMetadata("inLocalExtensionProperty.kt") public void testInLocalExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/inLocalExtensionProperty.kt"); } @TestMetadata("innerClassInLocalClass.kt") public void testInnerClassInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerClassInLocalClass.kt"); } @TestMetadata("innerOfLocalCaptureExtensionReceiver.kt") public void testInnerOfLocalCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/innerOfLocalCaptureExtensionReceiver.kt"); } @TestMetadata("kt2700.kt") public void testKt2700() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2700.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2700.kt"); } @TestMetadata("kt2873.kt") public void testKt2873() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt2873.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt2873.kt"); } @TestMetadata("kt3210.kt") public void testKt3210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3210.kt"); } @TestMetadata("kt3389.kt") public void testKt3389() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3389.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3389.kt"); } @TestMetadata("kt3584.kt") public void testKt3584() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt3584.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt3584.kt"); } @TestMetadata("kt4174.kt") public void testKt4174() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/kt4174.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/kt4174.kt"); } @TestMetadata("localClass.kt") public void testLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClass.kt"); } @TestMetadata("localClassCaptureExtensionReceiver.kt") public void testLocalClassCaptureExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassCaptureExtensionReceiver.kt"); } @TestMetadata("localClassInInitializer.kt") public void testLocalClassInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInInitializer.kt"); } @TestMetadata("localClassInParameterInitializer.kt") public void testLocalClassInParameterInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localClassInParameterInitializer.kt"); } @TestMetadata("localDataClass.kt") public void testLocalDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localDataClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localDataClass.kt"); } @TestMetadata("localExtendsInnerAndReferencesOuterMember.kt") public void testLocalExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/localExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("nameWithWhitespace.kt") public void testNameWithWhitespace() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/localClasses/nameWithWhitespace.kt"); } @TestMetadata("noclosure.kt") public void testNoclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/noclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/noclosure.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/object.kt"); } @TestMetadata("ownClosureOfInnerLocalClass.kt") public void testOwnClosureOfInnerLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/ownClosureOfInnerLocalClass.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass1.kt") public void testRecaptureVarCapturedInLocalClass1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass1.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass2.kt") public void testRecaptureVarCapturedInLocalClass2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass2.kt"); } @TestMetadata("recaptureVarCapturedInLocalClass3.kt") public void testRecaptureVarCapturedInLocalClass3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/recaptureVarCapturedInLocalClass3.kt"); } @TestMetadata("subclassingExtensionReceiverClass.kt") public void testSubclassingExtensionReceiverClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/subclassingExtensionReceiverClass.kt"); } @TestMetadata("withclosure.kt") public void testWithclosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/localClasses/withclosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/localClasses/withclosure.kt"); } } @@ -15269,89 +10753,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mangling extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMangling() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/mangling"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/field.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/mangling/field.kt"); } @TestMetadata("fun.kt") public void testFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/fun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/mangling/fun.kt"); } @TestMetadata("internal.kt") public void testInternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internal.kt"); } @TestMetadata("internalOverride.kt") public void testInternalOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverride.kt"); } @TestMetadata("internalOverrideSuperCall.kt") public void testInternalOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/internalOverrideSuperCall.kt"); } @TestMetadata("noOverrideWithJava.kt") public void testNoOverrideWithJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/mangling/noOverrideWithJava.kt"); } @TestMetadata("publicOverride.kt") public void testPublicOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverride.kt"); } @TestMetadata("publicOverrideSuperCall.kt") public void testPublicOverrideSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/mangling/publicOverrideSuperCall.kt"); } } @@ -15359,162 +10806,151 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("ComplexInitializer.kt") public void testComplexInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ComplexInitializer.kt"); } @TestMetadata("component.kt") public void testComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/component.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/component.kt"); } @TestMetadata("kt9828_hashMap.kt") public void testKt9828_hashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/kt9828_hashMap.kt"); } @TestMetadata("returnInElvis.kt") public void testReturnInElvis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/returnInElvis.kt"); } @TestMetadata("SimpleVals.kt") public void testSimpleVals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVals.kt"); } @TestMetadata("SimpleValsExtensions.kt") public void testSimpleValsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleValsExtensions.kt"); } @TestMetadata("SimpleVarsExtensions.kt") public void testSimpleVarsExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/SimpleVarsExtensions.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/UnderscoreNames.kt"); } @TestMetadata("ValCapturedInFunctionLiteral.kt") public void testValCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInFunctionLiteral.kt"); } @TestMetadata("ValCapturedInLocalFunction.kt") public void testValCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInLocalFunction.kt"); } @TestMetadata("ValCapturedInObjectLiteral.kt") public void testValCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/ValCapturedInObjectLiteral.kt"); } @TestMetadata("VarCapturedInFunctionLiteral.kt") public void testVarCapturedInFunctionLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInFunctionLiteral.kt"); } @TestMetadata("VarCapturedInLocalFunction.kt") public void testVarCapturedInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInLocalFunction.kt"); } @TestMetadata("VarCapturedInObjectLiteral.kt") public void testVarCapturedInObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/VarCapturedInObjectLiteral.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForIterator extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LongIterator extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLongIterator() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forIterator/longIterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forIterator/longIterator/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -15523,120 +10959,116 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForRange extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForRange() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/MultiDeclForValCaptured.kt"); } @TestMetadata("UnderscoreNames.kt") public void testUnderscoreNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNames.kt"); } @TestMetadata("UnderscoreNamesDontCallComponent.kt") public void testUnderscoreNamesDontCallComponent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/UnderscoreNamesDontCallComponent.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -15644,32 +11076,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeTo/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -15678,70 +11110,69 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExplicitRangeToWithDot extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExplicitRangeToWithDot() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -15749,32 +11180,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/explicitRangeToWithDot/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -15783,32 +11214,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -15816,32 +11247,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiDecl/forRange/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiDecl/forRange/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } @@ -15851,6 +11282,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -15859,6 +11294,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimized extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOptimized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multifileClasses/optimized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -15869,6 +11308,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Multiplatform extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiplatform() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -15877,56 +11320,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DefaultArguments extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDefaultArguments() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/multiplatform/defaultArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/constructor.kt"); } @TestMetadata("function.kt") public void testFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/function.kt"); } @TestMetadata("inheritedFromCommonClass.kt") public void testInheritedFromCommonClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromCommonClass.kt"); } @TestMetadata("inheritedFromExpectedClass.kt") public void testInheritedFromExpectedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedClass.kt"); } @TestMetadata("inheritedFromExpectedMethod.kt") public void testInheritedFromExpectedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedFromExpectedMethod.kt"); } @TestMetadata("inheritedInExpectedDeclarations.kt") public void testInheritedInExpectedDeclarations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inheritedInExpectedDeclarations.kt"); } @TestMetadata("inlineFunctionWithDefaultLambda.kt") public void testInlineFunctionWithDefaultLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/inlineFunctionWithDefaultLambda.kt"); } @TestMetadata("kt23239.kt") public void testKt23239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/multiplatform/defaultArguments/kt23239.kt"); } } } @@ -15935,60 +11374,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NonLocalReturns extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt9644let.kt") public void testKt9644let() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/kt9644let.kt"); } @TestMetadata("localReturnInsideProperty.kt") public void testLocalReturnInsideProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/localReturnInsideProperty.kt"); } @TestMetadata("returnInsideTwoLambdas.kt") public void testReturnInsideTwoLambdas() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nonLocalReturns/returnInsideTwoLambdas.kt"); } @TestMetadata("use.kt") public void testUse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/use.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/nonLocalReturns/use.kt"); } @TestMetadata("useWithException.kt") public void testUseWithException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/nonLocalReturns/useWithException.kt"); } } @@ -15996,32 +11412,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullCheckOptimization extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNullCheckOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/nullCheckOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("isNullable.kt") public void testIsNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/isNullable.kt"); } @TestMetadata("kt22410.kt") public void testKt22410() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt22410.kt"); } @TestMetadata("kt7774.kt") public void testKt7774() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/kt7774.kt"); } @TestMetadata("trivialInstanceOf.kt") public void testTrivialInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/nullCheckOptimization/trivialInstanceOf.kt"); } } @@ -16029,14 +11445,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ObjectIntrinsics extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInObjectIntrinsics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objectIntrinsics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objectIntrinsics/objects.kt"); } } @@ -16044,470 +11463,342 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Objects extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInObjects() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); } @TestMetadata("anonymousObjectReturnsFromTopLevelFun.kt") public void testAnonymousObjectReturnsFromTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/anonymousObjectReturnsFromTopLevelFun.kt"); } @TestMetadata("classCallsProtectedInheritedByCompanion.kt") public void testClassCallsProtectedInheritedByCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCallsProtectedInheritedByCompanion.kt"); } @TestMetadata("classCompanion.kt") public void testClassCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/classCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/classCompanion.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt") public void testCompoundAssignmentToArrayAccessToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToArrayAccessToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToExtensionPropertyImportedFromObject.kt") public void testCompoundAssignmentToExtensionPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToExtensionPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToObjectFromCall.kt") public void testCompoundAssignmentToObjectFromCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToObjectFromCall.kt"); } @TestMetadata("compoundAssignmentToPropertyImportedFromObject.kt") public void testCompoundAssignmentToPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyImportedFromObject.kt"); } @TestMetadata("compoundAssignmentToPropertyWithQualifier.kt") public void testCompoundAssignmentToPropertyWithQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/compoundAssignmentToPropertyWithQualifier.kt"); } @TestMetadata("flist.kt") public void testFlist() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/flist.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/flist.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/initializationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/initializationOrder.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanion.kt"); } @TestMetadata("interfaceCompanionObjectReference.kt") public void testInterfaceCompanionObjectReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt"); } @TestMetadata("kt1047.kt") public void testKt1047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1047.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/objects/kt1047.kt"); } @TestMetadata("kt11117.kt") public void testKt11117() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt11117.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt11117.kt"); } @TestMetadata("kt1186.kt") public void testKt1186() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1186.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1186.kt"); } @TestMetadata("kt1600.kt") public void testKt1600() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1600.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt1600.kt"); } @TestMetadata("kt1737.kt") public void testKt1737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1737.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/objects/kt1737.kt"); } @TestMetadata("kt18982.kt") public void testKt18982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt18982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt18982.kt"); } @TestMetadata("kt2398.kt") public void testKt2398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2398.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2398.kt"); } @TestMetadata("kt2663.kt") public void testKt2663() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2663.kt"); } @TestMetadata("kt2663_2.kt") public void testKt2663_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2663_2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/objects/kt2663_2.kt"); } @TestMetadata("kt2675.kt") public void testKt2675() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2675.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2675.kt"); } @TestMetadata("kt2719.kt") public void testKt2719() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2719.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2719.kt"); } @TestMetadata("kt2822.kt") public void testKt2822() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt2822.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt2822.kt"); } @TestMetadata("kt3238.kt") public void testKt3238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3238.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/objects/kt3238.kt"); } @TestMetadata("kt3684.kt") public void testKt3684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt3684.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt3684.kt"); } @TestMetadata("kt4086.kt") public void testKt4086() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt4086.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt4086.kt"); } @TestMetadata("kt535.kt") public void testKt535() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt535.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/objects/kt535.kt"); } @TestMetadata("kt560.kt") public void testKt560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt560.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/objects/kt560.kt"); } @TestMetadata("kt694.kt") public void testKt694() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt694.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/kt694.kt"); } @TestMetadata("localFunctionInObjectInitializer_kt4516.kt") public void testLocalFunctionInObjectInitializer_kt4516() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/localFunctionInObjectInitializer_kt4516.kt"); } @TestMetadata("methodOnObject.kt") public void testMethodOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/methodOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/methodOnObject.kt"); } @TestMetadata("nestedDerivedClassCallsProtectedFromCompanion.kt") public void testNestedDerivedClassCallsProtectedFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedDerivedClassCallsProtectedFromCompanion.kt"); } @TestMetadata("nestedObjectWithSuperclass.kt") public void testNestedObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/nestedObjectWithSuperclass.kt"); } @TestMetadata("object.kt") public void testObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/object.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/object.kt"); } @TestMetadata("objectExtendsInnerAndReferencesOuterMember.kt") public void testObjectExtendsInnerAndReferencesOuterMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectExtendsInnerAndReferencesOuterMember.kt"); } @TestMetadata("objectInLocalAnonymousObject.kt") public void testObjectInLocalAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInLocalAnonymousObject.kt"); } @TestMetadata("objectInitialization_kt5523.kt") public void testObjectInitialization_kt5523() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectInitialization_kt5523.kt"); } @TestMetadata("objectLiteral.kt") public void testObjectLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteral.kt"); } @TestMetadata("objectLiteralInClosure.kt") public void testObjectLiteralInClosure() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectLiteralInClosure.kt"); } @TestMetadata("objectVsClassInitialization_kt5291.kt") public void testObjectVsClassInitialization_kt5291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectVsClassInitialization_kt5291.kt"); } @TestMetadata("objectWithSuperclass.kt") public void testObjectWithSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclass.kt"); } @TestMetadata("objectWithSuperclassAndTrait.kt") public void testObjectWithSuperclassAndTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/objectWithSuperclassAndTrait.kt"); } @TestMetadata("privateExtensionFromInitializer_kt4543.kt") public void testPrivateExtensionFromInitializer_kt4543() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateExtensionFromInitializer_kt4543.kt"); } @TestMetadata("privateFunctionFromClosureInInitializer_kt5582.kt") public void testPrivateFunctionFromClosureInInitializer_kt5582() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/privateFunctionFromClosureInInitializer_kt5582.kt"); } @TestMetadata("receiverInConstructor.kt") public void testReceiverInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/receiverInConstructor.kt"); } @TestMetadata("safeAccess.kt") public void testSafeAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/safeAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/safeAccess.kt"); } @TestMetadata("selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToInterfaceCompanionObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt") public void testSelfReferenceToObjectInAnonymousObjectInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInAnonymousObjectInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInConstructorBody.kt") public void testSelfReferenceToObjectInInlineLambdaInConstructorBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInConstructorBody.kt"); } @TestMetadata("selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInInlineLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInInlineLambdaInSuperConstructorCall.kt"); } @TestMetadata("selfReferenceToObjectInLambdaInSuperConstructorCall.kt") public void testSelfReferenceToObjectInLambdaInSuperConstructorCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/selfReferenceToObjectInLambdaInSuperConstructorCall.kt"); } @TestMetadata("simpleObject.kt") public void testSimpleObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/simpleObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/simpleObject.kt"); } @TestMetadata("thisInConstructor.kt") public void testThisInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/thisInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/thisInConstructor.kt"); } @TestMetadata("useAnonymousObjectAsIterator.kt") public void testUseAnonymousObjectAsIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useAnonymousObjectAsIterator.kt"); } @TestMetadata("useImportedMember.kt") public void testUseImportedMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMember.kt"); } @TestMetadata("useImportedMemberFromCompanion.kt") public void testUseImportedMemberFromCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/objects/useImportedMemberFromCompanion.kt"); } } @@ -16515,178 +11806,159 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class OperatorConventions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOperatorConventions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotatedAssignment.kt") public void testAnnotatedAssignment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/annotatedAssignment.kt"); } @TestMetadata("assignmentOperations.kt") public void testAssignmentOperations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/assignmentOperations.kt"); } @TestMetadata("augmentedAssignmentInInitializer.kt") public void testAugmentedAssignmentInInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentInInitializer.kt"); } @TestMetadata("augmentedAssignmentWithArrayLHS.kt") public void testAugmentedAssignmentWithArrayLHS() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/augmentedAssignmentWithArrayLHS.kt"); } @TestMetadata("incDecOnObject.kt") public void testIncDecOnObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/incDecOnObject.kt"); } @TestMetadata("infixFunctionOverBuiltinMember.kt") public void testInfixFunctionOverBuiltinMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/infixFunctionOverBuiltinMember.kt"); } @TestMetadata("kt14201.kt") public void testKt14201() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201.kt"); } @TestMetadata("kt14201_2.kt") public void testKt14201_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt14201_2.kt"); } @TestMetadata("kt20387.kt") public void testKt20387() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt20387.kt"); } @TestMetadata("kt4152.kt") public void testKt4152() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4152.kt"); } @TestMetadata("kt4987.kt") public void testKt4987() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/kt4987.kt"); } @TestMetadata("nestedMaps.kt") public void testNestedMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt"); } @TestMetadata("operatorSetLambda.kt") public void testOperatorSetLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/operatorSetLambda.kt"); } @TestMetadata("overloadedSet.kt") public void testOverloadedSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/overloadedSet.kt"); } @TestMetadata("plusExplicit.kt") public void testPlusExplicit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/plusExplicit.kt"); } @TestMetadata("remAssignmentOperation.kt") public void testRemAssignmentOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remAssignmentOperation.kt"); } @TestMetadata("remOverModOperation.kt") public void testRemOverModOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/remOverModOperation.kt"); } @TestMetadata("compiler/testData/codegen/box/operatorConventions/compareTo") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CompareTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCompareTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/operatorConventions/compareTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boolean.kt") public void testBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/boolean.kt"); } @TestMetadata("comparable.kt") public void testComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt"); } @TestMetadata("doubleInt.kt") public void testDoubleInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt"); } @TestMetadata("doubleLong.kt") public void testDoubleLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleLong.kt"); } @TestMetadata("extensionArray.kt") public void testExtensionArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionArray.kt"); } @TestMetadata("extensionObject.kt") public void testExtensionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/extensionObject.kt"); } @TestMetadata("intDouble.kt") public void testIntDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intDouble.kt"); } @TestMetadata("intLong.kt") public void testIntLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/intLong.kt"); } @TestMetadata("longDouble.kt") public void testLongDouble() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longDouble.kt"); } @TestMetadata("longInt.kt") public void testLongInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/operatorConventions/compareTo/longInt.kt"); } } } @@ -16695,14 +11967,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Optimizations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOptimizations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/optimizations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt20844.kt") public void testKt20844() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/optimizations/kt20844.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/optimizations/kt20844.kt"); } } @@ -16710,113 +11985,72 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Package extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPackage() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/package"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boxPrimitiveTypeInClinit.kt") public void testBoxPrimitiveTypeInClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/boxPrimitiveTypeInClinit.kt"); } @TestMetadata("checkCast.kt") public void testCheckCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/checkCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/checkCast.kt"); } @TestMetadata("incrementProperty.kt") public void testIncrementProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/incrementProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/incrementProperty.kt"); } @TestMetadata("initializationOrder.kt") public void testInitializationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/initializationOrder.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/package/initializationOrder.kt"); } @TestMetadata("invokespecial.kt") public void testInvokespecial() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/invokespecial.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/package/invokespecial.kt"); } @TestMetadata("mainInFiles.kt") public void testMainInFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/mainInFiles.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/package/mainInFiles.kt"); } @TestMetadata("nullablePrimitiveNoFieldInitializer.kt") public void testNullablePrimitiveNoFieldInitializer() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/nullablePrimitiveNoFieldInitializer.kt"); } @TestMetadata("packageLocalClassNotImportedWithDefaultImport.kt") public void testPackageLocalClassNotImportedWithDefaultImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageLocalClassNotImportedWithDefaultImport.kt"); } @TestMetadata("packageQualifiedMethod.kt") public void testPackageQualifiedMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/packageQualifiedMethod.kt"); } @TestMetadata("privateMembersInImportList.kt") public void testPrivateMembersInImportList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateMembersInImportList.kt"); } @TestMetadata("privateTopLevelPropAndVarInInner.kt") public void testPrivateTopLevelPropAndVarInInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/privateTopLevelPropAndVarInInner.kt"); } @TestMetadata("referenceWithTheSameNameAsPackage.kt") public void testReferenceWithTheSameNameAsPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/package/referenceWithTheSameNameAsPackage.kt"); } } @@ -16824,6 +12058,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PlatformTypes extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPlatformTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -16832,139 +12070,112 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Primitives extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPrimitives() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/platformTypes/primitives"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("assign.kt") public void testAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/assign.kt"); } @TestMetadata("compareTo.kt") public void testCompareTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/compareTo.kt"); } @TestMetadata("dec.kt") public void testDec() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/dec.kt"); } @TestMetadata("div.kt") public void testDiv() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/div.kt"); } @TestMetadata("equals.kt") public void testEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/equals.kt"); } @TestMetadata("hashCode.kt") public void testHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/hashCode.kt"); } @TestMetadata("identityEquals.kt") public void testIdentityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/platformTypes/primitives/identityEquals.kt"); } @TestMetadata("inc.kt") public void testInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/inc.kt"); } @TestMetadata("minus.kt") public void testMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/minus.kt"); } @TestMetadata("mod.kt") public void testMod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/mod.kt"); } @TestMetadata("not.kt") public void testNot() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/not.kt"); } @TestMetadata("notEquals.kt") public void testNotEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/notEquals.kt"); } @TestMetadata("plus.kt") public void testPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plus.kt"); } @TestMetadata("plusAssign.kt") public void testPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/plusAssign.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/rangeTo.kt"); } @TestMetadata("times.kt") public void testTimes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/times.kt"); } @TestMetadata("toShort.kt") public void testToShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toShort.kt"); } @TestMetadata("toString.kt") public void testToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/toString.kt"); } @TestMetadata("unaryMinus.kt") public void testUnaryMinus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryMinus.kt"); } @TestMetadata("unaryPlus.kt") public void testUnaryPlus() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/platformTypes/primitives/unaryPlus.kt"); } } } @@ -16973,596 +12184,421 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrimitiveTypes extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPrimitiveTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("comparisonWithNaN.kt") public void testComparisonWithNaN() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNaN.kt"); } @TestMetadata("comparisonWithNullCallsFun.kt") public void testComparisonWithNullCallsFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/comparisonWithNullCallsFun.kt"); } @TestMetadata("conversions.kt") public void testConversions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/conversions.kt"); } @TestMetadata("crossTypeEquals.kt") public void testCrossTypeEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/crossTypeEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/crossTypeEquals.kt"); } @TestMetadata("ea35963.kt") public void testEa35963() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/ea35963.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalsHashCodeToString.kt"); } @TestMetadata("incrementByteCharShort.kt") public void testIncrementByteCharShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/incrementByteCharShort.kt"); } @TestMetadata("intLiteralIsNotNull.kt") public void testIntLiteralIsNotNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/intLiteralIsNotNull.kt"); } @TestMetadata("kt1054.kt") public void testKt1054() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1054.kt"); } @TestMetadata("kt1055.kt") public void testKt1055() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1055.kt"); } @TestMetadata("kt1093.kt") public void testKt1093() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1093.kt"); } @TestMetadata("kt13023.kt") public void testKt13023() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt13023.kt"); } @TestMetadata("kt14868.kt") public void testKt14868() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt14868.kt"); } @TestMetadata("kt1508.kt") public void testKt1508() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1508.kt"); } @TestMetadata("kt1634.kt") public void testKt1634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt1634.kt"); } @TestMetadata("kt16732.kt") public void testKt16732() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt16732.kt"); } @TestMetadata("kt2251.kt") public void testKt2251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2251.kt"); } @TestMetadata("kt2269.kt") public void testKt2269() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2269.kt"); } @TestMetadata("kt2275.kt") public void testKt2275() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2275.kt"); } @TestMetadata("kt239.kt") public void testKt239() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt239.kt"); } @TestMetadata("kt242.kt") public void testKt242() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt242.kt"); } @TestMetadata("kt243.kt") public void testKt243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt243.kt"); } @TestMetadata("kt248.kt") public void testKt248() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt248.kt"); } @TestMetadata("kt2768.kt") public void testKt2768() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2768.kt"); } @TestMetadata("kt2794.kt") public void testKt2794() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt2794.kt"); } @TestMetadata("kt3078.kt") public void testKt3078() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3078.kt"); } @TestMetadata("kt3517.kt") public void testKt3517() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3517.kt"); } @TestMetadata("kt3576.kt") public void testKt3576() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3576.kt"); } @TestMetadata("kt3613.kt") public void testKt3613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt3613.kt"); } @TestMetadata("kt4097.kt") public void testKt4097() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4097.kt"); } @TestMetadata("kt4098.kt") public void testKt4098() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4098.kt"); } @TestMetadata("kt4210.kt") public void testKt4210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4210.kt"); } @TestMetadata("kt4251.kt") public void testKt4251() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt4251.kt"); } @TestMetadata("kt446.kt") public void testKt446() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt446.kt"); } @TestMetadata("kt518.kt") public void testKt518() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt518.kt"); } @TestMetadata("kt6590_identityEquals.kt") public void testKt6590_identityEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt6590_identityEquals.kt"); } @TestMetadata("kt665.kt") public void testKt665() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt665.kt"); } @TestMetadata("kt684.kt") public void testKt684() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt684.kt"); } @TestMetadata("kt711.kt") public void testKt711() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt711.kt"); } @TestMetadata("kt737.kt") public void testKt737() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt737.kt"); } @TestMetadata("kt752.kt") public void testKt752() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt752.kt"); } @TestMetadata("kt753.kt") public void testKt753() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt753.kt"); } @TestMetadata("kt756.kt") public void testKt756() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt756.kt"); } @TestMetadata("kt757.kt") public void testKt757() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt757.kt"); } @TestMetadata("kt828.kt") public void testKt828() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt828.kt"); } @TestMetadata("kt877.kt") public void testKt877() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt877.kt"); } @TestMetadata("kt882.kt") public void testKt882() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt882.kt"); } @TestMetadata("kt887.kt") public void testKt887() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/kt887.kt"); } @TestMetadata("kt935.kt") public void testKt935() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/kt935.kt"); } @TestMetadata("nullAsNullableIntIsNull.kt") public void testNullAsNullableIntIsNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullAsNullableIntIsNull.kt"); } @TestMetadata("nullableCharBoolean.kt") public void testNullableCharBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/nullableCharBoolean.kt"); } @TestMetadata("number.kt") public void testNumber() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/number.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/number.kt"); } @TestMetadata("rangeTo.kt") public void testRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt"); } @TestMetadata("substituteIntForGeneric.kt") public void testSubstituteIntForGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/primitiveTypes/substituteIntForGeneric.kt"); } @TestMetadata("unboxComparable.kt") public void testUnboxComparable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/unboxComparable.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EqualityWithObject extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEqualityWithObject() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boxedEqPrimitiveEvaluationOrder.kt") public void testBoxedEqPrimitiveEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedEqPrimitiveEvaluationOrder.kt"); } @TestMetadata("boxedLongEqualsLong.kt") public void testBoxedLongEqualsLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/boxedLongEqualsLong.kt"); } @TestMetadata("objectWithAsymmetricEqualsEqPrimitive.kt") public void testObjectWithAsymmetricEqualsEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/objectWithAsymmetricEqualsEqPrimitive.kt"); } @TestMetadata("whenNullableBoxed.kt") public void testWhenNullableBoxed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/whenNullableBoxed.kt"); } @TestMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boxedEqPrimitiveBoolean.kt") public void testBoxedEqPrimitiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveBoolean.kt"); } @TestMetadata("boxedEqPrimitiveByte.kt") public void testBoxedEqPrimitiveByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveByte.kt"); } @TestMetadata("boxedEqPrimitiveChar.kt") public void testBoxedEqPrimitiveChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveChar.kt"); } @TestMetadata("boxedEqPrimitiveInt.kt") public void testBoxedEqPrimitiveInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveInt.kt"); } @TestMetadata("boxedEqPrimitiveLong.kt") public void testBoxedEqPrimitiveLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveLong.kt"); } @TestMetadata("boxedEqPrimitiveShort.kt") public void testBoxedEqPrimitiveShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/boxedEqPrimitiveShort.kt"); } @TestMetadata("primitiveEqBoxedBoolean.kt") public void testPrimitiveEqBoxedBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedBoolean.kt"); } @TestMetadata("primitiveEqBoxedByte.kt") public void testPrimitiveEqBoxedByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedByte.kt"); } @TestMetadata("primitiveEqBoxedChar.kt") public void testPrimitiveEqBoxedChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedChar.kt"); } @TestMetadata("primitiveEqBoxedInt.kt") public void testPrimitiveEqBoxedInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedInt.kt"); } @TestMetadata("primitiveEqBoxedLong.kt") public void testPrimitiveEqBoxedLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedLong.kt"); } @TestMetadata("primitiveEqBoxedShort.kt") public void testPrimitiveEqBoxedShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqBoxedShort.kt"); } @TestMetadata("primitiveEqObjectBoolean.kt") public void testPrimitiveEqObjectBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectBoolean.kt"); } @TestMetadata("primitiveEqObjectByte.kt") public void testPrimitiveEqObjectByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectByte.kt"); } @TestMetadata("primitiveEqObjectChar.kt") public void testPrimitiveEqObjectChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectChar.kt"); } @TestMetadata("primitiveEqObjectInt.kt") public void testPrimitiveEqObjectInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectInt.kt"); } @TestMetadata("primitiveEqObjectLong.kt") public void testPrimitiveEqObjectLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectLong.kt"); } @TestMetadata("primitiveEqObjectShort.kt") public void testPrimitiveEqObjectShort() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/primitiveTypes/equalityWithObject/generated/primitiveEqObjectShort.kt"); } } } @@ -17572,20 +12608,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Private extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/private"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayConvention.kt") public void testArrayConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/arrayConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/arrayConvention.kt"); } @TestMetadata("kt9855.kt") public void testKt9855() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/private/kt9855.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/private/kt9855.kt"); } } @@ -17593,97 +12631,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PrivateConstructors extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPrivateConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/privateConstructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("base.kt") public void testBase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/base.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/base.kt"); } @TestMetadata("captured.kt") public void testCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/captured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/captured.kt"); } @TestMetadata("companion.kt") public void testCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/companion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/companion.kt"); } @TestMetadata("inline.kt") public void testInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inline.kt"); } @TestMetadata("inner.kt") public void testInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/inner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/inner.kt"); } @TestMetadata("kt4860.kt") public void testKt4860() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/kt4860.kt"); } @TestMetadata("secondary.kt") public void testSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/secondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/secondary.kt"); } @TestMetadata("synthetic.kt") public void testSynthetic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/privateConstructors/synthetic.kt"); } @TestMetadata("withArguments.kt") public void testWithArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withArguments.kt"); } @TestMetadata("withDefault.kt") public void testWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withDefault.kt"); } @TestMetadata("withLinkedClasses.kt") public void testWithLinkedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedClasses.kt"); } @TestMetadata("withLinkedObjects.kt") public void testWithLinkedObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withLinkedObjects.kt"); } @TestMetadata("withVarargs.kt") public void testWithVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/privateConstructors/withVarargs.kt"); } } @@ -17691,27 +12709,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessToPrivateProperty.kt") public void testAccessToPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/accessToPrivateProperty.kt"); } @TestMetadata("accessToPrivateSetter.kt") public void testAccessToPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/accessToPrivateSetter.kt"); } public void testAllFilesPresentInProperties() throws Exception { @@ -17720,616 +12729,354 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("augmentedAssignmentsAndIncrements.kt") public void testAugmentedAssignmentsAndIncrements() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/augmentedAssignmentsAndIncrements.kt"); } @TestMetadata("classArtificialFieldInsideNested.kt") public void testClassArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classArtificialFieldInsideNested.kt"); } @TestMetadata("classFieldInsideLambda.kt") public void testClassFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLambda.kt"); } @TestMetadata("classFieldInsideLocalInSetter.kt") public void testClassFieldInsideLocalInSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideLocalInSetter.kt"); } @TestMetadata("classFieldInsideNested.kt") public void testClassFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classFieldInsideNested.kt"); } @TestMetadata("classObjectProperties.kt") public void testClassObjectProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classObjectProperties.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classObjectProperties.kt"); } @TestMetadata("classPrivateArtificialFieldInsideNested.kt") public void testClassPrivateArtificialFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/classPrivateArtificialFieldInsideNested.kt"); } @TestMetadata("collectionSize.kt") public void testCollectionSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/collectionSize.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/collectionSize.kt"); } @TestMetadata("commonPropertiesKJK.kt") public void testCommonPropertiesKJK() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/commonPropertiesKJK.kt"); } @TestMetadata("companionFieldInsideLambda.kt") public void testCompanionFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionFieldInsideLambda.kt"); } @TestMetadata("companionObjectAccessor.kt") public void testCompanionObjectAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/companionObjectAccessor.kt"); } @TestMetadata("companionObjectPropertiesFromJava.kt") public void testCompanionObjectPropertiesFromJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/companionObjectPropertiesFromJava.kt"); } @TestMetadata("companionPrivateField.kt") public void testCompanionPrivateField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateField.kt"); } @TestMetadata("companionPrivateFieldInsideLambda.kt") public void testCompanionPrivateFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/companionPrivateFieldInsideLambda.kt"); } @TestMetadata("field.kt") public void testField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/field.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/field.kt"); } @TestMetadata("fieldInClass.kt") public void testFieldInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInClass.kt"); } @TestMetadata("fieldInsideField.kt") public void testFieldInsideField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideField.kt"); } @TestMetadata("fieldInsideLambda.kt") public void testFieldInsideLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideLambda.kt"); } @TestMetadata("fieldInsideNested.kt") public void testFieldInsideNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldInsideNested.kt"); } @TestMetadata("fieldSimple.kt") public void testFieldSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/fieldSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/fieldSimple.kt"); } @TestMetadata("generalAccess.kt") public void testGeneralAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/generalAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/generalAccess.kt"); } @TestMetadata("javaPropertyBoxedGetter.kt") public void testJavaPropertyBoxedGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedGetter.kt"); } @TestMetadata("javaPropertyBoxedSetter.kt") public void testJavaPropertyBoxedSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/javaPropertyBoxedSetter.kt"); } @TestMetadata("kt10715.kt") public void testKt10715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10715.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10715.kt"); } @TestMetadata("kt10729.kt") public void testKt10729() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt10729.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt10729.kt"); } @TestMetadata("kt1159.kt") public void testKt1159() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1159.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/kt1159.kt"); } @TestMetadata("kt1165.kt") public void testKt1165() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1165.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1165.kt"); } @TestMetadata("kt1168.kt") public void testKt1168() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1168.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1168.kt"); } @TestMetadata("kt1170.kt") public void testKt1170() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1170.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1170.kt"); } @TestMetadata("kt12200.kt") public void testKt12200() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt12200.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/kt12200.kt"); } @TestMetadata("kt1398.kt") public void testKt1398() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1398.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/kt1398.kt"); } @TestMetadata("kt1417.kt") public void testKt1417() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1417.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1417.kt"); } @TestMetadata("kt1482_2279.kt") public void testKt1482_2279() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1482_2279.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/kt1482_2279.kt"); } @TestMetadata("kt1714.kt") public void testKt1714() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/kt1714.kt"); } @TestMetadata("kt1714_minimal.kt") public void testKt1714_minimal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1714_minimal.kt"); } @TestMetadata("kt1892.kt") public void testKt1892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt1892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt1892.kt"); } @TestMetadata("kt2331.kt") public void testKt2331() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2331.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2331.kt"); } @TestMetadata("kt257.kt") public void testKt257() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt257.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt257.kt"); } @TestMetadata("kt2655.kt") public void testKt2655() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2655.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2655.kt"); } @TestMetadata("kt2786.kt") public void testKt2786() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2786.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2786.kt"); } @TestMetadata("kt2892.kt") public void testKt2892() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt2892.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt2892.kt"); } @TestMetadata("kt3118.kt") public void testKt3118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3118.kt"); } @TestMetadata("kt3524.kt") public void testKt3524() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3524.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3524.kt"); } @TestMetadata("kt3551.kt") public void testKt3551() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3551.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3551.kt"); } @TestMetadata("kt3556.kt") public void testKt3556() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3556.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3556.kt"); } @TestMetadata("kt3930.kt") public void testKt3930() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt3930.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt3930.kt"); } @TestMetadata("kt4140.kt") public void testKt4140() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4140.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4140.kt"); } @TestMetadata("kt4252.kt") public void testKt4252() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252.kt"); } @TestMetadata("kt4252_2.kt") public void testKt4252_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4252_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4252_2.kt"); } @TestMetadata("kt4340.kt") public void testKt4340() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4340.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4340.kt"); } @TestMetadata("kt4373.kt") public void testKt4373() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4373.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4373.kt"); } @TestMetadata("kt4383.kt") public void testKt4383() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt4383.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt4383.kt"); } @TestMetadata("kt613.kt") public void testKt613() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt613.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt613.kt"); } @TestMetadata("kt8928.kt") public void testKt8928() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt8928.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt8928.kt"); } @TestMetadata("kt9603.kt") public void testKt9603() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/kt9603.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/kt9603.kt"); } @TestMetadata("primitiveOverrideDefaultAccessor.kt") public void testPrimitiveOverrideDefaultAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDefaultAccessor.kt"); } @TestMetadata("primitiveOverrideDelegateAccessor.kt") public void testPrimitiveOverrideDelegateAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/primitiveOverrideDelegateAccessor.kt"); } @TestMetadata("privatePropertyInConstructor.kt") public void testPrivatePropertyInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyInConstructor.kt"); } @TestMetadata("privatePropertyWithoutBackingField.kt") public void testPrivatePropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/privatePropertyWithoutBackingField.kt"); } @TestMetadata("protectedJavaFieldInInline.kt") public void testProtectedJavaFieldInInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/protectedJavaFieldInInline.kt"); } @TestMetadata("protectedJavaProperty.kt") public void testProtectedJavaProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/protectedJavaProperty.kt"); } @TestMetadata("protectedJavaPropertyInCompanion.kt") public void testProtectedJavaPropertyInCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/protectedJavaPropertyInCompanion.kt"); } @TestMetadata("substituteJavaSuperField.kt") public void testSubstituteJavaSuperField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/substituteJavaSuperField.kt"); } @TestMetadata("twoAnnotatedExtensionPropertiesWithoutBackingFields.kt") public void testTwoAnnotatedExtensionPropertiesWithoutBackingFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/twoAnnotatedExtensionPropertiesWithoutBackingFields.kt"); } @TestMetadata("typeInferredFromGetter.kt") public void testTypeInferredFromGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/typeInferredFromGetter.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/const") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Const extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConst() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/const"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constFlags.kt") public void testConstFlags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constFlags.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/const/constFlags.kt"); } @TestMetadata("constValInAnnotationDefault.kt") public void testConstValInAnnotationDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/const/constValInAnnotationDefault.kt"); } @TestMetadata("interfaceCompanion.kt") public void testInterfaceCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt"); } } @@ -18337,16 +13084,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Lateinit extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessor.kt") public void testAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessor.kt"); } @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/accessorException.kt"); } public void testAllFilesPresentInLateinit() throws Exception { @@ -18355,99 +13104,79 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("exceptionField.kt") public void testExceptionField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionField.kt"); } @TestMetadata("exceptionGetter.kt") public void testExceptionGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/exceptionGetter.kt"); } @TestMetadata("override.kt") public void testOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/override.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/override.kt"); } @TestMetadata("overrideException.kt") public void testOverrideException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/overrideException.kt"); } @TestMetadata("privateSetter.kt") public void testPrivateSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetter.kt"); } @TestMetadata("privateSetterFromLambda.kt") public void testPrivateSetterFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt"); } @TestMetadata("privateSetterViaSubclass.kt") public void testPrivateSetterViaSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt"); } @TestMetadata("simpleVar.kt") public void testSimpleVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/simpleVar.kt"); } @TestMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInitializedAndDeinitialize extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIsInitializedAndDeinitialize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("emptyLhs.kt") public void testEmptyLhs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/emptyLhs.kt"); } @TestMetadata("innerSubclass.kt") public void testInnerSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/innerSubclass.kt"); } @TestMetadata("propertyImportedFromObject.kt") public void testPropertyImportedFromObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/propertyImportedFromObject.kt"); } @TestMetadata("sideEffects.kt") public void testSideEffects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/sideEffects.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/isInitializedAndDeinitialize/topLevelProperty.kt"); } } @@ -18455,44 +13184,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Local extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocal() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/properties/lateinit/local"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("capturedLocalLateinit.kt") public void testCapturedLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/capturedLocalLateinit.kt"); } @TestMetadata("localLateinit.kt") public void testLocalLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/localLateinit.kt"); } @TestMetadata("uninitializedCapturedMemberAccess.kt") public void testUninitializedCapturedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedMemberAccess.kt"); } @TestMetadata("uninitializedCapturedRead.kt") public void testUninitializedCapturedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedCapturedRead.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/local/uninitializedRead.kt"); } } @@ -18500,16 +13227,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevel extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessorException.kt") public void testAccessorException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorException.kt"); } @TestMetadata("accessorForTopLevelLateinit.kt") public void testAccessorForTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/accessorForTopLevelLateinit.kt"); } public void testAllFilesPresentInTopLevel() throws Exception { @@ -18518,20 +13247,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("topLevelLateinit.kt") public void testTopLevelLateinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/topLevelLateinit.kt"); } @TestMetadata("uninitializedMemberAccess.kt") public void testUninitializedMemberAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedMemberAccess.kt"); } @TestMetadata("uninitializedRead.kt") public void testUninitializedRead() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/properties/lateinit/topLevel/uninitializedRead.kt"); } } } @@ -18541,37 +13267,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PublishedApi extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInPublishedApi() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/publishedApi"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("noMangling.kt") public void testNoMangling() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/noMangling.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/publishedApi/noMangling.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/simple.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/publishedApi/topLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/publishedApi/topLevel.kt"); } } @@ -18579,474 +13295,301 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Ranges extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRanges() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forByteProgressionWithIntIncrement.kt") public void testForByteProgressionWithIntIncrement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forByteProgressionWithIntIncrement.kt"); } @TestMetadata("forInRangeLiteralWithMixedTypeBounds.kt") public void testForInRangeLiteralWithMixedTypeBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeLiteralWithMixedTypeBounds.kt"); } @TestMetadata("forInRangeWithImplicitReceiver.kt") public void testForInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInRangeWithImplicitReceiver.kt"); } @TestMetadata("forInStringVarUpdatedInLoopBody.kt") public void testForInStringVarUpdatedInLoopBody() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInStringVarUpdatedInLoopBody.kt"); } @TestMetadata("forIntRange.kt") public void testForIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forIntRange.kt"); } @TestMetadata("forNullableIntInRangeWithImplicitReceiver.kt") public void testForNullableIntInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forNullableIntInRangeWithImplicitReceiver.kt"); } @TestMetadata("multiAssignmentIterationOverIntRange.kt") public void testMultiAssignmentIterationOverIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/multiAssignmentIterationOverIntRange.kt"); } @TestMetadata("safeCallRangeTo.kt") public void testSafeCallRangeTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/safeCallRangeTo.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Contains extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInContains() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("comparisonWithRangeBoundEliminated.kt") public void testComparisonWithRangeBoundEliminated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/comparisonWithRangeBoundEliminated.kt"); } @TestMetadata("evaluationOrderForCollection.kt") public void testEvaluationOrderForCollection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForCollection.kt"); } @TestMetadata("evaluationOrderForComparableRange.kt") public void testEvaluationOrderForComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForComparableRange.kt"); } @TestMetadata("evaluationOrderForDownTo.kt") public void testEvaluationOrderForDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForDownTo.kt"); } @TestMetadata("evaluationOrderForRangeLiteral.kt") public void testEvaluationOrderForRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/evaluationOrderForRangeLiteral.kt"); } @TestMetadata("genericCharInRangeLiteral.kt") public void testGenericCharInRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/genericCharInRangeLiteral.kt"); } @TestMetadata("inArray.kt") public void testInArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inArray.kt"); } @TestMetadata("inCharSequence.kt") public void testInCharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCharSequence.kt"); } @TestMetadata("inComparableRange.kt") public void testInComparableRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inComparableRange.kt"); } @TestMetadata("inCustomObjectRange.kt") public void testInCustomObjectRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inCustomObjectRange.kt"); } @TestMetadata("inDoubleRangeLiteralVsComparableRangeLiteral.kt") public void testInDoubleRangeLiteralVsComparableRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inDoubleRangeLiteralVsComparableRangeLiteral.kt"); } @TestMetadata("inExtensionRange.kt") public void testInExtensionRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inExtensionRange.kt"); } @TestMetadata("inFloatingPointRangeWithNaNBound.kt") public void testInFloatingPointRangeWithNaNBound() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inFloatingPointRangeWithNaNBound.kt"); } @TestMetadata("inIntRange.kt") public void testInIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inIntRange.kt"); } @TestMetadata("inIterable.kt") public void testInIterable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inIterable.kt"); } @TestMetadata("inNonMatchingRange.kt") public void testInNonMatchingRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inNonMatchingRange.kt"); } @TestMetadata("inOptimizableDoubleRange.kt") public void testInOptimizableDoubleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableDoubleRange.kt"); } @TestMetadata("inOptimizableFloatRange.kt") public void testInOptimizableFloatRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableFloatRange.kt"); } @TestMetadata("inOptimizableIntRange.kt") public void testInOptimizableIntRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableIntRange.kt"); } @TestMetadata("inOptimizableLongRange.kt") public void testInOptimizableLongRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inOptimizableLongRange.kt"); } @TestMetadata("inPrimitiveProgression.kt") public void testInPrimitiveProgression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveProgression.kt"); } @TestMetadata("inPrimitiveRange.kt") public void testInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inPrimitiveRange.kt"); } @TestMetadata("inRangeLiteralComposition.kt") public void testInRangeLiteralComposition() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeLiteralComposition.kt"); } @TestMetadata("inRangeWithCustomContains.kt") public void testInRangeWithCustomContains() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithCustomContains.kt"); } @TestMetadata("inRangeWithImplicitReceiver.kt") public void testInRangeWithImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithImplicitReceiver.kt"); } @TestMetadata("inRangeWithNonmatchingArguments.kt") public void testInRangeWithNonmatchingArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithNonmatchingArguments.kt"); } @TestMetadata("inRangeWithSmartCast.kt") public void testInRangeWithSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/contains/inRangeWithSmartCast.kt"); } @TestMetadata("inUntil.kt") public void testInUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/inUntil.kt"); } @TestMetadata("kt20106.kt") public void testKt20106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/kt20106.kt"); } @TestMetadata("nullableInPrimitiveRange.kt") public void testNullableInPrimitiveRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/nullableInPrimitiveRange.kt"); } @TestMetadata("rangeContainsString.kt") public void testRangeContainsString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/rangeContainsString.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/contains/generated") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Generated extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInGenerated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/contains/generated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayIndices.kt") public void testArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/arrayIndices.kt"); } @TestMetadata("charDownTo.kt") public void testCharDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charDownTo.kt"); } @TestMetadata("charRangeLiteral.kt") public void testCharRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charRangeLiteral.kt"); } @TestMetadata("charSequenceIndices.kt") public void testCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charSequenceIndices.kt"); } @TestMetadata("charUntil.kt") public void testCharUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/charUntil.kt"); } @TestMetadata("collectionIndices.kt") public void testCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/collectionIndices.kt"); } @TestMetadata("doubleRangeLiteral.kt") public void testDoubleRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/doubleRangeLiteral.kt"); } @TestMetadata("floatRangeLiteral.kt") public void testFloatRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/floatRangeLiteral.kt"); } @TestMetadata("intDownTo.kt") public void testIntDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intDownTo.kt"); } @TestMetadata("intRangeLiteral.kt") public void testIntRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intRangeLiteral.kt"); } @TestMetadata("intUntil.kt") public void testIntUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/intUntil.kt"); } @TestMetadata("longDownTo.kt") public void testLongDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longDownTo.kt"); } @TestMetadata("longRangeLiteral.kt") public void testLongRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longRangeLiteral.kt"); } @TestMetadata("longUntil.kt") public void testLongUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/contains/generated/longUntil.kt"); } } } @@ -19055,286 +13598,152 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Expression extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExpression() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/expression/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/expression/simpleSteppedRange.kt"); } } @@ -19342,38 +13751,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInDownTo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInDownTo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInDownTo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forIntInDownTo.kt") public void testForIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownTo.kt"); } @TestMetadata("forIntInDownToWithNonConstBounds.kt") public void testForIntInDownToWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInDownToWithNonConstBounds.kt"); } @TestMetadata("forIntInNonOptimizedDownTo.kt") public void testForIntInNonOptimizedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forIntInNonOptimizedDownTo.kt"); } @TestMetadata("forLongInDownTo.kt") public void testForLongInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forLongInDownTo.kt"); } @TestMetadata("forNullableIntInDownTo.kt") public void testForNullableIntInDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInDownTo/forNullableIntInDownTo.kt"); } } @@ -19381,104 +13789,92 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInIndices extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInIndices() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInIndices"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInCharSequenceIndices.kt") public void testForInCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCharSequenceIndices.kt"); } @TestMetadata("forInCollectionImplicitReceiverIndices.kt") public void testForInCollectionImplicitReceiverIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionImplicitReceiverIndices.kt"); } @TestMetadata("forInCollectionIndices.kt") public void testForInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInCollectionIndices.kt"); } @TestMetadata("forInNonOptimizedIndices.kt") public void testForInNonOptimizedIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInNonOptimizedIndices.kt"); } @TestMetadata("forInObjectArrayIndices.kt") public void testForInObjectArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInObjectArrayIndices.kt"); } @TestMetadata("forInPrimitiveArrayIndices.kt") public void testForInPrimitiveArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forInPrimitiveArrayIndices.kt"); } @TestMetadata("forNullableIntInArrayIndices.kt") public void testForNullableIntInArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInArrayIndices.kt"); } @TestMetadata("forNullableIntInCollectionIndices.kt") public void testForNullableIntInCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/forNullableIntInCollectionIndices.kt"); } @TestMetadata("indexOfLast.kt") public void testIndexOfLast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/indexOfLast.kt"); } @TestMetadata("kt12983_forInGenericArrayIndices.kt") public void testKt12983_forInGenericArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericArrayIndices.kt"); } @TestMetadata("kt12983_forInGenericCollectionIndices.kt") public void testKt12983_forInGenericCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInGenericCollectionIndices.kt"); } @TestMetadata("kt12983_forInSpecificArrayIndices.kt") public void testKt12983_forInSpecificArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificArrayIndices.kt"); } @TestMetadata("kt12983_forInSpecificCollectionIndices.kt") public void testKt12983_forInSpecificCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt12983_forInSpecificCollectionIndices.kt"); } @TestMetadata("kt13241_Array.kt") public void testKt13241_Array() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Array.kt"); } @TestMetadata("kt13241_CharSequence.kt") public void testKt13241_CharSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_CharSequence.kt"); } @TestMetadata("kt13241_Collection.kt") public void testKt13241_Collection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInIndices/kt13241_Collection.kt"); } } @@ -19486,118 +13882,109 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInReversed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInReversed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInReversedArrayIndices.kt") public void testForInReversedArrayIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedArrayIndices.kt"); } @TestMetadata("forInReversedCharSequenceIndices.kt") public void testForInReversedCharSequenceIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCharSequenceIndices.kt"); } @TestMetadata("forInReversedCollectionIndices.kt") public void testForInReversedCollectionIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedCollectionIndices.kt"); } @TestMetadata("forInReversedDownTo.kt") public void testForInReversedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedDownTo.kt"); } @TestMetadata("forInReversedEmptyRange.kt") public void testForInReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRange.kt"); } @TestMetadata("forInReversedEmptyRangeLiteral.kt") public void testForInReversedEmptyRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteral.kt"); } @TestMetadata("forInReversedEmptyRangeLiteralWithNonConstBounds.kt") public void testForInReversedEmptyRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedEmptyRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("forInReversedRange.kt") public void testForInReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRange.kt"); } @TestMetadata("forInReversedRangeLiteral.kt") public void testForInReversedRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteral.kt"); } @TestMetadata("forInReversedRangeLiteralWithNonConstBounds.kt") public void testForInReversedRangeLiteralWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedRangeLiteralWithNonConstBounds.kt"); } @TestMetadata("ForInReversedReversedRange.kt") public void testForInReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/ForInReversedReversedRange.kt"); } @TestMetadata("forInReversedReversedReversedRange.kt") public void testForInReversedReversedReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedReversedReversedRange.kt"); } @TestMetadata("forInReversedUntil.kt") public void testForInReversedUntil() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntil.kt"); } @TestMetadata("forInReversedUntilWithNonConstBounds.kt") public void testForInReversedUntilWithNonConstBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/forInReversedUntilWithNonConstBounds.kt"); } @TestMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EvaluationOrder extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEvaluationOrder() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInReversedDownToEvaluationOrder.kt") public void testForInReversedDownToEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedDownToEvaluationOrder.kt"); } @TestMetadata("forInReversedRangeLiteralEvaluationOrder.kt") public void testForInReversedRangeLiteralEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedRangeLiteralEvaluationOrder.kt"); } @TestMetadata("forInReversedUntilEvaluationOrder.kt") public void testForInReversedUntilEvaluationOrder() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInReversed/evaluationOrder/forInReversedUntilEvaluationOrder.kt"); } } } @@ -19606,62 +13993,57 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForInUntil extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForInUntil() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forInUntil"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInUntilChar.kt") public void testForInUntilChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar.kt"); } @TestMetadata("forInUntilChar0.kt") public void testForInUntilChar0() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilChar0.kt"); } @TestMetadata("forInUntilInt.kt") public void testForInUntilInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilInt.kt"); } @TestMetadata("forInUntilLesserInt.kt") public void testForInUntilLesserInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLesserInt.kt"); } @TestMetadata("forInUntilLong.kt") public void testForInUntilLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilLong.kt"); } @TestMetadata("forInUntilMaxint.kt") public void testForInUntilMaxint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMaxint.kt"); } @TestMetadata("forInUntilMinint.kt") public void testForInUntilMinint() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinint.kt"); } @TestMetadata("forInUntilMinlong.kt") public void testForInUntilMinlong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forInUntilMinlong.kt"); } @TestMetadata("forIntInIntUntilSmartcastInt.kt") public void testForIntInIntUntilSmartcastInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forInUntil/forIntInIntUntilSmartcastInt.kt"); } } @@ -19669,86 +14051,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ForWithPossibleOverflow extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInForWithPossibleOverflow() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/forWithPossibleOverflow"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("forInDownToCharMinValue.kt") public void testForInDownToCharMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValue.kt"); } @TestMetadata("forInDownToCharMinValueReversed.kt") public void testForInDownToCharMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToCharMinValueReversed.kt"); } @TestMetadata("forInDownToIntMinValue.kt") public void testForInDownToIntMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValue.kt"); } @TestMetadata("forInDownToIntMinValueReversed.kt") public void testForInDownToIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToIntMinValueReversed.kt"); } @TestMetadata("forInDownToLongMinValue.kt") public void testForInDownToLongMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValue.kt"); } @TestMetadata("forInDownToLongMinValueReversed.kt") public void testForInDownToLongMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInDownToLongMinValueReversed.kt"); } @TestMetadata("forInRangeToCharMaxValue.kt") public void testForInRangeToCharMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValue.kt"); } @TestMetadata("forInRangeToCharMaxValueReversed.kt") public void testForInRangeToCharMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToCharMaxValueReversed.kt"); } @TestMetadata("forInRangeToIntMaxValue.kt") public void testForInRangeToIntMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValue.kt"); } @TestMetadata("forInRangeToIntMaxValueReversed.kt") public void testForInRangeToIntMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToIntMaxValueReversed.kt"); } @TestMetadata("forInRangeToLongMaxValue.kt") public void testForInRangeToLongMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValue.kt"); } @TestMetadata("forInRangeToLongMaxValueReversed.kt") public void testForInRangeToLongMaxValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInRangeToLongMaxValueReversed.kt"); } @TestMetadata("forInUntilIntMinValueReversed.kt") public void testForInUntilIntMinValueReversed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/forWithPossibleOverflow/forInUntilIntMinValueReversed.kt"); } } @@ -19756,286 +14129,152 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Literal extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLiteral() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/literal"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("emptyDownto.kt") public void testEmptyDownto() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyDownto.kt"); } @TestMetadata("emptyRange.kt") public void testEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/emptyRange.kt"); } @TestMetadata("inexactDownToMinValue.kt") public void testInexactDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/inexactDownToMinValue.kt"); } @TestMetadata("inexactSteppedDownTo.kt") public void testInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedDownTo.kt"); } @TestMetadata("inexactSteppedRange.kt") public void testInexactSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/inexactSteppedRange.kt"); } @TestMetadata("inexactToMaxValue.kt") public void testInexactToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/inexactToMaxValue.kt"); } @TestMetadata("maxValueMinusTwoToMaxValue.kt") public void testMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueMinusTwoToMaxValue.kt"); } @TestMetadata("maxValueToMaxValue.kt") public void testMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMaxValue.kt"); } @TestMetadata("maxValueToMinValue.kt") public void testMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/maxValueToMinValue.kt"); } @TestMetadata("oneElementDownTo.kt") public void testOneElementDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementDownTo.kt"); } @TestMetadata("oneElementRange.kt") public void testOneElementRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/oneElementRange.kt"); } @TestMetadata("openRange.kt") public void testOpenRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/openRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/openRange.kt"); } @TestMetadata("progressionDownToMinValue.kt") public void testProgressionDownToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/progressionDownToMinValue.kt"); } @TestMetadata("progressionMaxValueMinusTwoToMaxValue.kt") public void testProgressionMaxValueMinusTwoToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueMinusTwoToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMaxValue.kt") public void testProgressionMaxValueToMaxValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMaxValue.kt"); } @TestMetadata("progressionMaxValueToMinValue.kt") public void testProgressionMaxValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMaxValueToMinValue.kt"); } @TestMetadata("progressionMinValueToMinValue.kt") public void testProgressionMinValueToMinValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/ranges/literal/progressionMinValueToMinValue.kt"); } @TestMetadata("reversedBackSequence.kt") public void testReversedBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedBackSequence.kt"); } @TestMetadata("reversedEmptyBackSequence.kt") public void testReversedEmptyBackSequence() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyBackSequence.kt"); } @TestMetadata("reversedEmptyRange.kt") public void testReversedEmptyRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedEmptyRange.kt"); } @TestMetadata("reversedInexactSteppedDownTo.kt") public void testReversedInexactSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedInexactSteppedDownTo.kt"); } @TestMetadata("reversedRange.kt") public void testReversedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedRange.kt"); } @TestMetadata("reversedSimpleSteppedRange.kt") public void testReversedSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/reversedSimpleSteppedRange.kt"); } @TestMetadata("simpleDownTo.kt") public void testSimpleDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleDownTo.kt"); } @TestMetadata("simpleRange.kt") public void testSimpleRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRange.kt"); } @TestMetadata("simpleRangeWithNonConstantEnds.kt") public void testSimpleRangeWithNonConstantEnds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleRangeWithNonConstantEnds.kt"); } @TestMetadata("simpleSteppedDownTo.kt") public void testSimpleSteppedDownTo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedDownTo.kt"); } @TestMetadata("simpleSteppedRange.kt") public void testSimpleSteppedRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/literal/simpleSteppedRange.kt"); } } @@ -20043,26 +14282,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NullableLoopParameter extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNullableLoopParameter() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/ranges/nullableLoopParameter"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("progressionExpression.kt") public void testProgressionExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/progressionExpression.kt"); } @TestMetadata("rangeExpression.kt") public void testRangeExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeExpression.kt"); } @TestMetadata("rangeLiteral.kt") public void testRangeLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/ranges/nullableLoopParameter/rangeLiteral.kt"); } } } @@ -20071,6 +14311,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reflection extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInReflection() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -20079,229 +14323,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Annotations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/annotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotationRetentionAnnotation.kt") public void testAnnotationRetentionAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationRetentionAnnotation.kt"); } @TestMetadata("annotationsOnJavaMembers.kt") public void testAnnotationsOnJavaMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/annotationsOnJavaMembers.kt"); } @TestMetadata("findAnnotation.kt") public void testFindAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/findAnnotation.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/openSuspendFun.kt"); } @TestMetadata("privateAnnotation.kt") public void testPrivateAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/privateAnnotation.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyAccessors.kt"); } @TestMetadata("propertyWithoutBackingField.kt") public void testPropertyWithoutBackingField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/propertyWithoutBackingField.kt"); } @TestMetadata("retentions.kt") public void testRetentions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/retentions.kt"); } @TestMetadata("simpleClassAnnotation.kt") public void testSimpleClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleClassAnnotation.kt"); } @TestMetadata("simpleConstructorAnnotation.kt") public void testSimpleConstructorAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleConstructorAnnotation.kt"); } @TestMetadata("simpleFunAnnotation.kt") public void testSimpleFunAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleFunAnnotation.kt"); } @TestMetadata("simpleParamAnnotation.kt") public void testSimpleParamAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleParamAnnotation.kt"); } @TestMetadata("simpleValAnnotation.kt") public void testSimpleValAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/annotations/simpleValAnnotation.kt"); } } @@ -20309,628 +14401,204 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Call extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callInstanceJavaMethod.kt") public void testCallInstanceJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/callInstanceJavaMethod.kt"); } @TestMetadata("callPrivateJavaMethod.kt") public void testCallPrivateJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/callPrivateJavaMethod.kt"); } @TestMetadata("callStaticJavaMethod.kt") public void testCallStaticJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/callStaticJavaMethod.kt"); } @TestMetadata("cannotCallEnumConstructor.kt") public void testCannotCallEnumConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/cannotCallEnumConstructor.kt"); } @TestMetadata("disallowNullValueForNotNullField.kt") public void testDisallowNullValueForNotNullField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/disallowNullValueForNotNullField.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/equalsHashCodeToString.kt"); } @TestMetadata("exceptionHappened.kt") public void testExceptionHappened() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/exceptionHappened.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverride.kt"); } @TestMetadata("fakeOverrideSubstituted.kt") public void testFakeOverrideSubstituted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/fakeOverrideSubstituted.kt"); } @TestMetadata("incorrectNumberOfArguments.kt") public void testIncorrectNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/incorrectNumberOfArguments.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/innerClassConstructor.kt"); } @TestMetadata("jvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/jvmStatic.kt"); } @TestMetadata("jvmStaticInObjectIncorrectReceiver.kt") public void testJvmStaticInObjectIncorrectReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/jvmStaticInObjectIncorrectReceiver.kt"); } @TestMetadata("localClassMember.kt") public void testLocalClassMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/localClassMember.kt"); } @TestMetadata("memberOfGenericClass.kt") public void testMemberOfGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/memberOfGenericClass.kt"); } @TestMetadata("privateProperty.kt") public void testPrivateProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/privateProperty.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/propertyAccessors.kt"); } @TestMetadata("propertyGetterAndGetFunctionDifferentReturnType.kt") public void testPropertyGetterAndGetFunctionDifferentReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/propertyGetterAndGetFunctionDifferentReturnType.kt"); } @TestMetadata("protectedMembers.kt") public void testProtectedMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/protectedMembers.kt"); } @TestMetadata("returnUnit.kt") public void testReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/returnUnit.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunction.kt") public void testSimpleMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/simpleMemberFunction.kt"); } @TestMetadata("simpleTopLevelFunctions.kt") public void testSimpleTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/simpleTopLevelFunctions.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/call/bound") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Bound extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInBound() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/call/bound"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("companionObjectPropertyAccessors.kt") public void testCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/companionObjectPropertyAccessors.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionFunction.kt"); } @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/extensionPropertyAccessors.kt"); } @TestMetadata("innerClassConstructor.kt") public void testInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/innerClassConstructor.kt"); } @TestMetadata("javaInstanceField.kt") public void testJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceField.kt"); } @TestMetadata("javaInstanceMethod.kt") public void testJavaInstanceMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/javaInstanceMethod.kt"); } @TestMetadata("jvmStaticCompanionObjectPropertyAccessors.kt") public void testJvmStaticCompanionObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticCompanionObjectPropertyAccessors.kt"); } @TestMetadata("jvmStaticObjectFunction.kt") public void testJvmStaticObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectFunction.kt"); } @TestMetadata("jvmStaticObjectPropertyAccessors.kt") public void testJvmStaticObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/jvmStaticObjectPropertyAccessors.kt"); } @TestMetadata("memberFunction.kt") public void testMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberFunction.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/memberPropertyAccessors.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectFunction.kt"); } @TestMetadata("objectPropertyAccessors.kt") public void testObjectPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/call/bound/objectPropertyAccessors.kt"); } } } @@ -20939,348 +14607,112 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallBy extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCallBy() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/callBy"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boundExtensionFunction.kt") public void testBoundExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionFunction.kt"); } @TestMetadata("boundExtensionPropertyAcessor.kt") public void testBoundExtensionPropertyAcessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/boundExtensionPropertyAcessor.kt"); } @TestMetadata("boundJvmStaticInObject.kt") public void testBoundJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/boundJvmStaticInObject.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/companionObject.kt"); } @TestMetadata("defaultAndNonDefaultIntertwined.kt") public void testDefaultAndNonDefaultIntertwined() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/defaultAndNonDefaultIntertwined.kt"); } @TestMetadata("extensionFunction.kt") public void testExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/extensionFunction.kt"); } @TestMetadata("jvmStaticInCompanionObject.kt") public void testJvmStaticInCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInCompanionObject.kt"); } @TestMetadata("jvmStaticInObject.kt") public void testJvmStaticInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/jvmStaticInObject.kt"); } @TestMetadata("manyArgumentsNoneDefaultConstructor.kt") public void testManyArgumentsNoneDefaultConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultConstructor.kt"); } @TestMetadata("manyArgumentsNoneDefaultFunction.kt") public void testManyArgumentsNoneDefaultFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsNoneDefaultFunction.kt"); } @TestMetadata("manyArgumentsOnlyOneDefault.kt") public void testManyArgumentsOnlyOneDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/manyArgumentsOnlyOneDefault.kt"); } @TestMetadata("manyMaskArguments.kt") public void testManyMaskArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/manyMaskArguments.kt"); } @TestMetadata("nonDefaultParameterOmitted.kt") public void testNonDefaultParameterOmitted() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/nonDefaultParameterOmitted.kt"); } @TestMetadata("nullValue.kt") public void testNullValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/nullValue.kt"); } @TestMetadata("ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt") public void testOrdinaryMethodIsInvokedWhenNoDefaultValuesAreUsed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/ordinaryMethodIsInvokedWhenNoDefaultValuesAreUsed.kt"); } @TestMetadata("primitiveDefaultValues.kt") public void testPrimitiveDefaultValues() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/primitiveDefaultValues.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/privateMemberFunction.kt"); } @TestMetadata("simpleConstructor.kt") public void testSimpleConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleConstructor.kt"); } @TestMetadata("simpleMemberFunciton.kt") public void testSimpleMemberFunciton() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleMemberFunciton.kt"); } @TestMetadata("simpleTopLevelFunction.kt") public void testSimpleTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/callBy/simpleTopLevelFunction.kt"); } } @@ -21288,105 +14720,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassLiterals extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClassLiterals() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classLiterals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotationClassLiteral.kt") public void testAnnotationClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classLiterals/annotationClassLiteral.kt"); } @TestMetadata("arrays.kt") public void testArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classLiterals/arrays.kt"); } @TestMetadata("builtinClassLiterals.kt") public void testBuiltinClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classLiterals/builtinClassLiterals.kt"); } @TestMetadata("genericArrays.kt") public void testGenericArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericArrays.kt"); } @TestMetadata("genericClass.kt") public void testGenericClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/genericClass.kt"); } @TestMetadata("reifiedTypeClassLiteral.kt") public void testReifiedTypeClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classLiterals/reifiedTypeClassLiteral.kt"); } @TestMetadata("simpleClassLiteral.kt") public void testSimpleClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classLiterals/simpleClassLiteral.kt"); } } @@ -21394,218 +14768,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Classes extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/classes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classSimpleName.kt") public void testClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/classSimpleName.kt"); } @TestMetadata("companionObject.kt") public void testCompanionObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/companionObject.kt"); } @TestMetadata("createInstance.kt") public void testCreateInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/createInstance.kt"); } @TestMetadata("declaredMembers.kt") public void testDeclaredMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/declaredMembers.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/javaVoid.kt"); } @TestMetadata("jvmName.kt") public void testJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/jvmName.kt"); } @TestMetadata("localClassSimpleName.kt") public void testLocalClassSimpleName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/classes/localClassSimpleName.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClasses.kt"); } @TestMetadata("nestedClassesJava.kt") public void testNestedClassesJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/nestedClassesJava.kt"); } @TestMetadata("objectInstance.kt") public void testObjectInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/objectInstance.kt"); } @TestMetadata("primitiveKClassEquality.kt") public void testPrimitiveKClassEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/primitiveKClassEquality.kt"); } @TestMetadata("qualifiedName.kt") public void testQualifiedName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/qualifiedName.kt"); } @TestMetadata("starProjectedType.kt") public void testStarProjectedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/classes/starProjectedType.kt"); } } @@ -21613,93 +14846,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotationClass.kt") public void testAnnotationClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/constructors/annotationClass.kt"); } @TestMetadata("classesWithoutConstructors.kt") public void testClassesWithoutConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/constructors/classesWithoutConstructors.kt"); } @TestMetadata("constructorName.kt") public void testConstructorName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/constructors/constructorName.kt"); } @TestMetadata("primaryConstructor.kt") public void testPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/constructors/primaryConstructor.kt"); } @TestMetadata("simpleGetConstructors.kt") public void testSimpleGetConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/constructors/simpleGetConstructors.kt"); } } @@ -21707,212 +14884,72 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateAnnotation extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCreateAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/createAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotationType.kt") public void testAnnotationType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/annotationType.kt"); } @TestMetadata("arrayOfKClasses.kt") public void testArrayOfKClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/arrayOfKClasses.kt"); } @TestMetadata("callByJava.kt") public void testCallByJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByJava.kt"); } @TestMetadata("callByKotlin.kt") public void testCallByKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callByKotlin.kt"); } @TestMetadata("callJava.kt") public void testCallJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callJava.kt"); } @TestMetadata("callKotlin.kt") public void testCallKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/callKotlin.kt"); } @TestMetadata("createJdkAnnotationInstance.kt") public void testCreateJdkAnnotationInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/createJdkAnnotationInstance.kt"); } @TestMetadata("enumKClassAnnotation.kt") public void testEnumKClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/enumKClassAnnotation.kt"); } @TestMetadata("equalsHashCodeToString.kt") public void testEqualsHashCodeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/equalsHashCodeToString.kt"); } @TestMetadata("floatingPointParameters.kt") public void testFloatingPointParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/floatingPointParameters.kt"); } @TestMetadata("parameterNamedEquals.kt") public void testParameterNamedEquals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/parameterNamedEquals.kt"); } @TestMetadata("primitivesAndArrays.kt") public void testPrimitivesAndArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/createAnnotation/primitivesAndArrays.kt"); } } @@ -21920,416 +14957,132 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Enclosing extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEnclosing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/enclosing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousObjectInInlinedLambda.kt") public void testAnonymousObjectInInlinedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/anonymousObjectInInlinedLambda.kt"); } @TestMetadata("classInLambda.kt") public void testClassInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/classInLambda.kt"); } @TestMetadata("functionExpressionInProperty.kt") public void testFunctionExpressionInProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/functionExpressionInProperty.kt"); } @TestMetadata("kt11969.kt") public void testKt11969() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt11969.kt"); } @TestMetadata("kt6368.kt") public void testKt6368() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6368.kt"); } @TestMetadata("kt6691_lambdaInSamConstructor.kt") public void testKt6691_lambdaInSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/kt6691_lambdaInSamConstructor.kt"); } @TestMetadata("lambdaInClassObject.kt") public void testLambdaInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInClassObject.kt"); } @TestMetadata("lambdaInConstructor.kt") public void testLambdaInConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInConstructor.kt"); } @TestMetadata("lambdaInFunction.kt") public void testLambdaInFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInFunction.kt"); } @TestMetadata("lambdaInLambda.kt") public void testLambdaInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLambda.kt"); } @TestMetadata("lambdaInLocalClassConstructor.kt") public void testLambdaInLocalClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassConstructor.kt"); } @TestMetadata("lambdaInLocalClassSuperCall.kt") public void testLambdaInLocalClassSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalClassSuperCall.kt"); } @TestMetadata("lambdaInLocalFunction.kt") public void testLambdaInLocalFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInLocalFunction.kt"); } @TestMetadata("lambdaInMemberFunction.kt") public void testLambdaInMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunction.kt"); } @TestMetadata("lambdaInMemberFunctionInLocalClass.kt") public void testLambdaInMemberFunctionInLocalClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInLocalClass.kt"); } @TestMetadata("lambdaInMemberFunctionInNestedClass.kt") public void testLambdaInMemberFunctionInNestedClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInMemberFunctionInNestedClass.kt"); } @TestMetadata("lambdaInObjectDeclaration.kt") public void testLambdaInObjectDeclaration() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectDeclaration.kt"); } @TestMetadata("lambdaInObjectExpression.kt") public void testLambdaInObjectExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectExpression.kt"); } @TestMetadata("lambdaInObjectLiteralSuperCall.kt") public void testLambdaInObjectLiteralSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInObjectLiteralSuperCall.kt"); } @TestMetadata("lambdaInPackage.kt") public void testLambdaInPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPackage.kt"); } @TestMetadata("lambdaInPropertyGetter.kt") public void testLambdaInPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertyGetter.kt"); } @TestMetadata("lambdaInPropertySetter.kt") public void testLambdaInPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/lambdaInPropertySetter.kt"); } @TestMetadata("localClassInTopLevelFunction.kt") public void testLocalClassInTopLevelFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/localClassInTopLevelFunction.kt"); } @TestMetadata("objectInLambda.kt") public void testObjectInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/enclosing/objectInLambda.kt"); } } @@ -22337,167 +15090,62 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Functions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFunctions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/functions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("declaredVsInheritedFunctions.kt") public void testDeclaredVsInheritedFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/declaredVsInheritedFunctions.kt"); } @TestMetadata("functionFromStdlib.kt") public void testFunctionFromStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/functionFromStdlib.kt"); } @TestMetadata("functionReferenceErasedToKFunction.kt") public void testFunctionReferenceErasedToKFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/functionReferenceErasedToKFunction.kt"); } @TestMetadata("genericOverriddenFunction.kt") public void testGenericOverriddenFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/genericOverriddenFunction.kt"); } @TestMetadata("instanceOfFunction.kt") public void testInstanceOfFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/instanceOfFunction.kt"); } @TestMetadata("javaClassGetFunctions.kt") public void testJavaClassGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/javaClassGetFunctions.kt"); } @TestMetadata("platformName.kt") public void testPlatformName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/platformName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/platformName.kt"); } @TestMetadata("privateMemberFunction.kt") public void testPrivateMemberFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/privateMemberFunction.kt"); } @TestMetadata("simpleGetFunctions.kt") public void testSimpleGetFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/functions/simpleGetFunctions.kt"); } @TestMetadata("simpleNames.kt") public void testSimpleNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/functions/simpleNames.kt"); } } @@ -22505,246 +15153,82 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GenericSignature extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInGenericSignature() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/genericSignature"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("covariantOverride.kt") public void testCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/covariantOverride.kt"); } @TestMetadata("defaultImplsGenericSignature.kt") public void testDefaultImplsGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/defaultImplsGenericSignature.kt"); } @TestMetadata("functionLiteralGenericSignature.kt") public void testFunctionLiteralGenericSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/functionLiteralGenericSignature.kt"); } @TestMetadata("genericBackingFieldSignature.kt") public void testGenericBackingFieldSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericBackingFieldSignature.kt"); } @TestMetadata("genericMethodSignature.kt") public void testGenericMethodSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/genericMethodSignature.kt"); } @TestMetadata("kt11121.kt") public void testKt11121() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt11121.kt"); } @TestMetadata("kt5112.kt") public void testKt5112() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt5112.kt"); } @TestMetadata("kt6106.kt") public void testKt6106() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/kt6106.kt"); } @TestMetadata("signatureOfDeepGenericInner.kt") public void testSignatureOfDeepGenericInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepGenericInner.kt"); } @TestMetadata("signatureOfDeepInner.kt") public void testSignatureOfDeepInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInner.kt"); } @TestMetadata("signatureOfDeepInnerLastGeneric.kt") public void testSignatureOfDeepInnerLastGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfDeepInnerLastGeneric.kt"); } @TestMetadata("signatureOfGenericInnerGenericOuter.kt") public void testSignatureOfGenericInnerGenericOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerGenericOuter.kt"); } @TestMetadata("signatureOfGenericInnerSimpleOuter.kt") public void testSignatureOfGenericInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfGenericInnerSimpleOuter.kt"); } @TestMetadata("signatureOfSimpleInnerSimpleOuter.kt") public void testSignatureOfSimpleInnerSimpleOuter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/genericSignature/signatureOfSimpleInnerSimpleOuter.kt"); } } @@ -22752,25 +15236,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class IsInstance extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInIsInstance() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/isInstance"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("isInstanceCastAndSafeCast.kt") public void testIsInstanceCastAndSafeCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/isInstance/isInstanceCastAndSafeCast.kt"); } } @@ -22778,161 +15254,57 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class KClassInAnnotation extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInKClassInAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/kClassInAnnotation"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/array.kt"); } @TestMetadata("arrayInJava.kt") public void testArrayInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/arrayInJava.kt"); } @TestMetadata("basic.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basic.kt"); } @TestMetadata("basicInJava.kt") public void testBasicInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/basicInJava.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/checkcast.kt"); } @TestMetadata("forceWrapping.kt") public void testForceWrapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/forceWrapping.kt"); } @TestMetadata("vararg.kt") public void testVararg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/vararg.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/varargInJava.kt"); } @TestMetadata("wrappingForCallableReferences.kt") public void testWrappingForCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/kClassInAnnotation/wrappingForCallableReferences.kt"); } } @@ -22940,25 +15312,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LambdaClasses extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLambdaClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/lambdaClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("parameterNamesAndNullability.kt") public void testParameterNamesAndNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/lambdaClasses/parameterNamesAndNullability.kt"); } } @@ -22966,254 +15330,94 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Mapping extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constructor.kt") public void testConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/constructor.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/extensionProperty.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/functions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/functions.kt"); } @TestMetadata("inlineReifiedFun.kt") public void testInlineReifiedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/inlineReifiedFun.kt"); } @TestMetadata("mappedClassIsEqualToClassLiteral.kt") public void testMappedClassIsEqualToClassLiteral() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/mappedClassIsEqualToClassLiteral.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/memberProperty.kt"); } @TestMetadata("openSuspendFun.kt") public void testOpenSuspendFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/openSuspendFun.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessors.kt"); } @TestMetadata("propertyAccessorsWithJvmName.kt") public void testPropertyAccessorsWithJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/propertyAccessorsWithJvmName.kt"); } @TestMetadata("syntheticFields.kt") public void testSyntheticFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/syntheticFields.kt"); } @TestMetadata("topLevelFunctionOtherFile.kt") public void testTopLevelFunctionOtherFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelFunctionOtherFile.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/topLevelProperty.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class FakeOverrides extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInFakeOverrides() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/fakeOverrides"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("javaFieldGetterSetter.kt") public void testJavaFieldGetterSetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaFieldGetterSetter.kt"); } @TestMetadata("javaMethod.kt") public void testJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/fakeOverrides/javaMethod.kt"); } } @@ -23221,42 +15425,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class JvmStatic extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInJvmStatic() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/jvmStatic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("companionObjectFunction.kt") public void testCompanionObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/companionObjectFunction.kt"); } @TestMetadata("objectFunction.kt") public void testObjectFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/jvmStatic/objectFunction.kt"); } } @@ -23264,263 +15448,87 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/mapping/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("annotationConstructorParameters.kt") public void testAnnotationConstructorParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/annotationConstructorParameters.kt"); } @TestMetadata("array.kt") public void testArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/array.kt"); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/constructors.kt"); } @TestMetadata("genericArrayElementType.kt") public void testGenericArrayElementType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/genericArrayElementType.kt"); } @TestMetadata("innerGenericTypeArgument.kt") public void testInnerGenericTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/innerGenericTypeArgument.kt"); } @TestMetadata("memberFunctions.kt") public void testMemberFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/memberFunctions.kt"); } @TestMetadata("overrideAnyWithPrimitive.kt") public void testOverrideAnyWithPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/overrideAnyWithPrimitive.kt"); } @TestMetadata("parameterizedTypeArgument.kt") public void testParameterizedTypeArgument() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypeArgument.kt"); } @TestMetadata("parameterizedTypes.kt") public void testParameterizedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/parameterizedTypes.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/propertyAccessors.kt"); } @TestMetadata("supertypes.kt") public void testSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/supertypes.kt"); } @TestMetadata("topLevelFunctions.kt") public void testTopLevelFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/topLevelFunctions.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/typeParameters.kt"); } @TestMetadata("unit.kt") public void testUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/unit.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/mapping/types/withNullability.kt"); } } } @@ -23529,297 +15537,97 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callableReferencesEqualToCallablesFromAPI.kt") public void testCallableReferencesEqualToCallablesFromAPI() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/callableReferencesEqualToCallablesFromAPI.kt"); } @TestMetadata("classToString.kt") public void testClassToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/classToString.kt"); } @TestMetadata("extensionPropertyReceiverToString.kt") public void testExtensionPropertyReceiverToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/extensionPropertyReceiverToString.kt"); } @TestMetadata("functionEqualsHashCode.kt") public void testFunctionEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionEqualsHashCode.kt"); } @TestMetadata("functionFromStdlibMultiFileFacade.kt") public void testFunctionFromStdlibMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibMultiFileFacade.kt"); } @TestMetadata("functionFromStdlibSingleFileFacade.kt") public void testFunctionFromStdlibSingleFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionFromStdlibSingleFileFacade.kt"); } @TestMetadata("functionToString.kt") public void testFunctionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/functionToString.kt"); } @TestMetadata("memberExtensionToString.kt") public void testMemberExtensionToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/memberExtensionToString.kt"); } @TestMetadata("parametersEqualsHashCode.kt") public void testParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersEqualsHashCode.kt"); } @TestMetadata("parametersToString.kt") public void testParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/parametersToString.kt"); } @TestMetadata("propertyEqualsHashCode.kt") public void testPropertyEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyEqualsHashCode.kt"); } @TestMetadata("propertyToString.kt") public void testPropertyToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/propertyToString.kt"); } @TestMetadata("typeEqualsHashCode.kt") public void testTypeEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeEqualsHashCode.kt"); } @TestMetadata("typeParametersEqualsHashCode.kt") public void testTypeParametersEqualsHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersEqualsHashCode.kt"); } @TestMetadata("typeParametersToString.kt") public void testTypeParametersToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeParametersToString.kt"); } @TestMetadata("typeToString.kt") public void testTypeToString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToString.kt"); } @TestMetadata("typeToStringInnerGeneric.kt") public void testTypeToStringInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/methodsFromAny/typeToStringInnerGeneric.kt"); } } @@ -23827,161 +15635,57 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Modifiers extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInModifiers() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/modifiers"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callableModality.kt") public void testCallableModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableModality.kt"); } @TestMetadata("callableVisibility.kt") public void testCallableVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/callableVisibility.kt"); } @TestMetadata("classModality.kt") public void testClassModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/classModality.kt"); } @TestMetadata("classVisibility.kt") public void testClassVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/classVisibility.kt"); } @TestMetadata("classes.kt") public void testClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/classes.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/functions.kt"); } @TestMetadata("javaVisibility.kt") public void testJavaVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/javaVisibility.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/properties.kt"); } @TestMetadata("typeParameters.kt") public void testTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/modifiers/typeParameters.kt"); } } @@ -23989,59 +15693,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultifileClasses extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultifileClasses() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/multifileClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callFunctionsInMultifileClass.kt") public void testCallFunctionsInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callFunctionsInMultifileClass.kt"); } @TestMetadata("callPropertiesInMultifileClass.kt") public void testCallPropertiesInMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/callPropertiesInMultifileClass.kt"); } @TestMetadata("javaFieldForVarAndConstVal.kt") public void testJavaFieldForVarAndConstVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/multifileClasses/javaFieldForVarAndConstVal.kt"); } } @@ -24049,153 +15721,74 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoReflectAtRuntime extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNoReflectAtRuntime() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaClass.kt"); } @TestMetadata("javaVoid.kt") public void testJavaVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/javaVoid.kt"); } @TestMetadata("primitiveJavaClass.kt") public void testPrimitiveJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/primitiveJavaClass.kt"); } @TestMetadata("propertyGetSetName.kt") public void testPropertyGetSetName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyGetSetName.kt"); } @TestMetadata("propertyInstanceof.kt") public void testPropertyInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/propertyInstanceof.kt"); } @TestMetadata("reifiedTypeJavaClass.kt") public void testReifiedTypeJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/reifiedTypeJavaClass.kt"); } @TestMetadata("simpleClassLiterals.kt") public void testSimpleClassLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/simpleClassLiterals.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MethodsFromAny extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMethodsFromAny() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callableReferences.kt") public void testCallableReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/callableReferences.kt"); } @TestMetadata("classReference.kt") public void testClassReference() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/classReference.kt"); } @TestMetadata("delegatedProperty.kt") public void testDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/noReflectAtRuntime/methodsFromAny/delegatedProperty.kt"); } } } @@ -24204,195 +15797,67 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Parameters extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/parameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("boundInnerClassConstructor.kt") public void testBoundInnerClassConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/boundInnerClassConstructor.kt"); } @TestMetadata("boundObjectMemberReferences.kt") public void testBoundObjectMemberReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/boundObjectMemberReferences.kt"); } @TestMetadata("boundReferences.kt") public void testBoundReferences() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/boundReferences.kt"); } @TestMetadata("findParameterByName.kt") public void testFindParameterByName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/findParameterByName.kt"); } @TestMetadata("functionParameterNameAndIndex.kt") public void testFunctionParameterNameAndIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/functionParameterNameAndIndex.kt"); } @TestMetadata("instanceExtensionReceiverAndValueParameters.kt") public void testInstanceExtensionReceiverAndValueParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/instanceExtensionReceiverAndValueParameters.kt"); } @TestMetadata("isMarkedNullable.kt") public void testIsMarkedNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/isMarkedNullable.kt"); } @TestMetadata("isOptional.kt") public void testIsOptional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/isOptional.kt"); } @TestMetadata("javaAnnotationConstructor.kt") public void testJavaAnnotationConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/javaAnnotationConstructor.kt"); } @TestMetadata("kinds.kt") public void testKinds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/kinds.kt"); } @TestMetadata("propertySetter.kt") public void testPropertySetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/parameters/propertySetter.kt"); } } @@ -24400,522 +15865,170 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Properties extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInProperties() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("allVsDeclared.kt") public void testAllVsDeclared() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/allVsDeclared.kt"); } @TestMetadata("callPrivatePropertyFromGetProperties.kt") public void testCallPrivatePropertyFromGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/callPrivatePropertyFromGetProperties.kt"); } @TestMetadata("declaredVsInheritedProperties.kt") public void testDeclaredVsInheritedProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/declaredVsInheritedProperties.kt"); } @TestMetadata("fakeOverridesInSubclass.kt") public void testFakeOverridesInSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/fakeOverridesInSubclass.kt"); } @TestMetadata("genericClassLiteralPropertyReceiverIsStar.kt") public void testGenericClassLiteralPropertyReceiverIsStar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/genericClassLiteralPropertyReceiverIsStar.kt"); } @TestMetadata("genericOverriddenProperty.kt") public void testGenericOverriddenProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/genericOverriddenProperty.kt"); } @TestMetadata("genericProperty.kt") public void testGenericProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/genericProperty.kt"); } @TestMetadata("getExtensionPropertiesMutableVsReadonly.kt") public void testGetExtensionPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getExtensionPropertiesMutableVsReadonly.kt"); } @TestMetadata("getPropertiesMutableVsReadonly.kt") public void testGetPropertiesMutableVsReadonly() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getPropertiesMutableVsReadonly.kt"); } @TestMetadata("invokeKProperty.kt") public void testInvokeKProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/invokeKProperty.kt"); } @TestMetadata("javaPropertyInheritedInKotlin.kt") public void testJavaPropertyInheritedInKotlin() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/javaPropertyInheritedInKotlin.kt"); } @TestMetadata("javaStaticField.kt") public void testJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/javaStaticField.kt"); } @TestMetadata("kotlinPropertyInheritedInJava.kt") public void testKotlinPropertyInheritedInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/kotlinPropertyInheritedInJava.kt"); } @TestMetadata("memberAndMemberExtensionWithSameName.kt") public void testMemberAndMemberExtensionWithSameName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/memberAndMemberExtensionWithSameName.kt"); } @TestMetadata("mutatePrivateJavaInstanceField.kt") public void testMutatePrivateJavaInstanceField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaInstanceField.kt"); } @TestMetadata("mutatePrivateJavaStaticField.kt") public void testMutatePrivateJavaStaticField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/mutatePrivateJavaStaticField.kt"); } @TestMetadata("noConflictOnKotlinGetterAndJavaField.kt") public void testNoConflictOnKotlinGetterAndJavaField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/noConflictOnKotlinGetterAndJavaField.kt"); } @TestMetadata("overrideKotlinPropertyByJavaMethod.kt") public void testOverrideKotlinPropertyByJavaMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/overrideKotlinPropertyByJavaMethod.kt"); } @TestMetadata("privateClassVal.kt") public void testPrivateClassVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVal.kt"); } @TestMetadata("privateClassVar.kt") public void testPrivateClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/privateClassVar.kt"); } @TestMetadata("privateFakeOverrideFromSuperclass.kt") public void testPrivateFakeOverrideFromSuperclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/privateFakeOverrideFromSuperclass.kt"); } @TestMetadata("privateJvmStaticVarInObject.kt") public void testPrivateJvmStaticVarInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/privateJvmStaticVarInObject.kt"); } @TestMetadata("privatePropertyCallIsAccessibleOnAccessors.kt") public void testPrivatePropertyCallIsAccessibleOnAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/privatePropertyCallIsAccessibleOnAccessors.kt"); } @TestMetadata("privateToThisAccessors.kt") public void testPrivateToThisAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/privateToThisAccessors.kt"); } @TestMetadata("propertyOfNestedClassAndArrayType.kt") public void testPropertyOfNestedClassAndArrayType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/propertyOfNestedClassAndArrayType.kt"); } @TestMetadata("protectedClassVar.kt") public void testProtectedClassVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/protectedClassVar.kt"); } @TestMetadata("publicClassValAccessible.kt") public void testPublicClassValAccessible() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/publicClassValAccessible.kt"); } @TestMetadata("referenceToJavaFieldOfKotlinSubclass.kt") public void testReferenceToJavaFieldOfKotlinSubclass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/referenceToJavaFieldOfKotlinSubclass.kt"); } @TestMetadata("simpleGetProperties.kt") public void testSimpleGetProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/simpleGetProperties.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/properties/accessors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Accessors extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessorNames.kt") public void testAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/accessorNames.kt"); } public void testAllFilesPresentInAccessors() throws Exception { @@ -24924,70 +16037,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("extensionPropertyAccessors.kt") public void testExtensionPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/extensionPropertyAccessors.kt"); } @TestMetadata("memberExtensions.kt") public void testMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberExtensions.kt"); } @TestMetadata("memberPropertyAccessors.kt") public void testMemberPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/memberPropertyAccessors.kt"); } @TestMetadata("topLevelPropertyAccessors.kt") public void testTopLevelPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/accessors/topLevelPropertyAccessors.kt"); } } @@ -24995,263 +16060,87 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class GetDelegate extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInGetDelegate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/getDelegate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("booleanPropertyNameStartsWithIs.kt") public void testBooleanPropertyNameStartsWithIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/booleanPropertyNameStartsWithIs.kt"); } @TestMetadata("boundExtensionProperty.kt") public void testBoundExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundExtensionProperty.kt"); } @TestMetadata("boundMemberProperty.kt") public void testBoundMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/boundMemberProperty.kt"); } @TestMetadata("extensionProperty.kt") public void testExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/extensionProperty.kt"); } @TestMetadata("fakeOverride.kt") public void testFakeOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/fakeOverride.kt"); } @TestMetadata("getExtensionDelegate.kt") public void testGetExtensionDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/getExtensionDelegate.kt"); } @TestMetadata("kPropertyForDelegatedProperty.kt") public void testKPropertyForDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/kPropertyForDelegatedProperty.kt"); } @TestMetadata("memberExtensionProperty.kt") public void testMemberExtensionProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberExtensionProperty.kt"); } @TestMetadata("memberProperty.kt") public void testMemberProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/memberProperty.kt"); } @TestMetadata("nameClashClassAndCompanion.kt") public void testNameClashClassAndCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashClassAndCompanion.kt"); } @TestMetadata("nameClashExtensionProperties.kt") public void testNameClashExtensionProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/nameClashExtensionProperties.kt"); } @TestMetadata("noSetAccessibleTrue.kt") public void testNoSetAccessibleTrue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/noSetAccessibleTrue.kt"); } @TestMetadata("notDelegatedProperty.kt") public void testNotDelegatedProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/notDelegatedProperty.kt"); } @TestMetadata("overrideDelegatedByDelegated.kt") public void testOverrideDelegatedByDelegated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/overrideDelegatedByDelegated.kt"); } @TestMetadata("topLevelProperty.kt") public void testTopLevelProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/properties/getDelegate/topLevelProperty.kt"); } } @@ -25259,6 +16148,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class LocalDelegated extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLocalDelegated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/properties/localDelegated"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -25269,25 +16162,17 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltIns extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltIns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/specialBuiltIns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("getMembersOfStandardJavaClasses.kt") public void testGetMembersOfStandardJavaClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/specialBuiltIns/getMembersOfStandardJavaClasses.kt"); } } @@ -25295,93 +16180,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Supertypes extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSupertypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/supertypes"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("builtInClassSupertypes.kt") public void testBuiltInClassSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/supertypes/builtInClassSupertypes.kt"); } @TestMetadata("genericSubstitution.kt") public void testGenericSubstitution() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/supertypes/genericSubstitution.kt"); } @TestMetadata("isSubclassOfIsSuperclassOf.kt") public void testIsSubclassOfIsSuperclassOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/supertypes/isSubclassOfIsSuperclassOf.kt"); } @TestMetadata("primitives.kt") public void testPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/supertypes/primitives.kt"); } @TestMetadata("simpleSupertypes.kt") public void testSimpleSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/supertypes/simpleSupertypes.kt"); } } @@ -25389,59 +16218,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeParameters extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTypeParameters() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/typeParameters"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("declarationSiteVariance.kt") public void testDeclarationSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/typeParameters/declarationSiteVariance.kt"); } @TestMetadata("typeParametersAndNames.kt") public void testTypeParametersAndNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/typeParameters/typeParametersAndNames.kt"); } @TestMetadata("upperBounds.kt") public void testUpperBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/typeParameters/upperBounds.kt"); } } @@ -25449,271 +16246,99 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Types extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTypes() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("classifierIsClass.kt") public void testClassifierIsClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsClass.kt"); } @TestMetadata("classifierIsTypeParameter.kt") public void testClassifierIsTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/classifierIsTypeParameter.kt"); } @TestMetadata("classifiersOfBuiltInTypes.kt") public void testClassifiersOfBuiltInTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/classifiersOfBuiltInTypes.kt"); } @TestMetadata("innerGenericArguments.kt") public void testInnerGenericArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/innerGenericArguments.kt"); } @TestMetadata("jvmErasureOfClass.kt") public void testJvmErasureOfClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfClass.kt"); } @TestMetadata("jvmErasureOfTypeParameter.kt") public void testJvmErasureOfTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/jvmErasureOfTypeParameter.kt"); } @TestMetadata("platformTypeNotEqualToKotlinType.kt") public void testPlatformTypeNotEqualToKotlinType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/platformTypeNotEqualToKotlinType.kt"); } @TestMetadata("typeArguments.kt") public void testTypeArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/typeArguments.kt"); } @TestMetadata("useSiteVariance.kt") public void testUseSiteVariance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/useSiteVariance.kt"); } @TestMetadata("withNullability.kt") public void testWithNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/withNullability.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/withNullability.kt"); } @TestMetadata("compiler/testData/codegen/box/reflection/types/createType") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CreateType extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCreateType() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/createType"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("equality.kt") public void testEquality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/createType/equality.kt"); } @TestMetadata("innerGeneric.kt") public void testInnerGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/createType/innerGeneric.kt"); } @TestMetadata("simpleCreateType.kt") public void testSimpleCreateType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/createType/simpleCreateType.kt"); } @TestMetadata("typeParameter.kt") public void testTypeParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/createType/typeParameter.kt"); } @TestMetadata("wrongNumberOfArguments.kt") public void testWrongNumberOfArguments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/createType/wrongNumberOfArguments.kt"); } } @@ -25721,76 +16346,32 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Subtyping extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSubtyping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reflection/types/subtyping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("platformType.kt") public void testPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/platformType.kt"); } @TestMetadata("simpleGenericTypes.kt") public void testSimpleGenericTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleGenericTypes.kt"); } @TestMetadata("simpleSubtypeSupertype.kt") public void testSimpleSubtypeSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/simpleSubtypeSupertype.kt"); } @TestMetadata("typeProjection.kt") public void testTypeProjection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reflection/types/subtyping/typeProjection.kt"); } } } @@ -25800,826 +16381,437 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Regressions extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInRegressions() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/regressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("approximateIntersectionType.kt") public void testApproximateIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/approximateIntersectionType.kt"); } @TestMetadata("arrayLengthNPE.kt") public void testArrayLengthNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/arrayLengthNPE.kt"); } @TestMetadata("collections.kt") public void testCollections() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/collections.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/collections.kt"); } @TestMetadata("commonSupertypeContravariant.kt") public void testCommonSupertypeContravariant() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant.kt"); } @TestMetadata("commonSupertypeContravariant2.kt") public void testCommonSupertypeContravariant2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/commonSupertypeContravariant2.kt"); } @TestMetadata("dontCaptureTypesWithTypeVariables.kt") public void testDontCaptureTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/dontCaptureTypesWithTypeVariables.kt"); } @TestMetadata("doubleMerge.kt") public void testDoubleMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/doubleMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/doubleMerge.kt"); } @TestMetadata("floatMerge.kt") public void testFloatMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/floatMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/floatMerge.kt"); } @TestMetadata("functionLiteralAsLastExpressionInBlock.kt") public void testFunctionLiteralAsLastExpressionInBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/functionLiteralAsLastExpressionInBlock.kt"); } @TestMetadata("generic.kt") public void testGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/generic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/generic.kt"); } @TestMetadata("getGenericInterfaces.kt") public void testGetGenericInterfaces() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/getGenericInterfaces.kt"); } @TestMetadata("hashCodeNPE.kt") public void testHashCodeNPE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/hashCodeNPE.kt"); } @TestMetadata("internalTopLevelOtherPackage.kt") public void testInternalTopLevelOtherPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt"); } @TestMetadata("intersectionAsLastLambda.kt") public void testIntersectionAsLastLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/intersectionAsLastLambda.kt"); } @TestMetadata("intersectionOfEqualTypes.kt") public void testIntersectionOfEqualTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/intersectionOfEqualTypes.kt"); } @TestMetadata("kt10143.kt") public void testKt10143() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10143.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10143.kt"); } @TestMetadata("kt10934.kt") public void testKt10934() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt10934.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt10934.kt"); } @TestMetadata("Kt1149.kt") public void testKt1149() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1149.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1149.kt"); } @TestMetadata("kt1172.kt") public void testKt1172() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1172.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt1172.kt"); } @TestMetadata("kt13381.kt") public void testKt13381() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt13381.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt13381.kt"); } @TestMetadata("kt14447.kt") public void testKt14447() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt14447.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt14447.kt"); } @TestMetadata("kt1515.kt") public void testKt1515() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1515.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt1515.kt"); } @TestMetadata("kt15196.kt") public void testKt15196() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt15196.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt15196.kt"); } @TestMetadata("kt1528.kt") public void testKt1528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1528.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1528.kt"); } @TestMetadata("kt1568.kt") public void testKt1568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1568.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt1568.kt"); } @TestMetadata("Kt1619Test.kt") public void testKt1619Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt1619Test.kt"); } @TestMetadata("kt1779.kt") public void testKt1779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1779.kt"); } @TestMetadata("kt1800.kt") public void testKt1800() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1800.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1800.kt"); } @TestMetadata("kt1845.kt") public void testKt1845() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1845.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt1845.kt"); } @TestMetadata("kt18779.kt") public void testKt18779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt18779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt18779.kt"); } @TestMetadata("kt1932.kt") public void testKt1932() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt1932.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt1932.kt"); } @TestMetadata("kt2017.kt") public void testKt2017() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2017.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2017.kt"); } @TestMetadata("kt2060.kt") public void testKt2060() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2060.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2060.kt"); } @TestMetadata("kt2210.kt") public void testKt2210() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2210.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2210.kt"); } @TestMetadata("kt2246.kt") public void testKt2246() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2246.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt2246.kt"); } @TestMetadata("kt2318.kt") public void testKt2318() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2318.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt2318.kt"); } @TestMetadata("Kt2495Test.kt") public void testKt2495Test() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/Kt2495Test.kt"); } @TestMetadata("kt2509.kt") public void testKt2509() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2509.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt2509.kt"); } @TestMetadata("kt2593.kt") public void testKt2593() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt2593.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt2593.kt"); } @TestMetadata("kt274.kt") public void testKt274() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt274.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt274.kt"); } @TestMetadata("kt3046.kt") public void testKt3046() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3046.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt3046.kt"); } @TestMetadata("kt3107.kt") public void testKt3107() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3107.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3107.kt"); } @TestMetadata("kt3421.kt") public void testKt3421() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3421.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3421.kt"); } @TestMetadata("kt344.kt") public void testKt344() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt344.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt344.kt"); } @TestMetadata("kt3442.kt") public void testKt3442() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3442.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3442.kt"); } @TestMetadata("kt3587.kt") public void testKt3587() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3587.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3587.kt"); } @TestMetadata("kt3850.kt") public void testKt3850() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3850.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3850.kt"); } @TestMetadata("kt3903.kt") public void testKt3903() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt3903.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt3903.kt"); } @TestMetadata("kt4142.kt") public void testKt4142() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4142.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4142.kt"); } @TestMetadata("kt4259.kt") public void testKt4259() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4259.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt4259.kt"); } @TestMetadata("kt4262.kt") public void testKt4262() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4262.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt4262.kt"); } @TestMetadata("kt4281.kt") public void testKt4281() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4281.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt4281.kt"); } @TestMetadata("kt5056.kt") public void testKt5056() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5056.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5056.kt"); } @TestMetadata("kt528.kt") public void testKt528() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt528.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt528.kt"); } @TestMetadata("kt529.kt") public void testKt529() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt529.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt529.kt"); } @TestMetadata("kt533.kt") public void testKt533() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt533.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt533.kt"); } @TestMetadata("kt5395.kt") public void testKt5395() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5395.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5395.kt"); } @TestMetadata("kt5445.kt") public void testKt5445() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt5445.kt"); } @TestMetadata("kt5445_2.kt") public void testKt5445_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5445_2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt5445_2.kt"); } @TestMetadata("kt5786_privateWithDefault.kt") public void testKt5786_privateWithDefault() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5786_privateWithDefault.kt"); } @TestMetadata("kt5953.kt") public void testKt5953() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5953.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt5953.kt"); } @TestMetadata("kt6153.kt") public void testKt6153() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6153.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6153.kt"); } @TestMetadata("kt6434.kt") public void testKt6434() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt6434.kt"); } @TestMetadata("kt6434_2.kt") public void testKt6434_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6434_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt6434_2.kt"); } @TestMetadata("kt6485.kt") public void testKt6485() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt6485.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt6485.kt"); } @TestMetadata("kt715.kt") public void testKt715() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt715.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt715.kt"); } @TestMetadata("kt7401.kt") public void testKt7401() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt7401.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt7401.kt"); } @TestMetadata("kt789.kt") public void testKt789() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt789.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt789.kt"); } @TestMetadata("kt864.kt") public void testKt864() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt864.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/kt864.kt"); } @TestMetadata("kt998.kt") public void testKt998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt998.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/kt998.kt"); } @TestMetadata("lambdaAsLastExpressionInLambda.kt") public void testLambdaAsLastExpressionInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaAsLastExpressionInLambda.kt"); } @TestMetadata("lambdaPostponeConstruction.kt") public void testLambdaPostponeConstruction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaPostponeConstruction.kt"); } @TestMetadata("lambdaWrongReturnType.kt") public void testLambdaWrongReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/lambdaWrongReturnType.kt"); } @TestMetadata("nestedIntersection.kt") public void testNestedIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/nestedIntersection.kt"); } @TestMetadata("noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt") public void testNoAssertionsWhenNullableTypeParameterReplacedWithIntersectionType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noAssertionsWhenNullableTypeParameterReplacedWithIntersectionType.kt"); } @TestMetadata("noCapturingForTypesWithTypeVariables.kt") public void testNoCapturingForTypesWithTypeVariables() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noCapturingForTypesWithTypeVariables.kt"); } @TestMetadata("noResolutionRecursion.kt") public void testNoResolutionRecursion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/noResolutionRecursion.kt"); } @TestMetadata("nullabilityForCommonCapturedSupertypes.kt") public void testNullabilityForCommonCapturedSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullabilityForCommonCapturedSupertypes.kt"); } @TestMetadata("nullableAfterExclExcl.kt") public void testNullableAfterExclExcl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/nullableAfterExclExcl.kt"); } @TestMetadata("objectCaptureOuterConstructorProperty.kt") public void testObjectCaptureOuterConstructorProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectCaptureOuterConstructorProperty.kt"); } @TestMetadata("objectInsideDelegation.kt") public void testObjectInsideDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/objectInsideDelegation.kt"); } @TestMetadata("referenceToSelfInLocal.kt") public void testReferenceToSelfInLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/referenceToSelfInLocal.kt"); } @TestMetadata("resolvedCallForGetOperator.kt") public void testResolvedCallForGetOperator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/resolvedCallForGetOperator.kt"); } @TestMetadata("supertypeDepth.kt") public void testSupertypeDepth() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/regressions/supertypeDepth.kt"); } @TestMetadata("typeCastException.kt") public void testTypeCastException() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/typeCastException.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/regressions/typeCastException.kt"); } } @@ -26627,540 +16819,204 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Reified extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInReified() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/anonymousObject.kt"); } @TestMetadata("anonymousObjectNoPropagate.kt") public void testAnonymousObjectNoPropagate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/anonymousObjectNoPropagate.kt"); } @TestMetadata("anonymousObjectReifiedSupertype.kt") public void testAnonymousObjectReifiedSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/anonymousObjectReifiedSupertype.kt"); } @TestMetadata("approximateCapturedTypes.kt") public void testApproximateCapturedTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/approximateCapturedTypes.kt"); } @TestMetadata("asOnPlatformType.kt") public void testAsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/asOnPlatformType.kt"); } @TestMetadata("checkcast.kt") public void testCheckcast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/checkcast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/checkcast.kt"); } @TestMetadata("copyToArray.kt") public void testCopyToArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/copyToArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/copyToArray.kt"); } @TestMetadata("DIExample.kt") public void testDIExample() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/DIExample.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/DIExample.kt"); } @TestMetadata("defaultJavaClass.kt") public void testDefaultJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/defaultJavaClass.kt"); } @TestMetadata("expectedTypeFromCast.kt") public void testExpectedTypeFromCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/expectedTypeFromCast.kt"); } @TestMetadata("filterIsInstance.kt") public void testFilterIsInstance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/filterIsInstance.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/filterIsInstance.kt"); } @TestMetadata("innerAnonymousObject.kt") public void testInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/innerAnonymousObject.kt"); } @TestMetadata("instanceof.kt") public void testInstanceof() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/instanceof.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/instanceof.kt"); } @TestMetadata("isOnPlatformType.kt") public void testIsOnPlatformType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/isOnPlatformType.kt"); } @TestMetadata("javaClass.kt") public void testJavaClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/javaClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/javaClass.kt"); } @TestMetadata("nestedReified.kt") public void testNestedReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReified.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/nestedReified.kt"); } @TestMetadata("nestedReifiedSignature.kt") public void testNestedReifiedSignature() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/nestedReifiedSignature.kt"); } @TestMetadata("newArrayInt.kt") public void testNewArrayInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/newArrayInt.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/newArrayInt.kt"); } @TestMetadata("nonInlineableLambdaInReifiedFunction.kt") public void testNonInlineableLambdaInReifiedFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/nonInlineableLambdaInReifiedFunction.kt"); } @TestMetadata("recursiveInnerAnonymousObject.kt") public void testRecursiveInnerAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/recursiveInnerAnonymousObject.kt"); } @TestMetadata("recursiveNewArray.kt") public void testRecursiveNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/recursiveNewArray.kt"); } @TestMetadata("recursiveNonInlineableLambda.kt") public void testRecursiveNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/recursiveNonInlineableLambda.kt"); } @TestMetadata("reifiedChain.kt") public void testReifiedChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/reifiedChain.kt"); } @TestMetadata("reifiedInlineFunOfObject.kt") public void testReifiedInlineFunOfObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObject.kt"); } @TestMetadata("reifiedInlineFunOfObjectWithinReified.kt") public void testReifiedInlineFunOfObjectWithinReified() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/reifiedInlineFunOfObjectWithinReified.kt"); } @TestMetadata("reifiedInlineIntoNonInlineableLambda.kt") public void testReifiedInlineIntoNonInlineableLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/reifiedInlineIntoNonInlineableLambda.kt"); } @TestMetadata("safecast.kt") public void testSafecast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/safecast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/safecast.kt"); } @TestMetadata("sameIndexRecursive.kt") public void testSameIndexRecursive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/sameIndexRecursive.kt"); } @TestMetadata("spreads.kt") public void testSpreads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/spreads.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/spreads.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/varargs.kt"); } @TestMetadata("compiler/testData/codegen/box/reified/arraysReification") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ArraysReification extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInArraysReification() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/reified/arraysReification"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("instanceOf.kt") public void testInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOf.kt"); } @TestMetadata("instanceOfArrays.kt") public void testInstanceOfArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/arraysReification/instanceOfArrays.kt"); } @TestMetadata("jClass.kt") public void testJClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/arraysReification/jClass.kt"); } @TestMetadata("jaggedArray.kt") public void testJaggedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArray.kt"); } @TestMetadata("jaggedArrayOfNulls.kt") public void testJaggedArrayOfNulls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedArrayOfNulls.kt"); } @TestMetadata("jaggedDeep.kt") public void testJaggedDeep() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/reified/arraysReification/jaggedDeep.kt"); } } } @@ -27169,97 +17025,77 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SafeCall extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSafeCall() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/safeCall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("genericNull.kt") public void testGenericNull() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/genericNull.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/genericNull.kt"); } @TestMetadata("kt1572.kt") public void testKt1572() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt1572.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt1572.kt"); } @TestMetadata("kt232.kt") public void testKt232() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt232.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/safeCall/kt232.kt"); } @TestMetadata("kt245.kt") public void testKt245() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt245.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt245.kt"); } @TestMetadata("kt247.kt") public void testKt247() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt247.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt247.kt"); } @TestMetadata("kt3430.kt") public void testKt3430() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt3430.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt3430.kt"); } @TestMetadata("kt4733.kt") public void testKt4733() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/kt4733.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/kt4733.kt"); } @TestMetadata("primitive.kt") public void testPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitive.kt"); } @TestMetadata("primitiveEqSafeCall.kt") public void testPrimitiveEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveEqSafeCall.kt"); } @TestMetadata("primitiveNotEqSafeCall.kt") public void testPrimitiveNotEqSafeCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/primitiveNotEqSafeCall.kt"); } @TestMetadata("safeCallEqPrimitive.kt") public void testSafeCallEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallEqPrimitive.kt"); } @TestMetadata("safeCallNotEqPrimitive.kt") public void testSafeCallNotEqPrimitive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallNotEqPrimitive.kt"); } @TestMetadata("safeCallOnLong.kt") public void testSafeCallOnLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/safeCall/safeCallOnLong.kt"); } } @@ -27267,6 +17103,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sam extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSam() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -27275,88 +17115,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Constructors extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInConstructors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sam/constructors"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("comparator.kt") public void testComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/comparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/comparator.kt"); } @TestMetadata("filenameFilter.kt") public void testFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/sam/constructors/filenameFilter.kt"); } @TestMetadata("nonLiteralComparator.kt") public void testNonLiteralComparator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralComparator.kt"); } @TestMetadata("nonLiteralFilenameFilter.kt") public void testNonLiteralFilenameFilter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/sam/constructors/nonLiteralFilenameFilter.kt"); } @TestMetadata("samWrappersDifferentFiles.kt") public void testSamWrappersDifferentFiles() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/sam/constructors/samWrappersDifferentFiles.kt"); } @TestMetadata("sameWrapperClass.kt") public void testSameWrapperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/sam/constructors/sameWrapperClass.kt"); } } } @@ -27365,20 +17159,22 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Sealed extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSealed() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/sealed"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("objects.kt") public void testObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/objects.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/objects.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/sealed/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/sealed/simple.kt"); } } @@ -27386,16 +17182,18 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SecondaryConstructors extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessToCompanion.kt") public void testAccessToCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt"); } @TestMetadata("accessToNestedObject.kt") public void testAccessToNestedObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/accessToNestedObject.kt"); } public void testAllFilesPresentInSecondaryConstructors() throws Exception { @@ -27404,152 +17202,127 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("basicNoPrimaryManySinks.kt") public void testBasicNoPrimaryManySinks() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt"); } @TestMetadata("basicNoPrimaryOneSink.kt") public void testBasicNoPrimaryOneSink() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt"); } @TestMetadata("basicPrimary.kt") public void testBasicPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt"); } @TestMetadata("callFromLocalSubClass.kt") public void testCallFromLocalSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromLocalSubClass.kt"); } @TestMetadata("callFromPrimaryWithNamedArgs.kt") public void testCallFromPrimaryWithNamedArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithNamedArgs.kt"); } @TestMetadata("callFromPrimaryWithOptionalArgs.kt") public void testCallFromPrimaryWithOptionalArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromPrimaryWithOptionalArgs.kt"); } @TestMetadata("callFromSubClass.kt") public void testCallFromSubClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/callFromSubClass.kt"); } @TestMetadata("clashingDefaultConstructors.kt") public void testClashingDefaultConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt"); } @TestMetadata("dataClasses.kt") public void testDataClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt"); } @TestMetadata("defaultArgs.kt") public void testDefaultArgs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt"); } @TestMetadata("defaultParametersNotDuplicated.kt") public void testDefaultParametersNotDuplicated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/defaultParametersNotDuplicated.kt"); } @TestMetadata("delegateWithComplexExpression.kt") public void testDelegateWithComplexExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegateWithComplexExpression.kt"); } @TestMetadata("delegatedThisWithLambda.kt") public void testDelegatedThisWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegatedThisWithLambda.kt"); } @TestMetadata("delegationWithPrimary.kt") public void testDelegationWithPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/enums.kt"); } @TestMetadata("generics.kt") public void testGenerics() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/generics.kt"); } @TestMetadata("innerClasses.kt") public void testInnerClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt"); } @TestMetadata("innerClassesInheritance.kt") public void testInnerClassesInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt"); } @TestMetadata("localClasses.kt") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt"); } @TestMetadata("superCallPrimary.kt") public void testSuperCallPrimary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt"); } @TestMetadata("superCallSecondary.kt") public void testSuperCallSecondary() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt"); } @TestMetadata("varargs.kt") public void testVarargs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/varargs.kt"); } @TestMetadata("withNonLocalReturn.kt") public void testWithNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt"); } @TestMetadata("withReturn.kt") public void testWithReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt"); } @TestMetadata("withReturnUnit.kt") public void testWithReturnUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt"); } } @@ -27557,6 +17330,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SignatureAnnotations extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSignatureAnnotations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/signatureAnnotations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -27566,6 +17343,10 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Smap extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSmap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smap"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @@ -27575,103 +17356,82 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SmartCasts extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSmartCasts() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/smartCasts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("falseSmartCast.kt") public void testFalseSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/falseSmartCast.kt"); } @TestMetadata("genericIntersection.kt") public void testGenericIntersection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericIntersection.kt"); } @TestMetadata("genericSet.kt") public void testGenericSet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/genericSet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/genericSet.kt"); } @TestMetadata("implicitExtensionReceiver.kt") public void testImplicitExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitExtensionReceiver.kt"); } @TestMetadata("implicitMemberReceiver.kt") public void testImplicitMemberReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitMemberReceiver.kt"); } @TestMetadata("implicitReceiver.kt") public void testImplicitReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiver.kt"); } @TestMetadata("implicitReceiverInWhen.kt") public void testImplicitReceiverInWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitReceiverInWhen.kt"); } @TestMetadata("implicitToGrandSon.kt") public void testImplicitToGrandSon() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/implicitToGrandSon.kt"); } @TestMetadata("kt17725.kt") public void testKt17725() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt17725.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt17725.kt"); } @TestMetadata("kt19100.kt") public void testKt19100() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/kt19100.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/kt19100.kt"); } @TestMetadata("lambdaArgumentWithoutType.kt") public void testLambdaArgumentWithoutType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/smartCasts/lambdaArgumentWithoutType.kt"); } @TestMetadata("nullSmartCast.kt") public void testNullSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/nullSmartCast.kt"); } @TestMetadata("smartCastInsideIf.kt") public void testSmartCastInsideIf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/smartCastInsideIf.kt"); } @TestMetadata("whenSmartCast.kt") public void testWhenSmartCast() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/smartCasts/whenSmartCast.kt"); } } @@ -27679,207 +17439,132 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SpecialBuiltins extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSpecialBuiltins() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/specialBuiltins"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("bridgeNotEmptyMap.kt") public void testBridgeNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/specialBuiltins/bridgeNotEmptyMap.kt"); } @TestMetadata("bridges.kt") public void testBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/bridges.kt"); } @TestMetadata("collectionImpl.kt") public void testCollectionImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/specialBuiltins/collectionImpl.kt"); } @TestMetadata("commonBridgesTarget.kt") public void testCommonBridgesTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/commonBridgesTarget.kt"); } @TestMetadata("emptyList.kt") public void testEmptyList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyList.kt"); } @TestMetadata("emptyMap.kt") public void testEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyMap.kt"); } @TestMetadata("emptyStringMap.kt") public void testEmptyStringMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/emptyStringMap.kt"); } @TestMetadata("entrySetSOE.kt") public void testEntrySetSOE() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/entrySetSOE.kt"); } @TestMetadata("enumAsOrdinaled.kt") public void testEnumAsOrdinaled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/enumAsOrdinaled.kt"); } @TestMetadata("exceptionCause.kt") public void testExceptionCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/exceptionCause.kt"); } @TestMetadata("explicitSuperCall.kt") public void testExplicitSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/explicitSuperCall.kt"); } @TestMetadata("irrelevantRemoveAtOverride.kt") public void testIrrelevantRemoveAtOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/irrelevantRemoveAtOverride.kt"); } @TestMetadata("maps.kt") public void testMaps() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/maps.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/maps.kt"); } @TestMetadata("noSpecialBridgeInSuperClass.kt") public void testNoSpecialBridgeInSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/noSpecialBridgeInSuperClass.kt"); } @TestMetadata("notEmptyListAny.kt") public void testNotEmptyListAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyListAny.kt"); } @TestMetadata("notEmptyMap.kt") public void testNotEmptyMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/specialBuiltins/notEmptyMap.kt"); } @TestMetadata("redundantStubForSize.kt") public void testRedundantStubForSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/redundantStubForSize.kt"); } @TestMetadata("removeAtTwoSpecialBridges.kt") public void testRemoveAtTwoSpecialBridges() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeAtTwoSpecialBridges.kt"); } @TestMetadata("removeSetInt.kt") public void testRemoveSetInt() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/removeSetInt.kt"); } @TestMetadata("throwable.kt") public void testThrowable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwable.kt"); } @TestMetadata("throwableCause.kt") public void testThrowableCause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableCause.kt"); } @TestMetadata("throwableImpl.kt") public void testThrowableImpl() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImpl.kt"); } @TestMetadata("throwableImplWithSecondaryConstructor.kt") public void testThrowableImplWithSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/throwableImplWithSecondaryConstructor.kt"); } @TestMetadata("valuesInsideEnum.kt") public void testValuesInsideEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/specialBuiltins/valuesInsideEnum.kt"); } } @@ -27887,192 +17572,92 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Statics extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStatics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/statics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("anonymousInitializerIObject.kt") public void testAnonymousInitializerIObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerIObject.kt"); } @TestMetadata("anonymousInitializerInClassObject.kt") public void testAnonymousInitializerInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/anonymousInitializerInClassObject.kt"); } @TestMetadata("fields.kt") public void testFields() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/fields.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/fields.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/functions.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/functions.kt"); } @TestMetadata("hidePrivateByPublic.kt") public void testHidePrivateByPublic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/hidePrivateByPublic.kt"); } @TestMetadata("incInClassObject.kt") public void testIncInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInClassObject.kt"); } @TestMetadata("incInObject.kt") public void testIncInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/incInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/incInObject.kt"); } @TestMetadata("inheritedPropertyInClassObject.kt") public void testInheritedPropertyInClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInClassObject.kt"); } @TestMetadata("inheritedPropertyInObject.kt") public void testInheritedPropertyInObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/inheritedPropertyInObject.kt"); } @TestMetadata("inlineCallsStaticMethod.kt") public void testInlineCallsStaticMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/inlineCallsStaticMethod.kt"); } @TestMetadata("kt8089.kt") public void testKt8089() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/kt8089.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/kt8089.kt"); } @TestMetadata("protectedSamConstructor.kt") public void testProtectedSamConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/protectedSamConstructor.kt"); } @TestMetadata("protectedStatic.kt") public void testProtectedStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/protectedStatic.kt"); } @TestMetadata("protectedStatic2.kt") public void testProtectedStatic2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStatic2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/protectedStatic2.kt"); } @TestMetadata("protectedStaticAndInline.kt") public void testProtectedStaticAndInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/statics/protectedStaticAndInline.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/statics/syntheticAccessor.kt"); } } @@ -28080,38 +17665,37 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StoreStackBeforeInline extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStoreStackBeforeInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/storeStackBeforeInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("differentTypes.kt") public void testDifferentTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/differentTypes.kt"); } @TestMetadata("primitiveMerge.kt") public void testPrimitiveMerge() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/primitiveMerge.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/simple.kt"); } @TestMetadata("unreachableMarker.kt") public void testUnreachableMarker() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/unreachableMarker.kt"); } @TestMetadata("withLambda.kt") public void testWithLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/storeStackBeforeInline/withLambda.kt"); } } @@ -28119,138 +17703,102 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Strings extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStrings() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/strings"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("constInStringTemplate.kt") public void testConstInStringTemplate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/constInStringTemplate.kt"); } @TestMetadata("ea35743.kt") public void testEa35743() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/ea35743.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/ea35743.kt"); } @TestMetadata("forInString.kt") public void testForInString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/forInString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/forInString.kt"); } @TestMetadata("interpolation.kt") public void testInterpolation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/interpolation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/interpolation.kt"); } @TestMetadata("kt2592.kt") public void testKt2592() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt2592.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt2592.kt"); } @TestMetadata("kt3571.kt") public void testKt3571() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3571.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3571.kt"); } @TestMetadata("kt3652.kt") public void testKt3652() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt3652.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt3652.kt"); } @TestMetadata("kt5389_stringBuilderGet.kt") public void testKt5389_stringBuilderGet() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5389_stringBuilderGet.kt"); } @TestMetadata("kt5956.kt") public void testKt5956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt5956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt5956.kt"); } @TestMetadata("kt881.kt") public void testKt881() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt881.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt881.kt"); } @TestMetadata("kt889.kt") public void testKt889() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt889.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/strings/kt889.kt"); } @TestMetadata("kt894.kt") public void testKt894() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/kt894.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/kt894.kt"); } @TestMetadata("multilineStringsWithTemplates.kt") public void testMultilineStringsWithTemplates() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/multilineStringsWithTemplates.kt"); } @TestMetadata("nestedConcat.kt") public void testNestedConcat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/nestedConcat.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/nestedConcat.kt"); } @TestMetadata("rawStrings.kt") public void testRawStrings() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStrings.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStrings.kt"); } @TestMetadata("rawStringsWithManyQuotes.kt") public void testRawStringsWithManyQuotes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/rawStringsWithManyQuotes.kt"); } @TestMetadata("stringBuilderAppend.kt") public void testStringBuilderAppend() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/strings/stringBuilderAppend.kt"); } @TestMetadata("stringPlusOnlyWorksOnString.kt") public void testStringPlusOnlyWorksOnString() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/strings/stringPlusOnlyWorksOnString.kt"); } } @@ -28258,220 +17806,194 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Super extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSuper() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("basicmethodSuperClass.kt") public void testBasicmethodSuperClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperClass.kt"); } @TestMetadata("basicmethodSuperTrait.kt") public void testBasicmethodSuperTrait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicmethodSuperTrait.kt"); } @TestMetadata("basicproperty.kt") public void testBasicproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/basicproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/basicproperty.kt"); } @TestMetadata("enclosedFun.kt") public void testEnclosedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedFun.kt"); } @TestMetadata("enclosedVar.kt") public void testEnclosedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/enclosedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/enclosedVar.kt"); } @TestMetadata("innerClassLabeledSuper.kt") public void testInnerClassLabeledSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper.kt"); } @TestMetadata("innerClassLabeledSuper2.kt") public void testInnerClassLabeledSuper2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuper2.kt"); } @TestMetadata("innerClassLabeledSuperProperty.kt") public void testInnerClassLabeledSuperProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty.kt"); } @TestMetadata("innerClassLabeledSuperProperty2.kt") public void testInnerClassLabeledSuperProperty2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassLabeledSuperProperty2.kt"); } @TestMetadata("innerClassQualifiedFunctionCall.kt") public void testInnerClassQualifiedFunctionCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedFunctionCall.kt"); } @TestMetadata("innerClassQualifiedPropertyAccess.kt") public void testInnerClassQualifiedPropertyAccess() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/innerClassQualifiedPropertyAccess.kt"); } @TestMetadata("kt14243.kt") public void testKt14243() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243.kt"); } @TestMetadata("kt14243_2.kt") public void testKt14243_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_2.kt"); } @TestMetadata("kt14243_class.kt") public void testKt14243_class() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_class.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_class.kt"); } @TestMetadata("kt14243_prop.kt") public void testKt14243_prop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt14243_prop.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt14243_prop.kt"); } @TestMetadata("kt3492ClassFun.kt") public void testKt3492ClassFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassFun.kt"); } @TestMetadata("kt3492ClassProperty.kt") public void testKt3492ClassProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492ClassProperty.kt"); } @TestMetadata("kt3492TraitFun.kt") public void testKt3492TraitFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitFun.kt"); } @TestMetadata("kt3492TraitProperty.kt") public void testKt3492TraitProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt3492TraitProperty.kt"); } @TestMetadata("kt4173.kt") public void testKt4173() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173.kt"); } @TestMetadata("kt4173_2.kt") public void testKt4173_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_2.kt"); } @TestMetadata("kt4173_3.kt") public void testKt4173_3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4173_3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4173_3.kt"); } @TestMetadata("kt4982.kt") public void testKt4982() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/kt4982.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/kt4982.kt"); } @TestMetadata("multipleSuperTraits.kt") public void testMultipleSuperTraits() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/multipleSuperTraits.kt"); } @TestMetadata("traitproperty.kt") public void testTraitproperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/traitproperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/traitproperty.kt"); } @TestMetadata("unqualifiedSuper.kt") public void testUnqualifiedSuper() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuper.kt"); } @TestMetadata("unqualifiedSuperWithDeeperHierarchies.kt") public void testUnqualifiedSuperWithDeeperHierarchies() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithDeeperHierarchies.kt"); } @TestMetadata("unqualifiedSuperWithMethodsOfAny.kt") public void testUnqualifiedSuperWithMethodsOfAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/unqualifiedSuperWithMethodsOfAny.kt"); } @TestMetadata("compiler/testData/codegen/box/super/superConstructor") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SuperConstructor extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSuperConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/super/superConstructor"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt17464_arrayOf.kt") public void testKt17464_arrayOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_arrayOf.kt"); } @TestMetadata("kt17464_linkedMapOf.kt") public void testKt17464_linkedMapOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt17464_linkedMapOf.kt"); } @TestMetadata("kt18356.kt") public void testKt18356() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356.kt"); } @TestMetadata("kt18356_2.kt") public void testKt18356_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/kt18356_2.kt"); } @TestMetadata("objectExtendsInner.kt") public void testObjectExtendsInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsInner.kt"); } @TestMetadata("objectExtendsLocalInner.kt") public void testObjectExtendsLocalInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/super/superConstructor/objectExtendsLocalInner.kt"); } } } @@ -28480,195 +18002,67 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Synchronized extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSynchronized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/synchronized"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("changeMonitor.kt") public void testChangeMonitor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/changeMonitor.kt"); } @TestMetadata("exceptionInMonitorExpression.kt") public void testExceptionInMonitorExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/exceptionInMonitorExpression.kt"); } @TestMetadata("finally.kt") public void testFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/finally.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/finally.kt"); } @TestMetadata("longValue.kt") public void testLongValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/longValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/longValue.kt"); } @TestMetadata("nestedDifferentObjects.kt") public void testNestedDifferentObjects() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/nestedDifferentObjects.kt"); } @TestMetadata("nestedSameObject.kt") public void testNestedSameObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/nestedSameObject.kt"); } @TestMetadata("nonLocalReturn.kt") public void testNonLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/nonLocalReturn.kt"); } @TestMetadata("objectValue.kt") public void testObjectValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/objectValue.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/objectValue.kt"); } @TestMetadata("sync.kt") public void testSync() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/sync.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/sync.kt"); } @TestMetadata("value.kt") public void testValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/value.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/value.kt"); } @TestMetadata("wait.kt") public void testWait() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/synchronized/wait.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/synchronized/wait.kt"); } } @@ -28676,34 +18070,33 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class SyntheticAccessors extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("accessorForGenericConstructor.kt") public void testAccessorForGenericConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericConstructor.kt"); } @TestMetadata("accessorForGenericMethod.kt") public void testAccessorForGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethod.kt"); } @TestMetadata("accessorForGenericMethodWithDefaults.kt") public void testAccessorForGenericMethodWithDefaults() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForGenericMethodWithDefaults.kt"); } @TestMetadata("accessorForProtected.kt") public void testAccessorForProtected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtected.kt"); } @TestMetadata("accessorForProtectedInvokeVirtual.kt") public void testAccessorForProtectedInvokeVirtual() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/accessorForProtectedInvokeVirtual.kt"); } public void testAllFilesPresentInSyntheticAccessors() throws Exception { @@ -28712,84 +18105,52 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("jvmNameForAccessors.kt") public void testJvmNameForAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/syntheticAccessors/jvmNameForAccessors.kt"); } @TestMetadata("kt10047.kt") public void testKt10047() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt10047.kt"); } @TestMetadata("kt21258_indirect.kt") public void testKt21258_indirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_indirect.kt"); } @TestMetadata("kt21258_simple.kt") public void testKt21258_simple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt21258_simple.kt"); } @TestMetadata("kt9717.kt") public void testKt9717() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717.kt"); } @TestMetadata("kt9717DifferentPackages.kt") public void testKt9717DifferentPackages() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9717DifferentPackages.kt"); } @TestMetadata("kt9958.kt") public void testKt9958() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958.kt"); } @TestMetadata("kt9958Interface.kt") public void testKt9958Interface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/kt9958Interface.kt"); } @TestMetadata("protectedFromLambda.kt") public void testProtectedFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/syntheticAccessors/protectedFromLambda.kt"); } @TestMetadata("syntheticAccessorNames.kt") public void testSyntheticAccessorNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/syntheticAccessors/syntheticAccessorNames.kt"); } } @@ -28797,37 +18158,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ToArray extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInToArray() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/toArray"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt3177-toTypedArray.kt") public void testKt3177_toTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/kt3177-toTypedArray.kt"); } @TestMetadata("returnToTypedArray.kt") public void testReturnToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/toArray/returnToTypedArray.kt"); } @TestMetadata("toTypedArray.kt") public void testToTypedArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/toArray/toTypedArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/toArray/toTypedArray.kt"); } } @@ -28835,88 +18186,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TopLevelPrivate extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTopLevelPrivate() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/topLevelPrivate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade.kt") public void testNoPrivateNoAccessorsInMultiFileFacade() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade.kt"); } @TestMetadata("noPrivateNoAccessorsInMultiFileFacade2.kt") public void testNoPrivateNoAccessorsInMultiFileFacade2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/topLevelPrivate/noPrivateNoAccessorsInMultiFileFacade2.kt"); } @TestMetadata("privateInInlineNested.kt") public void testPrivateInInlineNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateInInlineNested.kt"); } @TestMetadata("privateVisibility.kt") public void testPrivateVisibility() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/topLevelPrivate/privateVisibility.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessor.kt"); } @TestMetadata("syntheticAccessorInMultiFile.kt") public void testSyntheticAccessorInMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/topLevelPrivate/syntheticAccessorInMultiFile.kt"); } } @@ -28924,21 +18229,13 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Traits extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + @TestMetadata("abstractClassInheritsFromInterface.kt") public void testAbstractClassInheritsFromInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/traits/abstractClassInheritsFromInterface.kt"); } public void testAllFilesPresentInTraits() throws Exception { @@ -28947,220 +18244,147 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestMetadata("diamondPropertyAccessors.kt") public void testDiamondPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/diamondPropertyAccessors.kt"); } @TestMetadata("genericMethod.kt") public void testGenericMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/genericMethod.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/genericMethod.kt"); } @TestMetadata("indirectlyInheritPropertyGetter.kt") public void testIndirectlyInheritPropertyGetter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/indirectlyInheritPropertyGetter.kt"); } @TestMetadata("inheritJavaInterface.kt") public void testInheritJavaInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/traits/inheritJavaInterface.kt"); } @TestMetadata("inheritedFun.kt") public void testInheritedFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedFun.kt"); } @TestMetadata("inheritedVar.kt") public void testInheritedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/inheritedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/inheritedVar.kt"); } @TestMetadata("interfaceDefaultImpls.kt") public void testInterfaceDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/traits/interfaceDefaultImpls.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirect.kt") public void testInterfaceWithNonAbstractFunIndirect() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirect.kt"); } @TestMetadata("interfaceWithNonAbstractFunIndirectGeneric.kt") public void testInterfaceWithNonAbstractFunIndirectGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/interfaceWithNonAbstractFunIndirectGeneric.kt"); } @TestMetadata("kt1936.kt") public void testKt1936() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936.kt"); } @TestMetadata("kt1936_1.kt") public void testKt1936_1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt1936_1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt1936_1.kt"); } @TestMetadata("kt2260.kt") public void testKt2260() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2260.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2260.kt"); } @TestMetadata("kt2399.kt") public void testKt2399() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2399.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/traits/kt2399.kt"); } @TestMetadata("kt2541.kt") public void testKt2541() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt2541.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt2541.kt"); } @TestMetadata("kt3315.kt") public void testKt3315() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3315.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3315.kt"); } @TestMetadata("kt3500.kt") public void testKt3500() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3500.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3500.kt"); } @TestMetadata("kt3579.kt") public void testKt3579() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579.kt"); } @TestMetadata("kt3579_2.kt") public void testKt3579_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt3579_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt3579_2.kt"); } @TestMetadata("kt5393.kt") public void testKt5393() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393.kt"); } @TestMetadata("kt5393_property.kt") public void testKt5393_property() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/kt5393_property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/kt5393_property.kt"); } @TestMetadata("multiple.kt") public void testMultiple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/multiple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/multiple.kt"); } @TestMetadata("noPrivateDelegation.kt") public void testNoPrivateDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/traits/noPrivateDelegation.kt"); } @TestMetadata("syntheticAccessor.kt") public void testSyntheticAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/syntheticAccessor.kt"); } @TestMetadata("traitImplDelegationWithCovariantOverride.kt") public void testTraitImplDelegationWithCovariantOverride() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDelegationWithCovariantOverride.kt"); } @TestMetadata("traitImplDiamond.kt") public void testTraitImplDiamond() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplDiamond.kt"); } @TestMetadata("traitImplGenericDelegation.kt") public void testTraitImplGenericDelegation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitImplGenericDelegation.kt"); } @TestMetadata("traitWithPrivateExtension.kt") public void testTraitWithPrivateExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateExtension.kt"); } @TestMetadata("traitWithPrivateMember.kt") public void testTraitWithPrivateMember() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMember.kt"); } @TestMetadata("traitWithPrivateMemberAccessFromLambda.kt") public void testTraitWithPrivateMemberAccessFromLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/traits/traitWithPrivateMemberAccessFromLambda.kt"); } } @@ -29168,61 +18392,47 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeInfo extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTypeInfo() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeInfo"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("asInLoop.kt") public void testAsInLoop() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/typeInfo/asInLoop.kt"); } @TestMetadata("ifOrWhenSpecialCall.kt") public void testIfOrWhenSpecialCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/ifOrWhenSpecialCall.kt"); } @TestMetadata("implicitSmartCastThis.kt") public void testImplicitSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/implicitSmartCastThis.kt"); } @TestMetadata("inheritance.kt") public void testInheritance() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/inheritance.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/inheritance.kt"); } @TestMetadata("kt2811.kt") public void testKt2811() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/kt2811.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/kt2811.kt"); } @TestMetadata("primitiveTypeInfo.kt") public void testPrimitiveTypeInfo() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/primitiveTypeInfo.kt"); } @TestMetadata("smartCastThis.kt") public void testSmartCastThis() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeInfo/smartCastThis.kt"); } } @@ -29230,112 +18440,62 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TypeMapping extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTypeMapping() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typeMapping"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("enhancedPrimitives.kt") public void testEnhancedPrimitives() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/typeMapping/enhancedPrimitives.kt"); } @TestMetadata("genericTypeWithNothing.kt") public void testGenericTypeWithNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/typeMapping/genericTypeWithNothing.kt"); } @TestMetadata("kt2831.kt") public void testKt2831() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt2831.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt2831.kt"); } @TestMetadata("kt309.kt") public void testKt309() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt309.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/typeMapping/kt309.kt"); } @TestMetadata("kt3286.kt") public void testKt3286() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3286.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3286.kt"); } @TestMetadata("kt3863.kt") public void testKt3863() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3863.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3863.kt"); } @TestMetadata("kt3976.kt") public void testKt3976() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/kt3976.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/kt3976.kt"); } @TestMetadata("nothing.kt") public void testNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nothing.kt"); } @TestMetadata("nullableNothing.kt") public void testNullableNothing() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typeMapping/nullableNothing.kt"); } @TestMetadata("typeParameterMultipleBounds.kt") public void testTypeParameterMultipleBounds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/typeMapping/typeParameterMultipleBounds.kt"); } } @@ -29343,116 +18503,102 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Typealias extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTypealias() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/typealias"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("enumEntryQualifier.kt") public void testEnumEntryQualifier() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/enumEntryQualifier.kt"); } @TestMetadata("genericTypeAliasConstructor.kt") public void testGenericTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor.kt"); } @TestMetadata("genericTypeAliasConstructor2.kt") public void testGenericTypeAliasConstructor2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/genericTypeAliasConstructor2.kt"); } @TestMetadata("innerClassTypeAliasConstructor.kt") public void testInnerClassTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructor.kt"); } @TestMetadata("innerClassTypeAliasConstructorInSupertypes.kt") public void testInnerClassTypeAliasConstructorInSupertypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/innerClassTypeAliasConstructorInSupertypes.kt"); } @TestMetadata("kt15109.kt") public void testKt15109() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/kt15109.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/kt15109.kt"); } @TestMetadata("objectLiteralConstructor.kt") public void testObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/objectLiteralConstructor.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/simple.kt"); } @TestMetadata("typeAliasAsBareType.kt") public void testTypeAliasAsBareType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasAsBareType.kt"); } @TestMetadata("typeAliasCompanion.kt") public void testTypeAliasCompanion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasCompanion.kt"); } @TestMetadata("typeAliasConstructor.kt") public void testTypeAliasConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructor.kt"); } @TestMetadata("typeAliasConstructorAccessor.kt") public void testTypeAliasConstructorAccessor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorAccessor.kt"); } @TestMetadata("typeAliasConstructorForArray.kt") public void testTypeAliasConstructorForArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorForArray.kt"); } @TestMetadata("typeAliasConstructorInSuperCall.kt") public void testTypeAliasConstructorInSuperCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasConstructorInSuperCall.kt"); } @TestMetadata("typeAliasInAnonymousObjectType.kt") public void testTypeAliasInAnonymousObjectType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasInAnonymousObjectType.kt"); } @TestMetadata("typeAliasObject.kt") public void testTypeAliasObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObject.kt"); } @TestMetadata("typeAliasObjectCallable.kt") public void testTypeAliasObjectCallable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasObjectCallable.kt"); } @TestMetadata("typeAliasSecondaryConstructor.kt") public void testTypeAliasSecondaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/typealias/typeAliasSecondaryConstructor.kt"); } } @@ -29460,44 +18606,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class UnaryOp extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInUnaryOp() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unaryOp"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("call.kt") public void testCall() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/call.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/call.kt"); } @TestMetadata("callNullable.kt") public void testCallNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callNullable.kt"); } @TestMetadata("callWithCommonType.kt") public void testCallWithCommonType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/callWithCommonType.kt"); } @TestMetadata("intrinsic.kt") public void testIntrinsic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsic.kt"); } @TestMetadata("intrinsicNullable.kt") public void testIntrinsicNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/intrinsicNullable.kt"); } @TestMetadata("longOverflow.kt") public void testLongOverflow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unaryOp/longOverflow.kt"); } } @@ -29505,74 +18649,67 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Unit extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInUnit() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/unit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("closureReturnsNullableUnit.kt") public void testClosureReturnsNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/closureReturnsNullableUnit.kt"); } @TestMetadata("ifElse.kt") public void testIfElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/ifElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/ifElse.kt"); } @TestMetadata("kt3634.kt") public void testKt3634() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt3634.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt3634.kt"); } @TestMetadata("kt4212.kt") public void testKt4212() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4212.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4212.kt"); } @TestMetadata("kt4265.kt") public void testKt4265() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/kt4265.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/kt4265.kt"); } @TestMetadata("nullableUnit.kt") public void testNullableUnit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnit.kt"); } @TestMetadata("nullableUnitInWhen1.kt") public void testNullableUnitInWhen1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen1.kt"); } @TestMetadata("nullableUnitInWhen2.kt") public void testNullableUnitInWhen2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen2.kt"); } @TestMetadata("nullableUnitInWhen3.kt") public void testNullableUnitInWhen3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/nullableUnitInWhen3.kt"); } @TestMetadata("unitClassObject.kt") public void testUnitClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/unitClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/unitClassObject.kt"); } @TestMetadata("UnitValue.kt") public void testUnitValue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/unit/UnitValue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/unit/UnitValue.kt"); } } @@ -29580,90 +18717,62 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Vararg extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInVararg() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/vararg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("assigningArrayToVarargInAnnotation.kt") public void testAssigningArrayToVarargInAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/vararg/assigningArrayToVarargInAnnotation.kt"); } @TestMetadata("doNotCopyImmediatelyCreatedArrays.kt") public void testDoNotCopyImmediatelyCreatedArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/doNotCopyImmediatelyCreatedArrays.kt"); } @TestMetadata("kt1978.kt") public void testKt1978() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt1978.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt1978.kt"); } @TestMetadata("kt581.kt") public void testKt581() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt581.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt581.kt"); } @TestMetadata("kt6192.kt") public void testKt6192() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt6192.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt6192.kt"); } @TestMetadata("kt796_797.kt") public void testKt796_797() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/kt796_797.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } @TestMetadata("spreadCopiesArray.kt") public void testSpreadCopiesArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/spreadCopiesArray.kt"); } @TestMetadata("varargInFunParam.kt") public void testVarargInFunParam() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargInFunParam.kt"); } @TestMetadata("varargInJava.kt") public void testVarargInJava() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargInJava.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/vararg/varargInJava.kt"); } @TestMetadata("varargsAndFunctionLiterals.kt") public void testVarargsAndFunctionLiterals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/vararg/varargsAndFunctionLiterals.kt"); } } @@ -29671,333 +18780,279 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class When extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInWhen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callProperty.kt") public void testCallProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/callProperty.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/callProperty.kt"); } @TestMetadata("emptyWhen.kt") public void testEmptyWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/emptyWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/emptyWhen.kt"); } @TestMetadata("exceptionOnNoMatch.kt") public void testExceptionOnNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exceptionOnNoMatch.kt"); } @TestMetadata("exhaustiveBoolean.kt") public void testExhaustiveBoolean() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBoolean.kt"); } @TestMetadata("exhaustiveBreakContinue.kt") public void testExhaustiveBreakContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveBreakContinue.kt"); } @TestMetadata("exhaustiveWhenInitialization.kt") public void testExhaustiveWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenInitialization.kt"); } @TestMetadata("exhaustiveWhenReturn.kt") public void testExhaustiveWhenReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/exhaustiveWhenReturn.kt"); } @TestMetadata("implicitExhaustiveAndReturn.kt") public void testImplicitExhaustiveAndReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/implicitExhaustiveAndReturn.kt"); } @TestMetadata("integralWhenWithNoInlinedConstants.kt") public void testIntegralWhenWithNoInlinedConstants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/when/integralWhenWithNoInlinedConstants.kt"); } @TestMetadata("is.kt") public void testIs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/is.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/is.kt"); } @TestMetadata("kt2457.kt") public void testKt2457() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2457.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2457.kt"); } @TestMetadata("kt2466.kt") public void testKt2466() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt2466.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt2466.kt"); } @TestMetadata("kt5307.kt") public void testKt5307() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5307.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5307.kt"); } @TestMetadata("kt5448.kt") public void testKt5448() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/kt5448.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/kt5448.kt"); } @TestMetadata("longInRange.kt") public void testLongInRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/longInRange.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/longInRange.kt"); } @TestMetadata("matchNotNullAgainstNullable.kt") public void testMatchNotNullAgainstNullable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/matchNotNullAgainstNullable.kt"); } @TestMetadata("multipleEntries.kt") public void testMultipleEntries() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/multipleEntries.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/multipleEntries.kt"); } @TestMetadata("noElseExhaustive.kt") public void testNoElseExhaustive() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustive.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustive.kt"); } @TestMetadata("noElseExhaustiveStatement.kt") public void testNoElseExhaustiveStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveStatement.kt"); } @TestMetadata("noElseExhaustiveUnitExpected.kt") public void testNoElseExhaustiveUnitExpected() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseExhaustiveUnitExpected.kt"); } @TestMetadata("noElseInStatement.kt") public void testNoElseInStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseInStatement.kt"); } @TestMetadata("noElseNoMatch.kt") public void testNoElseNoMatch() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseNoMatch.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/noElseNoMatch.kt"); } @TestMetadata("nullableWhen.kt") public void testNullableWhen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/nullableWhen.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/nullableWhen.kt"); } @TestMetadata("range.kt") public void testRange() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/range.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/range.kt"); } @TestMetadata("sealedWhenInitialization.kt") public void testSealedWhenInitialization() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/sealedWhenInitialization.kt"); } @TestMetadata("switchOptimizationDense.kt") public void testSwitchOptimizationDense() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationDense.kt"); } @TestMetadata("switchOptimizationMultipleConditions.kt") public void testSwitchOptimizationMultipleConditions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationMultipleConditions.kt"); } @TestMetadata("switchOptimizationSingleStatementCase.kt") public void testSwitchOptimizationSingleStatementCase() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSingleStatementCase.kt"); } @TestMetadata("switchOptimizationSparse.kt") public void testSwitchOptimizationSparse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationSparse.kt"); } @TestMetadata("switchOptimizationStatement.kt") public void testSwitchOptimizationStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationStatement.kt"); } @TestMetadata("switchOptimizationTypes.kt") public void testSwitchOptimizationTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationTypes.kt"); } @TestMetadata("switchOptimizationUnordered.kt") public void testSwitchOptimizationUnordered() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationUnordered.kt"); } @TestMetadata("switchOptimizationWithGap.kt") public void testSwitchOptimizationWithGap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/switchOptimizationWithGap.kt"); } @TestMetadata("typeDisjunction.kt") public void testTypeDisjunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/typeDisjunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/typeDisjunction.kt"); } @TestMetadata("whenArgumentIsEvaluatedOnlyOnce.kt") public void testWhenArgumentIsEvaluatedOnlyOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenArgumentIsEvaluatedOnlyOnce.kt"); } @TestMetadata("whenSafeCallSubjectEvaluatedOnce.kt") public void testWhenSafeCallSubjectEvaluatedOnce() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/whenSafeCallSubjectEvaluatedOnce.kt"); } @TestMetadata("compiler/testData/codegen/box/when/enumOptimization") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class EnumOptimization extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInEnumOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/enumOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("bigEnum.kt") public void testBigEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/bigEnum.kt"); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/duplicatingItems.kt"); } @TestMetadata("enumInsideClassObject.kt") public void testEnumInsideClassObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/enumInsideClassObject.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/expression.kt"); } @TestMetadata("functionLiteralInTopLevel.kt") public void testFunctionLiteralInTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/functionLiteralInTopLevel.kt"); } @TestMetadata("kt14597.kt") public void testKt14597() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597.kt"); } @TestMetadata("kt14597_full.kt") public void testKt14597_full() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14597_full.kt"); } @TestMetadata("kt14802.kt") public void testKt14802() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt14802.kt"); } @TestMetadata("kt15806.kt") public void testKt15806() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/kt15806.kt"); } @TestMetadata("manyWhensWithinClass.kt") public void testManyWhensWithinClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/manyWhensWithinClass.kt"); } @TestMetadata("nonConstantEnum.kt") public void testNonConstantEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nonConstantEnum.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullability.kt"); } @TestMetadata("nullableEnum.kt") public void testNullableEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/nullableEnum.kt"); } @TestMetadata("subjectAny.kt") public void testSubjectAny() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/subjectAny.kt"); } @TestMetadata("withoutElse.kt") public void testWithoutElse() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/enumOptimization/withoutElse.kt"); } } @@ -30005,66 +19060,42 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class StringOptimization extends AbstractJsCodegenBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInStringOptimization() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/when/stringOptimization"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("duplicatingItems.kt") public void testDuplicatingItems() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItems.kt"); } @TestMetadata("duplicatingItemsSameHashCode.kt") public void testDuplicatingItemsSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/when/stringOptimization/duplicatingItemsSameHashCode.kt"); } @TestMetadata("expression.kt") public void testExpression() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/expression.kt"); } @TestMetadata("nullability.kt") public void testNullability() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/nullability.kt"); } @TestMetadata("sameHashCode.kt") public void testSameHashCode() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/when/stringOptimization/sameHashCode.kt"); } @TestMetadata("statement.kt") public void testStatement() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/when/stringOptimization/statement.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java index 5d3ad4d376c..7559009e286 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java @@ -21,533 +21,396 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPrimitiveArraysBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInArrays() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("arrayConstructorsSimple.kt") public void testArrayConstructorsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt"); } @TestMetadata("arrayGetAssignMultiIndex.kt") public void testArrayGetAssignMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt"); } @TestMetadata("arrayGetMultiIndex.kt") public void testArrayGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt"); } @TestMetadata("arrayInstanceOf.kt") public void testArrayInstanceOf() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt"); } @TestMetadata("arrayPlusAssign.kt") public void testArrayPlusAssign() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt"); } @TestMetadata("arraysAreCloneable.kt") public void testArraysAreCloneable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt"); } @TestMetadata("cloneArray.kt") public void testCloneArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/cloneArray.kt"); } @TestMetadata("clonePrimitiveArrays.kt") public void testClonePrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt"); } @TestMetadata("collectionAssignGetMultiIndex.kt") public void testCollectionAssignGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt"); } @TestMetadata("collectionGetMultiIndex.kt") public void testCollectionGetMultiIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt"); } @TestMetadata("forEachBooleanArray.kt") public void testForEachBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt"); } @TestMetadata("forEachByteArray.kt") public void testForEachByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachByteArray.kt"); } @TestMetadata("forEachCharArray.kt") public void testForEachCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachCharArray.kt"); } @TestMetadata("forEachDoubleArray.kt") public void testForEachDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt"); } @TestMetadata("forEachFloatArray.kt") public void testForEachFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachFloatArray.kt"); } @TestMetadata("forEachIntArray.kt") public void testForEachIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachIntArray.kt"); } @TestMetadata("forEachLongArray.kt") public void testForEachLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachLongArray.kt"); } @TestMetadata("forEachShortArray.kt") public void testForEachShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/forEachShortArray.kt"); } @TestMetadata("genericArrayInObjectLiteralConstructor.kt") public void testGenericArrayInObjectLiteralConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt"); } @TestMetadata("hashMap.kt") public void testHashMap() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/hashMap.kt"); } @TestMetadata("inProjectionAsParameter.kt") public void testInProjectionAsParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt"); } @TestMetadata("inProjectionOfArray.kt") public void testInProjectionOfArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt"); } @TestMetadata("inProjectionOfList.kt") public void testInProjectionOfList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/inProjectionOfList.kt"); } @TestMetadata("indices.kt") public void testIndices() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indices.kt"); } @TestMetadata("indicesChar.kt") public void testIndicesChar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/indicesChar.kt"); } @TestMetadata("iterator.kt") public void testIterator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iterator.kt"); } @TestMetadata("iteratorBooleanArray.kt") public void testIteratorBooleanArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt"); } @TestMetadata("iteratorByteArray.kt") public void testIteratorByteArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArray.kt"); } @TestMetadata("iteratorByteArrayNextByte.kt") public void testIteratorByteArrayNextByte() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt"); } @TestMetadata("iteratorCharArray.kt") public void testIteratorCharArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorCharArray.kt"); } @TestMetadata("iteratorDoubleArray.kt") public void testIteratorDoubleArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt"); } @TestMetadata("iteratorFloatArray.kt") public void testIteratorFloatArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt"); } @TestMetadata("iteratorIntArray.kt") public void testIteratorIntArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorIntArray.kt"); } @TestMetadata("iteratorLongArray.kt") public void testIteratorLongArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArray.kt"); } @TestMetadata("iteratorLongArrayNextLong.kt") public void testIteratorLongArrayNextLong() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt"); } @TestMetadata("iteratorShortArray.kt") public void testIteratorShortArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/iteratorShortArray.kt"); } @TestMetadata("kt1291.kt") public void testKt1291() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt1291.kt"); } @TestMetadata("kt17134.kt") public void testKt17134() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt17134.kt"); } @TestMetadata("kt238.kt") public void testKt238() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt238.kt"); } @TestMetadata("kt2997.kt") public void testKt2997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt2997.kt"); } @TestMetadata("kt33.kt") public void testKt33() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt33.kt"); } @TestMetadata("kt3771.kt") public void testKt3771() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt3771.kt"); } @TestMetadata("kt4118.kt") public void testKt4118() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4118.kt"); } @TestMetadata("kt4348.kt") public void testKt4348() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4348.kt"); } @TestMetadata("kt4357.kt") public void testKt4357() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt4357.kt"); } @TestMetadata("kt503.kt") public void testKt503() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt503.kt"); } @TestMetadata("kt594.kt") public void testKt594() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt594.kt"); } @TestMetadata("kt602.kt") public void testKt602() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt602.kt"); } @TestMetadata("kt7009.kt") public void testKt7009() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7009.kt"); } @TestMetadata("kt7288.kt") public void testKt7288() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt7288.kt"); } @TestMetadata("kt7338.kt") public void testKt7338() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt"); - if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) { - doTest(fileName); - return; - } - try { - doTest(fileName); - } - catch (Throwable ignore) { - ignore.printStackTrace(); - return; - } - throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that."); + runTest("compiler/testData/codegen/box/arrays/kt7338.kt"); } @TestMetadata("kt779.kt") public void testKt779() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt779.kt"); } @TestMetadata("kt945.kt") public void testKt945() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt945.kt"); } @TestMetadata("kt950.kt") public void testKt950() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/kt950.kt"); } @TestMetadata("longAsIndex.kt") public void testLongAsIndex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/longAsIndex.kt"); } @TestMetadata("multiArrayConstructors.kt") public void testMultiArrayConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt"); } @TestMetadata("nonLocalReturnArrayConstructor.kt") public void testNonLocalReturnArrayConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt"); } @TestMetadata("nonNullArray.kt") public void testNonNullArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/nonNullArray.kt"); } @TestMetadata("primitiveArrays.kt") public void testPrimitiveArrays() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/primitiveArrays.kt"); } @TestMetadata("stdlib.kt") public void testStdlib() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/stdlib.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class MultiDecl extends AbstractJsLegacyPrimitiveArraysBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInMultiDecl() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt15560.kt") public void testKt15560() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt"); } @TestMetadata("kt15568.kt") public void testKt15568() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt"); } @TestMetadata("kt15575.kt") public void testKt15575() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt"); } @TestMetadata("MultiDeclFor.kt") public void testMultiDeclFor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt"); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } @TestMetadata("MultiDeclForValCaptured.kt") public void testMultiDeclForValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt"); } @TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Int extends AbstractJsLegacyPrimitiveArraysBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInInt() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } @@ -555,32 +418,32 @@ public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPri @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Long extends AbstractJsLegacyPrimitiveArraysBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInLong() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("MultiDeclForComponentExtensions.kt") public void testMultiDeclForComponentExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt"); } @TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt") public void testMultiDeclForComponentExtensionsValCaptured() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensions.kt") public void testMultiDeclForComponentMemberExtensions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt"); } @TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt") public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NoInlineTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NoInlineTestsGenerated.java index c1b5dfe21ce..633fafa9458 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NoInlineTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NoInlineTestsGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class NoInlineTestsGenerated extends AbstractNoInlineTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNoInline() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/noInline"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("extensionReceiver.kt") public void testExtensionReceiver() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/extensionReceiver.kt"); } @TestMetadata("lambdaAsGeneric.kt") public void testLambdaAsGeneric() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsGeneric.kt"); } @TestMetadata("lambdaAsNonFunction.kt") public void testLambdaAsNonFunction() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/lambdaAsNonFunction.kt"); } @TestMetadata("noInline.kt") public void testNoInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInline.kt"); } @TestMetadata("noInlineLambdaChain.kt") public void testNoInlineLambdaChain() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChain.kt"); } @TestMetadata("noInlineLambdaChainWithCapturedInline.kt") public void testNoInlineLambdaChainWithCapturedInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/noInlineLambdaChainWithCapturedInline.kt"); } @TestMetadata("withoutInline.kt") public void testWithoutInline() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/noInline/withoutInline.kt"); } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java index 9dfe2d1c221..53f84e0a321 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/NonLocalReturnsTestGenerated.java @@ -21,106 +21,99 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInNonLocalReturns() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("explicitLocalReturn.kt") public void testExplicitLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/explicitLocalReturn.kt"); } @TestMetadata("justReturnInLambda.kt") public void testJustReturnInLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/justReturnInLambda.kt"); } @TestMetadata("kt5199.kt") public void testKt5199() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt5199.kt"); } @TestMetadata("kt8948.kt") public void testKt8948() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948.kt"); } @TestMetadata("kt8948v2.kt") public void testKt8948v2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/kt8948v2.kt"); } @TestMetadata("nestedNonLocals.kt") public void testNestedNonLocals() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nestedNonLocals.kt"); } @TestMetadata("noInlineLocalReturn.kt") public void testNoInlineLocalReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/noInlineLocalReturn.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("propertyAccessors.kt") public void testPropertyAccessors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/propertyAccessors.kt"); } @TestMetadata("returnFromFunctionExpr.kt") public void testReturnFromFunctionExpr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/returnFromFunctionExpr.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simple.kt"); } @TestMetadata("simpleFunctional.kt") public void testSimpleFunctional() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleFunctional.kt"); } @TestMetadata("simpleVoid.kt") public void testSimpleVoid() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/simpleVoid.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Deparenthesize extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDeparenthesize() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("bracket.kt") public void testBracket() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/bracket.kt"); } @TestMetadata("labeled.kt") public void testLabeled() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/deparenthesize/labeled.kt"); } } @@ -128,106 +121,99 @@ public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class TryFinally extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInTryFinally() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt20433.kt") public void testKt20433() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433.kt"); } @TestMetadata("kt20433_2.kt") public void testKt20433_2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2.kt"); } @TestMetadata("kt20433_2_void.kt") public void testKt20433_2_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_2_void.kt"); } @TestMetadata("kt20433_void.kt") public void testKt20433_void() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt20433_void.kt"); } @TestMetadata("kt6956.kt") public void testKt6956() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt6956.kt"); } @TestMetadata("kt7273.kt") public void testKt7273() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/kt7273.kt"); } @TestMetadata("nonLocalReturnFromCatchBlock.kt") public void testNonLocalReturnFromCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromCatchBlock.kt"); } @TestMetadata("nonLocalReturnFromOuterLambda.kt") public void testNonLocalReturnFromOuterLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnFromOuterLambda.kt"); } @TestMetadata("nonLocalReturnToCatchBlock.kt") public void testNonLocalReturnToCatchBlock() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/nonLocalReturnToCatchBlock.kt"); } @TestMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CallSite extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInCallSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("callSite.kt") public void testCallSite() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSite.kt"); } @TestMetadata("callSiteComplex.kt") public void testCallSiteComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/callSiteComplex.kt"); } @TestMetadata("exceptionTableSplit.kt") public void testExceptionTableSplit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplit.kt"); } @TestMetadata("exceptionTableSplitNoReturn.kt") public void testExceptionTableSplitNoReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/exceptionTableSplitNoReturn.kt"); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/finallyInFinally.kt"); } @TestMetadata("wrongVarInterval.kt") public void testWrongVarInterval() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/callSite/wrongVarInterval.kt"); } } @@ -235,56 +221,52 @@ public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Chained extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInChained() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("finallyInFinally.kt") public void testFinallyInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally.kt"); } @TestMetadata("finallyInFinally2.kt") public void testFinallyInFinally2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/finallyInFinally2.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex.kt"); } @TestMetadata("intReturnComplex2.kt") public void testIntReturnComplex2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex2.kt"); } @TestMetadata("intReturnComplex3.kt") public void testIntReturnComplex3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex3.kt"); } @TestMetadata("intReturnComplex4.kt") public void testIntReturnComplex4() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/intReturnComplex4.kt"); } @TestMetadata("nestedLambda.kt") public void testNestedLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/chained/nestedLambda.kt"); } } @@ -292,80 +274,72 @@ public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeclSite extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInDeclSite() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("complex.kt") public void testComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/complex.kt"); } @TestMetadata("intReturn.kt") public void testIntReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturn.kt"); } @TestMetadata("intReturnComplex.kt") public void testIntReturnComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/intReturnComplex.kt"); } @TestMetadata("longReturn.kt") public void testLongReturn() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/longReturn.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/nested.kt"); } @TestMetadata("returnInFinally.kt") public void testReturnInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInFinally.kt"); } @TestMetadata("returnInTry.kt") public void testReturnInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTry.kt"); } @TestMetadata("returnInTryAndFinally.kt") public void testReturnInTryAndFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/returnInTryAndFinally.kt"); } @TestMetadata("severalInTry.kt") public void testSeveralInTry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTry.kt"); } @TestMetadata("severalInTryComplex.kt") public void testSeveralInTryComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/severalInTryComplex.kt"); } @TestMetadata("voidInlineFun.kt") public void testVoidInlineFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidInlineFun.kt"); } @TestMetadata("voidNonLocal.kt") public void testVoidNonLocal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/declSite/voidNonLocal.kt"); } } @@ -373,104 +347,92 @@ public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ExceptionTable extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInExceptionTable() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("break.kt") public void testBreak() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/break.kt"); } @TestMetadata("continue.kt") public void testContinue() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/continue.kt"); } @TestMetadata("exceptionInFinally.kt") public void testExceptionInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/exceptionInFinally.kt"); } @TestMetadata("forInFinally.kt") public void testForInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/forInFinally.kt"); } @TestMetadata("innerAndExternal.kt") public void testInnerAndExternal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternal.kt"); } @TestMetadata("innerAndExternalNested.kt") public void testInnerAndExternalNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalNested.kt"); } @TestMetadata("innerAndExternalSimple.kt") public void testInnerAndExternalSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/innerAndExternalSimple.kt"); } @TestMetadata("nested.kt") public void testNested() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nested.kt"); } @TestMetadata("nestedWithReturns.kt") public void testNestedWithReturns() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturns.kt"); } @TestMetadata("nestedWithReturnsSimple.kt") public void testNestedWithReturnsSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/nestedWithReturnsSimple.kt"); } @TestMetadata("noFinally.kt") public void testNoFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/noFinally.kt"); } @TestMetadata("severalCatchClause.kt") public void testSeveralCatchClause() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/severalCatchClause.kt"); } @TestMetadata("simpleThrow.kt") public void testSimpleThrow() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/simpleThrow.kt"); } @TestMetadata("synchonized.kt") public void testSynchonized() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/synchonized.kt"); } @TestMetadata("throwInFinally.kt") public void testThrowInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/throwInFinally.kt"); } @TestMetadata("tryCatchInFinally.kt") public void testTryCatchInFinally() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/exceptionTable/tryCatchInFinally.kt"); } } @@ -478,14 +440,17 @@ public class NonLocalReturnsTestGenerated extends AbstractNonLocalReturnsTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Variables extends AbstractNonLocalReturnsTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInVariables() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("kt7792.kt") public void testKt7792() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/nonLocalReturns/tryFinally/variables/kt7792.kt"); } } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/OutputPrefixPostfixTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/OutputPrefixPostfixTestGenerated.java index 0dca7c4b8ea..0450484b655 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/OutputPrefixPostfixTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/OutputPrefixPostfixTestGenerated.java @@ -21,31 +21,31 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class OutputPrefixPostfixTestGenerated extends AbstractOutputPrefixPostfixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInOutputPrefixPostfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/outputPrefixPostfix"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/outputPrefixPostfix/simple.kt"); - doTest(fileName); + runTest("js/js.translator/testData/outputPrefixPostfix/simple.kt"); } @TestMetadata("simpleWithPostfix.kt") public void testSimpleWithPostfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/outputPrefixPostfix/simpleWithPostfix.kt"); - doTest(fileName); + runTest("js/js.translator/testData/outputPrefixPostfix/simpleWithPostfix.kt"); } @TestMetadata("simpleWithPrefix.kt") public void testSimpleWithPrefix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/outputPrefixPostfix/simpleWithPrefix.kt"); - doTest(fileName); + runTest("js/js.translator/testData/outputPrefixPostfix/simpleWithPrefix.kt"); } @TestMetadata("simpleWithPrefixAndPostfix.kt") public void testSimpleWithPrefixAndPostfix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/outputPrefixPostfix/simpleWithPrefixAndPostfix.kt"); - doTest(fileName); + runTest("js/js.translator/testData/outputPrefixPostfix/simpleWithPrefixAndPostfix.kt"); } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/PropertyAccessorsInlineTestsGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/PropertyAccessorsInlineTestsGenerated.java index f0c6cb49f8a..17b49f9f783 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/PropertyAccessorsInlineTestsGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/PropertyAccessorsInlineTestsGenerated.java @@ -21,73 +21,66 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class PropertyAccessorsInlineTestsGenerated extends AbstractPropertyAccessorsInlineTests { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInProperty() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxInline/property"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } @TestMetadata("augAssignmentAndInc.kt") public void testAugAssignmentAndInc() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndInc.kt"); } @TestMetadata("augAssignmentAndIncInClass.kt") public void testAugAssignmentAndIncInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClass.kt"); } @TestMetadata("augAssignmentAndIncInClassViaConvention.kt") public void testAugAssignmentAndIncInClassViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncInClassViaConvention.kt"); } @TestMetadata("augAssignmentAndIncOnExtension.kt") public void testAugAssignmentAndIncOnExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtension.kt"); } @TestMetadata("augAssignmentAndIncOnExtensionInClass.kt") public void testAugAssignmentAndIncOnExtensionInClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncOnExtensionInClass.kt"); } @TestMetadata("augAssignmentAndIncViaConvention.kt") public void testAugAssignmentAndIncViaConvention() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/augAssignmentAndIncViaConvention.kt"); } @TestMetadata("property.kt") public void testProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/property.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/property.kt"); } @TestMetadata("reifiedVal.kt") public void testReifiedVal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVal.kt"); } @TestMetadata("reifiedVar.kt") public void testReifiedVar() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/reifiedVar.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simple.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simple.kt"); } @TestMetadata("simpleExtension.kt") public void testSimpleExtension() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); - doTest(fileName); + runTest("compiler/testData/codegen/boxInline/property/simpleExtension.kt"); } } diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java index 8b3b5ac6635..909c4fd90b7 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/SourceMapGenerationSmokeTestGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SourceMapGenerationSmokeTestGenerated extends AbstractSourceMapGenerationSmokeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest0(this::doTest, TargetBackend.JS, testDataFilePath); + } + public void testAllFilesPresentInSourcemap() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/sourcemap"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true); } @TestMetadata("binaryOperation.kt") public void testBinaryOperation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/sourcemap/binaryOperation.kt"); - doTest(fileName); + runTest("js/js.translator/testData/sourcemap/binaryOperation.kt"); } @TestMetadata("emptyIfInsideInlineLambda.kt") public void testEmptyIfInsideInlineLambda() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/sourcemap/emptyIfInsideInlineLambda.kt"); - doTest(fileName); + runTest("js/js.translator/testData/sourcemap/emptyIfInsideInlineLambda.kt"); } @TestMetadata("methodCallInMethod.kt") public void testMethodCallInMethod() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/sourcemap/methodCallInMethod.kt"); - doTest(fileName); + runTest("js/js.translator/testData/sourcemap/methodCallInMethod.kt"); } } diff --git a/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java index 4b29f90ebcc..a6ba5782d83 100644 --- a/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java +++ b/plugins/allopen/allopen-cli/test/org/jetbrains/kotlin/allopen/BytecodeListingTestForAllOpenGenerated.java @@ -21,85 +21,76 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BytecodeListingTestForAllOpenGenerated extends AbstractBytecodeListingTestForAllOpen { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/allopen/allopen-cli/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("allOpenOnNotClasses.kt") public void testAllOpenOnNotClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/allOpenOnNotClasses.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/allOpenOnNotClasses.kt"); } @TestMetadata("alreadyOpen.kt") public void testAlreadyOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/alreadyOpen.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/alreadyOpen.kt"); } @TestMetadata("anonymousObject.kt") public void testAnonymousObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/anonymousObject.kt"); } @TestMetadata("explicitFinal.kt") public void testExplicitFinal() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/explicitFinal.kt"); } @TestMetadata("metaAnnotation.kt") public void testMetaAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/metaAnnotation.kt"); } @TestMetadata("nestedInner.kt") public void testNestedInner() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/nestedInner.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/nestedInner.kt"); } @TestMetadata("noAllOpen.kt") public void testNoAllOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/noAllOpen.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/noAllOpen.kt"); } @TestMetadata("privateMembers.kt") public void testPrivateMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/privateMembers.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/privateMembers.kt"); } @TestMetadata("sealed.kt") public void testSealed() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/sealed.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/sealed.kt"); } @TestMetadata("severalAllOpen.kt") public void testSeveralAllOpen() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/severalAllOpen.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/severalAllOpen.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/simple.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/simple.kt"); } @TestMetadata("springAnnotations.kt") public void testSpringAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/springAnnotations.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/springAnnotations.kt"); } @TestMetadata("superClassAnnotation.kt") public void testSuperClassAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/allopen/allopen-cli/testData/bytecodeListing/superClassAnnotation.kt"); - doTest(fileName); + runTest("plugins/allopen/allopen-cli/testData/bytecodeListing/superClassAnnotation.kt"); } } diff --git a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java index 586ed1571e0..62f2bc2fd14 100644 --- a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java +++ b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/parcel/ParcelBytecodeListingTestGenerated.java @@ -21,97 +21,86 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ParcelBytecodeListingTestGenerated extends AbstractParcelBytecodeListingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCodegen() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("customDescribeContents.kt") public void testCustomDescribeContents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customDescribeContents.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customDescribeContents.kt"); } @TestMetadata("customParcelablesDifferentModule.kt") public void testCustomParcelablesDifferentModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customParcelablesDifferentModule.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customParcelablesDifferentModule.kt"); } @TestMetadata("customParcelablesSameModule.kt") public void testCustomParcelablesSameModule() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customParcelablesSameModule.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customParcelablesSameModule.kt"); } @TestMetadata("customSimple.kt") public void testCustomSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customSimple.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customSimple.kt"); } @TestMetadata("customSimpleWithNewArray.kt") public void testCustomSimpleWithNewArray() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customSimpleWithNewArray.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/customSimpleWithNewArray.kt"); } @TestMetadata("describeContentsFromSuperType.kt") public void testDescribeContentsFromSuperType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/describeContentsFromSuperType.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/describeContentsFromSuperType.kt"); } @TestMetadata("duplicatingClinit.kt") public void testDuplicatingClinit() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/duplicatingClinit.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/duplicatingClinit.kt"); } @TestMetadata("IBinderIInterface.kt") public void testIBinderIInterface() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/IBinderIInterface.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/IBinderIInterface.kt"); } @TestMetadata("listInsideList.kt") public void testListInsideList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/listInsideList.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/listInsideList.kt"); } @TestMetadata("nullableNotNullSize.kt") public void testNullableNotNullSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/nullableNotNullSize.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/nullableNotNullSize.kt"); } @TestMetadata("parcelable.kt") public void testParcelable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/parcelable.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/parcelable.kt"); } @TestMetadata("serializable.kt") public void testSerializable() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/serializable.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/serializable.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/simple.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/simple.kt"); } @TestMetadata("simpleList.kt") public void testSimpleList() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/simpleList.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/simpleList.kt"); } @TestMetadata("size.kt") public void testSize() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/size.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/parcel/codegen/size.kt"); } } diff --git a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java index 60997c45eef..ecc86416a02 100644 --- a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java +++ b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBoxTestGenerated.java @@ -23,68 +23,62 @@ public class AndroidBoxTestGenerated extends AbstractAndroidBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Android extends AbstractAndroidBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doCompileAgainstAndroidSdkTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAndroid() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-compiler/testData/codegen/android"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("androidEntity") public void testAndroidEntity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntity/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntity/"); } @TestMetadata("androidEntityInnerClass") public void testAndroidEntityInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntityInnerClass/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntityInnerClass/"); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInAttr/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInAttr/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInTag/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInTag/"); } @TestMetadata("fragment") public void testFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragment/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragment/"); } @TestMetadata("fragmentNoGetView") public void testFragmentNoGetView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragmentNoGetView/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragmentNoGetView/"); } @TestMetadata("manyWidgets") public void testManyWidgets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/manyWidgets/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/manyWidgets/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/multiFile/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/multiFile/"); } @TestMetadata("singleFile") public void testSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/singleFile/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/singleFile/"); } @TestMetadata("view") public void testView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/view/"); - doCompileAgainstAndroidSdkTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/view/"); } } @@ -92,68 +86,62 @@ public class AndroidBoxTestGenerated extends AbstractAndroidBoxTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Invoke extends AbstractAndroidBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doFakeInvocationTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInInvoke() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-compiler/testData/codegen/android"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("androidEntity") public void testAndroidEntity() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntity/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntity/"); } @TestMetadata("androidEntityInnerClass") public void testAndroidEntityInnerClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntityInnerClass/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/androidEntityInnerClass/"); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInAttr/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInAttr/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInTag/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fqNameInTag/"); } @TestMetadata("fragment") public void testFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragment/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragment/"); } @TestMetadata("fragmentNoGetView") public void testFragmentNoGetView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragmentNoGetView/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/fragmentNoGetView/"); } @TestMetadata("manyWidgets") public void testManyWidgets() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/manyWidgets/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/manyWidgets/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/multiFile/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/multiFile/"); } @TestMetadata("singleFile") public void testSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/singleFile/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/singleFile/"); } @TestMetadata("view") public void testView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/view/"); - doFakeInvocationTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/android/view/"); } } } diff --git a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java index 0be0db66183..cad700e7707 100644 --- a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java +++ b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidBytecodeShapeTestGenerated.java @@ -21,10 +21,13 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidBytecodeShapeTestGenerated extends AbstractAndroidBytecodeShapeTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("activityWithEntityOptionsNoCache") public void testActivityWithEntityOptionsNoCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/activityWithEntityOptionsNoCache/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/activityWithEntityOptionsNoCache/"); } public void testAllFilesPresentInBytecodeShape() throws Exception { @@ -33,193 +36,161 @@ public class AndroidBytecodeShapeTestGenerated extends AbstractAndroidBytecodeSh @TestMetadata("baseClass") public void testBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/baseClass/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/baseClass/"); } @TestMetadata("baseClassFragment") public void testBaseClassFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/baseClassFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/baseClassFragment/"); } @TestMetadata("clearCache") public void testClearCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/clearCache/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/clearCache/"); } @TestMetadata("clearCacheBaseClass") public void testClearCacheBaseClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/clearCacheBaseClass/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/clearCacheBaseClass/"); } @TestMetadata("dialog") public void testDialog() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/dialog/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/dialog/"); } @TestMetadata("extensionFunctions") public void testExtensionFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/extensionFunctions/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/extensionFunctions/"); } @TestMetadata("extensionFunctionsFragment") public void testExtensionFunctionsFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/extensionFunctionsFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/extensionFunctionsFragment/"); } @TestMetadata("extensionFunctionsView") public void testExtensionFunctionsView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/extensionFunctionsView/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/extensionFunctionsView/"); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInAttr/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInAttr/"); } @TestMetadata("fqNameInAttrFragment") public void testFqNameInAttrFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInAttrFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInAttrFragment/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInTag/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInTag/"); } @TestMetadata("fqNameInTagFragment") public void testFqNameInTagFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInTagFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fqNameInTagFragment/"); } @TestMetadata("fragmentWithEntityOptionsNoCache") public void testFragmentWithEntityOptionsNoCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fragmentWithEntityOptionsNoCache/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/fragmentWithEntityOptionsNoCache/"); } @TestMetadata("kt18545") public void testKt18545() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/kt18545/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/kt18545/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/multiFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/multiFile/"); } @TestMetadata("multiFileFragment") public void testMultiFileFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/multiFileFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/multiFileFragment/"); } @TestMetadata("onDestroyFragment") public void testOnDestroyFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/onDestroyFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/onDestroyFragment/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simple/"); } @TestMetadata("simpleFragment") public void testSimpleFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleFragment/"); } @TestMetadata("simpleFragmentProperty") public void testSimpleFragmentProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleFragmentProperty/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleFragmentProperty/"); } @TestMetadata("simpleHashMapCacheImplementation") public void testSimpleHashMapCacheImplementation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleHashMapCacheImplementation/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleHashMapCacheImplementation/"); } @TestMetadata("simpleView") public void testSimpleView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleView/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/simpleView/"); } @TestMetadata("supportExtensionFunctionsFragment") public void testSupportExtensionFunctionsFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportExtensionFunctionsFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportExtensionFunctionsFragment/"); } @TestMetadata("supportExtensionFunctionsFragmentAndroidx") public void testSupportExtensionFunctionsFragmentAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportExtensionFunctionsFragmentAndroidx/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportExtensionFunctionsFragmentAndroidx/"); } @TestMetadata("supportSimpleFragment") public void testSupportSimpleFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragment/"); } @TestMetadata("supportSimpleFragmentAndroidx") public void testSupportSimpleFragmentAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragmentAndroidx/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragmentAndroidx/"); } @TestMetadata("supportSimpleFragmentProperty") public void testSupportSimpleFragmentProperty() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragmentProperty/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragmentProperty/"); } @TestMetadata("supportSimpleFragmentPropertyAndroidx") public void testSupportSimpleFragmentPropertyAndroidx() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragmentPropertyAndroidx/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/supportSimpleFragmentPropertyAndroidx/"); } @TestMetadata("viewStub") public void testViewStub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewStub/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewStub/"); } @TestMetadata("viewWithCache") public void testViewWithCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewWithCache/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewWithCache/"); } @TestMetadata("viewWithDefaultNoCache") public void testViewWithDefaultNoCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewWithDefaultNoCache/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewWithDefaultNoCache/"); } @TestMetadata("viewWithEntityOptionsNoCache") public void testViewWithEntityOptionsNoCache() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewWithEntityOptionsNoCache/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/codegen/bytecodeShape/viewWithEntityOptionsNoCache/"); } } diff --git a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java index 97d9a579ea6..eb24eeab01e 100644 --- a/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java +++ b/plugins/android-extensions/android-extensions-compiler/test/org/jetbrains/kotlin/android/synthetic/test/AndroidSyntheticPropertyDescriptorTestGenerated.java @@ -21,103 +21,91 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidSyntheticPropertyDescriptorTestGenerated extends AbstractAndroidSyntheticPropertyDescriptorTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDescriptors() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-compiler/testData/descriptors"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("escapedLayoutName") public void testEscapedLayoutName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/escapedLayoutName/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/escapedLayoutName/"); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/fqNameInAttr/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/fqNameInAttr/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/fqNameInTag/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/fqNameInTag/"); } @TestMetadata("layoutVariants") public void testLayoutVariants() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/layoutVariants/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/layoutVariants/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/multiFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/multiFile/"); } @TestMetadata("noIds") public void testNoIds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/noIds/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/noIds/"); } @TestMetadata("nonLatinNames") public void testNonLatinNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/nonLatinNames/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/nonLatinNames/"); } @TestMetadata("sameIds") public void testSameIds() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/sameIds/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/sameIds/"); } @TestMetadata("severalResDirs") public void testSeveralResDirs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/severalResDirs/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/severalResDirs/"); } @TestMetadata("singleFile") public void testSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/singleFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/singleFile/"); } @TestMetadata("specialTags") public void testSpecialTags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/specialTags/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/specialTags/"); } @TestMetadata("supportSingleFile") public void testSupportSingleFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/supportSingleFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/supportSingleFile/"); } @TestMetadata("supportSpecialTags") public void testSupportSpecialTags() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/supportSpecialTags/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/supportSpecialTags/"); } @TestMetadata("unresolvedFqName") public void testUnresolvedFqName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/unresolvedFqName/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/unresolvedFqName/"); } @TestMetadata("unresolvedWidget") public void testUnresolvedWidget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/unresolvedWidget/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/unresolvedWidget/"); } @TestMetadata("viewStub") public void testViewStub() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-compiler/testData/descriptors/viewStub/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-compiler/testData/descriptors/viewStub/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidCompletionTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidCompletionTestGenerated.java index df537721130..4313270223a 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidCompletionTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidCompletionTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidCompletionTestGenerated extends AbstractAndroidCompletionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCompletion() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/completion"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInAttr/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInAttr/"); } @TestMetadata("fqNameInAttrFragment") public void testFqNameInAttrFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInAttrFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInAttrFragment/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInTag/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInTag/"); } @TestMetadata("fqNameInTagFragment") public void testFqNameInTagFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInTagFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/fqNameInTagFragment/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/multiFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/multiFile/"); } @TestMetadata("multiFileFragment") public void testMultiFileFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/multiFileFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/multiFileFragment/"); } @TestMetadata("propertiesSimple") public void testPropertiesSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/propertiesSimple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/propertiesSimple/"); } @TestMetadata("propertiesSimpleFragment") public void testPropertiesSimpleFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/propertiesSimpleFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/propertiesSimpleFragment/"); } @TestMetadata("propertiesSimpleView") public void testPropertiesSimpleView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/propertiesSimpleView/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/propertiesSimpleView/"); } @TestMetadata("withoutImport") public void testWithoutImport() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/completion/withoutImport/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/completion/withoutImport/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidExtractionTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidExtractionTestGenerated.java index 7a76384c652..5e3d7ef2db7 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidExtractionTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidExtractionTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidExtractionTestGenerated extends AbstractAndroidExtractionTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInExtraction() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/extraction"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("toTopLevelFun") public void testToTopLevelFun() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/extraction/toTopLevelFun/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/extraction/toTopLevelFun/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidFindUsagesTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidFindUsagesTestGenerated.java index 46abdb9f52f..5521920bad0 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidFindUsagesTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidFindUsagesTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidFindUsagesTestGenerated extends AbstractAndroidFindUsagesTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInFindUsages() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/findUsages"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInAttr/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInAttr/"); } @TestMetadata("fqNameInAttrFragment") public void testFqNameInAttrFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInAttrFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInAttrFragment/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInTag/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInTag/"); } @TestMetadata("fqNameInTagFragment") public void testFqNameInTagFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInTagFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/fqNameInTagFragment/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/multiFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/multiFile/"); } @TestMetadata("multiFileFragment") public void testMultiFileFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/multiFileFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/multiFileFragment/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/simple/"); } @TestMetadata("simpleFragment") public void testSimpleFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/simpleFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/simpleFragment/"); } @TestMetadata("simpleView") public void testSimpleView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/simpleView/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/simpleView/"); } @TestMetadata("wrongIdFormat") public void testWrongIdFormat() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/wrongIdFormat/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/findUsages/wrongIdFormat/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidGotoTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidGotoTestGenerated.java index 4fbcfcdcc78..3dd4934666f 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidGotoTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidGotoTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidGotoTestGenerated extends AbstractAndroidGotoTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInGoto() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/goto"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("customNamespaceName") public void testCustomNamespaceName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/customNamespaceName/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/customNamespaceName/"); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInAttr/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInAttr/"); } @TestMetadata("fqNameInAttrFragment") public void testFqNameInAttrFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInAttrFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInAttrFragment/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInTag/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInTag/"); } @TestMetadata("fqNameInTagFragment") public void testFqNameInTagFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInTagFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/fqNameInTagFragment/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/multiFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/multiFile/"); } @TestMetadata("multiFileFragment") public void testMultiFileFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/multiFileFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/multiFileFragment/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/simple/"); } @TestMetadata("simpleFragment") public void testSimpleFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/simpleFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/simpleFragment/"); } @TestMetadata("simpleView") public void testSimpleView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/goto/simpleView/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/goto/simpleView/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidLayoutRenameTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidLayoutRenameTestGenerated.java index 762777822ec..255c74c95fc 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidLayoutRenameTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidLayoutRenameTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidLayoutRenameTestGenerated extends AbstractAndroidLayoutRenameTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRenameLayout() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/renameLayout"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/renameLayout/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/renameLayout/simple/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidRenameTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidRenameTestGenerated.java index dc4c6d331f2..c144138e988 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidRenameTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidRenameTestGenerated.java @@ -21,67 +21,61 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidRenameTestGenerated extends AbstractAndroidRenameTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRename() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/rename"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("commonElementId") public void testCommonElementId() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/commonElementId/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/commonElementId/"); } @TestMetadata("fqNameInAttr") public void testFqNameInAttr() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInAttr/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInAttr/"); } @TestMetadata("fqNameInAttrFragment") public void testFqNameInAttrFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInAttrFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInAttrFragment/"); } @TestMetadata("fqNameInTag") public void testFqNameInTag() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInTag/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInTag/"); } @TestMetadata("fqNameInTagFragment") public void testFqNameInTagFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInTagFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/fqNameInTagFragment/"); } @TestMetadata("multiFile") public void testMultiFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/multiFile/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/multiFile/"); } @TestMetadata("multiFileFragment") public void testMultiFileFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/multiFileFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/multiFileFragment/"); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/simple/"); } @TestMetadata("simpleFragment") public void testSimpleFragment() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/simpleFragment/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/simpleFragment/"); } @TestMetadata("simpleView") public void testSimpleView() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/rename/simpleView/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/rename/simpleView/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidUsageHighlightingTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidUsageHighlightingTestGenerated.java index eff38685962..5a9327c0025 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidUsageHighlightingTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/AndroidUsageHighlightingTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidUsageHighlightingTestGenerated extends AbstractAndroidUsageHighlightingTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInUsageHighlighting() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/usageHighlighting"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/usageHighlighting/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/usageHighlighting/simple/"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelCheckerTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelCheckerTestGenerated.java index 07a05a88c19..277b10f37a9 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelCheckerTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelCheckerTestGenerated.java @@ -21,91 +21,81 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ParcelCheckerTestGenerated extends AbstractParcelCheckerTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInChecker() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("constructors.kt") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/constructors.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/constructors.kt"); } @TestMetadata("customCreator.kt") public void testCustomCreator() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customCreator.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customCreator.kt"); } @TestMetadata("customParcelers.kt") public void testCustomParcelers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customParcelers.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customParcelers.kt"); } @TestMetadata("customWriteToParcel.kt") public void testCustomWriteToParcel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customWriteToParcel.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/customWriteToParcel.kt"); } @TestMetadata("delegate.kt") public void testDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/delegate.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/delegate.kt"); } @TestMetadata("emptyPrimaryConstructor.kt") public void testEmptyPrimaryConstructor() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/emptyPrimaryConstructor.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/emptyPrimaryConstructor.kt"); } @TestMetadata("kt20062.kt") public void testKt20062() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/kt20062.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/kt20062.kt"); } @TestMetadata("modality.kt") public void testModality() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/modality.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/modality.kt"); } @TestMetadata("notMagicParcel.kt") public void testNotMagicParcel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/notMagicParcel.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/notMagicParcel.kt"); } @TestMetadata("properties.kt") public void testProperties() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/properties.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/properties.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/simple.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/simple.kt"); } @TestMetadata("unsupportedType.kt") public void testUnsupportedType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/unsupportedType.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/unsupportedType.kt"); } @TestMetadata("withoutParcelableSupertype.kt") public void testWithoutParcelableSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/withoutParcelableSupertype.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/withoutParcelableSupertype.kt"); } @TestMetadata("wrongAnnotationTarget.kt") public void testWrongAnnotationTarget() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/wrongAnnotationTarget.kt"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/checker/wrongAnnotationTarget.kt"); } } diff --git a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelQuickFixTestGenerated.java b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelQuickFixTestGenerated.java index b3e6a8d1147..f873dcb7ff1 100644 --- a/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelQuickFixTestGenerated.java +++ b/plugins/android-extensions/android-extensions-idea/tests/org/jetbrains/kotlin/android/ParcelQuickFixTestGenerated.java @@ -21,6 +21,10 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInQuickfix() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @@ -29,26 +33,27 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class AddPrimaryConstructor extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAddPrimaryConstructor() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("constructorWithDelegate.before.Main.kt") public void testConstructorWithDelegate() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor/constructorWithDelegate.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor/constructorWithDelegate.before.Main.kt"); } @TestMetadata("noQuickFix.before.Main.kt") public void testNoQuickFix() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor/noQuickFix.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor/noQuickFix.before.Main.kt"); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/addPrimaryConstructor/simple.before.Main.kt"); } } @@ -56,14 +61,17 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class CantBeInnerClass extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCantBeInnerClass() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/cantBeInnerClass"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/cantBeInnerClass/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/cantBeInnerClass/simple.before.Main.kt"); } } @@ -71,14 +79,17 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class ClassShouldBeAnnotated extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInClassShouldBeAnnotated() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/classShouldBeAnnotated"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/classShouldBeAnnotated/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/classShouldBeAnnotated/simple.before.Main.kt"); } } @@ -86,20 +97,22 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeleteIncompatible extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDeleteIncompatible() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/deleteIncompatible"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("creatorField.before.Main.kt") public void testCreatorField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/deleteIncompatible/creatorField.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/deleteIncompatible/creatorField.before.Main.kt"); } @TestMetadata("writeToParcel.before.Main.kt") public void testWriteToParcel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/deleteIncompatible/writeToParcel.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/deleteIncompatible/writeToParcel.before.Main.kt"); } } @@ -107,56 +120,52 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Migrations extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInMigrations() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("basic.before.Main.kt") public void testBasic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/basic.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/basic.before.Main.kt"); } @TestMetadata("complexCase1.before.Main.kt") public void testComplexCase1() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/complexCase1.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/complexCase1.before.Main.kt"); } @TestMetadata("customDescribeContents.before.Main.kt") public void testCustomDescribeContents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/customDescribeContents.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/customDescribeContents.before.Main.kt"); } @TestMetadata("fromCreatorObject.before.Main.kt") public void testFromCreatorObject() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/fromCreatorObject.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/fromCreatorObject.before.Main.kt"); } @TestMetadata("innerClassFactory.before.Main.kt") public void testInnerClassFactory() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/innerClassFactory.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/innerClassFactory.before.Main.kt"); } @TestMetadata("jvmField.before.Main.kt") public void testJvmField() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/jvmField.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/jvmField.before.Main.kt"); } @TestMetadata("noWriteToParcel.before.Main.kt") public void testNoWriteToParcel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/noWriteToParcel.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/noWriteToParcel.before.Main.kt"); } @TestMetadata("withoutDescribeContents.before.Main.kt") public void testWithoutDescribeContents() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/withoutDescribeContents.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/migrations/withoutDescribeContents.before.Main.kt"); } } @@ -164,20 +173,22 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class NoParcelableSupertype extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInNoParcelableSupertype() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/noParcelableSupertype"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("alreadyHasSupertype.before.Main.kt") public void testAlreadyHasSupertype() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/noParcelableSupertype/alreadyHasSupertype.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/noParcelableSupertype/alreadyHasSupertype.before.Main.kt"); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/noParcelableSupertype/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/noParcelableSupertype/simple.before.Main.kt"); } } @@ -185,14 +196,17 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class PropertyWontBeSerialized extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInPropertyWontBeSerialized() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/propertyWontBeSerialized"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/propertyWontBeSerialized/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/propertyWontBeSerialized/simple.before.Main.kt"); } } @@ -200,14 +214,17 @@ public class ParcelQuickFixTestGenerated extends AbstractParcelQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class RemoveDuplicatingTypeParcelerAnnotation extends AbstractParcelQuickFixTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTestWithExtraFile, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInRemoveDuplicatingTypeParcelerAnnotation() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/removeDuplicatingTypeParcelerAnnotation"), Pattern.compile("^(\\w+)\\.((before\\.Main\\.\\w+)|(test))$"), TargetBackend.ANY, true); } @TestMetadata("simple.before.Main.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/removeDuplicatingTypeParcelerAnnotation/simple.before.Main.kt"); - doTestWithExtraFile(fileName); + runTest("plugins/android-extensions/android-extensions-idea/testData/android/parcel/quickfix/removeDuplicatingTypeParcelerAnnotation/simple.before.Main.kt"); } } } diff --git a/plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java b/plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java index 982d06b80f4..c736860ccf8 100644 --- a/plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java +++ b/plugins/android-extensions/android-extensions-jps/test/org/jetbrains/kotlin/jps/build/android/AndroidJpsTestCaseGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AndroidJpsTestCaseGenerated extends AbstractAndroidJpsTestCase { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInAndroid() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/android-extensions/android-extensions-jps/testData/android"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("simple") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/android-extensions/android-extensions-jps/testData/android/simple/"); - doTest(fileName); + runTest("plugins/android-extensions/android-extensions-jps/testData/android/simple/"); } } diff --git a/plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java b/plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java index d275548588f..6094b2f9dc8 100644 --- a/plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java +++ b/plugins/annotation-collector/test/org/jetbrains/kotlin/annotation/AnnotationProcessorBoxTestGenerated.java @@ -21,133 +21,116 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class AnnotationProcessorBoxTestGenerated extends AbstractAnnotationProcessorBoxTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInCollectToFile() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/annotation-collector/testData/collectToFile"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, false); } @TestMetadata("annotatedGettersSetters") public void testAnnotatedGettersSetters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/annotatedGettersSetters/"); } @TestMetadata("annotationInSameFile") public void testAnnotationInSameFile() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/annotationInSameFile/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/annotationInSameFile/"); } @TestMetadata("anonymousClasses") public void testAnonymousClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/anonymousClasses/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/anonymousClasses/"); } @TestMetadata("classAnnotations") public void testClassAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/classAnnotations/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/classAnnotations/"); } @TestMetadata("constructors") public void testConstructors() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/constructors/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/constructors/"); } @TestMetadata("defaultPackage") public void testDefaultPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/defaultPackage/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/defaultPackage/"); } @TestMetadata("fieldAnnotations") public void testFieldAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/fieldAnnotations/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/fieldAnnotations/"); } @TestMetadata("inheritedComplex") public void testInheritedComplex() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/inheritedComplex/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/inheritedComplex/"); } @TestMetadata("inheritedSimple") public void testInheritedSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/inheritedSimple/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/inheritedSimple/"); } @TestMetadata("inheritedTopLevel") public void testInheritedTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/inheritedTopLevel/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/inheritedTopLevel/"); } @TestMetadata("localClasses") public void testLocalClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/localClasses/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/localClasses/"); } @TestMetadata("localFunctions") public void testLocalFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/localFunctions/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/localFunctions/"); } @TestMetadata("methodAnnotations") public void testMethodAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/methodAnnotations/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/methodAnnotations/"); } @TestMetadata("multiFileTopLevelAnnotated") public void testMultiFileTopLevelAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/multiFileTopLevelAnnotated/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/multiFileTopLevelAnnotated/"); } @TestMetadata("nestedClasses") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/nestedClasses/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/nestedClasses/"); } @TestMetadata("platformStatic") public void testPlatformStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/platformStatic/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/platformStatic/"); } @TestMetadata("retentionPoliciesJavaAnnotations") public void testRetentionPoliciesJavaAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/retentionPoliciesJavaAnnotations/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/retentionPoliciesJavaAnnotations/"); } @TestMetadata("retentionPoliciesJavaAnnotationsStubs") public void testRetentionPoliciesJavaAnnotationsStubs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/retentionPoliciesJavaAnnotationsStubs/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/retentionPoliciesJavaAnnotationsStubs/"); } @TestMetadata("retentionPoliciesKotlinAnnotations") public void testRetentionPoliciesKotlinAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/retentionPoliciesKotlinAnnotations/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/retentionPoliciesKotlinAnnotations/"); } @TestMetadata("retentionPoliciesKotlinAnnotationsStubs") public void testRetentionPoliciesKotlinAnnotationsStubs() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/retentionPoliciesKotlinAnnotationsStubs/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/retentionPoliciesKotlinAnnotationsStubs/"); } @TestMetadata("topLevelAnnotated") public void testTopLevelAnnotated() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/annotation-collector/testData/collectToFile/topLevelAnnotated/"); - doTest(fileName); + runTest("plugins/annotation-collector/testData/collectToFile/topLevelAnnotated/"); } } diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java index e1ce0fc5303..43ae20e9f23 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/ClassFileToSourceStubConverterTestGenerated.java @@ -21,22 +21,23 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFileToSourceStubConverterTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + @TestMetadata("abstractEnum.kt") public void testAbstractEnum() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt"); } @TestMetadata("abstractMethods.kt") public void testAbstractMethods() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt"); } @TestMetadata("aliasedImports.kt") public void testAliasedImports() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt"); } public void testAllFilesPresentInConverter() throws Exception { @@ -45,331 +46,276 @@ public class ClassFileToSourceStubConverterTestGenerated extends AbstractClassFi @TestMetadata("annotations.kt") public void testAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt"); } @TestMetadata("annotations2.kt") public void testAnnotations2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt"); } @TestMetadata("annotations3.kt") public void testAnnotations3() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt"); } @TestMetadata("comments.kt") public void testComments() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/comments.kt"); } @TestMetadata("cyrillicClassName.kt") public void testCyrillicClassName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt"); } @TestMetadata("dataClass.kt") public void testDataClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt"); } @TestMetadata("defaultImpls.kt") public void testDefaultImpls() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt"); } @TestMetadata("enums.kt") public void testEnums() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/enums.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/enums.kt"); } @TestMetadata("errorLocationMapping.kt") public void testErrorLocationMapping() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt"); } @TestMetadata("fileFacadeJvmName.kt") public void testFileFacadeJvmName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt"); } @TestMetadata("functions.kt") public void testFunctions() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/functions.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/functions.kt"); } @TestMetadata("genericRawSignatures.kt") public void testGenericRawSignatures() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt"); } @TestMetadata("genericSimple.kt") public void testGenericSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt"); } @TestMetadata("ignoredMembers.kt") public void testIgnoredMembers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt"); } @TestMetadata("importsForErrorTypes.kt") public void testImportsForErrorTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt"); } @TestMetadata("importsKt22083.kt") public void testImportsKt22083() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt"); } @TestMetadata("inheritanceSimple.kt") public void testInheritanceSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt"); } @TestMetadata("innerClassesWithTypeParameters.kt") public void testInnerClassesWithTypeParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt"); } @TestMetadata("invalidFieldName.kt") public void testInvalidFieldName() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt"); } @TestMetadata("javaKeywords.kt") public void testJavaKeywords() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt"); } @TestMetadata("javaKeywordsInPackageNames.kt") public void testJavaKeywordsInPackageNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt"); } @TestMetadata("jvmOverloads.kt") public void testJvmOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt"); } @TestMetadata("jvmStatic.kt") public void testJvmStatic() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt"); } @TestMetadata("jvmStaticFieldInParent.kt") public void testJvmStaticFieldInParent() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt"); } @TestMetadata("kt14996.kt") public void testKt14996() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt"); } @TestMetadata("kt14997.kt") public void testKt14997() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt"); } @TestMetadata("kt14998.kt") public void testKt14998() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt"); } @TestMetadata("kt15145.kt") public void testKt15145() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt"); } @TestMetadata("kt17567.kt") public void testKt17567() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt"); } @TestMetadata("kt18377.kt") public void testKt18377() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt"); } @TestMetadata("kt18682.kt") public void testKt18682() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt"); } @TestMetadata("kt18791.kt") public void testKt18791() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt18791.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt18791.kt"); } @TestMetadata("kt19700.kt") public void testKt19700() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt"); } @TestMetadata("kt19750.kt") public void testKt19750() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt"); } @TestMetadata("leadingDollars.kt") public void testLeadingDollars() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt"); } @TestMetadata("leadingDollars2.kt") public void testLeadingDollars2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt"); } @TestMetadata("mapEntry.kt") public void testMapEntry() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt"); } @TestMetadata("maxErrorCount.kt") public void testMaxErrorCount() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt"); } @TestMetadata("methodParameterNames.kt") public void testMethodParameterNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt"); } @TestMetadata("methodPropertySignatureClash.kt") public void testMethodPropertySignatureClash() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt"); } @TestMetadata("modifiers.kt") public void testModifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt"); } @TestMetadata("multifileClass.kt") public void testMultifileClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt"); } @TestMetadata("nestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt"); } @TestMetadata("nestedClasses2.kt") public void testNestedClasses2() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt"); } @TestMetadata("nestedClassesNonRootPackage.kt") public void testNestedClassesNonRootPackage() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt"); } @TestMetadata("nonExistentClass.kt") public void testNonExistentClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt"); } @TestMetadata("nonExistentClassTypesConversion.kt") public void testNonExistentClassTypesConversion() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt"); } @TestMetadata("nonExistentClassWIthoutCorrection.kt") public void testNonExistentClassWIthoutCorrection() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt"); } @TestMetadata("primitiveTypes.kt") public void testPrimitiveTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt"); } @TestMetadata("propertyAnnotations.kt") public void testPropertyAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt"); } @TestMetadata("repeatableAnnotations.kt") public void testRepeatableAnnotations() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt"); } @TestMetadata("severalPackageParts.kt") public void testSeveralPackageParts() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt"); } @TestMetadata("strangeIdentifiers.kt") public void testStrangeIdentifiers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt"); } @TestMetadata("strangeNames.kt") public void testStrangeNames() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt"); } @TestMetadata("topLevel.kt") public void testTopLevel() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt"); } } diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KotlinKaptContextTestGenerated.java b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KotlinKaptContextTestGenerated.java index 9441eb3678f..47c8c07d04d 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KotlinKaptContextTestGenerated.java +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/KotlinKaptContextTestGenerated.java @@ -21,25 +21,26 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class KotlinKaptContextTestGenerated extends AbstractKotlinKaptContextTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInKotlinRunner() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/kapt3/kapt3-compiler/testData/kotlinRunner"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("NestedClasses.kt") public void testNestedClasses() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt"); } @TestMetadata("Overloads.kt") public void testOverloads() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt"); } @TestMetadata("Simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt"); - doTest(fileName); + runTest("plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt"); } } diff --git a/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java index 54afe72071b..6f434e8433d 100644 --- a/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java +++ b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BlackBoxCodegenTestForNoArgGenerated.java @@ -21,43 +21,41 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BlackBoxCodegenTestForNoArgGenerated extends AbstractBlackBoxCodegenTestForNoArg { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); + } + public void testAllFilesPresentInBox() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/noarg/noarg-cli/testData/box"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } @TestMetadata("initializers.kt") public void testInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/box/initializers.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/box/initializers.kt"); } @TestMetadata("initializersWithoutInvokeInitializers.kt") public void testInitializersWithoutInvokeInitializers() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/box/initializersWithoutInvokeInitializers.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/box/initializersWithoutInvokeInitializers.kt"); } @TestMetadata("kt18245.kt") public void testKt18245() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/box/kt18245.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/box/kt18245.kt"); } @TestMetadata("kt18667.kt") public void testKt18667() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/box/kt18667.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/box/kt18667.kt"); } @TestMetadata("kt18668.kt") public void testKt18668() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/box/kt18668.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/box/kt18668.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/box/simple.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/box/simple.kt"); } } diff --git a/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java index cbcabba43a0..ec8105f60bd 100644 --- a/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java +++ b/plugins/noarg/noarg-cli/test/org/jetbrains/kotlin/noarg/BytecodeListingTestForNoArgGenerated.java @@ -21,49 +21,46 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class BytecodeListingTestForNoArgGenerated extends AbstractBytecodeListingTestForNoArg { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInBytecodeListing() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/noarg/noarg-cli/testData/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("annoOnNotClass.kt") public void testAnnoOnNotClass() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/annoOnNotClass.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/annoOnNotClass.kt"); } @TestMetadata("defaultParameters.kt") public void testDefaultParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/defaultParameters.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/defaultParameters.kt"); } @TestMetadata("inherited.kt") public void testInherited() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/inherited.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/inherited.kt"); } @TestMetadata("noNoArg.kt") public void testNoNoArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/noNoArg.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/noNoArg.kt"); } @TestMetadata("severalNoArg.kt") public void testSeveralNoArg() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/severalNoArg.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/severalNoArg.kt"); } @TestMetadata("simple.kt") public void testSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/simple.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/simple.kt"); } @TestMetadata("superTypes.kt") public void testSuperTypes() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/noarg/noarg-cli/testData/bytecodeListing/superTypes.kt"); - doTest(fileName); + runTest("plugins/noarg/noarg-cli/testData/bytecodeListing/superTypes.kt"); } } diff --git a/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java index 809df6195db..345e8606892 100644 --- a/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java +++ b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverScriptTestGenerated.java @@ -21,13 +21,16 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SamWithReceiverScriptTestGenerated extends AbstractSamWithReceiverScriptTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInScript() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/sam-with-receiver/sam-with-receiver-cli/testData/script"), Pattern.compile("^(.+)\\.kts$"), TargetBackend.ANY, true); } @TestMetadata("samConversionSimple.kts") public void testSamConversionSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/script/samConversionSimple.kts"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/script/samConversionSimple.kts"); } } diff --git a/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java index 3173e395b7e..0e8d862621d 100644 --- a/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java +++ b/plugins/sam-with-receiver/sam-with-receiver-cli/test/org/jetbrains/kotlin/samWithReceiver/SamWithReceiverTestGenerated.java @@ -21,61 +21,56 @@ import java.util.regex.Pattern; @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public class SamWithReceiverTestGenerated extends AbstractSamWithReceiverTest { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + public void testAllFilesPresentInDiagnostics() throws Exception { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } @TestMetadata("noParameters.kt") public void testNoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/noParameters.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/noParameters.kt"); } @TestMetadata("noReturnType.kt") public void testNoReturnType() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/noReturnType.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/noReturnType.kt"); } @TestMetadata("samConversionNoParameters.kt") public void testSamConversionNoParameters() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samConversionNoParameters.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samConversionNoParameters.kt"); } @TestMetadata("samConversionSimple.kt") public void testSamConversionSimple() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samConversionSimple.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samConversionSimple.kt"); } @TestMetadata("samConversionSimpleWithoutAnnotation.kt") public void testSamConversionSimpleWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samConversionSimpleWithoutAnnotation.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samConversionSimpleWithoutAnnotation.kt"); } @TestMetadata("samWithAnnotation.kt") public void testSamWithAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samWithAnnotation.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samWithAnnotation.kt"); } @TestMetadata("samWithoutAnnotation.kt") public void testSamWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samWithoutAnnotation.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/samWithoutAnnotation.kt"); } @TestMetadata("singleParameter.kt") public void testSingleParameter() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/singleParameter.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/singleParameter.kt"); } @TestMetadata("singleParameterWithoutAnnotation.kt") public void testSingleParameterWithoutAnnotation() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/singleParameterWithoutAnnotation.kt"); - doTest(fileName); + runTest("plugins/sam-with-receiver/sam-with-receiver-cli/testData/diagnostics/singleParameterWithoutAnnotation.kt"); } }